Commit 741e71e2f7 for wordpress.org
commit 741e71e2f7e4f68ce3b19f3d28cb6fcc8190deaa
Author: ellatrix <ellatrix@git.wordpress.org>
Date: Tue Nov 4 12:36:42 2025 +0000
Sync packages for WP 6.9 beta 3.
Changes can be found at https://github.com/WordPress/gutenberg/commits/wp/6.9/.
Developed in https://github.com/WordPress/wordpress-develop/pull/10453.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.
Fixes #64185.
Props priethor, mukesh27, jeffpaul, westonruter, desrosj, wildworks.
Built from https://develop.svn.wordpress.org/trunk@61125
git-svn-id: http://core.svn.wordpress.org/trunk@60461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/assets/script-loader-packages.min.php b/wp-includes/assets/script-loader-packages.min.php
index 37641dc6bc..e298e47e6e 100644
--- a/wp-includes/assets/script-loader-packages.min.php
+++ b/wp-includes/assets/script-loader-packages.min.php
@@ -1 +1 @@
-<?php return array('a11y.min.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => 'cb460b4676c94bd228ed'), 'admin-ui.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-element'), 'version' => 'bc5db43f7e3f0d8adcc8'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '758b80d8a795a222601b'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => '3a4d9af2b423048b0dee'), 'autop.min.js' => array('dependencies' => array(), 'version' => '9fb50649848277dd318d'), 'base-styles.min.js' => array('dependencies' => array(), 'version' => '7529f773be5cb229e3c4'), 'blob.min.js' => array('dependencies' => array(), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react-jsx-runtime', '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-primitives', 'wp-url'), 'version' => '55bdef7bd3137eee623d'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', '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-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => 'd2fbf61dbbd05880bac9'), 'block-library.min.js' => array('dependencies' => array('react-jsx-runtime', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-latex-to-mathml', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '684ac473720ea2af8c1a'), 'block-serialization-default-parser.min.js' => array('dependencies' => array(), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => 'de131db49fa830bc97da'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'cac8f4817ab7cea0ac49'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', '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-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '63cb68046c31b8e1f1f4'), 'compose.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '7a9b375d8c19cf9d3d9b'), 'core-commands.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '048b76c101de17d48a99'), 'core-data.min.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '43da16a618b7d009e107'), 'customize-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'd824213342f5e84c8ea3'), 'data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'f940198280891b0b6318'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => '795a56839718d3ff7eae'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated'), 'version' => '26edef3be6483da3de2e'), 'dom-ready.min.js' => array('dependencies' => array(), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'f4d728cf7d1de0df6b70'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => 'bd21e32ac9ad7ea45f3f'), 'edit-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'f0347fefaf37fa0d99ca'), 'editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '4bb0db846509d4d3e648'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => '6a582b0c827fa25df3dd'), 'escape-html.min.js' => array('dependencies' => array(), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-latex-to-mathml', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '253fa37e1a94074be368'), 'hooks.min.js' => array('dependencies' => array(), 'version' => 'dd5603f07f9220ed27f1'), 'html-entities.min.js' => array('dependencies' => array(), 'version' => 'e8b78b18a162491d5e5f'), 'i18n.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'c26c3dc7bed366793375'), 'is-shallow-equal.min.js' => array('dependencies' => array(), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => 'fbc45a34ce65c5723afa'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n'), 'version' => '34c8fb5e7a594a1c8037'), 'latex-to-mathml.min.js' => array('dependencies' => array(), 'version' => '960cef31b586960935b4'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'f203c56da0f227808035'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => 'c66754bed5498afe7050'), 'notices.min.js' => array('dependencies' => array('wp-data'), 'version' => 'f62fbf15dcc23301922f'), 'nux.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'df0a4e75f0b99fb17077'), 'patterns.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '4131f04a041db58120d8'), 'plugins.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '039ed87b5b9f7036ceee'), 'preferences.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '2ca086aed510c242a1ed'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch'), 'version' => 'e954d3a4426d311f7d1a'), 'primitives.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => '0b5dcc337aa7cbf75570'), 'priority-queue.min.js' => array('dependencies' => array(), 'version' => '2d59d091223ee9a33838'), 'private-apis.min.js' => array('dependencies' => array(), 'version' => '4f465748bda624774139'), 'redux-routine.min.js' => array('dependencies' => array(), 'version' => '8bb92d45458b29590f53'), 'reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '6c0ec6e24f166c9b36e7'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '56847ba44c83503f6ace'), 'router.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-private-apis', 'wp-url'), 'version' => '2dfc4b954318a03e6a76'), 'server-side-render.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '7db2472793a2abb97aa5'), 'shortcode.min.js' => array('dependencies' => array(), 'version' => '0b3174183b858f2df320'), 'style-engine.min.js' => array('dependencies' => array(), 'version' => '7c6fcedc37dadafb8a81'), 'token-list.min.js' => array('dependencies' => array(), 'version' => 'cfdf635a436c3953a965'), 'url.min.js' => array('dependencies' => array(), 'version' => '9e178c9516d1222dc834'), 'viewport.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => 'f07b4909c08cfe9de4e2'), 'views.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-preferences'), 'version' => '2001076158893efe412b'), 'warning.min.js' => array('dependencies' => array(), 'version' => 'd69bc18c456d01c11d5a'), 'widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => 'c0e4adfacd4c628b1d02'), 'wordcount.min.js' => array('dependencies' => array(), 'version' => 'c5b97f11206928ea9130'));
+<?php return array('a11y.min.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => 'cb460b4676c94bd228ed'), 'admin-ui.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-element'), 'version' => 'bc5db43f7e3f0d8adcc8'), 'annotations.min.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => '758b80d8a795a222601b'), 'api-fetch.min.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => '3a4d9af2b423048b0dee'), 'autop.min.js' => array('dependencies' => array(), 'version' => '9fb50649848277dd318d'), 'base-styles.min.js' => array('dependencies' => array(), 'version' => '7529f773be5cb229e3c4'), 'blob.min.js' => array('dependencies' => array(), 'version' => '9113eed771d446f4a556'), 'block-directory.min.js' => array('dependencies' => array('react-jsx-runtime', '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-primitives', 'wp-url'), 'version' => '55bdef7bd3137eee623d'), 'block-editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', '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-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => 'b712a018b2493b595525'), 'block-library.min.js' => array('dependencies' => array('react-jsx-runtime', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-latex-to-mathml', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'ee59ed41915a67a70df5'), 'block-serialization-default-parser.min.js' => array('dependencies' => array(), 'version' => '14d44daebf663d05d330'), 'blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => 'de131db49fa830bc97da'), 'commands.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'cac8f4817ab7cea0ac49'), 'components.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', '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-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '63cb68046c31b8e1f1f4'), 'compose.min.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '7a9b375d8c19cf9d3d9b'), 'core-commands.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => 'effe2d88d7f0c50a8ce9'), 'core-data.min.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => '43da16a618b7d009e107'), 'customize-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => 'd824213342f5e84c8ea3'), 'data.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'f940198280891b0b6318'), 'data-controls.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '49f5587e8b90f9e7cc7e'), 'date.min.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => '795a56839718d3ff7eae'), 'deprecated.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'e1f84915c5e8ae38964c'), 'dom.min.js' => array('dependencies' => array('wp-deprecated'), 'version' => '26edef3be6483da3de2e'), 'dom-ready.min.js' => array('dependencies' => array(), 'version' => 'f77871ff7694fffea381'), 'edit-post.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'f011f5ec0075a555ea9c'), 'edit-site.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => 'f54a586a09e9a16b246a'), 'edit-widgets.min.js' => array('dependencies' => array('react-jsx-runtime', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'f0347fefaf37fa0d99ca'), 'editor.min.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '286e63fab76821d10b05'), 'element.min.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => '6a582b0c827fa25df3dd'), 'escape-html.min.js' => array('dependencies' => array(), 'version' => '6561a406d2d232a6fbd2'), 'format-library.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-latex-to-mathml', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '057ce030416659ff0f47'), 'hooks.min.js' => array('dependencies' => array(), 'version' => 'dd5603f07f9220ed27f1'), 'html-entities.min.js' => array('dependencies' => array(), 'version' => 'e8b78b18a162491d5e5f'), 'i18n.min.js' => array('dependencies' => array('wp-hooks'), 'version' => 'c26c3dc7bed366793375'), 'is-shallow-equal.min.js' => array('dependencies' => array(), 'version' => 'e0f9f1d78d83f5196979'), 'keyboard-shortcuts.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => 'fbc45a34ce65c5723afa'), 'keycodes.min.js' => array('dependencies' => array('wp-i18n'), 'version' => '34c8fb5e7a594a1c8037'), 'latex-to-mathml.min.js' => array('dependencies' => array(), 'version' => '960cef31b586960935b4'), 'list-reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => 'f203c56da0f227808035'), 'media-utils.min.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => 'c66754bed5498afe7050'), 'notices.min.js' => array('dependencies' => array('wp-data'), 'version' => 'f62fbf15dcc23301922f'), 'nux.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'df0a4e75f0b99fb17077'), 'patterns.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '4131f04a041db58120d8'), 'plugins.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '039ed87b5b9f7036ceee'), 'preferences.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '2ca086aed510c242a1ed'), 'preferences-persistence.min.js' => array('dependencies' => array('wp-api-fetch'), 'version' => 'e954d3a4426d311f7d1a'), 'primitives.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => '0b5dcc337aa7cbf75570'), 'priority-queue.min.js' => array('dependencies' => array(), 'version' => '2d59d091223ee9a33838'), 'private-apis.min.js' => array('dependencies' => array(), 'version' => '4f465748bda624774139'), 'redux-routine.min.js' => array('dependencies' => array(), 'version' => '8bb92d45458b29590f53'), 'reusable-blocks.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '6c0ec6e24f166c9b36e7'), 'rich-text.min.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '56847ba44c83503f6ace'), 'router.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-private-apis', 'wp-url'), 'version' => '2dfc4b954318a03e6a76'), 'server-side-render.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '7db2472793a2abb97aa5'), 'shortcode.min.js' => array('dependencies' => array(), 'version' => '0b3174183b858f2df320'), 'style-engine.min.js' => array('dependencies' => array(), 'version' => '7c6fcedc37dadafb8a81'), 'token-list.min.js' => array('dependencies' => array(), 'version' => 'cfdf635a436c3953a965'), 'url.min.js' => array('dependencies' => array(), 'version' => '9e178c9516d1222dc834'), 'viewport.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => 'f07b4909c08cfe9de4e2'), 'views.min.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-preferences'), 'version' => '2001076158893efe412b'), 'warning.min.js' => array('dependencies' => array(), 'version' => 'd69bc18c456d01c11d5a'), 'widgets.min.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => 'c0e4adfacd4c628b1d02'), 'wordcount.min.js' => array('dependencies' => array(), 'version' => 'c5b97f11206928ea9130'));
diff --git a/wp-includes/assets/script-loader-packages.php b/wp-includes/assets/script-loader-packages.php
index 437c2793ee..7bc9bbb5c4 100644
--- a/wp-includes/assets/script-loader-packages.php
+++ b/wp-includes/assets/script-loader-packages.php
@@ -1 +1 @@
-<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '454e8a3cffdca128c277'), 'admin-ui.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-element'), 'version' => '162fe802085f0b777fd4'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => 'b0f85052d9a7695cd3bc'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => 'dde45ae4bb2923c6d069'), 'autop.js' => array('dependencies' => array(), 'version' => '4253b2f13990616d5356'), 'base-styles.js' => array('dependencies' => array(), 'version' => 'dc7e184aa007ae08c82c'), 'blob.js' => array('dependencies' => array(), 'version' => 'e1b9669561b45fc50da4'), 'block-directory.js' => array('dependencies' => array('react-jsx-runtime', '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-primitives', 'wp-url'), 'version' => '033f605efae39cbb46e1'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', '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-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => '672c6af36eca99880905'), 'block-library.js' => array('dependencies' => array('react-jsx-runtime', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-latex-to-mathml', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '054f7b96e55d7dc735ce'), 'block-serialization-default-parser.js' => array('dependencies' => array(), 'version' => '6f4152c4a3466c0e1107'), 'blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '0dd7fe05e1672f006cab'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'dc36b1bd84586300bf60'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', '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-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '229715a0b86d29c321d7'), 'compose.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '7c895b31cd7a903b5229'), 'core-commands.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '709fb4860381627d9aba'), 'core-data.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => 'da915755686cf940d329'), 'customize-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '18b0f5c24fbd8697b2aa'), 'data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'c64d89d47908ae6c6928'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '795b5696a2f33be22815'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => '90011238ea6662a51b76'), 'deprecated.js' => array('dependencies' => array('wp-hooks'), 'version' => '6c0519d363872604d48f'), 'dom.js' => array('dependencies' => array('wp-deprecated'), 'version' => 'ce91312aee495c65e891'), 'dom-ready.js' => array('dependencies' => array(), 'version' => 'e8a78afc9e733da0e68c'), 'edit-post.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'd5ba67ff2cae4b80433b'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => 'b3ae793692ff0876c23f'), 'edit-widgets.js' => array('dependencies' => array('react-jsx-runtime', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'a80ffe47fb274d89b066'), 'editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '837ff73204d23f9b9e64'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => 'a63ee6ce984c02a99fa7'), 'escape-html.js' => array('dependencies' => array(), 'version' => '6cade854f375b3091114'), 'format-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-latex-to-mathml', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '96ecbe389b7ddf3765ac'), 'hooks.js' => array('dependencies' => array(), 'version' => '220ff17f5667d013d468'), 'html-entities.js' => array('dependencies' => array(), 'version' => '4ae2a0abe957ffc91832'), 'i18n.js' => array('dependencies' => array('wp-hooks'), 'version' => '6b3ae5bd3b8d9598492d'), 'is-shallow-equal.js' => array('dependencies' => array(), 'version' => '4554764360b974e32f5d'), 'keyboard-shortcuts.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '98dc6100b14191414e86'), 'keycodes.js' => array('dependencies' => array('wp-i18n'), 'version' => '0ae26254e495f9f44348'), 'latex-to-mathml.js' => array('dependencies' => array(), 'version' => '1ce7a1f9643a38b5ebfc'), 'list-reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => '6a9a46c2725626e98187'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => '759ef046a52055f4122a'), 'notices.js' => array('dependencies' => array('wp-data'), 'version' => 'bce2bc515ebefc1c8fdb'), 'nux.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'faac53b38d2c588188d9'), 'patterns.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '9a430feb5c489942dfd9'), 'plugins.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '406ba7671d4fe3433a29'), 'preferences.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '82e07780e2bc6c33ac54'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch'), 'version' => 'c2f2335b9574eb86f052'), 'primitives.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => '2a765d78f060aed119ff'), 'priority-queue.js' => array('dependencies' => array(), 'version' => 'b617c70465159c57937b'), 'private-apis.js' => array('dependencies' => array(), 'version' => 'd7d926d9becc3eef5e24'), 'redux-routine.js' => array('dependencies' => array(), 'version' => '58e4c7cd114da148c2c4'), 'reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '432ad5022736e46b1966'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '54c04da50e7bba9dd1c6'), 'router.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-private-apis', 'wp-url'), 'version' => 'a276444c22bcd59e25c6'), 'server-side-render.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1332aa67a86c1fb5cdae'), 'shortcode.js' => array('dependencies' => array(), 'version' => 'c4ba248a967c40b8582c'), 'style-engine.js' => array('dependencies' => array(), 'version' => 'e9af2fb3cca3fc5b8836'), 'token-list.js' => array('dependencies' => array(), 'version' => '2dbca0e379f5b7d539a9'), 'url.js' => array('dependencies' => array(), 'version' => '6bc6a4c3049d91342459'), 'viewport.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => 'a67acba4cc142a907c6d'), 'views.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-preferences'), 'version' => '64827d6de567328239a3'), 'warning.js' => array('dependencies' => array(), 'version' => '9eb7f5c6957924ec4b81'), 'widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '1eec0865ea9500e23fc2'), 'wordcount.js' => array('dependencies' => array(), 'version' => '74fa464d39ba906db10c'));
+<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n'), 'version' => '454e8a3cffdca128c277'), 'admin-ui.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-element'), 'version' => '162fe802085f0b777fd4'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-rich-text'), 'version' => 'b0f85052d9a7695cd3bc'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-url'), 'version' => 'dde45ae4bb2923c6d069'), 'autop.js' => array('dependencies' => array(), 'version' => '4253b2f13990616d5356'), 'base-styles.js' => array('dependencies' => array(), 'version' => 'dc7e184aa007ae08c82c'), 'blob.js' => array('dependencies' => array(), 'version' => 'e1b9669561b45fc50da4'), 'block-directory.js' => array('dependencies' => array('react-jsx-runtime', '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-primitives', 'wp-url'), 'version' => '033f605efae39cbb46e1'), 'block-editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-serialization-default-parser', '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-preferences', 'wp-primitives', 'wp-priority-queue', 'wp-private-apis', 'wp-rich-text', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning'), 'version' => '7d2ebc6c21ef62b4de9e'), 'block-library.js' => array('dependencies' => array('react-jsx-runtime', '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-keyboard-shortcuts', 'wp-keycodes', 'wp-latex-to-mathml', 'wp-notices', 'wp-patterns', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '608b1058ea0da1731484'), 'block-serialization-default-parser.js' => array('dependencies' => array(), 'version' => '6f4152c4a3466c0e1107'), 'blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-private-apis', 'wp-rich-text', 'wp-shortcode', 'wp-warning'), 'version' => '0dd7fe05e1672f006cab'), 'commands.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-primitives', 'wp-private-apis'), 'version' => 'dc36b1bd84586300bf60'), 'components.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', '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-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-warning'), 'version' => '229715a0b86d29c321d7'), 'compose.js' => array('dependencies' => array('react', 'react-jsx-runtime', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-priority-queue'), 'version' => '7c895b31cd7a903b5229'), 'core-commands.js' => array('dependencies' => array('react-jsx-runtime', 'wp-commands', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url'), 'version' => '2aa6475e85b024c6a8d7'), 'core-data.js' => array('dependencies' => array('react-jsx-runtime', '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-private-apis', 'wp-rich-text', 'wp-url', 'wp-warning'), 'version' => 'da915755686cf940d329'), 'customize-widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-widgets'), 'version' => '18b0f5c24fbd8697b2aa'), 'data.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-priority-queue', 'wp-private-apis', 'wp-redux-routine'), 'version' => 'c64d89d47908ae6c6928'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated'), 'version' => '795b5696a2f33be22815'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated'), 'version' => '90011238ea6662a51b76'), 'deprecated.js' => array('dependencies' => array('wp-hooks'), 'version' => '6c0519d363872604d48f'), 'dom.js' => array('dependencies' => array('wp-deprecated'), 'version' => 'ce91312aee495c65e891'), 'dom-ready.js' => array('dependencies' => array(), 'version' => 'e8a78afc9e733da0e68c'), 'edit-post.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-widgets'), 'version' => 'e1bb9f1ce3b75f246296'), 'edit-site.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-patterns', 'wp-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-router', 'wp-url', 'wp-warning', 'wp-widgets'), 'version' => '24b999e60c28bfc9cec2'), 'edit-widgets.js' => array('dependencies' => array('react-jsx-runtime', '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-preferences', 'wp-primitives', 'wp-private-apis', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => 'a80ffe47fb274d89b066'), 'editor.js' => array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-commands', '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-plugins', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'f50c1a92e61c0add3f85'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html'), 'version' => 'a63ee6ce984c02a99fa7'), 'escape-html.js' => array('dependencies' => array(), 'version' => '6cade854f375b3091114'), 'format-library.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-latex-to-mathml', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-url'), 'version' => '719f0872a640138fb1ed'), 'hooks.js' => array('dependencies' => array(), 'version' => '220ff17f5667d013d468'), 'html-entities.js' => array('dependencies' => array(), 'version' => '4ae2a0abe957ffc91832'), 'i18n.js' => array('dependencies' => array('wp-hooks'), 'version' => '6b3ae5bd3b8d9598492d'), 'is-shallow-equal.js' => array('dependencies' => array(), 'version' => '4554764360b974e32f5d'), 'keyboard-shortcuts.js' => array('dependencies' => array('react-jsx-runtime', 'wp-data', 'wp-element', 'wp-keycodes'), 'version' => '98dc6100b14191414e86'), 'keycodes.js' => array('dependencies' => array('wp-i18n'), 'version' => '0ae26254e495f9f44348'), 'latex-to-mathml.js' => array('dependencies' => array(), 'version' => '1ce7a1f9643a38b5ebfc'), 'list-reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blob', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n'), 'version' => '6a9a46c2725626e98187'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-private-apis'), 'version' => '759ef046a52055f4122a'), 'notices.js' => array('dependencies' => array('wp-data'), 'version' => 'bce2bc515ebefc1c8fdb'), 'nux.js' => array('dependencies' => array('react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'faac53b38d2c588188d9'), 'patterns.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-url'), 'version' => '9a430feb5c489942dfd9'), 'plugins.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-is-shallow-equal', 'wp-primitives'), 'version' => '406ba7671d4fe3433a29'), 'preferences.js' => array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis'), 'version' => '82e07780e2bc6c33ac54'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch'), 'version' => 'c2f2335b9574eb86f052'), 'primitives.js' => array('dependencies' => array('react-jsx-runtime', 'wp-element'), 'version' => '2a765d78f060aed119ff'), 'priority-queue.js' => array('dependencies' => array(), 'version' => 'b617c70465159c57937b'), 'private-apis.js' => array('dependencies' => array(), 'version' => 'd7d926d9becc3eef5e24'), 'redux-routine.js' => array('dependencies' => array(), 'version' => '58e4c7cd114da148c2c4'), 'reusable-blocks.js' => array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-url'), 'version' => '432ad5022736e46b1966'), 'rich-text.js' => array('dependencies' => array('wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes'), 'version' => '54c04da50e7bba9dd1c6'), 'router.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-element', 'wp-private-apis', 'wp-url'), 'version' => 'a276444c22bcd59e25c6'), 'server-side-render.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1332aa67a86c1fb5cdae'), 'shortcode.js' => array('dependencies' => array(), 'version' => 'c4ba248a967c40b8582c'), 'style-engine.js' => array('dependencies' => array(), 'version' => 'e9af2fb3cca3fc5b8836'), 'token-list.js' => array('dependencies' => array(), 'version' => '2dbca0e379f5b7d539a9'), 'url.js' => array('dependencies' => array(), 'version' => '6bc6a4c3049d91342459'), 'viewport.js' => array('dependencies' => array('react-jsx-runtime', 'wp-compose', 'wp-data'), 'version' => 'a67acba4cc142a907c6d'), 'views.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-preferences'), 'version' => '64827d6de567328239a3'), 'warning.js' => array('dependencies' => array(), 'version' => '9eb7f5c6957924ec4b81'), 'widgets.js' => array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '1eec0865ea9500e23fc2'), 'wordcount.js' => array('dependencies' => array(), 'version' => '74fa464d39ba906db10c'));
diff --git a/wp-includes/blocks/accordion-heading/block.json b/wp-includes/blocks/accordion-heading/block.json
index 875747b6d5..1fbb33f7e4 100644
--- a/wp-includes/blocks/accordion-heading/block.json
+++ b/wp-includes/blocks/accordion-heading/block.json
@@ -4,7 +4,7 @@
"name": "core/accordion-heading",
"title": "Accordion Heading",
"category": "design",
- "description": "Toggles the accordion panel.",
+ "description": "Displays a heading that toggles the accordion panel.",
"parent": [ "core/accordion-item" ],
"usesContext": [
"core/accordion-icon-position",
diff --git a/wp-includes/blocks/accordion-heading/style-rtl.css b/wp-includes/blocks/accordion-heading/style-rtl.css
index 27da0315df..e2d11b91c3 100644
--- a/wp-includes/blocks/accordion-heading/style-rtl.css
+++ b/wp-includes/blocks/accordion-heading/style-rtl.css
@@ -1,7 +1,3 @@
-.wp-block-accordion .wp-block-accordion-heading{
- padding:0;
-}
-
.wp-block-accordion-heading__toggle{
align-items:center;
background:none;
@@ -11,6 +7,7 @@
display:flex;
font-family:inherit;
font-size:inherit;
+ font-style:inherit;
font-weight:inherit;
letter-spacing:inherit;
line-height:inherit;
diff --git a/wp-includes/blocks/accordion-heading/style-rtl.min.css b/wp-includes/blocks/accordion-heading/style-rtl.min.css
index 88a9abd420..2120086d17 100644
--- a/wp-includes/blocks/accordion-heading/style-rtl.min.css
+++ b/wp-includes/blocks/accordion-heading/style-rtl.min.css
@@ -1 +1 @@
-.wp-block-accordion .wp-block-accordion-heading{padding:0}.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}
\ No newline at end of file
+.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}
\ No newline at end of file
diff --git a/wp-includes/blocks/accordion-heading/style.css b/wp-includes/blocks/accordion-heading/style.css
index 27da0315df..e2d11b91c3 100644
--- a/wp-includes/blocks/accordion-heading/style.css
+++ b/wp-includes/blocks/accordion-heading/style.css
@@ -1,7 +1,3 @@
-.wp-block-accordion .wp-block-accordion-heading{
- padding:0;
-}
-
.wp-block-accordion-heading__toggle{
align-items:center;
background:none;
@@ -11,6 +7,7 @@
display:flex;
font-family:inherit;
font-size:inherit;
+ font-style:inherit;
font-weight:inherit;
letter-spacing:inherit;
line-height:inherit;
diff --git a/wp-includes/blocks/accordion-heading/style.min.css b/wp-includes/blocks/accordion-heading/style.min.css
index 88a9abd420..2120086d17 100644
--- a/wp-includes/blocks/accordion-heading/style.min.css
+++ b/wp-includes/blocks/accordion-heading/style.min.css
@@ -1 +1 @@
-.wp-block-accordion .wp-block-accordion-heading{padding:0}.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}
\ No newline at end of file
+.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}
\ No newline at end of file
diff --git a/wp-includes/blocks/archives.php b/wp-includes/blocks/archives.php
index 2846b6ca1a..077507f8c9 100644
--- a/wp-includes/blocks/archives.php
+++ b/wp-includes/blocks/archives.php
@@ -66,9 +66,12 @@ function render_block_core_archives( $attributes ) {
$show_label = empty( $attributes['showLabel'] ) ? ' screen-reader-text' : '';
$block_content = '<label for="' . $dropdown_id . '" class="wp-block-archives__label' . $show_label . '">' . esc_html( $title ) . '</label>
- <select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
+ <select id="' . esc_attr( $dropdown_id ) . '" name="archive-dropdown">
<option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';
+ // Inject the dropdown script immediately after the select dropdown.
+ $block_content .= block_core_archives_build_dropdown_script( $dropdown_id );
+
return sprintf(
'<div %1$s>%2$s</div>',
$wrapper_attributes,
@@ -106,6 +109,55 @@ function render_block_core_archives( $attributes ) {
);
}
+/**
+ * Generates the inline script for an archives dropdown field.
+ *
+ * @since 6.9.0
+ *
+ * @param string $dropdown_id ID of the dropdown field.
+ *
+ * @return string Returns the dropdown onChange redirection script.
+ */
+function block_core_archives_build_dropdown_script( $dropdown_id ) {
+ ob_start();
+
+ $exports = array( $dropdown_id, home_url() );
+ ?>
+ <script>
+ ( ( [ dropdownId, homeUrl ] ) => {
+ const dropdown = document.getElementById( dropdownId );
+ function onSelectChange() {
+ setTimeout( () => {
+ if ( 'escape' === dropdown.dataset.lastkey ) {
+ return;
+ }
+ if ( dropdown.value ) {
+ location.href = dropdown.value;
+ }
+ }, 250 );
+ }
+ function onKeyUp( event ) {
+ if ( 'Escape' === event.key ) {
+ dropdown.dataset.lastkey = 'escape';
+ } else {
+ delete dropdown.dataset.lastkey;
+ }
+ }
+ function onClick() {
+ delete dropdown.dataset.lastkey;
+ }
+ dropdown.addEventListener( 'keyup', onKeyUp );
+ dropdown.addEventListener( 'click', onClick );
+ dropdown.addEventListener( 'change', onSelectChange );
+ } )( <?php echo wp_json_encode( $exports, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
+ </script>
+ <?php
+ return wp_get_inline_script_tag(
+ trim( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) ) .
+ "\n//# sourceURL=" . rawurlencode( __FUNCTION__ )
+ );
+}
+
/**
* Register archives block.
*
diff --git a/wp-includes/blocks/blocks-json.php b/wp-includes/blocks/blocks-json.php
index d93710e542..6163679a70 100644
--- a/wp-includes/blocks/blocks-json.php
+++ b/wp-includes/blocks/blocks-json.php
@@ -104,7 +104,7 @@
'name' => 'core/accordion-heading',
'title' => 'Accordion Heading',
'category' => 'design',
- 'description' => 'Toggles the accordion panel.',
+ 'description' => 'Displays a heading that toggles the accordion panel.',
'parent' => array(
'core/accordion-item'
),
@@ -2516,9 +2516,13 @@
)
),
'supports' => array(
+ 'html' => false,
'className' => false,
'customClassName' => false,
- 'reusable' => false
+ 'lock' => false,
+ 'reusable' => false,
+ 'renaming' => false,
+ 'blockVisibility' => false
),
'editorStyle' => 'wp-block-freeform-editor'
),
@@ -3825,7 +3829,10 @@
'customClassName' => false,
'inserter' => false,
'html' => false,
+ 'lock' => false,
'reusable' => false,
+ 'renaming' => false,
+ 'blockVisibility' => false,
'interactivity' => array(
'clientNavigation' => true
)
diff --git a/wp-includes/blocks/categories.php b/wp-includes/blocks/categories.php
index ec816833da..5ff5858166 100644
--- a/wp-includes/blocks/categories.php
+++ b/wp-includes/blocks/categories.php
@@ -104,14 +104,32 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
?>
<script>
( ( [ dropdownId, homeUrl ] ) => {
- document.getElementById( dropdownId ).addEventListener( 'change', ( event ) => {
- const dropdown = /** @type {HTMLSelectElement} */ ( event.target );
- if ( dropdown.value && dropdown.value !== '-1' ) {
- const url = new URL( homeUrl );
- url.searchParams.set( dropdown.name, dropdown.value );
- location.href = url.href;
+ const dropdown = document.getElementById( dropdownId );
+ function onSelectChange() {
+ setTimeout( () => {
+ if ( 'escape' === dropdown.dataset.lastkey ) {
+ return;
+ }
+ if ( dropdown.value && dropdown instanceof HTMLSelectElement ) {
+ const url = new URL( homeUrl );
+ url.searchParams.set( dropdown.name, dropdown.value );
+ location.href = url.href;
+ }
+ }, 250 );
+ }
+ function onKeyUp( event ) {
+ if ( 'Escape' === event.key ) {
+ dropdown.dataset.lastkey = 'escape';
+ } else {
+ delete dropdown.dataset.lastkey;
}
- } );
+ }
+ function onClick() {
+ delete dropdown.dataset.lastkey;
+ }
+ dropdown.addEventListener( 'keyup', onKeyUp );
+ dropdown.addEventListener( 'click', onClick );
+ dropdown.addEventListener( 'change', onSelectChange );
} )( <?php echo wp_json_encode( $exports, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
</script>
<?php
diff --git a/wp-includes/blocks/freeform/block.json b/wp-includes/blocks/freeform/block.json
index d40e8ea13d..35d8295e46 100644
--- a/wp-includes/blocks/freeform/block.json
+++ b/wp-includes/blocks/freeform/block.json
@@ -13,9 +13,13 @@
}
},
"supports": {
+ "html": false,
"className": false,
"customClassName": false,
- "reusable": false
+ "lock": false,
+ "reusable": false,
+ "renaming": false,
+ "blockVisibility": false
},
"editorStyle": "wp-block-freeform-editor"
}
diff --git a/wp-includes/blocks/heading/style-rtl.css b/wp-includes/blocks/heading/style-rtl.css
index a6bf013bdd..0740b563ae 100644
--- a/wp-includes/blocks/heading/style-rtl.css
+++ b/wp-includes/blocks/heading/style-rtl.css
@@ -1,4 +1,4 @@
-h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{
+h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{
padding:1.25em 2.375em;
}
h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){
diff --git a/wp-includes/blocks/heading/style-rtl.min.css b/wp-includes/blocks/heading/style-rtl.min.css
index 15786914f2..6aff7ae178 100644
--- a/wp-includes/blocks/heading/style-rtl.min.css
+++ b/wp-includes/blocks/heading/style-rtl.min.css
@@ -1 +1 @@
-h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}
\ No newline at end of file
+h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}
\ No newline at end of file
diff --git a/wp-includes/blocks/heading/style.css b/wp-includes/blocks/heading/style.css
index a6bf013bdd..0740b563ae 100644
--- a/wp-includes/blocks/heading/style.css
+++ b/wp-includes/blocks/heading/style.css
@@ -1,4 +1,4 @@
-h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{
+h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{
padding:1.25em 2.375em;
}
h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){
diff --git a/wp-includes/blocks/heading/style.min.css b/wp-includes/blocks/heading/style.min.css
index 15786914f2..6aff7ae178 100644
--- a/wp-includes/blocks/heading/style.min.css
+++ b/wp-includes/blocks/heading/style.min.css
@@ -1 +1 @@
-h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}
\ No newline at end of file
+h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}
\ No newline at end of file
diff --git a/wp-includes/blocks/math/style-rtl.css b/wp-includes/blocks/math/style-rtl.css
new file mode 100644
index 0000000000..99062adea9
--- /dev/null
+++ b/wp-includes/blocks/math/style-rtl.css
@@ -0,0 +1,4 @@
+.wp-block-math{
+ overflow-x:auto;
+ overflow-y:hidden;
+}
\ No newline at end of file
diff --git a/wp-includes/blocks/math/style-rtl.min.css b/wp-includes/blocks/math/style-rtl.min.css
new file mode 100644
index 0000000000..5e511d4ca1
--- /dev/null
+++ b/wp-includes/blocks/math/style-rtl.min.css
@@ -0,0 +1 @@
+.wp-block-math{overflow-x:auto;overflow-y:hidden}
\ No newline at end of file
diff --git a/wp-includes/blocks/math/style.css b/wp-includes/blocks/math/style.css
new file mode 100644
index 0000000000..99062adea9
--- /dev/null
+++ b/wp-includes/blocks/math/style.css
@@ -0,0 +1,4 @@
+.wp-block-math{
+ overflow-x:auto;
+ overflow-y:hidden;
+}
\ No newline at end of file
diff --git a/wp-includes/blocks/math/style.min.css b/wp-includes/blocks/math/style.min.css
new file mode 100644
index 0000000000..5e511d4ca1
--- /dev/null
+++ b/wp-includes/blocks/math/style.min.css
@@ -0,0 +1 @@
+.wp-block-math{overflow-x:auto;overflow-y:hidden}
\ No newline at end of file
diff --git a/wp-includes/blocks/missing/block.json b/wp-includes/blocks/missing/block.json
index f9b3efe594..94051f20be 100644
--- a/wp-includes/blocks/missing/block.json
+++ b/wp-includes/blocks/missing/block.json
@@ -23,7 +23,10 @@
"customClassName": false,
"inserter": false,
"html": false,
+ "lock": false,
"reusable": false,
+ "renaming": false,
+ "blockVisibility": false,
"interactivity": {
"clientNavigation": true
}
diff --git a/wp-includes/css/dist/block-library/style-rtl.css b/wp-includes/css/dist/block-library/style-rtl.css
index 1756638f30..1b048a36de 100644
--- a/wp-includes/css/dist/block-library/style-rtl.css
+++ b/wp-includes/css/dist/block-library/style-rtl.css
@@ -18,10 +18,6 @@
}
}
-.wp-block-accordion .wp-block-accordion-heading{
- padding:0;
-}
-
.wp-block-accordion-heading__toggle{
align-items:center;
background:none;
@@ -31,6 +27,7 @@
display:flex;
font-family:inherit;
font-size:inherit;
+ font-style:inherit;
font-weight:inherit;
letter-spacing:inherit;
line-height:inherit;
@@ -1241,7 +1238,7 @@ figure.wp-block-gallery.has-nested-images{
position:relative;
}
-h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{
+h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{
padding:1.25em 2.375em;
}
h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){
@@ -1712,11 +1709,17 @@ ol,ul{
padding:1.25em 2.375em;
}
-.wp-block-loginout,.wp-block-media-text{
+.wp-block-loginout{
box-sizing:border-box;
}
+.wp-block-math{
+ overflow-x:auto;
+ overflow-y:hidden;
+}
+
.wp-block-media-text{
+ box-sizing:border-box;
direction:ltr;
display:grid;
grid-template-columns:50% 1fr;
diff --git a/wp-includes/css/dist/block-library/style-rtl.min.css b/wp-includes/css/dist/block-library/style-rtl.min.css
index 32c33e11c8..7143dc1421 100644
--- a/wp-includes/css/dist/block-library/style-rtl.min.css
+++ b/wp-includes/css/dist/block-library/style-rtl.min.css
@@ -1 +1 @@
-@charset "UTF-8";.wp-block-accordion-item{display:grid;grid-template-rows:max-content 0fr}.wp-block-accordion-item.is-open{grid-template-rows:max-content 1fr}.wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transform:rotate(-45deg)}@media (prefers-reduced-motion:no-preference){.wp-block-accordion-item{transition:grid-template-rows .3s ease-out}.wp-block-accordion-item>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transition:transform .2s ease-in-out}}.wp-block-accordion .wp-block-accordion-heading{padding:0}.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}.wp-block-accordion-panel[aria-hidden=true],.wp-block-accordion-panel[inert]{display:none;margin-block-start:0}.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}.wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}.wp-block-breadcrumbs{box-sizing:border-box}.wp-block-breadcrumbs ol{flex-wrap:wrap;list-style:none}.wp-block-breadcrumbs li,.wp-block-breadcrumbs ol{align-items:center;display:flex;margin:0;padding:0}.wp-block-breadcrumbs li:not(:last-child):after{content:var(--separator,"/");margin:0 .5em;opacity:.7}.wp-block-breadcrumbs span{color:inherit}.wp-block-button__link{align-content:center;box-sizing:border-box;cursor:pointer;display:inline-block;height:100%;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}.wp-block-buttons{box-sizing:border-box}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons .wp-block-button__link{width:100%}.wp-block-button.aligncenter,.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}.wp-block-calendar :where(table:not(.has-text-color)){color:#40464d}.wp-block-calendar :where(table:not(.has-text-color)) td,.wp-block-calendar :where(table:not(.has-text-color)) th{border-color:#ddd}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}.wp-block-code{box-sizing:border-box}.wp-block-code code{direction:ltr;display:block;font-family:inherit;overflow-wrap:break-word;text-align:initial;white-space:pre-wrap}.wp-block-columns{box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns{align-items:normal!important}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.wp-block-comments{box-sizing:border-box}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{font-size:inherit}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{display:inline-block;margin-left:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{display:inline-block;margin-right:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-comments-pagination.aligncenter{justify-content:center}.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-right:2rem}.wp-block-comment-template.alignleft{float:right}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:fit-content}.wp-block-comment-template.alignright{float:left}.wp-block-comment-date{box-sizing:border-box}.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-author-name,.wp-block-comment-content,.wp-block-comment-edit-link,.wp-block-comment-reply-link{box-sizing:border-box}.wp-block-cover,.wp-block-cover-image{align-items:center;background-position:50%;box-sizing:border-box;direction:ltr;display:flex;justify-content:center;min-height:430px;overflow:hidden;overflow:clip;padding:1em;position:relative}.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){background-color:#000}.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{background-color:initial}.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{background-color:inherit;content:""}.wp-block-cover .wp-block-cover__background,.wp-block-cover .wp-block-cover__gradient-background,.wp-block-cover-image .wp-block-cover__background,.wp-block-cover-image .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim:not(.has-background-gradient):before,.wp-block-cover.has-background-dim:not(.has-background-gradient):before{bottom:0;left:0;opacity:.5;position:absolute;right:0;top:0}.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient):before{opacity:.1}.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient):before{opacity:.2}.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient):before{opacity:.3}.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient):before{opacity:.4}.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient):before{opacity:.5}.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient):before{opacity:.6}.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient):before{opacity:.7}.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient):before{opacity:.8}.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient):before{opacity:.9}.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient):before{opacity:1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0{opacity:0}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10{opacity:.1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20{opacity:.2}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30{opacity:.3}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40{opacity:.4}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50{opacity:.5}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60{opacity:.6}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70{opacity:.7}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80{opacity:.8}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90{opacity:.9}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100{opacity:1}.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.alignleft,.wp-block-cover.alignright{max-width:420px;width:100%}.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{display:flex}.wp-block-cover .wp-block-cover__inner-container,.wp-block-cover-image .wp-block-cover__inner-container{color:inherit;direction:rtl;position:relative;width:100%}.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{align-items:flex-start;justify-content:flex-start}.wp-block-cover-image.is-position-top-center,.wp-block-cover.is-position-top-center{align-items:flex-start;justify-content:center}.wp-block-cover-image.is-position-top-right,.wp-block-cover.is-position-top-right{align-items:flex-start;justify-content:flex-end}.wp-block-cover-image.is-position-center-left,.wp-block-cover.is-position-center-left{align-items:center;justify-content:flex-start}.wp-block-cover-image.is-position-center-center,.wp-block-cover.is-position-center-center{align-items:center;justify-content:center}.wp-block-cover-image.is-position-center-right,.wp-block-cover.is-position-center-right{align-items:center;justify-content:flex-end}.wp-block-cover-image.is-position-bottom-left,.wp-block-cover.is-position-bottom-left{align-items:flex-end;justify-content:flex-start}.wp-block-cover-image.is-position-bottom-center,.wp-block-cover.is-position-bottom-center{align-items:flex-end;justify-content:center}.wp-block-cover-image.is-position-bottom-right,.wp-block-cover.is-position-bottom-right{align-items:flex-end;justify-content:flex-end}.wp-block-cover-image.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container{margin:0}.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container{margin:0;width:auto}.wp-block-cover .wp-block-cover__image-background,.wp-block-cover video.wp-block-cover__video-background,.wp-block-cover-image .wp-block-cover__image-background,.wp-block-cover-image video.wp-block-cover__video-background{border:none;bottom:0;box-shadow:none;height:100%;left:0;margin:0;max-height:none;max-width:none;object-fit:cover;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:fixed;background-repeat:no-repeat;background-size:cover}@supports (-webkit-touch-callout:inherit){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}@media (prefers-reduced-motion:reduce){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}.wp-block-cover-image.is-repeated,.wp-block-cover.is-repeated,.wp-block-cover__image-background.is-repeated,video.wp-block-cover__video-background.is-repeated{background-repeat:repeat;background-size:auto}.wp-block-cover-image-text,.wp-block-cover-image-text a,.wp-block-cover-image-text a:active,.wp-block-cover-image-text a:focus,.wp-block-cover-image-text a:hover,.wp-block-cover-text,.wp-block-cover-text a,.wp-block-cover-text a:active,.wp-block-cover-text a:focus,.wp-block-cover-text a:hover,section.wp-block-cover-image h2,section.wp-block-cover-image h2 a,section.wp-block-cover-image h2 a:active,section.wp-block-cover-image h2 a:focus,section.wp-block-cover-image h2 a:hover{color:#fff}.wp-block-cover-image .wp-block-cover.has-left-content{justify-content:flex-start}.wp-block-cover-image .wp-block-cover.has-right-content{justify-content:flex-end}.wp-block-cover-image.has-left-content .wp-block-cover-image-text,.wp-block-cover.has-left-content .wp-block-cover-text,section.wp-block-cover-image.has-left-content>h2{margin-right:0;text-align:right}.wp-block-cover-image.has-right-content .wp-block-cover-image-text,.wp-block-cover.has-right-content .wp-block-cover-text,section.wp-block-cover-image.has-right-content>h2{margin-left:0;text-align:left}.wp-block-cover .wp-block-cover-text,.wp-block-cover-image .wp-block-cover-image-text,section.wp-block-cover-image>h2{font-size:2em;line-height:1.25;margin-bottom:0;max-width:840px;padding:.44em;text-align:center;z-index:1}:where(.wp-block-cover-image:not(.has-text-color)),:where(.wp-block-cover:not(.has-text-color)){color:#fff}:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){color:#000}:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){color:inherit}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__image-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__video-background{z-index:0}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__gradient-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient):before{z-index:1}.has-modal-open body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container{z-index:auto}.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-right:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):where(a):active,:where(.wp-block-file__button):where(a):focus,:where(.wp-block-file__button):where(a):hover,:where(.wp-block-file__button):where(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}.wp-block-form-input__label{display:flex;flex-direction:column;gap:.25em;margin-bottom:.5em;width:100%}.wp-block-form-input__label.is-label-inline{align-items:center;flex-direction:row;gap:.5em}.wp-block-form-input__label.is-label-inline .wp-block-form-input__label-content{margin-bottom:.5em}.wp-block-form-input__label:has(input[type=checkbox]){flex-direction:row;width:fit-content}.wp-block-form-input__label:has(input[type=checkbox]) .wp-block-form-input__label-content{margin:0}.wp-block-form-input__label:has(.wp-block-form-input__label-content+input[type=checkbox]){flex-direction:row-reverse}.wp-block-form-input__label-content{width:fit-content}:where(.wp-block-form-input__input){font-size:1em;margin-bottom:.5em;padding:0 .5em}:where(.wp-block-form-input__input)[type=date],:where(.wp-block-form-input__input)[type=datetime-local],:where(.wp-block-form-input__input)[type=datetime],:where(.wp-block-form-input__input)[type=email],:where(.wp-block-form-input__input)[type=month],:where(.wp-block-form-input__input)[type=number],:where(.wp-block-form-input__input)[type=password],:where(.wp-block-form-input__input)[type=search],:where(.wp-block-form-input__input)[type=tel],:where(.wp-block-form-input__input)[type=text],:where(.wp-block-form-input__input)[type=time],:where(.wp-block-form-input__input)[type=url],:where(.wp-block-form-input__input)[type=week]{border-style:solid;border-width:1px;line-height:2;min-height:2em}textarea.wp-block-form-input__input{min-height:10em}.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 0 1em 1em;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-left:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,#000000b3,#0000004d 70%,#0000);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-left:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-left:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-left:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-left:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-left:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-left:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-left:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-left:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-left:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{bottom:0;left:0;max-height:100%;position:absolute;right:0}.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{backdrop-filter:blur(3px);content:"";height:100%;-webkit-mask-image:linear-gradient(0deg,#000 20%,#0000);mask-image:linear-gradient(0deg,#000 20%,#0000);max-height:40%;pointer-events:none}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{box-sizing:border-box;color:#fff;font-size:13px;margin:0;overflow:auto;padding:1em;text-align:center;text-shadow:0 0 1.5px #000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{height:12px;width:12px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{background-color:initial}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{background-color:#fffc}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{scrollbar-color:#fffc #0000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{will-change:transform}@media (hover:none){.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#fffc #0000}}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,#0006,#0000)}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative;text-shadow:none}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{content:none}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}.wp-block-image>a,.wp-block-image>figure>a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media not (prefers-reduced-motion){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull>a,.wp-block-image.alignwide>a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;left:16px;opacity:0;padding:0;position:absolute;text-align:center;top:16px;width:20px;z-index:100}@media not (prefers-reduced-motion){.wp-lightbox-container button{transition:opacity .2s ease}}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;overflow:hidden;position:fixed;right:0;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;left:calc(env(safe-area-inset-left) + 16px);min-height:40px;min-width:40px;padding:0;position:absolute;top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);overflow:hidden;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);transform-origin:top right;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:100% 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{visibility:visible}@media not (prefers-reduced-motion){.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}}ol.wp-block-latest-comments{box-sizing:border-box;margin-right:0}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment)){line-height:1.1}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:1.8}.has-dates :where(.wp-block-latest-comments:not([style*=line-height])),.has-excerpts :where(.wp-block-latest-comments:not([style*=line-height])){line-height:1.5}.wp-block-latest-comments .wp-block-latest-comments{padding-right:0}.wp-block-latest-comments__comment{list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-right:3.25em}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;width:2.5em}.wp-block-latest-comments[class*=-font-size] a,.wp-block-latest-comments[style*=font-size] a{font-size:inherit}.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-right:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt,.wp-block-latest-posts__post-full-content{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}ol,ul{box-sizing:border-box}:root :where(.wp-block-list.has-background){padding:1.25em 2.375em}.wp-block-loginout,.wp-block-media-text{box-sizing:border-box}.wp-block-media-text{direction:ltr;display:grid;grid-template-columns:50% 1fr;grid-template-rows:auto}.wp-block-media-text.has-media-on-the-right{grid-template-columns:1fr 50%}.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__media{align-self:start}.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__media,.wp-block-media-text>.wp-block-media-text__content,.wp-block-media-text>.wp-block-media-text__media{align-self:center}.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__media{align-self:end}.wp-block-media-text>.wp-block-media-text__media{grid-column:1;grid-row:1;margin:0}.wp-block-media-text>.wp-block-media-text__content{direction:rtl;grid-column:2;grid-row:1;padding:0 8%;word-break:break-word}.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__media{grid-column:2;grid-row:1}.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__content{grid-column:1;grid-row:1}.wp-block-media-text__media a{display:block}.wp-block-media-text__media img,.wp-block-media-text__media video{height:auto;max-width:unset;vertical-align:middle;width:100%}.wp-block-media-text.is-image-fill>.wp-block-media-text__media{background-size:cover;height:100%;min-height:250px}.wp-block-media-text.is-image-fill>.wp-block-media-text__media>a{display:block;height:100%}.wp-block-media-text.is-image-fill>.wp-block-media-text__media img{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media{height:100%;min-height:250px}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media>a{display:block;height:100%}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media img{height:100%;object-fit:cover;width:100%}@media (max-width:600px){.wp-block-media-text.is-stacked-on-mobile{grid-template-columns:100%!important}.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__media{grid-column:1;grid-row:1}.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__content{grid-column:1;grid-row:2}}.wp-block-navigation{position:relative}.wp-block-navigation ul{margin-bottom:0;margin-right:0;margin-top:0;padding-right:0}.wp-block-navigation ul,.wp-block-navigation ul li{list-style:none;padding:0}.wp-block-navigation .wp-block-navigation-item{align-items:center;display:flex;position:relative}.wp-block-navigation .wp-block-navigation-item .wp-block-navigation__submenu-container:empty{display:none}.wp-block-navigation .wp-block-navigation-item__content{display:block;z-index:1}.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content{color:inherit}.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:focus{text-decoration:underline}.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus{text-decoration:line-through}.wp-block-navigation :where(a),.wp-block-navigation :where(a:active),.wp-block-navigation :where(a:focus){text-decoration:none}.wp-block-navigation .wp-block-navigation__submenu-icon{align-self:center;background-color:inherit;border:none;color:currentColor;display:inline-block;font-size:inherit;height:.6em;line-height:0;margin-right:.25em;padding:0;width:.6em}.wp-block-navigation .wp-block-navigation__submenu-icon svg{display:inline-block;stroke:currentColor;height:inherit;margin-top:.075em;width:inherit}.wp-block-navigation{--navigation-layout-justification-setting:flex-start;--navigation-layout-direction:row;--navigation-layout-wrap:wrap;--navigation-layout-justify:flex-start;--navigation-layout-align:center}.wp-block-navigation.is-vertical{--navigation-layout-direction:column;--navigation-layout-justify:initial;--navigation-layout-align:flex-start}.wp-block-navigation.no-wrap{--navigation-layout-wrap:nowrap}.wp-block-navigation.items-justified-center{--navigation-layout-justification-setting:center;--navigation-layout-justify:center}.wp-block-navigation.items-justified-center.is-vertical{--navigation-layout-align:center}.wp-block-navigation.items-justified-right{--navigation-layout-justification-setting:flex-end;--navigation-layout-justify:flex-end}.wp-block-navigation.items-justified-right.is-vertical{--navigation-layout-align:flex-end}.wp-block-navigation.items-justified-space-between{--navigation-layout-justification-setting:space-between;--navigation-layout-justify:space-between}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{align-items:normal;background-color:inherit;color:inherit;display:flex;flex-direction:column;opacity:0;position:absolute;z-index:2}@media not (prefers-reduced-motion){.wp-block-navigation .has-child .wp-block-navigation__submenu-container{transition:opacity .1s linear}}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{height:0;overflow:hidden;visibility:hidden;width:0}.wp-block-navigation .has-child .wp-block-navigation__submenu-container>.wp-block-navigation-item>.wp-block-navigation-item__content{display:flex;flex-grow:1;padding:.5em 1em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container>.wp-block-navigation-item>.wp-block-navigation-item__content .wp-block-navigation__submenu-icon{margin-left:0;margin-right:auto}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content{margin:0}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{right:-1px;top:100%}@media (min-width:782px){.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{right:100%;top:-1px}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container:before{background:#0000;content:"";display:block;height:100%;left:100%;position:absolute;width:.5em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon{margin-left:.25em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon svg{transform:rotate(90deg)}}.wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true]~.wp-block-navigation__submenu-container,.wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within>.wp-block-navigation__submenu-container{height:auto;min-width:200px;opacity:1;overflow:visible;visibility:visible;width:auto}.wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container{right:0;top:100%}@media (min-width:782px){.wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{right:100%;top:0}}.wp-block-navigation-submenu{display:flex;position:relative}.wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg{stroke:currentColor}button.wp-block-navigation-item__content{background-color:initial;border:none;color:currentColor;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-align:right;text-transform:inherit}.wp-block-navigation-submenu__toggle{cursor:pointer}.wp-block-navigation-submenu__toggle[aria-expanded=true]+.wp-block-navigation__submenu-icon>svg,.wp-block-navigation-submenu__toggle[aria-expanded=true]>svg{transform:rotate(-180deg)}.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle{padding-left:.85em;padding-right:0}.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle+.wp-block-navigation__submenu-icon{margin-right:-.6em;pointer-events:none}.wp-block-navigation-item.open-on-click button.wp-block-navigation-item__content:not(.wp-block-navigation-submenu__toggle){padding:0}.wp-block-navigation .wp-block-page-list,.wp-block-navigation__container,.wp-block-navigation__responsive-close,.wp-block-navigation__responsive-container,.wp-block-navigation__responsive-container-content,.wp-block-navigation__responsive-dialog{gap:inherit}:where(.wp-block-navigation.has-background .wp-block-navigation-item a:not(.wp-element-button)),:where(.wp-block-navigation.has-background .wp-block-navigation-submenu a:not(.wp-element-button)){padding:.5em 1em}:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item a:not(.wp-element-button)),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu a:not(.wp-element-button)),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu button.wp-block-navigation-item__content),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-pages-list__item button.wp-block-navigation-item__content){padding:.5em 1em}.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container{left:0;right:auto}.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:-1px;right:-1px}@media (min-width:782px){.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:100%;right:auto}}.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container{background-color:#fff;border:1px solid #00000026}.wp-block-navigation.has-background .wp-block-navigation__submenu-container{background-color:inherit}.wp-block-navigation:not(.has-text-color) .wp-block-navigation__submenu-container{color:#000}.wp-block-navigation__container{align-items:var(--navigation-layout-align,initial);display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial);list-style:none;margin:0;padding-right:0}.wp-block-navigation__container .is-responsive{display:none}.wp-block-navigation__container:only-child,.wp-block-page-list:only-child{flex-grow:1}@keyframes overlay-menu__fade-in-animation{0%{opacity:0;transform:translateY(.5em)}to{opacity:1;transform:translateY(0)}}.wp-block-navigation__responsive-container{bottom:0;display:none;left:0;position:fixed;right:0;top:0}.wp-block-navigation__responsive-container :where(.wp-block-navigation-item a){color:inherit}.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content{align-items:var(--navigation-layout-align,initial);display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial)}.wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open){background-color:inherit!important;color:inherit!important}.wp-block-navigation__responsive-container.is-menu-open{background-color:inherit;display:flex;flex-direction:column}@media not (prefers-reduced-motion){.wp-block-navigation__responsive-container.is-menu-open{animation:overlay-menu__fade-in-animation .1s ease-out;animation-fill-mode:forwards}}.wp-block-navigation__responsive-container.is-menu-open{overflow:auto;padding:clamp(1rem,var(--wp--style--root--padding-top),20rem) clamp(1rem,var(--wp--style--root--padding-left),20rem) clamp(1rem,var(--wp--style--root--padding-bottom),20rem) clamp(1rem,var(--wp--style--root--padding-right),20rem);z-index:100000}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{align-items:var(--navigation-layout-justification-setting,inherit);display:flex;flex-direction:column;flex-wrap:nowrap;overflow:visible;padding-top:calc(2rem + 24px)}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list{justify-content:flex-start}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon{display:none}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container{border:none;height:auto;min-width:200px;opacity:1;overflow:initial;padding-left:2rem;padding-right:2rem;position:static;visibility:visible;width:auto}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{gap:inherit}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{padding-top:var(--wp--style--block-gap,2em)}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content{padding:0}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list{align-items:var(--navigation-layout-justification-setting,initial);display:flex;flex-direction:column}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{background:#0000!important;color:inherit!important}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{left:auto;right:auto}@media (min-width:600px){.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){background-color:inherit;display:block;position:relative;width:100%;z-index:auto}.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{display:none}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{right:0}}.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{background-color:#fff}.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open{color:#000}.wp-block-navigation__toggle_button_label{font-size:1rem;font-weight:700}.wp-block-navigation__responsive-container-close,.wp-block-navigation__responsive-container-open{background:#0000;border:none;color:currentColor;cursor:pointer;margin:0;padding:0;text-transform:inherit;vertical-align:middle}.wp-block-navigation__responsive-container-close svg,.wp-block-navigation__responsive-container-open svg{fill:currentColor;display:block;height:24px;pointer-events:none;width:24px}.wp-block-navigation__responsive-container-open{display:flex}.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open{font-family:inherit;font-size:inherit;font-weight:inherit}@media (min-width:600px){.wp-block-navigation__responsive-container-open:not(.always-shown){display:none}}.wp-block-navigation__responsive-container-close{left:0;position:absolute;top:0;z-index:2}.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close{font-family:inherit;font-size:inherit;font-weight:inherit}.wp-block-navigation__responsive-close{width:100%}.has-modal-open .wp-block-navigation__responsive-close{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,100%)}.wp-block-navigation__responsive-close:focus{outline:none}.is-menu-open .wp-block-navigation__responsive-close,.is-menu-open .wp-block-navigation__responsive-container-content,.is-menu-open .wp-block-navigation__responsive-dialog{box-sizing:border-box}.wp-block-navigation__responsive-dialog{position:relative}.has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog{margin-top:46px}@media (min-width:782px){.has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog{margin-top:32px}}html.has-modal-open{overflow:hidden}.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{outline:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-right:8px;text-transform:uppercase}.wp-block-navigation .wp-block-page-list{align-items:var(--navigation-layout-align,initial);background-color:inherit;display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial)}.wp-block-navigation .wp-block-navigation-item{background-color:inherit}.wp-block-page-list{box-sizing:border-box}.is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:right;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em 0 0 .1em;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-right:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg}.wp-block-post-author{box-sizing:border-box;display:flex;flex-wrap:wrap}.wp-block-post-author__byline{font-size:.5em;margin-bottom:0;margin-top:0;width:100%}.wp-block-post-author__avatar{margin-left:1em}.wp-block-post-author__bio{font-size:.7em;margin-bottom:.7em}.wp-block-post-author__content{flex-basis:0;flex-grow:1}.wp-block-post-author__name{margin:0}.wp-block-post-author-biography{box-sizing:border-box}:where(.wp-block-post-comments-form input:not([type=submit])),:where(.wp-block-post-comments-form textarea){border:1px solid #949494;font-family:inherit;font-size:1em}:where(.wp-block-post-comments-form input:where(:not([type=submit]):not([type=checkbox]))),:where(.wp-block-post-comments-form textarea){padding:calc(.667em + 2px)}.wp-block-post-comments-form{box-sizing:border-box}.wp-block-post-comments-form[style*=font-weight] :where(.comment-reply-title){font-weight:inherit}.wp-block-post-comments-form[style*=font-family] :where(.comment-reply-title){font-family:inherit}.wp-block-post-comments-form[class*=-font-size] :where(.comment-reply-title),.wp-block-post-comments-form[style*=font-size] :where(.comment-reply-title){font-size:inherit}.wp-block-post-comments-form[style*=line-height] :where(.comment-reply-title){line-height:inherit}.wp-block-post-comments-form[style*=font-style] :where(.comment-reply-title){font-style:inherit}.wp-block-post-comments-form[style*=letter-spacing] :where(.comment-reply-title){letter-spacing:inherit}.wp-block-post-comments-form :where(input[type=submit]){box-shadow:none;cursor:pointer;display:inline-block;overflow-wrap:break-word;text-align:center}.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]):not([type=hidden]),.wp-block-post-comments-form .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments-form .comment-form-author label,.wp-block-post-comments-form .comment-form-email label,.wp-block-post-comments-form .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments-form .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments-form .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments-form .comment-reply-title{margin-bottom:0}.wp-block-post-comments-form .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments-count{box-sizing:border-box}.wp-block-post-content{display:flow-root}.wp-block-post-comments-link,.wp-block-post-date{box-sizing:border-box}:where(.wp-block-post-excerpt){box-sizing:border-box;margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-post-excerpt__excerpt{margin-bottom:0;margin-top:0}.wp-block-post-excerpt__more-text{margin-bottom:0;margin-top:var(--wp--style--block-gap)}.wp-block-post-excerpt__more-link{display:inline-block}.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{display:inline-block;margin-left:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{display:inline-block;margin-right:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.wp-block-post-terms{box-sizing:border-box}.wp-block-post-terms .wp-block-post-terms__separator{white-space:pre-wrap}.wp-block-post-time-to-read,.wp-block-post-title{box-sizing:border-box}.wp-block-post-title{word-break:break-word}.wp-block-post-title :where(a){display:inline-block;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit}.wp-block-post-author-name{box-sizing:border-box}.wp-block-preformatted{box-sizing:border-box;white-space:pre-wrap}:where(.wp-block-preformatted.has-background){padding:1.25em 2.375em}.wp-block-pullquote{box-sizing:border-box;margin:0 0 1em;overflow-wrap:break-word;padding:4em 0;text-align:center}.wp-block-pullquote blockquote,.wp-block-pullquote p{color:inherit}.wp-block-pullquote blockquote{margin:0}.wp-block-pullquote p{margin-top:0}.wp-block-pullquote p:last-child{margin-bottom:0}.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{max-width:420px}.wp-block-pullquote cite,.wp-block-pullquote footer{position:relative}.wp-block-pullquote .has-text-color a{color:inherit}.wp-block-pullquote.has-text-align-left blockquote{text-align:right}.wp-block-pullquote.has-text-align-right blockquote{text-align:left}.wp-block-pullquote.has-text-align-center blockquote{text-align:center}.wp-block-pullquote.is-style-solid-color{border:none}.wp-block-pullquote.is-style-solid-color blockquote{margin-left:auto;margin-right:auto;max-width:60%}.wp-block-pullquote.is-style-solid-color blockquote p{font-size:2em;margin-bottom:0;margin-top:0}.wp-block-pullquote.is-style-solid-color blockquote cite{font-style:normal;text-transform:none}.wp-block-pullquote :where(cite){color:inherit;display:block}.wp-block-post-template{box-sizing:border-box;list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-post-template.is-flex-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1.25em}.wp-block-post-template.is-flex-container>li{margin:0;width:100%}@media (min-width:600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - .625em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{width:calc(33.33333% - .83333em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{width:calc(25% - .9375em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{width:calc(20% - 1em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{width:calc(16.66667% - 1.04167em)}}@media (max-width:600px){.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{grid-template-columns:1fr}}.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{float:left;margin-inline-end:0;margin-inline-start:2em}.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{float:right;margin-inline-end:2em;margin-inline-start:0}.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{margin-inline-end:auto;margin-inline-start:auto}.wp-block-query-pagination.is-content-justification-space-between>.wp-block-query-pagination-next:last-of-type{margin-inline-start:auto}.wp-block-query-pagination.is-content-justification-space-between>.wp-block-query-pagination-previous:first-child{margin-inline-end:auto}.wp-block-query-pagination .wp-block-query-pagination-previous-arrow{display:inline-block;margin-left:1ch}.wp-block-query-pagination .wp-block-query-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-query-pagination .wp-block-query-pagination-next-arrow{display:inline-block;margin-right:1ch}.wp-block-query-pagination .wp-block-query-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-query-pagination.aligncenter{justify-content:center}.wp-block-query-title,.wp-block-query-total,.wp-block-quote{box-sizing:border-box}.wp-block-quote{overflow-wrap:break-word}.wp-block-quote.is-large:where(:not(.is-style-plain)),.wp-block-quote.is-style-large:where(:not(.is-style-plain)){margin-bottom:1em;padding:0 1em}.wp-block-quote.is-large:where(:not(.is-style-plain)) p,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) p{font-size:1.5em;font-style:italic;line-height:1.6}.wp-block-quote.is-large:where(:not(.is-style-plain)) cite,.wp-block-quote.is-large:where(:not(.is-style-plain)) footer,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) cite,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) footer{font-size:1.125em;text-align:left}.wp-block-quote>cite{display:block}.wp-block-read-more{display:block;width:fit-content}.wp-block-read-more:where(:not([style*=text-decoration])){text-decoration:none}.wp-block-read-more:where(:not([style*=text-decoration])):active,.wp-block-read-more:where(:not([style*=text-decoration])):focus{text-decoration:none}ul.wp-block-rss.alignleft{margin-right:2em}ul.wp-block-rss.alignright{margin-left:2em}ul.wp-block-rss.is-grid{display:flex;flex-wrap:wrap;padding:0}ul.wp-block-rss.is-grid li{margin:0 0 1em 1em;width:100%}@media (min-width:600px){ul.wp-block-rss.columns-2 li{width:calc(50% - 1em)}ul.wp-block-rss.columns-3 li{width:calc(33.33333% - 1em)}ul.wp-block-rss.columns-4 li{width:calc(25% - 1em)}ul.wp-block-rss.columns-5 li{width:calc(20% - 1em)}ul.wp-block-rss.columns-6 li{width:calc(16.66667% - 1em)}}.wp-block-rss__item-author,.wp-block-rss__item-publish-date{display:block;font-size:.8125em}.wp-block-rss{box-sizing:border-box;list-style:none;padding:0}.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button{box-sizing:border-box;display:flex;flex-shrink:0;justify-content:center;margin-right:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__input){appearance:none;border:1px solid #949494;flex-grow:1;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important;text-transform:inherit}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){background-color:#fff;border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:left}.wp-block-separator{border:none;border-top:2px solid}:root :where(.wp-block-separator.is-style-dots){height:auto;line-height:1;text-align:center}:root :where(.wp-block-separator.is-style-dots):before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em}.wp-block-separator.is-style-dots{background:none!important;border:none!important}.wp-block-site-logo{box-sizing:border-box;line-height:0}.wp-block-site-logo a{display:inline-block;line-height:0}.wp-block-site-logo.is-default-size img{height:auto;width:120px}.wp-block-site-logo img{height:auto;max-width:100%}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{margin-left:auto;margin-right:auto;text-align:center}:root :where(.wp-block-site-logo.is-style-rounded){border-radius:9999px}.wp-block-site-tagline,.wp-block-site-title{box-sizing:border-box}.wp-block-site-title :where(a){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit}.wp-block-social-links{background:none;box-sizing:border-box;margin-right:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block}@media not (prefers-reduced-motion){.wp-block-social-link{transition:transform .1s ease}}.wp-block-social-link{height:auto}.wp-block-social-link a{align-items:center;display:flex;line-height:0}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link.wp-social-link{display:inline-block;margin:0;padding:0}.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{color:currentColor;fill:currentColor}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link{background-color:#f0f0f0;color:#444}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-amazon{background-color:#f90;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-behance{background-color:#0757fe;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bluesky{background-color:#0a7aff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-discord{background-color:#5865f2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-etsy{background-color:#f45800;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-facebook{background-color:#0866ff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-flickr{background-color:#0461dd;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-foursquare{background-color:#e65678;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-github{background-color:#24292d;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-google{background-color:#ea4434;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-gravatar{background-color:#1d4fc4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-instagram{background-color:#f00075;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-medium{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-meetup{background-color:#f6405f;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-patreon{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pinterest{background-color:#e60122;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pocket{background-color:#ef4155;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-reddit{background-color:#ff4500;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-skype{background-color:#0478d7;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-snapchat{background-color:#fefc00;color:#fff;stroke:#000}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-spotify{background-color:#1bd760;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-telegram{background-color:#2aabee;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-threads{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tiktok{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tumblr{background-color:#011835;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitch{background-color:#6440a4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vk{background-color:#4680c2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-x{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-yelp{background-color:#d32422;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-youtube{background-color:red;color:#fff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link{background:none}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link svg{height:1.25em;width:1.25em}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-amazon{color:#f90}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bandcamp{color:#1ea0c3}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-behance{color:#0757fe}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bluesky{color:#0a7aff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-codepen{color:#1e1f26}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-deviantart{color:#02e49b}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-discord{color:#5865f2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dribbble{color:#e94c89}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dropbox{color:#4280ff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-etsy{color:#f45800}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-facebook{color:#0866ff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-fivehundredpx{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-flickr{color:#0461dd}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-foursquare{color:#e65678}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-github{color:#24292d}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-goodreads{color:#382110}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-google{color:#ea4434}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-gravatar{color:#1d4fc4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-instagram{color:#f00075}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-lastfm{color:#e21b24}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-linkedin{color:#0d66c2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-mastodon{color:#3288d4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-medium{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-meetup{color:#f6405f}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-patreon{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pinterest{color:#e60122}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pocket{color:#ef4155}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-reddit{color:#ff4500}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-skype{color:#0478d7}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-snapchat{color:#fff;stroke:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-soundcloud{color:#ff5600}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-spotify{color:#1bd760}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-telegram{color:#2aabee}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-threads{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tiktok{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tumblr{color:#011835}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitch{color:#6440a4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitter{color:#1da1f2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vimeo{color:#1eb7ea}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vk{color:#4680c2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-whatsapp{color:#25d366}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-wordpress{color:#3499cd}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-x{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-yelp{color:#d32422}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}:root :where(.wp-block-social-links .wp-social-link a){padding:.25em}:root :where(.wp-block-social-links.is-style-logos-only .wp-social-link a){padding:0}:root :where(.wp-block-social-links.is-style-pill-shape .wp-social-link a){padding-left:.6666666667em;padding-right:.6666666667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000}.wp-block-spacer{clear:both}.wp-block-tag-cloud{box-sizing:border-box}.wp-block-tag-cloud.aligncenter{justify-content:center;text-align:center}.wp-block-tag-cloud a{display:inline-block;margin-left:5px}.wp-block-tag-cloud span{display:inline-block;margin-right:5px;text-decoration:none}:root :where(.wp-block-tag-cloud.is-style-outline){display:flex;flex-wrap:wrap;gap:1ch}:root :where(.wp-block-tag-cloud.is-style-outline a){border:1px solid;font-size:unset!important;margin-left:0;padding:1ch 2ch;text-decoration:none!important}.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table.is-style-stripes{border-bottom:1px solid #f0f0f0}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit}:root :where(.wp-block-table-of-contents){box-sizing:border-box}.wp-block-term-count{box-sizing:border-box}:where(.wp-block-term-description){box-sizing:border-box;margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-term-description p{margin-bottom:0;margin-top:0}.wp-block-term-name{box-sizing:border-box}.wp-block-term-template{box-sizing:border-box;list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-text-columns,.wp-block-text-columns.aligncenter{display:flex}.wp-block-text-columns .wp-block-column{margin:0 1em;padding:0}.wp-block-text-columns .wp-block-column:first-child{margin-right:0}.wp-block-text-columns .wp-block-column:last-child{margin-left:0}.wp-block-text-columns.columns-2 .wp-block-column{width:50%}.wp-block-text-columns.columns-3 .wp-block-column{width:33.3333333333%}.wp-block-text-columns.columns-4 .wp-block-column{width:25%}pre.wp-block-verse{overflow:auto;white-space:pre-wrap}:where(pre.wp-block-verse){font-family:inherit}.wp-block-video{box-sizing:border-box}.wp-block-video video{height:auto;vertical-align:middle;width:100%}@supports (position:sticky){.wp-block-video [poster]{object-fit:cover}}.wp-block-video.aligncenter{text-align:center}.wp-block-video :where(figcaption){margin-bottom:1em;margin-top:.5em}.editor-styles-wrapper,.entry-content{counter-reset:footnotes}a[data-fn].fn{counter-increment:footnotes;display:inline-flex;font-size:smaller;text-decoration:none;text-indent:-9999999px;vertical-align:super}a[data-fn].fn:after{content:"[" counter(footnotes) "]";float:right;text-indent:0}:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(-135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(-135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(-135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(-135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(-135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(-135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(-135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;line-height:normal;padding:15px 23px 14px;right:5px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-left-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-right-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-left-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-right-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
\ No newline at end of file
+@charset "UTF-8";.wp-block-accordion-item{display:grid;grid-template-rows:max-content 0fr}.wp-block-accordion-item.is-open{grid-template-rows:max-content 1fr}.wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transform:rotate(-45deg)}@media (prefers-reduced-motion:no-preference){.wp-block-accordion-item{transition:grid-template-rows .3s ease-out}.wp-block-accordion-item>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transition:transform .2s ease-in-out}}.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}.wp-block-accordion-panel[aria-hidden=true],.wp-block-accordion-panel[inert]{display:none;margin-block-start:0}.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}.wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}.wp-block-breadcrumbs{box-sizing:border-box}.wp-block-breadcrumbs ol{flex-wrap:wrap;list-style:none}.wp-block-breadcrumbs li,.wp-block-breadcrumbs ol{align-items:center;display:flex;margin:0;padding:0}.wp-block-breadcrumbs li:not(:last-child):after{content:var(--separator,"/");margin:0 .5em;opacity:.7}.wp-block-breadcrumbs span{color:inherit}.wp-block-button__link{align-content:center;box-sizing:border-box;cursor:pointer;display:inline-block;height:100%;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}.wp-block-buttons{box-sizing:border-box}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons .wp-block-button__link{width:100%}.wp-block-button.aligncenter,.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}.wp-block-calendar :where(table:not(.has-text-color)){color:#40464d}.wp-block-calendar :where(table:not(.has-text-color)) td,.wp-block-calendar :where(table:not(.has-text-color)) th{border-color:#ddd}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}.wp-block-code{box-sizing:border-box}.wp-block-code code{direction:ltr;display:block;font-family:inherit;overflow-wrap:break-word;text-align:initial;white-space:pre-wrap}.wp-block-columns{box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns{align-items:normal!important}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:right}.wp-block-post-comments .alignright{float:left}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-right:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.wp-block-comments{box-sizing:border-box}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{font-size:inherit}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{display:inline-block;margin-left:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{display:inline-block;margin-right:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-comments-pagination.aligncenter{justify-content:center}.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-right:2rem}.wp-block-comment-template.alignleft{float:right}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:fit-content}.wp-block-comment-template.alignright{float:left}.wp-block-comment-date{box-sizing:border-box}.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-author-name,.wp-block-comment-content,.wp-block-comment-edit-link,.wp-block-comment-reply-link{box-sizing:border-box}.wp-block-cover,.wp-block-cover-image{align-items:center;background-position:50%;box-sizing:border-box;direction:ltr;display:flex;justify-content:center;min-height:430px;overflow:hidden;overflow:clip;padding:1em;position:relative}.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){background-color:#000}.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{background-color:initial}.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{background-color:inherit;content:""}.wp-block-cover .wp-block-cover__background,.wp-block-cover .wp-block-cover__gradient-background,.wp-block-cover-image .wp-block-cover__background,.wp-block-cover-image .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim:not(.has-background-gradient):before,.wp-block-cover.has-background-dim:not(.has-background-gradient):before{bottom:0;left:0;opacity:.5;position:absolute;right:0;top:0}.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient):before{opacity:.1}.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient):before{opacity:.2}.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient):before{opacity:.3}.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient):before{opacity:.4}.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient):before{opacity:.5}.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient):before{opacity:.6}.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient):before{opacity:.7}.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient):before{opacity:.8}.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient):before{opacity:.9}.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient):before{opacity:1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0{opacity:0}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10{opacity:.1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20{opacity:.2}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30{opacity:.3}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40{opacity:.4}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50{opacity:.5}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60{opacity:.6}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70{opacity:.7}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80{opacity:.8}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90{opacity:.9}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100{opacity:1}.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.alignleft,.wp-block-cover.alignright{max-width:420px;width:100%}.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{display:flex}.wp-block-cover .wp-block-cover__inner-container,.wp-block-cover-image .wp-block-cover__inner-container{color:inherit;direction:rtl;position:relative;width:100%}.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{align-items:flex-start;justify-content:flex-start}.wp-block-cover-image.is-position-top-center,.wp-block-cover.is-position-top-center{align-items:flex-start;justify-content:center}.wp-block-cover-image.is-position-top-right,.wp-block-cover.is-position-top-right{align-items:flex-start;justify-content:flex-end}.wp-block-cover-image.is-position-center-left,.wp-block-cover.is-position-center-left{align-items:center;justify-content:flex-start}.wp-block-cover-image.is-position-center-center,.wp-block-cover.is-position-center-center{align-items:center;justify-content:center}.wp-block-cover-image.is-position-center-right,.wp-block-cover.is-position-center-right{align-items:center;justify-content:flex-end}.wp-block-cover-image.is-position-bottom-left,.wp-block-cover.is-position-bottom-left{align-items:flex-end;justify-content:flex-start}.wp-block-cover-image.is-position-bottom-center,.wp-block-cover.is-position-bottom-center{align-items:flex-end;justify-content:center}.wp-block-cover-image.is-position-bottom-right,.wp-block-cover.is-position-bottom-right{align-items:flex-end;justify-content:flex-end}.wp-block-cover-image.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container{margin:0}.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container{margin:0;width:auto}.wp-block-cover .wp-block-cover__image-background,.wp-block-cover video.wp-block-cover__video-background,.wp-block-cover-image .wp-block-cover__image-background,.wp-block-cover-image video.wp-block-cover__video-background{border:none;bottom:0;box-shadow:none;height:100%;left:0;margin:0;max-height:none;max-width:none;object-fit:cover;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:fixed;background-repeat:no-repeat;background-size:cover}@supports (-webkit-touch-callout:inherit){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}@media (prefers-reduced-motion:reduce){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}.wp-block-cover-image.is-repeated,.wp-block-cover.is-repeated,.wp-block-cover__image-background.is-repeated,video.wp-block-cover__video-background.is-repeated{background-repeat:repeat;background-size:auto}.wp-block-cover-image-text,.wp-block-cover-image-text a,.wp-block-cover-image-text a:active,.wp-block-cover-image-text a:focus,.wp-block-cover-image-text a:hover,.wp-block-cover-text,.wp-block-cover-text a,.wp-block-cover-text a:active,.wp-block-cover-text a:focus,.wp-block-cover-text a:hover,section.wp-block-cover-image h2,section.wp-block-cover-image h2 a,section.wp-block-cover-image h2 a:active,section.wp-block-cover-image h2 a:focus,section.wp-block-cover-image h2 a:hover{color:#fff}.wp-block-cover-image .wp-block-cover.has-left-content{justify-content:flex-start}.wp-block-cover-image .wp-block-cover.has-right-content{justify-content:flex-end}.wp-block-cover-image.has-left-content .wp-block-cover-image-text,.wp-block-cover.has-left-content .wp-block-cover-text,section.wp-block-cover-image.has-left-content>h2{margin-right:0;text-align:right}.wp-block-cover-image.has-right-content .wp-block-cover-image-text,.wp-block-cover.has-right-content .wp-block-cover-text,section.wp-block-cover-image.has-right-content>h2{margin-left:0;text-align:left}.wp-block-cover .wp-block-cover-text,.wp-block-cover-image .wp-block-cover-image-text,section.wp-block-cover-image>h2{font-size:2em;line-height:1.25;margin-bottom:0;max-width:840px;padding:.44em;text-align:center;z-index:1}:where(.wp-block-cover-image:not(.has-text-color)),:where(.wp-block-cover:not(.has-text-color)){color:#fff}:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){color:#000}:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){color:inherit}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__image-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__video-background{z-index:0}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__gradient-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient):before{z-index:1}.has-modal-open body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container{z-index:auto}.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-right:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):where(a):active,:where(.wp-block-file__button):where(a):focus,:where(.wp-block-file__button):where(a):hover,:where(.wp-block-file__button):where(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}.wp-block-form-input__label{display:flex;flex-direction:column;gap:.25em;margin-bottom:.5em;width:100%}.wp-block-form-input__label.is-label-inline{align-items:center;flex-direction:row;gap:.5em}.wp-block-form-input__label.is-label-inline .wp-block-form-input__label-content{margin-bottom:.5em}.wp-block-form-input__label:has(input[type=checkbox]){flex-direction:row;width:fit-content}.wp-block-form-input__label:has(input[type=checkbox]) .wp-block-form-input__label-content{margin:0}.wp-block-form-input__label:has(.wp-block-form-input__label-content+input[type=checkbox]){flex-direction:row-reverse}.wp-block-form-input__label-content{width:fit-content}:where(.wp-block-form-input__input){font-size:1em;margin-bottom:.5em;padding:0 .5em}:where(.wp-block-form-input__input)[type=date],:where(.wp-block-form-input__input)[type=datetime-local],:where(.wp-block-form-input__input)[type=datetime],:where(.wp-block-form-input__input)[type=email],:where(.wp-block-form-input__input)[type=month],:where(.wp-block-form-input__input)[type=number],:where(.wp-block-form-input__input)[type=password],:where(.wp-block-form-input__input)[type=search],:where(.wp-block-form-input__input)[type=tel],:where(.wp-block-form-input__input)[type=text],:where(.wp-block-form-input__input)[type=time],:where(.wp-block-form-input__input)[type=url],:where(.wp-block-form-input__input)[type=week]{border-style:solid;border-width:1px;line-height:2;min-height:2em}textarea.wp-block-form-input__input{min-height:10em}.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 0 1em 1em;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-left:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,#000000b3,#0000004d 70%,#0000);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-left:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-left:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-left:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-left:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-left:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-left:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-left:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-left:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-left:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{bottom:0;left:0;max-height:100%;position:absolute;right:0}.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{backdrop-filter:blur(3px);content:"";height:100%;-webkit-mask-image:linear-gradient(0deg,#000 20%,#0000);mask-image:linear-gradient(0deg,#000 20%,#0000);max-height:40%;pointer-events:none}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{box-sizing:border-box;color:#fff;font-size:13px;margin:0;overflow:auto;padding:1em;text-align:center;text-shadow:0 0 1.5px #000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{height:12px;width:12px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{background-color:initial}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{background-color:#fffc}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{scrollbar-color:#fffc #0000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{will-change:transform}@media (hover:none){.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#fffc #0000}}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,#0006,#0000)}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative;text-shadow:none}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{content:none}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}.wp-block-image>a,.wp-block-image>figure>a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media not (prefers-reduced-motion){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull>a,.wp-block-image.alignwide>a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;left:16px;opacity:0;padding:0;position:absolute;text-align:center;top:16px;width:20px;z-index:100}@media not (prefers-reduced-motion){.wp-lightbox-container button{transition:opacity .2s ease}}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;overflow:hidden;position:fixed;right:0;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;left:calc(env(safe-area-inset-left) + 16px);min-height:40px;min-width:40px;padding:0;position:absolute;top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);overflow:hidden;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);transform-origin:top right;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:100% 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{visibility:visible}@media not (prefers-reduced-motion){.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}}ol.wp-block-latest-comments{box-sizing:border-box;margin-right:0}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment)){line-height:1.1}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:1.8}.has-dates :where(.wp-block-latest-comments:not([style*=line-height])),.has-excerpts :where(.wp-block-latest-comments:not([style*=line-height])){line-height:1.5}.wp-block-latest-comments .wp-block-latest-comments{padding-right:0}.wp-block-latest-comments__comment{list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-right:3.25em}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:right;height:2.5em;margin-left:.75em;width:2.5em}.wp-block-latest-comments[class*=-font-size] a,.wp-block-latest-comments[style*=font-size] a{font-size:inherit}.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-right:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt,.wp-block-latest-posts__post-full-content{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}ol,ul{box-sizing:border-box}:root :where(.wp-block-list.has-background){padding:1.25em 2.375em}.wp-block-loginout{box-sizing:border-box}.wp-block-math{overflow-x:auto;overflow-y:hidden}.wp-block-media-text{box-sizing:border-box;direction:ltr;display:grid;grid-template-columns:50% 1fr;grid-template-rows:auto}.wp-block-media-text.has-media-on-the-right{grid-template-columns:1fr 50%}.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__media{align-self:start}.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__media,.wp-block-media-text>.wp-block-media-text__content,.wp-block-media-text>.wp-block-media-text__media{align-self:center}.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__media{align-self:end}.wp-block-media-text>.wp-block-media-text__media{grid-column:1;grid-row:1;margin:0}.wp-block-media-text>.wp-block-media-text__content{direction:rtl;grid-column:2;grid-row:1;padding:0 8%;word-break:break-word}.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__media{grid-column:2;grid-row:1}.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__content{grid-column:1;grid-row:1}.wp-block-media-text__media a{display:block}.wp-block-media-text__media img,.wp-block-media-text__media video{height:auto;max-width:unset;vertical-align:middle;width:100%}.wp-block-media-text.is-image-fill>.wp-block-media-text__media{background-size:cover;height:100%;min-height:250px}.wp-block-media-text.is-image-fill>.wp-block-media-text__media>a{display:block;height:100%}.wp-block-media-text.is-image-fill>.wp-block-media-text__media img{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media{height:100%;min-height:250px}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media>a{display:block;height:100%}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media img{height:100%;object-fit:cover;width:100%}@media (max-width:600px){.wp-block-media-text.is-stacked-on-mobile{grid-template-columns:100%!important}.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__media{grid-column:1;grid-row:1}.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__content{grid-column:1;grid-row:2}}.wp-block-navigation{position:relative}.wp-block-navigation ul{margin-bottom:0;margin-right:0;margin-top:0;padding-right:0}.wp-block-navigation ul,.wp-block-navigation ul li{list-style:none;padding:0}.wp-block-navigation .wp-block-navigation-item{align-items:center;display:flex;position:relative}.wp-block-navigation .wp-block-navigation-item .wp-block-navigation__submenu-container:empty{display:none}.wp-block-navigation .wp-block-navigation-item__content{display:block;z-index:1}.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content{color:inherit}.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:focus{text-decoration:underline}.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus{text-decoration:line-through}.wp-block-navigation :where(a),.wp-block-navigation :where(a:active),.wp-block-navigation :where(a:focus){text-decoration:none}.wp-block-navigation .wp-block-navigation__submenu-icon{align-self:center;background-color:inherit;border:none;color:currentColor;display:inline-block;font-size:inherit;height:.6em;line-height:0;margin-right:.25em;padding:0;width:.6em}.wp-block-navigation .wp-block-navigation__submenu-icon svg{display:inline-block;stroke:currentColor;height:inherit;margin-top:.075em;width:inherit}.wp-block-navigation{--navigation-layout-justification-setting:flex-start;--navigation-layout-direction:row;--navigation-layout-wrap:wrap;--navigation-layout-justify:flex-start;--navigation-layout-align:center}.wp-block-navigation.is-vertical{--navigation-layout-direction:column;--navigation-layout-justify:initial;--navigation-layout-align:flex-start}.wp-block-navigation.no-wrap{--navigation-layout-wrap:nowrap}.wp-block-navigation.items-justified-center{--navigation-layout-justification-setting:center;--navigation-layout-justify:center}.wp-block-navigation.items-justified-center.is-vertical{--navigation-layout-align:center}.wp-block-navigation.items-justified-right{--navigation-layout-justification-setting:flex-end;--navigation-layout-justify:flex-end}.wp-block-navigation.items-justified-right.is-vertical{--navigation-layout-align:flex-end}.wp-block-navigation.items-justified-space-between{--navigation-layout-justification-setting:space-between;--navigation-layout-justify:space-between}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{align-items:normal;background-color:inherit;color:inherit;display:flex;flex-direction:column;opacity:0;position:absolute;z-index:2}@media not (prefers-reduced-motion){.wp-block-navigation .has-child .wp-block-navigation__submenu-container{transition:opacity .1s linear}}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{height:0;overflow:hidden;visibility:hidden;width:0}.wp-block-navigation .has-child .wp-block-navigation__submenu-container>.wp-block-navigation-item>.wp-block-navigation-item__content{display:flex;flex-grow:1;padding:.5em 1em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container>.wp-block-navigation-item>.wp-block-navigation-item__content .wp-block-navigation__submenu-icon{margin-left:0;margin-right:auto}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content{margin:0}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{right:-1px;top:100%}@media (min-width:782px){.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{right:100%;top:-1px}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container:before{background:#0000;content:"";display:block;height:100%;left:100%;position:absolute;width:.5em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon{margin-left:.25em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon svg{transform:rotate(90deg)}}.wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true]~.wp-block-navigation__submenu-container,.wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within>.wp-block-navigation__submenu-container{height:auto;min-width:200px;opacity:1;overflow:visible;visibility:visible;width:auto}.wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container{right:0;top:100%}@media (min-width:782px){.wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{right:100%;top:0}}.wp-block-navigation-submenu{display:flex;position:relative}.wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg{stroke:currentColor}button.wp-block-navigation-item__content{background-color:initial;border:none;color:currentColor;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-align:right;text-transform:inherit}.wp-block-navigation-submenu__toggle{cursor:pointer}.wp-block-navigation-submenu__toggle[aria-expanded=true]+.wp-block-navigation__submenu-icon>svg,.wp-block-navigation-submenu__toggle[aria-expanded=true]>svg{transform:rotate(-180deg)}.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle{padding-left:.85em;padding-right:0}.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle+.wp-block-navigation__submenu-icon{margin-right:-.6em;pointer-events:none}.wp-block-navigation-item.open-on-click button.wp-block-navigation-item__content:not(.wp-block-navigation-submenu__toggle){padding:0}.wp-block-navigation .wp-block-page-list,.wp-block-navigation__container,.wp-block-navigation__responsive-close,.wp-block-navigation__responsive-container,.wp-block-navigation__responsive-container-content,.wp-block-navigation__responsive-dialog{gap:inherit}:where(.wp-block-navigation.has-background .wp-block-navigation-item a:not(.wp-element-button)),:where(.wp-block-navigation.has-background .wp-block-navigation-submenu a:not(.wp-element-button)){padding:.5em 1em}:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item a:not(.wp-element-button)),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu a:not(.wp-element-button)),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu button.wp-block-navigation-item__content),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-pages-list__item button.wp-block-navigation-item__content){padding:.5em 1em}.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container{left:0;right:auto}.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:-1px;right:-1px}@media (min-width:782px){.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:100%;right:auto}}.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container{background-color:#fff;border:1px solid #00000026}.wp-block-navigation.has-background .wp-block-navigation__submenu-container{background-color:inherit}.wp-block-navigation:not(.has-text-color) .wp-block-navigation__submenu-container{color:#000}.wp-block-navigation__container{align-items:var(--navigation-layout-align,initial);display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial);list-style:none;margin:0;padding-right:0}.wp-block-navigation__container .is-responsive{display:none}.wp-block-navigation__container:only-child,.wp-block-page-list:only-child{flex-grow:1}@keyframes overlay-menu__fade-in-animation{0%{opacity:0;transform:translateY(.5em)}to{opacity:1;transform:translateY(0)}}.wp-block-navigation__responsive-container{bottom:0;display:none;left:0;position:fixed;right:0;top:0}.wp-block-navigation__responsive-container :where(.wp-block-navigation-item a){color:inherit}.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content{align-items:var(--navigation-layout-align,initial);display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial)}.wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open){background-color:inherit!important;color:inherit!important}.wp-block-navigation__responsive-container.is-menu-open{background-color:inherit;display:flex;flex-direction:column}@media not (prefers-reduced-motion){.wp-block-navigation__responsive-container.is-menu-open{animation:overlay-menu__fade-in-animation .1s ease-out;animation-fill-mode:forwards}}.wp-block-navigation__responsive-container.is-menu-open{overflow:auto;padding:clamp(1rem,var(--wp--style--root--padding-top),20rem) clamp(1rem,var(--wp--style--root--padding-left),20rem) clamp(1rem,var(--wp--style--root--padding-bottom),20rem) clamp(1rem,var(--wp--style--root--padding-right),20rem);z-index:100000}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{align-items:var(--navigation-layout-justification-setting,inherit);display:flex;flex-direction:column;flex-wrap:nowrap;overflow:visible;padding-top:calc(2rem + 24px)}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list{justify-content:flex-start}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon{display:none}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container{border:none;height:auto;min-width:200px;opacity:1;overflow:initial;padding-left:2rem;padding-right:2rem;position:static;visibility:visible;width:auto}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{gap:inherit}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{padding-top:var(--wp--style--block-gap,2em)}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content{padding:0}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list{align-items:var(--navigation-layout-justification-setting,initial);display:flex;flex-direction:column}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{background:#0000!important;color:inherit!important}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{left:auto;right:auto}@media (min-width:600px){.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){background-color:inherit;display:block;position:relative;width:100%;z-index:auto}.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{display:none}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{right:0}}.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{background-color:#fff}.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open{color:#000}.wp-block-navigation__toggle_button_label{font-size:1rem;font-weight:700}.wp-block-navigation__responsive-container-close,.wp-block-navigation__responsive-container-open{background:#0000;border:none;color:currentColor;cursor:pointer;margin:0;padding:0;text-transform:inherit;vertical-align:middle}.wp-block-navigation__responsive-container-close svg,.wp-block-navigation__responsive-container-open svg{fill:currentColor;display:block;height:24px;pointer-events:none;width:24px}.wp-block-navigation__responsive-container-open{display:flex}.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open{font-family:inherit;font-size:inherit;font-weight:inherit}@media (min-width:600px){.wp-block-navigation__responsive-container-open:not(.always-shown){display:none}}.wp-block-navigation__responsive-container-close{left:0;position:absolute;top:0;z-index:2}.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close{font-family:inherit;font-size:inherit;font-weight:inherit}.wp-block-navigation__responsive-close{width:100%}.has-modal-open .wp-block-navigation__responsive-close{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,100%)}.wp-block-navigation__responsive-close:focus{outline:none}.is-menu-open .wp-block-navigation__responsive-close,.is-menu-open .wp-block-navigation__responsive-container-content,.is-menu-open .wp-block-navigation__responsive-dialog{box-sizing:border-box}.wp-block-navigation__responsive-dialog{position:relative}.has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog{margin-top:46px}@media (min-width:782px){.has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog{margin-top:32px}}html.has-modal-open{overflow:hidden}.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{outline:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-right:8px;text-transform:uppercase}.wp-block-navigation .wp-block-page-list{align-items:var(--navigation-layout-align,initial);background-color:inherit;display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial)}.wp-block-navigation .wp-block-navigation-item{background-color:inherit}.wp-block-page-list{box-sizing:border-box}.is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:right;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em 0 0 .1em;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-right:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg}.wp-block-post-author{box-sizing:border-box;display:flex;flex-wrap:wrap}.wp-block-post-author__byline{font-size:.5em;margin-bottom:0;margin-top:0;width:100%}.wp-block-post-author__avatar{margin-left:1em}.wp-block-post-author__bio{font-size:.7em;margin-bottom:.7em}.wp-block-post-author__content{flex-basis:0;flex-grow:1}.wp-block-post-author__name{margin:0}.wp-block-post-author-biography{box-sizing:border-box}:where(.wp-block-post-comments-form input:not([type=submit])),:where(.wp-block-post-comments-form textarea){border:1px solid #949494;font-family:inherit;font-size:1em}:where(.wp-block-post-comments-form input:where(:not([type=submit]):not([type=checkbox]))),:where(.wp-block-post-comments-form textarea){padding:calc(.667em + 2px)}.wp-block-post-comments-form{box-sizing:border-box}.wp-block-post-comments-form[style*=font-weight] :where(.comment-reply-title){font-weight:inherit}.wp-block-post-comments-form[style*=font-family] :where(.comment-reply-title){font-family:inherit}.wp-block-post-comments-form[class*=-font-size] :where(.comment-reply-title),.wp-block-post-comments-form[style*=font-size] :where(.comment-reply-title){font-size:inherit}.wp-block-post-comments-form[style*=line-height] :where(.comment-reply-title){line-height:inherit}.wp-block-post-comments-form[style*=font-style] :where(.comment-reply-title){font-style:inherit}.wp-block-post-comments-form[style*=letter-spacing] :where(.comment-reply-title){letter-spacing:inherit}.wp-block-post-comments-form :where(input[type=submit]){box-shadow:none;cursor:pointer;display:inline-block;overflow-wrap:break-word;text-align:center}.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]):not([type=hidden]),.wp-block-post-comments-form .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments-form .comment-form-author label,.wp-block-post-comments-form .comment-form-email label,.wp-block-post-comments-form .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments-form .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments-form .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments-form .comment-reply-title{margin-bottom:0}.wp-block-post-comments-form .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-right:.5em}.wp-block-post-comments-count{box-sizing:border-box}.wp-block-post-content{display:flow-root}.wp-block-post-comments-link,.wp-block-post-date{box-sizing:border-box}:where(.wp-block-post-excerpt){box-sizing:border-box;margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-post-excerpt__excerpt{margin-bottom:0;margin-top:0}.wp-block-post-excerpt__more-text{margin-bottom:0;margin-top:var(--wp--style--block-gap)}.wp-block-post-excerpt__more-link{display:inline-block}.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{display:inline-block;margin-left:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{display:inline-block;margin-right:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.wp-block-post-terms{box-sizing:border-box}.wp-block-post-terms .wp-block-post-terms__separator{white-space:pre-wrap}.wp-block-post-time-to-read,.wp-block-post-title{box-sizing:border-box}.wp-block-post-title{word-break:break-word}.wp-block-post-title :where(a){display:inline-block;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit}.wp-block-post-author-name{box-sizing:border-box}.wp-block-preformatted{box-sizing:border-box;white-space:pre-wrap}:where(.wp-block-preformatted.has-background){padding:1.25em 2.375em}.wp-block-pullquote{box-sizing:border-box;margin:0 0 1em;overflow-wrap:break-word;padding:4em 0;text-align:center}.wp-block-pullquote blockquote,.wp-block-pullquote p{color:inherit}.wp-block-pullquote blockquote{margin:0}.wp-block-pullquote p{margin-top:0}.wp-block-pullquote p:last-child{margin-bottom:0}.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{max-width:420px}.wp-block-pullquote cite,.wp-block-pullquote footer{position:relative}.wp-block-pullquote .has-text-color a{color:inherit}.wp-block-pullquote.has-text-align-left blockquote{text-align:right}.wp-block-pullquote.has-text-align-right blockquote{text-align:left}.wp-block-pullquote.has-text-align-center blockquote{text-align:center}.wp-block-pullquote.is-style-solid-color{border:none}.wp-block-pullquote.is-style-solid-color blockquote{margin-left:auto;margin-right:auto;max-width:60%}.wp-block-pullquote.is-style-solid-color blockquote p{font-size:2em;margin-bottom:0;margin-top:0}.wp-block-pullquote.is-style-solid-color blockquote cite{font-style:normal;text-transform:none}.wp-block-pullquote :where(cite){color:inherit;display:block}.wp-block-post-template{box-sizing:border-box;list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-post-template.is-flex-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1.25em}.wp-block-post-template.is-flex-container>li{margin:0;width:100%}@media (min-width:600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - .625em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{width:calc(33.33333% - .83333em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{width:calc(25% - .9375em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{width:calc(20% - 1em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{width:calc(16.66667% - 1.04167em)}}@media (max-width:600px){.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{grid-template-columns:1fr}}.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{float:left;margin-inline-end:0;margin-inline-start:2em}.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{float:right;margin-inline-end:2em;margin-inline-start:0}.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{margin-inline-end:auto;margin-inline-start:auto}.wp-block-query-pagination.is-content-justification-space-between>.wp-block-query-pagination-next:last-of-type{margin-inline-start:auto}.wp-block-query-pagination.is-content-justification-space-between>.wp-block-query-pagination-previous:first-child{margin-inline-end:auto}.wp-block-query-pagination .wp-block-query-pagination-previous-arrow{display:inline-block;margin-left:1ch}.wp-block-query-pagination .wp-block-query-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-query-pagination .wp-block-query-pagination-next-arrow{display:inline-block;margin-right:1ch}.wp-block-query-pagination .wp-block-query-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-query-pagination.aligncenter{justify-content:center}.wp-block-query-title,.wp-block-query-total,.wp-block-quote{box-sizing:border-box}.wp-block-quote{overflow-wrap:break-word}.wp-block-quote.is-large:where(:not(.is-style-plain)),.wp-block-quote.is-style-large:where(:not(.is-style-plain)){margin-bottom:1em;padding:0 1em}.wp-block-quote.is-large:where(:not(.is-style-plain)) p,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) p{font-size:1.5em;font-style:italic;line-height:1.6}.wp-block-quote.is-large:where(:not(.is-style-plain)) cite,.wp-block-quote.is-large:where(:not(.is-style-plain)) footer,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) cite,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) footer{font-size:1.125em;text-align:left}.wp-block-quote>cite{display:block}.wp-block-read-more{display:block;width:fit-content}.wp-block-read-more:where(:not([style*=text-decoration])){text-decoration:none}.wp-block-read-more:where(:not([style*=text-decoration])):active,.wp-block-read-more:where(:not([style*=text-decoration])):focus{text-decoration:none}ul.wp-block-rss.alignleft{margin-right:2em}ul.wp-block-rss.alignright{margin-left:2em}ul.wp-block-rss.is-grid{display:flex;flex-wrap:wrap;padding:0}ul.wp-block-rss.is-grid li{margin:0 0 1em 1em;width:100%}@media (min-width:600px){ul.wp-block-rss.columns-2 li{width:calc(50% - 1em)}ul.wp-block-rss.columns-3 li{width:calc(33.33333% - 1em)}ul.wp-block-rss.columns-4 li{width:calc(25% - 1em)}ul.wp-block-rss.columns-5 li{width:calc(20% - 1em)}ul.wp-block-rss.columns-6 li{width:calc(16.66667% - 1em)}}.wp-block-rss__item-author,.wp-block-rss__item-publish-date{display:block;font-size:.8125em}.wp-block-rss{box-sizing:border-box;list-style:none;padding:0}.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button{box-sizing:border-box;display:flex;flex-shrink:0;justify-content:center;margin-right:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__input){appearance:none;border:1px solid #949494;flex-grow:1;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important;text-transform:inherit}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){background-color:#fff;border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:left}.wp-block-separator{border:none;border-top:2px solid}:root :where(.wp-block-separator.is-style-dots){height:auto;line-height:1;text-align:center}:root :where(.wp-block-separator.is-style-dots):before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em}.wp-block-separator.is-style-dots{background:none!important;border:none!important}.wp-block-site-logo{box-sizing:border-box;line-height:0}.wp-block-site-logo a{display:inline-block;line-height:0}.wp-block-site-logo.is-default-size img{height:auto;width:120px}.wp-block-site-logo img{height:auto;max-width:100%}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{margin-left:auto;margin-right:auto;text-align:center}:root :where(.wp-block-site-logo.is-style-rounded){border-radius:9999px}.wp-block-site-tagline,.wp-block-site-title{box-sizing:border-box}.wp-block-site-title :where(a){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit}.wp-block-social-links{background:none;box-sizing:border-box;margin-right:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block}@media not (prefers-reduced-motion){.wp-block-social-link{transition:transform .1s ease}}.wp-block-social-link{height:auto}.wp-block-social-link a{align-items:center;display:flex;line-height:0}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link.wp-social-link{display:inline-block;margin:0;padding:0}.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{color:currentColor;fill:currentColor}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link{background-color:#f0f0f0;color:#444}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-amazon{background-color:#f90;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-behance{background-color:#0757fe;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bluesky{background-color:#0a7aff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-discord{background-color:#5865f2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-etsy{background-color:#f45800;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-facebook{background-color:#0866ff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-flickr{background-color:#0461dd;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-foursquare{background-color:#e65678;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-github{background-color:#24292d;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-google{background-color:#ea4434;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-gravatar{background-color:#1d4fc4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-instagram{background-color:#f00075;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-medium{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-meetup{background-color:#f6405f;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-patreon{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pinterest{background-color:#e60122;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pocket{background-color:#ef4155;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-reddit{background-color:#ff4500;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-skype{background-color:#0478d7;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-snapchat{background-color:#fefc00;color:#fff;stroke:#000}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-spotify{background-color:#1bd760;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-telegram{background-color:#2aabee;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-threads{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tiktok{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tumblr{background-color:#011835;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitch{background-color:#6440a4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vk{background-color:#4680c2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-x{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-yelp{background-color:#d32422;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-youtube{background-color:red;color:#fff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link{background:none}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link svg{height:1.25em;width:1.25em}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-amazon{color:#f90}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bandcamp{color:#1ea0c3}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-behance{color:#0757fe}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bluesky{color:#0a7aff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-codepen{color:#1e1f26}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-deviantart{color:#02e49b}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-discord{color:#5865f2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dribbble{color:#e94c89}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dropbox{color:#4280ff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-etsy{color:#f45800}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-facebook{color:#0866ff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-fivehundredpx{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-flickr{color:#0461dd}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-foursquare{color:#e65678}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-github{color:#24292d}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-goodreads{color:#382110}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-google{color:#ea4434}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-gravatar{color:#1d4fc4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-instagram{color:#f00075}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-lastfm{color:#e21b24}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-linkedin{color:#0d66c2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-mastodon{color:#3288d4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-medium{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-meetup{color:#f6405f}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-patreon{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pinterest{color:#e60122}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pocket{color:#ef4155}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-reddit{color:#ff4500}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-skype{color:#0478d7}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-snapchat{color:#fff;stroke:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-soundcloud{color:#ff5600}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-spotify{color:#1bd760}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-telegram{color:#2aabee}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-threads{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tiktok{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tumblr{color:#011835}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitch{color:#6440a4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitter{color:#1da1f2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vimeo{color:#1eb7ea}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vk{color:#4680c2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-whatsapp{color:#25d366}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-wordpress{color:#3499cd}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-x{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-yelp{color:#d32422}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}:root :where(.wp-block-social-links .wp-social-link a){padding:.25em}:root :where(.wp-block-social-links.is-style-logos-only .wp-social-link a){padding:0}:root :where(.wp-block-social-links.is-style-pill-shape .wp-social-link a){padding-left:.6666666667em;padding-right:.6666666667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000}.wp-block-spacer{clear:both}.wp-block-tag-cloud{box-sizing:border-box}.wp-block-tag-cloud.aligncenter{justify-content:center;text-align:center}.wp-block-tag-cloud a{display:inline-block;margin-left:5px}.wp-block-tag-cloud span{display:inline-block;margin-right:5px;text-decoration:none}:root :where(.wp-block-tag-cloud.is-style-outline){display:flex;flex-wrap:wrap;gap:1ch}:root :where(.wp-block-tag-cloud.is-style-outline a){border:1px solid;font-size:unset!important;margin-left:0;padding:1ch 2ch;text-decoration:none!important}.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table.is-style-stripes{border-bottom:1px solid #f0f0f0}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit}:root :where(.wp-block-table-of-contents){box-sizing:border-box}.wp-block-term-count{box-sizing:border-box}:where(.wp-block-term-description){box-sizing:border-box;margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-term-description p{margin-bottom:0;margin-top:0}.wp-block-term-name{box-sizing:border-box}.wp-block-term-template{box-sizing:border-box;list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-text-columns,.wp-block-text-columns.aligncenter{display:flex}.wp-block-text-columns .wp-block-column{margin:0 1em;padding:0}.wp-block-text-columns .wp-block-column:first-child{margin-right:0}.wp-block-text-columns .wp-block-column:last-child{margin-left:0}.wp-block-text-columns.columns-2 .wp-block-column{width:50%}.wp-block-text-columns.columns-3 .wp-block-column{width:33.3333333333%}.wp-block-text-columns.columns-4 .wp-block-column{width:25%}pre.wp-block-verse{overflow:auto;white-space:pre-wrap}:where(pre.wp-block-verse){font-family:inherit}.wp-block-video{box-sizing:border-box}.wp-block-video video{height:auto;vertical-align:middle;width:100%}@supports (position:sticky){.wp-block-video [poster]{object-fit:cover}}.wp-block-video.aligncenter{text-align:center}.wp-block-video :where(figcaption){margin-bottom:1em;margin-top:.5em}.editor-styles-wrapper,.entry-content{counter-reset:footnotes}a[data-fn].fn{counter-increment:footnotes;display:inline-flex;font-size:smaller;text-decoration:none;text-indent:-9999999px;vertical-align:super}a[data-fn].fn:after{content:"[" counter(footnotes) "]";float:right;text-indent:0}:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(-135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(-135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(-135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(-135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(-135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(-135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(-135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;line-height:normal;padding:15px 23px 14px;right:5px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-left-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-right-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-left-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-right-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
\ No newline at end of file
diff --git a/wp-includes/css/dist/block-library/style.css b/wp-includes/css/dist/block-library/style.css
index 67d846e32b..3b83d71301 100644
--- a/wp-includes/css/dist/block-library/style.css
+++ b/wp-includes/css/dist/block-library/style.css
@@ -18,10 +18,6 @@
}
}
-.wp-block-accordion .wp-block-accordion-heading{
- padding:0;
-}
-
.wp-block-accordion-heading__toggle{
align-items:center;
background:none;
@@ -31,6 +27,7 @@
display:flex;
font-family:inherit;
font-size:inherit;
+ font-style:inherit;
font-weight:inherit;
letter-spacing:inherit;
line-height:inherit;
@@ -1241,7 +1238,7 @@ figure.wp-block-gallery.has-nested-images{
position:relative;
}
-h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{
+h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{
padding:1.25em 2.375em;
}
h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){
@@ -1712,11 +1709,17 @@ ol,ul{
padding:1.25em 2.375em;
}
-.wp-block-loginout,.wp-block-media-text{
+.wp-block-loginout{
box-sizing:border-box;
}
+.wp-block-math{
+ overflow-x:auto;
+ overflow-y:hidden;
+}
+
.wp-block-media-text{
+ box-sizing:border-box;
direction:ltr;
display:grid;
grid-template-columns:50% 1fr;
diff --git a/wp-includes/css/dist/block-library/style.min.css b/wp-includes/css/dist/block-library/style.min.css
index 39b36dabcb..72c16b66d7 100644
--- a/wp-includes/css/dist/block-library/style.min.css
+++ b/wp-includes/css/dist/block-library/style.min.css
@@ -1,6 +1,6 @@
-@charset "UTF-8";.wp-block-accordion-item{display:grid;grid-template-rows:max-content 0fr}.wp-block-accordion-item.is-open{grid-template-rows:max-content 1fr}.wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transform:rotate(45deg)}@media (prefers-reduced-motion:no-preference){.wp-block-accordion-item{transition:grid-template-rows .3s ease-out}.wp-block-accordion-item>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transition:transform .2s ease-in-out}}.wp-block-accordion .wp-block-accordion-heading{padding:0}.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}.wp-block-accordion-panel[aria-hidden=true],.wp-block-accordion-panel[inert]{display:none;margin-block-start:0}.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}.wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}.wp-block-breadcrumbs{box-sizing:border-box}.wp-block-breadcrumbs ol{flex-wrap:wrap;list-style:none}.wp-block-breadcrumbs li,.wp-block-breadcrumbs ol{align-items:center;display:flex;margin:0;padding:0}.wp-block-breadcrumbs li:not(:last-child):after{content:var(--separator,"/");margin:0 .5em;opacity:.7}.wp-block-breadcrumbs span{color:inherit}.wp-block-button__link{align-content:center;box-sizing:border-box;cursor:pointer;display:inline-block;height:100%;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}.wp-block-buttons{box-sizing:border-box}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons .wp-block-button__link{width:100%}.wp-block-button.aligncenter,.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}.wp-block-calendar :where(table:not(.has-text-color)){color:#40464d}.wp-block-calendar :where(table:not(.has-text-color)) td,.wp-block-calendar :where(table:not(.has-text-color)) th{border-color:#ddd}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}.wp-block-code{box-sizing:border-box}.wp-block-code code{
+@charset "UTF-8";.wp-block-accordion-item{display:grid;grid-template-rows:max-content 0fr}.wp-block-accordion-item.is-open{grid-template-rows:max-content 1fr}.wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transform:rotate(45deg)}@media (prefers-reduced-motion:no-preference){.wp-block-accordion-item{transition:grid-template-rows .3s ease-out}.wp-block-accordion-item>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon{transition:transform .2s ease-in-out}}.wp-block-accordion-heading__toggle{align-items:center;background:none;border:none;color:inherit;cursor:pointer;display:flex;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;overflow:hidden;padding:var(--wp--preset--spacing--20,1em) 0;position:relative;text-align:inherit;text-decoration:inherit;text-transform:inherit;width:100%;word-spacing:inherit}.wp-block-accordion-heading__toggle:not(:focus-visible){outline:none}.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title{text-decoration:underline}.wp-block-accordion-heading__toggle-title{flex:1}.wp-block-accordion-heading__toggle-icon{align-items:center;display:flex;height:1.2em;justify-content:center;width:1.2em}.wp-block-accordion-panel[aria-hidden=true],.wp-block-accordion-panel[inert]{display:none;margin-block-start:0}.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}.wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}.wp-block-breadcrumbs{box-sizing:border-box}.wp-block-breadcrumbs ol{flex-wrap:wrap;list-style:none}.wp-block-breadcrumbs li,.wp-block-breadcrumbs ol{align-items:center;display:flex;margin:0;padding:0}.wp-block-breadcrumbs li:not(:last-child):after{content:var(--separator,"/");margin:0 .5em;opacity:.7}.wp-block-breadcrumbs span{color:inherit}.wp-block-button__link{align-content:center;box-sizing:border-box;cursor:pointer;display:inline-block;height:100%;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}.wp-block-buttons{box-sizing:border-box}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons .wp-block-button__link{width:100%}.wp-block-button.aligncenter,.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}.wp-block-calendar :where(table:not(.has-text-color)){color:#40464d}.wp-block-calendar :where(table:not(.has-text-color)) td,.wp-block-calendar :where(table:not(.has-text-color)) th{border-color:#ddd}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}.wp-block-code{box-sizing:border-box}.wp-block-code code{
/*!rtl:begin:ignore*/direction:ltr;display:block;font-family:inherit;overflow-wrap:break-word;text-align:initial;white-space:pre-wrap
- /*!rtl:end:ignore*/}.wp-block-columns{box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns{align-items:normal!important}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.wp-block-comments{box-sizing:border-box}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{font-size:inherit}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{display:inline-block;margin-right:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{display:inline-block;margin-left:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination.aligncenter{justify-content:center}.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-left:2rem}.wp-block-comment-template.alignleft{float:left}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:fit-content}.wp-block-comment-template.alignright{float:right}.wp-block-comment-date{box-sizing:border-box}.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-author-name,.wp-block-comment-content,.wp-block-comment-edit-link,.wp-block-comment-reply-link{box-sizing:border-box}.wp-block-cover,.wp-block-cover-image{align-items:center;background-position:50%;box-sizing:border-box;display:flex;justify-content:center;min-height:430px;overflow:hidden;overflow:clip;padding:1em;position:relative}.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){background-color:#000}.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{background-color:initial}.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{background-color:inherit;content:""}.wp-block-cover .wp-block-cover__background,.wp-block-cover .wp-block-cover__gradient-background,.wp-block-cover-image .wp-block-cover__background,.wp-block-cover-image .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim:not(.has-background-gradient):before,.wp-block-cover.has-background-dim:not(.has-background-gradient):before{bottom:0;left:0;opacity:.5;position:absolute;right:0;top:0}.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient):before{opacity:.1}.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient):before{opacity:.2}.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient):before{opacity:.3}.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient):before{opacity:.4}.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient):before{opacity:.5}.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient):before{opacity:.6}.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient):before{opacity:.7}.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient):before{opacity:.8}.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient):before{opacity:.9}.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient):before{opacity:1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0{opacity:0}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10{opacity:.1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20{opacity:.2}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30{opacity:.3}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40{opacity:.4}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50{opacity:.5}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60{opacity:.6}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70{opacity:.7}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80{opacity:.8}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90{opacity:.9}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100{opacity:1}.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.alignleft,.wp-block-cover.alignright{max-width:420px;width:100%}.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{display:flex}.wp-block-cover .wp-block-cover__inner-container,.wp-block-cover-image .wp-block-cover__inner-container{color:inherit;position:relative;width:100%}.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{align-items:flex-start;justify-content:flex-start}.wp-block-cover-image.is-position-top-center,.wp-block-cover.is-position-top-center{align-items:flex-start;justify-content:center}.wp-block-cover-image.is-position-top-right,.wp-block-cover.is-position-top-right{align-items:flex-start;justify-content:flex-end}.wp-block-cover-image.is-position-center-left,.wp-block-cover.is-position-center-left{align-items:center;justify-content:flex-start}.wp-block-cover-image.is-position-center-center,.wp-block-cover.is-position-center-center{align-items:center;justify-content:center}.wp-block-cover-image.is-position-center-right,.wp-block-cover.is-position-center-right{align-items:center;justify-content:flex-end}.wp-block-cover-image.is-position-bottom-left,.wp-block-cover.is-position-bottom-left{align-items:flex-end;justify-content:flex-start}.wp-block-cover-image.is-position-bottom-center,.wp-block-cover.is-position-bottom-center{align-items:flex-end;justify-content:center}.wp-block-cover-image.is-position-bottom-right,.wp-block-cover.is-position-bottom-right{align-items:flex-end;justify-content:flex-end}.wp-block-cover-image.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container{margin:0}.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container{margin:0;width:auto}.wp-block-cover .wp-block-cover__image-background,.wp-block-cover video.wp-block-cover__video-background,.wp-block-cover-image .wp-block-cover__image-background,.wp-block-cover-image video.wp-block-cover__video-background{border:none;bottom:0;box-shadow:none;height:100%;left:0;margin:0;max-height:none;max-width:none;object-fit:cover;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:fixed;background-repeat:no-repeat;background-size:cover}@supports (-webkit-touch-callout:inherit){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}@media (prefers-reduced-motion:reduce){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}.wp-block-cover-image.is-repeated,.wp-block-cover.is-repeated,.wp-block-cover__image-background.is-repeated,video.wp-block-cover__video-background.is-repeated{background-repeat:repeat;background-size:auto}.wp-block-cover-image-text,.wp-block-cover-image-text a,.wp-block-cover-image-text a:active,.wp-block-cover-image-text a:focus,.wp-block-cover-image-text a:hover,.wp-block-cover-text,.wp-block-cover-text a,.wp-block-cover-text a:active,.wp-block-cover-text a:focus,.wp-block-cover-text a:hover,section.wp-block-cover-image h2,section.wp-block-cover-image h2 a,section.wp-block-cover-image h2 a:active,section.wp-block-cover-image h2 a:focus,section.wp-block-cover-image h2 a:hover{color:#fff}.wp-block-cover-image .wp-block-cover.has-left-content{justify-content:flex-start}.wp-block-cover-image .wp-block-cover.has-right-content{justify-content:flex-end}.wp-block-cover-image.has-left-content .wp-block-cover-image-text,.wp-block-cover.has-left-content .wp-block-cover-text,section.wp-block-cover-image.has-left-content>h2{margin-left:0;text-align:left}.wp-block-cover-image.has-right-content .wp-block-cover-image-text,.wp-block-cover.has-right-content .wp-block-cover-text,section.wp-block-cover-image.has-right-content>h2{margin-right:0;text-align:right}.wp-block-cover .wp-block-cover-text,.wp-block-cover-image .wp-block-cover-image-text,section.wp-block-cover-image>h2{font-size:2em;line-height:1.25;margin-bottom:0;max-width:840px;padding:.44em;text-align:center;z-index:1}:where(.wp-block-cover-image:not(.has-text-color)),:where(.wp-block-cover:not(.has-text-color)){color:#fff}:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){color:#000}:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){color:inherit}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__image-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__video-background{z-index:0}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__gradient-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient):before{z-index:1}.has-modal-open body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container{z-index:auto}.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):where(a):active,:where(.wp-block-file__button):where(a):focus,:where(.wp-block-file__button):where(a):hover,:where(.wp-block-file__button):where(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}.wp-block-form-input__label{display:flex;flex-direction:column;gap:.25em;margin-bottom:.5em;width:100%}.wp-block-form-input__label.is-label-inline{align-items:center;flex-direction:row;gap:.5em}.wp-block-form-input__label.is-label-inline .wp-block-form-input__label-content{margin-bottom:.5em}.wp-block-form-input__label:has(input[type=checkbox]){flex-direction:row;width:fit-content}.wp-block-form-input__label:has(input[type=checkbox]) .wp-block-form-input__label-content{margin:0}.wp-block-form-input__label:has(.wp-block-form-input__label-content+input[type=checkbox]){flex-direction:row-reverse}.wp-block-form-input__label-content{width:fit-content}:where(.wp-block-form-input__input){font-size:1em;margin-bottom:.5em;padding:0 .5em}:where(.wp-block-form-input__input)[type=date],:where(.wp-block-form-input__input)[type=datetime-local],:where(.wp-block-form-input__input)[type=datetime],:where(.wp-block-form-input__input)[type=email],:where(.wp-block-form-input__input)[type=month],:where(.wp-block-form-input__input)[type=number],:where(.wp-block-form-input__input)[type=password],:where(.wp-block-form-input__input)[type=search],:where(.wp-block-form-input__input)[type=tel],:where(.wp-block-form-input__input)[type=text],:where(.wp-block-form-input__input)[type=time],:where(.wp-block-form-input__input)[type=url],:where(.wp-block-form-input__input)[type=week]{border-style:solid;border-width:1px;line-height:2;min-height:2em}textarea.wp-block-form-input__input{min-height:10em}.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 1em 1em 0;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-right:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,#000000b3,#0000004d 70%,#0000);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-right:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-right:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-right:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-right:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-right:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-right:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-right:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-right:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-right:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{bottom:0;left:0;max-height:100%;position:absolute;right:0}.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{backdrop-filter:blur(3px);content:"";height:100%;-webkit-mask-image:linear-gradient(0deg,#000 20%,#0000);mask-image:linear-gradient(0deg,#000 20%,#0000);max-height:40%;pointer-events:none}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{box-sizing:border-box;color:#fff;font-size:13px;margin:0;overflow:auto;padding:1em;text-align:center;text-shadow:0 0 1.5px #000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{height:12px;width:12px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{background-color:initial}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{background-color:#fffc}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{scrollbar-color:#fffc #0000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{will-change:transform}@media (hover:none){.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#fffc #0000}}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,#0006,#0000)}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative;text-shadow:none}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{content:none}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}.wp-block-image>a,.wp-block-image>figure>a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media not (prefers-reduced-motion){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull>a,.wp-block-image.alignwide>a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;opacity:0;padding:0;position:absolute;right:16px;text-align:center;top:16px;width:20px;z-index:100}@media not (prefers-reduced-motion){.wp-lightbox-container button{transition:opacity .2s ease}}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;left:0;overflow:hidden;position:fixed;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;min-height:40px;min-width:40px;padding:0;position:absolute;right:calc(env(safe-area-inset-right) + 16px);top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);left:50%;overflow:hidden;position:absolute;top:50%;transform:translate(-50%,-50%);transform-origin:top left;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:0 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{visibility:visible}@media not (prefers-reduced-motion){.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(-50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(-50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}}ol.wp-block-latest-comments{box-sizing:border-box;margin-left:0}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment)){line-height:1.1}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:1.8}.has-dates :where(.wp-block-latest-comments:not([style*=line-height])),.has-excerpts :where(.wp-block-latest-comments:not([style*=line-height])){line-height:1.5}.wp-block-latest-comments .wp-block-latest-comments{padding-left:0}.wp-block-latest-comments__comment{list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-left:3.25em}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;width:2.5em}.wp-block-latest-comments[class*=-font-size] a,.wp-block-latest-comments[style*=font-size] a{font-size:inherit}.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-left:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt,.wp-block-latest-posts__post-full-content{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}ol,ul{box-sizing:border-box}:root :where(.wp-block-list.has-background){padding:1.25em 2.375em}.wp-block-loginout,.wp-block-media-text{box-sizing:border-box}.wp-block-media-text{
+ /*!rtl:end:ignore*/}.wp-block-columns{box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns{align-items:normal!important}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.wp-block-comments{box-sizing:border-box}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{font-size:inherit}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{display:inline-block;margin-right:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{display:inline-block;margin-left:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination.aligncenter{justify-content:center}.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-left:2rem}.wp-block-comment-template.alignleft{float:left}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:fit-content}.wp-block-comment-template.alignright{float:right}.wp-block-comment-date{box-sizing:border-box}.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-author-name,.wp-block-comment-content,.wp-block-comment-edit-link,.wp-block-comment-reply-link{box-sizing:border-box}.wp-block-cover,.wp-block-cover-image{align-items:center;background-position:50%;box-sizing:border-box;display:flex;justify-content:center;min-height:430px;overflow:hidden;overflow:clip;padding:1em;position:relative}.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){background-color:#000}.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{background-color:initial}.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{background-color:inherit;content:""}.wp-block-cover .wp-block-cover__background,.wp-block-cover .wp-block-cover__gradient-background,.wp-block-cover-image .wp-block-cover__background,.wp-block-cover-image .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim:not(.has-background-gradient):before,.wp-block-cover.has-background-dim:not(.has-background-gradient):before{bottom:0;left:0;opacity:.5;position:absolute;right:0;top:0}.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient):before{opacity:.1}.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient):before{opacity:.2}.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient):before{opacity:.3}.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient):before{opacity:.4}.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient):before{opacity:.5}.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient):before{opacity:.6}.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient):before{opacity:.7}.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient):before{opacity:.8}.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient):before{opacity:.9}.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient):before{opacity:1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0{opacity:0}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10{opacity:.1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20{opacity:.2}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30{opacity:.3}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40{opacity:.4}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50{opacity:.5}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60{opacity:.6}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70{opacity:.7}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80{opacity:.8}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90{opacity:.9}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100{opacity:1}.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.alignleft,.wp-block-cover.alignright{max-width:420px;width:100%}.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{display:flex}.wp-block-cover .wp-block-cover__inner-container,.wp-block-cover-image .wp-block-cover__inner-container{color:inherit;position:relative;width:100%}.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{align-items:flex-start;justify-content:flex-start}.wp-block-cover-image.is-position-top-center,.wp-block-cover.is-position-top-center{align-items:flex-start;justify-content:center}.wp-block-cover-image.is-position-top-right,.wp-block-cover.is-position-top-right{align-items:flex-start;justify-content:flex-end}.wp-block-cover-image.is-position-center-left,.wp-block-cover.is-position-center-left{align-items:center;justify-content:flex-start}.wp-block-cover-image.is-position-center-center,.wp-block-cover.is-position-center-center{align-items:center;justify-content:center}.wp-block-cover-image.is-position-center-right,.wp-block-cover.is-position-center-right{align-items:center;justify-content:flex-end}.wp-block-cover-image.is-position-bottom-left,.wp-block-cover.is-position-bottom-left{align-items:flex-end;justify-content:flex-start}.wp-block-cover-image.is-position-bottom-center,.wp-block-cover.is-position-bottom-center{align-items:flex-end;justify-content:center}.wp-block-cover-image.is-position-bottom-right,.wp-block-cover.is-position-bottom-right{align-items:flex-end;justify-content:flex-end}.wp-block-cover-image.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container{margin:0}.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container{margin:0;width:auto}.wp-block-cover .wp-block-cover__image-background,.wp-block-cover video.wp-block-cover__video-background,.wp-block-cover-image .wp-block-cover__image-background,.wp-block-cover-image video.wp-block-cover__video-background{border:none;bottom:0;box-shadow:none;height:100%;left:0;margin:0;max-height:none;max-width:none;object-fit:cover;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:fixed;background-repeat:no-repeat;background-size:cover}@supports (-webkit-touch-callout:inherit){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}@media (prefers-reduced-motion:reduce){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}.wp-block-cover-image.is-repeated,.wp-block-cover.is-repeated,.wp-block-cover__image-background.is-repeated,video.wp-block-cover__video-background.is-repeated{background-repeat:repeat;background-size:auto}.wp-block-cover-image-text,.wp-block-cover-image-text a,.wp-block-cover-image-text a:active,.wp-block-cover-image-text a:focus,.wp-block-cover-image-text a:hover,.wp-block-cover-text,.wp-block-cover-text a,.wp-block-cover-text a:active,.wp-block-cover-text a:focus,.wp-block-cover-text a:hover,section.wp-block-cover-image h2,section.wp-block-cover-image h2 a,section.wp-block-cover-image h2 a:active,section.wp-block-cover-image h2 a:focus,section.wp-block-cover-image h2 a:hover{color:#fff}.wp-block-cover-image .wp-block-cover.has-left-content{justify-content:flex-start}.wp-block-cover-image .wp-block-cover.has-right-content{justify-content:flex-end}.wp-block-cover-image.has-left-content .wp-block-cover-image-text,.wp-block-cover.has-left-content .wp-block-cover-text,section.wp-block-cover-image.has-left-content>h2{margin-left:0;text-align:left}.wp-block-cover-image.has-right-content .wp-block-cover-image-text,.wp-block-cover.has-right-content .wp-block-cover-text,section.wp-block-cover-image.has-right-content>h2{margin-right:0;text-align:right}.wp-block-cover .wp-block-cover-text,.wp-block-cover-image .wp-block-cover-image-text,section.wp-block-cover-image>h2{font-size:2em;line-height:1.25;margin-bottom:0;max-width:840px;padding:.44em;text-align:center;z-index:1}:where(.wp-block-cover-image:not(.has-text-color)),:where(.wp-block-cover:not(.has-text-color)){color:#fff}:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){color:#000}:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){color:inherit}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__image-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__video-background{z-index:0}body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__gradient-background,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container,body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)).has-background-dim:not(.has-background-gradient):before{z-index:1}.has-modal-open body:not(.editor-styles-wrapper) .wp-block-cover:not(.wp-block-cover:has(.wp-block-cover__background+.wp-block-cover__inner-container)) .wp-block-cover__inner-container{z-index:auto}.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):where(a):active,:where(.wp-block-file__button):where(a):focus,:where(.wp-block-file__button):where(a):hover,:where(.wp-block-file__button):where(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}.wp-block-form-input__label{display:flex;flex-direction:column;gap:.25em;margin-bottom:.5em;width:100%}.wp-block-form-input__label.is-label-inline{align-items:center;flex-direction:row;gap:.5em}.wp-block-form-input__label.is-label-inline .wp-block-form-input__label-content{margin-bottom:.5em}.wp-block-form-input__label:has(input[type=checkbox]){flex-direction:row;width:fit-content}.wp-block-form-input__label:has(input[type=checkbox]) .wp-block-form-input__label-content{margin:0}.wp-block-form-input__label:has(.wp-block-form-input__label-content+input[type=checkbox]){flex-direction:row-reverse}.wp-block-form-input__label-content{width:fit-content}:where(.wp-block-form-input__input){font-size:1em;margin-bottom:.5em;padding:0 .5em}:where(.wp-block-form-input__input)[type=date],:where(.wp-block-form-input__input)[type=datetime-local],:where(.wp-block-form-input__input)[type=datetime],:where(.wp-block-form-input__input)[type=email],:where(.wp-block-form-input__input)[type=month],:where(.wp-block-form-input__input)[type=number],:where(.wp-block-form-input__input)[type=password],:where(.wp-block-form-input__input)[type=search],:where(.wp-block-form-input__input)[type=tel],:where(.wp-block-form-input__input)[type=text],:where(.wp-block-form-input__input)[type=time],:where(.wp-block-form-input__input)[type=url],:where(.wp-block-form-input__input)[type=week]{border-style:solid;border-width:1px;line-height:2;min-height:2em}textarea.wp-block-form-input__input{min-height:10em}.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 1em 1em 0;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-right:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,#000000b3,#0000004d 70%,#0000);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-right:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-right:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-right:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-right:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-right:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-right:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-right:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-right:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-right:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{bottom:0;left:0;max-height:100%;position:absolute;right:0}.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{backdrop-filter:blur(3px);content:"";height:100%;-webkit-mask-image:linear-gradient(0deg,#000 20%,#0000);mask-image:linear-gradient(0deg,#000 20%,#0000);max-height:40%;pointer-events:none}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{box-sizing:border-box;color:#fff;font-size:13px;margin:0;overflow:auto;padding:1em;text-align:center;text-shadow:0 0 1.5px #000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{height:12px;width:12px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{background-color:initial}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{background-color:#fffc}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{scrollbar-color:#fffc #0000}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{will-change:transform}@media (hover:none){.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#fffc #0000}}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,#0006,#0000)}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative;text-shadow:none}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{content:none}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}h1:where(.wp-block-heading).has-background,h2:where(.wp-block-heading).has-background,h3:where(.wp-block-heading).has-background,h4:where(.wp-block-heading).has-background,h5:where(.wp-block-heading).has-background,h6:where(.wp-block-heading).has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}.wp-block-image>a,.wp-block-image>figure>a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media not (prefers-reduced-motion){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull>a,.wp-block-image.alignwide>a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;opacity:0;padding:0;position:absolute;right:16px;text-align:center;top:16px;width:20px;z-index:100}@media not (prefers-reduced-motion){.wp-lightbox-container button{transition:opacity .2s ease}}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;left:0;overflow:hidden;position:fixed;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;min-height:40px;min-width:40px;padding:0;position:absolute;right:calc(env(safe-area-inset-right) + 16px);top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);left:50%;overflow:hidden;position:absolute;top:50%;transform:translate(-50%,-50%);transform-origin:top left;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:0 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{visibility:visible}@media not (prefers-reduced-motion){.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(-50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(-50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}}ol.wp-block-latest-comments{box-sizing:border-box;margin-left:0}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment)){line-height:1.1}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:1.8}.has-dates :where(.wp-block-latest-comments:not([style*=line-height])),.has-excerpts :where(.wp-block-latest-comments:not([style*=line-height])){line-height:1.5}.wp-block-latest-comments .wp-block-latest-comments{padding-left:0}.wp-block-latest-comments__comment{list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-left:3.25em}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;width:2.5em}.wp-block-latest-comments[class*=-font-size] a,.wp-block-latest-comments[style*=font-size] a{font-size:inherit}.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-left:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt,.wp-block-latest-posts__post-full-content{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}ol,ul{box-sizing:border-box}:root :where(.wp-block-list.has-background){padding:1.25em 2.375em}.wp-block-loginout{box-sizing:border-box}.wp-block-math{overflow-x:auto;overflow-y:hidden}.wp-block-media-text{box-sizing:border-box;
/*!rtl:begin:ignore*/direction:ltr;
/*!rtl:end:ignore*/display:grid;grid-template-columns:50% 1fr;grid-template-rows:auto}.wp-block-media-text.has-media-on-the-right{grid-template-columns:1fr 50%}.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__media{align-self:start}.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__media,.wp-block-media-text>.wp-block-media-text__content,.wp-block-media-text>.wp-block-media-text__media{align-self:center}.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__media{align-self:end}.wp-block-media-text>.wp-block-media-text__media{
/*!rtl:begin:ignore*/grid-column:1;grid-row:1;
diff --git a/wp-includes/css/dist/editor/style-rtl.css b/wp-includes/css/dist/editor/style-rtl.css
index 2edfdedabf..4be6e17fdc 100644
--- a/wp-includes/css/dist/editor/style-rtl.css
+++ b/wp-includes/css/dist/editor/style-rtl.css
@@ -512,6 +512,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
}
.editor-collab-sidebar-panel__user-avatar{
+ background:#fff;
border-radius:50%;
border-style:solid;
border-width:var(--wp-admin-border-width-focus);
@@ -616,56 +617,18 @@ body.is-fullscreen-mode .interface-interface-skeleton{
top:auto;
}
-.comment-avatar-indicator{
- background:#0000;
- border:none;
- min-width:auto;
- padding:4px;
- position:relative;
-}
-
-.comment-avatar-stack{
- align-items:center;
- display:flex;
- height:24px;
- position:relative;
-}
-
.comment-avatar{
- border:2px solid #fff;
+ background:#fff;
border-radius:50%;
- flex-shrink:0;
- height:24px;
- margin-right:-6px;
+ border-style:solid;
+ border-width:var(--wp-admin-border-width-focus);
+ margin-right:-12px;
+ padding:var(--wp-admin-border-width-focus);
width:24px;
}
.comment-avatar:first-child{
- border-color:#de6e55;
margin-right:0;
}
-.comment-avatar:nth-child(2){
- border-color:#599637;
-}
-.comment-avatar:nth-child(3){
- border-color:#3858e9;
-}
-
-.comment-avatar-overflow{
- align-items:center;
- background:#757575;
- border:2px solid #fff;
- border-radius:4rem;
- color:#fff;
- display:flex;
- flex-shrink:0;
- font-size:10px;
- font-weight:600;
- height:24px;
- justify-content:center;
- margin-right:-6px;
- padding:0 4px;
- width:fit-content;
-}
.editor-collapsible-block-toolbar{
align-items:center;
diff --git a/wp-includes/css/dist/editor/style-rtl.min.css b/wp-includes/css/dist/editor/style-rtl.min.css
index 0f0d31b3bd..30fb5b4ccd 100644
--- a/wp-includes/css/dist/editor/style-rtl.min.css
+++ b/wp-includes/css/dist/editor/style-rtl.min.css
@@ -1 +1 @@
-@charset "UTF-8";:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.interface-complementary-area-header{background:#fff;gap:4px;padding-left:8px}.interface-complementary-area-header .interface-complementary-area-header__title{margin:0 0 0 auto}.interface-complementary-area{background:#fff;color:#1e1e1e;height:100%;overflow:auto}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs{top:0}.interface-complementary-area p:not(.components-base-control__help,.components-form-token-field__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;font-weight:500;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:10px;right:auto;top:auto}.interface-complementary-area__fill{height:100%}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-right:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container:not(:has(.is-zoom-out)){position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;left:0;max-height:100%;position:fixed;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{right:0}@media (min-width:783px){.interface-interface-skeleton{right:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{right:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{right:160px}}.folded .interface-interface-skeleton{right:0}@media (min-width:783px){.folded .interface-interface-skeleton{right:36px}}body.is-fullscreen-mode .interface-interface-skeleton{right:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none;position:relative}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;position:absolute;right:0;top:0;width:auto;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important}}.interface-interface-skeleton__sidebar{border-top:1px solid #e0e0e0;overflow:hidden}@media (min-width:782px){.interface-interface-skeleton__sidebar{box-shadow:1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__secondary-sidebar{border-top:1px solid #e0e0e0;left:0}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar{box-shadow:-1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);color:#1e1e1e;flex-shrink:0;height:auto;outline:1px solid #0000;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;position:absolute;right:0;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:0;position:fixed!important;right:auto;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-right:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-pinned-items{display:flex}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.interface-pinned-items{gap:8px}.editor-autocompleters__user .editor-autocompleters__no-avatar:before{content:"\f110";font:normal 20px/1 dashicons;margin-left:5px;vertical-align:middle}.editor-autocompleters__user .editor-autocompleters__user-avatar{flex-grow:0;flex-shrink:0;height:24px;margin-left:8px;max-width:none;width:24px}.editor-autocompleters__user .editor-autocompleters__user-name{flex-grow:1;flex-shrink:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user .editor-autocompleters__user-slug{flex-grow:0;flex-shrink:0;margin-right:8px;max-width:100px;overflow:none;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user:not(.is-primary) .editor-autocompleters__user-slug{color:#757575}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar){box-shadow:none}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar) .interface-complementary-area-header{display:none}.editor-collab-sidebar{height:100%;overflow:hidden}.editor-collab-sidebar-panel{height:100%;overflow:hidden;padding:16px 16px 24px}.editor-collab-sidebar-panel__thread{background-color:#f0f0f0;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:16px;position:relative;width:auto}.editor-collab-sidebar-panel__thread.is-selected{background-color:#fff;box-shadow:0 2px 3px #0000000d,0 4px 5px #0000000a,0 12px 12px #00000008,0 16px 16px #00000005;z-index:1}.editor-collab-sidebar-panel__thread:focus{outline:var(--wp-admin-border-width-focus) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-1)}.editor-collab-sidebar-panel__thread.is-floating{left:16px;margin-top:16px;position:absolute;right:16px}.editor-collab-sidebar-panel__user-name{text-transform:capitalize}.editor-collab-sidebar-panel__user-name,.editor-collab-sidebar-panel__user-time{color:#757575;font-size:12px;font-weight:400;line-height:16px;text-align:right}.editor-collab-sidebar-panel__user-comment p:last-child{margin-bottom:0}.editor-collab-sidebar-panel__user-avatar{border-radius:50%;border-style:solid;border-width:var(--wp-admin-border-width-focus);flex-shrink:0;padding:var(--wp-admin-border-width-focus)}.editor-collab-sidebar-panel__comment-status{margin-right:auto}.editor-collab-sidebar-panel__comment-status button.has-icon:not(.has-text){flex-shrink:0;height:24px;min-width:24px;padding:0;width:24px}.editor-collab-sidebar-panel__comment-dropdown-menu{flex-shrink:0}.editor-collab-sidebar-panel__more-reply-separator:after,.editor-collab-sidebar-panel__more-reply-separator:before{background-color:#ddd;content:"";display:block;flex:1;height:1px;width:100%}.editor-collab-sidebar-panel__more-reply-button{font-weight:500}.editor-collab-sidebar-panel__resolution-text{font-style:italic}.editor-collab-sidebar-panel__comment-form textarea{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.editor-collab-sidebar-panel__comment-form textarea{transition:box-shadow .1s linear}}@media (min-width:600px){.editor-collab-sidebar-panel__comment-form textarea{font-size:13px;line-height:normal}}.editor-collab-sidebar-panel__comment-form textarea:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.editor-collab-sidebar-panel__comment-form textarea::-webkit-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea::-moz-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea:-ms-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea{display:block;line-height:20px!important;padding:9px 11px}.editor-collab-sidebar-panel__skip-to-block,.editor-collab-sidebar-panel__skip-to-comment{background:#fff!important;clip-path:inset(50%);left:-9999px;overflow:hidden;position:absolute;top:-9999px;z-index:-1}.editor-collab-sidebar-panel__skip-to-block:focus,.editor-collab-sidebar-panel__skip-to-comment:focus{clip-path:none;left:8px;overflow:visible;z-index:1}.editor-collab-sidebar-panel__skip-to-comment:focus{top:8px}.editor-collab-sidebar-panel__skip-to-block:focus{bottom:8px;top:auto}.comment-avatar-indicator{background:#0000;border:none;min-width:auto;padding:4px;position:relative}.comment-avatar-stack{align-items:center;display:flex;height:24px;position:relative}.comment-avatar{border:2px solid #fff;border-radius:50%;flex-shrink:0;height:24px;margin-right:-6px;width:24px}.comment-avatar:first-child{border-color:#de6e55;margin-right:0}.comment-avatar:nth-child(2){border-color:#599637}.comment-avatar:nth-child(3){border-color:#3858e9}.comment-avatar-overflow{align-items:center;background:#757575;border:2px solid #fff;border-radius:4rem;color:#fff;display:flex;flex-shrink:0;font-size:10px;font-weight:600;height:24px;justify-content:center;margin-right:-6px;padding:0 4px;width:fit-content}.editor-collapsible-block-toolbar{align-items:center;display:flex;height:64px;overflow:hidden}.editor-collapsible-block-toolbar .block-editor-block-contextual-toolbar{background:#0000;border-bottom:0;height:100%}.editor-collapsible-block-toolbar .block-editor-block-toolbar{height:100%;padding-top:17px}.editor-collapsible-block-toolbar .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.editor-collapsible-block-toolbar:after{background-color:#ddd;content:"";height:24px;margin-left:7px;width:1px}.editor-collapsible-block-toolbar .components-toolbar,.editor-collapsible-block-toolbar .components-toolbar-group{border-left:none;position:relative}.editor-collapsible-block-toolbar .components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar:after{background-color:#ddd;content:"";height:24px;left:-1px;position:absolute;top:4px;width:1px}.editor-collapsible-block-toolbar .components-toolbar .components-toolbar-group.components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.editor-collapsible-block-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.editor-collapsible-block-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{height:40px;position:relative;top:-4px}}.editor-collapsible-block-toolbar.is-collapsed{display:none}.editor-content-only-settings-menu__description{min-width:235px;padding:8px}.editor-block-visibility__disabled-blocks-count{background-color:#fff;border:1px solid #ddd;border-width:1px 0;box-shadow:32px 0 0 0 #fff,-32px 0 0 0 #fff;padding:8px;position:sticky;text-align:center;top:-5px;z-index:2}.editor-block-visibility__disabled-blocks-count~.block-editor-block-manager__content .block-editor-block-manager__category-title{top:31px}.editor-block-visibility__disabled-blocks-count .is-link{margin-right:12px}.editor-blog-title-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-document-bar{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;height:32px;justify-content:space-between;min-width:0;width:min(100%,450px)}.editor-document-bar:hover{background-color:#e0e0e0}.editor-document-bar .components-button{border-radius:4px}@media not (prefers-reduced-motion){.editor-document-bar .components-button{transition:all .1s ease-out}}.editor-document-bar .components-button:hover{background:#e0e0e0}@media screen and (min-width:782px) and (max-width:960px){.editor-document-bar.has-back-button .editor-document-bar__post-type-label{display:none}}.editor-document-bar__command{color:var(--wp-block-synced-color);flex-grow:1;overflow:hidden}.editor-document-bar__title{color:#1e1e1e;margin:0 auto;max-width:70%;overflow:hidden}@media (min-width:782px){.editor-document-bar__title{padding-right:24px}}.editor-document-bar__title h1{align-items:center;display:flex;font-weight:400;justify-content:center;overflow:hidden;white-space:nowrap}.editor-document-bar__post-title{color:currentColor;flex:1;overflow:hidden;text-overflow:ellipsis}.editor-document-bar__post-type-label{color:#2f2f2f;flex:0;padding-right:4px}@media screen and (max-width:600px){.editor-document-bar__post-type-label{display:none}}.editor-document-bar__shortcut{color:#2f2f2f;display:none;min-width:24px}@media (min-width:782px){.editor-document-bar__shortcut{display:initial}}.editor-document-bar__back.components-button.has-icon.has-text{color:#757575;flex-shrink:0;gap:0;min-width:36px;position:absolute;z-index:1}.editor-document-bar__back.components-button.has-icon.has-text:hover{background-color:initial;color:#1e1e1e}.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:none;margin-right:12px;pointer-events:none;position:absolute}.editor-document-bar__icon-layout.editor-document-bar__icon-layout svg{fill:#949494}@media (min-width:600px){.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:flex}}.document-outline{margin:20px 0}.document-outline ul{margin:0;padding:0}.document-outline__item{display:flex;margin:4px 0}.document-outline__item a{text-decoration:none}.document-outline__item .document-outline__emdash:before{color:#ddd;margin-left:4px}.document-outline__item.is-h2 .document-outline__emdash:before{content:"—"}.document-outline__item.is-h3 .document-outline__emdash:before{content:"——"}.document-outline__item.is-h4 .document-outline__emdash:before{content:"———"}.document-outline__item.is-h5 .document-outline__emdash:before{content:"————"}.document-outline__item.is-h6 .document-outline__emdash:before{content:"—————"}.document-outline__button{align-items:flex-start;background:none;border:none;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;margin:0 -1px 0 0;padding:2px 1px 2px 5px;text-align:right}.document-outline__button:disabled,.document-outline__button[aria-disabled=true]{color:#757575;cursor:default}.document-outline__button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.document-outline__level{background:#ddd;border-radius:3px;color:#1e1e1e;font-size:13px;margin-left:4px;padding:1px 6px}.is-invalid .document-outline__level{background:#f0b849}.document-outline__item-content{padding:1px 0}.editor-document-outline.has-no-headings>svg{margin-top:28px}.editor-document-outline.has-no-headings>p{padding-left:32px;padding-right:32px}.editor-document-outline.has-no-headings{color:#757575;text-align:center}.editor-document-tools{align-items:center;display:inline-flex}.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:none}@media (min-width:782px){.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:inline-flex}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle{display:inline-flex}@media not (prefers-reduced-motion){.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle svg{transition:transform .2s cubic-bezier(.165,.84,.44,1)}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.is-pressed svg{transform:rotate(-45deg)}.editor-document-tools .block-editor-list-view{display:none}@media (min-width:600px){.editor-document-tools .block-editor-list-view{display:flex}}.editor-document-tools .editor-document-tools__left>.components-button.has-icon,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon{height:32px;min-width:32px;padding:4px}.editor-document-tools .editor-document-tools__left>.components-button.has-icon.is-pressed,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon.is-pressed{background:#1e1e1e}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:focus:not(:disabled),.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 1px #fff;outline:1px solid #0000}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:before,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:before{display:none}.editor-document-tools__left{align-items:center;display:inline-flex;gap:8px}.editor-document-tools__left:not(:last-child){margin-inline-end:8px}.show-icon-labels .editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.has-icon{padding:0 8px;width:auto}.show-icon-labels .editor-document-tools__left>*+*{margin-right:8px}.editor-editor-interface .entities-saved-states__panel-header{height:65px}.editor-editor-interface .interface-interface-skeleton__content{isolation:isolate}.editor-visual-editor{flex:1 0 auto}.components-editor-notices__dismissible,.components-editor-notices__pinned{color:#1e1e1e;left:0;position:relative;right:0;top:0}.components-editor-notices__dismissible .components-notice,.components-editor-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-editor-notices__dismissible .components-notice .components-notice__dismiss,.components-editor-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}.entities-saved-states__panel-header{background:#fff;border-bottom:1px solid #ddd;box-sizing:border-box;height:64px;padding-left:16px;padding-right:16px}.entities-saved-states__text-prompt{padding:16px 16px 4px}.entities-saved-states__text-prompt .entities-saved-states__text-prompt--header{display:block;margin-bottom:12px}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt{padding:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body{border:0;padding-left:0;padding-right:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2{margin-bottom:0;margin-left:-16px;margin-right:-16px}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2 button{font-size:11px;text-transform:uppercase}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--header-wrapper{display:none}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--changes-count{margin-bottom:8px;margin-top:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-footer{margin-top:16px}.entities-saved-states__change-control{flex:1}.entities-saved-states__changes{font-size:13px;list-style:disc;margin:4px 24px 0 16px}.entities-saved-states__changes li{margin-bottom:4px}.editor-error-boundary{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:64px auto auto;max-width:780px;padding:1em}.editor-header{box-sizing:border-box}.editor-header *,.editor-header :after,.editor-header :before{box-sizing:inherit}.editor-header{background:#fff;display:grid;grid-auto-flow:row;grid-template:auto/64px minmax(0,max-content) minmax(min-content,1fr) 64px;height:64px}.editor-header:has(>.editor-header__center){grid-template:auto/64px min-content 1fr min-content 64px}@media (min-width:782px){.editor-header:has(>.editor-header__center){grid-template:auto/64px minmax(min-content,2fr) 2.5fr minmax(min-content,2fr) 64px}}@media (min-width:480px){.editor-header{gap:16px}}.editor-header{align-items:center;justify-content:space-between;max-width:100vw}@media (min-width:280px){.editor-header{flex-wrap:nowrap}}.editor-header__toolbar{grid-column:1/3}.editor-header__toolbar>:first-child{margin-inline:16px 0}.editor-header__back-button+.editor-header__toolbar{grid-column:2/3}@media (min-width:480px){.editor-header__back-button+.editor-header__toolbar>:first-child{margin-inline:0}}.editor-header__toolbar{align-items:center;clip-path:inset(-2px);display:flex;min-width:0}@media (min-width:480px){.editor-header__toolbar{clip-path:none}}.editor-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.editor-header__toolbar .table-of-contents{display:block}}.editor-header__toolbar .editor-collapsible-block-toolbar,.editor-header__toolbar .editor-collapsible-block-toolbar.is-collapsed~.editor-collapsible-block-toolbar__toggle{margin-inline:8px 0}.editor-header__center{align-items:center;clip-path:inset(-2px);display:flex;grid-column:3/4;justify-content:center;min-width:0}@media (max-width:479px){.editor-header__center>:first-child{margin-inline-start:8px}.editor-header__center>:last-child{margin-inline-end:8px}}.editor-header__settings{grid-column:3/-1}.editor-header:has(>.editor-header__center) .editor-header__settings{grid-column:4/-1}.editor-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;justify-self:end;padding-left:4px}@media (min-width:600px){.editor-header__settings{padding-left:8px}}.editor-header__settings{gap:8px}.show-icon-labels .editor-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.show-icon-labels .editor-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.show-icon-labels .editor-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label);white-space:nowrap}.show-icon-labels .editor-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.show-icon-labels .editor-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.show-icon-labels .editor-header .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg{display:block}.show-icon-labels .editor-header .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after{content:none}.show-icon-labels .editor-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.show-icon-labels .editor-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .editor-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover{border-right:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-right:8px;margin-top:4px;width:1px}.show-icon-labels .editor-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;right:calc(50% + 1px);width:calc(100% - 24px)}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 8px 6px 6px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-right:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-left:8px}@media (min-width:480px){.editor-header__post-preview-button{display:none}}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.editor-editor-interface.is-distraction-free .editor-header{background-color:#fff;width:100%}@media (min-width:782px){.editor-editor-interface.is-distraction-free .editor-header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);position:absolute}}.editor-editor-interface.is-distraction-free .editor-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-preview-dropdown,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-zoom-out-toggle,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.interface-pinned-items,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__toolbar .editor-document-tools__document-overview-toggle{display:none}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.editor-editor-interface.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.components-popover.more-menu-dropdown__content{z-index:99998}.editor-inserter-sidebar{box-sizing:border-box}.editor-inserter-sidebar *,.editor-inserter-sidebar :after,.editor-inserter-sidebar :before{box-sizing:inherit}.editor-inserter-sidebar{display:flex;flex-direction:column;height:100%}.editor-inserter-sidebar__content{height:100%}.editor-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.editor-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.editor-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.editor-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.editor-keyboard-shortcut-help-modal__shortcut:empty{display:none}.editor-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 1rem 0 0;text-align:left}.editor-keyboard-shortcut-help-modal__shortcut-description{flex:1;margin:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination+.editor-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.editor-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.editor-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 .2rem 0 0}.editor-list-view-sidebar{height:100%}@media (min-width:782px){.editor-list-view-sidebar{width:350px}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{height:100%}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar{height:12px;width:12px}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-track,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-track{background-color:initial}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.editor-list-view-sidebar__list-view-container>.document-outline:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:hover::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:hover::-webkit-scrollbar-thumb{background-color:#949494}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.editor-list-view-sidebar__list-view-container>.document-outline:focus,.editor-list-view-sidebar__list-view-container>.document-outline:focus-within,.editor-list-view-sidebar__list-view-container>.document-outline:hover,.editor-list-view-sidebar__list-view-panel-content:focus,.editor-list-view-sidebar__list-view-panel-content:focus-within,.editor-list-view-sidebar__list-view-panel-content:hover{scrollbar-color:#949494 #0000}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{will-change:transform}@media (hover:none){.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#949494 #0000}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{overflow:auto;padding:4px;scrollbar-gutter:auto}.editor-list-view-sidebar__list-view-container{display:flex;flex-direction:column;height:100%}.editor-list-view-sidebar__tab-panel{height:100%}.editor-list-view-sidebar__outline{border-bottom:1px solid #ddd;display:flex;flex-direction:column;gap:8px;padding:16px}.editor-list-view-sidebar__outline>div>span:first-child{display:inline-block;width:90px}.editor-list-view-sidebar__outline>div>span{color:#757575;font-size:12px;line-height:1.4}.editor-post-order__panel,.editor-post-parent__panel{padding-top:8px}.editor-post-order__panel .editor-post-panel__row-control>div,.editor-post-parent__panel .editor-post-panel__row-control>div{width:100%}.editor-post-order__panel-dialog .editor-post-order,.editor-post-order__panel-dialog .editor-post-parent,.editor-post-parent__panel-dialog .editor-post-order,.editor-post-parent__panel-dialog .editor-post-parent{margin:8px}.editor-post-order__panel-dialog .components-popover__content,.editor-post-parent__panel-dialog .components-popover__content{min-width:320px}.editor-post-author__panel{padding-top:8px}.editor-post-author__panel .editor-post-panel__row-control>div{width:100%}.editor-post-author__panel-dialog .editor-post-author{margin:8px;min-width:248px}.editor-action-modal{z-index:1000001}.editor-post-card-panel__content{flex-grow:1}.editor-post-card-panel__title{width:100%}.editor-post-card-panel__title.editor-post-card-panel__title{align-items:center;column-gap:8px;display:flex;flex-wrap:wrap;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:500;line-height:20px;margin:0;row-gap:4px;word-break:break-word}.editor-post-card-panel__icon{flex:0 0 24px;height:24px;width:24px}.editor-post-card-panel__header{display:flex;justify-content:space-between}.editor-post-card-panel.has-description .editor-post-card-panel__header{margin-bottom:8px}.editor-post-card-panel .editor-post-card-panel__title-name{padding:2px 0}.editor-post-card-panel .editor-post-card-panel__description,.editor-post-content-information{color:#757575}.editor-post-content-information .components-text{color:inherit}.editor-post-discussion__panel-dialog .editor-post-discussion{margin:8px;min-width:248px}.editor-post-discussion__panel-toggle .components-text{color:inherit}.editor-post-discussion__panel-dialog .components-popover__content{min-width:320px}.editor-post-excerpt__textarea{margin-bottom:10px;width:100%}.editor-post-excerpt__dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-featured-image{padding:0}.editor-post-featured-image .hidden{display:none}.editor-post-featured-image .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.editor-post-featured-image__container{position:relative}.editor-post-featured-image__container:focus .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:focus-within .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:hover .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image){opacity:1}.editor-post-featured-image__container .editor-post-featured-image__actions.editor-post-featured-image__actions-missing-image{margin-top:16px;opacity:1}.editor-post-featured-image__container .components-drop-zone__content{border-radius:2px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner{align-items:center;display:flex;gap:8px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner .components-drop-zone__content-icon{margin:0}.editor-post-featured-image__preview,.editor-post-featured-image__toggle{box-shadow:0 0 0 0 var(--wp-admin-theme-color);display:flex;justify-content:center;min-height:40px;outline-offset:-1px;overflow:hidden;padding:0;width:100%}.editor-post-featured-image__preview{height:auto!important;outline:1px solid #0000001a}.editor-post-featured-image__preview .editor-post-featured-image__preview-image{aspect-ratio:2/1;object-fit:cover;object-position:50% 50%;width:100%}.editor-post-featured-image__toggle{box-shadow:inset 0 0 0 1px #ccc}.editor-post-featured-image__toggle:focus:not(:disabled){box-shadow:0 0 0 currentColor inset,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){bottom:0;opacity:0;padding:8px;position:absolute}@media not (prefers-reduced-motion){.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){transition:opacity 50ms ease-out}}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image) .editor-post-featured-image__action{backdrop-filter:blur(16px) saturate(180%);background:#ffffffbf}.editor-post-featured-image__actions .editor-post-featured-image__action{flex-grow:1;justify-content:center}[class].editor-post-format__suggestion{margin:4px 0 0}.editor-post-format__dialog .editor-post-format__dialog-content{margin:8px;min-width:248px}.editor-post-last-edited-panel{color:#757575}.editor-post-last-edited-panel .components-text{color:inherit}.editor-post-last-revision__title{font-weight:500;width:100%}.editor-post-last-revision__title.components-button.has-icon{height:100%;justify-content:space-between}.editor-post-last-revision__title.components-button.has-icon:active,.editor-post-last-revision__title.components-button.has-icon:hover{background:#f0f0f0}.editor-post-last-revision__title.components-button.has-icon:focus{border-radius:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-panel__body.is-opened.editor-post-last-revision__panel{height:48px;padding:0}.components-panel__body.is-opened.editor-post-last-revision__panel .editor-post-last-revision__title.components-button.components-button{padding:16px}.editor-private-post-last-revision__button{display:inline-block}.editor-post-locked-modal__buttons{margin-top:24px}.editor-post-locked-modal__avatar{border-radius:50%;margin-top:16px;min-width:auto!important}.editor-post-panel__row{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.editor-post-panel__row-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;padding:6px 0;width:38%}.editor-post-panel__row-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.editor-post-panel__row-control .components-button{height:auto;max-width:100%;min-height:32px;text-align:right;text-wrap:balance;text-wrap:pretty;white-space:normal}.editor-post-panel__row-control .components-dropdown{max-width:100%}.editor-post-panel__section{padding:16px}.editor-post-publish-panel__content{min-height:calc(100% - 148px)}.editor-post-publish-panel__content>.components-spinner{display:block;margin:100px auto 0}.editor-post-publish-panel__header{align-content:space-between;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;height:65px;padding-left:16px;padding-right:16px}.editor-post-publish-panel__header .components-button{justify-content:center;width:100%}.editor-post-publish-panel__header .has-icon{margin-right:auto;width:auto}.components-site-card{align-items:center;display:flex;margin:16px 0}.components-site-icon{border:none;border-radius:2px;flex-shrink:0;height:36px;margin-left:12px;width:36px}.components-site-name{display:block;font-size:14px}.components-site-home{color:#757575;display:block;font-size:12px;word-break:break-word}.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{flex:1}@media (min-width:480px){.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{max-width:160px}}.editor-post-publish-panel__header-publish-button{justify-content:center;padding-right:4px}.editor-post-publish-panel__header-cancel-button{padding-left:4px}.editor-post-publish-panel__header-published{flex-grow:1}.editor-post-publish-panel__footer{padding:16px}.components-button.editor-post-publish-panel__toggle.is-primary{align-items:center;display:inline-flex}.components-button.editor-post-publish-panel__toggle.is-primary.is-busy .dashicon{display:none}.components-button.editor-post-publish-panel__toggle.is-primary .dashicon{margin-left:-4px}.editor-post-publish-panel__link{font-weight:400;padding-right:4px}.editor-post-publish-panel__prepublish{padding:16px}.editor-post-publish-panel__prepublish strong{color:#1e1e1e}.editor-post-publish-panel__prepublish .components-panel__body{background:#fff;margin-left:-16px;margin-right:-16px}.editor-post-publish-panel__prepublish .editor-post-visibility__dialog-legend{display:none}.editor-post-publish-panel__prepublish .components-panel__body-title .components-button{align-items:flex-start;text-wrap:balance;text-wrap:pretty}.post-publish-panel__postpublish .components-panel__body{border-bottom:1px solid #e0e0e0;border-top:none;word-break:break-word}.post-publish-panel__postpublish-buttons{align-content:space-between;display:flex;flex-wrap:wrap;gap:16px}.post-publish-panel__postpublish-buttons .components-button,.post-publish-panel__postpublish-buttons .components-button.has-icon{flex:1;justify-content:center;min-width:unset}.post-publish-panel__postpublish-buttons .components-clipboard-button{width:100%}.post-publish-panel__postpublish-post-address-container{align-items:flex-end;display:flex;margin-bottom:16px}.post-publish-panel__postpublish-post-address-container .post-publish-panel__postpublish-post-address{flex:1}.post-publish-panel__postpublish-post-address-container input[readonly]{background:#f0f0f0;border-color:#ccc;height:36px;overflow:hidden;padding:12px;text-overflow:ellipsis}.post-publish-panel__postpublish-post-address__copy-button-wrap{flex-shrink:0;margin-right:16px}.post-publish-panel__postpublish-header{font-weight:500}.post-publish-panel__postpublish-subheader{margin:0 0 8px}.post-publish-panel__tip{color:#f0b849}@media screen and (max-width:782px){.post-publish-panel__postpublish-post-address__button-wrap .components-button{height:40px}}.editor-post-publish-panel{box-sizing:border-box}.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}.editor-post-publish-panel{background:#fff;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.editor-post-publish-panel{border-right:1px solid #ddd;right:auto;top:32px;width:281px;z-index:99998}}@media (min-width:782px) and (not (prefers-reduced-motion)){.editor-post-publish-panel{animation:editor-post-publish-panel__slide-in-animation .1s forwards;transform:translateX(-100%)}}@media (min-width:782px){body.is-fullscreen-mode .editor-post-publish-panel{top:0}[role=region]:focus .editor-post-publish-panel{transform:translateX(0)}}@keyframes editor-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.editor-post-saved-state{align-items:center;color:#757575;display:flex;overflow:hidden;padding:12px 4px;white-space:nowrap;width:28px}.editor-post-saved-state.is-saved[aria-disabled=true],.editor-post-saved-state.is-saved[aria-disabled=true]:hover,.editor-post-saved-state.is-saving[aria-disabled=true],.editor-post-saved-state.is-saving[aria-disabled=true]:hover{background:#0000;color:#757575}.editor-post-saved-state svg{display:inline-block;flex:0 0 auto;fill:currentColor;margin-left:8px}@media (min-width:600px){.editor-post-saved-state{padding:8px 12px;text-indent:inherit;width:auto}.editor-post-saved-state svg{margin-left:0}}.editor-post-save-draft.has-text.has-icon svg{margin-left:0}.editor-post-schedule__panel-dropdown{width:100%}.editor-post-schedule__dialog .components-popover__content{min-width:320px;padding:16px}.editor-post-status{max-width:100%}.editor-post-status.is-read-only{padding:6px 12px}.editor-post-status .editor-post-status__toggle.editor-post-status__toggle{padding-bottom:4px;padding-top:4px}.editor-change-status__password-fieldset,.editor-change-status__publish-date-wrapper{border-top:1px solid #e0e0e0;padding-top:16px}.editor-change-status__content .components-popover__content{min-width:320px;padding:16px}.editor-change-status__content .editor-change-status__password-legend{margin-bottom:8px;padding:0}.editor-change-status__content p.components-base-control__help:has(.components-checkbox-control__help){margin-top:4px}.editor-post-sticky__checkbox-control{border-top:1px solid #e0e0e0;padding-top:16px}.editor-post-sync-status__value{padding:6px 12px 6px 0}.editor-post-taxonomies__hierarchical-terms-list{margin-right:-6px;margin-top:-6px;max-height:14em;overflow:auto;padding-right:6px;padding-top:6px}.editor-post-taxonomies__hierarchical-terms-choice{margin-bottom:8px}.editor-post-taxonomies__hierarchical-terms-choice:last-child{margin-bottom:4px}.editor-post-taxonomies__hierarchical-terms-subchoices{margin-right:16px;margin-top:8px}.editor-post-taxonomies__flat-term-most-used .editor-post-taxonomies__flat-term-most-used-label{margin-bottom:4px}.editor-post-taxonomies__flat-term-most-used-list{margin:0}.editor-post-taxonomies__flat-term-most-used-list li{display:inline-block;margin-left:8px}.editor-post-template__swap-template-modal{z-index:1000001}.editor-post-template__swap-template-modal .editor-post-template__swap-template-search{background:#fff;margin-bottom:-4px;padding:16px 0;position:sticky;top:0;transform:translateY(-4px);z-index:2}.editor-post-template__create-template-modal{z-index:1000001}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px;padding-top:2px}@media (min-width:782px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:4}}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-post-template__dropdown .components-popover__content{min-width:240px}.editor-post-template__dropdown .components-button.is-pressed,.editor-post-template__dropdown .components-button.is-pressed:hover{background:inherit;color:inherit}@media (min-width:782px){.editor-post-template__create-form{width:320px}}.editor-post-template__classic-theme-dropdown{padding:8px}textarea.editor-post-text-editor{border:1px solid #949494;border-radius:0;box-shadow:none;display:block;font-family:Menlo,Consolas,monaco,monospace;line-height:2.4;margin:0;min-height:200px;overflow:hidden;resize:none;width:100%}@media not (prefers-reduced-motion){textarea.editor-post-text-editor{transition:border .1s ease-out,box-shadow .1s linear}}textarea.editor-post-text-editor{padding:16px}@media (min-width:600px){textarea.editor-post-text-editor{padding:24px}}textarea.editor-post-text-editor{font-size:16px!important}@media (min-width:600px){textarea.editor-post-text-editor{font-size:15px!important}}textarea.editor-post-text-editor:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);position:relative}textarea.editor-post-text-editor::-webkit-input-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor::-moz-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor:-ms-input-placeholder{color:#1e1e1e9e}.editor-post-title.is-raw-text{margin-bottom:24px;margin-top:2px;max-width:none}.editor-post-url__panel-dropdown{width:100%}.editor-post-url__panel-dialog .editor-post-url{margin:8px;min-width:248px}.editor-post-url__front-page-link,.editor-post-url__link{direction:ltr;word-break:break-word}.editor-post-url__front-page-link{border-radius:2px;color:var(--wp-admin-theme-color);padding:6px 12px}.editor-post-url__front-page-link:hover{background:color-mix(in srgb,var(--wp-admin-theme-color) 4%,#0000);color:var(--wp-admin-theme-color-darker-20,#183ad6)}.editor-post-url__front-page-link:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);color:var(--wp-admin-theme-color);outline:3px solid #0000}.editor-post-url__link-slug{font-weight:600}.editor-post-url__input input.components-input-control__input{padding-inline-start:0!important}.editor-post-parent__panel-toggle,.editor-post-url__panel-toggle{word-break:break-word}.editor-post-url__intro{margin:0}.editor-post-url__permalink{margin-bottom:0;margin-top:8px}.editor-post-url__permalink-visual-label{display:block}.editor-posts-per-page-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-trash.components-button{flex-grow:1;justify-content:center}.editor-preview-dropdown .editor-preview-dropdown__toggle.has-icon.has-text{padding-left:4px;padding-right:6px}.editor-preview-dropdown__button-external{display:flex;justify-content:space-between;width:100%}.editor-resizable-editor.is-resizable{margin:0 auto;overflow:visible}.editor-resizable-editor__resize-handle{appearance:none;background:none;border:0;border-radius:9999px;bottom:0;cursor:ew-resize;height:100px;margin:auto 0;outline:none;padding:0;position:absolute;top:0;width:12px}.editor-resizable-editor__resize-handle:after{background-color:#75757566;border-radius:9999px;bottom:16px;content:"";left:0;position:absolute;right:4px;top:16px;width:4px}.editor-resizable-editor__resize-handle.is-left{right:-18px}.editor-resizable-editor__resize-handle.is-right{left:-18px}.editor-resizable-editor__resize-handle:active,.editor-resizable-editor__resize-handle:focus,.editor-resizable-editor__resize-handle:hover{opacity:1}.editor-resizable-editor__resize-handle:active:after,.editor-resizable-editor__resize-handle:focus:after,.editor-resizable-editor__resize-handle:hover:after{background-color:var(--wp-admin-theme-color)}.editor-layout__toggle-entities-saved-states-panel,.editor-layout__toggle-publish-panel,.editor-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:0;padding:24px;position:fixed!important;right:auto;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .editor-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-publish-panel{bottom:0;top:auto}.editor-start-page-options__modal .editor-start-page-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-page-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}.editor-start-template-options__modal .editor-start-template-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-template-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-patterns-list__item-title{display:none}.components-panel__header.editor-sidebar__panel-tabs{padding-left:8px;padding-right:0}.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{padding:0}@media (min-width:782px){.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{display:flex}}.editor-post-summary .components-v-stack:empty{display:none}.editor-sidebar{box-sizing:border-box}.editor-sidebar *,.editor-sidebar :after,.editor-sidebar :before{box-sizing:inherit}.editor-site-discussion-dropdown__content .components-popover__content{min-width:320px;padding:16px}.table-of-contents__popover.components-popover .components-popover__content{min-width:380px}.components-popover.table-of-contents__popover{z-index:99998}.table-of-contents__popover .components-popover__content{padding:16px}@media (min-width:600px){.table-of-contents__popover .components-popover__content{max-height:calc(100vh - 120px);overflow-y:auto}}.table-of-contents__popover hr{margin:10px -16px 0}.table-of-contents__wrapper:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}.table-of-contents__counts{display:flex;flex-wrap:wrap;margin:-8px 0 0}.table-of-contents__count{color:#1e1e1e;display:flex;flex-basis:33%;flex-direction:column;font-size:13px;margin-bottom:0;margin-top:8px;padding-left:8px}.table-of-contents__count:nth-child(4n){padding-left:0}.table-of-contents__number,.table-of-contents__popover .word-count{color:#1e1e1e;font-size:21px;font-weight:400;line-height:30px}.table-of-contents__title{display:block;font-size:15px;font-weight:600;margin-top:20px}.editor-text-editor{box-sizing:border-box}.editor-text-editor *,.editor-text-editor :after,.editor-text-editor :before{box-sizing:inherit}.editor-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.editor-text-editor .editor-post-title.is-raw-text textarea:focus,.editor-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.editor-text-editor__body{padding:0 24px 24px}}.editor-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.editor-text-editor__toolbar{padding:12px}}@media (min-width:960px){.editor-text-editor__toolbar{padding:12px 24px}}.editor-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:40px;margin:0 0 0 auto}.editor-visual-editor{background-color:var(--wp-editor-canvas-background);display:flex;position:relative}.editor-visual-editor iframe[name=editor-canvas]{background-color:initial}.editor-visual-editor{align-items:center}.editor-visual-editor.is-resizable{max-height:100%}.editor-visual-editor.has-padding{padding:24px 24px 0}.editor-visual-editor.is-iframed{overflow:hidden}.editor-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.editor-visual-editor .components-button.has-icon,.editor-visual-editor .components-button.is-tertiary{padding:6px}.editor-fields-content-preview{border-radius:4px;display:flex;flex-direction:column;height:100%}.dataviews-view-table .editor-fields-content-preview{flex-grow:0;width:96px}.editor-fields-content-preview .block-editor-block-preview__container,.editor-fields-content-preview .editor-fields-content-preview__empty{margin-bottom:auto;margin-top:auto}.editor-fields-content-preview__empty{text-align:center}
\ No newline at end of file
+@charset "UTF-8";:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.interface-complementary-area-header{background:#fff;gap:4px;padding-left:8px}.interface-complementary-area-header .interface-complementary-area-header__title{margin:0 0 0 auto}.interface-complementary-area{background:#fff;color:#1e1e1e;height:100%;overflow:auto}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs{top:0}.interface-complementary-area p:not(.components-base-control__help,.components-form-token-field__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;font-weight:500;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:10px;right:auto;top:auto}.interface-complementary-area__fill{height:100%}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-right:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container:not(:has(.is-zoom-out)){position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;left:0;max-height:100%;position:fixed;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{right:0}@media (min-width:783px){.interface-interface-skeleton{right:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{right:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{right:160px}}.folded .interface-interface-skeleton{right:0}@media (min-width:783px){.folded .interface-interface-skeleton{right:36px}}body.is-fullscreen-mode .interface-interface-skeleton{right:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none;position:relative}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;position:absolute;right:0;top:0;width:auto;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important}}.interface-interface-skeleton__sidebar{border-top:1px solid #e0e0e0;overflow:hidden}@media (min-width:782px){.interface-interface-skeleton__sidebar{box-shadow:1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__secondary-sidebar{border-top:1px solid #e0e0e0;left:0}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar{box-shadow:-1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);color:#1e1e1e;flex-shrink:0;height:auto;outline:1px solid #0000;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;position:absolute;right:0;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:0;position:fixed!important;right:auto;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-right:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-pinned-items{display:flex}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.interface-pinned-items{gap:8px}.editor-autocompleters__user .editor-autocompleters__no-avatar:before{content:"\f110";font:normal 20px/1 dashicons;margin-left:5px;vertical-align:middle}.editor-autocompleters__user .editor-autocompleters__user-avatar{flex-grow:0;flex-shrink:0;height:24px;margin-left:8px;max-width:none;width:24px}.editor-autocompleters__user .editor-autocompleters__user-name{flex-grow:1;flex-shrink:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user .editor-autocompleters__user-slug{flex-grow:0;flex-shrink:0;margin-right:8px;max-width:100px;overflow:none;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user:not(.is-primary) .editor-autocompleters__user-slug{color:#757575}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar){box-shadow:none}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar) .interface-complementary-area-header{display:none}.editor-collab-sidebar{height:100%;overflow:hidden}.editor-collab-sidebar-panel{height:100%;overflow:hidden;padding:16px 16px 24px}.editor-collab-sidebar-panel__thread{background-color:#f0f0f0;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:16px;position:relative;width:auto}.editor-collab-sidebar-panel__thread.is-selected{background-color:#fff;box-shadow:0 2px 3px #0000000d,0 4px 5px #0000000a,0 12px 12px #00000008,0 16px 16px #00000005;z-index:1}.editor-collab-sidebar-panel__thread:focus{outline:var(--wp-admin-border-width-focus) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-1)}.editor-collab-sidebar-panel__thread.is-floating{left:16px;margin-top:16px;position:absolute;right:16px}.editor-collab-sidebar-panel__user-name{text-transform:capitalize}.editor-collab-sidebar-panel__user-name,.editor-collab-sidebar-panel__user-time{color:#757575;font-size:12px;font-weight:400;line-height:16px;text-align:right}.editor-collab-sidebar-panel__user-comment p:last-child{margin-bottom:0}.editor-collab-sidebar-panel__user-avatar{background:#fff;border-radius:50%;border-style:solid;border-width:var(--wp-admin-border-width-focus);flex-shrink:0;padding:var(--wp-admin-border-width-focus)}.editor-collab-sidebar-panel__comment-status{margin-right:auto}.editor-collab-sidebar-panel__comment-status button.has-icon:not(.has-text){flex-shrink:0;height:24px;min-width:24px;padding:0;width:24px}.editor-collab-sidebar-panel__comment-dropdown-menu{flex-shrink:0}.editor-collab-sidebar-panel__more-reply-separator:after,.editor-collab-sidebar-panel__more-reply-separator:before{background-color:#ddd;content:"";display:block;flex:1;height:1px;width:100%}.editor-collab-sidebar-panel__more-reply-button{font-weight:500}.editor-collab-sidebar-panel__resolution-text{font-style:italic}.editor-collab-sidebar-panel__comment-form textarea{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.editor-collab-sidebar-panel__comment-form textarea{transition:box-shadow .1s linear}}@media (min-width:600px){.editor-collab-sidebar-panel__comment-form textarea{font-size:13px;line-height:normal}}.editor-collab-sidebar-panel__comment-form textarea:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.editor-collab-sidebar-panel__comment-form textarea::-webkit-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea::-moz-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea:-ms-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea{display:block;line-height:20px!important;padding:9px 11px}.editor-collab-sidebar-panel__skip-to-block,.editor-collab-sidebar-panel__skip-to-comment{background:#fff!important;clip-path:inset(50%);left:-9999px;overflow:hidden;position:absolute;top:-9999px;z-index:-1}.editor-collab-sidebar-panel__skip-to-block:focus,.editor-collab-sidebar-panel__skip-to-comment:focus{clip-path:none;left:8px;overflow:visible;z-index:1}.editor-collab-sidebar-panel__skip-to-comment:focus{top:8px}.editor-collab-sidebar-panel__skip-to-block:focus{bottom:8px;top:auto}.comment-avatar{background:#fff;border-radius:50%;border-style:solid;border-width:var(--wp-admin-border-width-focus);margin-right:-12px;padding:var(--wp-admin-border-width-focus);width:24px}.comment-avatar:first-child{margin-right:0}.editor-collapsible-block-toolbar{align-items:center;display:flex;height:64px;overflow:hidden}.editor-collapsible-block-toolbar .block-editor-block-contextual-toolbar{background:#0000;border-bottom:0;height:100%}.editor-collapsible-block-toolbar .block-editor-block-toolbar{height:100%;padding-top:17px}.editor-collapsible-block-toolbar .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.editor-collapsible-block-toolbar:after{background-color:#ddd;content:"";height:24px;margin-left:7px;width:1px}.editor-collapsible-block-toolbar .components-toolbar,.editor-collapsible-block-toolbar .components-toolbar-group{border-left:none;position:relative}.editor-collapsible-block-toolbar .components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar:after{background-color:#ddd;content:"";height:24px;left:-1px;position:absolute;top:4px;width:1px}.editor-collapsible-block-toolbar .components-toolbar .components-toolbar-group.components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.editor-collapsible-block-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.editor-collapsible-block-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{height:40px;position:relative;top:-4px}}.editor-collapsible-block-toolbar.is-collapsed{display:none}.editor-content-only-settings-menu__description{min-width:235px;padding:8px}.editor-block-visibility__disabled-blocks-count{background-color:#fff;border:1px solid #ddd;border-width:1px 0;box-shadow:32px 0 0 0 #fff,-32px 0 0 0 #fff;padding:8px;position:sticky;text-align:center;top:-5px;z-index:2}.editor-block-visibility__disabled-blocks-count~.block-editor-block-manager__content .block-editor-block-manager__category-title{top:31px}.editor-block-visibility__disabled-blocks-count .is-link{margin-right:12px}.editor-blog-title-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-document-bar{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;height:32px;justify-content:space-between;min-width:0;width:min(100%,450px)}.editor-document-bar:hover{background-color:#e0e0e0}.editor-document-bar .components-button{border-radius:4px}@media not (prefers-reduced-motion){.editor-document-bar .components-button{transition:all .1s ease-out}}.editor-document-bar .components-button:hover{background:#e0e0e0}@media screen and (min-width:782px) and (max-width:960px){.editor-document-bar.has-back-button .editor-document-bar__post-type-label{display:none}}.editor-document-bar__command{color:var(--wp-block-synced-color);flex-grow:1;overflow:hidden}.editor-document-bar__title{color:#1e1e1e;margin:0 auto;max-width:70%;overflow:hidden}@media (min-width:782px){.editor-document-bar__title{padding-right:24px}}.editor-document-bar__title h1{align-items:center;display:flex;font-weight:400;justify-content:center;overflow:hidden;white-space:nowrap}.editor-document-bar__post-title{color:currentColor;flex:1;overflow:hidden;text-overflow:ellipsis}.editor-document-bar__post-type-label{color:#2f2f2f;flex:0;padding-right:4px}@media screen and (max-width:600px){.editor-document-bar__post-type-label{display:none}}.editor-document-bar__shortcut{color:#2f2f2f;display:none;min-width:24px}@media (min-width:782px){.editor-document-bar__shortcut{display:initial}}.editor-document-bar__back.components-button.has-icon.has-text{color:#757575;flex-shrink:0;gap:0;min-width:36px;position:absolute;z-index:1}.editor-document-bar__back.components-button.has-icon.has-text:hover{background-color:initial;color:#1e1e1e}.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:none;margin-right:12px;pointer-events:none;position:absolute}.editor-document-bar__icon-layout.editor-document-bar__icon-layout svg{fill:#949494}@media (min-width:600px){.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:flex}}.document-outline{margin:20px 0}.document-outline ul{margin:0;padding:0}.document-outline__item{display:flex;margin:4px 0}.document-outline__item a{text-decoration:none}.document-outline__item .document-outline__emdash:before{color:#ddd;margin-left:4px}.document-outline__item.is-h2 .document-outline__emdash:before{content:"—"}.document-outline__item.is-h3 .document-outline__emdash:before{content:"——"}.document-outline__item.is-h4 .document-outline__emdash:before{content:"———"}.document-outline__item.is-h5 .document-outline__emdash:before{content:"————"}.document-outline__item.is-h6 .document-outline__emdash:before{content:"—————"}.document-outline__button{align-items:flex-start;background:none;border:none;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;margin:0 -1px 0 0;padding:2px 1px 2px 5px;text-align:right}.document-outline__button:disabled,.document-outline__button[aria-disabled=true]{color:#757575;cursor:default}.document-outline__button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.document-outline__level{background:#ddd;border-radius:3px;color:#1e1e1e;font-size:13px;margin-left:4px;padding:1px 6px}.is-invalid .document-outline__level{background:#f0b849}.document-outline__item-content{padding:1px 0}.editor-document-outline.has-no-headings>svg{margin-top:28px}.editor-document-outline.has-no-headings>p{padding-left:32px;padding-right:32px}.editor-document-outline.has-no-headings{color:#757575;text-align:center}.editor-document-tools{align-items:center;display:inline-flex}.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:none}@media (min-width:782px){.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:inline-flex}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle{display:inline-flex}@media not (prefers-reduced-motion){.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle svg{transition:transform .2s cubic-bezier(.165,.84,.44,1)}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.is-pressed svg{transform:rotate(-45deg)}.editor-document-tools .block-editor-list-view{display:none}@media (min-width:600px){.editor-document-tools .block-editor-list-view{display:flex}}.editor-document-tools .editor-document-tools__left>.components-button.has-icon,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon{height:32px;min-width:32px;padding:4px}.editor-document-tools .editor-document-tools__left>.components-button.has-icon.is-pressed,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon.is-pressed{background:#1e1e1e}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:focus:not(:disabled),.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 1px #fff;outline:1px solid #0000}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:before,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:before{display:none}.editor-document-tools__left{align-items:center;display:inline-flex;gap:8px}.editor-document-tools__left:not(:last-child){margin-inline-end:8px}.show-icon-labels .editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.has-icon{padding:0 8px;width:auto}.show-icon-labels .editor-document-tools__left>*+*{margin-right:8px}.editor-editor-interface .entities-saved-states__panel-header{height:65px}.editor-editor-interface .interface-interface-skeleton__content{isolation:isolate}.editor-visual-editor{flex:1 0 auto}.components-editor-notices__dismissible,.components-editor-notices__pinned{color:#1e1e1e;left:0;position:relative;right:0;top:0}.components-editor-notices__dismissible .components-notice,.components-editor-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-editor-notices__dismissible .components-notice .components-notice__dismiss,.components-editor-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}.entities-saved-states__panel-header{background:#fff;border-bottom:1px solid #ddd;box-sizing:border-box;height:64px;padding-left:16px;padding-right:16px}.entities-saved-states__text-prompt{padding:16px 16px 4px}.entities-saved-states__text-prompt .entities-saved-states__text-prompt--header{display:block;margin-bottom:12px}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt{padding:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body{border:0;padding-left:0;padding-right:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2{margin-bottom:0;margin-left:-16px;margin-right:-16px}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2 button{font-size:11px;text-transform:uppercase}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--header-wrapper{display:none}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--changes-count{margin-bottom:8px;margin-top:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-footer{margin-top:16px}.entities-saved-states__change-control{flex:1}.entities-saved-states__changes{font-size:13px;list-style:disc;margin:4px 24px 0 16px}.entities-saved-states__changes li{margin-bottom:4px}.editor-error-boundary{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:64px auto auto;max-width:780px;padding:1em}.editor-header{box-sizing:border-box}.editor-header *,.editor-header :after,.editor-header :before{box-sizing:inherit}.editor-header{background:#fff;display:grid;grid-auto-flow:row;grid-template:auto/64px minmax(0,max-content) minmax(min-content,1fr) 64px;height:64px}.editor-header:has(>.editor-header__center){grid-template:auto/64px min-content 1fr min-content 64px}@media (min-width:782px){.editor-header:has(>.editor-header__center){grid-template:auto/64px minmax(min-content,2fr) 2.5fr minmax(min-content,2fr) 64px}}@media (min-width:480px){.editor-header{gap:16px}}.editor-header{align-items:center;justify-content:space-between;max-width:100vw}@media (min-width:280px){.editor-header{flex-wrap:nowrap}}.editor-header__toolbar{grid-column:1/3}.editor-header__toolbar>:first-child{margin-inline:16px 0}.editor-header__back-button+.editor-header__toolbar{grid-column:2/3}@media (min-width:480px){.editor-header__back-button+.editor-header__toolbar>:first-child{margin-inline:0}}.editor-header__toolbar{align-items:center;clip-path:inset(-2px);display:flex;min-width:0}@media (min-width:480px){.editor-header__toolbar{clip-path:none}}.editor-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.editor-header__toolbar .table-of-contents{display:block}}.editor-header__toolbar .editor-collapsible-block-toolbar,.editor-header__toolbar .editor-collapsible-block-toolbar.is-collapsed~.editor-collapsible-block-toolbar__toggle{margin-inline:8px 0}.editor-header__center{align-items:center;clip-path:inset(-2px);display:flex;grid-column:3/4;justify-content:center;min-width:0}@media (max-width:479px){.editor-header__center>:first-child{margin-inline-start:8px}.editor-header__center>:last-child{margin-inline-end:8px}}.editor-header__settings{grid-column:3/-1}.editor-header:has(>.editor-header__center) .editor-header__settings{grid-column:4/-1}.editor-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;justify-self:end;padding-left:4px}@media (min-width:600px){.editor-header__settings{padding-left:8px}}.editor-header__settings{gap:8px}.show-icon-labels .editor-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.show-icon-labels .editor-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.show-icon-labels .editor-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label);white-space:nowrap}.show-icon-labels .editor-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.show-icon-labels .editor-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.show-icon-labels .editor-header .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg{display:block}.show-icon-labels .editor-header .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after{content:none}.show-icon-labels .editor-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.show-icon-labels .editor-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .editor-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover{border-right:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-right:8px;margin-top:4px;width:1px}.show-icon-labels .editor-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;right:calc(50% + 1px);width:calc(100% - 24px)}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 8px 6px 6px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-right:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-left:8px}@media (min-width:480px){.editor-header__post-preview-button{display:none}}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.editor-editor-interface.is-distraction-free .editor-header{background-color:#fff;width:100%}@media (min-width:782px){.editor-editor-interface.is-distraction-free .editor-header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);position:absolute}}.editor-editor-interface.is-distraction-free .editor-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-preview-dropdown,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-zoom-out-toggle,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.interface-pinned-items,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__toolbar .editor-document-tools__document-overview-toggle{display:none}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.editor-editor-interface.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.components-popover.more-menu-dropdown__content{z-index:99998}.editor-inserter-sidebar{box-sizing:border-box}.editor-inserter-sidebar *,.editor-inserter-sidebar :after,.editor-inserter-sidebar :before{box-sizing:inherit}.editor-inserter-sidebar{display:flex;flex-direction:column;height:100%}.editor-inserter-sidebar__content{height:100%}.editor-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.editor-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.editor-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.editor-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.editor-keyboard-shortcut-help-modal__shortcut:empty{display:none}.editor-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 1rem 0 0;text-align:left}.editor-keyboard-shortcut-help-modal__shortcut-description{flex:1;margin:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination+.editor-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.editor-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.editor-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 .2rem 0 0}.editor-list-view-sidebar{height:100%}@media (min-width:782px){.editor-list-view-sidebar{width:350px}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{height:100%}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar{height:12px;width:12px}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-track,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-track{background-color:initial}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.editor-list-view-sidebar__list-view-container>.document-outline:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:hover::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:hover::-webkit-scrollbar-thumb{background-color:#949494}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.editor-list-view-sidebar__list-view-container>.document-outline:focus,.editor-list-view-sidebar__list-view-container>.document-outline:focus-within,.editor-list-view-sidebar__list-view-container>.document-outline:hover,.editor-list-view-sidebar__list-view-panel-content:focus,.editor-list-view-sidebar__list-view-panel-content:focus-within,.editor-list-view-sidebar__list-view-panel-content:hover{scrollbar-color:#949494 #0000}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{will-change:transform}@media (hover:none){.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#949494 #0000}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{overflow:auto;padding:4px;scrollbar-gutter:auto}.editor-list-view-sidebar__list-view-container{display:flex;flex-direction:column;height:100%}.editor-list-view-sidebar__tab-panel{height:100%}.editor-list-view-sidebar__outline{border-bottom:1px solid #ddd;display:flex;flex-direction:column;gap:8px;padding:16px}.editor-list-view-sidebar__outline>div>span:first-child{display:inline-block;width:90px}.editor-list-view-sidebar__outline>div>span{color:#757575;font-size:12px;line-height:1.4}.editor-post-order__panel,.editor-post-parent__panel{padding-top:8px}.editor-post-order__panel .editor-post-panel__row-control>div,.editor-post-parent__panel .editor-post-panel__row-control>div{width:100%}.editor-post-order__panel-dialog .editor-post-order,.editor-post-order__panel-dialog .editor-post-parent,.editor-post-parent__panel-dialog .editor-post-order,.editor-post-parent__panel-dialog .editor-post-parent{margin:8px}.editor-post-order__panel-dialog .components-popover__content,.editor-post-parent__panel-dialog .components-popover__content{min-width:320px}.editor-post-author__panel{padding-top:8px}.editor-post-author__panel .editor-post-panel__row-control>div{width:100%}.editor-post-author__panel-dialog .editor-post-author{margin:8px;min-width:248px}.editor-action-modal{z-index:1000001}.editor-post-card-panel__content{flex-grow:1}.editor-post-card-panel__title{width:100%}.editor-post-card-panel__title.editor-post-card-panel__title{align-items:center;column-gap:8px;display:flex;flex-wrap:wrap;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:500;line-height:20px;margin:0;row-gap:4px;word-break:break-word}.editor-post-card-panel__icon{flex:0 0 24px;height:24px;width:24px}.editor-post-card-panel__header{display:flex;justify-content:space-between}.editor-post-card-panel.has-description .editor-post-card-panel__header{margin-bottom:8px}.editor-post-card-panel .editor-post-card-panel__title-name{padding:2px 0}.editor-post-card-panel .editor-post-card-panel__description,.editor-post-content-information{color:#757575}.editor-post-content-information .components-text{color:inherit}.editor-post-discussion__panel-dialog .editor-post-discussion{margin:8px;min-width:248px}.editor-post-discussion__panel-toggle .components-text{color:inherit}.editor-post-discussion__panel-dialog .components-popover__content{min-width:320px}.editor-post-excerpt__textarea{margin-bottom:10px;width:100%}.editor-post-excerpt__dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-featured-image{padding:0}.editor-post-featured-image .hidden{display:none}.editor-post-featured-image .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.editor-post-featured-image__container{position:relative}.editor-post-featured-image__container:focus .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:focus-within .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:hover .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image){opacity:1}.editor-post-featured-image__container .editor-post-featured-image__actions.editor-post-featured-image__actions-missing-image{margin-top:16px;opacity:1}.editor-post-featured-image__container .components-drop-zone__content{border-radius:2px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner{align-items:center;display:flex;gap:8px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner .components-drop-zone__content-icon{margin:0}.editor-post-featured-image__preview,.editor-post-featured-image__toggle{box-shadow:0 0 0 0 var(--wp-admin-theme-color);display:flex;justify-content:center;min-height:40px;outline-offset:-1px;overflow:hidden;padding:0;width:100%}.editor-post-featured-image__preview{height:auto!important;outline:1px solid #0000001a}.editor-post-featured-image__preview .editor-post-featured-image__preview-image{aspect-ratio:2/1;object-fit:cover;object-position:50% 50%;width:100%}.editor-post-featured-image__toggle{box-shadow:inset 0 0 0 1px #ccc}.editor-post-featured-image__toggle:focus:not(:disabled){box-shadow:0 0 0 currentColor inset,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){bottom:0;opacity:0;padding:8px;position:absolute}@media not (prefers-reduced-motion){.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){transition:opacity 50ms ease-out}}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image) .editor-post-featured-image__action{backdrop-filter:blur(16px) saturate(180%);background:#ffffffbf}.editor-post-featured-image__actions .editor-post-featured-image__action{flex-grow:1;justify-content:center}[class].editor-post-format__suggestion{margin:4px 0 0}.editor-post-format__dialog .editor-post-format__dialog-content{margin:8px;min-width:248px}.editor-post-last-edited-panel{color:#757575}.editor-post-last-edited-panel .components-text{color:inherit}.editor-post-last-revision__title{font-weight:500;width:100%}.editor-post-last-revision__title.components-button.has-icon{height:100%;justify-content:space-between}.editor-post-last-revision__title.components-button.has-icon:active,.editor-post-last-revision__title.components-button.has-icon:hover{background:#f0f0f0}.editor-post-last-revision__title.components-button.has-icon:focus{border-radius:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-panel__body.is-opened.editor-post-last-revision__panel{height:48px;padding:0}.components-panel__body.is-opened.editor-post-last-revision__panel .editor-post-last-revision__title.components-button.components-button{padding:16px}.editor-private-post-last-revision__button{display:inline-block}.editor-post-locked-modal__buttons{margin-top:24px}.editor-post-locked-modal__avatar{border-radius:50%;margin-top:16px;min-width:auto!important}.editor-post-panel__row{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.editor-post-panel__row-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;padding:6px 0;width:38%}.editor-post-panel__row-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.editor-post-panel__row-control .components-button{height:auto;max-width:100%;min-height:32px;text-align:right;text-wrap:balance;text-wrap:pretty;white-space:normal}.editor-post-panel__row-control .components-dropdown{max-width:100%}.editor-post-panel__section{padding:16px}.editor-post-publish-panel__content{min-height:calc(100% - 148px)}.editor-post-publish-panel__content>.components-spinner{display:block;margin:100px auto 0}.editor-post-publish-panel__header{align-content:space-between;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;height:65px;padding-left:16px;padding-right:16px}.editor-post-publish-panel__header .components-button{justify-content:center;width:100%}.editor-post-publish-panel__header .has-icon{margin-right:auto;width:auto}.components-site-card{align-items:center;display:flex;margin:16px 0}.components-site-icon{border:none;border-radius:2px;flex-shrink:0;height:36px;margin-left:12px;width:36px}.components-site-name{display:block;font-size:14px}.components-site-home{color:#757575;display:block;font-size:12px;word-break:break-word}.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{flex:1}@media (min-width:480px){.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{max-width:160px}}.editor-post-publish-panel__header-publish-button{justify-content:center;padding-right:4px}.editor-post-publish-panel__header-cancel-button{padding-left:4px}.editor-post-publish-panel__header-published{flex-grow:1}.editor-post-publish-panel__footer{padding:16px}.components-button.editor-post-publish-panel__toggle.is-primary{align-items:center;display:inline-flex}.components-button.editor-post-publish-panel__toggle.is-primary.is-busy .dashicon{display:none}.components-button.editor-post-publish-panel__toggle.is-primary .dashicon{margin-left:-4px}.editor-post-publish-panel__link{font-weight:400;padding-right:4px}.editor-post-publish-panel__prepublish{padding:16px}.editor-post-publish-panel__prepublish strong{color:#1e1e1e}.editor-post-publish-panel__prepublish .components-panel__body{background:#fff;margin-left:-16px;margin-right:-16px}.editor-post-publish-panel__prepublish .editor-post-visibility__dialog-legend{display:none}.editor-post-publish-panel__prepublish .components-panel__body-title .components-button{align-items:flex-start;text-wrap:balance;text-wrap:pretty}.post-publish-panel__postpublish .components-panel__body{border-bottom:1px solid #e0e0e0;border-top:none;word-break:break-word}.post-publish-panel__postpublish-buttons{align-content:space-between;display:flex;flex-wrap:wrap;gap:16px}.post-publish-panel__postpublish-buttons .components-button,.post-publish-panel__postpublish-buttons .components-button.has-icon{flex:1;justify-content:center;min-width:unset}.post-publish-panel__postpublish-buttons .components-clipboard-button{width:100%}.post-publish-panel__postpublish-post-address-container{align-items:flex-end;display:flex;margin-bottom:16px}.post-publish-panel__postpublish-post-address-container .post-publish-panel__postpublish-post-address{flex:1}.post-publish-panel__postpublish-post-address-container input[readonly]{background:#f0f0f0;border-color:#ccc;height:36px;overflow:hidden;padding:12px;text-overflow:ellipsis}.post-publish-panel__postpublish-post-address__copy-button-wrap{flex-shrink:0;margin-right:16px}.post-publish-panel__postpublish-header{font-weight:500}.post-publish-panel__postpublish-subheader{margin:0 0 8px}.post-publish-panel__tip{color:#f0b849}@media screen and (max-width:782px){.post-publish-panel__postpublish-post-address__button-wrap .components-button{height:40px}}.editor-post-publish-panel{box-sizing:border-box}.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}.editor-post-publish-panel{background:#fff;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.editor-post-publish-panel{border-right:1px solid #ddd;right:auto;top:32px;width:281px;z-index:99998}}@media (min-width:782px) and (not (prefers-reduced-motion)){.editor-post-publish-panel{animation:editor-post-publish-panel__slide-in-animation .1s forwards;transform:translateX(-100%)}}@media (min-width:782px){body.is-fullscreen-mode .editor-post-publish-panel{top:0}[role=region]:focus .editor-post-publish-panel{transform:translateX(0)}}@keyframes editor-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.editor-post-saved-state{align-items:center;color:#757575;display:flex;overflow:hidden;padding:12px 4px;white-space:nowrap;width:28px}.editor-post-saved-state.is-saved[aria-disabled=true],.editor-post-saved-state.is-saved[aria-disabled=true]:hover,.editor-post-saved-state.is-saving[aria-disabled=true],.editor-post-saved-state.is-saving[aria-disabled=true]:hover{background:#0000;color:#757575}.editor-post-saved-state svg{display:inline-block;flex:0 0 auto;fill:currentColor;margin-left:8px}@media (min-width:600px){.editor-post-saved-state{padding:8px 12px;text-indent:inherit;width:auto}.editor-post-saved-state svg{margin-left:0}}.editor-post-save-draft.has-text.has-icon svg{margin-left:0}.editor-post-schedule__panel-dropdown{width:100%}.editor-post-schedule__dialog .components-popover__content{min-width:320px;padding:16px}.editor-post-status{max-width:100%}.editor-post-status.is-read-only{padding:6px 12px}.editor-post-status .editor-post-status__toggle.editor-post-status__toggle{padding-bottom:4px;padding-top:4px}.editor-change-status__password-fieldset,.editor-change-status__publish-date-wrapper{border-top:1px solid #e0e0e0;padding-top:16px}.editor-change-status__content .components-popover__content{min-width:320px;padding:16px}.editor-change-status__content .editor-change-status__password-legend{margin-bottom:8px;padding:0}.editor-change-status__content p.components-base-control__help:has(.components-checkbox-control__help){margin-top:4px}.editor-post-sticky__checkbox-control{border-top:1px solid #e0e0e0;padding-top:16px}.editor-post-sync-status__value{padding:6px 12px 6px 0}.editor-post-taxonomies__hierarchical-terms-list{margin-right:-6px;margin-top:-6px;max-height:14em;overflow:auto;padding-right:6px;padding-top:6px}.editor-post-taxonomies__hierarchical-terms-choice{margin-bottom:8px}.editor-post-taxonomies__hierarchical-terms-choice:last-child{margin-bottom:4px}.editor-post-taxonomies__hierarchical-terms-subchoices{margin-right:16px;margin-top:8px}.editor-post-taxonomies__flat-term-most-used .editor-post-taxonomies__flat-term-most-used-label{margin-bottom:4px}.editor-post-taxonomies__flat-term-most-used-list{margin:0}.editor-post-taxonomies__flat-term-most-used-list li{display:inline-block;margin-left:8px}.editor-post-template__swap-template-modal{z-index:1000001}.editor-post-template__swap-template-modal .editor-post-template__swap-template-search{background:#fff;margin-bottom:-4px;padding:16px 0;position:sticky;top:0;transform:translateY(-4px);z-index:2}.editor-post-template__create-template-modal{z-index:1000001}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px;padding-top:2px}@media (min-width:782px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:4}}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-post-template__dropdown .components-popover__content{min-width:240px}.editor-post-template__dropdown .components-button.is-pressed,.editor-post-template__dropdown .components-button.is-pressed:hover{background:inherit;color:inherit}@media (min-width:782px){.editor-post-template__create-form{width:320px}}.editor-post-template__classic-theme-dropdown{padding:8px}textarea.editor-post-text-editor{border:1px solid #949494;border-radius:0;box-shadow:none;display:block;font-family:Menlo,Consolas,monaco,monospace;line-height:2.4;margin:0;min-height:200px;overflow:hidden;resize:none;width:100%}@media not (prefers-reduced-motion){textarea.editor-post-text-editor{transition:border .1s ease-out,box-shadow .1s linear}}textarea.editor-post-text-editor{padding:16px}@media (min-width:600px){textarea.editor-post-text-editor{padding:24px}}textarea.editor-post-text-editor{font-size:16px!important}@media (min-width:600px){textarea.editor-post-text-editor{font-size:15px!important}}textarea.editor-post-text-editor:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);position:relative}textarea.editor-post-text-editor::-webkit-input-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor::-moz-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor:-ms-input-placeholder{color:#1e1e1e9e}.editor-post-title.is-raw-text{margin-bottom:24px;margin-top:2px;max-width:none}.editor-post-url__panel-dropdown{width:100%}.editor-post-url__panel-dialog .editor-post-url{margin:8px;min-width:248px}.editor-post-url__front-page-link,.editor-post-url__link{direction:ltr;word-break:break-word}.editor-post-url__front-page-link{border-radius:2px;color:var(--wp-admin-theme-color);padding:6px 12px}.editor-post-url__front-page-link:hover{background:color-mix(in srgb,var(--wp-admin-theme-color) 4%,#0000);color:var(--wp-admin-theme-color-darker-20,#183ad6)}.editor-post-url__front-page-link:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);color:var(--wp-admin-theme-color);outline:3px solid #0000}.editor-post-url__link-slug{font-weight:600}.editor-post-url__input input.components-input-control__input{padding-inline-start:0!important}.editor-post-parent__panel-toggle,.editor-post-url__panel-toggle{word-break:break-word}.editor-post-url__intro{margin:0}.editor-post-url__permalink{margin-bottom:0;margin-top:8px}.editor-post-url__permalink-visual-label{display:block}.editor-posts-per-page-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-trash.components-button{flex-grow:1;justify-content:center}.editor-preview-dropdown .editor-preview-dropdown__toggle.has-icon.has-text{padding-left:4px;padding-right:6px}.editor-preview-dropdown__button-external{display:flex;justify-content:space-between;width:100%}.editor-resizable-editor.is-resizable{margin:0 auto;overflow:visible}.editor-resizable-editor__resize-handle{appearance:none;background:none;border:0;border-radius:9999px;bottom:0;cursor:ew-resize;height:100px;margin:auto 0;outline:none;padding:0;position:absolute;top:0;width:12px}.editor-resizable-editor__resize-handle:after{background-color:#75757566;border-radius:9999px;bottom:16px;content:"";left:0;position:absolute;right:4px;top:16px;width:4px}.editor-resizable-editor__resize-handle.is-left{right:-18px}.editor-resizable-editor__resize-handle.is-right{left:-18px}.editor-resizable-editor__resize-handle:active,.editor-resizable-editor__resize-handle:focus,.editor-resizable-editor__resize-handle:hover{opacity:1}.editor-resizable-editor__resize-handle:active:after,.editor-resizable-editor__resize-handle:focus:after,.editor-resizable-editor__resize-handle:hover:after{background-color:var(--wp-admin-theme-color)}.editor-layout__toggle-entities-saved-states-panel,.editor-layout__toggle-publish-panel,.editor-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:0;padding:24px;position:fixed!important;right:auto;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .editor-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-publish-panel{bottom:0;top:auto}.editor-start-page-options__modal .editor-start-page-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-page-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}.editor-start-template-options__modal .editor-start-template-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-template-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-patterns-list__item-title{display:none}.components-panel__header.editor-sidebar__panel-tabs{padding-left:8px;padding-right:0}.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{padding:0}@media (min-width:782px){.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{display:flex}}.editor-post-summary .components-v-stack:empty{display:none}.editor-sidebar{box-sizing:border-box}.editor-sidebar *,.editor-sidebar :after,.editor-sidebar :before{box-sizing:inherit}.editor-site-discussion-dropdown__content .components-popover__content{min-width:320px;padding:16px}.table-of-contents__popover.components-popover .components-popover__content{min-width:380px}.components-popover.table-of-contents__popover{z-index:99998}.table-of-contents__popover .components-popover__content{padding:16px}@media (min-width:600px){.table-of-contents__popover .components-popover__content{max-height:calc(100vh - 120px);overflow-y:auto}}.table-of-contents__popover hr{margin:10px -16px 0}.table-of-contents__wrapper:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}.table-of-contents__counts{display:flex;flex-wrap:wrap;margin:-8px 0 0}.table-of-contents__count{color:#1e1e1e;display:flex;flex-basis:33%;flex-direction:column;font-size:13px;margin-bottom:0;margin-top:8px;padding-left:8px}.table-of-contents__count:nth-child(4n){padding-left:0}.table-of-contents__number,.table-of-contents__popover .word-count{color:#1e1e1e;font-size:21px;font-weight:400;line-height:30px}.table-of-contents__title{display:block;font-size:15px;font-weight:600;margin-top:20px}.editor-text-editor{box-sizing:border-box}.editor-text-editor *,.editor-text-editor :after,.editor-text-editor :before{box-sizing:inherit}.editor-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.editor-text-editor .editor-post-title.is-raw-text textarea:focus,.editor-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.editor-text-editor__body{padding:0 24px 24px}}.editor-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.editor-text-editor__toolbar{padding:12px}}@media (min-width:960px){.editor-text-editor__toolbar{padding:12px 24px}}.editor-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:40px;margin:0 0 0 auto}.editor-visual-editor{background-color:var(--wp-editor-canvas-background);display:flex;position:relative}.editor-visual-editor iframe[name=editor-canvas]{background-color:initial}.editor-visual-editor{align-items:center}.editor-visual-editor.is-resizable{max-height:100%}.editor-visual-editor.has-padding{padding:24px 24px 0}.editor-visual-editor.is-iframed{overflow:hidden}.editor-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.editor-visual-editor .components-button.has-icon,.editor-visual-editor .components-button.is-tertiary{padding:6px}.editor-fields-content-preview{border-radius:4px;display:flex;flex-direction:column;height:100%}.dataviews-view-table .editor-fields-content-preview{flex-grow:0;width:96px}.editor-fields-content-preview .block-editor-block-preview__container,.editor-fields-content-preview .editor-fields-content-preview__empty{margin-bottom:auto;margin-top:auto}.editor-fields-content-preview__empty{text-align:center}
\ No newline at end of file
diff --git a/wp-includes/css/dist/editor/style.css b/wp-includes/css/dist/editor/style.css
index 143874cbcc..07ef8fada5 100644
--- a/wp-includes/css/dist/editor/style.css
+++ b/wp-includes/css/dist/editor/style.css
@@ -512,6 +512,7 @@ body.is-fullscreen-mode .interface-interface-skeleton{
}
.editor-collab-sidebar-panel__user-avatar{
+ background:#fff;
border-radius:50%;
border-style:solid;
border-width:var(--wp-admin-border-width-focus);
@@ -616,56 +617,18 @@ body.is-fullscreen-mode .interface-interface-skeleton{
top:auto;
}
-.comment-avatar-indicator{
- background:#0000;
- border:none;
- min-width:auto;
- padding:4px;
- position:relative;
-}
-
-.comment-avatar-stack{
- align-items:center;
- display:flex;
- height:24px;
- position:relative;
-}
-
.comment-avatar{
- border:2px solid #fff;
+ background:#fff;
border-radius:50%;
- flex-shrink:0;
- height:24px;
- margin-left:-6px;
+ border-style:solid;
+ border-width:var(--wp-admin-border-width-focus);
+ margin-left:-12px;
+ padding:var(--wp-admin-border-width-focus);
width:24px;
}
.comment-avatar:first-child{
- border-color:#de6e55;
margin-left:0;
}
-.comment-avatar:nth-child(2){
- border-color:#599637;
-}
-.comment-avatar:nth-child(3){
- border-color:#3858e9;
-}
-
-.comment-avatar-overflow{
- align-items:center;
- background:#757575;
- border:2px solid #fff;
- border-radius:4rem;
- color:#fff;
- display:flex;
- flex-shrink:0;
- font-size:10px;
- font-weight:600;
- height:24px;
- justify-content:center;
- margin-left:-6px;
- padding:0 4px;
- width:fit-content;
-}
.editor-collapsible-block-toolbar{
align-items:center;
diff --git a/wp-includes/css/dist/editor/style.min.css b/wp-includes/css/dist/editor/style.min.css
index 92146bf72c..1d5ff891ac 100644
--- a/wp-includes/css/dist/editor/style.min.css
+++ b/wp-includes/css/dist/editor/style.min.css
@@ -1 +1 @@
-@charset "UTF-8";:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.interface-complementary-area-header{background:#fff;gap:4px;padding-right:8px}.interface-complementary-area-header .interface-complementary-area-header__title{margin:0 auto 0 0}.interface-complementary-area{background:#fff;color:#1e1e1e;height:100%;overflow:auto}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs{top:0}.interface-complementary-area p:not(.components-base-control__help,.components-form-token-field__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;font-weight:500;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:auto;right:10px;top:auto}.interface-complementary-area__fill{height:100%}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-left:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container:not(:has(.is-zoom-out)){position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;max-height:100%;position:fixed;right:0;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{left:0}@media (min-width:783px){.interface-interface-skeleton{left:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{left:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{left:160px}}.folded .interface-interface-skeleton{left:0}@media (min-width:783px){.folded .interface-interface-skeleton{left:36px}}body.is-fullscreen-mode .interface-interface-skeleton{left:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none;position:relative}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;left:0;position:absolute;top:0;width:auto;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important}}.interface-interface-skeleton__sidebar{border-top:1px solid #e0e0e0;overflow:hidden}@media (min-width:782px){.interface-interface-skeleton__sidebar{box-shadow:-1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__secondary-sidebar{border-top:1px solid #e0e0e0;right:0}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar{box-shadow:1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);color:#1e1e1e;flex-shrink:0;height:auto;outline:1px solid #0000;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;left:0;position:absolute;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-left:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-pinned-items{display:flex}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.interface-pinned-items{gap:8px}.editor-autocompleters__user .editor-autocompleters__no-avatar:before{content:"\f110";font:normal 20px/1 dashicons;margin-right:5px;vertical-align:middle}.editor-autocompleters__user .editor-autocompleters__user-avatar{flex-grow:0;flex-shrink:0;height:24px;margin-right:8px;max-width:none;width:24px}.editor-autocompleters__user .editor-autocompleters__user-name{flex-grow:1;flex-shrink:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user .editor-autocompleters__user-slug{flex-grow:0;flex-shrink:0;margin-left:8px;max-width:100px;overflow:none;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user:not(.is-primary) .editor-autocompleters__user-slug{color:#757575}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar){box-shadow:none}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar) .interface-complementary-area-header{display:none}.editor-collab-sidebar{height:100%;overflow:hidden}.editor-collab-sidebar-panel{height:100%;overflow:hidden;padding:16px 16px 24px}.editor-collab-sidebar-panel__thread{background-color:#f0f0f0;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:16px;position:relative;width:auto}.editor-collab-sidebar-panel__thread.is-selected{background-color:#fff;box-shadow:0 2px 3px #0000000d,0 4px 5px #0000000a,0 12px 12px #00000008,0 16px 16px #00000005;z-index:1}.editor-collab-sidebar-panel__thread:focus{outline:var(--wp-admin-border-width-focus) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-1)}.editor-collab-sidebar-panel__thread.is-floating{left:16px;margin-top:16px;position:absolute;right:16px}.editor-collab-sidebar-panel__user-name{text-transform:capitalize}.editor-collab-sidebar-panel__user-name,.editor-collab-sidebar-panel__user-time{color:#757575;font-size:12px;font-weight:400;line-height:16px;text-align:left}.editor-collab-sidebar-panel__user-comment p:last-child{margin-bottom:0}.editor-collab-sidebar-panel__user-avatar{border-radius:50%;border-style:solid;border-width:var(--wp-admin-border-width-focus);flex-shrink:0;padding:var(--wp-admin-border-width-focus)}.editor-collab-sidebar-panel__comment-status{margin-left:auto}.editor-collab-sidebar-panel__comment-status button.has-icon:not(.has-text){flex-shrink:0;height:24px;min-width:24px;padding:0;width:24px}.editor-collab-sidebar-panel__comment-dropdown-menu{flex-shrink:0}.editor-collab-sidebar-panel__more-reply-separator:after,.editor-collab-sidebar-panel__more-reply-separator:before{background-color:#ddd;content:"";display:block;flex:1;height:1px;width:100%}.editor-collab-sidebar-panel__more-reply-button{font-weight:500}.editor-collab-sidebar-panel__resolution-text{font-style:italic}.editor-collab-sidebar-panel__comment-form textarea{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.editor-collab-sidebar-panel__comment-form textarea{transition:box-shadow .1s linear}}@media (min-width:600px){.editor-collab-sidebar-panel__comment-form textarea{font-size:13px;line-height:normal}}.editor-collab-sidebar-panel__comment-form textarea:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.editor-collab-sidebar-panel__comment-form textarea::-webkit-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea::-moz-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea:-ms-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea{display:block;line-height:20px!important;padding:9px 11px}.editor-collab-sidebar-panel__skip-to-block,.editor-collab-sidebar-panel__skip-to-comment{background:#fff!important;clip-path:inset(50%);overflow:hidden;position:absolute;right:-9999px;top:-9999px;z-index:-1}.editor-collab-sidebar-panel__skip-to-block:focus,.editor-collab-sidebar-panel__skip-to-comment:focus{clip-path:none;overflow:visible;right:8px;z-index:1}.editor-collab-sidebar-panel__skip-to-comment:focus{top:8px}.editor-collab-sidebar-panel__skip-to-block:focus{bottom:8px;top:auto}.comment-avatar-indicator{background:#0000;border:none;min-width:auto;padding:4px;position:relative}.comment-avatar-stack{align-items:center;display:flex;height:24px;position:relative}.comment-avatar{border:2px solid #fff;border-radius:50%;flex-shrink:0;height:24px;margin-left:-6px;width:24px}.comment-avatar:first-child{border-color:#de6e55;margin-left:0}.comment-avatar:nth-child(2){border-color:#599637}.comment-avatar:nth-child(3){border-color:#3858e9}.comment-avatar-overflow{align-items:center;background:#757575;border:2px solid #fff;border-radius:4rem;color:#fff;display:flex;flex-shrink:0;font-size:10px;font-weight:600;height:24px;justify-content:center;margin-left:-6px;padding:0 4px;width:fit-content}.editor-collapsible-block-toolbar{align-items:center;display:flex;height:64px;overflow:hidden}.editor-collapsible-block-toolbar .block-editor-block-contextual-toolbar{background:#0000;border-bottom:0;height:100%}.editor-collapsible-block-toolbar .block-editor-block-toolbar{height:100%;padding-top:17px}.editor-collapsible-block-toolbar .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.editor-collapsible-block-toolbar:after{background-color:#ddd;content:"";height:24px;margin-right:7px;width:1px}.editor-collapsible-block-toolbar .components-toolbar,.editor-collapsible-block-toolbar .components-toolbar-group{border-right:none;position:relative}.editor-collapsible-block-toolbar .components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar:after{background-color:#ddd;content:"";height:24px;position:absolute;right:-1px;top:4px;width:1px}.editor-collapsible-block-toolbar .components-toolbar .components-toolbar-group.components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.editor-collapsible-block-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.editor-collapsible-block-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{height:40px;position:relative;top:-4px}}.editor-collapsible-block-toolbar.is-collapsed{display:none}.editor-content-only-settings-menu__description{min-width:235px;padding:8px}.editor-block-visibility__disabled-blocks-count{background-color:#fff;border:1px solid #ddd;border-width:1px 0;box-shadow:-32px 0 0 0 #fff,32px 0 0 0 #fff;padding:8px;position:sticky;text-align:center;top:-5px;z-index:2}.editor-block-visibility__disabled-blocks-count~.block-editor-block-manager__content .block-editor-block-manager__category-title{top:31px}.editor-block-visibility__disabled-blocks-count .is-link{margin-left:12px}.editor-blog-title-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-document-bar{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;height:32px;justify-content:space-between;min-width:0;width:min(100%,450px)}.editor-document-bar:hover{background-color:#e0e0e0}.editor-document-bar .components-button{border-radius:4px}@media not (prefers-reduced-motion){.editor-document-bar .components-button{transition:all .1s ease-out}}.editor-document-bar .components-button:hover{background:#e0e0e0}@media screen and (min-width:782px) and (max-width:960px){.editor-document-bar.has-back-button .editor-document-bar__post-type-label{display:none}}.editor-document-bar__command{color:var(--wp-block-synced-color);flex-grow:1;overflow:hidden}.editor-document-bar__title{color:#1e1e1e;margin:0 auto;max-width:70%;overflow:hidden}@media (min-width:782px){.editor-document-bar__title{padding-left:24px}}.editor-document-bar__title h1{align-items:center;display:flex;font-weight:400;justify-content:center;overflow:hidden;white-space:nowrap}.editor-document-bar__post-title{color:currentColor;flex:1;overflow:hidden;text-overflow:ellipsis}.editor-document-bar__post-type-label{color:#2f2f2f;flex:0;padding-left:4px}@media screen and (max-width:600px){.editor-document-bar__post-type-label{display:none}}.editor-document-bar__shortcut{color:#2f2f2f;display:none;min-width:24px}@media (min-width:782px){.editor-document-bar__shortcut{display:initial}}.editor-document-bar__back.components-button.has-icon.has-text{color:#757575;flex-shrink:0;gap:0;min-width:36px;position:absolute;z-index:1}.editor-document-bar__back.components-button.has-icon.has-text:hover{background-color:initial;color:#1e1e1e}.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:none;margin-left:12px;pointer-events:none;position:absolute}.editor-document-bar__icon-layout.editor-document-bar__icon-layout svg{fill:#949494}@media (min-width:600px){.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:flex}}.document-outline{margin:20px 0}.document-outline ul{margin:0;padding:0}.document-outline__item{display:flex;margin:4px 0}.document-outline__item a{text-decoration:none}.document-outline__item .document-outline__emdash:before{color:#ddd;margin-right:4px}.document-outline__item.is-h2 .document-outline__emdash:before{content:"—"}.document-outline__item.is-h3 .document-outline__emdash:before{content:"——"}.document-outline__item.is-h4 .document-outline__emdash:before{content:"———"}.document-outline__item.is-h5 .document-outline__emdash:before{content:"————"}.document-outline__item.is-h6 .document-outline__emdash:before{content:"—————"}.document-outline__button{align-items:flex-start;background:none;border:none;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;margin:0 0 0 -1px;padding:2px 5px 2px 1px;text-align:left}.document-outline__button:disabled,.document-outline__button[aria-disabled=true]{color:#757575;cursor:default}.document-outline__button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.document-outline__level{background:#ddd;border-radius:3px;color:#1e1e1e;font-size:13px;margin-right:4px;padding:1px 6px}.is-invalid .document-outline__level{background:#f0b849}.document-outline__item-content{padding:1px 0}.editor-document-outline.has-no-headings>svg{margin-top:28px}.editor-document-outline.has-no-headings>p{padding-left:32px;padding-right:32px}.editor-document-outline.has-no-headings{color:#757575;text-align:center}.editor-document-tools{align-items:center;display:inline-flex}.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:none}@media (min-width:782px){.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:inline-flex}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle{display:inline-flex}@media not (prefers-reduced-motion){.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle svg{transition:transform .2s cubic-bezier(.165,.84,.44,1)}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.is-pressed svg{transform:rotate(45deg)}.editor-document-tools .block-editor-list-view{display:none}@media (min-width:600px){.editor-document-tools .block-editor-list-view{display:flex}}.editor-document-tools .editor-document-tools__left>.components-button.has-icon,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon{height:32px;min-width:32px;padding:4px}.editor-document-tools .editor-document-tools__left>.components-button.has-icon.is-pressed,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon.is-pressed{background:#1e1e1e}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:focus:not(:disabled),.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 1px #fff;outline:1px solid #0000}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:before,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:before{display:none}.editor-document-tools__left{align-items:center;display:inline-flex;gap:8px}.editor-document-tools__left:not(:last-child){margin-inline-end:8px}.show-icon-labels .editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.has-icon{padding:0 8px;width:auto}.show-icon-labels .editor-document-tools__left>*+*{margin-left:8px}.editor-editor-interface .entities-saved-states__panel-header{height:65px}.editor-editor-interface .interface-interface-skeleton__content{isolation:isolate}.editor-visual-editor{flex:1 0 auto}.components-editor-notices__dismissible,.components-editor-notices__pinned{color:#1e1e1e;left:0;position:relative;right:0;top:0}.components-editor-notices__dismissible .components-notice,.components-editor-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-editor-notices__dismissible .components-notice .components-notice__dismiss,.components-editor-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}.entities-saved-states__panel-header{background:#fff;border-bottom:1px solid #ddd;box-sizing:border-box;height:64px;padding-left:16px;padding-right:16px}.entities-saved-states__text-prompt{padding:16px 16px 4px}.entities-saved-states__text-prompt .entities-saved-states__text-prompt--header{display:block;margin-bottom:12px}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt{padding:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body{border:0;padding-left:0;padding-right:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2{margin-bottom:0;margin-left:-16px;margin-right:-16px}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2 button{font-size:11px;text-transform:uppercase}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--header-wrapper{display:none}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--changes-count{margin-bottom:8px;margin-top:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-footer{margin-top:16px}.entities-saved-states__change-control{flex:1}.entities-saved-states__changes{font-size:13px;list-style:disc;margin:4px 16px 0 24px}.entities-saved-states__changes li{margin-bottom:4px}.editor-error-boundary{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:64px auto auto;max-width:780px;padding:1em}.editor-header{box-sizing:border-box}.editor-header *,.editor-header :after,.editor-header :before{box-sizing:inherit}.editor-header{background:#fff;display:grid;grid-auto-flow:row;grid-template:auto/64px minmax(0,max-content) minmax(min-content,1fr) 64px;height:64px}.editor-header:has(>.editor-header__center){grid-template:auto/64px min-content 1fr min-content 64px}@media (min-width:782px){.editor-header:has(>.editor-header__center){grid-template:auto/64px minmax(min-content,2fr) 2.5fr minmax(min-content,2fr) 64px}}@media (min-width:480px){.editor-header{gap:16px}}.editor-header{align-items:center;justify-content:space-between;max-width:100vw}@media (min-width:280px){.editor-header{flex-wrap:nowrap}}.editor-header__toolbar{grid-column:1/3}.editor-header__toolbar>:first-child{margin-inline:16px 0}.editor-header__back-button+.editor-header__toolbar{grid-column:2/3}@media (min-width:480px){.editor-header__back-button+.editor-header__toolbar>:first-child{margin-inline:0}}.editor-header__toolbar{align-items:center;clip-path:inset(-2px);display:flex;min-width:0}@media (min-width:480px){.editor-header__toolbar{clip-path:none}}.editor-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.editor-header__toolbar .table-of-contents{display:block}}.editor-header__toolbar .editor-collapsible-block-toolbar,.editor-header__toolbar .editor-collapsible-block-toolbar.is-collapsed~.editor-collapsible-block-toolbar__toggle{margin-inline:8px 0}.editor-header__center{align-items:center;clip-path:inset(-2px);display:flex;grid-column:3/4;justify-content:center;min-width:0}@media (max-width:479px){.editor-header__center>:first-child{margin-inline-start:8px}.editor-header__center>:last-child{margin-inline-end:8px}}.editor-header__settings{grid-column:3/-1}.editor-header:has(>.editor-header__center) .editor-header__settings{grid-column:4/-1}.editor-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;justify-self:end;padding-right:4px}@media (min-width:600px){.editor-header__settings{padding-right:8px}}.editor-header__settings{gap:8px}.show-icon-labels .editor-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.show-icon-labels .editor-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.show-icon-labels .editor-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label);white-space:nowrap}.show-icon-labels .editor-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.show-icon-labels .editor-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.show-icon-labels .editor-header .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg{display:block}.show-icon-labels .editor-header .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after{content:none}.show-icon-labels .editor-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.show-icon-labels .editor-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .editor-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover{border-left:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-left:8px;margin-top:4px;width:1px}.show-icon-labels .editor-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;left:calc(50% + 1px);width:calc(100% - 24px)}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 6px 6px 8px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-left:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-right:8px}@media (min-width:480px){.editor-header__post-preview-button{display:none}}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.editor-editor-interface.is-distraction-free .editor-header{background-color:#fff;width:100%}@media (min-width:782px){.editor-editor-interface.is-distraction-free .editor-header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);position:absolute}}.editor-editor-interface.is-distraction-free .editor-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-preview-dropdown,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-zoom-out-toggle,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.interface-pinned-items,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__toolbar .editor-document-tools__document-overview-toggle{display:none}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.editor-editor-interface.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.components-popover.more-menu-dropdown__content{z-index:99998}.editor-inserter-sidebar{box-sizing:border-box}.editor-inserter-sidebar *,.editor-inserter-sidebar :after,.editor-inserter-sidebar :before{box-sizing:inherit}.editor-inserter-sidebar{display:flex;flex-direction:column;height:100%}.editor-inserter-sidebar__content{height:100%}.editor-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.editor-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.editor-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.editor-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.editor-keyboard-shortcut-help-modal__shortcut:empty{display:none}.editor-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 0 0 1rem;text-align:right}.editor-keyboard-shortcut-help-modal__shortcut-description{flex:1;margin:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination+.editor-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.editor-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.editor-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 0 0 .2rem}.editor-list-view-sidebar{height:100%}@media (min-width:782px){.editor-list-view-sidebar{width:350px}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{height:100%}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar{height:12px;width:12px}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-track,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-track{background-color:initial}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.editor-list-view-sidebar__list-view-container>.document-outline:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:hover::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:hover::-webkit-scrollbar-thumb{background-color:#949494}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.editor-list-view-sidebar__list-view-container>.document-outline:focus,.editor-list-view-sidebar__list-view-container>.document-outline:focus-within,.editor-list-view-sidebar__list-view-container>.document-outline:hover,.editor-list-view-sidebar__list-view-panel-content:focus,.editor-list-view-sidebar__list-view-panel-content:focus-within,.editor-list-view-sidebar__list-view-panel-content:hover{scrollbar-color:#949494 #0000}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{will-change:transform}@media (hover:none){.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#949494 #0000}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{overflow:auto;padding:4px;scrollbar-gutter:auto}.editor-list-view-sidebar__list-view-container{display:flex;flex-direction:column;height:100%}.editor-list-view-sidebar__tab-panel{height:100%}.editor-list-view-sidebar__outline{border-bottom:1px solid #ddd;display:flex;flex-direction:column;gap:8px;padding:16px}.editor-list-view-sidebar__outline>div>span:first-child{display:inline-block;width:90px}.editor-list-view-sidebar__outline>div>span{color:#757575;font-size:12px;line-height:1.4}.editor-post-order__panel,.editor-post-parent__panel{padding-top:8px}.editor-post-order__panel .editor-post-panel__row-control>div,.editor-post-parent__panel .editor-post-panel__row-control>div{width:100%}.editor-post-order__panel-dialog .editor-post-order,.editor-post-order__panel-dialog .editor-post-parent,.editor-post-parent__panel-dialog .editor-post-order,.editor-post-parent__panel-dialog .editor-post-parent{margin:8px}.editor-post-order__panel-dialog .components-popover__content,.editor-post-parent__panel-dialog .components-popover__content{min-width:320px}.editor-post-author__panel{padding-top:8px}.editor-post-author__panel .editor-post-panel__row-control>div{width:100%}.editor-post-author__panel-dialog .editor-post-author{margin:8px;min-width:248px}.editor-action-modal{z-index:1000001}.editor-post-card-panel__content{flex-grow:1}.editor-post-card-panel__title{width:100%}.editor-post-card-panel__title.editor-post-card-panel__title{align-items:center;column-gap:8px;display:flex;flex-wrap:wrap;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:500;line-height:20px;margin:0;row-gap:4px;word-break:break-word}.editor-post-card-panel__icon{flex:0 0 24px;height:24px;width:24px}.editor-post-card-panel__header{display:flex;justify-content:space-between}.editor-post-card-panel.has-description .editor-post-card-panel__header{margin-bottom:8px}.editor-post-card-panel .editor-post-card-panel__title-name{padding:2px 0}.editor-post-card-panel .editor-post-card-panel__description,.editor-post-content-information{color:#757575}.editor-post-content-information .components-text{color:inherit}.editor-post-discussion__panel-dialog .editor-post-discussion{margin:8px;min-width:248px}.editor-post-discussion__panel-toggle .components-text{color:inherit}.editor-post-discussion__panel-dialog .components-popover__content{min-width:320px}.editor-post-excerpt__textarea{margin-bottom:10px;width:100%}.editor-post-excerpt__dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-featured-image{padding:0}.editor-post-featured-image .hidden{display:none}.editor-post-featured-image .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.editor-post-featured-image__container{position:relative}.editor-post-featured-image__container:focus .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:focus-within .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:hover .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image){opacity:1}.editor-post-featured-image__container .editor-post-featured-image__actions.editor-post-featured-image__actions-missing-image{margin-top:16px;opacity:1}.editor-post-featured-image__container .components-drop-zone__content{border-radius:2px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner{align-items:center;display:flex;gap:8px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner .components-drop-zone__content-icon{margin:0}.editor-post-featured-image__preview,.editor-post-featured-image__toggle{box-shadow:0 0 0 0 var(--wp-admin-theme-color);display:flex;justify-content:center;min-height:40px;outline-offset:-1px;overflow:hidden;padding:0;width:100%}.editor-post-featured-image__preview{height:auto!important;outline:1px solid #0000001a}.editor-post-featured-image__preview .editor-post-featured-image__preview-image{aspect-ratio:2/1;object-fit:cover;object-position:50% 50%;width:100%}.editor-post-featured-image__toggle{box-shadow:inset 0 0 0 1px #ccc}.editor-post-featured-image__toggle:focus:not(:disabled){box-shadow:0 0 0 currentColor inset,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){bottom:0;opacity:0;padding:8px;position:absolute}@media not (prefers-reduced-motion){.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){transition:opacity 50ms ease-out}}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image) .editor-post-featured-image__action{backdrop-filter:blur(16px) saturate(180%);background:#ffffffbf}.editor-post-featured-image__actions .editor-post-featured-image__action{flex-grow:1;justify-content:center}[class].editor-post-format__suggestion{margin:4px 0 0}.editor-post-format__dialog .editor-post-format__dialog-content{margin:8px;min-width:248px}.editor-post-last-edited-panel{color:#757575}.editor-post-last-edited-panel .components-text{color:inherit}.editor-post-last-revision__title{font-weight:500;width:100%}.editor-post-last-revision__title.components-button.has-icon{height:100%;justify-content:space-between}.editor-post-last-revision__title.components-button.has-icon:active,.editor-post-last-revision__title.components-button.has-icon:hover{background:#f0f0f0}.editor-post-last-revision__title.components-button.has-icon:focus{border-radius:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-panel__body.is-opened.editor-post-last-revision__panel{height:48px;padding:0}.components-panel__body.is-opened.editor-post-last-revision__panel .editor-post-last-revision__title.components-button.components-button{padding:16px}.editor-private-post-last-revision__button{display:inline-block}.editor-post-locked-modal__buttons{margin-top:24px}.editor-post-locked-modal__avatar{border-radius:50%;margin-top:16px;min-width:auto!important}.editor-post-panel__row{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.editor-post-panel__row-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;padding:6px 0;width:38%}.editor-post-panel__row-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.editor-post-panel__row-control .components-button{height:auto;max-width:100%;min-height:32px;text-align:left;text-wrap:balance;text-wrap:pretty;white-space:normal}.editor-post-panel__row-control .components-dropdown{max-width:100%}.editor-post-panel__section{padding:16px}.editor-post-publish-panel__content{min-height:calc(100% - 148px)}.editor-post-publish-panel__content>.components-spinner{display:block;margin:100px auto 0}.editor-post-publish-panel__header{align-content:space-between;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;height:65px;padding-left:16px;padding-right:16px}.editor-post-publish-panel__header .components-button{justify-content:center;width:100%}.editor-post-publish-panel__header .has-icon{margin-left:auto;width:auto}.components-site-card{align-items:center;display:flex;margin:16px 0}.components-site-icon{border:none;border-radius:2px;flex-shrink:0;height:36px;margin-right:12px;width:36px}.components-site-name{display:block;font-size:14px}.components-site-home{color:#757575;display:block;font-size:12px;word-break:break-word}.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{flex:1}@media (min-width:480px){.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{max-width:160px}}.editor-post-publish-panel__header-publish-button{justify-content:center;padding-left:4px}.editor-post-publish-panel__header-cancel-button{padding-right:4px}.editor-post-publish-panel__header-published{flex-grow:1}.editor-post-publish-panel__footer{padding:16px}.components-button.editor-post-publish-panel__toggle.is-primary{align-items:center;display:inline-flex}.components-button.editor-post-publish-panel__toggle.is-primary.is-busy .dashicon{display:none}.components-button.editor-post-publish-panel__toggle.is-primary .dashicon{margin-right:-4px}.editor-post-publish-panel__link{font-weight:400;padding-left:4px}.editor-post-publish-panel__prepublish{padding:16px}.editor-post-publish-panel__prepublish strong{color:#1e1e1e}.editor-post-publish-panel__prepublish .components-panel__body{background:#fff;margin-left:-16px;margin-right:-16px}.editor-post-publish-panel__prepublish .editor-post-visibility__dialog-legend{display:none}.editor-post-publish-panel__prepublish .components-panel__body-title .components-button{align-items:flex-start;text-wrap:balance;text-wrap:pretty}.post-publish-panel__postpublish .components-panel__body{border-bottom:1px solid #e0e0e0;border-top:none;word-break:break-word}.post-publish-panel__postpublish-buttons{align-content:space-between;display:flex;flex-wrap:wrap;gap:16px}.post-publish-panel__postpublish-buttons .components-button,.post-publish-panel__postpublish-buttons .components-button.has-icon{flex:1;justify-content:center;min-width:unset}.post-publish-panel__postpublish-buttons .components-clipboard-button{width:100%}.post-publish-panel__postpublish-post-address-container{align-items:flex-end;display:flex;margin-bottom:16px}.post-publish-panel__postpublish-post-address-container .post-publish-panel__postpublish-post-address{flex:1}.post-publish-panel__postpublish-post-address-container input[readonly]{background:#f0f0f0;border-color:#ccc;height:36px;overflow:hidden;padding:12px;text-overflow:ellipsis}.post-publish-panel__postpublish-post-address__copy-button-wrap{flex-shrink:0;margin-left:16px}.post-publish-panel__postpublish-header{font-weight:500}.post-publish-panel__postpublish-subheader{margin:0 0 8px}.post-publish-panel__tip{color:#f0b849}@media screen and (max-width:782px){.post-publish-panel__postpublish-post-address__button-wrap .components-button{height:40px}}.editor-post-publish-panel{box-sizing:border-box}.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}.editor-post-publish-panel{background:#fff;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.editor-post-publish-panel{border-left:1px solid #ddd;left:auto;top:32px;width:281px;z-index:99998}}@media (min-width:782px) and (not (prefers-reduced-motion)){.editor-post-publish-panel{animation:editor-post-publish-panel__slide-in-animation .1s forwards;transform:translateX(100%)}}@media (min-width:782px){body.is-fullscreen-mode .editor-post-publish-panel{top:0}[role=region]:focus .editor-post-publish-panel{transform:translateX(0)}}@keyframes editor-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.editor-post-saved-state{align-items:center;color:#757575;display:flex;overflow:hidden;padding:12px 4px;white-space:nowrap;width:28px}.editor-post-saved-state.is-saved[aria-disabled=true],.editor-post-saved-state.is-saved[aria-disabled=true]:hover,.editor-post-saved-state.is-saving[aria-disabled=true],.editor-post-saved-state.is-saving[aria-disabled=true]:hover{background:#0000;color:#757575}.editor-post-saved-state svg{display:inline-block;flex:0 0 auto;fill:currentColor;margin-right:8px}@media (min-width:600px){.editor-post-saved-state{padding:8px 12px;text-indent:inherit;width:auto}.editor-post-saved-state svg{margin-right:0}}.editor-post-save-draft.has-text.has-icon svg{margin-right:0}.editor-post-schedule__panel-dropdown{width:100%}.editor-post-schedule__dialog .components-popover__content{min-width:320px;padding:16px}.editor-post-status{max-width:100%}.editor-post-status.is-read-only{padding:6px 12px}.editor-post-status .editor-post-status__toggle.editor-post-status__toggle{padding-bottom:4px;padding-top:4px}.editor-change-status__password-fieldset,.editor-change-status__publish-date-wrapper{border-top:1px solid #e0e0e0;padding-top:16px}.editor-change-status__content .components-popover__content{min-width:320px;padding:16px}.editor-change-status__content .editor-change-status__password-legend{margin-bottom:8px;padding:0}.editor-change-status__content p.components-base-control__help:has(.components-checkbox-control__help){margin-top:4px}.editor-post-sticky__checkbox-control{border-top:1px solid #e0e0e0;padding-top:16px}.editor-post-sync-status__value{padding:6px 0 6px 12px}.editor-post-taxonomies__hierarchical-terms-list{margin-left:-6px;margin-top:-6px;max-height:14em;overflow:auto;padding-left:6px;padding-top:6px}.editor-post-taxonomies__hierarchical-terms-choice{margin-bottom:8px}.editor-post-taxonomies__hierarchical-terms-choice:last-child{margin-bottom:4px}.editor-post-taxonomies__hierarchical-terms-subchoices{margin-left:16px;margin-top:8px}.editor-post-taxonomies__flat-term-most-used .editor-post-taxonomies__flat-term-most-used-label{margin-bottom:4px}.editor-post-taxonomies__flat-term-most-used-list{margin:0}.editor-post-taxonomies__flat-term-most-used-list li{display:inline-block;margin-right:8px}.editor-post-template__swap-template-modal{z-index:1000001}.editor-post-template__swap-template-modal .editor-post-template__swap-template-search{background:#fff;margin-bottom:-4px;padding:16px 0;position:sticky;top:0;transform:translateY(-4px);z-index:2}.editor-post-template__create-template-modal{z-index:1000001}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px;padding-top:2px}@media (min-width:782px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:4}}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-post-template__dropdown .components-popover__content{min-width:240px}.editor-post-template__dropdown .components-button.is-pressed,.editor-post-template__dropdown .components-button.is-pressed:hover{background:inherit;color:inherit}@media (min-width:782px){.editor-post-template__create-form{width:320px}}.editor-post-template__classic-theme-dropdown{padding:8px}textarea.editor-post-text-editor{border:1px solid #949494;border-radius:0;box-shadow:none;display:block;font-family:Menlo,Consolas,monaco,monospace;line-height:2.4;margin:0;min-height:200px;overflow:hidden;resize:none;width:100%}@media not (prefers-reduced-motion){textarea.editor-post-text-editor{transition:border .1s ease-out,box-shadow .1s linear}}textarea.editor-post-text-editor{padding:16px}@media (min-width:600px){textarea.editor-post-text-editor{padding:24px}}textarea.editor-post-text-editor{font-size:16px!important}@media (min-width:600px){textarea.editor-post-text-editor{font-size:15px!important}}textarea.editor-post-text-editor:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);position:relative}textarea.editor-post-text-editor::-webkit-input-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor::-moz-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor:-ms-input-placeholder{color:#1e1e1e9e}.editor-post-title.is-raw-text{margin-bottom:24px;margin-top:2px;max-width:none}.editor-post-url__panel-dropdown{width:100%}.editor-post-url__panel-dialog .editor-post-url{margin:8px;min-width:248px}.editor-post-url__front-page-link,.editor-post-url__link{direction:ltr;word-break:break-word}.editor-post-url__front-page-link{border-radius:2px;color:var(--wp-admin-theme-color);padding:6px 12px}.editor-post-url__front-page-link:hover{background:color-mix(in srgb,var(--wp-admin-theme-color) 4%,#0000);color:var(--wp-admin-theme-color-darker-20,#183ad6)}.editor-post-url__front-page-link:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);color:var(--wp-admin-theme-color);outline:3px solid #0000}.editor-post-url__link-slug{font-weight:600}.editor-post-url__input input.components-input-control__input{padding-inline-start:0!important}.editor-post-parent__panel-toggle,.editor-post-url__panel-toggle{word-break:break-word}.editor-post-url__intro{margin:0}.editor-post-url__permalink{margin-bottom:0;margin-top:8px}.editor-post-url__permalink-visual-label{display:block}.editor-posts-per-page-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-trash.components-button{flex-grow:1;justify-content:center}.editor-preview-dropdown .editor-preview-dropdown__toggle.has-icon.has-text{padding-left:6px;padding-right:4px}.editor-preview-dropdown__button-external{display:flex;justify-content:space-between;width:100%}.editor-resizable-editor.is-resizable{margin:0 auto;overflow:visible}.editor-resizable-editor__resize-handle{appearance:none;background:none;border:0;border-radius:9999px;bottom:0;cursor:ew-resize;height:100px;margin:auto 0;outline:none;padding:0;position:absolute;top:0;width:12px}.editor-resizable-editor__resize-handle:after{background-color:#75757566;border-radius:9999px;bottom:16px;content:"";left:4px;position:absolute;right:0;top:16px;width:4px}.editor-resizable-editor__resize-handle.is-left{left:-18px}.editor-resizable-editor__resize-handle.is-right{right:-18px}.editor-resizable-editor__resize-handle:active,.editor-resizable-editor__resize-handle:focus,.editor-resizable-editor__resize-handle:hover{opacity:1}.editor-resizable-editor__resize-handle:active:after,.editor-resizable-editor__resize-handle:focus:after,.editor-resizable-editor__resize-handle:hover:after{background-color:var(--wp-admin-theme-color)}.editor-layout__toggle-entities-saved-states-panel,.editor-layout__toggle-publish-panel,.editor-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:auto;padding:24px;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .editor-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-publish-panel{bottom:0;top:auto}.editor-start-page-options__modal .editor-start-page-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-page-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}.editor-start-template-options__modal .editor-start-template-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-template-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-patterns-list__item-title{display:none}.components-panel__header.editor-sidebar__panel-tabs{padding-left:0;padding-right:8px}.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{padding:0}@media (min-width:782px){.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{display:flex}}.editor-post-summary .components-v-stack:empty{display:none}.editor-sidebar{box-sizing:border-box}.editor-sidebar *,.editor-sidebar :after,.editor-sidebar :before{box-sizing:inherit}.editor-site-discussion-dropdown__content .components-popover__content{min-width:320px;padding:16px}.table-of-contents__popover.components-popover .components-popover__content{min-width:380px}.components-popover.table-of-contents__popover{z-index:99998}.table-of-contents__popover .components-popover__content{padding:16px}@media (min-width:600px){.table-of-contents__popover .components-popover__content{max-height:calc(100vh - 120px);overflow-y:auto}}.table-of-contents__popover hr{margin:10px -16px 0}.table-of-contents__wrapper:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}.table-of-contents__counts{display:flex;flex-wrap:wrap;margin:-8px 0 0}.table-of-contents__count{color:#1e1e1e;display:flex;flex-basis:33%;flex-direction:column;font-size:13px;margin-bottom:0;margin-top:8px;padding-right:8px}.table-of-contents__count:nth-child(4n){padding-right:0}.table-of-contents__number,.table-of-contents__popover .word-count{color:#1e1e1e;font-size:21px;font-weight:400;line-height:30px}.table-of-contents__title{display:block;font-size:15px;font-weight:600;margin-top:20px}.editor-text-editor{box-sizing:border-box}.editor-text-editor *,.editor-text-editor :after,.editor-text-editor :before{box-sizing:inherit}.editor-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.editor-text-editor .editor-post-title.is-raw-text textarea:focus,.editor-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.editor-text-editor__body{padding:0 24px 24px}}.editor-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.editor-text-editor__toolbar{padding:12px}}@media (min-width:960px){.editor-text-editor__toolbar{padding:12px 24px}}.editor-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:40px;margin:0 auto 0 0}.editor-visual-editor{background-color:var(--wp-editor-canvas-background);display:flex;position:relative}.editor-visual-editor iframe[name=editor-canvas]{background-color:initial}.editor-visual-editor{align-items:center}.editor-visual-editor.is-resizable{max-height:100%}.editor-visual-editor.has-padding{padding:24px 24px 0}.editor-visual-editor.is-iframed{overflow:hidden}.editor-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.editor-visual-editor .components-button.has-icon,.editor-visual-editor .components-button.is-tertiary{padding:6px}.editor-fields-content-preview{border-radius:4px;display:flex;flex-direction:column;height:100%}.dataviews-view-table .editor-fields-content-preview{flex-grow:0;width:96px}.editor-fields-content-preview .block-editor-block-preview__container,.editor-fields-content-preview .editor-fields-content-preview__empty{margin-bottom:auto;margin-top:auto}.editor-fields-content-preview__empty{text-align:center}
\ No newline at end of file
+@charset "UTF-8";:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.admin-ui-page{background-color:#fff;color:#2f2f2f;container:admin-ui-page/inline-size;display:flex;flex-flow:column;height:100%;position:relative;z-index:1}@media not (prefers-reduced-motion){.admin-ui-page{transition:width .2s ease-out}}.admin-ui-page__header{background:#fff;border-bottom:1px solid #f0f0f0;padding:16px 48px;position:sticky;top:0}@container (max-width: 430px){.admin-ui-page__header{padding:16px 24px}}.admin-ui-page__header-subtitle{color:#757575;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:400;line-height:20px;margin:0;padding-block-end:8px}.admin-ui-page__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto}.admin-ui-page__content.has-padding{padding:16px 20px}@container (max-width: 430px){.admin-ui-page__content.has-padding{padding:16px 24px}}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon{padding:0 8px;width:auto}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon svg{display:none}.show-icon-labels .admin-ui-page__header-actions .components-button.has-icon:after{content:attr(aria-label);font-size:12px}.interface-complementary-area-header{background:#fff;gap:4px;padding-right:8px}.interface-complementary-area-header .interface-complementary-area-header__title{margin:0 auto 0 0}.interface-complementary-area{background:#fff;color:#1e1e1e;height:100%;overflow:auto}@media (min-width:600px){.interface-complementary-area{-webkit-overflow-scrolling:touch}}@media (min-width:782px){.interface-complementary-area{width:280px}}.interface-complementary-area .components-panel{border:none;position:relative;z-index:0}.interface-complementary-area .components-panel__header{position:sticky;top:0;z-index:1}.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs{top:0}.interface-complementary-area p:not(.components-base-control__help,.components-form-token-field__help){margin-top:0}.interface-complementary-area h2{color:#1e1e1e;font-size:13px;font-weight:500;margin-bottom:1.5em}.interface-complementary-area h3{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.interface-complementary-area hr{border-bottom:1px solid #f0f0f0;border-top:none;margin:1.5em 0}.interface-complementary-area div.components-toolbar,.interface-complementary-area div.components-toolbar-group{box-shadow:none;margin-bottom:1.5em}.interface-complementary-area div.components-toolbar-group:last-child,.interface-complementary-area div.components-toolbar:last-child{margin-bottom:0}.interface-complementary-area .block-editor-skip-to-selected-block:focus{bottom:10px;left:auto;right:10px;top:auto}.interface-complementary-area__fill{height:100%}@media (min-width:782px){body.js.is-fullscreen-mode{height:calc(100% + 32px);margin-top:-32px}body.js.is-fullscreen-mode #adminmenumain,body.js.is-fullscreen-mode #wpadminbar{display:none}body.js.is-fullscreen-mode #wpcontent,body.js.is-fullscreen-mode #wpfooter{margin-left:0}}html.interface-interface-skeleton__html-container{position:fixed;width:100%}@media (min-width:782px){html.interface-interface-skeleton__html-container:not(:has(.is-zoom-out)){position:static;width:auto}}.interface-interface-skeleton{bottom:0;display:flex;flex-direction:row;height:auto;max-height:100%;position:fixed;right:0;top:46px}@media (min-width:783px){.interface-interface-skeleton{top:32px}.is-fullscreen-mode .interface-interface-skeleton{top:0}}.interface-interface-skeleton__editor{display:flex;flex:0 1 100%;flex-direction:column;overflow:hidden}.interface-interface-skeleton{left:0}@media (min-width:783px){.interface-interface-skeleton{left:160px}}@media (min-width:783px){.auto-fold .interface-interface-skeleton{left:36px}}@media (min-width:961px){.auto-fold .interface-interface-skeleton{left:160px}}.folded .interface-interface-skeleton{left:0}@media (min-width:783px){.folded .interface-interface-skeleton{left:36px}}body.is-fullscreen-mode .interface-interface-skeleton{left:0!important}.interface-interface-skeleton__body{display:flex;flex-grow:1;overflow:auto;overscroll-behavior-y:none;position:relative}@media (min-width:782px){.has-footer .interface-interface-skeleton__body{padding-bottom:25px}}.interface-interface-skeleton__content{display:flex;flex-direction:column;flex-grow:1;overflow:auto;z-index:20}@media (min-width:782px){.interface-interface-skeleton__content{z-index:auto}}.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{background:#fff;bottom:0;color:#1e1e1e;flex-shrink:0;left:0;position:absolute;top:0;width:auto;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar,.interface-interface-skeleton__sidebar{position:relative!important}}.interface-interface-skeleton__sidebar{border-top:1px solid #e0e0e0;overflow:hidden}@media (min-width:782px){.interface-interface-skeleton__sidebar{box-shadow:-1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__secondary-sidebar{border-top:1px solid #e0e0e0;right:0}@media (min-width:782px){.interface-interface-skeleton__secondary-sidebar{box-shadow:1px 0 0 0 rgba(0,0,0,.133);outline:1px solid #0000}}.interface-interface-skeleton__header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);color:#1e1e1e;flex-shrink:0;height:auto;outline:1px solid #0000;z-index:30}.interface-interface-skeleton__footer{background-color:#fff;border-top:1px solid #e0e0e0;bottom:0;color:#1e1e1e;display:none;flex-shrink:0;height:auto;left:0;position:absolute;width:100%;z-index:90}@media (min-width:782px){.interface-interface-skeleton__footer{display:flex}}.interface-interface-skeleton__footer .block-editor-block-breadcrumb{align-items:center;background:#fff;display:flex;font-size:13px;height:24px;padding:0 18px;z-index:30}.interface-interface-skeleton__actions{background:#fff;bottom:auto;color:#1e1e1e;left:auto;position:fixed!important;right:0;top:-9999em;width:100vw;z-index:100000}@media (min-width:782px){.interface-interface-skeleton__actions{width:280px}}.interface-interface-skeleton__actions:focus,.interface-interface-skeleton__actions:focus-within{bottom:0;top:auto}.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:46px}@media (min-width:782px){.is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{border-left:1px solid #ddd;top:32px}.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus,.is-fullscreen-mode .is-entity-save-view-open .interface-interface-skeleton__actions:focus-within{top:0}}.interface-pinned-items{display:flex}.interface-pinned-items .components-button{display:none;margin:0}.interface-pinned-items .components-button[aria-controls="edit-post:block"],.interface-pinned-items .components-button[aria-controls="edit-post:document"],.interface-pinned-items .components-button[aria-controls="edit-site:block-inspector"],.interface-pinned-items .components-button[aria-controls="edit-site:template"]{display:flex}.interface-pinned-items .components-button svg{max-height:24px;max-width:24px}@media (min-width:600px){.interface-pinned-items .components-button{display:flex}}.interface-pinned-items{gap:8px}.editor-autocompleters__user .editor-autocompleters__no-avatar:before{content:"\f110";font:normal 20px/1 dashicons;margin-right:5px;vertical-align:middle}.editor-autocompleters__user .editor-autocompleters__user-avatar{flex-grow:0;flex-shrink:0;height:24px;margin-right:8px;max-width:none;width:24px}.editor-autocompleters__user .editor-autocompleters__user-name{flex-grow:1;flex-shrink:0;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user .editor-autocompleters__user-slug{flex-grow:0;flex-shrink:0;margin-left:8px;max-width:100px;overflow:none;text-overflow:ellipsis;white-space:nowrap}.editor-autocompleters__user:not(.is-primary) .editor-autocompleters__user-slug{color:#757575}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar){box-shadow:none}.interface-interface-skeleton__sidebar:has(.editor-collab-sidebar) .interface-complementary-area-header{display:none}.editor-collab-sidebar{height:100%;overflow:hidden}.editor-collab-sidebar-panel{height:100%;overflow:hidden;padding:16px 16px 24px}.editor-collab-sidebar-panel__thread{background-color:#f0f0f0;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:16px;position:relative;width:auto}.editor-collab-sidebar-panel__thread.is-selected{background-color:#fff;box-shadow:0 2px 3px #0000000d,0 4px 5px #0000000a,0 12px 12px #00000008,0 16px 16px #00000005;z-index:1}.editor-collab-sidebar-panel__thread:focus{outline:var(--wp-admin-border-width-focus) solid var(--wp-admin-theme-color);outline-offset:calc(var(--wp-admin-border-width-focus)*-1)}.editor-collab-sidebar-panel__thread.is-floating{left:16px;margin-top:16px;position:absolute;right:16px}.editor-collab-sidebar-panel__user-name{text-transform:capitalize}.editor-collab-sidebar-panel__user-name,.editor-collab-sidebar-panel__user-time{color:#757575;font-size:12px;font-weight:400;line-height:16px;text-align:left}.editor-collab-sidebar-panel__user-comment p:last-child{margin-bottom:0}.editor-collab-sidebar-panel__user-avatar{background:#fff;border-radius:50%;border-style:solid;border-width:var(--wp-admin-border-width-focus);flex-shrink:0;padding:var(--wp-admin-border-width-focus)}.editor-collab-sidebar-panel__comment-status{margin-left:auto}.editor-collab-sidebar-panel__comment-status button.has-icon:not(.has-text){flex-shrink:0;height:24px;min-width:24px;padding:0;width:24px}.editor-collab-sidebar-panel__comment-dropdown-menu{flex-shrink:0}.editor-collab-sidebar-panel__more-reply-separator:after,.editor-collab-sidebar-panel__more-reply-separator:before{background-color:#ddd;content:"";display:block;flex:1;height:1px;width:100%}.editor-collab-sidebar-panel__more-reply-button{font-weight:500}.editor-collab-sidebar-panel__resolution-text{font-style:italic}.editor-collab-sidebar-panel__comment-form textarea{border:1px solid #949494;border-radius:2px;box-shadow:0 0 0 #0000;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:16px;line-height:normal;padding:6px 8px}@media not (prefers-reduced-motion){.editor-collab-sidebar-panel__comment-form textarea{transition:box-shadow .1s linear}}@media (min-width:600px){.editor-collab-sidebar-panel__comment-form textarea{font-size:13px;line-height:normal}}.editor-collab-sidebar-panel__comment-form textarea:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 .5px var(--wp-admin-theme-color);outline:2px solid #0000}.editor-collab-sidebar-panel__comment-form textarea::-webkit-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea::-moz-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea:-ms-input-placeholder{color:#1e1e1e9e}.editor-collab-sidebar-panel__comment-form textarea{display:block;line-height:20px!important;padding:9px 11px}.editor-collab-sidebar-panel__skip-to-block,.editor-collab-sidebar-panel__skip-to-comment{background:#fff!important;clip-path:inset(50%);overflow:hidden;position:absolute;right:-9999px;top:-9999px;z-index:-1}.editor-collab-sidebar-panel__skip-to-block:focus,.editor-collab-sidebar-panel__skip-to-comment:focus{clip-path:none;overflow:visible;right:8px;z-index:1}.editor-collab-sidebar-panel__skip-to-comment:focus{top:8px}.editor-collab-sidebar-panel__skip-to-block:focus{bottom:8px;top:auto}.comment-avatar{background:#fff;border-radius:50%;border-style:solid;border-width:var(--wp-admin-border-width-focus);margin-left:-12px;padding:var(--wp-admin-border-width-focus);width:24px}.comment-avatar:first-child{margin-left:0}.editor-collapsible-block-toolbar{align-items:center;display:flex;height:64px;overflow:hidden}.editor-collapsible-block-toolbar .block-editor-block-contextual-toolbar{background:#0000;border-bottom:0;height:100%}.editor-collapsible-block-toolbar .block-editor-block-toolbar{height:100%;padding-top:17px}.editor-collapsible-block-toolbar .block-editor-block-toolbar .components-button:not(.block-editor-block-mover-button){height:32px}.editor-collapsible-block-toolbar:after{background-color:#ddd;content:"";height:24px;margin-right:7px;width:1px}.editor-collapsible-block-toolbar .components-toolbar,.editor-collapsible-block-toolbar .components-toolbar-group{border-right:none;position:relative}.editor-collapsible-block-toolbar .components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar:after{background-color:#ddd;content:"";height:24px;position:absolute;right:-1px;top:4px;width:1px}.editor-collapsible-block-toolbar .components-toolbar .components-toolbar-group.components-toolbar-group:after,.editor-collapsible-block-toolbar .components-toolbar-group .components-toolbar-group.components-toolbar-group:after{display:none}.editor-collapsible-block-toolbar .block-editor-block-mover.is-horizontal .block-editor-block-mover-button{height:32px;overflow:visible}@media (min-width:600px){.editor-collapsible-block-toolbar .block-editor-block-mover:not(.is-horizontal) .block-editor-block-mover__move-button-container{height:40px;position:relative;top:-4px}}.editor-collapsible-block-toolbar.is-collapsed{display:none}.editor-content-only-settings-menu__description{min-width:235px;padding:8px}.editor-block-visibility__disabled-blocks-count{background-color:#fff;border:1px solid #ddd;border-width:1px 0;box-shadow:-32px 0 0 0 #fff,32px 0 0 0 #fff;padding:8px;position:sticky;text-align:center;top:-5px;z-index:2}.editor-block-visibility__disabled-blocks-count~.block-editor-block-manager__content .block-editor-block-manager__category-title{top:31px}.editor-block-visibility__disabled-blocks-count .is-link{margin-left:12px}.editor-blog-title-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-document-bar{align-items:center;background:#f0f0f0;border-radius:4px;display:flex;height:32px;justify-content:space-between;min-width:0;width:min(100%,450px)}.editor-document-bar:hover{background-color:#e0e0e0}.editor-document-bar .components-button{border-radius:4px}@media not (prefers-reduced-motion){.editor-document-bar .components-button{transition:all .1s ease-out}}.editor-document-bar .components-button:hover{background:#e0e0e0}@media screen and (min-width:782px) and (max-width:960px){.editor-document-bar.has-back-button .editor-document-bar__post-type-label{display:none}}.editor-document-bar__command{color:var(--wp-block-synced-color);flex-grow:1;overflow:hidden}.editor-document-bar__title{color:#1e1e1e;margin:0 auto;max-width:70%;overflow:hidden}@media (min-width:782px){.editor-document-bar__title{padding-left:24px}}.editor-document-bar__title h1{align-items:center;display:flex;font-weight:400;justify-content:center;overflow:hidden;white-space:nowrap}.editor-document-bar__post-title{color:currentColor;flex:1;overflow:hidden;text-overflow:ellipsis}.editor-document-bar__post-type-label{color:#2f2f2f;flex:0;padding-left:4px}@media screen and (max-width:600px){.editor-document-bar__post-type-label{display:none}}.editor-document-bar__shortcut{color:#2f2f2f;display:none;min-width:24px}@media (min-width:782px){.editor-document-bar__shortcut{display:initial}}.editor-document-bar__back.components-button.has-icon.has-text{color:#757575;flex-shrink:0;gap:0;min-width:36px;position:absolute;z-index:1}.editor-document-bar__back.components-button.has-icon.has-text:hover{background-color:initial;color:#1e1e1e}.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:none;margin-left:12px;pointer-events:none;position:absolute}.editor-document-bar__icon-layout.editor-document-bar__icon-layout svg{fill:#949494}@media (min-width:600px){.editor-document-bar__icon-layout.editor-document-bar__icon-layout{display:flex}}.document-outline{margin:20px 0}.document-outline ul{margin:0;padding:0}.document-outline__item{display:flex;margin:4px 0}.document-outline__item a{text-decoration:none}.document-outline__item .document-outline__emdash:before{color:#ddd;margin-right:4px}.document-outline__item.is-h2 .document-outline__emdash:before{content:"—"}.document-outline__item.is-h3 .document-outline__emdash:before{content:"——"}.document-outline__item.is-h4 .document-outline__emdash:before{content:"———"}.document-outline__item.is-h5 .document-outline__emdash:before{content:"————"}.document-outline__item.is-h6 .document-outline__emdash:before{content:"—————"}.document-outline__button{align-items:flex-start;background:none;border:none;border-radius:2px;color:#1e1e1e;cursor:pointer;display:flex;margin:0 0 0 -1px;padding:2px 5px 2px 1px;text-align:left}.document-outline__button:disabled,.document-outline__button[aria-disabled=true]{color:#757575;cursor:default}.document-outline__button:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);outline:2px solid #0000}.document-outline__level{background:#ddd;border-radius:3px;color:#1e1e1e;font-size:13px;margin-right:4px;padding:1px 6px}.is-invalid .document-outline__level{background:#f0b849}.document-outline__item-content{padding:1px 0}.editor-document-outline.has-no-headings>svg{margin-top:28px}.editor-document-outline.has-no-headings>p{padding-left:32px;padding-right:32px}.editor-document-outline.has-no-headings{color:#757575;text-align:center}.editor-document-tools{align-items:center;display:inline-flex}.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:none}@media (min-width:782px){.editor-document-tools .editor-document-tools__left>.editor-history__redo,.editor-document-tools .editor-document-tools__left>.editor-history__undo{display:inline-flex}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle{display:inline-flex}@media not (prefers-reduced-motion){.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle svg{transition:transform .2s cubic-bezier(.165,.84,.44,1)}}.editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.is-pressed svg{transform:rotate(45deg)}.editor-document-tools .block-editor-list-view{display:none}@media (min-width:600px){.editor-document-tools .block-editor-list-view{display:flex}}.editor-document-tools .editor-document-tools__left>.components-button.has-icon,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon{height:32px;min-width:32px;padding:4px}.editor-document-tools .editor-document-tools__left>.components-button.has-icon.is-pressed,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon.is-pressed{background:#1e1e1e}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:focus:not(:disabled),.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:focus:not(:disabled){box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color),inset 0 0 0 1px #fff;outline:1px solid #0000}.editor-document-tools .editor-document-tools__left>.components-button.has-icon:before,.editor-document-tools .editor-document-tools__left>.components-dropdown>.components-button.has-icon:before{display:none}.editor-document-tools__left{align-items:center;display:inline-flex;gap:8px}.editor-document-tools__left:not(:last-child){margin-inline-end:8px}.show-icon-labels .editor-document-tools .editor-document-tools__left>.editor-document-tools__inserter-toggle.has-icon{padding:0 8px;width:auto}.show-icon-labels .editor-document-tools__left>*+*{margin-left:8px}.editor-editor-interface .entities-saved-states__panel-header{height:65px}.editor-editor-interface .interface-interface-skeleton__content{isolation:isolate}.editor-visual-editor{flex:1 0 auto}.components-editor-notices__dismissible,.components-editor-notices__pinned{color:#1e1e1e;left:0;position:relative;right:0;top:0}.components-editor-notices__dismissible .components-notice,.components-editor-notices__pinned .components-notice{border-bottom:1px solid #0003;box-sizing:border-box;min-height:64px;padding:0 12px}.components-editor-notices__dismissible .components-notice .components-notice__dismiss,.components-editor-notices__pinned .components-notice .components-notice__dismiss{margin-top:12px}.entities-saved-states__panel-header{background:#fff;border-bottom:1px solid #ddd;box-sizing:border-box;height:64px;padding-left:16px;padding-right:16px}.entities-saved-states__text-prompt{padding:16px 16px 4px}.entities-saved-states__text-prompt .entities-saved-states__text-prompt--header{display:block;margin-bottom:12px}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt{padding:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body{border:0;padding-left:0;padding-right:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2{margin-bottom:0;margin-left:-16px;margin-right:-16px}.entities-saved-states__panel.is-inline .entities-saved-states__panel-body>h2 button{font-size:11px;text-transform:uppercase}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--header-wrapper{display:none}.entities-saved-states__panel.is-inline .entities-saved-states__text-prompt--changes-count{margin-bottom:8px;margin-top:0}.entities-saved-states__panel.is-inline .entities-saved-states__panel-footer{margin-top:16px}.entities-saved-states__change-control{flex:1}.entities-saved-states__changes{font-size:13px;list-style:disc;margin:4px 16px 0 24px}.entities-saved-states__changes li{margin-bottom:4px}.editor-error-boundary{background-color:#fff;border:1px solid #1e1e1e;border-radius:2px;box-shadow:0 5px 15px #00000014,0 15px 27px #00000012,0 30px 36px #0000000a,0 50px 43px #00000005;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;margin:64px auto auto;max-width:780px;padding:1em}.editor-header{box-sizing:border-box}.editor-header *,.editor-header :after,.editor-header :before{box-sizing:inherit}.editor-header{background:#fff;display:grid;grid-auto-flow:row;grid-template:auto/64px minmax(0,max-content) minmax(min-content,1fr) 64px;height:64px}.editor-header:has(>.editor-header__center){grid-template:auto/64px min-content 1fr min-content 64px}@media (min-width:782px){.editor-header:has(>.editor-header__center){grid-template:auto/64px minmax(min-content,2fr) 2.5fr minmax(min-content,2fr) 64px}}@media (min-width:480px){.editor-header{gap:16px}}.editor-header{align-items:center;justify-content:space-between;max-width:100vw}@media (min-width:280px){.editor-header{flex-wrap:nowrap}}.editor-header__toolbar{grid-column:1/3}.editor-header__toolbar>:first-child{margin-inline:16px 0}.editor-header__back-button+.editor-header__toolbar{grid-column:2/3}@media (min-width:480px){.editor-header__back-button+.editor-header__toolbar>:first-child{margin-inline:0}}.editor-header__toolbar{align-items:center;clip-path:inset(-2px);display:flex;min-width:0}@media (min-width:480px){.editor-header__toolbar{clip-path:none}}.editor-header__toolbar .table-of-contents{display:none}@media (min-width:600px){.editor-header__toolbar .table-of-contents{display:block}}.editor-header__toolbar .editor-collapsible-block-toolbar,.editor-header__toolbar .editor-collapsible-block-toolbar.is-collapsed~.editor-collapsible-block-toolbar__toggle{margin-inline:8px 0}.editor-header__center{align-items:center;clip-path:inset(-2px);display:flex;grid-column:3/4;justify-content:center;min-width:0}@media (max-width:479px){.editor-header__center>:first-child{margin-inline-start:8px}.editor-header__center>:last-child{margin-inline-end:8px}}.editor-header__settings{grid-column:3/-1}.editor-header:has(>.editor-header__center) .editor-header__settings{grid-column:4/-1}.editor-header__settings{align-items:center;display:inline-flex;flex-wrap:nowrap;justify-self:end;padding-right:4px}@media (min-width:600px){.editor-header__settings{padding-right:8px}}.editor-header__settings{gap:8px}.show-icon-labels .editor-header .components-button.has-icon,.show-icon-labels.interface-pinned-items .components-button.has-icon{width:auto}.show-icon-labels .editor-header .components-button.has-icon svg,.show-icon-labels.interface-pinned-items .components-button.has-icon svg{display:none}.show-icon-labels .editor-header .components-button.has-icon:after,.show-icon-labels.interface-pinned-items .components-button.has-icon:after{content:attr(aria-label);white-space:nowrap}.show-icon-labels .editor-header .components-button.has-icon[aria-disabled=true],.show-icon-labels.interface-pinned-items .components-button.has-icon[aria-disabled=true]{background-color:initial}.show-icon-labels .editor-header .is-tertiary:active,.show-icon-labels.interface-pinned-items .is-tertiary:active{background-color:initial;box-shadow:0 0 0 1.5px var(--wp-admin-theme-color)}.show-icon-labels .editor-header .components-button.has-icon.button-toggle svg,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle svg{display:block}.show-icon-labels .editor-header .components-button.has-icon.button-toggle:after,.show-icon-labels.interface-pinned-items .components-button.has-icon.button-toggle:after{content:none}.show-icon-labels .editor-header .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon,.show-icon-labels.interface-pinned-items .components-menu-items-choice .components-menu-items__item-icon.components-menu-items__item-icon{display:block}.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:8px;padding-right:8px}@media (min-width:600px){.show-icon-labels .editor-header .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels .editor-header .interface-pinned-items .components-button,.show-icon-labels.interface-pinned-items .editor-document-tools__inserter-toggle.editor-document-tools__inserter-toggle,.show-icon-labels.interface-pinned-items .interface-pinned-items .components-button{padding-left:12px;padding-right:12px}}.show-icon-labels .editor-header .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels .editor-header .editor-post-saved-state.editor-post-saved-state:after,.show-icon-labels.interface-pinned-items .editor-post-save-draft.editor-post-save-draft:after,.show-icon-labels.interface-pinned-items .editor-post-saved-state.editor-post-saved-state:after{content:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover{border-left:none}.show-icon-labels .editor-header__toolbar .block-editor-block-mover:before{background-color:#ddd;content:"";height:24px;margin-left:8px;margin-top:4px;width:1px}.show-icon-labels .editor-header__toolbar .block-editor-block-mover .block-editor-block-mover__move-button-container:before{background:#ddd;left:calc(50% + 1px);width:calc(100% - 24px)}.show-icon-labels.interface-pinned-items{border-bottom:1px solid #ccc;display:block;margin:0 -12px;padding:6px 12px 12px}.show-icon-labels.interface-pinned-items>.components-button.has-icon{justify-content:flex-start;margin:0;padding:6px 6px 6px 8px;width:14.625rem}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=true] svg{display:block;max-width:24px}.show-icon-labels.interface-pinned-items>.components-button.has-icon[aria-expanded=false]{padding-left:40px}.show-icon-labels.interface-pinned-items>.components-button.has-icon svg{margin-right:8px}@media (min-width:480px){.editor-header__post-preview-button{display:none}}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header{border-bottom:none}.editor-editor-interface.is-distraction-free .editor-header{background-color:#fff;width:100%}@media (min-width:782px){.editor-editor-interface.is-distraction-free .editor-header{box-shadow:0 1px 0 0 rgba(0,0,0,.133);position:absolute}}.editor-editor-interface.is-distraction-free .editor-header>.edit-post-header__settings>.edit-post-header__post-preview-button{visibility:hidden}.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-preview-dropdown,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.editor-zoom-out-toggle,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__settings>.interface-pinned-items,.editor-editor-interface.is-distraction-free .editor-header>.editor-header__toolbar .editor-document-tools__document-overview-toggle{display:none}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within{opacity:1!important}.editor-editor-interface.is-distraction-free .interface-interface-skeleton__header:focus-within div{transform:translateX(0) translateZ(0)!important}.editor-editor-interface.is-distraction-free .components-editor-notices__dismissible{position:absolute;z-index:35}.components-popover.more-menu-dropdown__content{z-index:99998}.editor-inserter-sidebar{box-sizing:border-box}.editor-inserter-sidebar *,.editor-inserter-sidebar :after,.editor-inserter-sidebar :before{box-sizing:inherit}.editor-inserter-sidebar{display:flex;flex-direction:column;height:100%}.editor-inserter-sidebar__content{height:100%}.editor-keyboard-shortcut-help-modal__section{margin:0 0 2rem}.editor-keyboard-shortcut-help-modal__section-title{font-size:.9rem;font-weight:600}.editor-keyboard-shortcut-help-modal__shortcut{align-items:baseline;border-top:1px solid #ddd;display:flex;margin-bottom:0;padding:.6rem 0}.editor-keyboard-shortcut-help-modal__shortcut:last-child{border-bottom:1px solid #ddd}.editor-keyboard-shortcut-help-modal__shortcut:empty{display:none}.editor-keyboard-shortcut-help-modal__shortcut-term{font-weight:600;margin:0 0 0 1rem;text-align:right}.editor-keyboard-shortcut-help-modal__shortcut-description{flex:1;margin:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination{background:none;display:block;margin:0;padding:0}.editor-keyboard-shortcut-help-modal__shortcut-key-combination+.editor-keyboard-shortcut-help-modal__shortcut-key-combination{margin-top:10px}.editor-keyboard-shortcut-help-modal__shortcut-key{border-radius:8%;margin:0 .2rem;padding:.25rem .5rem}.editor-keyboard-shortcut-help-modal__shortcut-key:last-child{margin:0 0 0 .2rem}.editor-list-view-sidebar{height:100%}@media (min-width:782px){.editor-list-view-sidebar{width:350px}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{height:100%}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar{height:12px;width:12px}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-track,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-track{background-color:initial}.editor-list-view-sidebar__list-view-container>.document-outline::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.editor-list-view-sidebar__list-view-container>.document-outline:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-container>.document-outline:hover::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus-within::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:focus::-webkit-scrollbar-thumb,.editor-list-view-sidebar__list-view-panel-content:hover::-webkit-scrollbar-thumb{background-color:#949494}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin}.editor-list-view-sidebar__list-view-container>.document-outline:focus,.editor-list-view-sidebar__list-view-container>.document-outline:focus-within,.editor-list-view-sidebar__list-view-container>.document-outline:hover,.editor-list-view-sidebar__list-view-panel-content:focus,.editor-list-view-sidebar__list-view-panel-content:focus-within,.editor-list-view-sidebar__list-view-panel-content:hover{scrollbar-color:#949494 #0000}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{will-change:transform}@media (hover:none){.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{scrollbar-color:#949494 #0000}}.editor-list-view-sidebar__list-view-container>.document-outline,.editor-list-view-sidebar__list-view-panel-content{overflow:auto;padding:4px;scrollbar-gutter:auto}.editor-list-view-sidebar__list-view-container{display:flex;flex-direction:column;height:100%}.editor-list-view-sidebar__tab-panel{height:100%}.editor-list-view-sidebar__outline{border-bottom:1px solid #ddd;display:flex;flex-direction:column;gap:8px;padding:16px}.editor-list-view-sidebar__outline>div>span:first-child{display:inline-block;width:90px}.editor-list-view-sidebar__outline>div>span{color:#757575;font-size:12px;line-height:1.4}.editor-post-order__panel,.editor-post-parent__panel{padding-top:8px}.editor-post-order__panel .editor-post-panel__row-control>div,.editor-post-parent__panel .editor-post-panel__row-control>div{width:100%}.editor-post-order__panel-dialog .editor-post-order,.editor-post-order__panel-dialog .editor-post-parent,.editor-post-parent__panel-dialog .editor-post-order,.editor-post-parent__panel-dialog .editor-post-parent{margin:8px}.editor-post-order__panel-dialog .components-popover__content,.editor-post-parent__panel-dialog .components-popover__content{min-width:320px}.editor-post-author__panel{padding-top:8px}.editor-post-author__panel .editor-post-panel__row-control>div{width:100%}.editor-post-author__panel-dialog .editor-post-author{margin:8px;min-width:248px}.editor-action-modal{z-index:1000001}.editor-post-card-panel__content{flex-grow:1}.editor-post-card-panel__title{width:100%}.editor-post-card-panel__title.editor-post-card-panel__title{align-items:center;column-gap:8px;display:flex;flex-wrap:wrap;font-family:-apple-system,"system-ui",Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:500;line-height:20px;margin:0;row-gap:4px;word-break:break-word}.editor-post-card-panel__icon{flex:0 0 24px;height:24px;width:24px}.editor-post-card-panel__header{display:flex;justify-content:space-between}.editor-post-card-panel.has-description .editor-post-card-panel__header{margin-bottom:8px}.editor-post-card-panel .editor-post-card-panel__title-name{padding:2px 0}.editor-post-card-panel .editor-post-card-panel__description,.editor-post-content-information{color:#757575}.editor-post-content-information .components-text{color:inherit}.editor-post-discussion__panel-dialog .editor-post-discussion{margin:8px;min-width:248px}.editor-post-discussion__panel-toggle .components-text{color:inherit}.editor-post-discussion__panel-dialog .components-popover__content{min-width:320px}.editor-post-excerpt__textarea{margin-bottom:10px;width:100%}.editor-post-excerpt__dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-featured-image{padding:0}.editor-post-featured-image .hidden{display:none}.editor-post-featured-image .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.editor-post-featured-image__container{position:relative}.editor-post-featured-image__container:focus .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:focus-within .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image),.editor-post-featured-image__container:hover .editor-post-featured-image__actions:not(.editor-post-featured-image__actions-is-requesting-image){opacity:1}.editor-post-featured-image__container .editor-post-featured-image__actions.editor-post-featured-image__actions-missing-image{margin-top:16px;opacity:1}.editor-post-featured-image__container .components-drop-zone__content{border-radius:2px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner{align-items:center;display:flex;gap:8px}.editor-post-featured-image__container:has(.editor-post-featured-image__toggle) .components-drop-zone .components-drop-zone__content-inner .components-drop-zone__content-icon{margin:0}.editor-post-featured-image__preview,.editor-post-featured-image__toggle{box-shadow:0 0 0 0 var(--wp-admin-theme-color);display:flex;justify-content:center;min-height:40px;outline-offset:-1px;overflow:hidden;padding:0;width:100%}.editor-post-featured-image__preview{height:auto!important;outline:1px solid #0000001a}.editor-post-featured-image__preview .editor-post-featured-image__preview-image{aspect-ratio:2/1;object-fit:cover;object-position:50% 50%;width:100%}.editor-post-featured-image__toggle{box-shadow:inset 0 0 0 1px #ccc}.editor-post-featured-image__toggle:focus:not(:disabled){box-shadow:0 0 0 currentColor inset,0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){bottom:0;opacity:0;padding:8px;position:absolute}@media not (prefers-reduced-motion){.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image){transition:opacity 50ms ease-out}}.editor-post-featured-image__actions:not(.editor-post-featured-image__actions-missing-image) .editor-post-featured-image__action{backdrop-filter:blur(16px) saturate(180%);background:#ffffffbf}.editor-post-featured-image__actions .editor-post-featured-image__action{flex-grow:1;justify-content:center}[class].editor-post-format__suggestion{margin:4px 0 0}.editor-post-format__dialog .editor-post-format__dialog-content{margin:8px;min-width:248px}.editor-post-last-edited-panel{color:#757575}.editor-post-last-edited-panel .components-text{color:inherit}.editor-post-last-revision__title{font-weight:500;width:100%}.editor-post-last-revision__title.components-button.has-icon{height:100%;justify-content:space-between}.editor-post-last-revision__title.components-button.has-icon:active,.editor-post-last-revision__title.components-button.has-icon:hover{background:#f0f0f0}.editor-post-last-revision__title.components-button.has-icon:focus{border-radius:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.components-panel__body.is-opened.editor-post-last-revision__panel{height:48px;padding:0}.components-panel__body.is-opened.editor-post-last-revision__panel .editor-post-last-revision__title.components-button.components-button{padding:16px}.editor-private-post-last-revision__button{display:inline-block}.editor-post-locked-modal__buttons{margin-top:24px}.editor-post-locked-modal__avatar{border-radius:50%;margin-top:16px;min-width:auto!important}.editor-post-panel__row{align-items:flex-start!important;justify-content:flex-start!important;min-height:32px;width:100%}.editor-post-panel__row-label{align-items:center;display:flex;flex-shrink:0;hyphens:auto;line-height:20px;min-height:32px;padding:6px 0;width:38%}.editor-post-panel__row-control{align-items:center;display:flex;flex-grow:1;min-height:32px}.editor-post-panel__row-control .components-button{height:auto;max-width:100%;min-height:32px;text-align:left;text-wrap:balance;text-wrap:pretty;white-space:normal}.editor-post-panel__row-control .components-dropdown{max-width:100%}.editor-post-panel__section{padding:16px}.editor-post-publish-panel__content{min-height:calc(100% - 148px)}.editor-post-publish-panel__content>.components-spinner{display:block;margin:100px auto 0}.editor-post-publish-panel__header{align-content:space-between;align-items:center;background:#fff;border-bottom:1px solid #ddd;display:flex;height:65px;padding-left:16px;padding-right:16px}.editor-post-publish-panel__header .components-button{justify-content:center;width:100%}.editor-post-publish-panel__header .has-icon{margin-left:auto;width:auto}.components-site-card{align-items:center;display:flex;margin:16px 0}.components-site-icon{border:none;border-radius:2px;flex-shrink:0;height:36px;margin-right:12px;width:36px}.components-site-name{display:block;font-size:14px}.components-site-home{color:#757575;display:block;font-size:12px;word-break:break-word}.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{flex:1}@media (min-width:480px){.editor-post-publish-panel__header-cancel-button,.editor-post-publish-panel__header-publish-button{max-width:160px}}.editor-post-publish-panel__header-publish-button{justify-content:center;padding-left:4px}.editor-post-publish-panel__header-cancel-button{padding-right:4px}.editor-post-publish-panel__header-published{flex-grow:1}.editor-post-publish-panel__footer{padding:16px}.components-button.editor-post-publish-panel__toggle.is-primary{align-items:center;display:inline-flex}.components-button.editor-post-publish-panel__toggle.is-primary.is-busy .dashicon{display:none}.components-button.editor-post-publish-panel__toggle.is-primary .dashicon{margin-right:-4px}.editor-post-publish-panel__link{font-weight:400;padding-left:4px}.editor-post-publish-panel__prepublish{padding:16px}.editor-post-publish-panel__prepublish strong{color:#1e1e1e}.editor-post-publish-panel__prepublish .components-panel__body{background:#fff;margin-left:-16px;margin-right:-16px}.editor-post-publish-panel__prepublish .editor-post-visibility__dialog-legend{display:none}.editor-post-publish-panel__prepublish .components-panel__body-title .components-button{align-items:flex-start;text-wrap:balance;text-wrap:pretty}.post-publish-panel__postpublish .components-panel__body{border-bottom:1px solid #e0e0e0;border-top:none;word-break:break-word}.post-publish-panel__postpublish-buttons{align-content:space-between;display:flex;flex-wrap:wrap;gap:16px}.post-publish-panel__postpublish-buttons .components-button,.post-publish-panel__postpublish-buttons .components-button.has-icon{flex:1;justify-content:center;min-width:unset}.post-publish-panel__postpublish-buttons .components-clipboard-button{width:100%}.post-publish-panel__postpublish-post-address-container{align-items:flex-end;display:flex;margin-bottom:16px}.post-publish-panel__postpublish-post-address-container .post-publish-panel__postpublish-post-address{flex:1}.post-publish-panel__postpublish-post-address-container input[readonly]{background:#f0f0f0;border-color:#ccc;height:36px;overflow:hidden;padding:12px;text-overflow:ellipsis}.post-publish-panel__postpublish-post-address__copy-button-wrap{flex-shrink:0;margin-left:16px}.post-publish-panel__postpublish-header{font-weight:500}.post-publish-panel__postpublish-subheader{margin:0 0 8px}.post-publish-panel__tip{color:#f0b849}@media screen and (max-width:782px){.post-publish-panel__postpublish-post-address__button-wrap .components-button{height:40px}}.editor-post-publish-panel{box-sizing:border-box}.editor-post-publish-panel *,.editor-post-publish-panel :after,.editor-post-publish-panel :before{box-sizing:inherit}.editor-post-publish-panel{background:#fff;bottom:0;left:0;overflow:auto;position:fixed;right:0;top:46px;z-index:100001}@media (min-width:782px){.editor-post-publish-panel{border-left:1px solid #ddd;left:auto;top:32px;width:281px;z-index:99998}}@media (min-width:782px) and (not (prefers-reduced-motion)){.editor-post-publish-panel{animation:editor-post-publish-panel__slide-in-animation .1s forwards;transform:translateX(100%)}}@media (min-width:782px){body.is-fullscreen-mode .editor-post-publish-panel{top:0}[role=region]:focus .editor-post-publish-panel{transform:translateX(0)}}@keyframes editor-post-publish-panel__slide-in-animation{to{transform:translateX(0)}}.editor-post-saved-state{align-items:center;color:#757575;display:flex;overflow:hidden;padding:12px 4px;white-space:nowrap;width:28px}.editor-post-saved-state.is-saved[aria-disabled=true],.editor-post-saved-state.is-saved[aria-disabled=true]:hover,.editor-post-saved-state.is-saving[aria-disabled=true],.editor-post-saved-state.is-saving[aria-disabled=true]:hover{background:#0000;color:#757575}.editor-post-saved-state svg{display:inline-block;flex:0 0 auto;fill:currentColor;margin-right:8px}@media (min-width:600px){.editor-post-saved-state{padding:8px 12px;text-indent:inherit;width:auto}.editor-post-saved-state svg{margin-right:0}}.editor-post-save-draft.has-text.has-icon svg{margin-right:0}.editor-post-schedule__panel-dropdown{width:100%}.editor-post-schedule__dialog .components-popover__content{min-width:320px;padding:16px}.editor-post-status{max-width:100%}.editor-post-status.is-read-only{padding:6px 12px}.editor-post-status .editor-post-status__toggle.editor-post-status__toggle{padding-bottom:4px;padding-top:4px}.editor-change-status__password-fieldset,.editor-change-status__publish-date-wrapper{border-top:1px solid #e0e0e0;padding-top:16px}.editor-change-status__content .components-popover__content{min-width:320px;padding:16px}.editor-change-status__content .editor-change-status__password-legend{margin-bottom:8px;padding:0}.editor-change-status__content p.components-base-control__help:has(.components-checkbox-control__help){margin-top:4px}.editor-post-sticky__checkbox-control{border-top:1px solid #e0e0e0;padding-top:16px}.editor-post-sync-status__value{padding:6px 0 6px 12px}.editor-post-taxonomies__hierarchical-terms-list{margin-left:-6px;margin-top:-6px;max-height:14em;overflow:auto;padding-left:6px;padding-top:6px}.editor-post-taxonomies__hierarchical-terms-choice{margin-bottom:8px}.editor-post-taxonomies__hierarchical-terms-choice:last-child{margin-bottom:4px}.editor-post-taxonomies__hierarchical-terms-subchoices{margin-left:16px;margin-top:8px}.editor-post-taxonomies__flat-term-most-used .editor-post-taxonomies__flat-term-most-used-label{margin-bottom:4px}.editor-post-taxonomies__flat-term-most-used-list{margin:0}.editor-post-taxonomies__flat-term-most-used-list li{display:inline-block;margin-right:8px}.editor-post-template__swap-template-modal{z-index:1000001}.editor-post-template__swap-template-modal .editor-post-template__swap-template-search{background:#fff;margin-bottom:-4px;padding:16px 0;position:sticky;top:0;transform:translateY(-4px);z-index:2}.editor-post-template__create-template-modal{z-index:1000001}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px;padding-top:2px}@media (min-width:782px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list{column-count:4}}.editor-post-template__swap-template-modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-post-template__dropdown .components-popover__content{min-width:240px}.editor-post-template__dropdown .components-button.is-pressed,.editor-post-template__dropdown .components-button.is-pressed:hover{background:inherit;color:inherit}@media (min-width:782px){.editor-post-template__create-form{width:320px}}.editor-post-template__classic-theme-dropdown{padding:8px}textarea.editor-post-text-editor{border:1px solid #949494;border-radius:0;box-shadow:none;display:block;font-family:Menlo,Consolas,monaco,monospace;line-height:2.4;margin:0;min-height:200px;overflow:hidden;resize:none;width:100%}@media not (prefers-reduced-motion){textarea.editor-post-text-editor{transition:border .1s ease-out,box-shadow .1s linear}}textarea.editor-post-text-editor{padding:16px}@media (min-width:600px){textarea.editor-post-text-editor{padding:24px}}textarea.editor-post-text-editor{font-size:16px!important}@media (min-width:600px){textarea.editor-post-text-editor{font-size:15px!important}}textarea.editor-post-text-editor:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);position:relative}textarea.editor-post-text-editor::-webkit-input-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor::-moz-placeholder{color:#1e1e1e9e}textarea.editor-post-text-editor:-ms-input-placeholder{color:#1e1e1e9e}.editor-post-title.is-raw-text{margin-bottom:24px;margin-top:2px;max-width:none}.editor-post-url__panel-dropdown{width:100%}.editor-post-url__panel-dialog .editor-post-url{margin:8px;min-width:248px}.editor-post-url__front-page-link,.editor-post-url__link{direction:ltr;word-break:break-word}.editor-post-url__front-page-link{border-radius:2px;color:var(--wp-admin-theme-color);padding:6px 12px}.editor-post-url__front-page-link:hover{background:color-mix(in srgb,var(--wp-admin-theme-color) 4%,#0000);color:var(--wp-admin-theme-color-darker-20,#183ad6)}.editor-post-url__front-page-link:focus{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);color:var(--wp-admin-theme-color);outline:3px solid #0000}.editor-post-url__link-slug{font-weight:600}.editor-post-url__input input.components-input-control__input{padding-inline-start:0!important}.editor-post-parent__panel-toggle,.editor-post-url__panel-toggle{word-break:break-word}.editor-post-url__intro{margin:0}.editor-post-url__permalink{margin-bottom:0;margin-top:8px}.editor-post-url__permalink-visual-label{display:block}.editor-posts-per-page-dropdown__content .components-popover__content{min-width:320px;padding:16px}.editor-post-trash.components-button{flex-grow:1;justify-content:center}.editor-preview-dropdown .editor-preview-dropdown__toggle.has-icon.has-text{padding-left:6px;padding-right:4px}.editor-preview-dropdown__button-external{display:flex;justify-content:space-between;width:100%}.editor-resizable-editor.is-resizable{margin:0 auto;overflow:visible}.editor-resizable-editor__resize-handle{appearance:none;background:none;border:0;border-radius:9999px;bottom:0;cursor:ew-resize;height:100px;margin:auto 0;outline:none;padding:0;position:absolute;top:0;width:12px}.editor-resizable-editor__resize-handle:after{background-color:#75757566;border-radius:9999px;bottom:16px;content:"";left:4px;position:absolute;right:0;top:16px;width:4px}.editor-resizable-editor__resize-handle.is-left{left:-18px}.editor-resizable-editor__resize-handle.is-right{right:-18px}.editor-resizable-editor__resize-handle:active,.editor-resizable-editor__resize-handle:focus,.editor-resizable-editor__resize-handle:hover{opacity:1}.editor-resizable-editor__resize-handle:active:after,.editor-resizable-editor__resize-handle:focus:after,.editor-resizable-editor__resize-handle:hover:after{background-color:var(--wp-admin-theme-color)}.editor-layout__toggle-entities-saved-states-panel,.editor-layout__toggle-publish-panel,.editor-layout__toggle-sidebar-panel{background-color:#fff;border:1px dotted #ddd;bottom:auto;box-sizing:border-box;display:flex;height:auto!important;justify-content:center;left:auto;padding:24px;position:fixed!important;right:0;top:-9999em;width:280px;z-index:100000}.interface-interface-skeleton__actions:focus .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus .editor-layout__toggle-publish-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-entities-saved-states-panel,.interface-interface-skeleton__actions:focus-within .editor-layout__toggle-publish-panel{bottom:0;top:auto}.editor-start-page-options__modal .editor-start-page-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-page-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-page-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column;margin-bottom:24px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__container{min-height:100px}.editor-start-page-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-preview__content{width:100%}.editor-start-template-options__modal .editor-start-template-options__modal__actions{background-color:#fff;border-top:1px solid #ddd;bottom:0;height:92px;margin-left:-32px;margin-right:-32px;padding-left:32px;padding-right:32px;position:absolute;width:100%;z-index:1}.editor-start-template-options__modal .block-editor-block-patterns-list{padding-bottom:92px}.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:2;column-gap:24px}@media (min-width:782px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:3}}@media (min-width:1280px){.editor-start-template-options__modal-content .block-editor-block-patterns-list{column-count:4}}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item{break-inside:avoid-column}.editor-start-template-options__modal-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item .block-editor-block-patterns-list__item-title{display:none}.components-panel__header.editor-sidebar__panel-tabs{padding-left:0;padding-right:8px}.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{padding:0}@media (min-width:782px){.components-panel__header.editor-sidebar__panel-tabs .components-button.has-icon{display:flex}}.editor-post-summary .components-v-stack:empty{display:none}.editor-sidebar{box-sizing:border-box}.editor-sidebar *,.editor-sidebar :after,.editor-sidebar :before{box-sizing:inherit}.editor-site-discussion-dropdown__content .components-popover__content{min-width:320px;padding:16px}.table-of-contents__popover.components-popover .components-popover__content{min-width:380px}.components-popover.table-of-contents__popover{z-index:99998}.table-of-contents__popover .components-popover__content{padding:16px}@media (min-width:600px){.table-of-contents__popover .components-popover__content{max-height:calc(100vh - 120px);overflow-y:auto}}.table-of-contents__popover hr{margin:10px -16px 0}.table-of-contents__wrapper:focus:before{bottom:0;box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}.table-of-contents__counts{display:flex;flex-wrap:wrap;margin:-8px 0 0}.table-of-contents__count{color:#1e1e1e;display:flex;flex-basis:33%;flex-direction:column;font-size:13px;margin-bottom:0;margin-top:8px;padding-right:8px}.table-of-contents__count:nth-child(4n){padding-right:0}.table-of-contents__number,.table-of-contents__popover .word-count{color:#1e1e1e;font-size:21px;font-weight:400;line-height:30px}.table-of-contents__title{display:block;font-size:15px;font-weight:600;margin-top:20px}.editor-text-editor{box-sizing:border-box}.editor-text-editor *,.editor-text-editor :after,.editor-text-editor :before{box-sizing:inherit}.editor-text-editor{background-color:#fff;flex-grow:1;position:relative;width:100%}.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){border:1px solid #949494;border-radius:0;font-family:Menlo,Consolas,monaco,monospace;font-size:2.5em;font-weight:400;line-height:1.4;max-width:none;padding:16px}@media (min-width:600px){.editor-text-editor .editor-post-title.is-raw-text textarea,.editor-text-editor .editor-post-title:not(.is-raw-text){padding:24px}}.editor-text-editor .editor-post-title.is-raw-text textarea:focus,.editor-text-editor .editor-post-title:not(.is-raw-text):focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.editor-text-editor__body{margin-left:auto;margin-right:auto;max-width:1080px;padding:0 12px 12px;width:100%}@media (min-width:960px){.editor-text-editor__body{padding:0 24px 24px}}.editor-text-editor__toolbar{background:#fffc;display:flex;left:0;padding:4px 12px;position:sticky;right:0;top:0;z-index:1}@media (min-width:600px){.editor-text-editor__toolbar{padding:12px}}@media (min-width:960px){.editor-text-editor__toolbar{padding:12px 24px}}.editor-text-editor__toolbar h2{color:#1e1e1e;font-size:13px;line-height:40px;margin:0 auto 0 0}.editor-visual-editor{background-color:var(--wp-editor-canvas-background);display:flex;position:relative}.editor-visual-editor iframe[name=editor-canvas]{background-color:initial}.editor-visual-editor{align-items:center}.editor-visual-editor.is-resizable{max-height:100%}.editor-visual-editor.has-padding{padding:24px 24px 0}.editor-visual-editor.is-iframed{overflow:hidden}.editor-visual-editor .components-button{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;padding:6px 12px}.editor-visual-editor .components-button.has-icon,.editor-visual-editor .components-button.is-tertiary{padding:6px}.editor-fields-content-preview{border-radius:4px;display:flex;flex-direction:column;height:100%}.dataviews-view-table .editor-fields-content-preview{flex-grow:0;width:96px}.editor-fields-content-preview .block-editor-block-preview__container,.editor-fields-content-preview .editor-fields-content-preview__empty{margin-bottom:auto;margin-top:auto}.editor-fields-content-preview__empty{text-align:center}
\ No newline at end of file
diff --git a/wp-includes/css/dist/format-library/style-rtl.css b/wp-includes/css/dist/format-library/style-rtl.css
index e128f657cc..9a4039a55b 100644
--- a/wp-includes/css/dist/format-library/style-rtl.css
+++ b/wp-includes/css/dist/format-library/style-rtl.css
@@ -33,4 +33,8 @@
.block-editor-format-toolbar__language-popover .components-popover__content{
padding:1rem;
width:auto;
+}
+
+.block-editor-format-toolbar__math-input{
+ direction:ltr;
}
\ No newline at end of file
diff --git a/wp-includes/css/dist/format-library/style-rtl.min.css b/wp-includes/css/dist/format-library/style-rtl.min.css
index 2421072cac..3c488e24da 100644
--- a/wp-includes/css/dist/format-library/style-rtl.min.css
+++ b/wp-includes/css/dist/format-library/style-rtl.min.css
@@ -1 +1 @@
-.block-editor-format-toolbar__image-popover{z-index:159990}.block-editor-format-toolbar__image-popover .block-editor-format-toolbar__image-container-content{padding:16px;width:260px}.block-editor-format-toolbar__link-container-content{align-items:center;display:flex}.block-editor-format-toolbar__link-container-value{flex-grow:1;flex-shrink:1;margin:7px;max-width:500px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-editor-format-toolbar__link-container-value.has-invalid-link{color:#cc1818}.format-library__inline-color-popover [role=tabpanel]{padding:16px;width:260px}.block-editor-format-toolbar__language-popover .components-popover__content{padding:1rem;width:auto}
\ No newline at end of file
+.block-editor-format-toolbar__image-popover{z-index:159990}.block-editor-format-toolbar__image-popover .block-editor-format-toolbar__image-container-content{padding:16px;width:260px}.block-editor-format-toolbar__link-container-content{align-items:center;display:flex}.block-editor-format-toolbar__link-container-value{flex-grow:1;flex-shrink:1;margin:7px;max-width:500px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-editor-format-toolbar__link-container-value.has-invalid-link{color:#cc1818}.format-library__inline-color-popover [role=tabpanel]{padding:16px;width:260px}.block-editor-format-toolbar__language-popover .components-popover__content{padding:1rem;width:auto}.block-editor-format-toolbar__math-input{direction:ltr}
\ No newline at end of file
diff --git a/wp-includes/css/dist/format-library/style.css b/wp-includes/css/dist/format-library/style.css
index e128f657cc..9a4039a55b 100644
--- a/wp-includes/css/dist/format-library/style.css
+++ b/wp-includes/css/dist/format-library/style.css
@@ -33,4 +33,8 @@
.block-editor-format-toolbar__language-popover .components-popover__content{
padding:1rem;
width:auto;
+}
+
+.block-editor-format-toolbar__math-input{
+ direction:ltr;
}
\ No newline at end of file
diff --git a/wp-includes/css/dist/format-library/style.min.css b/wp-includes/css/dist/format-library/style.min.css
index 2421072cac..3c488e24da 100644
--- a/wp-includes/css/dist/format-library/style.min.css
+++ b/wp-includes/css/dist/format-library/style.min.css
@@ -1 +1 @@
-.block-editor-format-toolbar__image-popover{z-index:159990}.block-editor-format-toolbar__image-popover .block-editor-format-toolbar__image-container-content{padding:16px;width:260px}.block-editor-format-toolbar__link-container-content{align-items:center;display:flex}.block-editor-format-toolbar__link-container-value{flex-grow:1;flex-shrink:1;margin:7px;max-width:500px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-editor-format-toolbar__link-container-value.has-invalid-link{color:#cc1818}.format-library__inline-color-popover [role=tabpanel]{padding:16px;width:260px}.block-editor-format-toolbar__language-popover .components-popover__content{padding:1rem;width:auto}
\ No newline at end of file
+.block-editor-format-toolbar__image-popover{z-index:159990}.block-editor-format-toolbar__image-popover .block-editor-format-toolbar__image-container-content{padding:16px;width:260px}.block-editor-format-toolbar__link-container-content{align-items:center;display:flex}.block-editor-format-toolbar__link-container-value{flex-grow:1;flex-shrink:1;margin:7px;max-width:500px;min-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.block-editor-format-toolbar__link-container-value.has-invalid-link{color:#cc1818}.format-library__inline-color-popover [role=tabpanel]{padding:16px;width:260px}.block-editor-format-toolbar__language-popover .components-popover__content{padding:1rem;width:auto}.block-editor-format-toolbar__math-input{direction:ltr}
\ 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 a58b03b737..1e5bd52f6b 100644
--- a/wp-includes/js/dist/block-editor.js
+++ b/wp-includes/js/dist/block-editor.js
@@ -21780,6 +21780,53 @@ function allowed_blocks_addAttribute(settings) {
"core/allowedBlocks/attribute",
allowed_blocks_addAttribute
);
+function addTransforms(result, source, index, results) {
+ if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(result.name, "allowedBlocks")) {
+ return result;
+ }
+ if (source.length !== 1 && results.length === 1 && result.innerBlocks.length === source.length) {
+ return result;
+ }
+ if (results.length === 1 && source.length > 1 || results.length > 1 && source.length === 1) {
+ return result;
+ }
+ if (results.length > 1 && source.length > 1 && results.length !== source.length) {
+ return result;
+ }
+ if (result.attributes.allowedBlocks) {
+ return result;
+ }
+ const sourceAllowedBlocks = source[index]?.attributes?.allowedBlocks;
+ if (!sourceAllowedBlocks) {
+ return result;
+ }
+ const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(result.name);
+ const destinationAllowedBlocks = blockType?.allowedBlocks || [];
+ if (!destinationAllowedBlocks.length) {
+ return {
+ ...result,
+ attributes: {
+ ...result.attributes,
+ allowedBlocks: sourceAllowedBlocks
+ }
+ };
+ }
+ const filteredSourceAllowedBlocks = sourceAllowedBlocks.filter(
+ (block) => destinationAllowedBlocks.includes(block)
+ );
+ return {
+ ...result,
+ attributes: {
+ ...result.attributes,
+ allowedBlocks: filteredSourceAllowedBlocks
+ }
+ };
+}
+(0,external_wp_hooks_namespaceObject.addFilter)(
+ "blocks.switchToBlockType.transformedBlock",
+ "core/allowedBlocks/addTransforms",
+ addTransforms
+);
;// ./node_modules/@wordpress/block-editor/build-module/hooks/anchor.js
@@ -21966,7 +22013,7 @@ function custom_class_name_addSaveProps(extraProps, blockType, attributes) {
}
return extraProps;
}
-function addTransforms(result, source, index, results) {
+function custom_class_name_addTransforms(result, source, index, results) {
if (!(0,external_wp_blocks_namespaceObject.hasBlockSupport)(result.name, "customClassName", true)) {
return result;
}
@@ -21998,7 +22045,7 @@ function addTransforms(result, source, index, results) {
(0,external_wp_hooks_namespaceObject.addFilter)(
"blocks.switchToBlockType.transformedBlock",
"core/customClassName/addTransforms",
- addTransforms
+ custom_class_name_addTransforms
);
@@ -26678,12 +26725,12 @@ function useFitText({ fitText, name, clientId }) {
const blockElement = useBlockElement(clientId);
const blockAttributes = (0,external_wp_data_namespaceObject.useSelect)(
(select) => {
- if (!clientId) {
+ if (!clientId || !hasFitTextSupport2 || !fitText) {
return;
}
return select(store).getBlockAttributes(clientId);
},
- [clientId]
+ [clientId, hasFitTextSupport2, fitText]
);
const applyFitText = (0,external_wp_element_namespaceObject.useCallback)(() => {
if (!blockElement || !hasFitTextSupport2 || !fitText) {
@@ -26706,14 +26753,35 @@ function useFitText({ fitText, name, clientId }) {
if (!fitText || !blockElement || !clientId || !hasFitTextSupport2) {
return;
}
- applyFitText();
const currentElement = blockElement;
+ const previousVisibility = currentElement.style.visibility;
+ let hideFrameId = null;
+ let calculateFrameId = null;
+ let showTimeoutId = null;
+ hideFrameId = window.requestAnimationFrame(() => {
+ currentElement.style.visibility = "hidden";
+ calculateFrameId = window.requestAnimationFrame(() => {
+ applyFitText();
+ showTimeoutId = setTimeout(() => {
+ currentElement.style.visibility = previousVisibility;
+ }, 10);
+ });
+ });
let resizeObserver;
if (window.ResizeObserver && currentElement.parentElement) {
resizeObserver = new window.ResizeObserver(applyFitText);
resizeObserver.observe(currentElement.parentElement);
}
return () => {
+ if (hideFrameId !== null) {
+ window.cancelAnimationFrame(hideFrameId);
+ }
+ if (calculateFrameId !== null) {
+ window.cancelAnimationFrame(calculateFrameId);
+ }
+ if (showTimeoutId !== null) {
+ clearTimeout(showTimeoutId);
+ }
if (resizeObserver) {
resizeObserver.disconnect();
}
@@ -46601,8 +46669,12 @@ const BlockBindingsPanel = ({ name: blockName, metadata }) => {
var block_bindings_default = {
edit: BlockBindingsPanel,
attributeKeys: ["metadata"],
- hasSupport() {
- return true;
+ hasSupport(name) {
+ return ![
+ "core/post-date",
+ "core/navigation-link",
+ "core/navigation-submenu"
+ ].includes(name);
}
};
@@ -51633,7 +51705,10 @@ function BlockSettingsDropdown({
count === 1 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
block_comment_icon_slot_default.Slot,
{
- fillProps: { onClose }
+ fillProps: {
+ clientId: firstBlockClientId,
+ onClose
+ }
}
)
] }),
diff --git a/wp-includes/js/dist/block-editor.min.js b/wp-includes/js/dist/block-editor.min.js
index 2b3cfd286e..bf61408ffa 100644
--- a/wp-includes/js/dist/block-editor.min.js
+++ b/wp-includes/js/dist/block-editor.min.js
@@ -18,6 +18,6 @@
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
-*/o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,s=function(){e.clientWidth!==n&&p()},l=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:l,update:p}),a()}function a(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var s=i("autosize:resized");try{e.dispatchEvent(s)}catch(e){}}}}function l(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return s(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default},void 0===(r="function"==typeof n?n.apply(t,o):n)||(e.exports=r)},4462:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var l=n(1609),a=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=s(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return l.createElement("textarea",i({},a,{onChange:this.onChange,style:u?i({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(p,i({},e,{innerRef:t}))}))},4725:e=>{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=0|n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}},5215:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},5380:(e,t,n)=>{"use strict";let{nanoid:o}=n(5042),{isAbsolute:r,resolve:i}=n(197),{SourceMapConsumer:s,SourceMapGenerator:l}=n(1866),{fileURLToPath:a,pathToFileURL:c}=n(2739),u=n(356),d=n(5696),p=n(9746),h=Symbol("fromOffsetCache"),g=Boolean(s&&l),m=Boolean(i&&r);class f{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&g){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);i=e.line,r=e.col}else i=o.line,r=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,r);return s=l?new u(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,o.plugin):new u(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:r,line:i},this.css,this.file,o.plugin),s.input={column:n,endColumn:r,endLine:i,line:t,source:this.css},this.file&&(c&&(s.input.url=c(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o<r;o++)n[o]=t,t+=e[o].length+1;this[h]=n}t=n[n.length-1];let o=0;if(e>=t)o=n.length-1;else{let t,r=n.length-2;for(;o<r;)if(t=o+(r-o>>1),e<n[t])r=t-1;else{if(!(e>=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let i,s,l=this.map.consumer(),u=l.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(i=l.originalPositionFor({column:o,line:n})),s=r(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:s.toString()};if("file:"===s.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");d.file=a(s)}let p=l.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=f,f.default=f,p&&p.registerInput&&p.registerInput(f)},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},5417:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,s=t.length,l=0,a=0;i<s;i++){var c=t[i];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&r){var d=n.slice(l,l+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(l,l+c.count));l+=c.count,c.added||(a+=c.count)}}var p=t[s-1];return s>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[s-2].value+=p.value,t.pop()),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function s(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,c=1,u=l+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=l&&p+1>=a)return s([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*c;n<=c;n+=2){var r=void 0,u=d[n-1],p=d[n+1],h=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var g=u&&u.newPos+1<l,m=p&&0<=h&&h<a;if(g||m){if(!g||m&&u.newPos<p.newPos?(r={newPos:(f=p).newPos,components:f.components.slice(0)},i.pushComponent(r.components,void 0,!0)):((r=u).newPos++,i.pushComponent(r.components,!0,void 0)),h=i.extractCommon(r,t,e,n),r.newPos+1>=l&&h+1>=a)return s(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var f;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();h()||e()}),0)}();else for(;c<=u;){var g=h();if(g)return g}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,s=e.newPos,l=s-o,a=0;s+1<r&&l+1<i&&this.equals(t[s+1],n[l+1]);)s++,l++,a++;return a&&e.components.push({count:a}),e.newPos=s,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},5696:(e,t,n)=>{"use strict";let{existsSync:o,readFileSync:r}=n(9977),{dirname:i,join:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new l(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=i(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof l)return a.fromSourceMap(t).toString();if(t instanceof a)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=s(i(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},5826:(e,t,n)=>{e.exports=n(628)()},6109:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},7490:(e,t,n)=>{"use strict";let o=n(356),r=n(346),i=n(633),{isClean:s,my:l}=n(1381);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}function c(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,o=1,r=0;for(let i=0;i<e.length;i++){if(o===t.line&&n===t.column){r=i;break}"\n"===e[i]?(n=1,o+=1):n+=1}return r}class u{get proxyOf(){return this}constructor(e={}){this.raws={},this[s]=!1,this[l]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,o=n.slice(c(n,this.source.start),c(n,this.source.end)).indexOf(e.word);-1!==o&&(t=this.positionInside(o))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,o="document"in this.source.input?this.source.input.document:this.source.input.css,r=c(o,this.source.start),i=r+e;for(let e=r;e<i;e++)"\n"===o[e]?(t=1,n+=1):t+=1;return{column:t,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o="document"in this.source.input?this.source.input.document:this.source.input.css,r=o.slice(c(o,this.source.start),c(o,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r),n=this.positionInside(r+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new r).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let r=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}}e.exports=u,u.default=u},7520:(e,t,n)=>{e.exports=n(7191)},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(4295);const i=n(9055);let s=n(633);n(3122);class l{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=s;this.result=new i(this._processor,r,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,r,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=l,l.default=l},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},8021:(e,t,n)=>{"use strict";var o;t.JJ=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5417))&&o.__esModule?o:{default:o}).default)},8202:e=>{"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,y,x,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C<I;)if(B<=32){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);b=w.slice(C,g),f=S[S.length-1],B===n&&E?P=b:f&&"div"===f.type?(f.after=b,f.sourceEndIndex+=b.length):B===l||B===a||B===s&&w.charCodeAt(g+1)!==c&&(!x||x&&"function"===x.type&&"calc"!==x.value)?M=b:S.push({type:"space",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else if(B===o||B===r){g=C,b={type:"string",sourceIndex:C,quote:m=B===o?"'":'"'};do{if(k=!1,~(g=w.indexOf(m,g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=m).length-1,b.unclosed=!0}while(k);b.value=w.slice(C+1,g),b.sourceEndIndex=b.unclosed?g:g+1,S.push(b),C=g+1,B=w.charCodeAt(C)}else if(B===s&&w.charCodeAt(C+1)===c)b={type:"comment",sourceIndex:C,sourceEndIndex:(g=w.indexOf("*/",C))+2},-1===g&&(b.unclosed=!0,g=w.length,b.sourceEndIndex=g),b.value=w.slice(C+2,g),S.push(b),C=g+2,B=w.charCodeAt(C);else if(B!==s&&B!==c||!x||"function"!==x.type||"calc"!==x.value)if(B===s||B===l||B===a)b=w[C],S.push({type:"div",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b,before:M,after:""}),M="",C+=1,B=w.charCodeAt(C);else if(t===B){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);if(y=C,b={type:"function",sourceIndex:C-T.length,value:T,before:w.slice(y+1,g)},C=g,"url"===T&&B!==o&&B!==r){g-=1;do{if(k=!1,~(g=w.indexOf(")",g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=")").length-1,b.unclosed=!0}while(k);_=g;do{_-=1,B=w.charCodeAt(_)}while(B<=32);y<_?(b.nodes=C!==_+1?[{type:"word",sourceIndex:C,sourceEndIndex:_+1,value:w.slice(C,_+1)}]:[],b.unclosed&&_+1!==g?(b.after="",b.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:g,value:w.slice(_+1,g)})):(b.after=w.slice(_+1,g),b.sourceEndIndex=g)):(b.after="",b.nodes=[]),C=g+1,b.sourceEndIndex=b.unclosed?g:C,B=w.charCodeAt(C),S.push(b)}else E+=1,b.after="",b.sourceEndIndex=C+1,S.push(b),j.push(b),S=b.nodes=[],x=b;T=""}else if(n===B&&E)C+=1,B=w.charCodeAt(C),x.after=P,x.sourceEndIndex+=P.length,P="",E-=1,j[j.length-1].sourceEndIndex=C,j.pop(),S=(x=j[E]).nodes;else{g=C;do{B===i&&(g+=1),g+=1,B=w.charCodeAt(g)}while(g<I&&!(B<=32||B===o||B===r||B===l||B===a||B===s||B===t||B===c&&x&&"function"===x.type&&"calc"===x.value||B===s&&"function"===x.type&&"calc"===x.value||B===n&&E));b=w.slice(C,g),t===B?T=b:u!==b.charCodeAt(0)&&d!==b.charCodeAt(0)||p!==b.charCodeAt(1)||!h.test(b.slice(2))?S.push({type:"word",sourceIndex:C,sourceEndIndex:g,value:b}):S.push({type:"unicode-range",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else b=w[C],S.push({type:"word",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b}),C+=1,B=w.charCodeAt(C);for(C=j.length-1;C;C-=1)j[C].unclosed=!0,j[C].sourceEndIndex=w.length;return j[0].nodes}},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},9656:(e,t,n)=>{"use strict";let o=n(271),r=n(448),i=n(7661),s=n(9434);class l{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new i(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),o.registerProcessor(l)},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},9746:()=>{},9977:()=>{}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Vg,AlignmentToolbar:()=>Fg,Autocomplete:()=>kj,BlockAlignmentControl:()=>pa,BlockAlignmentToolbar:()=>ha,BlockBreadcrumb:()=>Cj,BlockCanvas:()=>XT,BlockColorsStyleSelector:()=>tM,BlockContextProvider:()=>iv,BlockControls:()=>Rs,BlockEdit:()=>vv,BlockEditorKeyboardShortcuts:()=>Qk,BlockEditorProvider:()=>ov,BlockFormatControls:()=>Ps,BlockIcon:()=>Vu,BlockInspector:()=>VA,BlockList:()=>dw,BlockMover:()=>Hj,BlockNavigationDropdown:()=>DM,BlockPopover:()=>tf,BlockPreview:()=>kC,BlockSelectionClearer:()=>RS,BlockSettingsMenu:()=>gT,BlockSettingsMenuControls:()=>lT,BlockStyles:()=>VM,BlockTitle:()=>wj,BlockToolbar:()=>OT,BlockTools:()=>UT,BlockVerticalAlignmentControl:()=>vl,BlockVerticalAlignmentToolbar:()=>_l,ButtonBlockAppender:()=>uI,ButtonBlockerAppender:()=>cI,ColorPalette:()=>cP,ColorPaletteControl:()=>uP,ContrastChecker:()=>dh,CopyHandler:()=>HA,DefaultBlockAppender:()=>yS,FontSizePicker:()=>sj,HeadingLevelDropdown:()=>$M,HeightControl:()=>bm,InnerBlocks:()=>ew,Inserter:()=>lI,InspectorAdvancedControls:()=>Va,InspectorControls:()=>Fa,JustifyContentControl:()=>Sl,JustifyToolbar:()=>wl,LineHeightControl:()=>Oh,LinkControl:()=>uu,MediaPlaceholder:()=>mR,MediaReplaceFlow:()=>hu,MediaUpload:()=>Ya,MediaUploadCheck:()=>Xa,MultiSelectScrollIntoView:()=>WA,NavigableToolbar:()=>ET,ObserveTyping:()=>rw,PanelColorSettings:()=>fR,PlainText:()=>qR,RecursionProvider:()=>JA,RichText:()=>WR,RichTextShortcut:()=>QR,RichTextToolbarButton:()=>JR,SETTINGS_DEFAULTS:()=>P,SkipToSelectedBlock:()=>gA,Typewriter:()=>XA,URLInput:()=>ac,URLInputButton:()=>oA,URLPopover:()=>dR,Warning:()=>bv,WritingFlow:()=>Aw,__experimentalBlockAlignmentMatrixControl:()=>xj,__experimentalBlockFullHeightAligmentControl:()=>_j,__experimentalBlockPatternSetup:()=>oP,__experimentalBlockPatternsList:()=>$C,__experimentalBlockVariationPicker:()=>KM,__experimentalBlockVariationTransforms:()=>lP,__experimentalBorderRadiusControl:()=>rp,__experimentalColorGradientControl:()=>qp,__experimentalColorGradientSettingsDropdown:()=>kP,__experimentalDateFormatPicker:()=>hP,__experimentalDuotoneControl:()=>Ef,__experimentalFontAppearanceControl:()=>Lh,__experimentalFontFamilyControl:()=>Ah,__experimentalGetBorderClassesAndStyles:()=>UI,__experimentalGetColorClassesAndStyles:()=>WI,__experimentalGetElementClassName:()=>lN,__experimentalGetGapCSSValue:()=>ul,__experimentalGetGradientClass:()=>Op,__experimentalGetGradientObjectByGradientValue:()=>Vp,__experimentalGetShadowClassesAndStyles:()=>$I,__experimentalGetSpacingClassesAndStyles:()=>ZI,__experimentalImageEditor:()=>oR,__experimentalImageSizeControl:()=>lR,__experimentalImageURLInputUI:()=>uA,__experimentalInspectorPopoverHeader:()=>oN,__experimentalLetterSpacingControl:()=>zh,__experimentalLibrary:()=>$A,__experimentalLinkControl:()=>cu,__experimentalLinkControlSearchInput:()=>Gc,__experimentalLinkControlSearchItem:()=>Bc,__experimentalLinkControlSearchResults:()=>Nc,__experimentalListView:()=>NM,__experimentalPanelColorGradientSettings:()=>xP,__experimentalPreviewOptions:()=>dA,__experimentalPublishDateTimePicker:()=>iN,__experimentalRecursionProvider:()=>tN,__experimentalResponsiveBlockControl:()=>XR,__experimentalSpacingSizesControl:()=>mm,__experimentalTextDecorationControl:()=>tg,__experimentalTextTransformControl:()=>Xh,__experimentalUnitControl:()=>tA,__experimentalUseBlockOverlayActive:()=>Bj,__experimentalUseBlockPreview:()=>vC,__experimentalUseBorderProps:()=>GI,__experimentalUseColorProps:()=>KI,__experimentalUseCustomSides:()=>mf,__experimentalUseGradient:()=>Hp,__experimentalUseHasRecursion:()=>nN,__experimentalUseMultipleOriginColorsAndGradients:()=>Nd,__experimentalUseResizeCanvas:()=>pA,__experimentalWritingModeControl:()=>ig,__unstableBlockNameContext:()=>CT,__unstableBlockSettingsMenuFirstItem:()=>zE,__unstableBlockToolbarLastItem:()=>_E,__unstableEditorStyles:()=>cC,__unstableIframe:()=>Fw,__unstableInserterMenuExtension:()=>KB,__unstableRichTextInputEvent:()=>eA,__unstableUseBlockSelectionClearer:()=>PS,__unstableUseClipboardHandler:()=>FA,__unstableUseMouseMoveTypingReset:()=>nw,__unstableUseTypewriter:()=>YA,__unstableUseTypingObserver:()=>ow,createCustomColorsHOC:()=>rj,getColorClassName:()=>Ad,getColorObjectByAttributeValues:()=>Pd,getColorObjectByColorValue:()=>Rd,getComputedFluidTypographyValue:()=>zi,getCustomValueFromPreset:()=>il,getFontSize:()=>Tg,getFontSizeClass:()=>Pg,getFontSizeObjectByValue:()=>Mg,getGradientSlugByValue:()=>Fp,getGradientValueBySlug:()=>zp,getPxFromCssUnit:()=>aN,getSpacingPresetCssVar:()=>ll,getTypographyClassesAndStyles:()=>YI,isValueSpacingPreset:()=>rl,privateApis:()=>sD,store:()=>ji,storeConfig:()=>Ii,transformStyles:()=>lC,useBlockBindingsUtils:()=>dv,useBlockCommands:()=>ZT,useBlockDisplayInformation:()=>Xf,useBlockEditContext:()=>C,useBlockEditingMode:()=>ga,useBlockProps:()=>gS,useCachedTruthy:()=>XI,useHasRecursion:()=>eN,useInnerBlocksProps:()=>JS,useSetting:()=>Mi,useSettings:()=>Ti,useStyleOverride:()=>_s,withColorContext:()=>aP,withColors:()=>ij,withFontSizes:()=>cj});var e={};n.r(e),n.d(e,{getAllPatterns:()=>ze,getBlockRemovalRules:()=>Pe,getBlockSettings:()=>ye,getBlockStyles:()=>Ye,getBlockWithoutAttributes:()=>Ce,getClosestAllowedInsertionPoint:()=>et,getClosestAllowedInsertionPointForPattern:()=>tt,getContentLockingParent:()=>$e,getEnabledBlockParents:()=>Te,getEnabledClientIdsTree:()=>Ee,getExpandedBlock:()=>Ge,getInserterMediaCategories:()=>Le,getInsertionPoint:()=>nt,getLastFocus:()=>He,getLastInsertedBlocksClientIds:()=>we,getOpenedBlockSettingsMenu:()=>Re,getParentSectionBlock:()=>We,getPatternBySlug:()=>Oe,getRegisteredInserterMediaCategories:()=>Ne,getRemovalPromptData:()=>Me,getReusableBlocks:()=>Fe,getSectionRootClientId:()=>Xe,getStyleOverrides:()=>Ae,getTemporarilyEditingAsBlocks:()=>Ze,getTemporarilyEditingFocusModeToRevert:()=>qe,getZoomLevel:()=>Je,hasAllowedPatterns:()=>De,hasBlockSpotlight:()=>rt,isBlockHidden:()=>ot,isBlockInterfaceHidden:()=>Se,isBlockSubtreeDisabled:()=>Be,isContainerInsertableToInContentOnlyMode:()=>Ie,isDragging:()=>Ue,isSectionBlock:()=>Ke,isZoomOut:()=>Qe});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>To,__experimentalGetAllowedBlocks:()=>lo,__experimentalGetAllowedPatterns:()=>mo,__experimentalGetBlockListSettingsForBlocks:()=>xo,__experimentalGetDirectInsertBlock:()=>co,__experimentalGetGlobalBlocksByName:()=>zt,__experimentalGetLastBlockAttributeChanges:()=>Co,__experimentalGetParsedPattern:()=>uo,__experimentalGetPatternTransformItems:()=>ko,__experimentalGetPatternsByBlockTypes:()=>bo,__experimentalGetReusableBlockTitle:()=>So,__unstableGetBlockWithoutInnerBlocks:()=>Mt,__unstableGetClientIdWithClientIdsTree:()=>Rt,__unstableGetClientIdsTree:()=>At,__unstableGetContentLockingParent:()=>Vo,__unstableGetSelectedBlocksWithPartialSelection:()=>yn,__unstableGetTemporarilyEditingAsBlocks:()=>Fo,__unstableGetTemporarilyEditingFocusModeToRevert:()=>Ho,__unstableGetVisibleBlocks:()=>Ao,__unstableHasActiveBlockOverlayActive:()=>No,__unstableIsFullySelected:()=>bn,__unstableIsLastBlockChangeIgnored:()=>wo,__unstableIsSelectionCollapsed:()=>kn,__unstableIsSelectionMergeable:()=>_n,__unstableIsWithinBlockOverlay:()=>Lo,__unstableSelectionHasUnmergeableBlock:()=>vn,areInnerBlocksControlled:()=>Eo,canEditBlock:()=>Xn,canInsertBlockType:()=>$n,canInsertBlocks:()=>Wn,canLockBlockType:()=>Qn,canMoveBlock:()=>qn,canMoveBlocks:()=>Yn,canRemoveBlock:()=>Kn,canRemoveBlocks:()=>Zn,didAutomaticChange:()=>Io,getAdjacentBlockClientId:()=>nn,getAllowedBlocks:()=>so,getBlock:()=>Tt,getBlockAttributes:()=>Et,getBlockCount:()=>Ht,getBlockEditingMode:()=>Do,getBlockHierarchyRootClientId:()=>en,getBlockIndex:()=>Sn,getBlockInsertionPoint:()=>On,getBlockListSettings:()=>vo,getBlockMode:()=>Mn,getBlockName:()=>It,getBlockNamesByClientId:()=>Ft,getBlockOrder:()=>xn,getBlockParents:()=>Qt,getBlockParentsByBlockName:()=>Jt,getBlockRootClientId:()=>Xt,getBlockSelectionEnd:()=>Wt,getBlockSelectionStart:()=>$t,getBlockTransformItems:()=>ro,getBlocks:()=>Pt,getBlocksByClientId:()=>Vt,getBlocksByName:()=>Ot,getClientIdsOfDescendants:()=>Nt,getClientIdsWithDescendants:()=>Lt,getDirectInsertBlock:()=>ao,getDraggedBlockClientIds:()=>An,getFirstMultiSelectedBlockClientId:()=>un,getGlobalBlockCount:()=>Dt,getHoveredBlockClientId:()=>Ro,getInserterItems:()=>oo,getLastMultiSelectedBlockClientId:()=>dn,getLowestCommonAncestorWithSelectedBlock:()=>tn,getMultiSelectedBlockClientIds:()=>an,getMultiSelectedBlocks:()=>cn,getMultiSelectedBlocksEndClientId:()=>fn,getMultiSelectedBlocksStartClientId:()=>mn,getNextBlockClientId:()=>rn,getPatternsByBlockTypes:()=>fo,getPreviousBlockClientId:()=>on,getSelectedBlock:()=>Yt,getSelectedBlockClientId:()=>qt,getSelectedBlockClientIds:()=>ln,getSelectedBlockCount:()=>Kt,getSelectedBlocksInitialCaretPosition:()=>sn,getSelectionEnd:()=>Gt,getSelectionStart:()=>Ut,getSettings:()=>_o,getTemplate:()=>Fn,getTemplateLock:()=>Hn,hasBlockMovingClientId:()=>Bo,hasDraggedInnerBlock:()=>Bn,hasInserterItems:()=>io,hasMultiSelection:()=>jn,hasSelectedBlock:()=>Zt,hasSelectedInnerBlock:()=>Cn,isAncestorBeingDragged:()=>Ln,isAncestorMultiSelected:()=>gn,isBlockBeingDragged:()=>Nn,isBlockHighlighted:()=>jo,isBlockInsertionPointVisible:()=>zn,isBlockMultiSelected:()=>hn,isBlockSelected:()=>wn,isBlockValid:()=>jt,isBlockVisible:()=>Po,isBlockWithinSelection:()=>In,isCaretWithinFormattedText:()=>Dn,isDraggingBlocks:()=>Rn,isFirstMultiSelectedBlock:()=>pn,isGroupable:()=>zo,isLastBlockChangePersistent:()=>yo,isMultiSelecting:()=>En,isSelectionEnabled:()=>Tn,isTyping:()=>Pn,isUngroupable:()=>Oo,isValidTemplate:()=>Vn,wasBlockJustInserted:()=>Mo});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>$o,clearBlockRemovalPrompt:()=>Xo,deleteStyleOverride:()=>tr,ensureDefaultBlock:()=>qo,expandBlock:()=>sr,hideBlockInterface:()=>Wo,modifyContentLockBlock:()=>ar,privateRemoveBlocks:()=>Zo,resetZoomLevel:()=>ur,setBlockRemovalRules:()=>Qo,setInsertionPoint:()=>lr,setLastFocus:()=>nr,setOpenedBlockSettingsMenu:()=>Jo,setStyleOverride:()=>er,setZoomLevel:()=>cr,showBlockInterface:()=>Ko,startDragging:()=>rr,stopDragging:()=>ir,stopEditingAsBlocks:()=>or,toggleBlockSpotlight:()=>dr});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>Wr,__unstableExpandSelection:()=>Zr,__unstableMarkAutomaticChange:()=>hi,__unstableMarkLastChangeAsPersistent:()=>di,__unstableMarkNextChangeAsNotPersistent:()=>pi,__unstableSaveReusableBlock:()=>ui,__unstableSetEditorMode:()=>gi,__unstableSetTemporarilyEditingAsBlocks:()=>Si,__unstableSplitSelection:()=>Kr,clearSelectedBlock:()=>Mr,duplicateBlocks:()=>fi,enterFormattedText:()=>ri,exitFormattedText:()=>ii,flashBlock:()=>_i,hideInsertionPoint:()=>Ur,hoverBlock:()=>Cr,insertAfterBlock:()=>ki,insertBeforeBlock:()=>bi,insertBlock:()=>Vr,insertBlocks:()=>Fr,insertDefaultBlock:()=>li,mergeBlocks:()=>qr,moveBlockToPosition:()=>zr,moveBlocksDown:()=>Lr,moveBlocksToPosition:()=>Or,moveBlocksUp:()=>Dr,multiSelect:()=>Tr,receiveBlocks:()=>yr,registerInserterMediaCategory:()=>wi,removeBlock:()=>Xr,removeBlocks:()=>Yr,replaceBlock:()=>Ar,replaceBlocks:()=>Rr,replaceInnerBlocks:()=>Qr,resetBlocks:()=>kr,resetSelection:()=>_r,selectBlock:()=>wr,selectNextBlock:()=>Ir,selectPreviousBlock:()=>Br,selectionChange:()=>si,setBlockEditingMode:()=>Ci,setBlockMovingClientId:()=>mi,setBlockVisibility:()=>xi,setHasControlledInnerBlocks:()=>yi,setTemplateValidity:()=>Gr,showInsertionPoint:()=>Hr,startDraggingBlocks:()=>ni,startMultiSelect:()=>jr,startTyping:()=>ei,stopDraggingBlocks:()=>oi,stopMultiSelect:()=>Er,stopTyping:()=>ti,synchronizeTemplate:()=>$r,toggleBlockHighlight:()=>vi,toggleBlockMode:()=>Jr,toggleSelection:()=>Pr,unsetBlockEditingMode:()=>Bi,updateBlock:()=>Sr,updateBlockAttributes:()=>xr,updateBlockListSettings:()=>ai,updateSettings:()=>ci,validateBlocksToTemplate:()=>vr});var s={};n.r(s),n.d(s,{getItems:()=>ok,getSettings:()=>lk,isUploading:()=>rk,isUploadingById:()=>sk,isUploadingByUrl:()=>ik});var l={};n.r(l),n.d(l,{getAllItems:()=>ak,getBlobUrls:()=>gk,getItem:()=>ck,getPausedUploadForPost:()=>pk,isBatchUploaded:()=>uk,isPaused:()=>hk,isUploadingToPost:()=>dk});var a={};n.r(a),n.d(a,{addItems:()=>Bk,cancelItem:()=>Ik});var c={};n.r(c),n.d(c,{addItem:()=>Tk,finishOperation:()=>Nk,pauseQueue:()=>Pk,prepareItem:()=>Lk,processItem:()=>Mk,removeItem:()=>Ak,resumeQueue:()=>Rk,revokeBlobUrls:()=>Ok,updateSettings:()=>zk,uploadItem:()=>Dk});var u={};n.r(u),n.d(u,{AdvancedPanel:()=>dN,BackgroundPanel:()=>Tu,BorderPanel:()=>Sp,ColorPanel:()=>uh,DimensionsPanel:()=>zm,FiltersPanel:()=>Uf,GlobalStylesContext:()=>is,ImageSettingsPanel:()=>uN,TypographyPanel:()=>yg,areGlobalStyleConfigsEqual:()=>os,getBlockCSSSelector:()=>Rf,getBlockSelectors:()=>Sb,getGlobalStylesChanges:()=>vN,getLayoutStyles:()=>mb,toStyles:()=>yb,useGlobalSetting:()=>cs,useGlobalStyle:()=>us,useGlobalStylesOutput:()=>Bb,useGlobalStylesOutputWithConfig:()=>Cb,useGlobalStylesReset:()=>as,useHasBackgroundPanel:()=>Iu,useHasBorderPanel:()=>gp,useHasBorderPanelControls:()=>mp,useHasColorPanel:()=>Yp,useHasDimensionsPanel:()=>Bm,useHasFiltersPanel:()=>Lf,useHasImageSettingsPanel:()=>cN,useHasTypographyPanel:()=>ag,useSettingsForBlockElement:()=>ds});const d=window.ReactJSXRuntime,p=window.wp.blocks,h=window.wp.element,g=window.wp.data,m=window.wp.compose,f=window.wp.hooks,b=Symbol("mayDisplayControls"),k=Symbol("mayDisplayParentControls"),v=Symbol("blockEditingMode"),_=Symbol("blockBindings"),y=Symbol("isPreviewMode"),x={name:"",isSelected:!1},S=(0,h.createContext)(x);S.displayName="BlockEditContext";const{Provider:w}=S;function C(){return(0,h.useContext)(S)}const B=window.wp.deprecated;var I=n.n(B),j=n(7734),E=n.n(j);const T=window.wp.i18n,M={insertUsage:{}},P={alignWide:!1,supportsLayout:!0,colors:[{name:(0,T.__)("Black"),slug:"black",color:"#000000"},{name:(0,T.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,T.__)("White"),slug:"white",color:"#ffffff"},{name:(0,T.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,T.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,T.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,T.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,T.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,T.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,T.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,T.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,T.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,T._x)("Small","font size name"),size:13,slug:"small"},{name:(0,T._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,T._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,T._x)("Large","font size name"),size:36,slug:"large"},{name:(0,T._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,T.__)("Thumbnail")},{slug:"medium",name:(0,T.__)("Medium")},{slug:"large",name:(0,T.__)("Large")},{slug:"full",name:(0,T.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,T.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,T.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,T.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,T.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,T.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,T.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,T.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,T.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,T.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,T.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,T.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,T.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function R(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function A(e,t,n,o=1){const r=[...e];return r.splice(t,o),R(r,e.slice(t,t+o),n)}const N=Symbol("globalStylesDataKey"),L=Symbol("globalStylesLinks"),D=Symbol("selectBlockPatternsKey"),O=Symbol("reusableBlocksSelect"),z=Symbol("sectionRootClientIdKey"),V=Symbol("mediaEditKey"),F=Symbol("essentialFormat"),H=window.wp.privateApis,{lock:U,unlock:G}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor"),{isContentBlock:$}=G(p.privateApis),W=e=>e;function K(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),K(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function Z(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function q(e,t=W){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function Y(e){return q(e,(e=>{const{attributes:t,...n}=e;return n}))}function X(e){return q(e,(e=>e.attributes))}function Q(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&E()(e.clientIds,t.clientIds)&&function(e,t){return E()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function J(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function ee(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const te=(0,m.pipe)(g.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:i}=t.byClientId.get(r);"core/block"===i&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),J(o,n.blocks),ee(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),ee(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),ee(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),J(o,n.blocks),ee(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}ee(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),ee(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),ee(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),ee(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),ee(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order.get(o[r])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order.get(o[r])));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(Y(n.blocks)),attributes:new Map(X(n.blocks)),order:K(n.blocks),parents:new Map(Z(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),J(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n,o=!1;return(r,i)=>{let s,l=e(r,i);if("SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=r.isPersistentChange??!0),void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const a="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;return r!==l||a?(l={...l,isPersistentChange:a?!o:!Q(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=r?.isPersistentChange??!0,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return Y(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),Y(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return X(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let n=!1;const o=new Map(e);for(const r of t.clientIds){const i=Object.entries(t.options?.uniqueByBlock?t.attributes[r]:t.attributes??{});if(0===i.length)continue;let s=!1;const l=e.get(r),a={};i.forEach((([e,t])=>{l[e]!==t&&(s=!0,a[e]=t)})),n=n||s,s&&o.set(r,{...l,...a})}return n?o:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),X(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=K(t.blocks),o=new Map(e);return n.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(e.get("")??[]).concat(n[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=K(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,R(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:i=e.get(o).length}=t;if(n===o){const t=e.get(o).indexOf(r[0]),n=new Map(e);return n.set(o,A(e.get(o),t,i,r.length)),n}const s=new Map(e);return s.set(n,e.get(n)?.filter((e=>!r.includes(e)))??[]),s.set(o,R(e.get(o),r,i)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,A(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,A(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=K(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{const r=e?.filter((e=>!t.removedClientIds.includes(e)))??[];r.length!==e.length&&n.set(o,r)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return Z(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return Z(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),Z(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function ne(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const oe=(0,g.combineReducers)({blocks:te,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=ne(e.selectionStart,t),o=ne(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?E()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e},insertionCue:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return E()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=P,t){if("UPDATE_SETTINGS"===t.type){const n=t.reset?{...P,...t.settings}:{...e,...t.settings};return Object.defineProperty(n,"__unstableIsPreviewMode",{get(){return I()("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),n}return e},preferences:function(e=M,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,g.select)(p.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}return e},lastBlockAttributesChange:function(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.options?.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},expandedBlock:function(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,message:o}=t;return{clientIds:e,selectPrevious:n,message:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?t?.clientId??null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e},hasBlockSpotlight:function(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":const{clientId:n,hasBlockSpotlight:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}});function re(e,t){if(""===t){const n=e.blocks.tree.get(t);if(!n)return;return{clientId:"",...n}}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);const n=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:n?.innerBlocks}}function ie(e,t,n){const o=re(e,t);if(o&&(n(o),o?.innerBlocks?.length))for(const t of o?.innerBlocks)ie(e,t.clientId,n)}function se(e,t,n){if(!n.length)return;let o=e.blocks.parents.get(t);for(;void 0!==o;){if(n.includes(o))return o;o=e.blocks.parents.get(o)}}function le(e,t=""){const n=e?.zoomLevel<100||"auto-scaled"===e?.zoomLevel,o=new Map,r=e.settings?.[z],i=e.blocks.order.get(r),s=Array.from(e.blockEditingModes).some((([,e])=>"disabled"===e)),l=[],a=[];Object.keys(e.blocks.controlledInnerBlocks).forEach((t=>{const n=e.blocks.byClientId?.get(t);"core/template-part"===n?.name&&l.push(t),"core/block"===n?.name&&a.push(t)}));const c=[...Object.keys(e.blockListSettings).filter((t=>"contentOnly"===e.blockListSettings[t]?.templateLock)),...window?.__experimentalContentOnlyPatternInsertion?Array.from(e.blocks.attributes.keys()).filter((t=>e.blocks.attributes.get(t)?.metadata?.patternName)):[],...window?.__experimentalContentOnlyPatternInsertion?l:[]];return ie(e,t,(t=>{const{clientId:l,name:u}=t;if(!e.blockEditingModes.has(l)){if(s){let t,n=e.blocks.parents.get(l);for(;void 0!==n&&(e.blockEditingModes.has(n)&&(t=e.blockEditingModes.get(n)),!t);)n=e.blocks.parents.get(n);if("disabled"===t)return void o.set(l,"disabled")}if(n)return l===r||i?.length&&i.includes(l)?void o.set(l,"contentOnly"):void o.set(l,"disabled");if(a.length){if(a.includes(l))return se(e,l,a)?void o.set(l,"disabled"):void 0;const n=se(e,l,a);if(n){if(se(e,n,a))return void o.set(l,"disabled");if(function(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}(t))return void o.set(l,"contentOnly");o.set(l,"disabled")}}if(c.length){!!se(e,l,c)&&($(u)?o.set(l,"contentOnly"):o.set(l,"disabled"))}}})),o}function ae({prevState:e,nextState:t,addedBlocks:n,removedClientIds:o}){const r=e.derivedBlockEditingModes;let i;return o?.forEach((t=>{ie(e,t,(e=>{r.has(e.clientId)&&(i||(i=new Map(r)),i.delete(e.clientId))}))})),n?.forEach((e=>{const n=le(t,e.clientId);n.size&&(i=i?new Map([...i?.size?i:[],...n]):new Map([...r?.size?r:[],...n]))})),i}var ce=(0,m.pipe)((function(e){return(t,n)=>{const o=e(t,n);if("SET_EDITOR_MODE"!==n.type&&o===t)return t;switch(n.type){case"REMOVE_BLOCKS":{const e=ae({prevState:t,nextState:o,removedClientIds:n.clientIds});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=ae({prevState:t,nextState:o,addedBlocks:n.blocks});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{const e=[],r=[];for(const i of n?.clientIds){const s=n.options?.uniqueByBlock?n.attributes[i]:n.attributes;if(!s)break;s.metadata?.patternName&&!t.blocks.attributes.get(i)?.metadata?.patternName?e.push(o.blocks.tree.get(i)):s.metadata&&!s.metadata?.patternName&&t.blocks.attributes.get(i)?.metadata?.patternName&&r.push(i)}if(!e?.length&&!r?.length)break;const i=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:r});if(i)return{...o,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{const e=[],r=[],i="string"==typeof n.clientId?{[n.clientId]:n.settings}:n.clientId;for(const n in i){const i="contentOnly"!==t.blockListSettings[n]?.templateLock&&"contentOnly"===o.blockListSettings[n]?.templateLock,s="contentOnly"===t.blockListSettings[n]?.templateLock&&"contentOnly"!==o.blockListSettings[n]?.templateLock;i?e.push(o.blocks.tree.get(n)):s&&r.push(n)}if(!e.length&&!r.length)break;const s=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:r});if(s)return{...o,derivedBlockEditingModes:s??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{const e=re(o,n.clientId);if(!e)break;const r=ae({prevState:t,nextState:o,removedClientIds:[n.clientId],addedBlocks:[e]});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{const e=ae({prevState:t,nextState:o,addedBlocks:n.blocks,removedClientIds:n.clientIds});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{const e=t.blocks.order.get(n.rootClientId),r=ae({prevState:t,nextState:o,addedBlocks:n.blocks,removedClientIds:e});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{const e=n.clientIds.map((e=>o.blocks.byClientId.get(e))),r=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:n.clientIds});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":if(t?.settings?.[z]!==o?.settings?.[z])return{...o,derivedBlockEditingModes:le(o)};break;case"RESET_BLOCKS":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...o,derivedBlockEditingModes:le(o)}}return o.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,o}}),(function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}))(oe);const ue=window.wp.primitives;var de=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const pe=window.wp.richText,he=window.wp.blockSerializationDefaultParser,ge="core/block-editor";function me(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const fe=(e,t,n)=>{const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach((e=>{r=r?.[e]})),r??n};const be=["color","border","dimensions","typography","spacing"],ke={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},ve={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"},_e=e=>ve[e]||e;function ye(e,t,...n){const o=It(e,t),r=[];if(t){let n=t;do{const t=It(e,n);(0,p.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(be.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,f.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=_e(n);for(const t of r){const n=Et(e,t);if(i=fe(n.settings?.blocks?.[o],s)??fe(n.settings,s),void 0!==i)break}const l=_o(e);if(void 0===i&&o&&(i=fe(l.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=fe(l.__experimentalFeatures,s)),void 0!==i)return p.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?i.custom??i.theme??i.default:i;const a=ke[s]?.(l);return void 0!==a?a:"typography.dropCap"===s||void 0}))}const{isContentBlock:xe}=G(p.privateApis);function Se(e){return e.isBlockInterfaceHidden}function we(e){return e?.lastBlockInserted?.clientIds}function Ce(e,t){return e.blocks.byClientId.get(t)}const Be=(e,t)=>{const n=t=>"disabled"===Do(e,t)&&xn(e,t).every(n);return xn(e,t).every(n)};function Ie(e,t,n){const o=xe(t),r=It(e,n),i=xe(r);return Xe(e)===n||i&&o}function je(e,t){const n=xn(e,t),o=[];for(const t of n){const n=je(e,t);"disabled"!==Do(e,t)?o.push({clientId:t,innerBlocks:n}):o.push(...n)}return o}const Ee=(0,g.createRegistrySelector)((()=>(0,g.createSelector)(je,(e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])))),Te=(0,g.createSelector)(((e,t,n=!1)=>Qt(e,t,n).filter((t=>"disabled"!==Do(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Me(e){return e.removalPromptData}function Pe(e){return e.blockRemovalRules}function Re(e){return e.openedBlockSettingsMenu}const Ae=(0,g.createSelector)((e=>{const t=Lt(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{const[,{clientId:o}]=e,[,{clientId:r}]=n;return(t[o]??-1)-(t[r]??-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function Ne(e){return e.registeredInserterMediaCategories}const Le=(0,g.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),De=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=G(e(ge)),r=o(),{allowedBlockTypes:i}=_o(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=bt(e);return vt(r,i)&&r.every((({name:e})=>$n(t,e,n)))}))}),((t,n)=>[..._t(e)(t),...yt(e)(t,n)])))),Oe=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n)=>{if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=G(e(ge)).getReusableBlocks().find((({id:e})=>e===o));return r?mt(r,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[D]?.(e)??[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[G(e(ge)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[D]?.(e)])))),ze=(0,g.createRegistrySelector)((e=>(0,g.createSelector)((t=>[...G(e(ge)).getReusableBlocks().map((e=>mt(e,t.settings.__experimentalUserPatternCategories))),...t.settings.__experimentalBlockPatterns??[],...t.settings[D]?.(e)??[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),_t(e)))),Ve=[],Fe=(0,g.createRegistrySelector)((e=>t=>{const n=t.settings[O];return(n?n(e):t.settings.__experimentalReusableBlocks)??Ve}));function He(e){return e.lastFocus}function Ue(e){return e.isDragging}function Ge(e){return e.expandedBlock}const $e=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)"contentOnly"===Hn(e,o)&&(n=o);return n},We=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)Ke(e,o)&&(n=o);return n};function Ke(e,t){const n=It(e,t);if("core/block"===n||"contentOnly"===Hn(e,t))return!0;const o=Et(e,t),r="core/template-part"===n;return!(!o?.metadata?.patternName&&!r||!window?.__experimentalContentOnlyPatternInsertion)}function Ze(e){return e.temporarilyEditingAsBlocks}function qe(e){return e.temporarilyEditingFocusModeRevert}const Ye=(0,g.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function Xe(e){return e.settings?.[z]}function Qe(e){return"auto-scaled"===e.zoomLevel||e.zoomLevel<100}function Je(e){return e.zoomLevel}function et(e,t,n=""){const o=Array.isArray(t)?t:[t],r=t=>o.every((n=>$n(e,n,t)));if(!n){if(r(n))return n;const t=Xe(e);return t&&r(t)?t:null}let i=n;for(;null!==i&&!r(i);){i=Xt(e,i)}return i}function tt(e,t,n){const{allowedBlockTypes:o}=_o(e);if(!vt(bt(t),o))return null;return et(e,bt(t).map((({blockName:e})=>e)),n)}function nt(e){return e.insertionPoint}const ot=(e,t)=>{const n=It(e,t);if(!(0,p.hasBlockSupport)(e,n,"blockVisibility",!0))return!1;const o=e.blocks.attributes.get(t);return!1===o?.metadata?.blockVisibility};function rt(e){return!!e.hasBlockSpotlight}const it={user:"user",theme:"theme",directory:"directory"},st="fully",lt="unsynced",at={name:"allPatterns",label:(0,T._x)("All","patterns")},ct={name:"myPatterns",label:(0,T.__)("My patterns")},ut={name:"core/starter-content",label:(0,T.__)("Starter content")};function dt(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==it.theme||!o&&!r)||(!(t!==it.directory||!o&&r)||(t===it.user&&e.type!==it.user||(n===st&&""!==e.syncStatus||!(n!==lt||"unsynced"===e.syncStatus||!o))))}const pt=Symbol("isFiltered"),ht=new WeakMap,gt=new WeakMap;function mt(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:it.user,title:e.title?.raw,categories:e.wp_pattern_category?.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function ft(e){let t=ht.get(e);return t||(t=function(e){const t=(0,p.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}(e),ht.set(e,t)),t}function bt(e){let t=gt.get(e);return t||(t=(0,he.parse)(e.content),t=t.filter((e=>null!==e.blockName)),gt.set(e,t)),t}const kt=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,vt=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!kt(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},_t=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[D]?.(e),t.blockPatterns,G(e(ge)).getReusableBlocks()],yt=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,Do(e,t),Xe(e),Ke(e,t)];function xt(e,t,n="asc"){return e.concat().sort(((e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0})(t,e,n))}const{isContentBlock:St}=G(p.privateApis),wt=[],Ct=new Set,Bt={[pt]:!0};function It(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==h.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=n??{};return r?`${o}-${r}`:o}return n?n.name:null}function jt(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function Et(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Tt(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const Mt=(0,g.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:Et(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function Pt(e,t){const n=t&&Eo(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||wt}const Rt=(0,g.createSelector)(((e,t)=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:At(e,t)})),(e=>[e.blocks.order])),At=(0,g.createSelector)(((e,t="")=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),xn(e,t).map((t=>Rt(e,t))))),(e=>[e.blocks.order])),Nt=(0,g.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o<n.length;){const t=n[o],r=e.blocks.order.get(t);r&&n.splice(o+1,0,...r),o++}return n}),(e=>[e.blocks.order])),Lt=e=>Nt(e,""),Dt=(0,g.createSelector)(((e,t)=>{const n=Lt(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),Ot=(0,g.createSelector)(((e,t)=>{if(!t)return wt;const n=Array.isArray(t)?t:[t],o=Lt(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:wt}),(e=>[e.blocks.order,e.blocks.byClientId]));function zt(e,t){return I()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),Ot(e,t)}const Vt=(0,g.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>Tt(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),Ft=(0,g.createSelector)(((e,t)=>Vt(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Vt(e,t)));function Ht(e,t){return xn(e,t).length}function Ut(e){return e.selection.selectionStart}function Gt(e){return e.selection.selectionEnd}function $t(e){return e.selection.selectionStart.clientId}function Wt(e){return e.selection.selectionEnd.clientId}function Kt(e){const t=an(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Zt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function qt(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Yt(e){const t=qt(e);return t?Tt(e,t):null}function Xt(e,t){return e.blocks.parents.get(t)??null}const Qt=(0,g.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():wt}),(e=>[e.blocks.parents])),Jt=(0,g.createSelector)(((e,t,n,o=!1)=>{const r=Qt(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(It(e,t))))}),(e=>[e.blocks.parents]));function en(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function tn(e,t){const n=qt(e),o=[...Qt(e,t),t],r=[...Qt(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e<s&&o[e]===r[e];e++)i=o[e];return i}function nn(e,t,n=1){if(void 0===t&&(t=qt(e)),void 0===t&&(t=n<0?un(e):dn(e)),!t)return null;const o=Xt(e,t);if(null===o)return null;const{order:r}=e.blocks,i=r.get(o),s=i.indexOf(t)+1*n;return s<0||s===i.length?null:i[s]}function on(e,t){return nn(e,t,-1)}function rn(e,t){return nn(e,t,1)}function sn(e){return e.initialPosition}const ln=(0,g.createSelector)((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return wt;if(t.clientId===n.clientId)return[t.clientId];const o=Xt(e,t.clientId);if(null===o)return wt;const r=xn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function an(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?wt:ln(e)}const cn=(0,g.createSelector)((e=>{const t=an(e);return t.length?t.map((t=>Tt(e,t))):wt}),(e=>[...ln.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function un(e){return an(e)[0]||null}function dn(e){const t=an(e);return t[t.length-1]||null}function pn(e,t){return un(e)===t}function hn(e,t){return-1!==an(e).indexOf(t)}const gn=(0,g.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Xt(e,n),o=hn(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function mn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function fn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function bn(e){const t=Ut(e),n=Gt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function kn(e){const t=Ut(e),n=Gt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function vn(e){return ln(e).some((t=>{const n=It(e,t);return!(0,p.getBlockType)(n).merge}))}function _n(e,t){const n=Ut(e),o=Gt(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Xt(e,n.clientId);if(r!==Xt(e,o.clientId))return!1;const i=xn(e,r);let s,l;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,l=n):(s=n,l=o);const a=t?l.clientId:s.clientId,c=t?s.clientId:l.clientId,u=It(e,a);if(!(0,p.getBlockType)(u).merge)return!1;const d=Tt(e,c);if(d.name===u)return!0;const h=(0,p.switchToBlockType)(d,u);return h&&h.length}const yn=e=>{const t=Ut(e),n=Gt(e);if(t.clientId===n.clientId)return wt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return wt;const o=Xt(e,t.clientId);if(o!==Xt(e,n.clientId))return wt;const r=xn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=Tt(e,l.clientId),u=Tt(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,pe.create)({html:d}),g=(0,pe.create)({html:p});return h=(0,pe.remove)(h,0,l.offset),g=(0,pe.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,pe.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,pe.toHTMLString)({value:g})}}]};function xn(e,t){return e.blocks.order.get(t||"")||wt}function Sn(e,t){return xn(e,Xt(e,t)).indexOf(t)}function wn(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Cn(e,t,n=!1){const o=ln(e);return!!o.length&&(n?o.some((n=>Qt(e,n,!0).includes(t))):o.some((n=>Xt(e,n)===t)))}function Bn(e,t,n=!1){return xn(e,t).some((t=>Nn(e,t)||n&&Bn(e,t,n)))}function In(e,t){if(!t)return!1;const n=an(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function jn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function En(e){return e.isMultiSelecting}function Tn(e){return e.isSelectionEnabled}function Mn(e,t){return e.blocksMode[t]||"visual"}function Pn(e){return e.isTyping}function Rn(e){return!!e.draggedBlocks.length}function An(e){return e.draggedBlocks}function Nn(e,t){return e.draggedBlocks.includes(t)}function Ln(e,t){if(!Rn(e))return!1;return Qt(e,t).some((t=>Nn(e,t)))}function Dn(){return I()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const On=(0,g.createSelector)((e=>{let t,n;const{insertionCue:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Xt(e,i)||void 0,n=Sn(e,r.clientId)+1):n=xn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function zn(e){return null!==e.insertionCue}function Vn(e){return e.template.isValid}function Fn(e){return e.settings.template}function Hn(e,t){return t?vo(e,t)?.templateLock??!1:e.settings.templateLock??!1}const Un=(e,t,n=null)=>{let o,r;if(t&&"object"==typeof t?(o=t,r=t.name):(o=(0,p.getBlockType)(t),r=t),!o)return!1;const{allowedBlockTypes:i}=_o(e);if(!kt(i,r,!0))return!1;const s=(Array.isArray(o.parent)?o.parent:[]).concat(Array.isArray(o.ancestor)?o.ancestor:[]);if(s.length>0){if(s.includes("core/post-content"))return!0;let t=n,o=!1;do{if(s.includes(It(e,t))){o=!0;break}t=e.blocks.parents.get(t)}while(t);return o}return!0},Gn=(e,t,n=null)=>{if(!Un(e,t,n))return!1;let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,p.getBlockType)(t),Hn(e,n))return!1;const r=Do(e,n??"");if("disabled"===r)return!1;const i=vo(e,n);if(n&&void 0===i)return!1;const s=St(t),l=!!Ke(e,n),a=!!We(e,n);if((l||a)&&!s)return!1;if((l||"contentOnly"===r)&&!Ie(e,t,n))return!1;const c=It(e,n),u=(0,p.getBlockType)(c),d=u?.allowedBlocks;let h=kt(d,t);if(!1!==h){const e=i?.allowedBlocks,n=kt(e,t);null!==n&&(h=n)}const g=o.parent,m=kt(g,c);let b=!0;const k=o.ancestor;if(k){b=[n,...Qt(e,n)].some((t=>kt(k,It(e,t))))}const v=b&&(null===h&&null===m||!0===h||!0===m);return v?(0,f.applyFilters)("blockEditor.__unstableCanInsertBlockType",v,o,n,{getBlock:Tt.bind(null,e),getBlockParentsByBlockName:Jt.bind(null,e)}):v},$n=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(Gn,((t,n,o)=>yt(e)(t,o)))));function Wn(e,t,n=null){return t.every((t=>$n(e,It(e,t),n)))}function Kn(e,t){const n=Et(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Xt(e,t);if(Hn(e,o))return!1;const r=!!We(e,t),i=St(It(e,t));if(r&&!i)return!1;const s=!!Ke(e,o),l=Do(e,o);return!((s||"contentOnly"===l)&&!Ie(e,It(e,t),o))&&"disabled"!==l}function Zn(e,t){return t.every((t=>Kn(e,t)))}function qn(e,t){const n=Et(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Xt(e,t),r=Hn(e,o);if("all"===r||"contentOnly"===r)return!1;const i=!!We(e,t),s=St(It(e,t));if(i&&!s)return!1;const l=!!Ke(e,o),a=Do(e,o);return!((l||"contentOnly"===a)&&!Ie(e,It(e,t),o))&&"disabled"!==Do(e,o)}function Yn(e,t){return t.every((t=>qn(e,t)))}function Xn(e,t){const n=Et(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Qn(e,t){return!!(0,p.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Jn(e,t){return e.preferences.insertUsage?.[t]??null}const eo=(e,t,n)=>!!(0,p.hasBlockSupport)(t,"inserter",!0)&&Gn(e,t.name,n),to=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},no=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,p.hasBlockSupport)(n.name,"multiple",!0)||(r=Vt(e,Lt(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=Jn(e,o)||{},l={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:to(i,s)};if("transform"===t)return l;const a=(0,p.getBlockVariations)(n.name,"inserter");return{...l,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,parent:n.parent,ancestor:n.ancestor,variations:a,example:n.example,utility:1}},oo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null,o=Bt)=>{const r=Gn(t,"core/block",n)?G(e(ge)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?de:{src:de,foreground:"var(--wp-block-synced-color)"},o=mt(e),{time:r,count:i=0}=Jn(t,o.name)||{},s=to(r,i);return{id:o.name,name:"core/block",initialAttributes:{ref:e.id},title:o.title,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:o.content,get blocks(){return ft(o).blocks},syncStatus:o.syncStatus}})):[],i=no(t,{buildScope:"inserter"});let s=(0,p.getBlockTypes)().filter((e=>(0,p.hasBlockSupport)(e,"inserter",!0))).map(i);s=!1!==o[pt]?s.filter((e=>eo(t,e,n))):s.filter((e=>Un(t,e,n))).map((e=>({...e,isAllowedInCurrentRoot:eo(t,e,n)})));const l=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=Jn(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:to(r,i)}})(t,n);e.push(...o.map(r))}return e}),[]),{core:a,noncore:c}=l.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...a,...c],...r]}),((t,n)=>[(0,p.getBlockTypes)(),G(e(ge)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...yt(e)(t,n)])))),ro=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=no(e,{buildScope:"transform"}),i=(0,p.getBlockTypes)().filter((t=>eo(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e])));return xt((0,p.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]),(e=>s[e.name].frecency),"desc")}),((t,n,o)=>[(0,p.getBlockTypes)(),t.preferences.insertUsage,...yt(e)(t,o)])))),io=(e,t=null)=>{if((0,p.getBlockTypes)().some((n=>eo(e,n,t))))return!0;return Gn(e,"core/block",t)},so=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((e,t=null)=>{if(!t)return;const n=(0,p.getBlockTypes)().filter((n=>eo(e,n,t)));return Gn(e,"core/block",t)&&n.push("core/block"),n}),((t,n)=>[(0,p.getBlockTypes)(),...yt(e)(t,n)])))),lo=(0,g.createSelector)(((e,t=null)=>(I()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),so(e,t))),((e,t)=>so.getDependants(e,t)));function ao(e,t=null){if(!t)return;const{defaultBlock:n,directInsert:o}=e.blockListSettings[t]??{};return n&&o?n:void 0}function co(e,t=null){return I()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),ao(e,t)}const uo=(0,g.createRegistrySelector)((e=>(t,n)=>{const o=G(e(ge)).getPatternBySlug(n);return o?ft(o):null})),po=e=>(t,n)=>[..._t(e)(t),...yt(e)(t,n)],ho=new WeakMap;function go(e){let t=ho.get(e);return t||(t={...e,get blocks(){return ft(e).blocks}},ho.set(e,t)),t}const mo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null,o=Bt)=>{const{getAllPatterns:r}=G(e(ge)),i=r(),{allowedBlockTypes:s}=_o(t);return i.filter((({inserter:e=!0})=>!!e)).map(go).filter((e=>vt(bt(e),s))).filter((e=>bt(e).every((({blockName:e})=>!1!==o[pt]?$n(t,e,n):Un(t,e,n)))))}),po(e)))),fo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n,o=null)=>{if(!n)return wt;const r=e(ge).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?wt:s}),((t,n,o)=>po(e)(t,o))))),bo=(0,g.createRegistrySelector)((e=>(I()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ge).getPatternsByBlockTypes))),ko=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n,o=null)=>{if(!n)return wt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||Eo(t,e))))return wt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ge).getPatternsByBlockTypes(r,o)}),((t,n,o)=>po(e)(t,o)))));function vo(e,t){return e.blockListSettings[t]}function _o(e){return e.settings}function yo(e){return e.blocks.isPersistentChange}const xo=(0,g.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),So=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n)=>{I()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=G(e(ge)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[G(e(ge)).getReusableBlocks()]))));function wo(e){return e.blocks.isIgnoredChange}function Co(e){return e.lastBlockAttributesChange}function Bo(){return I()('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Io(e){return!!e.automaticChangeStatus}function jo(e,t){return e.highlightedBlock===t}function Eo(e,t){return!!e.blocks.controlledInnerBlocks[t]}const To=(0,g.createSelector)(((e,t)=>{if(!t.length)return null;const n=qt(e);if(t.includes(It(e,n)))return n;const o=an(e),r=Jt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Mo(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function Po(e,t){return e.blockVisibility?.[t]??!0}function Ro(){I()("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}const Ao=(0,g.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?Ct:t}),(e=>[e.blockVisibility]));function No(e,t){if("default"!==Do(e,t))return!1;if(!Xn(e,t))return!0;if(Qe(e)){const n=Xe(e);if(n){const o=xn(e,n);if(o?.includes(t))return!0}else if(t&&!Xt(e,t))return!0}return!(0,p.hasBlockSupport)(It(e,t),"__experimentalDisableBlockOverlay",!1)&&Eo(e,t)&&!wn(e,t)&&!Cn(e,t,!0)}function Lo(e,t){let n=e.blocks.parents.get(t);for(;n;){if(No(e,n))return!0;n=e.blocks.parents.get(n)}return!1}function Do(e,t=""){return null===t&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}const Oo=(0,g.createRegistrySelector)((e=>(t,n="")=>{const o=n||qt(t);if(!o)return!1;const{getGroupingBlockName:r}=e(p.store),i=Tt(t,o),s=r();return i&&(i.name===s||(0,p.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Kn(t,o)})),zo=(0,g.createRegistrySelector)((e=>(t,n=wt)=>{const{getGroupingBlockName:o}=e(p.store),r=o(),i=n?.length?n:ln(t),s=i?.length?Xt(t,i[0]):void 0;return $n(t,r,s)&&i.length&&Zn(t,i)})),Vo=(e,t)=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),$e(e,t));function Fo(e){return I()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),Ze(e)}function Ho(e){return I()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),qe(e)}const Uo=window.wp.a11y,Go=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function $o(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;Object.hasOwn(o,"__unstableIsPreviewMode")&&(I()("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),o={...o},o.isPreviewMode=o.__unstableIsPreviewMode,delete o.__unstableIsPreviewMode);let r=o;if(t&&"web"===h.Platform.OS){r={};for(const e in o)Go.includes(e)||(r[e]=o[e])}return{type:"UPDATE_SETTINGS",settings:r,reset:n}}function Wo(){return{type:"HIDE_BLOCK_INTERFACE"}}function Ko(){return{type:"SHOW_BLOCK_INTERFACE"}}const Zo=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;s=e,e=Array.isArray(s)?s:[s];if(!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){let n=function(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t};const i=n(e.map(o.getBlock));let s;for(const n of l)if(s=n.callback(i),s)return void r(Yo(e,t,s))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(qo())}))},qo=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Yo(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function Xo(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Qo(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Jo(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function er(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function tr(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function nr(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function or(e){return({select:t,dispatch:n,registry:o})=>{const r=G(o.select(ji)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function rr(){return{type:"START_DRAGGING"}}function ir(){return{type:"STOP_DRAGGING"}}function sr(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function lr(e){return{type:"SET_INSERTION_POINT",value:e}}const ar=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)},cr=(e=100)=>({select:t,dispatch:n})=>{if(100!==e){const e=t.getBlockSelectionStart(),o=t.getSectionRootClientId();if(e){let r;if(o){const n=t.getBlockOrder(o);r=n?.includes(e)?e:t.getBlockParents(e).find((e=>n.includes(e)))}else r=t.getBlockHierarchyRootClientId(e);r?n.selectBlock(r):n.clearSelectedBlock(),(0,Uo.speak)((0,T.__)("You are currently in zoom-out mode."))}}n({type:"SET_ZOOM_LEVEL",zoom:e})};function ur(){return{type:"RESET_ZOOM_LEVEL"}}function dr(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}const pr=window.wp.notices,hr=window.wp.preferences,gr="";function mr(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof pe.RichTextData)&&-1!==n.toString().indexOf(gr)}))}function fr(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const br=e=>Array.isArray(e)?e:[e],kr=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(vr(e))},vr=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,p.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function _r(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function yr(e){return I()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function xr(e,t,n={uniqueByBlock:!1}){return"boolean"==typeof n&&(n={uniqueByBlock:n}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:br(e),attributes:t,options:n}}function Sr(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function wr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Cr(){return I()('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}const Br=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},Ir=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function jr(){return{type:"START_MULTI_SELECT"}}function Er(){return{type:"STOP_MULTI_SELECT"}}const Tr=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,Uo.speak)((0,T.sprintf)((0,T._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function Mr(){return{type:"CLEAR_SELECTED_BLOCK"}}function Pr(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const Rr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=br(e),t=br(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}l.batch((()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function Ar(e,t){return Rr(e,t)}const Nr=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:br(t),rootClientId:n})},Lr=Nr("MOVE_BLOCKS_DOWN"),Dr=Nr("MOVE_BLOCKS_UP"),Or=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function zr(e,t="",n="",o){return Or([e],t,n,o)}function Vr(e,t,n,o,r){return Fr([e],t,n,o,0,r)}const Fr=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,I()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=br(e);const a=[];for(const t of e){s.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function Hr(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const Ur=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Gr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const $r=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,p.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Wr=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const l=n.getBlockOrder(s);let a,c;l.indexOf(r.clientId)>l.indexOf(i.clientId)?(a=i,c=r):(a=r,c=i);const u=e?c:a,d=n.getBlock(u.clientId),h=(0,p.getBlockType)(d.name);if(!h.merge)return;const g=a,m=c,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,pe.create)({html:k}),y=(0,pe.create)({html:v});_=(0,pe.remove)(_,g.offset,_.text.length),y=(0,pe.insert)(y,gr,0,m.offset);const x=(0,p.cloneBlock)(f,{[g.attributeKey]:(0,pe.toHTMLString)({value:_})}),S=(0,p.cloneBlock)(b,{[m.attributeKey]:(0,pe.toHTMLString)({value:y})}),w=e?x:S,C=f.name===b.name?[w]:(0,p.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(x.attributes,e.attributes)}const I=mr(B),j=B[I],E=(0,pe.create)({html:j}),T=E.text.indexOf(gr),M=(0,pe.remove)(E,T,T+1),P=(0,pe.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),A=[...e?C:[],{...d,attributes:{...d.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(d.clientId,I,T,T),o.replaceBlocks(R,A,0,n.getSelectedBlocksInitialCaretPosition())}))},Kr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),l=n.getBlockRootClientId(i.clientId);if(s!==l)return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const d=c,h=u,g=n.getBlock(d.clientId),m=n.getBlock(h.clientId),f=(0,p.getBlockType)(g.name),b=(0,p.getBlockType)(m.name),k="string"==typeof d.attributeKey?d.attributeKey:fr(f),v="string"==typeof h.attributeKey?h.attributeKey:fr(b),_=n.getBlockAttributes(d.clientId),y=_?.metadata?.bindings;if(y?.[k]){if(e.length){const{createWarningNotice:e}=t.dispatch(pr.store);return void e((0,T.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(d.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(d.clientId===h.clientId&&k===v&&d.offset===h.offset)if(e.length){if((0,p.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([d.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(d.clientId).length){let e=function(){const e=(0,p.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,p.createBlock)(e):(0,p.createBlock)(n.getBlockName(d.clientId))};const t=_[k].length;if(0===d.offset&&t)return void o.insertBlocks([e()],n.getBlockIndex(d.clientId),s,!1);if(d.offset===t)return void o.insertBlocks([e()],n.getBlockIndex(d.clientId)+1,s)}const x=g.attributes[k],S=m.attributes[v];let w=(0,pe.create)({html:x}),C=(0,pe.create)({html:S});w=(0,pe.remove)(w,d.offset,w.text.length),C=(0,pe.remove)(C,0,h.offset);let B={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,pe.toHTMLString)({value:w})}},I={...m,clientId:g.clientId===m.clientId?(0,p.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,pe.toHTMLString)({value:C})}};const j=(0,p.getDefaultBlockName)();if(g.clientId===m.clientId&&j&&I.name!==j&&n.canInsertBlockType(j,s)){const e=(0,p.switchToBlockType)(I,j);1===e?.length&&(I=e[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[B,I]);let E;const M=[],P=[...e],R=P.shift(),A=(0,p.getBlockType)(B.name),N=A.merge&&R.name===A.name?[R]:(0,p.switchToBlockType)(R,A.name);if(N?.length){const e=N.shift();B={...B,attributes:{...B.attributes,...A.merge(B.attributes,e.attributes)}},M.push(B),E={clientId:B.clientId,attributeKey:k,offset:(0,pe.create)({html:B.attributes[k]}).text.length},P.unshift(...N)}else(0,p.isUnmodifiedBlock)(B)||M.push(B),M.push(R);const L=P.pop(),D=(0,p.getBlockType)(I.name);if(P.length&&M.push(...P),L){const e=D.merge&&D.name===L.name?[L]:(0,p.switchToBlockType)(L,D.name);if(e?.length){const t=e.pop();M.push({...I,attributes:{...I.attributes,...D.merge(t.attributes,I.attributes)}}),M.push(...e),E={clientId:I.clientId,attributeKey:v,offset:(0,pe.create)({html:t.attributes[v]}).text.length}}else M.push(L),(0,p.isUnmodifiedBlock)(I)||M.push(I)}else(0,p.isUnmodifiedBlock)(I)||M.push(I);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),E&&o.selectionChange(E.clientId,E.attributeKey,E.offset,E.offset)}))},Zr=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},qr=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,l=o.getBlock(i),a=(0,p.getBlockType)(l.name);if(!a||"disabled"===o.getBlockEditingMode(i)||"disabled"===o.getBlockEditingMode(s))return;const c=o.getBlock(s);if(!a.merge&&(0,p.getBlockSupport)(l.name,"__experimentalOnMerge")){const e=(0,p.switchToBlockType)(c,a.name);if(1!==e?.length)return void r.selectBlock(l.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(l.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,p.isUnmodifiedDefaultBlock)(l))return void r.removeBlock(i,o.isBlockSelected(i));if((0,p.isUnmodifiedDefaultBlock)(c))return void r.removeBlock(s,o.isBlockSelected(s));if(!a.merge)return void((0,p.isUnmodifiedBlock)(c,"content")?r.removeBlock(s,o.isBlockSelected(s)):r.selectBlock(l.clientId));const u=(0,p.getBlockType)(c.name),{clientId:d,attributeKey:h,offset:g}=o.getSelectionStart(),m=(d===i?a:u).attributes[h],f=(d===i||d===s)&&void 0!==h&&void 0!==g&&!!m;m||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,p.cloneBlock)(l),k=(0,p.cloneBlock)(c);if(f){const e=d===i?b:k,t=e.attributes[h],n=(0,pe.insert)((0,pe.create)({html:t}),gr,g,g);e.attributes[h]=(0,pe.toHTMLString)({value:n})}const v=l.name===c.name?[k]:(0,p.switchToBlockType)(k,l.name);if(!v||!v.length)return;const _=a.merge(b.attributes,v[0].attributes);if(f){const e=mr(_),t=_[e],n=(0,pe.create)({html:t}),o=n.text.indexOf(gr),i=(0,pe.remove)(n,o,o+1),s=(0,pe.toHTMLString)({value:i});_[e]=s,r.selectionChange(l.clientId,e,o,o)}r.replaceBlocks([l.clientId,c.clientId],[{...l,attributes:{...l.attributes,..._}},...v.slice(1)],0)},Yr=(e,t=!0)=>Zo(e,t);function Xr(e,t){return Yr([e],t)}function Qr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Jr(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ei(){return{type:"START_TYPING"}}function ti(){return{type:"STOP_TYPING"}}function ni(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function oi(){return{type:"STOP_DRAGGING_BLOCKS"}}function ri(){return I()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ii(){return I()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function si(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const li=(e,t,n)=>({dispatch:o})=>{const r=(0,p.getDefaultBlockName)();if(!r)return;const i=(0,p.createBlock)(r,e);return o.insertBlock(i,n,t)};function ai(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ci(e){return $o(e,{stripExperimentalSettings:!0})}function ui(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function di(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function pi(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const hi=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=e=>setTimeout(e,100)}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},gi=e=>({registry:t})=>{t.dispatch(hr.store).set("core","editorTool",e),"navigation"===e?(0,Uo.speak)((0,T.__)("You are currently in Write mode.")):"edit"===e&&(0,Uo.speak)((0,T.__)("You are currently in Design mode."))};function mi(){return I()('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}const fi=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;if(r.map((e=>e.name)).some((e=>!(0,p.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=br(e),l=n.getBlockIndex(s[s.length-1]),a=r.map((e=>(0,p.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(a,l+1,i,t),a.length>1&&t&&o.multiSelect(a[0].clientId,a[a.length-1].clientId),a.map((e=>e.clientId))},bi=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,p.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r,o)},ki=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,p.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r+1,o)};function vi(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const _i=(e,t=150)=>async({dispatch:n})=>{n(vi(e,!0)),await new Promise((e=>setTimeout(e,t))),n(vi(e,!1))};function yi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function xi(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Si(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const wi=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Ci(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Bi(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Ii={reducer:ce,selectors:t,actions:i},ji=(0,g.createReduxStore)(ge,{...Ii,persist:["preferences"]}),Ei=(0,g.registerStore)(ge,{...Ii,persist:["preferences"]});function Ti(...e){const{clientId:t=null}=C();return(0,g.useSelect)((n=>G(n(ji)).getBlockSettings(t,...e)),[t,...e])}function Mi(e){I()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=Ti(e);return t}G(Ei).registerPrivateActions(r),G(Ei).registerPrivateSelectors(e),G(ji).registerPrivateActions(r),G(ji).registerPrivateSelectors(e);const Pi=window.wp.styleEngine,Ri="1600px",Ai="320px",Ni=1,Li=.25,Di=.75,Oi="14px";function zi({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=Ai,maximumViewportWidth:r=Ri,scaleFactor:i=Ni,minimumFontSizeLimit:s}){if(s=Vi(s)?s:Oi,n){const o=Vi(n);if(!o?.unit)return null;const r=Vi(s,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),Li),Di),i=Fi(o.value*n,3);e=r?.value&&i<r?.value?`${r.value}${r.unit}`:`${i}${o.unit}`}}const l=Vi(e),a=l?.unit||"rem",c=Vi(t,{coerceTo:a});if(!l||!c)return null;const u=Vi(e,{coerceTo:"rem"}),d=Vi(r,{coerceTo:a}),p=Vi(o,{coerceTo:a});if(!d||!p||!u)return null;const h=d.value-p.value;if(!h)return null;const g=Fi(p.value/100,3),m=Fi(g,3)+a,f=Fi(((c.value-l.value)/h*100||1)*i,3);return`clamp(${e}, ${`${u.value}${u.unit} + ((1vw - ${m}) * ${f})`}, ${t})`}function Vi(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:o,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=r?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.match(s);if(!l||l.length<3)return null;let[,a,c]=l,u=parseFloat(a);return"px"!==n||"em"!==c&&"rem"!==c||(u*=o,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=o,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Fi(u,3),unit:c}}function Fi(e,t=3){const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}function Hi(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":case"400":t=(0,T._x)("Regular","font weight");break;case"bold":case"700":t=(0,T._x)("Bold","font weight");break;case"100":t=(0,T._x)("Thin","font weight");break;case"200":t=(0,T._x)("Extra Light","font weight");break;case"300":t=(0,T._x)("Light","font weight");break;case"500":t=(0,T._x)("Medium","font weight");break;case"600":t=(0,T._x)("Semi Bold","font weight");break;case"800":t=(0,T._x)("Extra Bold","font weight");break;case"900":t=(0,T._x)("Black","font weight");break;case"1000":t=(0,T._x)("Extra Black","font weight");break;default:t=e}return{name:t,value:e}}const Ui=[{name:(0,T._x)("Regular","font style"),value:"normal"},{name:(0,T._x)("Italic","font style"),value:"italic"}],Gi=[{name:(0,T._x)("Thin","font weight"),value:"100"},{name:(0,T._x)("Extra Light","font weight"),value:"200"},{name:(0,T._x)("Light","font weight"),value:"300"},{name:(0,T._x)("Regular","font weight"),value:"400"},{name:(0,T._x)("Medium","font weight"),value:"500"},{name:(0,T._x)("Semi Bold","font weight"),value:"600"},{name:(0,T._x)("Bold","font weight"),value:"700"},{name:(0,T._x)("Extra Bold","font weight"),value:"800"},{name:(0,T._x)("Black","font weight"),value:"900"},{name:(0,T._x)("Extra Black","font weight"),value:"1000"}];function $i(e){let t=[],n=[];const o=[],r=!e||0===e?.length;let i=!1;return e?.forEach((e=>{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(Hi(t))}}const o=Hi("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,T._x)("Regular","font style");break;case"italic":t=(0,T._x)("Italic","font style");break;case"oblique":t=(0,T._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,T._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,T._x)("Italic","font style"),value:"italic"}),r&&(t=Ui,n=Gi),t=0===t.length?Ui:t,n=0===n.length?Gi:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,T.sprintf)((0,T._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Wi(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!Ki(t?.typography)&&!Ki(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=Vi(n?.wideSize)?n?.wideSize:null;return Ki(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};const r=zi({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Ki(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Zi(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))<Math.abs(parseInt(e)-parseInt(t))?n:e),e[0]?.value);return n}const qi="body",Yi=":root",Xi=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Wi(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]}],Qi={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Ji(){return(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function es(e,t,n,o,r){const i=[fe(e,["blocks",t,...n]),fe(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s){if("slug"===o)return s;return es(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}}function ts(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=fe(e,n.ref))||n?.ref)return n}const o="var:",r="var(--wp--";let i;if(n.startsWith(o))i=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;i=n.slice(10,-1).split("--")}const[s,...l]=i;return"preset"===s?function(e,t,n,[o,r]){const i=Xi.find((e=>e.cssVarInfix===o));if(!i)return n;const s=es(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return ts(e,t,s[n])}return n}(e,t,n,l):"custom"===s?function(e,t,n,o){const r=fe(e.settings,["blocks",t,"custom",...o])??fe(e.settings,["custom",...o]);return r?ts(e,t,r):n}(e,t,n,l):n}function ns(e,t){if(!e||!t)return t;const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function os(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:E()(e?.styles,t?.styles)&&E()(e?.settings,t?.settings)}function rs(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,Pi.getCSSValueFromRawStyle)(fe(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const is=(0,h.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}});is.displayName="GlobalStylesContext";const ss={settings:{},styles:{}},ls=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","border.radiusSizes","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],as=()=>{const{user:e,setUserConfig:t}=(0,h.useContext)(is),n={settings:e.settings,styles:e.styles};return[!!n&&!E()(n,ss),(0,h.useCallback)((()=>t(ss)),[t])]};function cs(e,t,n="all"){const{setUserConfig:o,...r}=(0,h.useContext)(is),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,a=`settings${s}`,c="all"===n?"merged":n;return[(0,h.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";if(e)return fe(t,l)??fe(t,a);let n={};return ls.forEach((e=>{const o=fe(t,`settings${i}.${e}`)??fe(t,`settings.${e}`);void 0!==o&&(n=me(n,e.split("."),o))})),n}),[r,c,e,l,a,i]),e=>{o((t=>me(t,l.split("."),e)))}]}function us(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,h.useContext)(is),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let u,d;switch(n){case"all":u=fe(r,c),d=o?ts(r,t,u):u;break;case"user":u=fe(s,c),d=o?ts(r,t,u):u;break;case"base":u=fe(i,c),d=o?ts(i,t,u):u;break;default:throw"Unsupported source"}return[d,n=>{l((i=>me(i,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Qi[n],i=Xi.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=es(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function ds(e,t,n){const{supportedStyles:o,supports:r}=(0,g.useSelect)((e=>({supportedStyles:G(e(p.store)).getSupportedStyles(t,n),supports:e(p.store).getBlockType(t)?.supports})),[t,n]);return(0,h.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function ps(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function hs(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function gs(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=gs(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const ms=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=gs(e))&&(o&&(o+=" "),o+=t);return o},fs=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,fs(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function bs(e,t,n,o,r,i){if(Object.values(e??{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=fe(s,e);t&&(l={...l,attributes:me(l.attributes,e,t)})}))})),l}function ks(e,t,n){const o=(0,p.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}const vs=new WeakMap;function _s({id:e,css:t}){return ys({id:e,css:t})}function ys({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=G((0,g.useDispatch)(ji)),a=(0,g.useRegistry)(),c=(0,h.useId)();(0,h.useEffect)((()=>{if(!t&&!n)return;const u=e||c,d={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return vs.get(a)||vs.set(a,[]),vs.get(a).push([u,d]),window.queueMicrotask((()=>{vs.get(a)?.length&&a.batch((()=>{vs.get(a).forEach((e=>{s(...e)})),vs.set(a,[])}))})),()=>{const e=vs.get(a)?.find((([e])=>e===u));e?vs.set(a,vs.get(a).filter((([e])=>e!==u))):l(u)}}),[e,t,i,n,o,c,s,l,a])}function xs(e,t){const[n,o,r,i,s,l,a,c,u,d,p,g,m,f,b,k,v,_,y,x,S,w,C,B,I,j,E,T,M,P,R,A,N,L,D,O,z,V,F,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re,ie]=Ti("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return ds((0,h.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:V,theme:H,default:U},gradients:{custom:q,theme:Y,default:X},duotone:{custom:W,theme:K,default:Z},defaultGradients:Q,defaultPalette:G,defaultDuotone:$,custom:z,customGradient:J,customDuotone:F,background:ee,link:te,heading:oe,button:re,text:ne},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:a,default:c,theme:u},customFontSize:d,defaultFontSizes:l,fontStyle:p,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:y,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:x,margin:S,blockGap:w,units:T},border:{color:A,radius:N,style:L,width:D,radiusSizes:O},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:ie})),[n,o,r,i,s,l,a,c,u,d,p,g,m,f,b,k,_,y,v,x,S,w,C,B,I,j,E,T,M,P,R,t,A,N,L,D,O,z,V,F,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re,ie]),e)}const Ss=(0,h.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,h.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,f.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,p.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const ws=window.wp.components;var Cs={default:(0,ws.createSlotFill)("BlockControls"),block:(0,ws.createSlotFill)("BlockControlsBlock"),inline:(0,ws.createSlotFill)("BlockFormatControls"),other:(0,ws.createSlotFill)("BlockControlsOther"),parent:(0,ws.createSlotFill)("BlockControlsParent")};function Bs({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=C();return n[b]?Cs[e]?.Fill:n[k]&&t?Cs.parent.Fill:null}(e,o);if(!r)return null;const i=(0,d.jsxs)(d.Fragment,{children:["default"===e&&(0,d.jsx)(ws.ToolbarGroup,{controls:t}),n]});return(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,d.jsx)(t,{...n,children:e})),i)}})})}const Is=window.wp.warning;var js=n.n(Is);const{ComponentsContext:Es}=G(ws.privateApis);function Ts({group:e="default",...t}){const n=(0,h.useContext)(ws.__experimentalToolbarContext),o=(0,h.useContext)(Es),r=(0,h.useMemo)((()=>({forwardedContext:[[ws.__experimentalToolbarContext.Provider,{value:n}],[Es.Provider,{value:o}]]})),[n,o]),i=Cs[e],s=(0,ws.__experimentalUseSlotFills)(i.name);if(!i)return js()(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;const{Slot:l}=i,a=(0,d.jsx)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,d.jsx)(ws.ToolbarGroup,{children:a})}const Ms=Bs;Ms.Slot=Ts;const Ps=e=>(0,d.jsx)(Bs,{group:"inline",...e});Ps.Slot=e=>(0,d.jsx)(Ts,{group:"inline",...e});var Rs=Ms,As=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),Ns=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Ls=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),Ds=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),Os=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),zs=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),Vs=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});const Fs={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Hs(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function Us(e,t=Fs,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Hs(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Gs(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&"constrained"===o&&(r.none=(0,T.sprintf)((0,T.__)("Max %s wide"),t)),i.test(n)&&(r.wide=(0,T.sprintf)((0,T.__)("Max %s wide"),n)),r}var $s=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Ws=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,d.jsx)(ue.Path,{d:"m18 7.5v9h1.5v-9z"})]}),Ks=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,d.jsx)(ue.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Zs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),qs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Ys=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),Xs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});const Qs=8,Js=["top","right","bottom","left"],el={top:void 0,right:void 0,bottom:void 0,left:void 0},tl={custom:$s,axial:$s,horizontal:Ws,vertical:Ks,top:Zs,right:qs,bottom:Ys,left:Xs},nl={default:(0,T.__)("Spacing control"),top:(0,T.__)("Top"),bottom:(0,T.__)("Bottom"),left:(0,T.__)("Left"),right:(0,T.__)("Right"),mixed:(0,T.__)("Mixed"),vertical:(0,T.__)("Vertical"),horizontal:(0,T.__)("Horizontal"),axial:(0,T.__)("Horizontal & vertical"),custom:(0,T.__)("Custom")},ol={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function rl(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function il(e,t){if(!rl(e))return e;const n=al(e),o=t.find((e=>String(e.slug)===n));return o?.size}function sl(e,t){if(!e||rl(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function ll(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function al(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function cl(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function ul(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=ll(n?.top)||t,r=ll(n?.left)||t;return o===r?o:`${o} ${r}`}var dl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),pl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),hl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),gl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),ml=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});const fl={top:{icon:dl,title:(0,T._x)("Align top","Block vertical alignment setting")},center:{icon:pl,title:(0,T._x)("Align middle","Block vertical alignment setting")},bottom:{icon:hl,title:(0,T._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:gl,title:(0,T._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:ml,title:(0,T._x)("Space between","Block vertical alignment setting")}},bl=["top","center","bottom"];var kl=function({value:e,onChange:t,controls:n=bl,isCollapsed:o=!0,isToolbar:r}){const i=fl[e],s=fl.top,l=r?ws.ToolbarGroup:ws.ToolbarDropdownMenu,a=r?{isCollapsed:o}:{};return(0,d.jsx)(l,{icon:i?i.icon:s.icon,label:(0,T._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...fl[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})),...a})};const vl=e=>(0,d.jsx)(kl,{...e,isToolbar:!1}),_l=e=>(0,d.jsx)(kl,{...e,isToolbar:!0}),yl={left:As,center:Ns,right:Ls,"space-between":Ds,stretch:Os};var xl=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?yl[o]:yl.left,a=[{name:"left",icon:As,title:(0,T.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:Ns,title:(0,T.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:Ls,title:(0,T.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:Ds,title:(0,T.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:Os,title:(0,T.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,d.jsx)(c,{icon:l,popoverProps:r,label:(0,T.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})};const Sl=e=>(0,d.jsx)(xl,{...e,isToolbar:!1}),wl=e=>(0,d.jsx)(xl,{...e,isToolbar:!0}),Cl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Bl={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Il={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},jl="center",El="top",Tl=["wrap","nowrap"];var Ml={name:"flex",label:(0,T.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0,allowJustification:r=!0}=n;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.Flex,{children:[r&&(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Al,{layout:e,onChange:t})}),o&&(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Ll,{layout:e,onChange:t})})]}),(0,d.jsx)(Nl,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowVerticalAlignment:o=!0,allowJustification:r=!0}=n;return r||o?(0,d.jsxs)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:[r&&(0,d.jsx)(Al,{layout:e,onChange:t,isToolbar:!0}),o&&(0,d.jsx)(Pl,{layout:e,onChange:t})]}):null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!ks(o,"spacing","blockGap")?ul(n?.spacing?.blockGap,"0.5em"):void 0,a=Cl[t.justifyContent],c=Tl.includes(t.flexWrap)?t.flexWrap:"wrap",u=Il[t.verticalAlignment],d=Bl[t.justifyContent]||Bl.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${Hs(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=Us(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Pl({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?jl:El,{verticalAlignment:r=o}=e;return(0,d.jsx)(vl,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const Rl={placement:"bottom-start"};function Al({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,d.jsx)(Sl,{allowedControls:s,value:o,onChange:i,popoverProps:Rl});const l=[{value:"left",icon:As,label:(0,T.__)("Justify items left")},{value:"center",icon:Ns,label:(0,T.__)("Justify items center")},{value:"right",icon:Ls,label:(0,T.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:Ds,label:(0,T.__)("Space between items")}):l.push({value:"stretch",icon:Os,label:(0,T.__)("Stretch items")}),(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function Nl({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function Ll({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,T.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:zs,value:"horizontal",label:(0,T.__)("Horizontal")}),(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:Vs,value:"vertical",label:(0,T.__)("Vertical")})]})}var Dl={name:"default",label:(0,T.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Fs}){const i=ul(t?.spacing?.blockGap);let s="";ks(n,"spacing","blockGap")||(i?.top?s=ul(i?.top):"string"==typeof i&&(s=ul(i)));let l="";return o&&s&&(l+=Us(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=Gs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}},Ol=(0,h.forwardRef)((({icon:e,size:t=24,...n},o)=>(0,h.cloneElement)(e,{width:t,height:t,...n,ref:o}))),zl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),Vl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Fl={name:"constrained",label:(0,T.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:As,label:(0,T.__)("Justify items left")},{value:"center",icon:Ns,label:(0,T.__)("Justify items center")},{value:"right",icon:Ls,label:(0,T.__)("Justify items right")}],[c]=Ti("spacing.units"),u=(0,ws.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:zl})})}),(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:Vl})})}),(0,d.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,T.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(Ul,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=ul(n?.spacing?.blockGap);let u="";ks(o,"spacing","blockGap")||(c?.top?u=ul(c?.top):"string"==typeof c&&(u=ul(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${s??l};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${Hs(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${l??s};\n\t\t\t\t\t}\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?h+=`${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Pi.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}}))}return r&&u&&(h+=Us(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=Gs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const Hl={placement:"bottom-start"};function Ul({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,d.jsx)(Sl,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:Hl})}const Gl={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},$l=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}];var Wl={name:"grid",label:(0,T.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ql,{layout:e,onChange:t}),(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,children:[r&&(0,d.jsx)(Zl,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,d.jsx)(Kl,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t;const c=n?.spacing?.blockGap&&!ks(o,"spacing","blockGap")?ul(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${Hs(e)} { ${d.join("; ")}; }`),r&&c&&(u+=Us(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Kl({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,d.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Minimum column width")}),(0,d.jsxs)(ws.Flex,{gap:4,children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:$l,min:0,label:(0,T.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:Gl[l]||600,withInputField:!1,label:(0,T.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Zl({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Columns")}),(0,d.jsxs)(ws.Flex,{gap:4,children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,T.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,d.jsx)(ws.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,T.__)("Rows")}):(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r??1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,T.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function ql({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,h.useState)(n||3),[a,c]=(0,h.useState)(o),[u,p]=(0,h.useState)(r||"12rem"),g=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",m="manual"===g?(0,T.__)("Grid items can be manually placed in any position on the grid."):(0,T.__)("Grid items are placed automatically depending on their order.");return(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Grid item position"),value:g,onChange:i=>{"manual"===i?p(r||"12rem"):(l(n||3),c(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?a:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?u:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?m:void 0,children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"auto",label:(0,T.__)("Auto")},"auto"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"manual",label:(0,T.__)("Manual")},"manual")]})}const Yl=[Dl,Ml,Fl,Wl];function Xl(e="default"){return Yl.find((t=>t.name===e))}const Ql={type:"default"},Jl=(0,h.createContext)(Ql);Jl.displayName="BlockLayoutContext";const ea=Jl.Provider;function ta(){return(0,h.useContext)(Jl)}const na=[],oa=["none","left","center","right","wide","full"],ra=["wide","full"];function ia(e=oa){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,g.useSelect)((e=>{if(t)return[!1,!1,!1];const n=e(ji).getSettings();return[n.alignWide??!1,n.supportsLayout,n.__unstableIsBlockBasedTheme]}),[t]),i=ta();if(t)return na;const s=Xl(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?na:t}if("default"!==s.name&&"constrained"!==s.name)return na;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&ra.includes(e))&&oa.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?na:l}var sa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),la=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),aa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),ca=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});const ua={none:{icon:zl,title:(0,T._x)("None","Alignment option")},left:{icon:sa,title:(0,T.__)("Align left")},center:{icon:la,title:(0,T.__)("Align center")},right:{icon:aa,title:(0,T.__)("Align right")},wide:{icon:Vl,title:(0,T.__)("Wide width")},full:{icon:ca,title:(0,T.__)("Full width")}};var da=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=ia(n);if(!!!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=ua[e],a=ua.none,c=o?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,T.__)("Align")},p=o?{isCollapsed:r,controls:i.map((({name:t})=>({...ua[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,T.__)("Change alignment")},children:({onClose:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=ua[n],l=n===e||!e&&"none"===n;return(0,d.jsx)(ws.MenuItem,{icon:r,iconPosition:"left",className:ms("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,d.jsx)(c,{...u,...p})};const pa=e=>(0,d.jsx)(da,{...e,isToolbar:!1}),ha=e=>(0,d.jsx)(da,{...e,isToolbar:!0});function ga(e){const t=C(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,g.useDispatch)(ji),i=(0,g.useSelect)((e=>n?null:e(ji).getBlockEditingMode()),[n]);return(0,h.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[v]:i}const ma=["left","center","right","wide","full"],fa=["wide","full"];function ba(e,t=!0,n=!0){let o;return o=Array.isArray(e)?ma.filter((t=>e.includes(t))):!0===e?[...ma]:[],!n||!0===e&&!t?o.filter((e=>!fa.includes(e))):o}var ka={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=ia(ba((0,p.getBlockSupport)(e,"align"),(0,p.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=ga();return o.length&&"default"===r?(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(pa,{value:t,onChange:t=>{if(!t){const n=(0,p.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){const n=ba((0,p.getBlockSupport)(e,"align"),(0,p.hasBlockSupport)(e,"alignWide",!0));if(ia(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,p.getBlockSupport)(t,"align"),i=(0,p.hasBlockSupport)(t,"alignWide",!0);ba(r,i).includes(o)&&(e.className=ms(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,p.hasBlockSupport)(e,"align",!1)};(0,f.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){return"type"in(e.attributes?.align??{})||(0,p.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ma,""]}}),e}));const va=(0,ws.createSlotFill)("InspectorControls"),_a=(0,ws.createSlotFill)("InspectorAdvancedControls"),ya=(0,ws.createSlotFill)("InspectorControlsBindings"),xa=(0,ws.createSlotFill)("InspectorControlsBackground"),Sa=(0,ws.createSlotFill)("InspectorControlsBorder"),wa=(0,ws.createSlotFill)("InspectorControlsColor"),Ca=(0,ws.createSlotFill)("InspectorControlsFilter"),Ba=(0,ws.createSlotFill)("InspectorControlsDimensions"),Ia=(0,ws.createSlotFill)("InspectorControlsPosition"),ja=(0,ws.createSlotFill)("InspectorControlsTypography"),Ea=(0,ws.createSlotFill)("InspectorControlsListView"),Ta=(0,ws.createSlotFill)("InspectorControlsStyles");var Ma={default:va,advanced:_a,background:xa,bindings:ya,border:Sa,color:wa,dimensions:Ba,effects:(0,ws.createSlotFill)("InspectorControlsEffects"),filter:Ca,list:Ea,position:Ia,settings:va,styles:Ta,typography:ja};const Pa=(0,ws.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));function Ra({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(I()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=C(),i=Ma[t]?.Fill;return i?r[b]?(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(i,{children:t=>(0,d.jsx)(Na,{fillProps:t,children:e,resetAllFilter:o})})}):null:(js()(`Unknown InspectorControls group "${t}" provided.`),null)}function Aa({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,h.useContext)(ws.__experimentalToolsPanelContext);return(0,h.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function Na({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,d.jsx)(Aa,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,d.jsx)(t,{...n,children:e})),r)}function La({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,g.useDispatch)(ji),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,g.useSelect)(ji),a=Ji(),c=s(),u=(0,h.useCallback)(((e=[])=>{const t={},n=l()?i():[c];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:fs(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,c,o]);return(0,d.jsx)(ws.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:u,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:a,children:e},c)}function Da({Slot:e,fillProps:t,...n}){const o=(0,h.useContext)(ws.__experimentalToolsPanelContext),r=(0,h.useMemo)((()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[ws.__experimentalToolsPanelContext.Provider,{value:o}]]})),[o,t]);return(0,d.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Oa({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(I()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=Ma[t],s=(0,ws.__experimentalUseSlotFills)(i?.name);if(!i)return js()(`Unknown InspectorControls group "${t}" provided.`),null;if(!s?.length)return null;const{Slot:l}=i;return n?(0,d.jsx)(La,{group:t,label:n,children:(0,d.jsx)(Da,{...r,fillProps:o,Slot:l})}):(0,d.jsx)(l,{...r,fillProps:o,bubblesVirtually:!0})}const za=Ra;za.Slot=Oa;const Va=e=>(0,d.jsx)(Ra,{...e,group:"advanced"});Va.Slot=e=>(0,d.jsx)(Oa,{...e,group:"advanced"}),Va.slotName="InspectorAdvancedControls";var Fa=za,Ha=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 11.5h10V13H7z"})});const Ua=window.wp.url,Ga=window.wp.dom,$a=window.wp.blob,Wa=window.wp.keycodes;var Ka=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),Za=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})}),qa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});var Ya=(0,ws.withFilters)("editor.MediaUpload")((()=>null));var Xa=function({fallback:e=null,children:t}){const n=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return!!t().mediaUpload}),[]);return n?t:e};const Qa=window.wp.isShallowEqual;var Ja=n.n(Qa),ec=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),tc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})}),nc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),oc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var rc=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,m.useReducedMotion)(),i=r?h.Fragment:ws.__unstableAnimatePresence,s=r?"div":ws.__unstableMotion.div,l=`link-control-settings-drawer-${(0,m.useInstanceId)(e)}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,T.isRTL)()?nc:oc,"aria-controls":l,children:(0,T._x)("Advanced","Additional link settings")}),(0,d.jsx)(i,{children:n&&(0,d.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,d.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})},ic=n(1609);function sc(e){return"function"==typeof e}class lc extends h.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,h.createRef)(),this.inputRef=e.inputRef||(0,h.createRef)(),this.updateSuggestions=(0,m.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&this.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Ua.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,T.sprintf)((0,T._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,T.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case Wa.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Wa.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Wa.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Wa.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Wa.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Wa.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,T.__)("Link selected.")));break;case Wa.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,d.jsxs)(d.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,T.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1,help:a=null,disabled:c=!1}=this.props,{loading:u,showSuggestions:p,selectedSuggestion:h,suggestionsListboxId:g,suggestionOptionIdPrefix:m}=this.state,f=`url-input-control-${o}`,b={id:f,label:e,className:ms("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},k={id:f,value:s,required:!0,type:"text",onChange:c?()=>{}:this.onChange,onFocus:c?()=>{}:this.onFocus,placeholder:r,onKeyDown:c?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,T.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==h?`${m}-${h}`:void 0,ref:this.inputRef,disabled:c,suffix:this.props.suffix,help:a};return i?i(b,k,u):(0,d.jsxs)(ws.BaseControl,{__nextHasNoMarginBottom:!0,...b,children:[(0,d.jsx)(ws.__experimentalInputControl,{...k,__next40pxDefaultSize:!0}),u&&(0,d.jsx)(ws.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return sc(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,d.jsx)(ws.Popover,{placement:"bottom",focusOnMount:!1,children:(0,d.jsx)("div",{...c,className:ms("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:o.map(((e,t)=>(0,ic.createElement)(ws.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:ms("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}var ac=(0,m.compose)(m.withSafeTimeout,ws.withSpokenMessages,m.withInstanceId,(0,g.withSelect)(((e,t)=>{if(sc(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(ji);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(lc),cc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var uc=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,h.createInterpolateElement)((0,T.sprintf)((0,T.__)("Create: <mark>%s</mark>"),e),{mark:(0,d.jsx)("mark",{})}),(0,d.jsx)(ws.MenuItem,{...n,iconPosition:"left",icon:cc,className:"block-editor-link-control__search-item",onClick:t,children:r})},dc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),pc=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,d.jsx)(ue.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),hc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),gc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),mc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),fc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),bc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),kc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});const vc={post:{icon:dc,label:(0,T.__)("Post")},page:{icon:pc,label:(0,T.__)("Page")},post_tag:{icon:hc,label:(0,T.__)("Tag")},category:{icon:gc,label:(0,T.__)("Category")},attachment:{icon:mc,label:(0,T.__)("Attachment")}};function _c({isURL:e,suggestion:t}){let n=null;return e?n=fc:t.type in vc&&(n=vc[t.type].icon,"page"===t.type&&(t.isFrontPage&&(n=bc),t.isBlogHome&&(n=kc))),n?(0,d.jsx)(Ol,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function yc(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function xc(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}const Sc=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,T.__)("Press ENTER to add this link"):(l=t.url)?(0,m.pipe)(Ua.safeDecodeURI,Ua.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Ua.filterURLForDisplay,24),xc,yc)(l):l;var l;return(0,d.jsx)(ws.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,d.jsx)(_c,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&wc(t),className:"block-editor-link-control__search-item",children:(0,d.jsx)(ws.TextHighlight,{text:(0,Ga.__unstableStripHTML)(t.title),highlight:n})})};function wc(e){return e.isFrontPage?(0,T.__)("Front page"):e.isBlogHome?(0,T.__)("Blog home"):e.type in vc?vc[e.type].label:e.type}var Cc=Sc;const Bc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,d.jsx)(Sc,{...e})),Ic="__CREATE__",jc="link",Ec="mailto",Tc="internal",Mc=[jc,Ec,"tel",Tc],Pc=[{id:"opensInNewTab",title:(0,T.__)("Open in new tab")}];function Rc({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:n,suggestionsListProps:o,buildSuggestionItemProps:r,suggestions:i,selectedSuggestion:s,isLoading:l,isInitialSuggestions:a,createSuggestionButtonText:c,suggestionsQuery:u}){const p=ms("block-editor-link-control__search-results",{"is-loading":l}),h=1===i.length&&Mc.includes(i[0].type),g=e&&!h&&!a,m=!u?.type,f=a?(0,T.__)("Suggestions"):(0,T.sprintf)((0,T.__)('Search results for "%s"'),t);return(0,d.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,d.jsx)("div",{...o,className:p,"aria-label":f,children:(0,d.jsx)(ws.MenuGroup,{children:i.map(((e,o)=>g&&Ic===e.type?(0,d.jsx)(uc,{searchTerm:t,buttonText:c,onClick:()=>n(e),itemProps:r(e,o),isSelected:o===s},e.type):Ic===e.type?null:(0,d.jsx)(Cc,{itemProps:r(e,o),suggestion:e,index:o,onClick:()=>{n(e)},isSelected:o===s,isURL:Mc.includes(e.type),searchTerm:t,shouldShowType:m,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})})}var Ac=Rc;const Nc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,d.jsx)(Rc,{...e}));function Lc(e){if(e.includes(" "))return!1;const t=(0,Ua.getProtocol)(e),n=(0,Ua.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),i=e?.startsWith("#")&&(0,Ua.isValidFragment)(e);return n||r||i||o}const Dc=()=>Promise.resolve([]),Oc=e=>{let t=jc;const n=(0,Ua.getProtocol)(e)||"";return n.includes("mailto")&&(t=Ec),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=Tc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Ua.prependHTTP)(e):e,type:t}])};function zc(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?Oc:Dc;return(0,h.useCallback)(((t,{isInitialSuggestions:l})=>Lc(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||Lc(e)||!o?l:l.concat({title:e,url:e,type:Ic})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}const Vc=()=>Promise.resolve([]),Fc=()=>{},Hc=(0,h.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Fc,onChange:l=Fc,onSelect:a=Fc,showSuggestions:c=!0,renderSuggestions:u=e=>(0,d.jsx)(Ac,{...e}),fetchSuggestions:p=null,allowDirectEntry:g=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:b=!0,createSuggestionButtonText:k,hideLabelFromVision:v=!1,suffix:_,isEntity:y=!1},x)=>{const S=zc(f,g,i),w=c?p||S:Vc,[C,B]=(0,h.useState)(),I=async e=>{let t=e;if(Ic!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=n??{};a({...r,...t},t)}}else try{t=await s(e.title),t?.url&&a(t)}catch(e){}},j=r??(0,T.__)("Search or type URL"),E=v&&""!==r?j:(0,T.__)("Link");return(0,d.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,d.jsx)(ac,{disableSuggestions:n?.url===e,label:E,hideLabelFromVision:v,className:o,value:e,onChange:(e,t)=>{l(e),B(t)},placeholder:j,__experimentalRenderSuggestions:c?e=>u({...e,withCreateSuggestion:i,createSuggestionButtonText:k,suggestionsQuery:f,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:(t,n)=>{const o=t||C;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},inputRef:x,suffix:_,disabled:y}),t]})}));var Uc=Hc;const Gc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,d.jsx)(Hc,{...e}));var $c=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),Wc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),Kc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});const{Slot:Zc,Fill:qc}=(0,ws.createSlotFill)("BlockEditorLinkControlViewer");function Yc(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var Xc=function(e){const[t,n]=(0,h.useReducer)(Yc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,h.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Qc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=Xc(s),c=l&&Object.keys(l).length,u=e&&(0,Ua.filterURLForDisplay)((0,Ua.safeDecodeURI)(e.url),24)||"",p=!e?.url?.length,h=!p&&(0,Ga.__unstableStripHTML)(l?.title||e?.title||u),f=!e?.url||h.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===u;let b;b=l?.icon?(0,d.jsx)("img",{src:l?.icon,alt:""}):p?(0,d.jsx)(Ol,{icon:$c,size:32}):(0,d.jsx)(Ol,{icon:fc});const{createNotice:k}=(0,g.useDispatch)(pr.store),v=(0,m.useCopyToClipboard)(e.url,(()=>{k("info",(0,T.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,d.jsx)("div",{role:"group","aria-label":(0,T.__)("Manage link"),className:ms("block-editor-link-control__search-item",{"is-current":!0,"is-rich":c,"is-fetching":!!a,"is-preview":!0,"is-error":p,"is-url-title":h===u}),children:(0,d.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,d.jsxs)("span",{className:"block-editor-link-control__search-item-header",role:"figure","aria-label":(0,T.__)("Link information"),children:[(0,d.jsx)("span",{className:ms("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:b}),(0,d.jsx)("span",{className:"block-editor-link-control__search-item-details",children:p?(0,d.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,T.__)("Link is empty")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,children:h})}),!f&&(0,d.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,children:u})})]})})]}),(0,d.jsx)(ws.Button,{icon:Wc,label:(0,T.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),o&&(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Remove link"),onClick:r,size:"compact",showTooltip:!i}),(0,d.jsx)(ws.Button,{icon:Kc,label:(0,T.__)("Copy link"),ref:v,accessibleWhenDisabled:!0,disabled:p,size:"compact",showTooltip:!i}),(0,d.jsx)(Zc,{fillProps:e})]})})}const Jc=()=>{};var eu=({value:e,onChange:t=Jc,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((n=>{if("render"in n){if("function"==typeof n.render){const o=n.render(n,e,t);return(0,d.jsx)("div",{className:"block-editor-link-control__setting",children:o},n.id)}return null}return(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:n.title,onChange:o(n),checked:!!e&&!!e[n.id],help:n?.help},n.id)})).filter(Boolean);return(0,d.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Currently selected link settings")}),r]})};const tu=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};var nu=n(5215),ou=n.n(nu);const ru=()=>{},iu="core/block-editor",su="linkControlSettingsDrawer";function lu({searchInputPlaceholder:e,value:t,settings:n=Pc,onChange:o=ru,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:a,forceIsEditingLink:c,createSuggestion:u,withCreateSuggestion:p,inputValue:f="",suggestionsQuery:b={},noURLSuggestion:k=!1,createSuggestionButtonText:v,hasRichPreviews:_=!1,hasTextControl:y=!1,renderControlBottom:x=null,handleEntities:S=!1}){void 0===p&&u&&(p=!0);const[w,C]=(0,h.useState)(!1),{advancedSettingsPreference:B}=(0,g.useSelect)((e=>({advancedSettingsPreference:e(hr.store).get(iu,su)??!1})),[]),{set:I}=(0,g.useDispatch)(hr.store),j=B||w,E=(0,h.useRef)(!0),M=(0,h.useRef)(),P=(0,h.useRef)(),R=(0,h.useRef)(),A=(0,h.useRef)(!1),N=n.map((({id:e})=>e)),[L,D,O,z,V]=function(e){const[t,n]=(0,h.useState)(e||{}),[o,r]=(0,h.useState)(e);return ou()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),F=S&&!!L?.id,H=(0,m.useInstanceId)(lu,"link-control"),U=F?`${H}__help`:null,G=t&&!(0,Qa.isShallowEqualObjects)(L,t),[$,W]=(0,h.useState)(void 0!==c?c:!t||!t.url),{createPage:K,isCreatingPage:Z,errorMessage:q}=function(e){const t=(0,h.useRef)(),[n,o]=(0,h.useState)(!1),[r,i]=(0,h.useState)(null);return(0,h.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=tu(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,T.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(u);(0,h.useEffect)((()=>{void 0!==c&&W(c)}),[c]),(0,h.useEffect)((()=>{if(E.current)return;(Ga.focus.focusable.find(M.current)[0]||M.current).focus(),A.current=!1}),[$,Z]),(0,h.useEffect)((()=>(E.current=!1,()=>{E.current=!0})),[]);const Y=t?.url?.trim()?.length>0,X=()=>{A.current=!!M.current?.contains(M.current.ownerDocument.activeElement),W(!1)},Q=()=>{G&&o({...t,...L,url:te}),X()},[J,ee]=(0,h.useState)(!1);(0,h.useEffect)((()=>{J&&(R.current?.focus(),ee(!1))}),[J]);const te=f||L?.url||"",ne=!te?.trim()?.length,oe=r&&t&&!$&&!Z,re=$&&Y,ie=Y&&y,se=($||!t)&&!Z,le=!G||ne,ae=!!n?.length&&$&&Y;return(0,d.jsxs)("div",{tabIndex:-1,ref:M,className:"block-editor-link-control",children:[Z&&(0,d.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,d.jsx)(ws.Spinner,{})," ",(0,T.__)("Creating"),"…"]}),se&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:ms({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":ie,"has-actions":re}),children:[ie&&(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,ref:P,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,T.__)("Text"),value:L?.title,onChange:z,onKeyDown:e=>{const{keyCode:t}=e;t!==Wa.ENTER||ne||(e.preventDefault(),Q())},__next40pxDefaultSize:!0}),(0,d.jsx)(Uc,{ref:R,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:te,withCreateSuggestion:p,onCreateSuggestion:K,onChange:O,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(N.includes(n)||(t[n]=e[n]),t)),{});o({...L,...t,title:L?.title||e?.title}),X()},showInitialSuggestions:a,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:b,withURLSuggestion:!k,createSuggestionButtonText:v,hideLabelFromVision:!ie,isEntity:F,suffix:(0,d.jsx)(au,{isEntity:F,showActions:re,isDisabled:le,onUnlink:()=>{const{id:e,kind:t,type:n,...o}=L;D({...o,id:void 0,kind:void 0,type:void 0,url:void 0}),ee(!0)},onSubmit:Q,helpTextId:U})}),F&&U&&(0,d.jsx)("p",{id:U,className:"block-editor-link-control__help",children:(0,T.sprintf)((0,T.__)("Synced with the selected %s."),L?.type||"item")})]}),q&&(0,d.jsx)(ws.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:q})]}),t&&!$&&!Z&&(0,d.jsx)(Qc,{value:t,onEditClick:()=>W(!0),hasRichPreviews:_,hasUnlinkControl:oe,onRemove:()=>{r(),W(!0)}},t?.url),ae&&(0,d.jsx)("div",{className:"block-editor-link-control__tools",children:!ne&&(0,d.jsx)(rc,{settingsOpen:j,setSettingsOpen:e=>{I&&I(iu,su,e),C(e)},children:(0,d.jsx)(eu,{value:L,settings:n,onChange:V(N)})})}),re&&(0,d.jsxs)(ws.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),D(t),Y?X():r?.(),i?.()},children:(0,T.__)("Cancel")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:le?ru:Q,className:"block-editor-link-control__search-submit","aria-disabled":le,children:(0,T.__)("Apply")})]}),!Z&&x&&x()]})}function au({isEntity:e,showActions:t,isDisabled:n,onUnlink:o,onSubmit:r,helpTextId:i}){return e?(0,d.jsx)(ws.Button,{icon:ec,onClick:o,"aria-describedby":i,showTooltip:!0,label:(0,T.__)("Unsync and edit"),__next40pxDefaultSize:!0}):t?void 0:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{onClick:n?ru:r,label:(0,T.__)("Submit"),icon:tc,className:"block-editor-link-control__search-submit","aria-disabled":n,size:"small"})})}lu.ViewerFill=qc,lu.DEFAULT_LINK_SETTINGS=Pc;const cu=e=>(I()("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,d.jsx)(lu,{...e}));cu.ViewerFill=lu.ViewerFill,cu.DEFAULT_LINK_SETTINGS=lu.DEFAULT_LINK_SETTINGS;var uu=lu;const du=()=>{};let pu=0;var hu=(0,m.compose)([(0,g.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(pr.store);return{createNotice:t,removeNotice:n}})),(0,ws.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:a,onToggleFeaturedImage:c,useFeaturedImage:u,onFilesUpload:p=du,name:h=(0,T.__)("Replace"),createNotice:m,removeNotice:f,children:b,multiple:k=!1,addToGallery:v,handleUpload:_=!0,popoverProps:y,renderToggle:x})=>{const{getSettings:S}=(0,g.useSelect)(ji),w="block-editor/media-replace-flow/error-notice/"+ ++pu,C=e=>{const t=(0,Ga.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{m("error",t,{speak:!0,id:w,isDismissible:!0})}),1e3)},B=(e,t)=>{u&&c&&c(),t(),s(e),(0,Uo.speak)((0,T.__)("The media file has been replaced")),f(w)},I=e=>{e.keyCode===Wa.DOWN&&(e.preventDefault(),e.target.click())},j=k&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,d.jsx)(ws.Dropdown,{popoverProps:y,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>x?x({"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:I,children:h}):(0,d.jsx)(ws.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:I,children:h}),renderContent:({onClose:i})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,d.jsxs)(Xa,{children:[(0,d.jsx)(Ya,{gallery:j,addToGallery:v,multiple:k,value:k?n:t,onSelect:e=>B(e,i),allowedTypes:o,render:({open:e})=>(0,d.jsx)(ws.MenuItem,{icon:Ka,onClick:e,children:(0,T.__)("Open Media Library")})}),(0,d.jsx)(ws.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),s(n);p(n),S().mediaUpload({allowedTypes:o,filesList:n,onFileChange:([e])=>{B(e,t)},onError:C})})(e,i)},accept:r,multiple:!!k,render:({openFileDialog:e})=>(0,d.jsx)(ws.MenuItem,{icon:Za,onClick:()=>{e()},children:(0,T._x)("Upload","verb")})})]}),c&&(0,d.jsx)(ws.MenuItem,{icon:qa,onClick:c,isPressed:u,children:(0,T.__)("Use featured image")}),e&&a&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{a(),i()},children:(0,T.__)("Reset")}),"function"==typeof b?b({onClose:i}):b]}),l&&(0,d.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,d.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,T.__)("Current media URL:")}),(0,d.jsx)(uu,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e)},searchInputPlaceholder:(0,T.__)("Paste or type URL")})]})]})})}));const gu="image",mu={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},fu=()=>{},bu=e=>{window.requestAnimationFrame((()=>{const[t]=Ga.focus.tabbable.find(e?.current);t&&t.focus()}))};const ku=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},vu=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function _u({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,onToggleCallback:i=fu}){const{isOpen:s,...l}=n;(0,h.useEffect)((()=>{void 0!==s&&i(s)}),[s,i]);const a=()=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,d.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,d.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,d.jsxs)(ws.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,d.jsx)(ws.VisuallyHidden,{as:"span",children:t?(0,T.sprintf)((0,T.__)("Background image: %s"),o||r):(0,T.__)("No background image selected")})]})]});return"button"===e?(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...l,children:a()}):a()}function yu({label:e,filename:t,url:n,children:o,onToggle:r=fu,hasImageValue:i,onReset:s,containerRef:l}){if(!i)return;const a=e||(0,Ua.getFilename)(n)||(0,T.__)("Add background image");return(0,d.jsx)(ws.Dropdown,{popoverProps:mu,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,T.__)("Background size, position and repeat options."),isOpen:o};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(_u,{imgUrl:n,filename:t,label:a,toggleProps:i,as:"button",onToggleCallback:r}),s&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Ha,onClick:()=>{s(),o&&e(),bu(l)}})]})},renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function xu(){return(0,d.jsx)(ws.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,d.jsx)(ws.Spinner,{})})}function Su({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=fu,onResetImage:r=fu,displayInPanel:i,defaultValues:s,containerRef:l}){const[a,c]=(0,h.useState)(!1),{getSettings:u}=(0,g.useSelect)(ji),{id:p,title:m,url:f}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},{createErrorNotice:b}=(0,g.useDispatch)(pr.store),k=e=>{b(e,{type:"snackbar"}),c(!1)},v=n=>{if(!n||!n.url)return e(me(t,["background","backgroundImage"],void 0)),void c(!1);if((0,$a.isBlobURL)(n.url))return void c(!0);if(n.media_type&&n.media_type!==gu||!n.media_type&&n.type&&n.type!==gu)return void k((0,T.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(me(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),c(!1),bu(l)},_=ju(t),y=!_&&ju(n),x=m||(0,Ua.getFilename)(f)||(0,T.__)("Add background image");return(0,d.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[a&&(0,d.jsx)(xu,{}),(0,d.jsx)(hu,{mediaId:p,mediaURL:f,allowedTypes:[gu],accept:"image/*",onSelect:v,popoverProps:{className:ms({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,d.jsx)(_u,{imgUrl:f,filename:m,label:x}),renderToggle:e=>(0,d.jsx)(ws.Button,{...e,__next40pxDefaultSize:!0}),onError:k,onReset:()=>{bu(l),r()},children:y&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{bu(l),e(me(t,["background"],{backgroundImage:"none"})),o()},children:(0,T.__)("Remove")})}),(0,d.jsx)(ws.DropZone,{onFilesDrop:e=>{u().mediaUpload({allowedTypes:[gu],filesList:e,onFileChange([e]){v(e)},onError:k,multiple:!1})},label:(0,T.__)("Drop to upload")})]})}function wu({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const p=!("no-repeat"===i||"cover"===u&&void 0===i),h=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(me(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},g=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,d.jsx)(ws.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Focal point"),url:s,value:vu(g),onChange:n=>{e(me(t,["background","backgroundPosition"],ku(n)))}}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(me(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,T.__)("Size"),value:u,onChange:h,isBlock:!0,help:(m=r||o?.backgroundSize,"cover"===m||void 0===m?(0,T.__)("Image covers the space evenly."):"contain"===m?(0,T.__)("Image is contained without distortion."):(0,T.__)("Image has a fixed width.")),children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"cover",label:(0,T._x)("Cover","Size option for background image control")},"cover"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"contain",label:(0,T._x)("Contain","Size option for background image control")},"contain"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"auto",label:(0,T._x)("Tile","Size option for background image control")},"tile")]}),(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,d.jsx)(ws.__experimentalUnitControl,{"aria-label":(0,T.__)("Background image width"),onChange:h,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,T.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Repeat"),checked:p,onChange:()=>e(me(t,["background","backgroundRepeat"],!0===p?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var m}function Cu({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji),n=t();return{globalStyles:n[N],_links:n[L]}}),[]),l=(0,h.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=rs(n,{styles:i,_links:s})})),e):n}),[i,s,n]),a=()=>t(me(e,["background"],{})),{title:c,url:u}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},p=ju(e)||ju(l),m=p&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[f,b]=(0,h.useState)(!1),k=(0,h.useRef)();return(0,d.jsx)("div",{ref:k,className:ms("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":f}),children:m?(0,d.jsx)(yu,{label:c,filename:c,url:u,onToggle:b,hasImageValue:p,onReset:a,containerRef:k,children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,d.jsx)(Su,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{b(!1),a()},onRemoveImage:()=>b(!1),defaultValues:r,containerRef:k}),(0,d.jsx)(wu,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,d.jsx)(Su,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{b(!1),a()},onRemoveImage:()=>b(!1),containerRef:k})})}const Bu={backgroundImage:!0};function Iu(e){return"web"===h.Platform.OS&&e?.background?.backgroundImage}function ju(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function Eu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function Tu({as:e=Eu,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=Bu,defaultValues:l={},headerLabel:a=(0,T.__)("Background image")}){const c=Iu(r),u=(0,h.useCallback)((e=>({...e,background:{}})),[]);return(0,d.jsx)(e,{resetAllFilter:u,value:t,onChange:n,panelId:i,headerLabel:a,children:c&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,T.__)("Image"),onDeselect:()=>n(me(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,d.jsx)(Cu,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const Mu="background",Pu={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Ru(e,t="any"){const n=(0,p.getBlockSupport)(e,Mu);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function Au(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Pu.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:Pu.backgroundPosition}),t}function Nu(e){return ju(e)?"has-background":""}function Lu({children:e}){const t=(0,h.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,d.jsx)(Fa,{group:"background",resetAllFilter:t,children:e})}function Du({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,g.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(ji),i=r();return{style:o(e)?.style,inheritedValue:i[N]?.blocks?.[t]}}),[e,t]);if(!Iu(o)||!Ru(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&Ru(t,"backgroundSize")}},l=(0,p.getBlockSupport)(t,[Mu,"defaultControls"]);return(0,d.jsx)(Tu,{inheritedValue:i,as:Lu,panelId:e,defaultValues:Pu,settings:s,onChange:e=>{n({style:fs(e)})},defaultControls:l,value:r})}var Ou={useBlockProps:function({name:e,style:t}){if(!Ru(e)||!t?.background?.backgroundImage)return;const n=Au(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:Ru};(0,f.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));var zu=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var Vu=(0,h.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:zu});const r=(0,d.jsx)(ws.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,d.jsx)("span",{style:i,className:ms("block-editor-block-icon",n,{"has-colors":t}),children:r})}));var Fu=function({blockTypes:e,value:t,onItemChange:n}){return(0,d.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map((e=>(0,d.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,checked:t.includes(e.name),onChange:(...t)=>n(e,...t)}),(0,d.jsx)(Vu,{icon:e.icon})]},e.name)))})};var Hu=function e({title:t,blockTypes:n,selectedBlockTypes:o,onChange:r}){const i=(0,m.useInstanceId)(e),s=(0,h.useCallback)(((e,t)=>{r(t?[...o,e]:o.filter((({name:t})=>t!==e.name)))}),[o,r]),l=(0,h.useCallback)((e=>{r(e?[...o,...n.filter((e=>!o.find((({name:t})=>t===e.name))))]:o.filter((e=>!n.find((({name:t})=>t===e.name)))))}),[n,o,r]);if(!n.length)return null;const a=n.map((({name:e})=>e)).filter((e=>(o??[]).some((t=>t.name===e)))),c="block-editor-block-manager__category-title-"+i,u=a.length===n.length,p=!u&&a.length>0;return(0,d.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:u,onChange:l,className:"block-editor-block-manager__category-title",indeterminate:p,label:(0,d.jsx)("span",{id:c,children:t})}),(0,d.jsx)(Fu,{blockTypes:n,value:a,onItemChange:s})]})};function Uu({blockTypes:e,selectedBlockTypes:t,onChange:n,showSelectAll:o=!0}){const r=(0,m.useDebounce)(Uo.speak,500),[i,s]=(0,h.useState)(""),{categories:l,isMatchingSearchTerm:a}=(0,g.useSelect)((e=>({categories:e(p.store).getCategories(),isMatchingSearchTerm:e(p.store).isMatchingSearchTerm})),[]),c=e.filter((e=>!i||a(e,i))),u=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,h.useEffect)((()=>{if(!i)return;const e=c.length,t=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",e),e);r(t)}),[c?.length,i,r]),(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Search for a block"),placeholder:(0,T.__)("Search for a block"),value:i,onChange:e=>s(e),className:"block-editor-block-manager__search"}),o&&(0,d.jsx)(ws.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,T.__)("Select all"),checked:f,onChange:()=>{n(f?[]:e)},indeterminate:u,__nextHasNoMarginBottom:!0}),(0,d.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,T.__)("Available block types"),className:"block-editor-block-manager__results",children:[0===c.length&&(0,d.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,T.__)("No blocks found.")}),l.map((e=>(0,d.jsx)(Hu,{title:e.title,blockTypes:c.filter((t=>t.category===e.slug)),selectedBlockTypes:t,onChange:n},e.slug))),(0,d.jsx)(Hu,{title:(0,T.__)("Uncategorized"),blockTypes:c.filter((({category:e})=>!e)),selectedBlockTypes:t,onChange:n})]})]})}function Gu({clientId:e,blockTypes:t,selectedBlockTypes:n,onClose:o}){const[r,i]=(0,h.useState)(n),{updateBlockAttributes:s}=(0,g.useDispatch)(ji);return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Manage allowed blocks"),onRequestClose:o,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,d.jsxs)(ws.__experimentalVStack,{as:"form",onSubmit:n=>{n.preventDefault(),(()=>{const n=r.length===t.length,i=r.map((({name:e})=>e));s(e,{allowedBlocks:n?void 0:i}),o()})()},spacing:"4",children:[(0,d.jsx)(ws.__experimentalText,{children:(0,T.__)("Select which blocks can be added inside this container.")}),(0,d.jsx)(Uu,{blockTypes:t,selectedBlockTypes:r,onChange:e=>{i(e)}}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:o,__next40pxDefaultSize:!0,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,T.__)("Apply")})})]})]})})}function $u({clientId:e}){const[t,n]=(0,h.useState)(!1),{blockTypes:o,selectedBlockNames:r}=(0,g.useSelect)((t=>{const{getBlockAttributes:n}=t(ji);return{blockTypes:t(p.store).getBlockTypes(),selectedBlockNames:n(e)?.allowedBlocks}}),[e]),i=o.filter((e=>(0,p.hasBlockSupport)(e,"inserter",!0)&&(!e.parent||e.parent.includes("core/post-content"))));if(!i)return null;const s=void 0===r?i:i.filter((e=>r.includes(e.name)));return(0,d.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,d.jsxs)(ws.BaseControl,{help:(0,T.__)("Specify which blocks are allowed inside this container."),__nextHasNoMarginBottom:!0,children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{children:(0,T.__)("Allowed Blocks")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{n(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,T.__)("Manage allowed blocks")})]}),t&&(0,d.jsx)(Gu,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>n(!1)})]})}var Wu={edit:function({clientId:e}){return(0,g.useSelect)((t=>"contentOnly"===t(ji).getBlockEditingMode(e)),[e])?null:(0,d.jsx)(Pa.Fill,{children:(0,d.jsx)($u,{clientId:e})})},attributeKeys:["allowedBlocks"],hasSupport:e=>(0,p.hasBlockSupport)(e,"allowedBlocks")};(0,f.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",(function(e){return e?.attributes?.allowedBlocks?.type||(0,p.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e}));const Ku=/[\s#]/g,Zu={type:"string",source:"attribute",attribute:"id",selector:"*"};var qu={addSaveProps:function(e,t,n){(0,p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({anchor:e,setAttributes:t}){if("default"!==ga())return null;const n="web"===h.Platform.OS;return(0,d.jsx)(Fa,{group:"advanced",children:(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,T.__)("HTML anchor"),help:(0,d.jsxs)(d.Fragment,{children:[(0,T.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor”. Then, you’ll be able to link directly to this section of your page."),n&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,T.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,T.__)("Add an anchor"),onChange:e=>{e=e.replace(Ku,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,p.hasBlockSupport)(e,"anchor")};(0,f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return"type"in(e.attributes?.anchor??{})||(0,p.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Zu}),e}));var Yu={addSaveProps:function(e,t,n){return(0,p.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,p.hasBlockSupport)(e,"ariaLabel")};(0,f.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,p.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}));var Xu={edit:function({className:e,setAttributes:t}){return"default"!==ga()?null:(0,d.jsx)(Fa,{group:"advanced",children:(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,T.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,T.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){(0,p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=ms(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,p.hasBlockSupport)(e,"customClassName",!0)};(0,f.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",(function(e,t,n,o){if(!(0,p.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o&&void 0===e.attributes.className)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,p.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,p.getBlockDefaultClassName)(t.name)),e}));var Qu={grad:.9,turn:360,rad:360/(2*Math.PI)},Ju=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},ed=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},td=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},nd=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},od=function(e){return{r:td(e.r,0,255),g:td(e.g,0,255),b:td(e.b,0,255),a:td(e.a)}},rd=function(e){return{r:ed(e.r),g:ed(e.g),b:ed(e.b),a:ed(e.a,3)}},id=/^#([0-9a-f]{3,8})$/i,sd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ld=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},ad=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},cd=function(e){return{h:nd(e.h),s:td(e.s,0,100),l:td(e.l,0,100),a:td(e.a)}},ud=function(e){return{h:ed(e.h),s:ed(e.s),l:ed(e.l),a:ed(e.a,3)}},dd=function(e){return ad((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},pd=function(e){return{h:(t=ld(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},hd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,md=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bd={string:[[function(e){var t=id.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?ed(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?ed(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=md.exec(e)||fd.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:od({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=hd.exec(e)||gd.exec(e);if(!t)return null;var n,o,r=cd({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Qu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return dd(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return Ju(t)&&Ju(n)&&Ju(o)?od({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!Ju(t)||!Ju(n)||!Ju(o))return null;var s=cd({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return dd(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!Ju(t)||!Ju(n)||!Ju(o))return null;var s=function(e){return{h:nd(e.h),s:td(e.s,0,100),v:td(e.v,0,100),a:td(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return ad(s)},"hsv"]]},kd=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},vd=function(e){return"string"==typeof e?kd(e.trim(),bd.string):"object"==typeof e&&null!==e?kd(e,bd.object):[null,void 0]},_d=function(e,t){var n=pd(e);return{h:n.h,s:td(n.s+100*t,0,100),l:n.l,a:n.a}},yd=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},xd=function(e,t){var n=pd(e);return{h:n.h,s:n.s,l:td(n.l+100*t,0,100),a:n.a}},Sd=function(){function e(e){this.parsed=vd(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return ed(yd(this.rgba),2)},e.prototype.isDark=function(){return yd(this.rgba)<.5},e.prototype.isLight=function(){return yd(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=rd(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?sd(ed(255*r)):"","#"+sd(t)+sd(n)+sd(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return rd(this.rgba)},e.prototype.toRgbString=function(){return t=(e=rd(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return ud(pd(this.rgba))},e.prototype.toHslString=function(){return t=(e=ud(pd(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=ld(this.rgba),{h:ed(e.h),s:ed(e.s),v:ed(e.v),a:ed(e.a,3)};var e},e.prototype.invert=function(){return wd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),wd(_d(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),wd(_d(this.rgba,-e))},e.prototype.grayscale=function(){return wd(_d(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),wd(xd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),wd(xd(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?wd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):ed(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=pd(this.rgba);return"number"==typeof e?wd({h:e,s:t.s,l:t.l,a:t.a}):ed(t.h)},e.prototype.isEqual=function(e){return this.toHex()===wd(e).toHex()},e}(),wd=function(e){return e instanceof Sd?e:new Sd(e)},Cd=[],Bd=function(e){e.forEach((function(e){Cd.indexOf(e)<0&&(e(Sd,bd),Cd.push(e))}))};function Id(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var jd=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Ed=function(e){return.2126*jd(e.r)+.7152*jd(e.g)+.0722*jd(e.b)};function Td(e){e.prototype.luminance=function(){return e=Ed(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,i,s,l,a,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(l=Ed(i))>(a=Ed(s))?(l+.05)/(a+.05):(a+.05)/(l+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}Bd([Id,Td]);const{kebabCase:Md}=G(ws.privateApis),Pd=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Rd=(e,t)=>e?.find((e=>e.color===t));function Ad(e,t){if(e&&t)return`has-${Md(t)}-${e}`}function Nd(){const[e,t,n,o,r,i,s,l,a,c]=Ti("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),u={disableCustomColors:!e,disableCustomGradients:!i};return u.colors=(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),e}),[t,n,o,r]),u.gradients=(0,h.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:l}),c&&a&&a.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:a}),s&&s.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),e}),[s,l,a,c]),u.hasColorsOrGradients=!!u.colors.length||!!u.gradients.length,u}var Ld=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});function Dd({isLinked:e,...t}){const n=e?(0,T.__)("Unlink radii"):(0,T.__)("Link radii");return(0,d.jsx)(ws.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?Ld:ec,iconSize:24,label:n})}function Od(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function zd(e){return!!e?.includes&&("0"===e||e.includes("var:preset|border-radius|"))}function Vd(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|border-radius\|(.+)/);return t?t[1]:void 0}function Fd(e,t){if(!zd(e))return e;const n=0===parseFloat(e,10)?"0":Vd(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Hd(e,t,n){const o=parseInt(e,10);if("selectList"===t){if(0===o)return}else if(0===o)return"0";return`var:preset|border-radius|${n[e]?.slug}`}function Ud(e,t){if(!e||zd(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|border-radius|${n.slug}`:e}var Gd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,d.jsx)(ue.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),$d=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),Wd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]}),Kd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]}),Zd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]}),qd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});const Yd={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},Xd=8,Qd=[],Jd={all:(0,T.__)("Border radius"),topLeft:(0,T.__)("Top left"),topRight:(0,T.__)("Top right"),bottomLeft:(0,T.__)("Bottom left"),bottomRight:(0,T.__)("Bottom right")},ep={all:$d,topLeft:Wd,topRight:Kd,bottomLeft:Zd,bottomRight:qd},tp=0,np={px:100,em:20,rem:20};function op({corner:e,onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,units:i,presets:s}){const l=n=>{t("all"===e?{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n}:{...a,[e]:n})},a="string"!=typeof r?r:{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r};let c;if("all"===e){const e=function(e,t){if(!e||"object"!=typeof e)return e;const n={};return Object.keys(e).forEach((o=>{const r=e[o];if(zd(r)){const e=Fd(r,t);n[o]=void 0!==e?e:r}else n[o]=r})),n}(a,s),t=function(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>e[0]??"")),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",i=Od(o);return 0===r||r?`${r}${i||""}`:void 0}(e);c=Ud(t,s)}else c=Ud(a[e],s);const u=zd(c)?Fd(c,s):c,[p,g]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(u),m=c?g:n[e]||n.flat||"px",f=i&&i.find((e=>e.value===m)),b=f?.step||1,[k,v]=(0,h.useState)(void 0!==c&&!zd(c)),_=s.length<=Xd,y=function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Vd(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(c,s),x=s.slice(1,s.length-1).map(((e,t)=>({value:t+1,label:void 0}))),S=x.length>0;let w=[];_||(w=[...s,{name:(0,T.__)("Custom"),slug:"custom",size:u}].map(((e,t)=>({key:t,name:e.name}))));const C=ep[e];return(0,d.jsxs)(ws.__experimentalHStack,{children:[C&&(0,d.jsx)(ws.Icon,{className:"components-border-radius-control__icon",icon:C,size:24}),(!S||k)&&(0,d.jsxs)("div",{className:"components-border-radius-control__input-controls-wrapper",children:[(0,d.jsx)(ws.Tooltip,{text:Jd[e],placement:"top",children:(0,d.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,d.jsx)(ws.__experimentalUnitControl,{className:"components-border-radius-control__unit-control","aria-label":Jd[e],value:[p,m].join(""),onChange:e=>{if(!t)return;const n=!isNaN(parseFloat(e));l(n?e:void 0)},onUnitChange:t=>{const r={...n};"all"===e?(r.topLeft=t,r.topRight=t,r.bottomLeft=t,r.bottomRight=t):r[e]=t,o(r)},size:"__unstable-large",min:tp,units:i})})}),(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:p??"",min:tp,max:np[m],initialPosition:0,withInputField:!1,onChange:e=>{l(void 0!==e?`${e}${m}`:void 0)},step:b,__nextHasNoMarginBottom:!0})]}),S&&_&&!k&&(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,className:"components-border-radius-control__range-control",value:y,onChange:e=>{l(Hd(e,"range",s))},withInputField:!1,"aria-valuenow":y,"aria-valuetext":s[y]?.name,renderTooltipContent:e=>void 0===c?void 0:s[e]?.name,min:0,max:s.length-1,marks:x,label:Jd[e],hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!_&&!k&&(0,d.jsx)(ws.CustomSelectControl,{className:"components-border-radius-control__custom-select-control",value:w.find((e=>e.key===y))||w[w.length-1],onChange:e=>{e.selectedItem.key===w.length-1?v(!0):l(Hd(e.selectedItem.key,"selectList",s))},options:w,label:Jd[e],hideLabelFromVision:!0,size:"__unstable-large"}),S&&(0,d.jsx)(ws.Button,{label:k?(0,T.__)("Use border radius preset"):(0,T.__)("Set custom border radius"),icon:Gd,onClick:()=>{v(!k)},isPressed:k,size:"small",className:"components-border-radius-control__custom-toggle",iconSize:24})]})}function rp({onChange:e,values:t,presets:n}){const[o,r]=(0,h.useState)(!function(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}(t)||!function(e={}){if("string"==typeof e)return!1;if(!e||"object"!=typeof e)return!1;const t=Object.values(e);if(0===t.length)return!1;const n=t[0];return!t.every((e=>e===n))}(t)),i=function(e){const t=e?.default??Qd,n=e?.custom??Qd,o=e?.theme??Qd;return(0,h.useMemo)((()=>{const e=[{name:(0,T.__)("None"),slug:"0",size:0},...n,...o,...t];return e.length>Xd?[{name:(0,T.__)("Default"),slug:"default",size:void 0},...e]:e}),[n,o,t])}(n),[s,l]=(0,h.useState)({flat:"string"==typeof t?(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[a]=Ti("spacing.units"),c=(0,ws.__experimentalUseCustomUnits)({availableUnits:a||["px","em","rem"]});return(0,d.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,d.jsxs)(ws.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Radius")}),(0,d.jsx)(Dd,{onClick:()=>r(!o),isLinked:o})]}),o?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(op,{onChange:e,selectedUnits:s,setSelectedUnits:l,values:t,units:c,corner:"all",presets:i})}):(0,d.jsx)(ws.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map((n=>(0,d.jsx)(op,{onChange:e,selectedUnits:s,setSelectedUnits:l,values:t||Yd,units:c,corner:n,presets:i},n)))})]})}var ip=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),sp=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})});const lp=[];function ap({shadow:e,onShadowChange:t,settings:n}){const o=hp(n);return(0,d.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,children:[(0,d.jsx)(ws.__experimentalHeading,{level:5,children:(0,T.__)("Drop shadow")}),(0,d.jsx)(cp,{presets:o,activeShadow:e,onSelect:t}),(0,d.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,T.__)("Clear")})})]})})}function cp({presets:e,activeShadow:t,onSelect:n}){return e?(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,T.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,d.jsx)(up,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function up({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,d.jsx)(ws.Tooltip,{text:t,children:(0,d.jsx)(ws.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:ms("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,d.jsx)("button",{className:ms("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,d.jsx)(Ol,{icon:ip})})})})}function dp({shadow:e,onShadowChange:t,settings:n}){return(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:pp(e,t),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,d.jsx)(ap,{shadow:e,onShadowChange:t,settings:n})})})}function pp(e,t){return({onToggle:n,isOpen:o})=>{const r=(0,h.useRef)(void 0),i={onClick:n,className:ms("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(void 0),r.current?.focus()},className:ms("block-editor-global-styles__shadow-editor__remove-button",{"is-open":o}),label:(0,T.__)("Remove")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...i,children:(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(Ol,{className:"block-editor-global-styles__toggle-icon",icon:sp,size:24}),(0,d.jsx)(ws.FlexItem,{children:(0,T.__)("Drop shadow")})]})}),!!e&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,size:"small",icon:Ha,...s})]})}}function hp(e){return(0,h.useMemo)((()=>{if(!e?.shadow)return lp;const t=e?.shadow?.defaultPresets,{default:n,theme:o,custom:r}=e?.shadow?.presets??{},i={name:(0,T.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&n||lp,...o||lp,...r||lp];return s.length&&s.unshift(i),s}),[e])}function gp(e){return Object.values(mp(e)).some(Boolean)}function mp(e){return{hasBorderColor:fp(e),hasBorderRadius:bp(e),hasBorderStyle:kp(e),hasBorderWidth:vp(e),hasShadow:_p(e)}}function fp(e){return e?.border?.color}function bp(e){return e?.border?.radius}function kp(e){return e?.border?.style}function vp(e){return e?.border?.width}function _p(e){const t=hp(e);return!!e?.shadow&&t.length>0}function yp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const xp={radius:!0,color:!0,width:!0,shadow:!0};function Sp({as:e=yp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=xp}){const a=ps(r),c=(0,h.useCallback)((e=>ts({settings:r},"",e)),[r]),u=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},p=(0,h.useMemo)((()=>{if((0,ws.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:c(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?c(o?.border?.color):void 0}}),[o?.border,c]),g=e=>n({...t,border:e}),m=fp(r),f=kp(r),b=vp(r),k=bp(r),v=(0,h.useMemo)((()=>"object"!=typeof p?.radius?p?.radius:{topLeft:p?.radius?.topLeft,topRight:p?.radius?.topRight,bottomLeft:p?.radius?.bottomLeft,bottomRight:p?.radius?.bottomRight}),[p?.radius]),_=e=>g({...p,radius:e}),y=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},x=_p(r),S=c(o?.shadow),w=r?.shadow?.presets??{},C=w.custom??w.theme??w.default??[],B=e=>{const o=C?.find((({shadow:t})=>t===e))?.slug;n(me(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},I=(0,h.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),j=l?.color||l?.width,E=m||f||b||k,M=Ap({blockName:s,hasShadowControl:x,hasBorderControl:E});return(0,d.jsxs)(e,{resetAllFilter:I,value:t,onChange:n,panelId:i,label:M,children:[(b||m)&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>(0,ws.__experimentalIsDefinedBorder)(t?.border),label:(0,T.__)("Border"),onDeselect:()=>(()=>{if(y())return g({radius:t?.border?.radius});g(void 0)})(),isShownByDefault:j,panelId:i,children:(0,d.jsx)(ws.BorderBoxControl,{colors:a,enableAlpha:!0,enableStyle:f,onChange:e=>{const t={...e};(0,ws.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:u(t[e]?.color)})})):t&&(t.color=u(t.color)),g({radius:p?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:p,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!x,label:(0,T.__)("Border")})}),k&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:y,label:(0,T.__)("Radius"),onDeselect:()=>_(void 0),isShownByDefault:l.radius,panelId:i,children:(0,d.jsx)(rp,{presets:r?.border?.radiusSizes,values:v,onChange:e=>{_(e||void 0)}})}),x&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>B(void 0),isShownByDefault:l.shadow,panelId:i,children:[E?(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Shadow")}):null,(0,d.jsx)(dp,{shadow:S,onShadowChange:B,settings:r})]})]})}const wp="__experimentalBorder",Cp="shadow",Bp=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Ip=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Bp(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Bp(e,"color",n);return o||{color:n}};function jp(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Ep(e){if((0,ws.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:fs(o),borderColor:n}}function Tp(e){return(0,ws.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function Mp({label:e,children:t,resetAllFilter:n}){const o=(0,h.useCallback)((e=>{const t=Tp(e),o=n(t);return{...e,...Ep(o)}}),[n]);return(0,d.jsx)(Fa,{group:"border",resetAllFilter:o,label:e,children:t})}function Pp({clientId:e,name:t,setAttributes:n,settings:o}){const r=gp(o);const{style:i,borderColor:s}=(0,g.useSelect)((function(t){const{style:n,borderColor:o}=t(ji).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),l=(0,h.useMemo)((()=>Tp({style:i,borderColor:s})),[i,s]);if(!r)return null;const a={...(0,p.getBlockSupport)(t,[wp,"__experimentalDefaultControls"]),...(0,p.getBlockSupport)(t,[Cp,"__experimentalDefaultControls"])};return(0,d.jsx)(Sp,{as:Mp,panelId:e,settings:o,value:l,onChange:e=>{n(Ep(e))},defaultControls:a})}function Rp(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,wp);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Ap({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=mp(xs(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,T.__)("Border & Shadow"):n?(0,T.__)("Shadow"):(0,T.__)("Border")}function Np(e,t,n){if(!Rp(t,"color")||ks(t,wp,"color"))return e;const o=Lp(n),r=ms(e.className,o);return e.className=r||void 0,e}function Lp(e){const{borderColor:t,style:n}=e,o=Ad("border-color",t);return ms({"has-border-color":t||n?.border?.color,[o]:!!o})}var Dp={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=Nd();if(!Rp(e,"color")||ks(e,wp,"color"))return{};const{color:r}=Ip({colors:o,namedColor:t}),{color:i}=Ip({colors:o,namedColor:jp(n?.border?.top?.color)}),{color:s}=Ip({colors:o,namedColor:jp(n?.border?.right?.color)}),{color:l}=Ip({colors:o,namedColor:jp(n?.border?.bottom?.color)}),{color:a}=Ip({colors:o,namedColor:jp(n?.border?.left?.color)});return Np({style:fs({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Np,attributeKeys:["borderColor","style"],hasSupport:e=>Rp(e,"color")};function Op(e){if(e)return`has-${e}-gradient-background`}function zp(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function Vp(e,t){const n=e?.find((e=>e.gradient===t));return n}function Fp(e,t){const n=Vp(e,t);return n&&n.slug}function Hp({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=C(),[o,r,i]=Ti("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,h.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:a}=(0,g.useSelect)((o=>{const{getBlockAttributes:r}=o(ji),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,g.useDispatch)(ji),u=(0,h.useCallback)((o=>{const r=Fp(s,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,c]),d=Op(l);let p;return p=l?zp(s,l):a,{gradientClass:d,gradientValue:p,setGradient:u}}(0,f.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Rp(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:Up}=G(ws.privateApis),Gp=["colors","disableCustomColors","gradients","disableCustomGradients"],$p="color",Wp="gradient";function Kp({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:p,showTitle:h=!0,enableAlpha:g,headingLevel:m}){const f=l&&(e&&e.length>0||!n),b=a&&(t&&t.length>0||!o);if(!f&&!b)return null;const k={[$p]:(0,d.jsx)(ws.ColorPalette,{value:c,onChange:b?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:p,enableAlpha:g,headingLevel:m}),[Wp]:(0,d.jsx)(ws.GradientPicker,{value:u,onChange:f?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:p,headingLevel:m})},v=e=>(0,d.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[e]});return(0,d.jsx)(ws.BaseControl,{__nextHasNoMarginBottom:!0,className:ms("block-editor-color-gradient-control",i),children:(0,d.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:1,children:[h&&(0,d.jsx)("legend",{children:(0,d.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,d.jsx)(ws.BaseControl.VisualLabel,{children:s})})}),f&&b&&(0,d.jsx)("div",{children:(0,d.jsxs)(Up,{defaultTabId:u?Wp:!!f&&$p,children:[(0,d.jsxs)(Up.TabList,{children:[(0,d.jsx)(Up.Tab,{tabId:$p,children:(0,T.__)("Color")}),(0,d.jsx)(Up.Tab,{tabId:Wp,children:(0,T.__)("Gradient")})]}),(0,d.jsx)(Up.TabPanel,{tabId:$p,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,d.jsx)(Up.TabPanel,{tabId:Wp,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v($p),!f&&v(Wp)]})})})}function Zp(e){const[t,n,o,r]=Ti("color.palette","color.gradients","color.custom","color.customGradient");return(0,d.jsx)(Kp,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}var qp=function(e){return Gp.every((t=>e.hasOwnProperty(t)))?(0,d.jsx)(Kp,{...e}):(0,d.jsx)(Zp,{...e})};function Yp(e){const t=Xp(e),n=nh(e),o=Qp(e),r=eh(e),i=th(e),s=Jp(e);return t||n||o||r||i||s}function Xp(e){const t=ps(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Qp(e){const t=ps(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Jp(e){const t=ps(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function eh(e){const t=ps(e),n=hs(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function th(e){const t=ps(e),n=hs(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function nh(e){const t=ps(e),n=hs(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function oh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,d.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const rh={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},ih={placement:"left-start",offset:36,shift:!0,flip:!0,resize:!1},{Tabs:sh}=G(ws.privateApis),lh=({indicators:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,d.jsx)(ws.Flex,{expanded:!1,children:(0,d.jsx)(ws.ColorIndicator,{colorValue:e})},t)))}),(0,d.jsx)(ws.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function ah({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,d.jsx)(qp,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function ch({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){const a=i.find((e=>void 0!==e.userValue)),{key:c,...u}=i[0]??{},p=(0,h.useRef)(void 0);return(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,d.jsx)(ws.Dropdown,{popoverProps:ih,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:o,isOpen:i})=>{const s={onClick:o,className:ms("block-editor-panel-color-gradient-settings__dropdown",{"is-open":i}),"aria-expanded":i,ref:p};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{...s,__next40pxDefaultSize:!0,children:(0,d.jsx)(lh,{indicators:r,label:e})}),t()&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Ha,onClick:()=>{n(),i&&o(),p.current?.focus()}})]})},renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,d.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,d.jsx)(ah,{...u,colorGradientControlSettings:s},c),i.length>1&&(0,d.jsxs)(sh,{defaultTabId:a?.key,children:[(0,d.jsx)(sh.TabList,{children:i.map((e=>(0,d.jsx)(sh.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,d.jsx)(sh.TabPanel,{tabId:t,focusable:!1,children:(0,d.jsx)(ah,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function uh({as:e=oh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=rh,children:l}){const a=ps(r),c=hs(r),u=r?.color?.custom,p=r?.color?.customGradient,g=a.length>0||u,m=c.length>0||p,f=e=>ts({settings:r},"",e),b=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},k=e=>{const t=c.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},v=nh(r),_=f(o?.color?.background),y=f(t?.color?.background),x=f(o?.color?.gradient),S=f(t?.color?.gradient),w=Qp(r),C=f(o?.elements?.link?.color?.text),B=f(t?.elements?.link?.color?.text),I=f(o?.elements?.link?.[":hover"]?.color?.text),j=f(t?.elements?.link?.[":hover"]?.color?.text),E=Xp(r),M=f(o?.color?.text),P=f(t?.color?.text),R=e=>{let o=me(t,["color","text"],b(e));M===C&&(o=me(o,["elements","link","color","text"],b(e))),n(o)},A=[{name:"caption",label:(0,T.__)("Captions"),showPanel:Jp(r)},{name:"button",label:(0,T.__)("Button"),showPanel:th(r)},{name:"heading",label:(0,T.__)("Heading"),showPanel:eh(r)},{name:"h1",label:(0,T.__)("H1"),showPanel:eh(r)},{name:"h2",label:(0,T.__)("H2"),showPanel:eh(r)},{name:"h3",label:(0,T.__)("H3"),showPanel:eh(r)},{name:"h4",label:(0,T.__)("H4"),showPanel:eh(r)},{name:"h5",label:(0,T.__)("H5"),showPanel:eh(r)},{name:"h6",label:(0,T.__)("H6"),showPanel:eh(r)}],N=(0,h.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...A.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),L=[E&&{key:"text",label:(0,T.__)("Text"),hasValue:()=>!!P,resetValue:()=>R(void 0),isShownByDefault:s.text,indicators:[M],tabs:[{key:"text",label:(0,T.__)("Text"),inheritedValue:M,setValue:R,userValue:P}]},v&&{key:"background",label:(0,T.__)("Background"),hasValue:()=>!!y||!!S,resetValue:()=>{const e=me(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[x??_],tabs:[g&&{key:"background",label:(0,T.__)("Color"),inheritedValue:_,setValue:e=>{const o=me(t,["color","background"],b(e));o.color.gradient=void 0,n(o)},userValue:y},m&&{key:"gradient",label:(0,T.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=me(t,["color","gradient"],k(e));o.color.background=void 0,n(o)},userValue:S,isGradient:!0}].filter(Boolean)},w&&{key:"link",label:(0,T.__)("Link"),hasValue:()=>!!B||!!j,resetValue:()=>{let e=me(t,["elements","link",":hover","color","text"],void 0);e=me(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[C,I],tabs:[{key:"link",label:(0,T.__)("Default"),inheritedValue:C,setValue:e=>{n(me(t,["elements","link","color","text"],b(e)))},userValue:B},{key:"hover",label:(0,T.__)("Hover"),inheritedValue:I,setValue:e=>{n(me(t,["elements","link",":hover","color","text"],b(e)))},userValue:j}]}].filter(Boolean);return A.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=f(o?.elements?.[e]?.color?.background),a=f(o?.elements?.[e]?.color?.gradient),c=f(o?.elements?.[e]?.color?.text),u=f(t?.elements?.[e]?.color?.background),d=f(t?.elements?.[e]?.color?.gradient),p=f(t?.elements?.[e]?.color?.text),h="caption"!==e;L.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=me(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:h?[c,a??l]:[c],tabs:[g&&{key:"text",label:(0,T.__)("Text"),inheritedValue:c,setValue:o=>{n(me(t,["elements",e,"color","text"],b(o)))},userValue:p},g&&h&&{key:"background",label:(0,T.__)("Background"),inheritedValue:l,setValue:o=>{const r=me(t,["elements",e,"color","background"],b(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},m&&h&&{key:"gradient",label:(0,T.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=me(t,["elements",e,"color","gradient"],k(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,d.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[L.map((e=>{const{key:t,...n}=e;return(0,d.jsx)(ch,{...n,colorGradientControlSettings:{colors:a,disableCustomColors:!u,gradients:c,disableCustomGradients:!p},panelId:i},t)})),l]})}Bd([Id,Td]);var dh=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,p=l||o;if(!u&&!p)return null;const h=[{color:u,description:(0,T.__)("text color")},{color:p,description:(0,T.__)("link color")}],g=wd(c),m=g.alpha()<1,f=g.brightness(),b={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let k="",v="";for(const e of h){if(!e.color)continue;const t=wd(e.color),n=t.isReadable(g,b),o=t.alpha()<1;if(!n){if(m||o)continue;k=f<t.brightness()?(0,T.sprintf)((0,T.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,T.sprintf)((0,T.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),v=(0,T.__)("This color combination may be hard for people to read.");break}o&&a&&(k=(0,T.__)("Transparent text may be hard for people to read."),v=(0,T.__)("Transparent text may be hard for people to read."))}return k?((0,Uo.speak)(v),(0,d.jsx)("div",{className:"block-editor-contrast-checker",children:(0,d.jsx)(ws.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null};const ph=(0,h.createContext)({refsMap:(0,m.observableMap)()});function hh({children:e}){const t=(0,h.useMemo)((()=>({refsMap:(0,m.observableMap)()})),[]);return(0,d.jsx)(ph.Provider,{value:t,children:e})}function gh(e){const{refsMap:t}=(0,h.useContext)(ph);return(0,m.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function mh(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function fh(e,t){const{refsMap:n}=(0,h.useContext)(ph);(0,h.useLayoutEffect)((()=>{mh(t,n.get(e));const o=n.subscribe(e,(()=>mh(t,n.get(e))));return()=>{o(),mh(t,null)}}),[n,e,t])}function bh(e){const[t,n]=(0,h.useState)(null);return fh(e,n),t}function kh(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function vh(e,t){return Object.keys(t).some((n=>e[n]!==t[n]))?t:e}function _h({clientId:e}){const t=bh(e),[n,o]=(0,h.useReducer)(vh,{});return(0,h.useLayoutEffect)((()=>{function e(){o(function(e){if(!e)return{};const t=e.querySelector("a"),n=t?.innerText?kh(t,"color"):void 0,o=kh(e,"color");let r=e,i=kh(r,"background-color");for(;"rgba(0, 0, 0, 0)"===i&&r.parentNode&&r.parentNode.nodeType===r.parentNode.ELEMENT_NODE;)r=r.parentNode,i=kh(r,"background-color");return{textColor:o,backgroundColor:i,linkColor:n}}(t))}t&&window.requestAnimationFrame((()=>window.requestAnimationFrame(e)))})),(0,d.jsx)(dh,{backgroundColor:n.backgroundColor,textColor:n.textColor,linkColor:n.linkColor,enableAlphaChecker:!0})}ph.displayName="BlockRefsContext";const yh="color",xh=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Sh=e=>{if("web"!==h.Platform.OS)return!1;const t=(0,p.getBlockSupport)(e,yh);return null!==t&&"object"==typeof t&&!!t.link},wh=e=>{const t=(0,p.getBlockSupport)(e,yh);return null!==t&&"object"==typeof t&&!!t.gradients},Ch=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&!1!==t.background},Bh=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&!1!==t.text};function Ih(e,t,n){if(!xh(t)||ks(t,yh))return e;const o=wh(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!ks(t,yh,e),c=a("text")?Ad("color",i):void 0,u=a("gradients")?Op(s):void 0,d=a("background")?Ad("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=ms(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function jh(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:fs(l),textColor:n,backgroundColor:r,gradient:s}}function Eh(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function Th({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=Eh(e),o=t(n);return{...e,...jh(o)}}),[t]);return(0,d.jsx)(Fa,{group:"color",resetAllFilter:n,children:e})}function Mh({clientId:e,name:t,setAttributes:n,settings:o}){const r=Yp(o);const{style:i,textColor:s,backgroundColor:l,gradient:a}=(0,g.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(ji).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),c=(0,h.useMemo)((()=>Eh({style:i,textColor:s,backgroundColor:l,gradient:a})),[i,s,l,a]);if(!r)return null;const u=(0,p.getBlockSupport)(t,[yh,"__experimentalDefaultControls"]),m="web"===h.Platform.OS&&!c?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,p.getBlockSupport)(t,[yh,"enableContrastChecker"]);return(0,d.jsx)(uh,{as:Th,panelId:e,settings:o,value:c,onChange:e=>{n(jh(e))},defaultControls:u,enableContrastChecker:!1!==(0,p.getBlockSupport)(t,[yh,"enableContrastChecker"]),children:m&&(0,d.jsx)(_h,{clientId:e})})}var Ph={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=Ti("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,h.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!xh(e)||ks(e,yh))return{};const c={};n&&!ks(e,yh,"text")&&(c.color=Pd(a,n)?.color),t&&!ks(e,yh,"background")&&(c.backgroundColor=Pd(a,t)?.color);const u=Ih({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),d=t||r?.color?.background||o||r?.color?.gradient;return{...u,className:ms(u.className,!d&&Nu(r))}},addSaveProps:Ih,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:xh};const Rh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Ah({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,className:i,...s}){const[l]=Ti("typography.fontFamilies");if(r||(r=l),!r||0===r.length)return null;const a=[{key:"",name:(0,T.__)("Default")},...r.map((({fontFamily:e,name:t})=>({key:e,name:t||e,style:{fontFamily:e}})))];t||I()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),e||void 0!==s.size&&"default"!==s.size||I()("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});const c=a.find((e=>e.key===n))??"";return(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,T.__)("Font"),value:c,onChange:({selectedItem:e})=>o(e.key),options:a,className:ms("block-editor-font-family-control",i,{"is-next-has-no-margin-bottom":t}),...s})}(0,f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return xh(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),wh(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return bs({linkColor:Sh(r),textColor:Bh(r),backgroundColor:Ch(r),gradient:wh(r)},Rh,e,t,n,o)}));const Nh=(e,t)=>e?t?(0,T.__)("Appearance"):(0,T.__)("Font style"):(0,T.__)("Font weight");function Lh(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...a}=e,c=o||r,u=Nh(o,r),p={key:"default",name:(0,T.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:g,fontWeights:m,combinedStyleAndWeightOptions:f}=$i(i),b=(0,h.useMemo)((()=>o&&r?(()=>{const e=[p];return f&&e.push(...f),e})():o?(()=>{const e=[p];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[p];return m.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,g,m,f]),k=b.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||b[0];return t||void 0!==a.size&&"default"!==a.size||I()("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),c&&(0,d.jsx)(ws.CustomSelectControl,{...a,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:u,describedBy:k?o?r?(0,T.sprintf)((0,T.__)("Currently selected font appearance: %s"),k.name):(0,T.sprintf)((0,T.__)("Currently selected font style: %s"),k.name):(0,T.sprintf)((0,T.__)("Currently selected font weight: %s"),k.name):(0,T.__)("No selected font appearance"),options:b,value:k,onChange:({selectedItem:e})=>n(e.style)})}const Dh=1.5;var Oh=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Dh;default:return e}},l=i?t:"";return e||void 0!==r.size&&"default"!==r.size||I()("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,d.jsx)("div",{className:"block-editor-line-height-control",children:(0,d.jsx)(ws.__experimentalNumberControl,{...r,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,T.__)("Line height"),placeholder:Dh,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function zh({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=Ti("spacing.units"),s=(0,ws.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return e||void 0!==r.size&&"default"!==r.size||I()("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...r,label:(0,T.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}var Vh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),Fh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),Hh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),Uh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});const Gh=[{label:(0,T.__)("Align text left"),value:"left",icon:Vh},{label:(0,T.__)("Align text center"),value:"center",icon:Fh},{label:(0,T.__)("Align text right"),value:"right",icon:Hh},{label:(0,T.__)("Justify text"),value:"justify",icon:Uh}],$h=["left","center","right"];function Wh({className:e,value:t,onChange:n,options:o=$h}){const r=(0,h.useMemo)((()=>Gh.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Text alignment"),className:ms("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}var Kh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})}),Zh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})}),qh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})});const Yh=[{label:(0,T.__)("None"),value:"none",icon:Ha},{label:(0,T.__)("Uppercase"),value:"uppercase",icon:Kh},{label:(0,T.__)("Lowercase"),value:"lowercase",icon:Zh},{label:(0,T.__)("Capitalize"),value:"capitalize",icon:qh}];function Xh({className:e,value:t,onChange:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Letter case"),className:ms("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:Yh.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}var Qh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})}),Jh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});const eg=[{label:(0,T.__)("None"),value:"none",icon:Ha},{label:(0,T.__)("Underline"),value:"underline",icon:Qh},{label:(0,T.__)("Strikethrough"),value:"line-through",icon:Jh}];function tg({value:e,onChange:t,className:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Decoration"),className:ms("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:eg.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}var ng=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})}),og=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})});const rg=[{label:(0,T.__)("Horizontal"),value:"horizontal-tb",icon:ng},{label:(0,T.__)("Vertical"),value:(0,T.isRTL)()?"vertical-lr":"vertical-rl",icon:og}];function ig({className:e,value:t,onChange:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Orientation"),className:ms("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:rg.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const sg=1,lg=6;function ag(e){const t=ug(e),n=dg(e),o=pg(e),r=hg(e),i=mg(e),s=gg(e),l=fg(e),a=bg(e),c=kg(e),u=cg(e);return t||n||o||r||i||s||u||l||a||c}function cg(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function ug(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function dg(e){return e?.typography?.lineHeight}function pg(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function hg(e){return e?.typography?.letterSpacing}function gg(e){return e?.typography?.textTransform}function mg(e){return e?.typography?.textAlign}function fg(e){return e?.typography?.textDecoration}function bg(e){return e?.typography?.writingMode}function kg(e){return e?.typography?.textColumns}function vg({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const _g={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function yg({as:e=vg,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=_g}){const l=e=>ts({settings:r},"",e),a=ug(r),c=l(o?.typography?.fontFamily),{fontFamilies:u,fontFamilyFaces:p}=(0,h.useMemo)((()=>function(e,t){const n=e?.typography?.fontFamilies,o=["default","theme","custom"].flatMap((e=>n?.[e]??[])),r=o.find((e=>e.fontFamily===t))?.fontFace??[];return{fontFamilies:o,fontFamilyFaces:r}}(r,c)),[r,c]),g=e=>{const o=u?.find((({fontFamily:t})=>t===e))?.slug;n(me(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},m=cg(r),f=!r?.typography?.customFontSize,b=function(e){const t=e?.typography?.fontSizes,n=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...n?t?.default??[]:[]]}(r),k=l(o?.typography?.fontSize),v=(()=>{const e=o?.typography?.fontSize;if(!e||"string"!=typeof e)return;if(e.startsWith("var:preset|font-size|"))return e.replace("var:preset|font-size|","");const t=e.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);return t?t[1]:void 0})(),_=(e,o)=>{n(me(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},y=pg(r),x=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,T.__)("Appearance"):(0,T.__)("Font style"):(0,T.__)("Font weight")}(r),S=r?.typography?.fontStyle,w=r?.typography?.fontWeight,C=l(o?.typography?.fontStyle),B=l(o?.typography?.fontWeight),{nearestFontStyle:I,nearestFontWeight:j}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=$i(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Zi(s,n)))?.style?.fontStyle),c||(r=n?Zi(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(p,C,B),E=(0,h.useCallback)((({fontStyle:e,fontWeight:o})=>{e===C&&o===B||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[C,B,n,t]),M=(0,h.useCallback)((()=>{E({})}),[E]);(0,h.useEffect)((()=>{I&&j?E({fontStyle:I,fontWeight:j}):M()}),[I,j,M,E]);const P=dg(r),R=l(o?.typography?.lineHeight),A=e=>{n(me(t,["typography","lineHeight"],e||void 0))},N=hg(r),L=l(o?.typography?.letterSpacing),D=e=>{n(me(t,["typography","letterSpacing"],e||void 0))},O=kg(r),z=l(o?.typography?.textColumns),V=e=>{n(me(t,["typography","textColumns"],e||void 0))},F=gg(r),H=l(o?.typography?.textTransform),U=e=>{n(me(t,["typography","textTransform"],e||void 0))},G=fg(r),$=l(o?.typography?.textDecoration),W=e=>{n(me(t,["typography","textDecoration"],e||void 0))},K=bg(r),Z=l(o?.typography?.writingMode),q=e=>{n(me(t,["typography","writingMode"],e||void 0))},Y=mg(r),X=l(o?.typography?.textAlign),Q=e=>{n(me(t,["typography","textAlign"],e||void 0))},J=(0,h.useCallback)((e=>({...e,typography:{}})),[]);return(0,d.jsxs)(e,{resetAllFilter:J,value:t,onChange:n,panelId:i,children:[a&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>g(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,d.jsx)(Ah,{fontFamilies:u,value:c,onChange:g,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),m&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>_(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,d.jsx)(ws.FontSizePicker,{value:v||k,valueMode:v?"slug":"literal",onChange:_,fontSizes:b,disableCustomFontSizes:f,withReset:!1,withSlider:!0,size:"__unstable-large"})}),y&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:x,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:M,isShownByDefault:s.fontAppearance,panelId:i,children:(0,d.jsx)(Lh,{value:{fontStyle:C,fontWeight:B},onChange:E,hasFontStyles:S,hasFontWeights:w,fontFamilyFaces:p,size:"__unstable-large"})}),P&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>A(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,d.jsx)(Oh,{__unstableInputWidth:"auto",value:R,onChange:A,size:"__unstable-large"})}),N&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>D(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,d.jsx)(zh,{value:L,onChange:D,size:"__unstable-large",__unstableInputWidth:"auto"})}),O&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>V(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Columns"),max:lg,min:sg,onChange:V,size:"__unstable-large",spinControls:"custom",value:z,initialPosition:1})}),G&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>W(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,d.jsx)(tg,{value:$,onChange:W,size:"__unstable-large",__unstableInputWidth:"auto"})}),K&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>q(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,d.jsx)(ig,{value:Z,onChange:q,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),F&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>U(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,d.jsx)(Xh,{value:H,onChange:U,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),Y&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>Q(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,d.jsx)(Wh,{value:X,onChange:Q,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const xg="typography.lineHeight";const Sg=window.wp.tokenList;var wg=n.n(Sg);const Cg="typography.__experimentalFontFamily",{kebabCase:Bg}=G(ws.privateApis);function Ig(e,t,n){if(!(0,p.hasBlockSupport)(t,Cg))return e;if(ks(t,Jg,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(wg())(e.className);o.add(`has-${Bg(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}var jg={useBlockProps:function({name:e,fontFamily:t}){return Ig({},e,{fontFamily:t})},addSaveProps:Ig,attributeKeys:["fontFamily"],hasSupport:e=>(0,p.hasBlockSupport)(e,Cg)};(0,f.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Cg)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:Eg}=G(ws.privateApis),Tg=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function Mg(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Pg(e){if(e)return`has-${Eg(e)}-font-size`}const Rg="typography.fontSize";function Ag(e,t,n){if(!(0,p.hasBlockSupport)(t,Rg))return e;if(ks(t,Jg,"fontSize"))return e;const o=new(wg())(e.className);o.add(Pg(n.fontSize));const r=o.value;return e.className=r||void 0,e}var Ng={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=Ti("typography.fontSizes","typography.fluid","layout");if(!(0,p.hasBlockSupport)(e,Rg)||ks(e,Jg,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Wi({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:Tg(o,t,n?.typography?.fontSize).size}}),s?Ag(s,e,{fontSize:t}):void 0},addSaveProps:Ag,attributeKeys:["fontSize","style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Rg)};const Lg={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Rg)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return bs({fontSize:(0,p.hasBlockSupport)(r,Rg)},Lg,e,t,n,o)}));const Dg=[{icon:Vh,title:(0,T.__)("Align text left"),align:"left"},{icon:Fh,title:(0,T.__)("Align text center"),align:"center"},{icon:Hh,title:(0,T.__)("Align text right"),align:"right"}],Og={placement:"bottom-start"};var zg=function({value:e,onChange:t,alignmentControls:n=Dg,label:o=(0,T.__)("Align text"),description:r=(0,T.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:Og};return(0,d.jsx)(c,{icon:a?a.icon:(0,T.isRTL)()?Hh:Vh,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})};const Vg=e=>(0,d.jsx)(zg,{...e,isToolbar:!1}),Fg=e=>(0,d.jsx)(zg,{...e,isToolbar:!0}),Hg="typography.textAlign",Ug=[{icon:Vh,title:(0,T.__)("Align text left"),align:"left"},{icon:Fh,title:(0,T.__)("Align text center"),align:"center"},{icon:Hh,title:(0,T.__)("Align text right"),align:"right"}],Gg=["left","center","right"],$g=[];function Wg(e){return Array.isArray(e)?Gg.filter((t=>e.includes(t))):!0===e?Gg:$g}var Kg={edit:function({style:e,name:t,setAttributes:n}){const o=xs(t),r=o?.typography?.textAlign,i=ga();if(!r||"default"!==i)return null;const s=Wg((0,p.getBlockSupport)(t,Hg));if(!s.length)return null;const l=Ug.filter((e=>s.includes(e.align)));return(0,d.jsx)(Rs,{group:"block",children:(0,d.jsx)(Vg,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:fs(o)})},alignmentControls:l})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!Wg((0,p.getBlockSupport)(e,Hg)).length)return null;if(ks(e,Jg,"textAlign"))return null;const n=t.typography.textAlign;return{className:ms({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography,r=(0,p.getBlockSupport)(t,Hg);Wg(r).includes(o)&&!ks(t,Jg,"textAlign")&&(e.className=ms(`has-text-align-${o}`,e.className));return e},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Hg,!1)};function Zg(e,t){return`${e} { font-size: ${t}px !important; }`}function qg(e,t,n){if(!e)return;n("");const o=function(e,t,n){const o=e.scrollHeight>e.clientHeight;let r=5,i=600,s=r;for(;r<=i;){const l=Math.floor((r+i)/2);n(Zg(t,l));const a=e.scrollWidth<=e.clientWidth,c=o||e.scrollHeight<=e.clientHeight;a&&c?(s=l,r=l+1):i=l-1}return s}(e,t,n);n(Zg(t,o))}const Yg="typography.fitText";(0,f.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Yg)?e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}:e}));var Xg={useBlockProps:function({name:e,fitText:t,clientId:n}){return function({fitText:e,name:t,clientId:n}){const o=(0,p.hasBlockSupport)(t,Yg),r=bh(n),i=(0,g.useSelect)((e=>{if(n)return e(ji).getBlockAttributes(n)}),[n]),s=(0,h.useCallback)((()=>{if(!r||!o||!e)return;const t=`fit-text-${n}`;let i=r.ownerDocument.getElementById(t);i||(i=r.ownerDocument.createElement("style"),i.id=t,r.ownerDocument.head.appendChild(i)),qg(r,`#block-${n}`,(e=>{i.textContent=e}))}),[r,n,o,e]);(0,h.useEffect)((()=>{if(!(e&&r&&n&&o))return;s();const t=r;let i;return window.ResizeObserver&&t.parentElement&&(i=new window.ResizeObserver(s),i.observe(t.parentElement)),()=>{i&&i.disconnect();const e=`fit-text-${n}`,o=t.ownerDocument.getElementById(e);o&&o.remove()}}),[e,n,s,r,o]),(0,h.useEffect)((()=>{if(e&&r&&o){const e=window.requestAnimationFrame((()=>{r&&s()}));return()=>window.cancelAnimationFrame(e)}}),[i,e,s,r,o])}({fitText:t,name:e,clientId:n}),t&&(0,p.hasBlockSupport)(e,Yg)?{className:"has-fit-text"}:{}},addSaveProps:function(e,t,n){if(!(0,p.hasBlockSupport)(t,Yg))return e;const{fitText:o}=n;if(!o)return e;const r=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:r}},attributeKeys:["fitText","fontSize","style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Yg),edit:function({clientId:e,fitText:t=!1,setAttributes:n,name:o,fontSize:r,style:i}){return(0,p.hasBlockSupport)(o,Yg)?(0,d.jsx)(Fa,{group:"typography",children:(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,T.__)("Fit text"),onDeselect:()=>n({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Fit text"),checked:t,onChange:()=>{const e=!t||void 0,o={fitText:e};e&&(r&&(o.fontSize=void 0),i?.typography?.fontSize&&(o.style={...i,typography:{...i?.typography,fontSize:void 0}})),n(o)},help:t?(0,T.__)("Text will resize to fit its container."):(0,T.__)("The text will resize to fit its container, resetting other font size settings.")})})}):null}};function Qg(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const Jg="typography",em=[xg,Rg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",Cg,Hg,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing",Yg];function tm(e){const t={...Qg(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r="string"==typeof n&&n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Qg(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:fs(t),fontFamily:i,fontSize:r}}function nm(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function om({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=nm(e),o=t(n);return{...e,...tm(o)}}),[t]);return(0,d.jsx)(Fa,{group:"typography",resetAllFilter:n,children:e})}function rm({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s,fitText:l}=(0,g.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r,fitText:i}=t(ji).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r,fitText:i}}),[e]),a=ag(o),c=(0,h.useMemo)((()=>nm({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!a)return null;const u=(0,p.getBlockSupport)(t,[Jg,"__experimentalDefaultControls"]);return(0,d.jsx)(yg,{as:om,panelId:e,settings:o,value:c,onChange:e=>{const t=tm(e);(t.fontSize||t.style?.typography?.fontSize)&&l&&(t.fitText=void 0),n(t)},defaultControls:u})}const im=[],sm=new Intl.Collator("und",{numeric:!0}).compare;function lm(){const[e,t,n,o]=Ti("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=e??im,i=t??im,s=n&&!1!==o?n:im;return(0,h.useMemo)((()=>{const e=[{name:(0,T.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>sm(e.slug,t.slug))),e.length>Qs?[{name:(0,T.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}const am={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function cm({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:a,type:c,value:u}){u=sl(u,a);let p=a;const f=a.length<=Qs,b=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return t?.disableCustomSpacingSizes})),[k,v]=(0,h.useState)(!b&&void 0!==u&&!rl(u)),[_,y]=(0,h.useState)(n),x=(0,m.usePrevious)(u);u&&x!==u&&!rl(u)&&!0!==k&&v(!0);const[S]=Ti("spacing.units"),w=(0,ws.__experimentalUseCustomUnits)({availableUnits:S||["px","em","rem"]});let C=null;!f&&!k&&void 0!==u&&(!rl(u)||rl(u)&&t)?(p=[...a,{name:t?(0,T.__)("Mixed"):(0,T.sprintf)((0,T.__)("Custom (%s)"),u),slug:"custom",size:u}],C=p.length-1):t||(C=k?il(u,a):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":al(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(u,a));const B=(0,h.useMemo)((()=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(C)),[C])[1]||w[0]?.value,I=parseFloat(C,10),j=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${a[e]?.slug}`},E=t?(0,T.__)("Mixed"):null,M=p.map(((e,t)=>({key:t,name:e.name}))),P=a.slice(1,a.length-1).map(((e,t)=>({value:t+1,label:void 0}))),R=Js.includes(l)&&s?nl[l]:"",A=s?c?.toLowerCase():c,N=(0,T.sprintf)((0,T._x)("%1$s %2$s","spacing"),R,A).trim();return(0,d.jsxs)(ws.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,d.jsx)(ws.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),k&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:C,units:w,min:_,placeholder:E,disableUnits:t,label:N,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===u?.charAt(0)&&y(0)},onDrag:()=>{"-"===u?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:I,min:0,max:am[B]?.max??10,step:am[B]?.steps??.1,withInputField:!1,onChange:e=>{o([e,B].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:N,hideLabelFromVision:!0})]}),f&&!k&&(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:C,onChange:e=>o(j(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===u&&o("0")},withInputField:!1,"aria-valuenow":C,"aria-valuetext":a[C]?.name,renderTooltipContent:e=>void 0===u?void 0:a[e]?.name,min:0,max:a.length-1,marks:P,label:N,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!f&&!k&&(0,d.jsx)(ws.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:M.find((e=>e.key===C))||"",onChange:e=>{o(j(e.selectedItem.key,"selectList"))},options:M,label:N,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!b&&(0,d.jsx)(ws.Button,{label:k?(0,T.__)("Use size preset"):(0,T.__)("Set custom size"),icon:Gd,onClick:()=>{v(!k)},isPressed:k,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const um=["vertical","horizontal"];function dm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=sl(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?um.filter((e=>cl(r,e))):um;return(0,d.jsx)(d.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,d.jsx)(cm,{icon:tl[t],label:nl[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function pm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?Js.filter((e=>r.includes(e))):Js,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=sl(l[t],i),e)),{})};o[e]=n,t(o)};return(0,d.jsx)(d.Fragment,{children:a.map((t=>(0,d.jsx)(cm,{icon:tl[t],label:nl[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function hm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,d.jsx)(cm,{label:nl[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=sl(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function gm({isLinked:e,...t}){const n=e?(0,T.__)("Unlink sides"):(0,T.__)("Link sides");return(0,d.jsx)(ws.Button,{...t,size:"small",icon:e?Ld:ec,iconSize:24,label:n})}function mm({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=Js,useSelect:a,values:c}){const u=lm(),p=c||el,g=1===l?.length,m=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[f,b]=(0,h.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(cl(t)&&(l||a))return ol.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?ol.custom:t[0]}(p,l)),k={...e,minimumCustomValue:n,onChange:e=>{const t={...c,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:u,type:t,useSelect:a,values:p},v=Js.includes(f)&&s?nl[f]:"",_=(0,T.sprintf)((0,T._x)("%1$s %2$s","spacing"),t,v).trim();return(0,d.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,d.jsxs)(ws.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:_}),!g&&!m&&(0,d.jsx)(gm,{label:t,onClick:()=>{b(f===ol.axial?ol.custom:ol.axial)},isLinked:f===ol.axial})]}),(0,d.jsx)(ws.__experimentalVStack,{spacing:.5,children:f===ol.axial?(0,d.jsx)(dm,{...k}):f===ol.custom?(0,d.jsx)(pm,{...k}):(0,d.jsx)(hm,{side:f,...k,showSideInLabel:s})})]})}const fm={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function bm({label:e=(0,T.__)("Height"),onChange:t,value:n}){const o=parseFloat(n),[r]=Ti("spacing.units"),i=(0,ws.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vh","vw"]}),s=(0,h.useMemo)((()=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||i[0]?.value||"px";return(0,d.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:e}),(0,d.jsxs)(ws.Flex,{children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalUnitControl,{value:n,units:i,onChange:t,onUnitChange:e=>{const[o,r]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,value:o,min:0,max:fm[s]?.max??100,step:fm[s]?.step??.1,withInputField:!1,onChange:e=>{t([e,s].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function km(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,g.useSelect)(ji);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){const{columnStart:e,rowStart:n}=o(r).style?.layout??{};(n-1)*t+e-1<s&&l++}return l}}function vm(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,T.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,T.__)("Specify a fixed width."):"fixed"===e?(0,T.__)("Specify a fixed height."):(0,T.__)("Fit contents.")}function _m({value:e={},onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{type:i,default:{type:s="default"}={}}=n??{},l=i||s;return"flex"===l?(0,d.jsx)(ym,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):"grid"===l?(0,d.jsx)(Sm,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):null}function ym({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{selfStretch:i,flexSize:s}=e,{orientation:l="horizontal"}=n??{},a="horizontal"===l?(0,T.__)("Width"):(0,T.__)("Height"),[c]=Ti("spacing.units"),u=(0,ws.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vh","vw"]});return(0,h.useEffect)((()=>{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,d.jsxs)(ws.__experimentalVStack,{as:ws.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:a,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:xm(n),value:i||"fit",help:vm(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fit",label:(0,T._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fill",label:(0,T._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,T._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,d.jsx)(ws.__experimentalUnitControl,{size:"__unstable-large",units:u,onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,min:0,label:a,hideLabelFromVision:!0})]})}function xm(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,T.__)("Width"):(0,T.__)("Height")}function Sm({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:c,rowCount:u}=n??{},p=(0,g.useSelect)((e=>e(ji).getBlockRootClientId(r))),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:m}=(0,g.useDispatch)(ji),f=km(p,c||3),b=c?c-(i??1)+1:void 0,k=window.__experimentalEnableGridInteractivity&&u?u-(s??1)+1:void 0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.Flex,{as:ws.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,T.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10),o=b?Math.min(n,b):n;t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:o})},value:l??1,min:1,max:b})}),(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10),o=k?Math.min(n,k):n;t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:o})},value:a??1,min:1,max:k})})]}),window.__experimentalEnableGridInteractivity&&(0,d.jsxs)(ws.Flex,{as:ws.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,T.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),m(),h([r],p,p,f(n,s))},value:i??1,min:1,max:c?c-(l??1)+1:void 0})}),(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),m(),h([r],p,p,f(i,n))},value:s??1,min:1,max:u?u-(a??1)+1:void 0})})]})]})}function wm({panelId:e,value:t,onChange:n=()=>{},options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=t??"auto",[a,c,u]=Ti("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),p=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),g=[{label:(0,T._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?h:[],...p||[],{label:(0,T._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,T.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,d.jsx)(ws.SelectControl,{label:(0,T.__)("Aspect ratio"),value:l,options:o??g,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const Cm=["horizontal","vertical"];function Bm(e){const t=Im(e),n=jm(e),o=Em(e),r=Tm(e),i=Mm(e),s=Pm(e),l=Rm(e),a=Am(e);return"web"===h.Platform.OS&&(t||n||o||r||i||s||l||a)}function Im(e){return e?.layout?.contentSize}function jm(e){return e?.layout?.wideSize}function Em(e){return e?.spacing?.padding}function Tm(e){return e?.spacing?.margin}function Mm(e){return e?.spacing?.blockGap}function Pm(e){return e?.dimensions?.minHeight}function Rm(e){return e?.dimensions?.aspectRatio}function Am(e){const{type:t="default",default:{type:n="default"}={},allowSizingOnChildren:o=!1}=e?.parentLayout??{},r=("flex"===n||"flex"===t||"grid"===n||"grid"===t)&&o;return!!e?.layout&&r}function Nm(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function Lm(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Dm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Om={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function zm({as:e=Dm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Om,onVisualize:l=()=>{},includeLayoutControls:a=!1}){const{dimensions:c,spacing:u}=r,p=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=ts({settings:{dimensions:c,spacing:u}},"",e[n]),t)),{}):ts({settings:{dimensions:c,spacing:u}},"",e),g=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),m=(0,ws.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),f=-1/0,[b,k]=(0,h.useState)(f),v=Im(r)&&a,_=p(o?.layout?.contentSize),y=e=>{n(me(t,["layout","contentSize"],e||void 0))},x=jm(r)&&a,S=p(o?.layout?.wideSize),w=e=>{n(me(t,["layout","wideSize"],e||void 0))},C=Em(r),B=Lm(p(o?.spacing?.padding)),I=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,j=I&&I.some((e=>Cm.includes(e))),E=e=>{const o=Nm(e,I);n(me(t,["spacing","padding"],o))},M=()=>l("padding"),P=Tm(r),R=Lm(p(o?.spacing?.margin)),A=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,N=A&&A.some((e=>Cm.includes(e))),L=e=>{const o=Nm(e,A);n(me(t,["spacing","margin"],o))},D=()=>l("margin"),O=Mm(r),z=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,V=z&&z.some((e=>Cm.includes(e))),F=p(o?.spacing?.blockGap),H=function(e,t){return e?"string"==typeof e?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top}:e}(F,V),U=e=>{n(me(t,["spacing","blockGap"],e))},G=e=>{e||U(null),!V&&e?.hasOwnProperty("top")?U(e.top):U({top:e?.top,left:e?.left})},$=Pm(r),W=p(o?.dimensions?.minHeight),K=e=>{const o=me(t,["dimensions","minHeight"],e);n(me(o,["dimensions","aspectRatio"],void 0))},Z=Rm(r),q=p(o?.dimensions?.aspectRatio),Y=Am(r),X=o?.layout,Q=(0,h.useCallback)((e=>({...e,layout:fs({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),J=()=>l(!1);return(0,d.jsxs)(e,{resetAllFilter:Q,value:t,onChange:n,panelId:i,children:[(v||x)&&(0,d.jsx)("span",{className:"span-columns",children:(0,T.__)("Set the width of the main content area.")}),v&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>y(void 0),isShownByDefault:s.contentSize??Om.contentSize,panelId:i,children:(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Content width"),labelPosition:"top",value:_||"",onChange:e=>{y(e)},units:m,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:zl})})})}),x&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>w(void 0),isShownByDefault:s.wideSize??Om.wideSize,panelId:i,children:(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Wide width"),labelPosition:"top",value:S||"",onChange:e=>{w(e)},units:m,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:Vl})})})}),C&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,T.__)("Padding"),onDeselect:()=>E(void 0),isShownByDefault:s.padding??Om.padding,className:ms({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,values:B,onChange:E,label:(0,T.__)("Padding"),sides:I,units:m,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:M,onMouseOut:J}}),g&&(0,d.jsx)(mm,{values:B,onChange:E,label:(0,T.__)("Padding"),sides:I,units:m,allowReset:!1,onMouseOver:M,onMouseOut:J})]}),P&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,T.__)("Margin"),onDeselect:()=>L(void 0),isShownByDefault:s.margin??Om.margin,className:ms({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,values:R,onChange:L,inputProps:{min:b,onDragStart:()=>{k(0)},onDragEnd:()=>{k(f)},onMouseOver:D,onMouseOut:J},label:(0,T.__)("Margin"),sides:A,units:m,allowReset:!1,splitOnAxis:N}),g&&(0,d.jsx)(mm,{values:R,onChange:L,minimumCustomValue:-1/0,label:(0,T.__)("Margin"),sides:A,units:m,allowReset:!1,onMouseOver:D,onMouseOut:J})]}),O&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,T.__)("Block spacing"),onDeselect:()=>U(void 0),isShownByDefault:s.blockGap??Om.blockGap,className:ms({"tools-panel-item-spacing":g,"single-column":!g&&!V}),panelId:i,children:[!g&&(V?(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Block spacing"),min:0,onChange:G,units:m,sides:z,values:H,allowReset:!1,splitOnAxis:V}):(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Block spacing"),min:0,onChange:U,units:m,value:F})),g&&(0,d.jsx)(mm,{label:(0,T.__)("Block spacing"),min:0,onChange:G,showSideInLabel:!1,sides:V?z:["top"],values:H,allowReset:!1})]}),Y&&(0,d.jsx)(_m,{value:X,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Om.childLayout}),$&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,T.__)("Minimum height"),onDeselect:()=>{K(void 0)},isShownByDefault:s.minHeight??Om.minHeight,panelId:i,children:(0,d.jsx)(bm,{label:(0,T.__)("Minimum height"),value:W,onChange:K})}),Z&&(0,d.jsx)(wm,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:q,onChange:e=>{const o=me(t,["dimensions","aspectRatio"],e);n(me(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:s.aspectRatio??Om.aspectRatio})]})}const Vm=new WeakMap;var Fm=function(e){const t=(0,m.useRefEffect)((t=>{function n(n){const{deltaX:o,deltaY:r,target:i}=n,s=e.current;let l=Vm.get(s);l||(l=(0,Ga.getScrollContainer)(s),Vm.set(s,l));const a=(0,Ga.getScrollContainer)(i);t.contains(a)||l.scrollBy(o,r)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e]);return e?t:null};const Hm=".block-editor-block-list__block",Um=".block-list-appender",Gm=".block-editor-button-block-appender";function $m(e,t){return e.closest(Hm)===t.closest(Hm)}function Wm(e,t){return t.closest([Hm,Um,Gm].join(","))===e}function Km(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Hm);return t?t.id.slice(6):void 0}function Zm(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function qm(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function Ym(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const Xm=["core/navigation"];function Qm(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&Xm.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!Ym(o))for(const e of o.children)if(qm(e)){n=Zm(n,e.getBoundingClientRect()),t.push(e)}}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const Jm=Number.MAX_SAFE_INTEGER;const ef=(0,h.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const a=bh(e),c=bh(t??e),u=(0,m.useMergeRefs)([l,Fm(r)]),[p,g]=(0,h.useReducer)((e=>(e+1)%Jm),0);(0,h.useLayoutEffect)((()=>{if(!a)return;const e=new window.MutationObserver(g);return e.observe(a,{attributes:!0}),()=>{e.disconnect()}}),[a]);const f=(0,h.useMemo)((()=>{if(!(p<0||!a||t&&!c))return{getBoundingClientRect:()=>c?Zm(Qm(a),Qm(c)):Qm(a),contextElement:a}}),[p,a,t,c]);return!a||t&&!c?null:(0,d.jsx)(ws.Popover,{ref:u,animate:!1,focusOnMount:!1,anchor:f,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:ms("block-editor-block-popover",s.className),variant:"unstyled",children:n})}));var tf=(0,h.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,d.jsx)(ef,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function nf({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,h.useState)(e.offsetWidth),[i,s]=(0,h.useState)(e.offsetHeight);(0,h.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,h.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,d.jsx)("div",{style:l,children:n})}var of=(0,h.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){t??=e;const l=bh(e);return(0,d.jsx)(ef,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:l&&e===t?(0,d.jsx)(nf,{selectedElement:l,additionalStyles:r,children:n}):n})}));function rf({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=bh(e),[i,s]=(0,h.useReducer)((()=>n(r)));(0,h.useEffect)((()=>{if(!r)return;const e=new window.MutationObserver(s);return e.observe(r,{attributes:!0,attributeFilter:["style","class"]}),()=>{e.disconnect()}}),[r]);const l=(0,h.useRef)(t),[a,c]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{if(Ja()(t,l.current)||o)return;c(!0),l.current=t;const e=setTimeout((()=>{c(!1)}),400);return()=>{c(!1),clearTimeout(e)}}),[t,o]),a||o?(0,d.jsx)(of,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,d.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function sf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function lf({clientId:e,value:t,forceShow:n}){return(0,d.jsx)(rf,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=sf(e,"margin-top"),n=sf(e,"margin-right"),o=sf(e,"margin-bottom"),r=sf(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function af({clientId:e,value:t,forceShow:n}){return(0,d.jsx)(rf,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:sf(e,"padding-top"),borderRightWidth:sf(e,"padding-right"),borderBottomWidth:sf(e,"padding-bottom"),borderLeftWidth:sf(e,"padding-left")}),forceShow:n})}const cf="dimensions",uf="spacing";function df({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,d.jsx)(Fa,{group:"dimensions",resetAllFilter:n,children:e})}function pf({clientId:e,name:t,setAttributes:n,settings:o}){const r=Bm(o),i=(0,g.useSelect)((t=>t(ji).getBlockAttributes(e)?.style),[e]),[s,l]=function(){const[e,t]=(0,h.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=G((0,g.useDispatch)(ji));return(0,h.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const a={...(0,p.getBlockSupport)(t,[cf,"__experimentalDefaultControls"]),...(0,p.getBlockSupport)(t,[uf,"__experimentalDefaultControls"])};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(zm,{as:df,panelId:e,settings:o,value:i,onChange:e=>{n({style:fs(e)})},defaultControls:a,onVisualize:l}),!!o?.spacing?.padding&&(0,d.jsx)(af,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,d.jsx)(lf,{forceShow:"margin"===s,clientId:e,value:i})]})}function hf(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,cf);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}var gf={useBlockProps:function({name:e,minHeight:t,style:n}){if(!hf(e,"aspectRatio")||ks(e,cf,"aspectRatio"))return{};const o=ms({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>hf(e,"aspectRatio")};function mf(){I()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const ff=[...em,wp,yh,cf,Mu,uf,Cp],bf=e=>ff.some((t=>(0,p.hasBlockSupport)(e,t)));function kf(e={}){const t={};return(0,Pi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const vf={[`${wp}.__experimentalSkipSerialization`]:["border"],[`${yh}.__experimentalSkipSerialization`]:[yh],[`${Jg}.__experimentalSkipSerialization`]:[Jg],[`${cf}.__experimentalSkipSerialization`]:[cf],[`${uf}.__experimentalSkipSerialization`]:[uf],[`${Cp}.__experimentalSkipSerialization`]:[Cp]},_f={...vf,[`${cf}.aspectRatio`]:[`${cf}.aspectRatio`],[`${Mu}`]:[Mu]},yf={[`${cf}.aspectRatio`]:!0,[`${Mu}`]:!0},xf={gradients:"gradient"};function Sf(e,t,n=!1){if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;Sf(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function wf(e,t,n,o=_f){if(!bf(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=yf[e]||(0,p.getBlockSupport)(t,e);!0===o&&(r=Sf(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=xf[e]||e;r=Sf(r,[[...n,t]])}))})),e.style={...kf(r),...e.style},e}var Cf={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=xs(t,o),i=ga(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Mh,{...s}),(0,d.jsx)(Du,{...s}),(0,d.jsx)(rm,{...s}),(0,d.jsx)(Pp,{...s}),(0,d.jsx)(pf,{...s})]})},hasSupport:bf,addSaveProps:wf,attributeKeys:["style"],useBlockProps:function({name:e,style:t}){const n=(0,m.useInstanceId)(If,"wp-elements"),o=`.${n}`,r=t?.elements,i=(0,h.useMemo)((()=>{if(!r)return;const t=[];return Bf.forEach((({elementType:n,pseudo:i,elements:s})=>{if(ks(e,yh,n))return;const l=r?.[n];if(l){const e=ns(o,p.__EXPERIMENTAL_ELEMENTS[n]);t.push((0,Pi.compileCSS)(l,{selector:e})),i&&i.forEach((e=>{l[e]&&t.push((0,Pi.compileCSS)(l[e],{selector:ns(o,`${p.__EXPERIMENTAL_ELEMENTS[n]}${e}`)}))}))}s&&s.forEach((e=>{r[e]&&t.push((0,Pi.compileCSS)(r[e],{selector:ns(o,p.__EXPERIMENTAL_ELEMENTS[e])}))}))})),t.length>0?t.join(""):void 0}),[o,r,e]);return _s({css:i}),wf({className:n},e,{style:t},vf)}};const Bf=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],If={};(0,f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return bf(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,f.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,p.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));var jf=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var Ef=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,d.jsx)(ws.DuotoneSwatch,{values:s}):(0,d.jsx)(Ol,{icon:jf});const c=(0,T.__)("Apply duotone filter"),u=`${(0,m.useInstanceId)(e,"duotone-control",t)}__description`;return(0,d.jsx)(ws.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,T.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,d.jsx)(ws.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==Wa.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Duotone"),children:[(0,d.jsx)("p",{children:(0,T.__)("Create a two-tone color effect without losing your original image.")}),(0,d.jsx)(ws.DuotonePicker,{"aria-label":c,"aria-describedby":u,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function Tf(e){return`${e}{filter:none}`}function Mf(e,t){return`${e}{filter:url(#${t})}`}function Pf(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=wd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${n.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${n.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${n.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${n.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}function Rf(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l){return fe(i,`${a}.root`,null)||fe(i,a,null)||e}const t=fe(s,`${a}.__experimentalSelector`,null);return t?ns(c,t):e}let d;return l&&(d=fe(i,a,null)),d||(o?Rf(e,u[0],n):null)}const Af=[];function Nf(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||Af,i=e?.color?.[t]?.theme||Af,s=e?.color?.[t]?.default||Af;return(0,h.useMemo)((()=>[...r,...i,...o?Af:s]),[o,r,i,s])}function Lf(e){return Df(e)}function Df(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function Of({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const zf={duotone:!0},Vf={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,T.__)("Duotone")},Ff=({indicator:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,d.jsx)(ws.Flex,{expanded:!1,children:"unset"!==e&&e?(0,d.jsx)(ws.DuotoneSwatch,{values:e}):(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,d.jsx)(ws.FlexItem,{title:t,children:t})]}),Hf=(e,t)=>({onToggle:n,isOpen:o})=>{const r=(0,h.useRef)(void 0),i={onClick:n,className:ms("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(),r.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,T.__)("Reset")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...i,children:(0,d.jsx)(Ff,{indicator:e,label:(0,T.__)("Duotone")})}),e&&(0,d.jsx)(ws.Button,{size:"small",icon:Ha,...s})]})};function Uf({as:e=Of,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=zf}){const l=Df(r),a=Nf(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),c=Nf(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),u=(p=o?.filter?.duotone,ts({settings:r},"",p));var p;const g=e=>{const o=a.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(me(t,["filter","duotone"],r))},m=()=>g(void 0),f=(0,h.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,d.jsx)(e,{resetAllFilter:f,value:t,onChange:n,panelId:i,children:l&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:m,isShownByDefault:s.duotone,panelId:i,children:(0,d.jsx)(ws.Dropdown,{popoverProps:Vf,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:Hf(u,m),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Duotone"),children:[(0,d.jsx)("p",{children:(0,T.__)("Create a two-tone color effect without losing your original image.")}),(0,d.jsx)(ws.DuotonePicker,{colorPalette:c,duotonePalette:a,disableCustomColors:!0,disableCustomDuotone:!0,value:u,onChange:g})]})})})})})}const Gf=[],$f=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function Wf({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=Ti(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,h.useMemo)((()=>[...o||Gf,...r||Gf,...n&&i||Gf]),[n,o,r,i])}function Kf(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}Bd([Id]);var Zf={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=xs(n),i=ga(),s=Wf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Wf({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=Ti("color.custom","color.customDuotone"),u=!a,p=!c||0===l?.length&&u;if(0===s?.length&&p)return null;if("default"!==i)return null;const h="unset"===o||Array.isArray(o)?o:Kf(o,s);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa,{group:"filter",children:(0,d.jsx)(Uf,{value:{filter:{duotone:h}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:fs(o)})},settings:r})}),(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(Ef,{duotonePalette:s,colorPalette:l,disableCustomDuotone:p,disableCustomColors:u,value:h,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,s),r={...e,color:{...e?.color,duotone:o??n}};t({style:fs(r)})},settings:r})})]})},useBlockProps:function({clientId:e,name:t,style:n}){const o=(0,m.useInstanceId)(Yf),r=(0,h.useMemo)((()=>{const e=(0,p.getBlockType)(t);if(e){if(!(0,p.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,p.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=Rf(e);return"string"==typeof t?ns(n,t):n}return Rf(e,"filter.duotone",{fallback:!0})}}),[t]),i=n?.color?.duotone,s=`wp-duotone-${o}`,l=r&&i;return qf({clientId:e,id:s,selector:r,attribute:i}),{className:l?s:""}},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,"filter.duotone")};function qf({clientId:e,id:t,selector:n,attribute:o}){const r=Wf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:Kf(o,r),l="string"==typeof o&&s;let a=null;l?a=s:("string"==typeof o&&!l||i)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),u=Array.isArray(a)||"unset"===a;ys(u?{css:"unset"!==a?Mf(c,t):Tf(c),__unstableType:"presets"}:void 0),ys(u?{assets:"unset"!==a?Pf(t,a):"",__unstableType:"svgs"}:void 0);const d=bh(e);(0,h.useEffect)((()=>{if(u&&d&&$f){const e=d.style.display;d.style.setProperty("display","inline-block"),d.offsetHeight,d.style.setProperty("display",e)}}),[u,d,a])}const Yf={};function Xf(e){return(0,g.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(ji),{getBlockType:r,getActiveBlockVariation:i}=t(p.store),s=n(e),l=r(s);if(!l)return null;const a=o(e),c=i(s,a),u=(0,p.isReusableBlock)(l)||(0,p.isTemplatePart)(l),d=(u?(0,p.__experimentalGetBlockLabel)(l,a):void 0)||l.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,T.__)("Sticky"):"fixed"===t?(0,T.__)("Fixed"):null}(a),g={isSynced:u,title:d,icon:l.icon,description:l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name};return c?{isSynced:u,title:c.title||l.title,icon:c.icon||l.icon,description:c.description||l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name}:g}),[e])}(0,f.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,p.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const Qf="position",Jf={key:"default",value:"",name:(0,T.__)("Default")},eb={key:"sticky",value:"sticky",name:(0,T._x)("Sticky","Name for the value of the CSS position property"),hint:(0,T.__)("The block will stick to the top of the window instead of scrolling.")},tb={key:"fixed",value:"fixed",name:(0,T._x)("Fixed","Name for the value of the CSS position property"),hint:(0,T.__)("The block will not move when the page is scrolled.")},nb=["top","right","bottom","left"],ob=["sticky","fixed"];function rb(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function ib({name:e}={}){const[t,n]=Ti("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,p.getBlockSupport)(r,Qf)||o;var r}function sb({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,p.getBlockSupport)(e,Qf);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,p.getBlockSupport)(e,Qf);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:l}=(0,g.useSelect)((e=>{const{getBlockParents:n}=e(ji),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),a=Xf(l),c=i&&s===eb.value&&a?(0,T.sprintf)((0,T.__)("The block will stick to the scrollable area of the parent %s block."),a.title):null,u=(0,h.useMemo)((()=>{const e=[Jf];return(i||s===eb.value)&&e.push(eb),(r||s===tb.value)&&e.push(tb),e}),[r,i,s]),m=s&&u.find((e=>e.value===s))||Jf;return h.Platform.select({web:u.length>1?(0,d.jsx)(Fa,{group:"position",children:(0,d.jsx)(ws.BaseControl,{__nextHasNoMarginBottom:!0,help:c,children:(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Position"),hideLabelFromVision:!0,describedBy:(0,T.sprintf)((0,T.__)("Currently selected position: %s"),m.name),options:u,value:m,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:fs(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}var lb={edit:function(e){return ib(e)?null:(0,d.jsx)(sb,{...e})},useBlockProps:function({name:e,style:t}){const n=(0,p.hasBlockSupport)(e,Qf),o=ib({name:e}),r=n&&!o,i=(0,m.useInstanceId)(ab),s=`.wp-container-${i}.wp-container-${i}`;let l;r&&(l=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return ob.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,nb.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:s,style:t})||"");const a=ms({[`wp-container-${i}`]:r&&!!l,[`is-position-${t?.position?.type}`]:r&&!!l&&!!t?.position?.type});return _s({css:l}),{className:a}},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Qf)};const ab={};const cb={button:"wp-element-button",caption:"wp-element-caption"},ub={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:db}=G(ws.privateApis);function pb(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+db(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...pb(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const hb=(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 i=gb({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=gb({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function gb(e={},t="",n,o={},r=!1){const i=qi===t,s=Object.entries(p.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=fe(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!fe(u,[o],!1))return;const r=n.startsWith("--")?n:db(n);t.push(`${r}: ${(0,Pi.getCSSValueFromRawStyle)(fe(u,[o]))}`)}));else if(fe(e,c,!1)){const n=o.startsWith("--")?o:db(o);t.push(`${n}: ${(0,Pi.getCSSValueFromRawStyle)(fe(e,c))}`)}return t}),[]);e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=rs(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...Au(e.background)}}));return(0,Pi.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:db(e.key);let l=rs(e.value,o);"font-size"===t&&(l=Wi({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function mb({layoutDefinitions:e=Fs,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?ul(t?.spacing?.blockGap):"";if(r&&(n===qi?l=l||"0.5em":!o&&i&&(l=i)),l&&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||l}`)})),r.length){let i="";i=o?n===qi?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===qi?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===qi&&o&&(s+=`${Yi} { --wp--style--block-gap: ${l}; }`)),n===qi&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length){s+=`${`.${e}${t?.selector||""}`} { ${n.join("; ")}; }`}}))}))}return s}const fb=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function bb(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>fb.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const kb=(e,t)=>{const n=[];if(!e?.styles)return n;const o=bb(e.styles);return o&&n.push({styles:o,selector:qi,skipSelectorWrapper:!0}),Object.entries(p.__EXPERIMENTAL_ELEMENTS).forEach((([t,o])=>{e.styles?.elements?.[t]&&n.push({styles:e.styles?.elements?.[t],selector:o,skipSelectorWrapper:!cb[t]})})),Object.entries(e.styles?.blocks??{}).forEach((([e,o])=>{const r=bb(o);if(o?.variations){const i={};Object.entries(o.variations).forEach((([o,r])=>{i[o]=bb(r),r?.css&&(i[o].css=r.css);const s=t[e]?.styleVariationSelectors?.[o];Object.entries(r?.elements??{}).forEach((([e,t])=>{t&&p.__EXPERIMENTAL_ELEMENTS[e]&&n.push({styles:t,selector:ns(s,p.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(r?.blocks??{}).forEach((([e,o])=>{const r=ns(s,t[e]?.selector),i=ns(s,t[e]?.duotoneSelector),l=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=ns(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=ns(e,r)})))})),n}(s,t[e]?.featureSelectors),a=bb(o);o?.css&&(a.css=o.css),n.push({selector:r,duotoneSelector:i,featureSelectors:l,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:a}),Object.entries(o.elements??{}).forEach((([e,t])=>{t&&p.__EXPERIMENTAL_ELEMENTS[e]&&n.push({styles:t,selector:ns(r,p.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),r.variations=i}t?.[e]?.selector&&n.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:r,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(o?.elements??{}).forEach((([o,r])=>{r&&t?.[e]&&p.__EXPERIMENTAL_ELEMENTS[o]&&n.push({styles:r,selector:t[e]?.selector.split(",").map((e=>p.__EXPERIMENTAL_ELEMENTS[o].split(",").map((t=>e+" "+t)))).join(",")})}))})),n},vb=(e,t)=>{const n=[];if(!e?.settings)return n;const o=e=>{let t={};return Xi.forEach((({path:n})=>{const o=fe(e,n,!1);!1!==o&&(t=me(t,n,o))})),t},r=o(e.settings),i=e.settings?.custom;return(Object.keys(r).length>0||i)&&n.push({presets:r,custom:i,selector:Yi}),Object.entries(e.settings?.blocks??{}).forEach((([e,r])=>{const i=o(r),s=r.custom;(Object.keys(i).length>0||s)&&n.push({presets:i,custom:s,selector:t[e]?.selector})})),n},_b=(e,t)=>{const n=vb(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return Xi.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=fe(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${db(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${db(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=pb(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},yb=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},a=kb(e,t),c=vb(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:d,wideSize:p}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles;let g="";if(l.presets&&(d||p)&&(g+=`${Yi} {`,g=d?g+` --wp--style--global--content-size: ${d};`:g,g=p?g+` --wp--style--global--wide-size: ${p};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&u&&(g+="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\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\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\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),g+="}"),l.blockStyles&&a.forEach((({selector:t,duotoneSelector:s,styles:a,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:m})=>{if(p){const e=hb(p,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");g+=`:root :where(${e}){${n};}`}}))}if(s){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=gb(e);t.length&&(g+=`${s}{${t.join(";")};}`)}r||qi!==t&&!d||(g+=mb({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=gb(a,t,u,e,i);if(f?.length){g+=`${m?t:`:root :where(${t})`}{${f.join(";")};}`}a?.css&&(g+=wb(a.css,`:root :where(${t})`)),l.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(p){const e=hb(p,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(";");g+=`:root :where(${o}){${r};}`}}))}const t=gb(o,n,u,e);t.length&&(g+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(g+=wb(o.css,`:root :where(${n})`))}}));const b=Object.entries(a).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=gb(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;g+=r}))})),l.layoutStyles&&(g+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&n){const t=ul(e?.styles?.spacing?.blockGap)||"0.5em";g+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,g+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach((({selector:e,presets:t})=>{qi!==e&&Yi!==e||(e="");const n=function(e="*",t={}){return Xi.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=fe(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${db(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${db(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(g+=n)})),g};function xb(e,t){return vb(e,t).flatMap((({presets:e})=>function(e={}){return Xi.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=fe(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>Pf(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const Sb=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=Rf(e);let s=Rf(e,"filter.duotone");if(!s){const t=Rf(e),n=(0,p.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&ns(t,n)}const l=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,a=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=t(r),u={};c?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);u[o]=r}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(ub).forEach((([t,o])=>{const r=Rf(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:a,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:l,name:r,selector:i,styleVariationSelectors:c?.length?u:void 0}})),o};function wb(e,t){let n="";if(!e||""===e.trim())return n;return e.split("&").forEach((e=>{if(!e||""===e.trim())return;if(!e.includes("{"))n+=`:root :where(${t}){${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?ns(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}})),n}function Cb(e={},t){const[n]=cs("spacing.blockGap"),o=null!==n,r=!o,i=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,g.useSelect)(p.store);return(0,h.useMemo)((()=>{if(!e?.styles||!e?.settings)return[];const n=(l=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);var l;const a=Sb((0,p.getBlockTypes)(),s),c=_b(n,a),u=yb(n,a,o,r,i,t),d=xb(n,a),h=[{css:c,isGlobalStyles:!0},{css:u,isGlobalStyles:!0},{css:n.styles.css??"",isGlobalStyles:!0},{assets:d,__unstableType:"svg",isGlobalStyles:!0}];return(0,p.getBlockTypes)().forEach((e=>{if(n.styles.blocks[e.name]?.css){const t=a[e.name].selector;h.push({css:wb(n.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[h,n.settings]}),[o,r,e,i,t,s])}function Bb(e=!1){const{merged:t}=(0,h.useContext)(is);return Cb(t,e)}const Ib="is-style-";function jb(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(Ib)){const n=t.slice(9);"default"!==n&&e.push(n)}return e}),[]):[]}function Eb({override:e}){ys(e)}function Tb(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=fe(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}var Mb={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>jb(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,g.useSelect)(p.store),r=function(e,t=[]){const n=jb(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${Ib}${r}-${n}`,{settings:s,styles:l}=function(e,t,n){const{merged:o}=(0,h.useContext)(is),{globalSettings:r,globalStyles:i}=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[N]}}),[]);return(0,h.useMemo)((()=>{const s=Tb({settings:o?.settings??r,styles:o?.styles??i},e,t);return{settings:o?.settings??r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:s}}}}}}),[o,r,i,t,n,e])}(e,r,n),a=(0,h.useMemo)((()=>{if(!r)return;const e={settings:s,styles:l},t=Sb((0,p.getBlockTypes)(),o,n);return yb(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,l,o,n]);return ys({id:`variation-${n}`,css:a,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}};const Pb="layout",{kebabCase:Rb}=G(ws.privateApis);function Ab(e){return(0,p.hasBlockSupport)(e,"layout")||(0,p.hasBlockSupport)(e,"__experimentalLayout")}function Nb(e={},t=""){const{layout:n}=e,{default:o}=(0,p.getBlockSupport)(t,Pb)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(Fs[r?.type||"default"]?.className){const e=Fs[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,g.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(ji).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${Rb(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${Rb(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}var Lb={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=xs(n),{layout:i}=r,{themeSupportsLayout:s}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==ga())return null;const l=(0,p.getBlockSupport)(n,Pb,{}),a={...i,...l},{allowSwitching:c,allowEditing:u=!0,allowInheriting:h=!0,default:m}=a;if(!u)return null;const f={...l,...e},{type:b,default:{type:k="default"}={}}=f,v=b||k,_=!(!h||v&&"default"!==v&&"constrained"!==v&&!f.inherit),y=e||m||{},{inherit:x=!1,contentSize:S=null}=y;if(("default"===v||"constrained"===v)&&!s)return null;const w=Xl(v),C=Xl("constrained"),B=!y.type&&(S||x),I=!!x||!!S,j=e=>t({layout:e});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa,{children:(0,d.jsxs)(ws.PanelBody,{title:(0,T.__)("Layout"),children:[_&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Inner blocks use content width"),checked:"constrained"===w?.name||I,onChange:()=>t({layout:{type:"constrained"===w?.name||I?"default":"constrained"}}),help:"constrained"===w?.name||I?(0,T.__)("Nested blocks use content width with options for full and wide widths."):(0,T.__)("Nested blocks will fill the width of this container.")})}),!x&&c&&(0,d.jsx)(Db,{type:v,onChange:e=>t({layout:{type:e}})}),w&&"default"!==w.name&&(0,d.jsx)(w.inspectorControls,{layout:y,onChange:j,layoutBlockSupport:a,name:n,clientId:o}),C&&B&&(0,d.jsx)(C.inspectorControls,{layout:y,onChange:j,layoutBlockSupport:a,name:n,clientId:o})]})}),!x&&w&&(0,d.jsx)(w.toolBarControls,{layout:y,onChange:j,layoutBlockSupport:l,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>Ab(e)};function Db({type:e,onChange:t}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,T.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Yl.map((({name:e,label:t})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function Ob({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,m.useInstanceId)(e),{layout:l}=i,{default:a}=(0,p.getBlockSupport)(r,Pb)||{},c=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||a||{},u=`wp-container-${Rb(r)}-is-layout-`,h=`.${u}${s}`,g=null!==n,f=Xl(c?.type||"default"),b=f?.getLayoutStyle?.({blockName:r,selector:h,layout:c,style:i?.style,hasBlockGapSupport:g}),k=ms({[`${u}${s}`]:!!b},o);return _s({css:b}),(0,d.jsx)(e,{...t,__unstableLayoutClassNames:k})}const zb=(0,m.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=Ab(o),s=Nb(r,o),l=(0,g.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=G(e(ji)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,d.jsx)(Ob,{block:e,props:t,layoutClasses:s,...l}):(0,d.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function Vb(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,f.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return"type"in(e.attributes?.layout??{})||Ab(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,f.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",zb);class Fb{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,this.columnEnd=void 0!==r?this.columnStart+r-1:n??this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:o??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}}function Hb(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Ub(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function Gb(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)<Math.abs(e[o][n]-t)?i:o),0)}function $b(e){const t=Hb(e,"grid-template-columns"),n=Hb(e,"grid-template-rows"),o=Hb(e,"border-top-width"),r=Hb(e,"border-right-width"),i=Hb(e,"border-bottom-width"),s=Hb(e,"border-left-width"),l=Hb(e,"padding-top"),a=Hb(e,"padding-right"),c=Hb(e,"padding-bottom"),u=Hb(e,"padding-left"),d=t.split(" ").length,p=n.split(" ").length;return{numColumns:d,numRows:p,numItems:d*p,currentColor:Hb(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:n,gap:Hb(e,"gap"),inset:`\n\t\t\t\tcalc(${l} + ${o})\n\t\t\t\tcalc(${a} + ${r})\n\t\t\t\tcalc(${c} + ${i})\n\t\t\t\tcalc(${u} + ${s})\n\t\t\t`}}}const Wb=[(0,h.createInterpolateElement)((0,T.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,d.jsx)("kbd",{})}),(0,h.createInterpolateElement)((0,T.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,d.jsx)("kbd",{})}),(0,h.createInterpolateElement)((0,T.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,d.jsx)("kbd",{})}),(0,T.__)("Drag files into the editor to automatically insert media blocks."),(0,T.__)("Change a block's type by pressing the block icon on the toolbar.")];var Kb=function(){const[e]=(0,h.useState)(Math.floor(Math.random()*Wb.length));return(0,d.jsx)(ws.Tip,{children:Wb[e]})},Zb=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),qb=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const{Badge:Yb}=G(ws.privateApis);var Xb=function({title:e,icon:t,description:n,blockType:o,className:r,name:i,allowParentNavigation:s,children:l}){o&&(I()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const a=(0,g.useSelect)((e=>{if(!s)return;const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(ji);return n(t(),"core/navigation",!0)[0]}),[s]),{selectBlock:c}=(0,g.useDispatch)(ji);return(0,d.jsxs)("div",{className:ms("block-editor-block-card",r),children:[s&&a&&(0,d.jsx)(ws.Button,{onClick:()=>c(a),label:(0,T.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,T.isRTL)()?Zb:qb,size:"small"}),(0,d.jsx)(Vu,{icon:t,showColors:!0}),(0,d.jsxs)(ws.__experimentalVStack,{spacing:1,children:[(0,d.jsxs)("h2",{className:"block-editor-block-card__title",children:[(0,d.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!!i?.length&&(0,d.jsx)(Yb,{children:e})]}),n&&(0,d.jsx)(ws.__experimentalText,{className:"block-editor-block-card__description",children:n}),l]})]})},Qb=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateSettings="UPDATE_SETTINGS",e))(Qb||{}),Jb=(e=>(e.Processing="PROCESSING",e.Paused="PAUSED",e))(Jb||{}),ek=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e))(ek||{});const tk={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:()=>{}}};var nk=function(e=tk,t={type:Qb.Unknown}){switch(t.type){case Qb.PauseQueue:return{...e,queueStatus:"paused"};case Qb.ResumeQueue:return{...e,queueStatus:"active"};case Qb.Add:return{...e,queue:[...e.queue,t.item]};case Qb.Cancel:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,error:t.error}:e))};case Qb.Remove:return{...e,queue:e.queue.filter((e=>e.id!==t.id))};case Qb.OperationStart:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,currentOperation:t.operation}:e))};case Qb.AddOperations:return{...e,queue:e.queue.map((e=>e.id!==t.id?e:{...e,operations:[...e.operations||[],...t.operations]}))};case Qb.OperationFinish:return{...e,queue:e.queue.map((e=>{if(e.id!==t.id)return e;const n=e.operations?e.operations.slice(1):[],o=e.attachment||t.item.attachment?{...e.attachment,...t.item.attachment}:void 0;return{...e,currentOperation:void 0,operations:n,...t.item,attachment:o,additionalData:{...e.additionalData,...t.item.additionalData}}}))};case Qb.CacheBlobUrl:{const n=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...n,t.blobUrl]}}}case Qb.RevokeBlobUrls:{const n={...e.blobUrls};return delete n[t.id],{...e,blobUrls:n}}case Qb.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e};function ok(e){return e.queue}function rk(e){return e.queue.length>=1}function ik(e,t){return e.queue.some((e=>e.attachment?.url===t||e.sourceUrl===t))}function sk(e,t){return e.queue.some((e=>e.attachment?.id===t||e.sourceAttachmentId===t))}function lk(e){return e.settings}function ak(e){return e.queue}function ck(e,t){return e.queue.find((e=>e.id===t))}function uk(e,t){return 0===e.queue.filter((e=>t===e.batchId)).length}function dk(e,t){return e.queue.some((e=>e.currentOperation===ek.Upload&&e.additionalData.post===t))}function pk(e,t){return e.queue.find((e=>e.status===Jb.Paused&&e.additionalData.post===t))}function hk(e){return"paused"===e.queueStatus}function gk(e,t){return e.blobUrls[t]||[]}const mk={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let fk;const bk=new Uint8Array(16);function kk(){if(!fk&&(fk="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fk))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fk(bk)}const vk=[];for(let e=0;e<256;++e)vk.push((e+256).toString(16).slice(1));function _k(e,t=0){return vk[e[t+0]]+vk[e[t+1]]+vk[e[t+2]]+vk[e[t+3]]+"-"+vk[e[t+4]]+vk[e[t+5]]+"-"+vk[e[t+6]]+vk[e[t+7]]+"-"+vk[e[t+8]]+vk[e[t+9]]+"-"+vk[e[t+10]]+vk[e[t+11]]+vk[e[t+12]]+vk[e[t+13]]+vk[e[t+14]]+vk[e[t+15]]}const yk=function(e,t,n){if(mk.randomUUID&&!t&&!e)return mk.randomUUID();const o=(e=e||{}).random||(e.rng||kk)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return _k(o)};class xk extends Error{code;file;constructor({code:e,message:t,file:n,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=n}}function Sk(e,t){if(!t)return;const n=t.some((t=>t.includes("/")?t===e.type:e.type.startsWith(`${t}/`)));if(e.type&&!n)throw new xk({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,T.sprintf)((0,T.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}function wk(e,t){const n=(o=t)?Object.entries(o).flatMap((([e,t])=>{const[n]=t.split("/");return[t,...e.split("|").map((e=>`${n}/${e}`))]})):null;var o;if(!n)return;const r=n.includes(e.type);if(e.type&&!r)throw new xk({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,T.sprintf)((0,T.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}function Ck(e,t){if(e.size<=0)throw new xk({code:"EMPTY_FILE",message:(0,T.sprintf)((0,T.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new xk({code:"SIZE_ABOVE_LIMIT",message:(0,T.sprintf)((0,T.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Bk({files:e,onChange:t,onSuccess:n,onError:o,onBatchSuccess:r,additionalData:i,allowedTypes:s}){return async({select:l,dispatch:a})=>{const c=yk();for(const u of e){try{Sk(u,s),wk(u,l.getSettings().allowedMimeTypes)}catch(e){o?.(e);continue}try{Ck(u,l.getSettings().maxUploadFileSize)}catch(e){o?.(e);continue}a.addItem({file:u,batchId:c,onChange:t,onSuccess:n,onBatchSuccess:r,onError:o,additionalData:i})}}}function Ik(e,t,n=!1){return async({select:o,dispatch:r})=>{const i=o.getItem(e);if(i){if(i.abortController?.abort(),!n){const{onError:e}=i;e?.(t??new Error("Upload cancelled")),!e&&t&&console.error("Upload cancelled",t)}r({type:Qb.Cancel,id:e,error:t}),r.removeItem(e),r.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function jk(e){return function(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}(e,e.name)}class Ek extends File{constructor(e="stub-file"){super([],e)}}function Tk({file:e,batchId:t,onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,additionalData:s={},sourceUrl:l,sourceAttachmentId:a,abortController:c,operations:u}){return async({dispatch:d})=>{const p=yk(),h=function(e){if(e instanceof File)return e;const t=e.type.split("/")[1],n="application/pdf"===e.type?"document":e.type.split("/")[0];return new File([e],`${n}.${t}`,{type:e.type})}(e);let g;h instanceof Ek||(g=(0,$a.createBlobURL)(h),d({type:Qb.CacheBlobUrl,id:p,blobUrl:g})),d({type:Qb.Add,item:{id:p,batchId:t,status:Jb.Processing,sourceFile:jk(h),file:h,attachment:{url:g},additionalData:{convert_format:!1,...s},onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,sourceUrl:l,sourceAttachmentId:a,abortController:c||new AbortController,operations:Array.isArray(u)?u:[ek.Prepare]}}),d.processItem(p)}}function Mk(e){return async({select:t,dispatch:n})=>{if(t.isPaused())return;const o=t.getItem(e),{attachment:r,onChange:i,onSuccess:s,onBatchSuccess:l,batchId:a}=o,c=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0];if(r&&i?.([r]),!c)return r&&s?.([r]),n.revokeBlobUrls(e),void(a&&t.isBatchUploaded(a)&&l?.());if(c)switch(n({type:Qb.OperationStart,id:e,operation:c}),c){case ek.Prepare:n.prepareItem(o.id);break;case ek.Upload:n.uploadItem(e)}}}function Pk(){return{type:Qb.PauseQueue}}function Rk(){return async({select:e,dispatch:t})=>{t({type:Qb.ResumeQueue});for(const n of e.getAllItems())t.processItem(n.id)}}function Ak(e){return async({select:t,dispatch:n})=>{t.getItem(e)&&n({type:Qb.Remove,id:e})}}function Nk(e,t){return async({dispatch:n})=>{n({type:Qb.OperationFinish,id:e,item:t}),n.processItem(e)}}function Lk(e){return async({dispatch:t})=>{const n=[ek.Upload];t({type:Qb.AddOperations,id:e,operations:n}),t.finishOperation(e,{})}}function Dk(e){return async({select:t,dispatch:n})=>{const o=t.getItem(e);t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([t])=>{(0,$a.isBlobURL)(t.url)||n.finishOperation(e,{attachment:t})},onSuccess:([t])=>{n.finishOperation(e,{attachment:t})},onError:t=>{n.cancelItem(e,t)}})}}function Ok(e){return async({select:t,dispatch:n})=>{const o=t.getBlobUrls(e);for(const e of o)(0,$a.revokeBlobURL)(e);n({type:Qb.RevokeBlobUrls,id:e})}}function zk(e){return{type:Qb.UpdateSettings,settings:e}}const{lock:Vk,unlock:Fk}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media"),Hk="core/upload-media",Uk={reducer:nk,selectors:s,actions:a},Gk=(0,g.createReduxStore)(Hk,{reducer:nk,selectors:s,actions:a});(0,g.register)(Gk),Fk(Gk).registerPrivateActions(c),Fk(Gk).registerPrivateSelectors(l);const $k=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,g.useRegistry)(),[r]=(0,h.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,g.createRegistry)({},t),o.registerStore(Hk,Uk),e.set(t,o)),o}(r,o,t);return i===o?(0,d.jsx)(e,{registry:o,...n}):(0,d.jsx)(g.RegistryProvider,{value:i,children:(0,d.jsx)(e,{registry:i,...n})})}),"withRegistryProvider")((e=>{const{children:t,settings:n}=e,{updateSettings:o}=Fk((0,g.useDispatch)(Gk));return(0,h.useEffect)((()=>{o(n)}),[n,o]),(0,d.jsx)(d.Fragment,{children:t})}));var Wk=$k;var Kk=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,g.useRegistry)(),[r]=(0,h.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,g.createRegistry)({},t),o.registerStore(ge,Ii),e.set(t,o)),o}(r,o,t);return i===o?(0,d.jsx)(e,{registry:o,...n}):(0,d.jsx)(g.RegistryProvider,{value:i,children:(0,d.jsx)(e,{registry:i,...n})})}),"withRegistryProvider");const Zk=()=>{};function qk({clientId:e=null,value:t,selection:n,onChange:o=Zk,onInput:r=Zk}){const i=(0,g.useRegistry)(),{resetBlocks:s,resetSelection:l,replaceInnerBlocks:a,setHasControlledInnerBlocks:c,__unstableMarkNextChangeAsNotPersistent:u}=i.dispatch(ji),{getBlockName:d,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(ji),k=(0,g.useSelect)((t=>!e||t(ji).areInnerBlocksControlled(e)),[e]),v=(0,h.useRef)({incoming:null,outgoing:[]}),_=(0,h.useRef)(!1),y=()=>{t&&(u(),e?i.batch((()=>{c(e,!0);const n=t.map((e=>(0,p.cloneBlock)(e)));_.current&&(v.current.incoming=n),u(),a(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},x=(0,h.useRef)(r),S=(0,h.useRef)(o);(0,h.useEffect)((()=>{x.current=r,S.current=o}),[r,o]),(0,h.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],y(),n&&l(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,h.useRef)(!1);(0,h.useEffect)((()=>{w.current?k||(v.current.outgoing=[],y()):w.current=!0}),[k]),(0,h.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(ji);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===d(e))return;if(!(!e||r(e)))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);if(u||a&&!u&&i&&!l){l=i,v.current.outgoing.push(s);(l?S.current:x.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})}a=u}),ji);return()=>{_.current=!1,c()}}),[i,e]),(0,h.useEffect)((()=>()=>{u(),e?(c(e,!1),u(),a(e,[])):s([])}),[])}const Yk=window.wp.keyboardShortcuts;function Xk(){return null}Xk.Register=function(){const{registerShortcut:e}=(0,g.useDispatch)(Yk.store);return(0,h.useEffect)((()=>{e({name:"core/block-editor/copy",category:"block",description:(0,T.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,T.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,T.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,T.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,T.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,T.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,T.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,T.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,T.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,T.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,T.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,T.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,T.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,T.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,T.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,T.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,T.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,T.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}})}),[e]),null};var Qk=Xk;var Jk=function(e={}){return(0,h.useMemo)((()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes})),[e])};const ev=()=>{};function tv(e,{allowedTypes:t,additionalData:n={},filesList:o,onError:r=ev,onFileChange:i,onSuccess:s,onBatchSuccess:l}){e.dispatch(Gk).addItems({files:o,onChange:i,onSuccess:s,onBatchSuccess:l,onError:({message:e})=>r(e),additionalData:n,allowedTypes:t})}const nv=Kk((e=>{const{settings:t,registry:n,stripExperimentalSettings:o=!1}=e,r=Jk(t);let i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,h.useMemo)((()=>({...t,mediaUpload:tv.bind(null,n)})),[t,n]));const{__experimentalUpdateSettings:s}=G((0,g.useDispatch)(ji));(0,h.useEffect)((()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[i,o,s]),qk(e);const l=(0,d.jsxs)(ws.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,d.jsx)(Qk.Register,{}),(0,d.jsx)(hh,{children:e.children})]});return window.__experimentalMediaProcessing?(0,d.jsx)(Wk,{settings:r,useSubRegistry:!1,children:l}):l}));var ov=e=>(0,d.jsx)(nv,{...e,stripExperimentalSettings:!0,children:e.children});const rv=(0,h.createContext)({});function iv({value:e,children:t}){const n=(0,h.useContext)(rv),o=(0,h.useMemo)((()=>({...n,...e})),[n,e]);return(0,d.jsx)(rv.Provider,{value:o,children:t})}rv.displayName="BlockContext";var sv=rv;const lv="core/pattern-overrides";function av(e){return!e||0===Object.keys(e).length}function cv(e){return e?.__default?.source===lv}function uv(e,t){if(cv(e)){const n={};for(const o of t){const t=e[o]?e[o]:{source:lv};n[o]=t}return n}return e}function dv(e){const{clientId:t}=C(),n=e||t,{updateBlockAttributes:o}=(0,g.useDispatch)(ji),{getBlockAttributes:r}=(0,g.useRegistry)().select(ji);return{updateBlockBindings:e=>{const{metadata:{bindings:t,...i}={}}=r(n),s={...t};Object.entries(e).forEach((([e,t])=>{t||!s[e]?s[e]=t:delete s[e]}));const l={...i,bindings:s};av(l.bindings)&&delete l.bindings,o(n,{metadata:av(l)?void 0:l})},removeAllBlockBindings:()=>{const{metadata:{bindings:e,...t}={}}=r(n);o(n,{metadata:av(t)?void 0:t})}}}const pv=(0,h.createContext)({});pv.displayName="PrivateBlockContext";const hv={},gv=(0,ws.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,p.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,d.jsx)(o,{...e})}));var mv=e=>{const{name:t,clientId:n,attributes:o,setAttributes:r}=e,i=(0,g.useRegistry)(),s=(0,p.getBlockType)(t),l=(0,h.useContext)(sv),a=(0,g.useSelect)((e=>G(e(p.store)).getAllBlockBindingsSources()),[]),{bindableAttributes:c}=(0,h.useContext)(pv),{blockBindings:u,context:m,hasPatternOverrides:f}=(0,h.useMemo)((()=>{const e=s?.usesContext?Object.fromEntries(Object.entries(l).filter((([e])=>s.usesContext.includes(e)))):hv;return o?.metadata?.bindings&&Object.values(o?.metadata?.bindings||{}).forEach((t=>{a[t?.source]?.usesContext?.forEach((t=>{e[t]=l[t]}))})),{blockBindings:uv(o?.metadata?.bindings,c),context:e,hasPatternOverrides:cv(o?.metadata?.bindings)}}),[t,s?.usesContext,l,o?.metadata?.bindings,a]),b=(0,g.useSelect)((e=>{if(!u)return o;const t={},r=new Map;for(const[e,t]of Object.entries(u)){const{source:n,args:o}=t,i=a[n];i&&c?.includes(e)&&r.set(i,{...r.get(i),[e]:{args:o}})}if(r.size)for(const[o,i]of r){let r={};o.getValues?r=o.getValues({select:e,context:m,clientId:n,bindings:i}):Object.keys(i).forEach((e=>{r[e]=o.label}));for(const[e,n]of Object.entries(r))"url"!==e||n&&Lc(n)?t[e]=n:t[e]=null}return{...o,...t}}),[o,c,u,n,m,t,a]),k=(0,h.useCallback)((e=>{u?i.batch((()=>{const t={...e},o=new Map;for(const[e,n]of Object.entries(t)){if(!u[e]||!c?.includes(e))continue;const r=u[e],i=a[r?.source];i?.setValues&&(o.set(i,{...o.get(i),[e]:{args:r.args,newValue:n}}),delete t[e])}if(o.size)for(const[e,t]of o)e.setValues({select:i.select,dispatch:i.dispatch,context:m,clientId:n,bindings:t});const s=!!m["pattern/overrides"];f&&s||!Object.keys(t).length||(f&&(delete t.caption,delete t.href),r(t))})):r(e)}),[c,u,n,m,f,r,a,t,i]);if(!s)return null;if(s.apiVersion>1)return(0,d.jsx)(gv,{...e,attributes:b,context:m,setAttributes:k});const v=(0,p.hasBlockSupport)(s,"className",!0)?(0,p.getBlockDefaultClassName)(t):null,_=ms(v,o?.className,e.className);return(0,d.jsx)(gv,{...e,attributes:b,className:_,context:m,setAttributes:k})},fv=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var bv=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,d.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,d.jsx)("div",{className:ms(e,"block-editor-warning"),children:(0,d.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,d.jsx)("p",{className:"block-editor-warning__message",children:n}),(t?.length>0||o)&&(0,d.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map(((e,t)=>(0,d.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-warning__secondary",icon:fv,label:(0,T.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,d.jsx)(ws.MenuGroup,{children:o.map(((e,t)=>(0,d.jsx)(ws.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function kv({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,g.useDispatch)(ji),r=(0,p.getBlockType)(t);return(0,d.jsxs)(bv,{actions:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,T.__)("Find original")},"find-original"),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,T.__)("Remove")},"remove")],children:[(0,d.jsxs)("strong",{children:[r?.title,": "]}),(0,T.__)("This block can only be used once.")]})}function vv({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:l,attributes:a={},__unstableLayoutClassNames:c}=r,{layout:u=null,metadata:g={}}=a,{bindings:m}=g,f=(0,p.hasBlockSupport)(i,"layout",!1)||(0,p.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:x}=(0,h.useContext)(pv);return(0,d.jsxs)(w,{value:(0,h.useMemo)((()=>({name:i,isSelected:s,clientId:l,layout:f?u:null,__unstableLayoutClassNames:c,[b]:e,[k]:t,[v]:n,[_]:m,[y]:o})),[i,s,l,f,u,c,e,t,n,m,o]),children:[(0,d.jsx)(mv,{...r}),x&&(0,d.jsx)(kv,{originalBlockClientId:x,name:i,onReplace:r.onReplace})]})}var _v=n(8021);function yv({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,d.jsxs)("div",{className:i,children:[(0,d.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,d.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,d.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,d.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,d.jsx)(h.RawHTML,{children:(0,Ga.safeHTML)(n)})})]}),(0,d.jsx)("div",{className:"block-editor-block-compare__action",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}var xv=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,p.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const l=(a=e.originalContent,c=i,(0,_v.JJ)(a,c).map(((e,t)=>{const n=ms({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,d.jsx)("span",{className:n,children:e.value},t)})));var a,c;return(0,d.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,d.jsx)(yv,{title:(0,T.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,T.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,d.jsx)(yv,{title:(0,T.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:l,renderedContent:i})]})};const Sv=e=>(0,p.rawHandler)({HTML:e.originalContent});function wv({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,g.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(ji),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,g.useDispatch)(ji),[i,s]=(0,h.useState)(!1),l=(0,h.useCallback)((()=>s(!1)),[]),a=(0,h.useMemo)((()=>({toClassic(){const e=(0,p.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,p.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=Sv(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,p.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),c=(0,h.useMemo)((()=>[{title:(0,T._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,T.__)("Convert to HTML"),onClick:a.toHTML},o&&{title:(0,T.__)("Convert to Classic Block"),onClick:a.toClassic}].filter(Boolean)),[n,o,a]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(bv,{actions:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:a.toRecoveredBlock,variant:"primary",children:(0,T.__)("Attempt recovery")},"recover")],secondaryActions:c,children:(0,T.__)("Block contains unexpected or invalid content.")}),i&&(0,d.jsx)(ws.Modal,{title:(0,T.__)("Resolve Block"),onRequestClose:l,className:"block-editor-block-compare",children:(0,d.jsx)(xv,{block:t,onKeep:a.toHTML,onConvert:a.toBlocks,convertor:Sv,convertButtonText:(0,T.__)("Convert to Blocks")})})]})}const Cv=(0,d.jsx)(bv,{className:"block-editor-block-list__block-crash-warning",children:(0,T.__)("This block has encountered an error and cannot be previewed.")});var Bv=()=>Cv;class Iv extends h.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var jv=Iv,Ev=n(4132);var Tv=function({clientId:e}){const[t,n]=(0,h.useState)(""),o=(0,g.useSelect)((t=>t(ji).getBlock(e)),[e]),{updateBlock:r}=(0,g.useDispatch)(ji);return(0,h.useEffect)((()=>{n((0,p.getBlockContent)(o))}),[o]),(0,d.jsx)(Ev.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,p.getBlockType)(o.name);if(!i)return;const s=(0,p.getBlockAttributes)(i,t,o.attributes),l=t||(0,p.getSaveContent)(i,s),[a]=t?(0,p.validateBlock)({...o,attributes:s,originalContent:l}):[!0];r(e,{attributes:s,originalContent:l,isValid:a}),t||n(l)},onChange:e=>n(e.target.value)})},Mv=Kv(),Pv=e=>Uv(e,Mv),Rv=Kv();Pv.write=e=>Uv(e,Rv);var Av=Kv();Pv.onStart=e=>Uv(e,Av);var Nv=Kv();Pv.onFrame=e=>Uv(e,Nv);var Lv=Kv();Pv.onFinish=e=>Uv(e,Lv);var Dv=[];Pv.setTimeout=(e,t)=>{let n=Pv.now()+t,o=()=>{let e=Dv.findIndex((e=>e.cancel==o));~e&&Dv.splice(e,1),Fv-=~e?1:0},r={time:n,handler:e,cancel:o};return Dv.splice(Ov(n),0,r),Fv+=1,Gv(),r};var Ov=e=>~(~Dv.findIndex((t=>t.time>e))||~Dv.length);Pv.cancel=e=>{Av.delete(e),Nv.delete(e),Lv.delete(e),Mv.delete(e),Rv.delete(e)},Pv.sync=e=>{Hv=!0,Pv.batchedUpdates(e),Hv=!1},Pv.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Pv.onStart(n)}return o.handler=e,o.cancel=()=>{Av.delete(n),t=null},o};var zv=typeof window<"u"?window.requestAnimationFrame:()=>{};Pv.use=e=>zv=e,Pv.now=typeof performance<"u"?()=>performance.now():Date.now,Pv.batchedUpdates=e=>e(),Pv.catch=console.error,Pv.frameLoop="always",Pv.advance=()=>{"demand"!==Pv.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Wv()};var Vv=-1,Fv=0,Hv=!1;function Uv(e,t){Hv?(t.delete(e),e(0)):(t.add(e),Gv())}function Gv(){Vv<0&&(Vv=0,"demand"!==Pv.frameLoop&&zv($v))}function $v(){~Vv&&(zv($v),Pv.batchedUpdates(Wv))}function Wv(){let e=Vv;Vv=Pv.now();let t=Ov(Vv);t&&(Zv(Dv.splice(0,t),(e=>e.handler())),Fv-=t),Fv?(Av.flush(),Mv.flush(e?Math.min(64,Vv-e):16.667),Nv.flush(),Rv.flush(),Lv.flush()):Vv=-1}function Kv(){let e=new Set,t=e;return{add(n){Fv+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Fv-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Fv-=t.size,Zv(t,(t=>t(n)&&e.add(t))),Fv+=e.size,t=e)}}}function Zv(e,t){e.forEach((e=>{try{t(e)}catch(e){Pv.catch(e)}}))}var qv=Object.defineProperty,Yv={};function Xv(){}((e,t)=>{for(var n in t)qv(e,n,{get:t[n],enumerable:!0})})(Yv,{assign:()=>d_,colors:()=>a_,createStringInterpolator:()=>r_,skipAnimation:()=>c_,to:()=>i_,willAdvance:()=>u_});var Qv={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Jv(e,t){if(Qv.arr(e)){if(!Qv.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var e_=(e,t)=>e.forEach(t);function t_(e,t,n){if(Qv.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(let o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var n_=e=>Qv.und(e)?[]:Qv.arr(e)?e:[e];function o_(e,t){if(e.size){let n=Array.from(e);e.clear(),e_(n,t)}}var r_,i_,s_=(e,...t)=>o_(e,(e=>e(...t))),l_=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),a_=null,c_=!1,u_=Xv,d_=e=>{e.to&&(i_=e.to),e.now&&(Pv.now=e.now),void 0!==e.colors&&(a_=e.colors),null!=e.skipAnimation&&(c_=e.skipAnimation),e.createStringInterpolator&&(r_=e.createStringInterpolator),e.requestAnimationFrame&&Pv.use(e.requestAnimationFrame),e.batchedUpdates&&(Pv.batchedUpdates=e.batchedUpdates),e.willAdvance&&(u_=e.willAdvance),e.frameLoop&&(Pv.frameLoop=e.frameLoop)},p_=new Set,h_=[],g_=[],m_=0,f_={get idle(){return!p_.size&&!h_.length},start(e){m_>e.priority?(p_.add(e),Pv.onStart(b_)):(k_(e),Pv(__))},advance:__,sort(e){if(m_)Pv.onFrame((()=>f_.sort(e)));else{let t=h_.indexOf(e);~t&&(h_.splice(t,1),v_(e))}},clear(){h_=[],p_.clear()}};function b_(){p_.forEach(k_),p_.clear(),Pv(__)}function k_(e){h_.includes(e)||v_(e)}function v_(e){h_.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(h_,(t=>t.priority>e.priority)),0,e)}function __(e){let t=g_;for(let n=0;n<h_.length;n++){let o=h_[n];m_=o.priority,o.idle||(u_(o),o.advance(e),o.idle||t.push(o))}return m_=0,(g_=h_).length=0,(h_=t).length>0}var y_="[-+]?\\d*\\.?\\d+",x_=y_+"%";function S_(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var w_=new RegExp("rgb"+S_(y_,y_,y_)),C_=new RegExp("rgba"+S_(y_,y_,y_,y_)),B_=new RegExp("hsl"+S_(y_,x_,x_)),I_=new RegExp("hsla"+S_(y_,x_,x_,y_)),j_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,E_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T_=/^#([0-9a-fA-F]{6})$/,M_=/^#([0-9a-fA-F]{8})$/;function P_(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function R_(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=P_(r,o,e+1/3),s=P_(r,o,e),l=P_(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function A_(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function N_(e){return(parseFloat(e)%360+360)%360/360}function L_(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function D_(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function O_(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=T_.exec(e))?parseInt(t[1]+"ff",16)>>>0:a_&&void 0!==a_[e]?a_[e]:(t=w_.exec(e))?(A_(t[1])<<24|A_(t[2])<<16|A_(t[3])<<8|255)>>>0:(t=C_.exec(e))?(A_(t[1])<<24|A_(t[2])<<16|A_(t[3])<<8|L_(t[4]))>>>0:(t=j_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=M_.exec(e))?parseInt(t[1],16)>>>0:(t=E_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=B_.exec(e))?(255|R_(N_(t[1]),D_(t[2]),D_(t[3])))>>>0:(t=I_.exec(e))?(R_(N_(t[1]),D_(t[2]),D_(t[3]))|L_(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var z_=(e,t,n)=>{if(Qv.fun(e))return e;if(Qv.arr(e))return z_({range:e,output:t,extrapolate:n});if(Qv.str(e.output[0]))return r_(e);let o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};var V_=1.70158,F_=1.525*V_,H_=V_+1,U_=2*Math.PI/3,G_=2*Math.PI/4.5,$_=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,W_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>H_*e*e*e-V_*e*e,easeOutBack:e=>1+H_*Math.pow(e-1,3)+V_*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(F_+1)*e-F_)/2:(Math.pow(2*e-2,2)*((F_+1)*(2*e-2)+F_)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*U_),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*U_)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*G_)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*G_)/2+1,easeInBounce:e=>1-$_(1-e),easeOutBounce:$_,easeInOutBounce:e=>e<.5?(1-$_(1-2*e))/2:(1+$_(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(o):Math.ceil(o))/e)}},K_=Symbol.for("FluidValue.get"),Z_=Symbol.for("FluidValue.observers"),q_=e=>Boolean(e&&e[K_]),Y_=e=>e&&e[K_]?e[K_]():e,X_=e=>e[Z_]||null;function Q_(e,t){let n=e[Z_];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var J_=class{[K_];[Z_];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ey(this,e)}},ey=(e,t)=>ry(e,K_,t);function ty(e,t){if(e[K_]){let n=e[Z_];n||ry(e,Z_,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ny(e,t){let n=e[Z_];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Z_]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var oy,ry=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),iy=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,sy=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ly=new RegExp(`(${iy.source})(%|[a-z]+)`,"i"),ay=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cy=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,uy=e=>{let[t,n]=dy(e);if(!t||l_())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&cy.test(n)?uy(n):n||e},dy=e=>{let t=cy.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},py=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,hy=e=>{oy||(oy=a_?new RegExp(`(${Object.keys(a_).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Y_(e).replace(cy,uy).replace(sy,O_).replace(oy,O_))),n=t.map((e=>e.match(iy).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>z_({...e,output:t})));return e=>{let n=!ly.test(t[0])&&t.find((e=>ly.test(e)))?.replace(iy,""),r=0;return t[0].replace(iy,(()=>`${o[r++](e)}${n||""}`)).replace(ay,py)}},gy="react-spring: ",my=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${gy}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},fy=my(console.warn);my(console.warn);function by(e){return Qv.str(e)&&("#"==e[0]||/\d/.test(e)||!l_()&&cy.test(e)||e in(a_||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var ky=l_()?ic.useEffect:ic.useLayoutEffect;function vy(){let e=(0,ic.useState)()[1],t=(()=>{let e=(0,ic.useRef)(!1);return ky((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var _y=[];var yy=Symbol.for("Animated:node"),xy=e=>e&&e[yy],Sy=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,yy,t),wy=e=>e&&e[yy]&&e[yy].getPayload(),Cy=class{payload;constructor(){Sy(this,this)}getPayload(){return this.payload||[]}},By=class extends Cy{constructor(e){super(),this._value=e,Qv.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new By(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Qv.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Qv.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Iy=class extends By{_string=null;_toString;constructor(e){super(0),this._toString=z_({output:[e,e]})}static create(e){return new Iy(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Qv.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=z_({output:[this.getValue(),e]})),this._value=0,super.reset()}},jy={dependencies:null},Ey=class extends Cy{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return t_(this.source,((n,o)=>{(e=>!!e&&e[yy]===e)(n)?t[o]=n.getValue(e):q_(n)?t[o]=Y_(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&e_(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return t_(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){jy.dependencies&&q_(e)&&jy.dependencies.add(e);let t=wy(e);t&&e_(t,(e=>this.add(e)))}},Ty=class extends Ey{constructor(e){super(e)}static create(e){return new Ty(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(My)),!0)}};function My(e){return(by(e)?Iy:By).create(e)}function Py(e){let t=xy(e);return t?t.constructor:Qv.arr(e)?Ty:by(e)?Iy:By}var Ry=(e,t)=>{let n=!Qv.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ic.forwardRef)(((o,r)=>{let i=(0,ic.useRef)(null),s=n&&(0,ic.useCallback)((e=>{i.current=function(e,t){return e&&(Qv.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){let n=new Set;return jy.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ey(e),jy.dependencies=null,[e,n]}(o,t),c=vy(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new Ay(u,a),p=(0,ic.useRef)();ky((()=>(p.current=d,e_(a,(e=>ty(e,d))),()=>{p.current&&(e_(p.current.deps,(e=>ny(e,p.current))),Pv.cancel(p.current.update))}))),(0,ic.useEffect)(u,[]),(e=>{(0,ic.useEffect)(e,_y)})((()=>()=>{let e=p.current;e_(e.deps,(t=>ny(t,e)))}));let h=t.getComponentProps(l.getValue());return ic.createElement(e,{...h,ref:s})}))},Ay=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Pv.write(this.update)}};var Ny=Symbol.for("AnimatedComponent"),Ly=e=>Qv.str(e)?e:e&&Qv.str(e.displayName)?e.displayName:Qv.fun(e)&&e.name||null;function Dy(e,...t){return Qv.fun(e)?e(...t):e}var Oy=(e,t)=>!0===e||!!(t&&e&&(Qv.fun(e)?e(t):n_(e).includes(t))),zy=(e,t)=>Qv.obj(e)?t&&e[t]:e,Vy=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Fy=e=>e,Hy=(e,t=Fy)=>{let n=Uy;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);Qv.und(n)||(o[r]=n)}return o},Uy=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Gy={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function $y(e){let t=function(e){let t={},n=0;if(t_(e,((e,o)=>{Gy[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return t_(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Wy(e){return e=Y_(e),Qv.arr(e)?e.map(Wy):by(e)?Yv.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ky(e){return Qv.fun(e)||Qv.arr(e)&&Qv.obj(e[0])}var Zy={tension:170,friction:26,mass:1,damping:1,easing:W_.linear,clamp:!1},qy=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Zy)}};function Yy(e,t){if(Qv.und(t.decay)){let n=!Qv.und(t.tension)||!Qv.und(t.friction);(n||!Qv.und(t.frequency)||!Qv.und(t.damping)||!Qv.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Xy=[],Qy=class{changed=!1;values=Xy;toValues=null;fromValues=Xy;to;from;config=new qy;immediate=!1};function Jy(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{let a,c,u=Oy(n.cancel??o?.cancel,t);if(u)h();else{Qv.und(n.pause)||(r.paused=Oy(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Oy(e,t)),a=Dy(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-Pv.now()}function p(){a>0&&!Yv.skipAnimation?(r.delayed=!0,c=Pv.setTimeout(h,a),r.pauseQueue.add(d),r.timeouts.add(c)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},s)}catch(e){l(e)}}}))}var ex=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?ox(e.get()):t.every((e=>e.noop))?tx(e.get()):nx(e.get(),t.every((e=>e.finished))),tx=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nx=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ox=e=>({value:e,cancelled:!0,finished:!1});function rx(e,t,n,o){let{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Hy(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&ox(o)||r!==n.asyncId&&nx(o,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let i=new sx,s=new lx;return(async()=>{if(Yv.skipAnimation)throw ix(n),s.result=nx(o,!1),u(s),s;g(i);let l=Qv.obj(e)?{...e}:{...t,to:e};l.parentId=r,t_(p,((e,t)=>{Qv.und(l[t])&&(l[t]=e)}));let a=await o.start(l);return g(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Yv.skipAnimation)return ix(n),nx(o,!1);try{let t;t=Qv.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,o.stop.bind(o))),await Promise.all([t.then(c),h]),d=nx(o.get(),!0,!1)}catch(e){if(e instanceof sx)d=e.result;else{if(!(e instanceof lx))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return Qv.fun(s)&&Pv.batchedUpdates((()=>{s(d,o,o.item)})),d})():a}function ix(e,t){o_(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var sx=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},lx=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ax=e=>e instanceof ux,cx=1,ux=class extends J_{id=cx++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=xy(this);return e&&e.getValue()}to(...e){return Yv.to(this,e)}interpolate(...e){return fy(`${gy}The "interpolate" function is deprecated in v9 (use "to" instead)`),Yv.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Q_(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||f_.sort(this),Q_(this,{type:"priority",parent:this,priority:e})}},dx=Symbol.for("SpringPhase"),px=e=>(1&e[dx])>0,hx=e=>(2&e[dx])>0,gx=e=>(4&e[dx])>0,mx=(e,t)=>t?e[dx]|=3:e[dx]&=-3,fx=(e,t)=>t?e[dx]|=4:e[dx]&=-5,bx=class extends ux{key;animation=new Qy;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Qv.und(e)||!Qv.und(t)){let n=Qv.obj(e)?{...e}:{...t,from:e};Qv.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(hx(this)||this._state.asyncTo)||gx(this)}get goal(){return Y_(this.animation.to)}get velocity(){let e=xy(this);return e instanceof By?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return px(this)}get isAnimating(){return hx(this)}get isPaused(){return gx(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:i}=o,s=wy(o.to);!s&&q_(o.to)&&(i=n_(Y_(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;let c=l.constructor==Iy?1:s?s[a].lastPosition:i[a],u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,i=o.fromValues[a],s=null!=l.v0?l.v0:l.v0=Qv.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(Qv.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=i+s/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,t=s*o}else{t=null==l.lastVelocity?s:l.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,h=!Qv.und(a),g=i==c?l.v0>0:i<c,m=!1,f=1,b=Math.ceil(e/f);for(let e=0;e<b&&(n=Math.abs(t)>o,n||(u=Math.abs(c-d)<=p,!u));++e){h&&(m=d==c||d>c==g,m&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,n=l.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=i+r.easing(o)*(c-i),t=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));let l=xy(this),a=l.getValue();if(t){let e=Y_(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Pv.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(hx(this)){let{to:e,config:t}=this.animation;Pv.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Qv.und(e)?(n=this.queue||[],this.queue=[]):n=[Qv.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>ex(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ix(this._state,e&&this._lastCallId),Pv.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:o}=e;n=Qv.obj(n)?n[t]:n,(null==n||Ky(n))&&(n=void 0),o=Qv.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return px(this)||(e.reverse&&([n,o]=[o,n]),o=Y_(o),Qv.und(o)?xy(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Hy(e,((e,t)=>/^on/.test(t)?zy(e,n):e))),Sx(this,e,"onProps"),wx(this,"onProps",e,this);let r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return Jy(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{gx(this)||(fx(this,!0),s_(i.pauseQueue),wx(this,"onPause",nx(this,kx(this,this.animation.to)),this))},resume:()=>{gx(this)&&(fx(this,!1),hx(this)&&this._resume(),s_(i.resumeQueue),wx(this,"onResume",nx(this,kx(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=vx(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ox(this));let o=!Qv.und(e.to),r=!Qv.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(ox(this));this._lastToId=t.callId}let{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||Qv.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Jv(d,c);p&&(l.from=d),d=Y_(d);let h=!Jv(u,a);h&&this._focus(u);let g=Ky(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(Yy(n={...n},t),t={...n,...t}),Yy(e,t),Object.assign(e,t);for(let t in Zy)null==e[t]&&(e[t]=Zy[t]);let{mass:o,frequency:r,damping:i}=e;Qv.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,Dy(t.config,i),t.config!==s.config?Dy(s.config,i):void 0);let k=xy(this);if(!k||Qv.und(u))return n(nx(this,!0));let v=Qv.und(t.reset)?r&&!t.default:!Qv.und(d)&&Oy(t.reset,i),_=v?d:this.get(),y=Wy(u),x=Qv.num(y)||Qv.arr(y)||by(y),S=!g&&(!x||Oy(s.immediate||t.immediate,i));if(h){let e=Py(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(y)}}let w=k.constructor,C=q_(u),B=!1;if(!C){let e=v||!px(this)&&p;(h||e)&&(B=Jv(Wy(_),y),C=!B),(!Jv(l.immediate,S)&&!S||!Jv(m.decay,f)||!Jv(m.velocity,b))&&(C=!0)}if(B&&hx(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||q_(a))&&(l.values=k.getPayload(),l.toValues=q_(u)?null:w==Iy?[1]:n_(y)),l.immediate!=S&&(l.immediate=S,!S&&!v&&this._set(a)),C)){let{onRest:e}=l;e_(xx,(e=>Sx(this,t,e)));let o=nx(this,kx(this,a));s_(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&Pv.batchedUpdates((()=>{l.changed=!v,e?.(o,this),v?Dy(s.onRest,o):l.onStart?.(o,this)}))}v&&this._set(_),g?n(rx(t.to,t,this._state,this)):C?this._start():hx(this)&&!h?this._pendingCalls.add(n):n(tx(_))}_focus(e){let t=this.animation;e!==t.to&&(X_(this)&&this._detach(),t.to=e,X_(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;q_(t)&&(ty(t,this),ax(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;q_(e)&&ny(e,this)}_set(e,t=!0){let n=Y_(e);if(!Qv.und(n)){let e=xy(this);if(!e||!Jv(n,e.getValue())){let o=Py(n);e&&e.constructor==o?e.setValue(n):Sy(this,o.create(n)),e&&Pv.batchedUpdates((()=>{this._onChange(n,t)}))}}return xy(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,wx(this,"onStart",nx(this,kx(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Dy(this.animation.onChange,e,this)),Dy(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;xy(this).reset(Y_(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),hx(this)||(mx(this,!0),gx(this)||this._resume())}_resume(){Yv.skipAnimation?this.finish():f_.start(this)}_stop(e,t){if(hx(this)){mx(this,!1);let n=this.animation;e_(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Q_(this,{type:"idle",parent:this});let o=t?ox(this.get()):nx(this.get(),kx(this,e??n.to));s_(this._pendingCalls,o),n.changed&&(n.changed=!1,wx(this,"onRest",o,this))}}};function kx(e,t){let n=Wy(t);return Jv(Wy(e.get()),n)}function vx(e,t=e.loop,n=e.to){let o=Dy(t);if(o){let r=!0!==o&&$y(o),i=(r||e).reverse,s=!r||r.reset;return _x({...e,loop:t,default:!1,pause:void 0,to:!i||Ky(n)?n:void 0,from:s?e.from:void 0,reset:s,...r})}}function _x(e){let{to:t,from:n}=e=$y(e),o=new Set;return Qv.obj(t)&&yx(t,o),Qv.obj(n)&&yx(n,o),e.keys=o.size?Array.from(o):null,e}function yx(e,t){t_(e,((e,n)=>null!=e&&t.add(n)))}var xx=["onStart","onRest","onChange","onPause","onResume"];function Sx(e,t,n){e.animation[n]=t[n]!==Vy(t,n)?zy(t[n],e.key):void 0}function wx(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Cx=["onStart","onChange","onRest"],Bx=1,Ix=class{id=Bx++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Qv.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(_x(e)),this}start(e){let{queue:t}=this;return e?t=n_(e).map(_x):this.queue=[],this._flush?this._flush(this,t):(Px(this,t),jx(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;e_(n_(t),(t=>n[t].stop(!!e)))}else ix(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Qv.und(e))this.start({pause:!0});else{let t=this.springs;e_(n_(e),(e=>t[e].pause()))}return this}resume(e){if(Qv.und(e))this.start({pause:!1});else{let t=this.springs;e_(n_(e),(e=>t[e].resume()))}return this}each(e){t_(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,o_(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&o_(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,o_(n,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Pv.onFrame(this._onFrame)}};function jx(e,t){return Promise.all(t.map((t=>Ex(e,t)))).then((t=>ex(e,t)))}async function Ex(e,t,n){let{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=Qv.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);let u=Qv.arr(r)||Qv.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):e_(Cx,(n=>{let o=t[n];if(Qv.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,s_(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),h=!0===t.cancel||!0===Vy(t,"cancel");(u||h&&d.asyncId)&&p.push(Jy(++e._lastAsyncId,{props:t,state:d,actions:{pause:Xv,resume:Xv,start(t,n){h?(ix(d,e._lastAsyncId),n(ox(e))):(t.onRest=l,n(rx(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=ex(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){let n=vx(t,s,r);if(n)return Px(e,[n]),Ex(e,n,!0)}return a&&Pv.batchedUpdates((()=>a(g,e,e.item))),g}function Tx(e,t){let n=new bx;return n.key=e,t&&ty(n,t),n}function Mx(e,t,n){t.keys&&e_(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Px(e,t){e_(t,(t=>{Mx(e.springs,t,(t=>Tx(t,e)))}))}var Rx=({children:e,...t})=>{let n=(0,ic.useContext)(Ax),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,ic.useState)((()=>({inputs:t,result:e()}))),o=(0,ic.useRef)(),r=o.current,i=r;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()}):i=n,(0,ic.useEffect)((()=>{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:i}=Ax;return ic.createElement(i,{value:t},e)},Ax=function(e,t){return Object.assign(e,ic.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Rx,{});Rx.Provider=Ax.Provider,Rx.Consumer=Ax.Consumer;var Nx=class extends ux{constructor(e,t){super(),this.source=e,this.calc=z_(...t);let n=this._get(),o=Py(n);Sy(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Jv(t,this.get())||(xy(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Dx(this._active)&&Ox(this)}_get(){let e=Qv.arr(this.source)?this.source.map(Y_):n_(Y_(this.source));return this.calc(...e)}_start(){this.idle&&!Dx(this._active)&&(this.idle=!1,e_(wy(this),(e=>{e.done=!1})),Yv.skipAnimation?(Pv.batchedUpdates((()=>this.advance())),Ox(this)):f_.start(this))}_attach(){let e=1;e_(n_(this.source),(t=>{q_(t)&&ty(t,this),ax(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){e_(n_(this.source),(e=>{q_(e)&&ny(e,this)})),this._active.clear(),Ox(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=n_(this.source).reduce(((e,t)=>Math.max(e,(ax(t)?t.priority:0)+1)),0))}};function Lx(e){return!1!==e.idle}function Dx(e){return!e.size||Array.from(e).every(Lx)}function Ox(e){e.idle||(e.idle=!0,e_(wy(e),(e=>{e.done=!0})),Q_(e,{type:"idle",parent:e}))}Yv.assign({createStringInterpolator:hy,to:(e,t)=>new Nx(e,t)});f_.advance;const zx=window.ReactDOM;var Vx=/^--/;function Fx(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Vx.test(e)||Ux.hasOwnProperty(e)&&Ux[e]?(""+t).trim():t+"px"}var Hx={};var Ux={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gx=["Webkit","Ms","Moz","O"];Ux=Object.keys(Ux).reduce(((e,t)=>(Gx.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Ux);var $x=/^(matrix|translate|scale|rotate|skew)/,Wx=/^(translate)/,Kx=/^(rotate|skew)/,Zx=(e,t)=>Qv.num(e)&&0!==e?e+t:e,qx=(e,t)=>Qv.arr(e)?e.every((e=>qx(e,t))):Qv.num(e)?e===t:parseFloat(e)===t,Yx=class extends Ey{constructor({x:e,y:t,z:n,...o}){let r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Zx(e,"px"))).join(",")})`,qx(e,0)]))),t_(o,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if($x.test(t)){if(delete o[t],Qv.und(e))return;let n=Wx.test(t)?"px":Kx.test(t)?"deg":"";r.push(n_(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Zx(r,n)})`,qx(r,0)]:e=>[`${t}(${e.map((e=>Zx(e,n))).join(",")})`,qx(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new Xx(r,i)),super(o)}},Xx=class extends J_{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return e_(this.inputs,((n,o)=>{let r=Y_(n[0]),[i,s]=this.transforms[o](Qv.arr(r)?r:n.map(Y_));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&e_(this.inputs,(e=>e_(e,(e=>q_(e)&&ty(e,this)))))}observerRemoved(e){0==e&&e_(this.inputs,(e=>e_(e,(e=>q_(e)&&ny(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Q_(this,e)}};Yv.assign({batchedUpdates:zx.unstable_batchedUpdates,createStringInterpolator:hy,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Qx=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ey(e),getComponentProps:o=e=>e}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{let t=Ly(e)||"Anonymous";return(e=Qv.str(e)?i[e]||(i[e]=Ry(e,r)):e[Ny]||(e[Ny]=Ry(e,r))).displayName=`Animated(${t})`,e};return t_(e,((t,n)=>{Qv.arr(e)&&(n=Ly(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:i,scrollLeft:s,viewBox:l,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Hx[t]||(Hx[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=Fx(t,o[t]);Vx.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Yx(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Jx=Qx.animated;function eS(e){return{top:e.offsetTop,left:e.offsetLeft}}var tS=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,h.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:a,isDraggingBlocks:c}=(0,g.useSelect)(ji),{previous:u,prevRect:d}=(0,h.useMemo)((()=>({previous:n.current&&eS(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,h.useLayoutEffect)((()=>{if(!u||!n.current)return;const e=(0,Ga.getScrollContainer)(n.current),p=i(t),h=p||s(t),g=c();function m(){if(!g&&h&&d){const t=n.current.getBoundingClientRect().top-d.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const f=p||l(t)||a(t);if(f&&g)return;const b=f?"1":"",k=new Ix({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=b,m()}});n.current.style.transform=void 0;const v=eS(n.current),_=Math.round(u.left-v.left),y=Math.round(u.top-v.top);return k.start({x:0,y:0,from:{x:_,y}}),()=>{k.stop(),k.set({x:0,y:0})}}),[u,d,t,o,r,i,s,l,a,c]),n};function nS({clientId:e,initialPosition:t}){const n=(0,h.useRef)(),{isBlockSelected:o,isMultiSelecting:r,isZoomOut:i}=G((0,g.useSelect)(ji));return(0,h.useEffect)((()=>{if(!o(e)||r()||i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if(Wm(n.current,s.activeElement))return;const l=Ga.focus.tabbable.find(n.current).filter((e=>(0,Ga.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if(Wm(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=Ga.focus.tabbable.findNext(n.current);if(e&&Wm(n.current,e)&&(0,Ga.isFormElement)(e))return void e.focus()}(0,Ga.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function oS(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered","mouseover"===e.type))}function rS(e){const{isBlockSelected:t}=(0,g.useSelect)(ji),{selectBlock:n,selectionChange:o}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):Wm(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}function iS(e){return!e||"transparent"===e||"rgba(0, 0, 0, 0)"===e}function sS({clientId:e,isSelected:t}){const{getBlockRootClientId:n,isZoomOut:o,hasMultiSelection:r}=G((0,g.useSelect)(ji)),{insertAfterBlock:i,removeBlock:s,resetZoomLevel:l,startDraggingBlocks:a,stopDraggingBlocks:c}=G((0,g.useDispatch)(ji));return(0,m.useRefEffect)((u=>{if(t)return u.addEventListener("keydown",d),u.addEventListener("dragstart",p),()=>{u.removeEventListener("keydown",d),u.removeEventListener("dragstart",p)};function d(t){const{keyCode:n,target:r}=t;n!==Wa.ENTER&&n!==Wa.BACKSPACE&&n!==Wa.DELETE||r!==u||(0,Ga.isTextField)(r)||(t.preventDefault(),n===Wa.ENTER&&o()?l():n===Wa.ENTER?i(e):s(e))}function p(t){if(u!==t.target||u.isContentEditable||u.ownerDocument.activeElement!==u||r())return void t.preventDefault();const o=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:n(e)});t.dataTransfer.effectAllowed="move",t.dataTransfer.clearData(),t.dataTransfer.setData("wp-blocks",o);const{ownerDocument:i}=u,{defaultView:s}=i;s.getSelection().removeAllRanges();const l=i.createElement("div");l.style.width="1px",l.style.height="1px",l.style.position="fixed",l.style.visibility="hidden",i.body.appendChild(l),t.dataTransfer.setDragImage(l,0,0);const d=u.getBoundingClientRect(),p=u.cloneNode(!0);p.style.visibility="hidden",p.style.display="none";const h=u.id;u.id=null;let g=1;{let e=u;for(;e=e.parentElement;){const{scale:t}=s.getComputedStyle(e);if(t&&"none"!==t){g=parseFloat(t);break}}}const m=1/g;u.after(p);const f={};for(const e of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])f[e]=u.style[e];const b=s.scrollY,k=s.scrollX,v=t.clientX,_=t.clientY;u.style.position="relative",u.style.top="0px",u.style.left="0px";const y=t.clientX-d.left,x=t.clientY-d.top,S=d.height>200?200/d.height:1;if(u.style.zIndex="1000",u.style.transformOrigin=`${y*m}px ${x*m}px`,u.style.transition="transform 0.2s ease-out",u.style.transform=`scale(${S})`,u.style.opacity="0.9",iS(s.getComputedStyle(u).backgroundColor)){let e="transparent",t=u;for(;t=t.parentElement;){const{backgroundColor:n}=s.getComputedStyle(t);if(!iS(n)){e=n;break}}u.style.backgroundColor=e}let w=!1;function C(e){w||(w=!0,u.style.pointerEvents="none");const t=s.scrollY,n=s.scrollX;u.style.top=(e.clientY-_+t-b)*m+"px",u.style.left=(e.clientX-v+n-k)*m+"px"}function B(){i.removeEventListener("dragover",C),i.removeEventListener("dragend",B),i.removeEventListener("drop",B),i.removeEventListener("scroll",C);for(const[e,t]of Object.entries(f))u.style[e]=t;p.remove(),u.id=h,l.remove(),c(),document.body.classList.remove("is-dragging-components-draggable"),i.documentElement.classList.remove("is-dragging")}i.addEventListener("dragover",C),i.addEventListener("dragend",B),i.addEventListener("drop",B),i.addEventListener("scroll",C),a([e]),document.body.classList.add("is-dragging-components-draggable"),i.documentElement.classList.add("is-dragging")}}),[e,t,n,i,s,o,l,r,a,c])}function lS(){const e=(0,h.useContext)(sw);return(0,m.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function aS({isSelected:e}){const t=(0,m.useReducedMotion)();return(0,m.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function cS({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=G((0,g.useSelect)(ji));return(0,m.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const uS=new Map;function dS(e){const t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),"true"!==t||e.getAttribute("draggable")||e.setAttribute("draggable","true"))}function pS(e){const{target:t}=e,{ownerDocument:n,isContentEditable:o,tagName:r}=t,i=["INPUT","TEXTAREA"].includes(r),s=uS.get(n);if(o||i)for(const e of s)"true"===e.getAttribute("draggable")&&e.contains(t)&&(e.removeAttribute("draggable"),e.setAttribute("data-draggable","true"));else for(const e of s)dS(e)}function hS(){return(0,m.useRefEffect)((e=>(function(e,t){let n=uS.get(e);n||(n=new Set,uS.set(e,n),e.addEventListener("pointerdown",pS)),n.add(t)}(e.ownerDocument,e),()=>{!function(e,t){const n=uS.get(e);n&&(n.delete(t),dS(t),0===n.size&&(uS.delete(e),e.removeEventListener("pointerdown",pS)))}(e.ownerDocument,e)})),[])}function gS(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:a,blockApiVersion:c,blockTitle:u,isSelected:d,isSubtreeDisabled:p,hasOverlay:g,initialPosition:f,blockEditingMode:b,isHighlighted:k,isMultiSelected:v,isPartiallySelected:y,isReusable:x,isDragging:S,hasChildSelected:w,isEditingDisabled:B,hasEditableOutline:I,isTemporarilyEditingAsBlocks:j,defaultClassName:E,isSectionBlock:M,canMove:P,isBlockHidden:R}=(0,h.useContext)(pv),A=(0,T.sprintf)((0,T.__)("Block: %s"),u),N="html"!==l||t?"":"-visual",L=hS(),D=(0,m.useMergeRefs)([e.ref,nS({clientId:n,initialPosition:f}),gh(n),rS(n),sS({clientId:n,isSelected:d}),(0,m.useRefEffect)((e=>(e.addEventListener("mouseout",oS),e.addEventListener("mouseover",oS),()=>{e.removeEventListener("mouseout",oS),e.removeEventListener("mouseover",oS),e.classList.remove("is-hovered")})),[]),lS(),tS({triggerAnimationOnChange:s,clientId:n}),(0,m.useDisabled)({isDisabled:!g}),cS({clientId:n,isEnabled:M}),aS({isSelected:d}),P?L:void 0]),O=C(),z=!!O[_]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};c<2&&n===O.clientId&&js()(`Block type "${a}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let V=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(V=!0),{tabIndex:"disabled"===b?-1:0,draggable:!(!P||w)||void 0,...r,...e,ref:D,id:`block-${n}${N}`,role:"document","aria-label":A,"data-block":n,"data-type":a,"data-title":u,inert:p?"true":void 0,className:ms("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":g,"is-selected":d,"is-highlighted":k,"is-multi-selected":v,"is-partially-selected":y,"is-reusable":x,"is-dragging":S,"has-child-selected":w,"is-editing-disabled":B,"has-editable-outline":I,"has-negative-margin":V,"is-content-locked-temporarily-editing-as-blocks":j,"is-block-hidden":R},o,e.className,r.className,E),style:{...r.style,...e.style,...z}}}function mS({children:e,isHtml:t,...n}){return(0,d.jsx)("div",{...gS(n,{__unstableIsHtml:t}),children:e})}function fS({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:l,__unstableLayoutClassNames:a,name:c,isValid:u,attributes:g,wrapperProps:m,setAttributes:f,onReplace:b,onRemove:k,onInsertBlocksAfter:v,onMerge:_,toggleSelection:y}){const{mayDisplayControls:x,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,h.useContext)(pv),B=ta()||{};let I=(0,d.jsx)(vv,{name:c,isSelected:i,attributes:g,setAttributes:f,insertBlocksAfter:n?void 0:v,onReplace:o?b:void 0,onRemove:o?k:void 0,mergeBlocks:o?_:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:y,__unstableLayoutClassNames:a,__unstableParentLayout:Object.keys(B).length?B:void 0,mayDisplayControls:x,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const j=(0,p.getBlockType)(c);j?.getEditWrapperProps&&(m=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=ms(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(m,j.getEditWrapperProps(g)));const E=m&&!!m["data-align"]&&!w,T=l?.includes("is-position-sticky");let M;if(E&&(I=(0,d.jsx)("div",{className:ms("wp-block",T&&l),"data-align":m["data-align"],children:I})),u)M="html"===t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{display:"none"},children:I}),(0,d.jsx)(mS,{isHtml:!0,children:(0,d.jsx)(Tv,{clientId:r})})]}):j?.apiVersion>1?I:(0,d.jsx)(mS,{children:I});else{const t=e?(0,p.serializeRawBlock)(e):(0,p.getSaveContent)(j,g);M=(0,d.jsxs)(mS,{className:"has-warning",children:[(0,d.jsx)(wv,{clientId:r}),(0,d.jsx)(h.RawHTML,{children:(0,Ga.safeHTML)(t)})]})}const{"data-align":P,...R}=m??{},A={...R,className:ms(R.className,P&&w&&`align${P}`,!(P&&T)&&l)};return(0,d.jsx)(pv.Provider,{value:{wrapperProps:A,isAligned:E,...C},children:(0,d.jsx)(jv,{fallback:(0,d.jsx)(mS,{className:"has-warning",children:(0,d.jsx)(Bv,{})}),children:M})})}gS.save=p.__unstableGetBlockProps;const bS=(0,g.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:l,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:c,removeBlock:u,selectBlock:d}=e(ji);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(ji),i=r(),{clientId:s,attributes:l}=t,a=i.length?i:[s],c="function"==typeof e?e(l):e;o(a,c)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(ji),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:l}=t,{getPreviousBlockClientId:a,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(ji);function y(){const e=g(o),t=(0,p.getDefaultBlockName)(),r=(0,p.getBlockType)(t);if(f(o)!==t){const n=(0,p.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,p.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{u(o),d(e)}))}else if(r.merge){const n=r.merge({},e.attributes);s([o],[(0,p.createBlock)(t,n)])}}function x(e,t=!0){const o=f(e),i="text"===(0,p.getBlockType)(o).category,s=v(e),l=b(e),[a]=l;1===l.length&&(0,p.isUnmodifiedBlock)(g(a))?u(e):i?n.batch((()=>{if(_(f(a),s))c([a],e,s,k(e));else{const n=(0,p.switchToBlockType)(g(a),(0,p.getDefaultBlockName)());n&&n.length&&n.every((e=>_(e.name,s)))?(r(n,k(e),s,t),u(a,!1)):y()}!b(e).length&&(0,p.isUnmodifiedBlock)(g(e))&&u(e,!1)})):y()}if(e){if(l){const e=h(l);if(e){if(f(l)!==f(e))return void i(l,e);{const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(e),e,l),u(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?x(e,!1):i(o,e)}else{const e=a(o);if(e)i(e,o);else if(l){const e=a(l);if(e&&f(l)===f(e)){const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(l),l,e),u(l,!1)}))}x(l)}else y()}},onReplace(e,n,o){e.length&&!(0,p.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},onRemove(){u(t.clientId)},toggleSelection(e){l(e)}}}));fS=(0,m.compose)(bS,(0,ws.withFilters)("editor.BlockListBlock"))(fS);var kS=(0,h.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,g.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,isSectionBlock:l,getBlockWithoutAttributes:a,getBlockAttributes:c,canRemoveBlock:u,canMoveBlock:d,getSettings:h,getTemporarilyEditingAsBlocks:g,getBlockEditingMode:m,getBlockName:f,isFirstMultiSelectedBlock:b,getMultiSelectedBlockClientIds:k,hasSelectedInnerBlock:v,getBlocksByName:_,getBlockIndex:y,isBlockMultiSelected:x,isBlockSubtreeDisabled:S,isBlockHighlighted:w,__unstableIsFullySelected:C,__unstableSelectionHasUnmergeableBlock:B,isBlockBeingDragged:I,isDragging:j,__unstableHasActiveBlockOverlayActive:E,getSelectedBlocksInitialCaretPosition:T}=G(e(ji)),M=a(t);if(!M)return;const{hasBlockSupport:P,getActiveBlockVariation:R}=e(p.store),A=c(t),{name:N,isValid:L}=M,D=(0,p.getBlockType)(N),{supportsLayout:O,isPreviewMode:z,__experimentalBlockBindingsSupportedAttributes:V}=h(),F=V?.[N],H=D?.apiVersion>1,U={isPreviewMode:z,blockWithoutAttributes:M,name:N,attributes:A,isValid:L,themeSupportsLayout:O,index:y(t),isReusable:(0,p.isReusableBlock)(D),className:H?A.className:void 0,defaultClassName:H?(0,p.getBlockDefaultClassName)(N):void 0,blockTitle:D?.title,isBlockHidden:!1===A?.metadata?.blockVisibility,bindableAttributes:F};if(z)return U;const{isBlockHidden:$}=G(e(ji)),W=o(t),K=u(t),Z=d(t),q=R(N,A),Y=x(t),X=v(t,!0),Q=m(t),J=(0,p.hasBlockSupport)(N,"multiple",!0)?[]:_(N),ee=J.length&&J[0]!==t;return{...U,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),isSectionBlock:l(t),canRemove:K,canMove:Z,isSelected:W,isTemporarilyEditingAsBlocks:g()===t,blockEditingMode:Q,mayDisplayControls:W||b(t)&&k().every((e=>f(e)===N)),mayDisplayParentControls:P(f(t),"__experimentalExposeControlsToChildren",!1)&&v(t),blockApiVersion:D?.apiVersion||1,blockTitle:q?.title||D?.title,isSubtreeDisabled:"disabled"===Q&&S(t),hasOverlay:E(t)&&!j(),initialPosition:W?T():void 0,isHighlighted:w(t),isMultiSelected:Y,isPartiallySelected:Y&&!C()&&!B(),isDragging:I(t),hasChildSelected:X,isEditingDisabled:"disabled"===Q,hasEditableOutline:"disabled"!==Q&&"disabled"===m(n),originalBlockClientId:!!ee&&J[0],isBlockHidden:$(t)}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:l=!1,canRemove:a=!1,canMove:c=!1,blockWithoutAttributes:u,name:m,attributes:f,isValid:b,isSelected:k=!1,themeSupportsLayout:v,isTemporarilyEditingAsBlocks:_,blockEditingMode:y,mayDisplayControls:x,mayDisplayParentControls:S,index:w,blockApiVersion:C,blockTitle:B,isSubtreeDisabled:I,hasOverlay:j,initialPosition:E,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:A,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:D,hasEditableOutline:O,className:z,defaultClassName:V,originalBlockClientId:F,isBlockHidden:H,bindableAttributes:U}=o,$=(0,h.useMemo)((()=>({...u,attributes:f})),[u,f]);if(!o)return null;const W={isPreviewMode:r,clientId:t,className:z,index:w,mode:i,name:m,blockApiVersion:C,blockTitle:B,isSelected:k,isSubtreeDisabled:I,hasOverlay:j,initialPosition:E,blockEditingMode:y,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:A,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:D,hasEditableOutline:O,isTemporarilyEditingAsBlocks:_,defaultClassName:V,mayDisplayControls:x,mayDisplayParentControls:S,originalBlockClientId:F,themeSupportsLayout:v,canMove:c,isBlockHidden:H,bindableAttributes:U};return!H||k||M||N?(0,d.jsx)(pv.Provider,{value:W,children:(0,d.jsx)(fS,{...e,mode:i,isSelectionEnabled:s,isLocked:l,canRemove:a,canMove:c,block:$,name:m,attributes:f,isValid:b,isSelected:k})}):null}));const vS=window.wp.htmlEntities,_S="\ufeff";function yS({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,g.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(ji),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,g.useDispatch)(ji);if(n||r)return null;const l=(0,vS.decodeEntities)(o)||(0,T.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,d.jsxs)("div",{"data-root-client-id":e||"",className:ms("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,d.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,T.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Wa.ENTER!==e.keyCode&&Wa.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:_S}),(0,d.jsx)(lI,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function xS({rootClientId:e}){return(0,g.useSelect)((t=>t(ji).canInsertBlockType((0,p.getDefaultBlockName)(),e)))?(0,d.jsx)(yS,{rootClientId:e}):(0,d.jsx)(uI,{rootClientId:e,className:"block-list-appender__toggle"})}function SS({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,g.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(ji),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,d.jsx)(o,{tabIndex:-1,className:ms("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,d.jsx)(t,{}):(0,d.jsx)(xS,{rootClientId:e})})}const wS=Number.MAX_SAFE_INTEGER;var CS=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[a,c]=(0,h.useReducer)((e=>(e+1)%wS),0),{orientation:u,rootClientId:p,isVisible:m}=(0,g.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(ji),s=r(e??t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),f=bh(e),b=bh(t),k="vertical"===u,v=(0,h.useMemo)((()=>{if(a<0||!f&&!b||!m)return;return{contextElement:"group"===i?b||f:f||b,getBoundingClientRect(){const e=f?f.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else k?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,T.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0),r=Math.max(r,0));return new window.DOMRect(n,o,r,l)}}}),[f,b,a,k,m,i,s]),_=Fm(r);return(0,h.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(c);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,h.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(c);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,h.useLayoutEffect)((()=>{if(f)return f.ownerDocument.defaultView.addEventListener("resize",c),()=>{f.ownerDocument.defaultView?.removeEventListener("resize",c)}}),[f]),(f||b)&&m?(0,d.jsx)(ws.Popover,{ref:_,animate:!1,anchor:v,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:ms("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,d.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+p):null};const BS={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var IS=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(ji),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,m.useReducedMotion)();return(0,d.jsx)(of,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,d.jsx)(ws.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?BS.show:BS.hide,animate:BS.show,exit:o?BS.show:BS.exit,className:"block-editor-block-popover__drop-zone-foreground"})})};const jS=(0,h.createContext)();function ES({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,g.useDispatch)(ji),s=(0,h.useContext)(jS),l=(0,h.useRef)(),{orientation:a,previousClientId:c,nextClientId:u,rootClientId:p,isInserterShown:f,isDistractionFree:b,isZoomOutMode:k}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isZoomOut:a}=G(e(ji)),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=i(d);for(;r(p);)p=s(p);const h=l();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isDistractionFree:h.isDistractionFree,isInserterShown:c?.__unstableWithInserter,isZoomOutMode:a()}}),[]),{getBlockEditingMode:v}=(0,g.useSelect)(ji),_=(0,m.useReducedMotion)();const y=(0,h.useCallback)((e=>{!e&&s.current&&(s.current=!1)}),[s]),x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:f?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},S={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(b)return null;if(k&&"insert"!==n)return null;const w=ms("block-editor-block-list__insertion-point","horizontal"===a||"group"===n?"is-horizontal":"is-vertical");return(0,d.jsx)(CS,{previousClientId:c,nextClientId:u,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,d.jsxs)(ws.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&u&&"disabled"!==v(u)&&r(u,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:ms(w,{"is-with-inserter":f}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,d.jsx)(ws.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),f&&(0,d.jsx)(ws.__unstableMotion.div,{variants:S,className:ms("block-editor-block-list__insertion-point-inserter"),children:(0,d.jsx)(lI,{ref:y,position:"bottom center",clientId:u,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function TS(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,g.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(ji),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,d.jsx)(IS,{...e},`${t.rootClientId}-${t.index}`):(0,d.jsx)(ES,{operation:t.operation,nearestSide:t.nearestSide,...e})}function MS(){const e=(0,h.useContext)(jS),t=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree||G(e(ji)).isZoomOut()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:a,getBlockEditingMode:c,getBlockName:u,getBlockAttributes:d,getParentSectionBlock:p}=G((0,g.useSelect)(ji)),{showInsertionPoint:f,hideInsertionPoint:b}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((h=>{if(!t)return h.addEventListener("mousemove",g),()=>{h.removeEventListener("mousemove",g)};function g(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void b();let h;if(!t.target.classList.contains("is-root-container")){h=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(l(h)||"disabled"===c(h)||"core/block"===u(h)||h&&d(h).layout?.isManualPlacement)return;const g=n(h),m=g?.orientation||"vertical",k=!!g?.__experimentalCaptureToolbars,v=t.clientY,_=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===m&&t.top>v||e.classList.contains("wp-block")&&"horizontal"===m&&((0,T.isRTL)()?t.right<_:t.left>_)}));if(!y)return void b();if(!y.id&&(y=y.firstElementChild,!y))return void b();const x=y.id.slice(6);if(!x||a(x)||p(x))return;if(i().includes(x)&&"vertical"===m&&!k&&!s().hasFixedToolbar)return;const S=y.getBoundingClientRect();if("horizontal"===m&&(t.clientY>S.bottom||t.clientY<S.top)||"vertical"===m&&(t.clientX>S.right||t.clientX<S.left))return void b();const w=o(x);0!==w?f(h,w,{__unstableWithInserter:!0}):b()}}),[e,n,o,r,f,b,i,t])}function PS(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,g.useSelect)(ji),{clearSelectedBlock:o}=(0,g.useDispatch)(ji),{clearBlockSelection:r}=e();return(0,m.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function RS(e){return(0,d.jsx)("div",{ref:PS(),...e})}jS.displayName="InsertionPointOpenRefContext";const AS=new WeakMap;function NS(){let e;return t=>(void 0!==e&&Ja()(e,t)||(e=t),e)}function LS(e){const[t]=(0,h.useState)(NS);return t(e)}function DS(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}function OS(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:l,getBlockOrder:a,getBlocksByClientId:c,getSettings:u,getBlock:d}=(0,g.useSelect)(ji),{getGroupingBlockName:m}=(0,g.useSelect)(p.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:y}=(0,g.useDispatch)(ji),x=(0,g.useRegistry)(),S=(0,h.useCallback)(((n,s=!0,l=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=a(e)[t];if("replace"===o)_(u,n,void 0,l);else if("group"===o){const t=d(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,p.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),a=i("core/gallery",e),h=(0,p.createBlock)(s&&a?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&a?null:"nowrap"}},o);_([u,...c],h,void 0,l)}else f(n,t,e,s,l)}),[a,e,t,o,_,d,r,i,m,f]),w=(0,h.useCallback)(((n,r,i)=>{if("replace"===o){const o=c(n),r=a(e)[t];x.batch((()=>{y(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,a,c,b,x,y,_,t,e]),C=function(e,t,n,o,r,i,s,l,a){return c=>{const{srcRootClientId:u,srcClientIds:d,type:h,blocks:g}=DS(c);if("inserter"===h){s();const e=g.map((e=>(0,p.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(d[0]);if(u===e&&s===t)return;if(d.includes(e)||o(d).some((t=>t===e)))return;if("group"===l){const e=d.map((e=>a(e)));return void i(e,!0,null,d)}const c=u===e,p=d.length;r(d,u,c&&s<t?t-p:t)}}}(e,t,s,l,w,S,v,o,d),B=function(e,t,n,o,r){return i=>{if(!t().mediaUpload)return;const s=(0,p.findTransform)((0,p.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,u,k,i,S),I=function(e){return t=>{const n=(0,p.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,Ga.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function zS(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s<c?a:c,Math.sqrt((s-d)**2+(l-u)**2)}(e,t,n);(void 0===o||i<o)&&(o=i,r=n)})),[o,r]}function VS(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const FS=30,HS=120,US=120;function GS(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function $S(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}function WS({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,g.useRegistry)(),[i,s]=(0,h.useState)({index:null,operation:"insert"}),{getBlockType:l,getBlockVariations:a,getGroupingBlockName:c}=(0,g.useSelect)(p.store),{canInsertBlockType:u,getBlockListSettings:d,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:y,isGroupable:x,isZoomOut:S,getSectionRootClientId:w,getBlockParents:C}=G((0,g.useSelect)(ji)),{showInsertionPoint:B,hideInsertionPoint:I,startDragging:j,stopDragging:E}=G((0,g.useDispatch)(ji)),M=OS("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),P=(0,m.useThrottle)((0,h.useCallback)(((o,i)=>{y()||j();const h=k(),g=[t,...C(t,!0)];if(h.some((e=>g.includes(e))))return;const m=_(t),I=v([t])[0],E=v(h);if(!GS(l,m,E,I))return;const M=w();if(S()&&M!==t)return;const P=f(t).filter((e=>!((0,p.hasBlockSupport)(e.name,"blockVisibility",!0)&&!1===e.attributes?.metadata?.blockVisibility)));if(0===P.length)return void r.batch((()=>{s({index:0,operation:"insert"}),B(t,0,{operation:"insert"})}));const R=P.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,p.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>{const e=i.getElementById(`block-${t}`);return e?e.getBoundingClientRect():null},blockIndex:b(t),blockOrientation:d(t)?.orientation}})),A=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=zS(t,e,["top","bottom"]);if(e.height>HS&&n<FS){if("top"===o)return[p,"before"];if("bottom"===o)return[p+1,"after"]}}const h=(0,T.isRTL)();if(u&&"horizontal"===d){const e=u.getBoundingClientRect(),[n,o]=zS(t,e,["left","right"]);if(e.width>US&&n<FS){if(h&&"right"===o||!h&&"left"===o)return[p,"before"];if(h&&"left"===o||!h&&"right"===o)return[p+1,"after"]}}e.forEach((({isUnmodifiedDefaultBlock:e,getBoundingClientRect:o,blockIndex:u,blockOrientation:d})=>{const p=o();if(!p)return;let[g,m]=zS(t,p,r);const[f,b]=zS(t,p,["left","right"]),k=VS(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f<FS||!k&&function(e,t){return t.top<=e.y&&t.bottom>=e.y}(t,p))&&(a=u,c=b),g<l&&(s="bottom"===m||!h&&"right"===m||h&&"left"===m?"after":"before",l=g,i=u)}));const g=i+("after"===s?1:-1),m=!!e[i]?.isUnmodifiedDefaultBlock,f=!!e[g]?.isUnmodifiedDefaultBlock;if(null!==a)return[a,"group",c];if(!m&&!f)return["after"===s?i+1:i,"insert"];return[m?i:g,"replace"]}(R,{x:o.clientX,y:o.clientY},d(t)?.orientation,{dropZoneElement:e,parentBlockClientId:n,parentBlockOrientation:n?d(n)?.orientation:void 0,rootBlockIndex:b(t)}),[N,L,D]=A,O=R[N]?.isUnmodifiedDefaultBlock;if(!S()||O||"insert"===L){if("group"===L){const e=P[N],n=[e.name,...E].every((e=>"core/image"===e)),o=u("core/gallery",t),r=x([e.clientId,k()]),i=a(c(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:N,operation:L,nearestSide:D});const e=["before","after"].includes(L)?n:t;B(e,N,{operation:L,nearestSide:D})}))}}),[y,_,t,v,k,l,w,S,f,d,e,n,b,r,j,B,u,x,a,c]),200);return(0,m.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:M,onDragOver(e){P(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;$S(e.relatedTarget,t)||$S(e.target,t)||(P.cancel(),I())},onDragEnd(){P.cancel(),E(),I()}})}const KS={};function ZS({children:e,clientId:t}){const n=function(e){return(0,g.useSelect)((t=>{const n=t(ji).getBlock(e);if(!n)return;const o=t(p.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,d.jsx)(iv,{value:n,children:e})}const qS=(0,h.memo)(mw);function YS(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:l,template:a,templateLock:c,wrapperRef:u,templateInsertUpdatesSelection:m,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:b,renderAppender:k,orientation:v,placeholder:_,layout:y,name:x,blockType:S,parentLock:w,defaultLayout:C}=e;!function(e,t,n,o,r,i,s,l,a,c,u,d){const p=(0,g.useRegistry)(),m=LS(n),f=LS(o),b=void 0===a||"contentOnly"===t?t:a;(0,h.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==c&&(t.__experimentalCaptureToolbars=c),void 0!==u)t.orientation=u;else{const e=Xl(d?.type);t.orientation=e.getOrientation(d)}void 0!==s&&(I()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(I()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&I()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),AS.get(p)||AS.set(p,{}),AS.get(p)[e]=t,window.queueMicrotask((()=>{const e=AS.get(p);if(Object.keys(e).length){const{updateBlockListSettings:t}=p.dispatch(ji);t(e),AS.set(p,{})}}))}),[e,m,f,b,r,i,s,l,c,u,d,p])}(t,w,n,o,r,i,s,l,c,f,v,y),function(e,t,n,o){const r=(0,g.useRegistry)(),i=(0,h.useRef)(null);(0,h.useLayoutEffect)((()=>{let s=!1;const{getBlocks:l,getSelectedBlocksInitialCaretPosition:a,isBlockSelected:c}=r.select(ji),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=r.dispatch(ji);return window.queueMicrotask((()=>{if(s)return;const r=l(e),h=0===r.length||"all"===n||"contentOnly"===n,g=!E()(t,i.current);if(!h||!g)return;i.current=t;const m=(0,p.synchronizeBlocksWithTemplate)(r,t);E()(m,r)||(d(),u(e,m,0===r.length&&o&&0!==m.length&&c(e),a()))})),()=>{s=!0}}),[t,n,e,r,o])}(t,a,c,m);const B=(0,p.getBlockSupport)(x,"layout")||(0,p.getBlockSupport)(x,"__experimentalLayout")||KS,{allowSizingOnChildren:j=!1}=B,T=y||B,M=(0,h.useMemo)((()=>({...C,...T,...j&&{allowSizingOnChildren:!0}})),[C,T,j]),P=(0,d.jsx)(qS,{rootClientId:t,renderAppender:k,__experimentalAppenderTagName:b,layout:M,wrapperRef:u,placeholder:_});return S?.providesContext&&0!==Object.keys(S.providesContext).length?(0,d.jsx)(ZS,{clientId:t,children:P}):P}function XS(e){return qk(e),(0,d.jsx)(YS,{...e})}const QS=(0,h.forwardRef)(((e,t)=>{const n=JS({ref:t},e);return(0,d.jsx)("div",{className:"block-editor-inner-blocks",children:(0,d.jsx)("div",{...n})})}));function JS(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:l=""}=C(),a=(0,g.useSelect)((e=>{const{getBlockName:t,isZoomOut:n,getTemplateLock:o,getBlockRootClientId:r,getBlockEditingMode:s,getBlockSettings:l,getSectionRootClientId:a}=G(e(ji));if(!i){const e=a();return{isDropZoneDisabled:n()&&""!==e}}const{hasBlockSupport:c,getBlockType:u}=e(p.store),d=t(i),h=s(i),g=r(i),[m]=l(i,"layout");let f="disabled"===h;if(n()){const e=a();f=i!==e}return{__experimentalCaptureToolbars:c(d,"__experimentalExposeControlsToChildren",!1),name:d,blockType:u(d),parentLock:o(g),parentClientId:g,isDropZoneDisabled:f,defaultLayout:m}}),[i]),{__experimentalCaptureToolbars:c,name:u,blockType:h,parentLock:f,parentClientId:b,isDropZoneDisabled:k,defaultLayout:v}=a,_=WS({dropZoneElement:r,rootClientId:i,parentClientId:b}),y=(0,m.useMergeRefs)([e.ref,o||k||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:_]),x={__experimentalCaptureToolbars:c,layout:s,name:u,blockType:h,parentLock:f,defaultLayout:v,...t},S=x.value&&x.onChange?XS:YS;return{...e,ref:y,className:ms(e.className,"block-editor-block-list__layout",n?"":l),children:i?(0,d.jsx)(S,{...x,clientId:i}):(0,d.jsx)(mw,{...t})}}JS.save=p.__unstableGetInnerBlocksProps,QS.DefaultBlockAppender=function(){const{clientId:e}=C();return(0,d.jsx)(yS,{rootClientId:e})},QS.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=C();return(0,d.jsx)(uI,{className:ms({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},QS.Content=()=>JS.save().children;var ew=QS;const tw=new Set([Wa.UP,Wa.RIGHT,Wa.DOWN,Wa.LEFT,Wa.ENTER,Wa.BACKSPACE]);function nw(){const e=(0,g.useSelect)((e=>e(ji).isTyping()),[]),{stopTyping:t}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function ow(){const{isTyping:e}=(0,g.useSelect)((e=>{const{isTyping:t}=e(ji);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,g.useDispatch)(ji),o=nw(),r=(0,m.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let e=function(e){const{target:t}=e;a=i.setTimeout((()=>{(0,Ga.isTextField)(t)||n()}))},t=function(e){const{keyCode:t}=e;t!==Wa.ESCAPE&&t!==Wa.TAB||n()},l=function(){s.isCollapsed||n()};let a;return o.addEventListener("focus",e),o.addEventListener("keydown",t),r.addEventListener("selectionchange",l),()=>{i.clearTimeout(a),o.removeEventListener("focus",e),o.removeEventListener("keydown",t),r.removeEventListener("selectionchange",l)}}function l(e){const{type:n,target:r}=e;(0,Ga.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&tw.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,m.useMergeRefs)([o,r])}var rw=function({children:e}){return(0,d.jsx)("div",{ref:ow(),children:e})};function iw({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,h.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:l,blockInsertionPointVisible:a,blockInsertionPoint:c,blocksBeingDragged:u}=(0,g.useSelect)((e=>{const{getInsertionPoint:t,getBlockOrder:n,getSectionRootClientId:o,isBlockInsertionPointVisible:r,getBlockInsertionPoint:i,getDraggedBlockClientIds:s}=G(e(ji)),l=o();return{sectionRootClientId:l,sectionClientIds:n(l),insertionPoint:t(),blockInsertionPoint:i(),blockInsertionPointVisible:r(),blocksBeingDragged:s()}}),[]),p=(0,m.useReducedMotion)();if(!e)return;let f=!1;if(!(t===i&&s&&s.includes(e)))return null;const b=0===l?.index&&e===s[l.index],k=l&&l.hasOwnProperty("index")&&e===s[l.index-1];"top"===n&&(f=b||a&&0===c.index&&e===s[c.index]),"bottom"===n&&(f=k||a&&e===s[c.index-1]);const v=u[0],_=u.includes(e),y=s.indexOf(v),x=y>0?s[y-1]:null;return(_||x===e)&&(f=!1),(0,d.jsx)(ws.__unstableAnimatePresence,{children:f&&(0,d.jsx)(ws.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:p?0:.2,ease:[.6,0,.4,1]},className:ms("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,d.jsx)(ws.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,T.__)("Drop pattern.")})})})}const sw=(0,h.createContext)();sw.displayName="IntersectionObserverContext";const lw=new WeakMap,aw={trailing:!0};function cw({className:e,...t}){const{isOutlineMode:n,isFocusMode:o,temporarilyEditingAsBlocks:r}=(0,g.useSelect)((e=>{const{getSettings:t,getTemporarilyEditingAsBlocks:n,isTyping:o,hasBlockSpotlight:r}=G(e(ji)),{outlineMode:i,focusMode:s}=t();return{isOutlineMode:i&&!o(),isFocusMode:s||r(),temporarilyEditingAsBlocks:n()}}),[]),i=(0,g.useRegistry)(),{setBlockVisibility:s}=(0,g.useDispatch)(ji),l=(0,m.useDebounce)((0,h.useCallback)((()=>{const e={};lw.get(i).forEach((([t,n])=>{e[t]=n})),s(e)}),[i]),300,aw),a=(0,h.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{lw.get(i)||lw.set(i,[]);for(const t of e){const e=t.target.getAttribute("data-block");lw.get(i).push([e,t.isIntersecting])}l()}))}),[]),c=JS({ref:(0,m.useMergeRefs)([PS(),MS(),ow()]),className:ms("is-root-container",e,{"is-outline-mode":n,"is-focus-mode":o})},t);return(0,d.jsxs)(sw.Provider,{value:a,children:[(0,d.jsx)("div",{...c}),!!r&&(0,d.jsx)(uw,{clientId:r})]})}function uw({clientId:e}){const{stopEditingAsBlocks:t}=G((0,g.useDispatch)(ji)),n=(0,g.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(ji);return n(e)||o(e,!0)}),[e]);return(0,h.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function dw(e){return(0,d.jsx)(w,{value:x,children:(0,d.jsx)(cw,{...e})})}const pw=[],hw=new Set;function gw({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Ql}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:c,visibleBlocks:u,shouldRenderAppender:h}=(0,g.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:l,getTemplateLock:a,getBlockEditingMode:c,isSectionBlock:u,isContainerInsertableToInContentOnlyMode:d,getBlockName:h,isZoomOut:g,canInsertBlockType:m}=G(e(ji)),f=o(t);if(n().isPreviewMode)return{order:f,selectedBlocks:pw,visibleBlocks:hw};const b=r(),k=b[0],v=!(t||k||f.length&&m((0,p.getDefaultBlockName)(),t)),_=!(!t||!k||t!==k);return{order:f,selectedBlocks:b,visibleBlocks:l(),isZoomOut:g(),shouldRenderAppender:(!u(t)||d(h(k),t))&&"disabled"!==c(t)&&!a(t)&&i&&!g()&&(s||_||v)}}),[t,i,s]);return(0,d.jsxs)(ea,{value:r,children:[l.map((e=>(0,d.jsxs)(g.AsyncModeProvider,{value:!u.has(e)&&!c.includes(e),children:[a&&(0,d.jsx)(iw,{clientId:e,rootClientId:t,position:"top"}),(0,d.jsx)(kS,{rootClientId:t,clientId:e}),a&&(0,d.jsx)(iw,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,h&&(0,d.jsx)(SS,{tagName:o,rootClientId:t,CustomAppender:n})]})}function mw(e){return(0,d.jsx)(g.AsyncModeProvider,{value:!1,children:(0,d.jsx)(gw,{...e})})}function fw(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(ji);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function bw(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,g.useSelect)(fw,[]);return(0,m.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function kw(e,t,n,o){let r,i=Ga.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&$m(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!Ga.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function vw(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,g.useSelect)(ji),{selectBlock:i}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===Wa.UP,f=c===Wa.DOWN,b=c===Wa.LEFT,k=c===Wa.RIGHT,v=m||b,_=b||k,y=m||f,x=_||y,S=d||p||h||g,w=y?Ga.isVerticalEdge:Ga.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!x)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===Wa.UP||t===Wa.DOWN,{tagName:r}=e,i=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i);return"TEXTAREA"!==r}(u,c,S))return;y?l||(l=(0,Ga.computeCaretRect)(B)):l=null;const I=(0,Ga.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=kw(e,t,s);return n&&Km(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!y||!(0,Ga.isVerticalEdge)(u,v)||h&&!(0,Ga.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,Ga.isHorizontalEdge)(u,I)&&!j){const e=kw(u,I,s);(0,Ga.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=kw(u,v,s,!0);e&&((0,Ga.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function _w(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,g.useSelect)(ji),{multiSelect:o,selectBlock:r}=(0,g.useDispatch)(ji),i=(0,Yk.__unstableUseShortcutEventMatch)();return(0,m.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,Ga.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function yw(e,t){e.contentEditable=t,t&&e.focus()}function xw(){const{startMultiSelect:e,stopMultiSelect:t}=(0,g.useDispatch)(ji),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u,d;function p(){t(),a.removeEventListener("mouseup",p),u=a.requestAnimationFrame((()=>{if(!o())return;yw(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function h({buttons:t,target:o,relatedTarget:l}){o.contains(d)&&(o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",p),yw(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",(function({target:e}){d=e})),()=>{s.removeEventListener("mouseout",h),a.removeEventListener("mouseup",p),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function Sw(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function ww(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function Cw(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,g.useDispatch)(ji),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:0===n&&(0,Ga.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[n]}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){Sw(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=Km(u),g=Km(d);if(p){const e=r(),t=Km(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0===h&&void 0===g)return void Sw(s,!1);if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=ww(u),l=ww(d);if(s&&l){const e=c.getRangeAt(0),t=(0,pe.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,pe.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=t.start??t.end,i=o.start??o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function Bw(){const{selectBlock:e}=(0,g.useDispatch)(ji),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=Km(i.target);i.shiftKey?s&&s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function Iw(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:l,getSelectionStart:a,getSelectionEnd:c,getBlockAttributes:u}=(0,g.useSelect)(ji),{replaceBlocks:d,__unstableSplitSelection:h,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((g=>{function m(e){"true"===g.contentEditable&&e.preventDefault()}function _(m){if(!m.defaultPrevented)if(r())m.keyCode===Wa.ENTER?(g.contentEditable=!1,m.preventDefault(),e()?d(t(),(0,p.createBlock)((0,p.getDefaultBlockName)())):h()):m.keyCode===Wa.BACKSPACE||m.keyCode===Wa.DELETE?(g.contentEditable=!1,m.preventDefault(),e()?f(t()):o()?b(m.keyCode===Wa.DELETE):k()):1!==m.key.length||m.metaKey||m.ctrlKey||(g.contentEditable=!1,o()?b(m.keyCode===Wa.DELETE):(m.preventDefault(),g.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(m.keyCode===Wa.ENTER){if(m.shiftKey||e())return;const t=n(),o=i(t),r=a(),g=c();if(r.attributeKey===g.attributeKey){const e=u(t)[r.attributeKey],n=(0,p.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,p.findTransform)(n,(t=>t.regExp.test(e)));if(o)return d(t,o.transform({content:e})),void v()}if(!(0,p.hasBlockSupport)(o,"splitting",!1)&&!m.__deprecatedOnSplit)return;s(o,l(t))&&(h(),m.preventDefault())}}function y(e){r()&&(g.contentEditable=!1,o()?b():(e.preventDefault(),g.ownerDocument.defaultView.getSelection().removeAllRanges()))}return g.addEventListener("beforeinput",m),g.addEventListener("keydown",_),g.addEventListener("compositionstart",y),()=>{g.removeEventListener("beforeinput",m),g.removeEventListener("keydown",_),g.removeEventListener("compositionstart",y)}}),[])}function jw(){const{getBlockName:e}=(0,g.useSelect)(ji),{getBlockType:t}=(0,g.useSelect)(p.store),{createSuccessNotice:n}=(0,g.useDispatch)(pr.store);return(0,h.useCallback)(((o,r)=>{let i="";if("copyStyles"===o)i=(0,T.__)("Styles copied to clipboard.");else if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,T.sprintf)((0,T.__)('Copied "%s" to clipboard.'),s):(0,T.sprintf)((0,T.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,T.sprintf)((0,T._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,T.sprintf)((0,T._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[n,e,t])}function Ew({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(e){return}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,Ga.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const Tw=Symbol("requiresWrapperOnCopy");function Mw(e,t,n){let o=t;const[r]=t;if(r){if(n.select(p.store).getBlockType(r.name)[Tw]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(ji),s=e(r.clientId),l=t(s);l&&(o=(0,p.createBlock)(l,i(s),o))}}const i=(0,p.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,Ga.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(i)),e.clipboardData.setData("text/html",i)}function Pw(){const e=(0,g.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:c,canInsertBlockType:u,getBlockRootClientId:d}=(0,g.useSelect)(ji),{flashBlock:h,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,g.useDispatch)(ji),y=jw();return(0,m.useRefEffect)((g=>{function m(m){if(m.defaultPrevented)return;const x=n();if(0===x.length)return;if(!o()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ga.documentHasUncollapsedSelection)(t):(0,Ga.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=m.target.ownerDocument;if(!g.contains(S))return;const w=a(),C=l()||s(),B=!C&&!w;if("copy"===m.type||"cut"===m.type)if(m.preventDefault(),1===x.length&&h(x[0]),B)v();else{let n;if(y(m.type,x),C)n=t(x);else{const[e,o]=c();n=[e,...t(x.slice(1,x.length-1)),o]}Mw(m,n,e)}if("cut"===m.type)C&&!B?f(x):(m.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===m.type){const{__experimentalCanUserUseUnfilteredHTML:e,mediaUpload:t}=r();if("true"===m.clipboardData.getData("rich-text"))return;const{plainText:n,html:l,files:a}=Ew(m),c=s();let h=[];if(a.length){if(!t)return void m.preventDefault();const e=(0,p.getBlockTransforms)("from");h=a.reduce(((t,n)=>{const o=(0,p.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else h=(0,p.pasteHandler)({HTML:l,plainText:n,mode:c?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof h)return;if(c)return b(x,h,h.length-1,-1),void m.preventDefault();if(!o()&&!(0,p.hasBlockSupport)(i(x[0]),"splitting",!1)&&!m.__deprecatedOnSplit)return;const[g]=x,f=d(g),k=[];for(const e of h)if(u(e.name,f))k.push(e);else{const t=i(f),n=e.name!==t?(0,p.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)k.push(t)}_(k),m.preventDefault()}}return g.ownerDocument.addEventListener("copy",m),g.ownerDocument.addEventListener("cut",m),g.ownerDocument.addEventListener("paste",m),()=>{g.ownerDocument.removeEventListener("copy",m),g.ownerDocument.removeEventListener("cut",m),g.ownerDocument.removeEventListener("paste",m)}}),[])}function Rw(){const[e,t,n]=function(){const e=(0,h.useRef)(),t=(0,h.useRef)(),n=(0,h.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i,getBlockOrder:s,getLastFocus:l,getSectionRootClientId:a,isZoomOut:c}=G((0,g.useSelect)(ji)),{setLastFocus:u}=G((0,g.useDispatch)(ji)),p=(0,h.useRef)();function f(t){const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(p.current)p.current=null;else if(o())e.current.focus();else if(r())l()?.current?l().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else if(c()){const t=a(),o=s(t);o.length?e.current.querySelector(`[data-block="${o[0]}"]`).focus():t?e.current.querySelector(`[data-block="${t}"]`).focus():n.focus()}else{const o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=Ga.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const b=(0,d.jsx)("div",{ref:t,tabIndex:"0",onFocus:f}),k=(0,d.jsx)("div",{ref:n,tabIndex:"0",onFocus:f}),v=(0,m.useRefEffect)((o=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Wa.TAB)return;if(!n.current||!t.current)return;const{target:o,shiftKey:r}=e,i=r?"findPrevious":"findNext",s=Ga.focus.tabbable[i](o),l=o.closest("[data-block]"),a=l&&s&&($m(l,s)||Wm(l,s));if((0,Ga.isFormElement)(s)&&a)return;const c=r?t:n;p.current=!0,c.current.focus({preventScroll:!0})}function s(e){u({...l(),current:e.target});const{ownerDocument:t}=o;!e.relatedTarget&&e.target.hasAttribute("data-block")&&t.activeElement===t.body&&0===i()&&o.focus()}function a(o){if(o.keyCode!==Wa.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=Ga.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:c}=o,{defaultView:d}=c;return d.addEventListener("keydown",a),o.addEventListener("keydown",r),o.addEventListener("focusout",s),()=>{d.removeEventListener("keydown",a),o.removeEventListener("keydown",r),o.removeEventListener("focusout",s)}}),[]);return[b,(0,m.useMergeRefs)([e,v]),k]}(),o=(0,g.useSelect)((e=>e(ji).hasMultiSelection()),[]);return[e,(0,m.useMergeRefs)([t,Pw(),Iw(),xw(),Cw(),Bw(),bw(),_w(),vw(),(0,m.useRefEffect)((e=>(e.tabIndex=0,e.dataset.hasMultiSelection=o,o?(e.setAttribute("aria-label",(0,T.__)("Multiple selected blocks")),()=>{delete e.dataset.hasMultiSelection,e.removeAttribute("aria-label")}):()=>{delete e.dataset.hasMultiSelection})),[o])]),n]}var Aw=(0,h.forwardRef)((function({children:e,...t},n){const[o,r,i]=Rw();return(0,d.jsxs)(d.Fragment,{children:[o,(0,d.jsx)("div",{...t,ref:(0,m.useMergeRefs)([r,n]),className:ms(t.className,"block-editor-writing-flow"),children:e}),i]})}));let Nw=null;function Lw({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-2*e)/o}function Dw({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:i}]=(0,m.useResizeObserver)(),[s,{width:l,height:a}]=(0,m.useResizeObserver)(),c=(0,h.useRef)(0),u=1!==o,d=(0,m.useReducedMotion)(),p="auto-scaled"===o,g=(0,h.useRef)(!1),f=(0,h.useRef)(null);(0,h.useEffect)((()=>{u||(c.current=l)}),[l,u]);const b=Math.max(c.current,l),k=p?Lw({frameSize:e,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:b}):o,v=(0,h.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=(0,h.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,h.useCallback)((()=>{const{scrollTop:e}=v.current,{scrollTop:n}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${e}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${n}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(function(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:i,frameSize:s,scrollTop:l}=t;return[{translate:"0 0",scale:n,paddingTop:o/n+"px",paddingBottom:o/n+"px"},{translate:`0 ${r-l}px`,scale:i,paddingTop:s/i+"px",paddingBottom:s/i+"px"}]}(v.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})}),[t]),x=(0,h.useCallback)((()=>{g.current=!1,f.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=_.current}),[t]),S=(0,h.useRef)(!1);return(0,h.useEffect)((()=>{const e=t&&S.current!==u;if(S.current=u,e&&(g.current=!0,u))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}}),[t,u]),(0,h.useEffect)((()=>{if(t&&(p&&1!==v.current.scaleValue&&(v.current.scaleValue=Lw({frameSize:v.current.frameSize,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:l})),k<1&&(g.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${b}px`)),g.current))if(g.current=!1,f.current){f.current.reverse();const e=v.current,t=_.current;v.current=t,_.current=e}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=a,_.current={scaleValue:k,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=function(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:i}=t;return o*(i/n)+2*r}(v.current,_.current),_.current.scrollTop=function(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:i}=e,{containerHeight:s,frameSize:l,scaleValue:a,scrollHeight:c}=t;let u=i;u=(u+n/2-o)/r-n/2,u=(u+s/2)*a+l-s/2,u=i<=o?0:u;const d=c-s;return Math.round(Math.min(Math.max(0,u),Math.max(0,d)))}(v.current,_.current),f.current=y(),d?x():f.current.onfinish=x}),[y,x,d,p,k,e,t,i,l,a,n,b]),{isZoomedOut:u,scaleContainerWidth:b,contentResizeListener:r,containerResizeListener:s}}function Ow(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function zw(e){return(0,m.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Ow(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function Vw({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,T.__)("Editor canvas"),...a}){const{resolvedAssets:c,isPreviewMode:u}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.isPreviewMode}}),[]),{styles:p="",scripts:f=""}=c,[b,k]=(0,h.useState)(),[v,_]=(0,h.useState)([]),y=PS(),[x,S,w]=Rw(),C=(0,m.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(e){"A"===e.target.tagName&&e.target.getAttribute("href")?.startsWith("#")&&(e.preventDefault(),t.defaultView.location.hash=e.target.getAttribute("href").slice(1))}e._load=()=>{k(e.contentDocument)};const{ownerDocument:r}=e;function i(){const{contentDocument:i}=e,{documentElement:s}=i;t=i,s.classList.add("block-editor-iframe__html"),y(s),i.dir=r.dir;for(const e of Nw||(Nw=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if(n.id.startsWith("wp-"))return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),Nw))i.getElementById(e.id)||(i.head.appendChild(e.cloneNode(!0)),u||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),t.addEventListener("click",o)}return _(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),e.addEventListener("load",i),()=>{delete e._load,e.removeEventListener("load",i),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n),t?.removeEventListener("click",o)}}),[]),{contentResizeListener:B,containerResizeListener:I,isZoomedOut:j,scaleContainerWidth:E}=Dw({scale:o,frameSize:parseInt(r),iframeDocument:b}),M=(0,m.useDisabled)({isDisabled:!i}),P=(0,m.useMergeRefs)([zw(b),e,y,S,M]),R=`<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8">\n\t\t<base href="${window.location.origin}">\n\t\t<script>window.frameElement._load()<\/script>\n\t\t<style>\n\t\t\thtml{\n\t\t\t\theight: auto !important;\n\t\t\t\tmin-height: 100%;\n\t\t\t}\n\t\t\t/* Lowest specificity to not override global styles */\n\t\t\t:where(body) {\n\t\t\t\tmargin: 0;\n\t\t\t\t/* Default background color in case zoom out mode background\n\t\t\t\tcolors the html element */\n\t\t\t\tbackground-color: white;\n\t\t\t}\n\t\t</style>\n\t\t${p}\n\t\t${f}\n\t</head>\n\t<body>\n\t\t<script>document.currentScript.parentElement.remove()<\/script>\n\t</body>\n</html>`,[A,N]=(0,h.useMemo)((()=>{const e=URL.createObjectURL(new window.Blob([R],{type:"text/html"}));return[e,()=>URL.revokeObjectURL(e)]}),[R]);(0,h.useEffect)((()=>N),[N]);const L=n>=0&&!u,D=(0,d.jsxs)(d.Fragment,{children:[L&&x,(0,d.jsx)("iframe",{...a,style:{...a.style,height:a.style?.height,border:0},ref:(0,m.useMergeRefs)([s,C]),tabIndex:n,src:A,title:l,onKeyDown:e=>{if(a.onKeyDown&&a.onKeyDown(e),e.currentTarget.ownerDocument!==e.target.ownerDocument){const{stopPropagation:t}=e.nativeEvent;e.nativeEvent.stopPropagation=()=>{},e.stopPropagation(),e.nativeEvent.stopPropagation=t,Ow(e,window.KeyboardEvent,e.currentTarget)}},children:b&&(0,h.createPortal)((0,d.jsxs)("body",{ref:P,className:ms("block-editor-iframe__body","editor-styles-wrapper",...v),children:[B,(0,d.jsx)(ws.__experimentalStyleProvider,{document:b,children:t})]}),b.documentElement)}),L&&w]});return(0,d.jsxs)("div",{className:"block-editor-iframe__container",children:[I,(0,d.jsx)("div",{className:ms("block-editor-iframe__scale-container",j&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":j&&`${E}px`},children:D})]})}var Fw=(0,h.forwardRef)((function(e,t){return(0,g.useSelect)((e=>e(ji).getSettings().__internalIsInitialized),[])?(0,d.jsx)(Vw,{...e,forwardedRef:t}):null}));const Hw={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},Uw=new Set(["combinator","comma"]),Gw=(new Set(["not","is","where","has","matches","-moz-any","-webkit-any","nth-child","nth-last-child"]),e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(Hw[e].source.replace("(?<argument>¶*)","(?<argument>.*)"),"gu");default:return Hw[e]}});function $w(e,t){let n=0,o="";for(;t<e.length;t++){const r=e[t];switch(r){case"(":++n;break;case")":--n}if(o+=r,0===n)return o}return o}const Ww=/(['"])([^\\\n]+?)\1/g,Kw=/\\./g;function Zw(e,t=Hw){if(""===(e=e.trim()))return[];const n=[];e=(e=e.replace(Kw,((e,t)=>(n.push({value:e,offset:t}),"".repeat(e.length))))).replace(Ww,((e,t,o,r)=>(n.push({value:e,offset:r}),`${t}${"".repeat(o.length)}${t}`)));{let t,o=0;for(;(t=e.indexOf("(",o))>-1;){const r=$w(e,t);n.push({value:r,offset:t}),e=`${e.substring(0,t)}(${"¶".repeat(r.length-2)})${e.substring(t+r.length)}`,o=t+r.length}}const o=function(e,t=Hw){if(!e)return[];const n=[e];for(const[e,o]of Object.entries(t))for(let t=0;t<n.length;t++){const r=n[t];if("string"!=typeof r)continue;o.lastIndex=0;const i=o.exec(r);if(!i)continue;const s=i.index-1,l=[],a=i[0],c=r.slice(0,s+1);c&&l.push(c),l.push({...i.groups,type:e,content:a});const u=r.slice(s+a.length+1);u&&l.push(u),n.splice(t,1,...l)}let o=0;for(const e of n)switch(typeof e){case"string":throw new Error(`Unexpected sequence ${e} found at index ${o}`);case"object":o+=e.content.length,e.pos=[o-e.content.length,o],Uw.has(e.type)&&(e.content=e.content.trim()||" ")}return n}(e,t),r=new Set;for(const e of n.reverse())for(const t of o){const{offset:n,value:o}=e;if(!(t.pos[0]<=n&&n+o.length<=t.pos[1]))continue;const{content:i}=t,s=n-t.pos[0];t.content=i.slice(0,s)+o+i.slice(s+o.length),t.content!==i&&r.add(t)}for(const e of r){const t=Gw(e.type);if(!t)throw new Error(`Unknown token type: ${e.type}`);t.lastIndex=0;const n=t.exec(e.content);if(!n)throw new Error(`Unable to parse content for ${e.type}: ${e.content}`);Object.assign(e,n.groups)}return o}function*qw(e,t){switch(e.type){case"list":for(let t of e.list)yield*qw(t,e);break;case"complex":yield*qw(e.left,e),yield*qw(e.right,e);break;case"compound":yield*e.list.map((t=>[t,e]));break;default:yield[e,t]}}var Yw=n(9656),Xw=n.n(Yw),Qw=n(356),Jw=n.n(Qw),eC=n(1443),tC=n.n(eC),nC=n(5404),oC=n.n(nC);const rC=new Map,iC=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function sC(e,t){const n=Zw(t);let o=-1;for(let e=n.findLastIndex((({content:e,type:t})=>iC.some((n=>e===n.content&&t===n.type))))+1;e<n.length;e++)if("combinator"===n[e].type){o=e;break}const r=Zw(e);return n.splice(-1===o?n.length:o,0,{type:"combinator",content:" "},...r),function(e){let t;return t=Array.isArray(e)?e:[...qw(e)].map((([e])=>e)),t.map((e=>e.content)).join("")}(n)}var lC=(e,t="",n)=>{let o=rC.get(t);return o||(o=new WeakMap,rC.set(t,o)),e.map((e=>{let r=o.get(e);return r||(r=function({css:e,ignoredSelectors:t=[],baseURL:n},o="",r){if(!o&&!n)return e;try{const i=[...t,...r?.ignoredSelectors??[],o];return new(Xw())([o&&tC()({prefix:o,transform:(e,t,n)=>i.some((e=>e instanceof RegExp?t.match(e):t.includes(e)))?t:iC.some((e=>t.startsWith(e.content)))?sC(e,t):n}),n&&oC()({rootUrl:n})].filter(Boolean)).process(e,{}).css}catch(e){return e instanceof Jw()?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e.message+"\n"+e.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e),null}}(e,t,n),o.set(e,r)),r}))};function aC(e,t){return(0,h.useCallback)((e=>{if(!e)return;const{ownerDocument:n}=e,{defaultView:o,body:r}=n,i=t?n.querySelector(t):r;let s;if(i)s=o?.getComputedStyle(i,null).getPropertyValue("background-color");else{const e=n.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),s=o?.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=wd(s);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e,t])}Bd([Id,Td]);var cC=(0,h.memo)((function({styles:e,scope:t,transformOptions:n}){const o=(0,g.useSelect)((e=>G(e(ji)).getStyleOverrides()),[]),[r,i]=(0,h.useMemo)((()=>{const r=Object.values(e??[]);for(const[e,t]of o){const n=r.findIndex((({id:t})=>e===t)),o={...t,id:e};-1===n?r.push(o):r[n]=o}return[lC(r.filter((e=>e?.css)),t,n),r.filter((e=>"svgs"===e.__unstableType)).map((e=>e.assets)).join("")]}),[e,o,t,n]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{ref:aC(r,t)}),r.map(((e,t)=>(0,d.jsx)("style",{children:e},t))),(0,d.jsx)(ws.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}));const uC=(0,h.memo)(dw),dC=2e3,pC=[];function hC({viewportWidth:e,containerWidth:t,minHeight:n,additionalStyles:o=pC}){e||(e=t);const[r,{height:i}]=(0,m.useResizeObserver)(),{styles:s}=(0,g.useSelect)((e=>({styles:e(ji).getSettings().styles})),[]),l=(0,h.useMemo)((()=>s?[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:s),[s,o]),a=t/e,c=i?t/(i*a):0;return(0,d.jsx)(ws.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${a})`,aspectRatio:c,maxHeight:i>dC?dC*a:void 0,minHeight:n},children:(0,d.jsxs)(Fw,{contentRef:(0,m.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:dC,minHeight:0!==a&&a<1&&n?n/a:n},children:[(0,d.jsx)(cC,{styles:l}),r,(0,d.jsx)(uC,{renderAppender:!1})]})})}function gC(e){const[t,{width:n}]=(0,m.useResizeObserver)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,d.jsx)("div",{className:"block-editor-block-preview__container",children:!!n&&(0,d.jsx)(hC,{...e,containerWidth:n})})]})}const mC=(0,window.wp.priorityQueue.createQueue)();const fC=[];const bC=(0,h.memo)((function({blocks:e,viewportWidth:t=1200,minHeight:n,additionalStyles:o=fC,__experimentalMinHeight:r,__experimentalPadding:i}){r&&(n=r,I()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(o=[...o,{css:`body { padding: ${i}px; }`}],I()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const s=(0,g.useSelect)((e=>e(ji).getSettings()),[]),l=(0,h.useMemo)((()=>({...s,focusMode:!1,isPreviewMode:!0})),[s]),a=(0,h.useMemo)((()=>Array.isArray(e)?e:[e]),[e]);return e&&0!==e.length?(0,d.jsx)(nv,{value:a,settings:l,children:(0,d.jsx)(gC,{viewportWidth:t,minHeight:n,additionalStyles:o})}):null}));bC.Async=function({children:e,placeholder:t}){const[n,o]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{const e={};return mC.add(e,(()=>{(0,h.flushSync)((()=>{o(!0)}))})),()=>{mC.cancel(e)}}),[]),n?e:t};var kC=bC;function vC({blocks:e,props:t={},layout:n}){const o=(0,g.useSelect)((e=>e(ji).getSettings()),[]),r=(0,h.useMemo)((()=>({...o,styles:void 0,focusMode:!1,isPreviewMode:!0})),[o]),i=(0,m.useDisabled)(),s=(0,m.useMergeRefs)([t.ref,i]),l=(0,h.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),a=(0,d.jsxs)(nv,{value:l,settings:r,children:[(0,d.jsx)(cC,{}),(0,d.jsx)(mw,{renderAppender:!1,layout:n})]});return{...t,ref:s,className:ms(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?a:null}}var _C=function({item:e}){const{name:t,title:n,icon:o,description:r,initialAttributes:i,example:s}=e,l=(0,p.isReusableBlock)(e),a=(0,h.useMemo)((()=>s?(0,p.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,p.createBlock)(t,i)),[t,s,i]),c=144,u=s?.viewportWidth??500,g=280/u,m=0!==g&&g<1?c/g:c;return(0,d.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,d.jsx)("div",{className:"block-editor-inserter__preview",children:l||s?(0,d.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,d.jsx)(kC,{blocks:a,viewportWidth:u,minHeight:c,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\t\t\tbody { \n\t\t\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\t\t\tmin-height:${Math.round(m)}px;\n\t\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t\t\t`}]})}):(0,d.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,T.__)("No preview available.")})}),!l&&(0,d.jsx)(Xb,{title:n,icon:o,description:r})]})};var yC=(0,h.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){return(0,d.jsx)(ws.Composite.Item,{ref:r,role:"option",accessibleWhenDisabled:!0,...o,render:o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,d.jsx)(t,{...r,children:n}):"function"==typeof n?n(r):(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...r,children:n})}})})),xC=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});function SC({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,T.__)("Pattern");return(0,d.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,d.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,d.jsxs)(ws.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,d.jsx)(ws.FlexItem,{children:t?(0,d.jsx)(Vu,{icon:t}):r||(0,T.sprintf)((0,T._n)("%d block","%d blocks",e),e)}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Vu,{icon:xC})}),o&&(0,d.jsx)(ws.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,d.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var wC=({isEnabled:e,blocks:t,icon:n,children:o,pattern:r})=>{const i=(0,g.useSelect)((e=>{const{getBlockType:n}=e(p.store);return 1===t.length&&n(t[0].name)?.icon}),[t]),{startDragging:s,stopDragging:l}=G((0,g.useDispatch)(ji)),a=(0,h.useMemo)((()=>r?.type===it.user&&"unsynced"!==r?.syncStatus?[(0,p.createBlock)("core/block",{ref:r.id})]:void 0),[r?.type,r?.syncStatus,r?.id]);if(!e)return o({draggable:!1,onDragStart:void 0,onDragEnd:void 0});const c=a??t;return(0,d.jsx)(ws.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:c},onDragStart:e=>{s();for(const t of c){const n=`wp-block:${t.name}`;e.dataTransfer.items.add("",n)}},onDragEnd:()=>{l()},__experimentalDragComponent:(0,d.jsx)(SC,{count:t.length,icon:n||!r&&i,isPattern:!!r}),children:({onDraggableStart:e,onDraggableEnd:t})=>o({draggable:!0,onDragStart:e,onDragEnd:t})})};var CC=(0,h.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:i,...s}){const l=(0,h.useRef)(!1),a=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},c=(0,h.useMemo)((()=>[(0,p.createBlock)(n.name,n.initialAttributes,(0,p.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.innerBlocks]),u=(0,p.isReusableBlock)(n)&&"unsynced"!==n.syncStatus||(0,p.isTemplatePart)(n);return(0,d.jsx)(wC,{isEnabled:i&&!n.isDisabled,blocks:c,icon:n.icon,children:({draggable:i,onDragStart:c,onDragEnd:p})=>(0,d.jsx)("div",{className:ms("block-editor-block-types-list__list-item",{"is-synced":u}),draggable:i,onDragStart:e=>{l.current=!0,c&&(r(null),c(e))},onDragEnd:e=>{l.current=!1,p&&p(e)},children:(0,d.jsxs)(yC,{isFirst:t,className:ms("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,(0,Wa.isAppleOS)()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Wa.ENTER&&(e.preventDefault(),o(n,(0,Wa.isAppleOS)()?e.metaKey:e.ctrlKey),r(null))},onMouseEnter:()=>{l.current||r(n)},onMouseLeave:()=>r(null),...s,children:[(0,d.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:a,children:(0,d.jsx)(Vu,{icon:n.icon,showColors:!0})}),(0,d.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:3,children:n.title})})]})})})}));var BC=(0,h.forwardRef)((function(e,t){const[n,o]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{n&&(0,Uo.speak)((0,T.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,d.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)},...e})}));var IC=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(ws.Composite.Group,{role:"presentation",ref:t,...e})}));function jC(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}var EC=function e({items:t=[],onSelect:n,onHover:o=()=>{},children:r,label:i,isDraggable:s=!0}){const l="block-editor-block-types-list",a=(0,m.useInstanceId)(e,l);return(0,d.jsxs)(BC,{className:l,"aria-label":i,children:[jC(t,3).map(((e,t)=>(0,d.jsx)(IC,{children:e.map(((e,r)=>(0,d.jsx)(CC,{item:e,className:(0,p.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===r,rowId:`${a}-${t}`},e.id)))},t))),r]})};var TC=function({title:e,icon:t,children:n}){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,d.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,d.jsx)(ws.Icon,{icon:t})]}),(0,d.jsx)("div",{className:"block-editor-inserter__panel-content",children:n})]})};var MC=(e,t,n)=>{const o=(0,h.useMemo)((()=>({[pt]:!!n})),[n]),[r]=(0,g.useSelect)((t=>[t(ji).getInserterItems(e,o)]),[e,o]),{getClosestAllowedInsertionPoint:i}=G((0,g.useSelect)(ji)),{createErrorNotice:s}=(0,g.useDispatch)(pr.store),[l,a]=(0,g.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(p.store);return[t(),n()]}),[]);return[r,l,a,(0,h.useCallback)((({name:n,initialAttributes:o,innerBlocks:r,syncStatus:l,content:a},c)=>{const u=i(n,e);if(null===u){const e=(0,p.getBlockType)(n)?.title??n;return void s((0,T.sprintf)((0,T.__)('Block "%s" can\'t be inserted.'),e),{type:"snackbar",id:"inserter-notice"})}const d="unsynced"===l?(0,p.parse)(a,{__unstableSkipMigrationLogs:!0}):(0,p.createBlock)(n,o,(0,p.createBlocksFromInnerBlocksTemplate)(r));t(d,void 0,c,u)}),[i,e,t,s])]};function PC({key:e,children:t}){return(0,d.jsx)(h.Fragment,{children:t},e)}var RC=function({children:e}){return(0,d.jsx)(ws.Composite,{focusShift:!0,focusWrap:"horizontal",render:PC,children:e})};var AC=function(){return(0,d.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,d.jsx)("p",{children:(0,T.__)("No results found.")})})};const NC=[];function LC({items:e,collections:t,categories:n,onSelectItem:o,onHover:r,showMostUsedBlocks:i,className:s}){const l=(0,h.useMemo)((()=>xt(e,"frecency","desc").slice(0,6)),[e]),a=(0,h.useMemo)((()=>e.filter((e=>!e.category))),[e]),c=(0,h.useMemo)((()=>{const n={...t};return Object.keys(t).forEach((t=>{n[t]=e.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===n[t].length&&delete n[t]})),n}),[e,t]);(0,h.useEffect)((()=>()=>r(null)),[]);const u=(0,m.useAsyncList)(n),p=n.length===u.length,g=(0,h.useMemo)((()=>Object.entries(t)),[t]),f=(0,m.useAsyncList)(p?g:NC);return(0,d.jsxs)("div",{className:s,children:[i&&e.length>3&&!!l.length&&(0,d.jsx)(TC,{title:(0,T._x)("Most used","blocks"),children:(0,d.jsx)(EC,{items:l,onSelect:o,onHover:r,label:(0,T._x)("Most used","blocks")})}),u.map((t=>{const n=e.filter((e=>e.category===t.slug));return n&&n.length?(0,d.jsx)(TC,{title:t.title,icon:t.icon,children:(0,d.jsx)(EC,{items:n,onSelect:o,onHover:r,label:t.title})},t.slug):null})),p&&a.length>0&&(0,d.jsx)(TC,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,T.__)("Uncategorized"),children:(0,d.jsx)(EC,{items:a,onSelect:o,onHover:r,label:(0,T.__)("Uncategorized")})}),f.map((([e,t])=>{const n=c[e];return n&&n.length?(0,d.jsx)(TC,{title:t.title,icon:t.icon,children:(0,d.jsx)(EC,{items:n,onSelect:o,onHover:r,label:t.title})},e):null}))]})}var DC=(0,h.forwardRef)((function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o},r){const[i,s,l,a]=MC(e,t);if(!i.length)return(0,d.jsx)(AC,{});const c=[],u=[];for(const e of i)"reusable"!==e.category&&(e.isAllowedInCurrentRoot?c.push(e):u.push(e));return(0,d.jsx)(RC,{children:(0,d.jsxs)("div",{ref:r,children:[!!c.length&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(LC,{items:c,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,d.jsx)(LC,{items:u,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__all-blocks"})]})})}));function OC({selectedCategory:e,patternCategories:t,onClickCategory:n}){const o="block-editor-block-patterns-explorer__sidebar";return(0,d.jsx)("div",{className:`${o}__categories-list`,children:t.map((({name:t,label:r})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:r,className:`${o}__categories-list__item`,isPressed:e===t,onClick:()=>{n(t)},children:r},t)))})}function zC({searchValue:e,setSearchValue:t}){return(0,d.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,T.__)("Search"),placeholder:(0,T.__)("Search")})})}var VC=function({selectedCategory:e,patternCategories:t,onClickCategory:n,searchValue:o,setSearchValue:r}){return(0,d.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,d.jsx)(zC,{searchValue:o,setSearchValue:r}),!o&&(0,d.jsx)(OC,{selectedCategory:e,patternCategories:t,onClickCategory:n})]})};function FC({currentPage:e,numPages:t,changePage:n,totalItems:o}){return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,d.jsx)(ws.__experimentalText,{variant:"muted",children:(0,T.sprintf)((0,T._n)("%s item","%s items",o),o)}),t>1&&(0,d.jsxs)(ws.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,d.jsxs)(ws.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(1),disabled:1===e,"aria-label":(0,T.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"«"})}),(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(e-1),disabled:1===e,"aria-label":(0,T.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"‹"})})]}),(0,d.jsx)(ws.__experimentalText,{variant:"muted",children:(0,T.sprintf)((0,T._x)("%1$s of %2$s","paging"),e,t)}),(0,d.jsxs)(ws.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(e+1),disabled:e===t,"aria-label":(0,T.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"›"})}),(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(t),disabled:e===t,"aria-label":(0,T.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"»"})})]})]})]})}const HC=({showTooltip:e,title:t,children:n})=>e?(0,d.jsx)(ws.Tooltip,{text:t,children:n}):(0,d.jsx)(d.Fragment,{children:n});function UC({id:e,isDraggable:t,pattern:n,onClick:o,onHover:r,showTitlesAsTooltip:i,category:s,isSelected:l}){const[a,c]=(0,h.useState)(!1),{blocks:u,viewportWidth:g}=n,f=`block-editor-block-patterns-list__item-description-${(0,m.useInstanceId)(UC)}`,b=n.type===it.user,k=(0,h.useMemo)((()=>s&&t?(u??[]).map((e=>{const t=(0,p.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(s)&&(t.attributes.metadata.categories=[s]),t})):u),[u,t,s]);return(0,d.jsx)(wC,{isEnabled:t,blocks:k,pattern:n,children:({draggable:t,onDragStart:s,onDragEnd:p})=>(0,d.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{c(!0),s&&(r?.(null),s(e))},onDragEnd:e=>{c(!1),p&&p(e)},children:(0,d.jsx)(HC,{showTooltip:i&&!b,title:n.title,children:(0,d.jsxs)(ws.Composite.Item,{render:(0,d.jsx)("div",{role:"option","aria-label":n.title,"aria-describedby":n.description?f:void 0,className:ms("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":n.type===it.user&&!n.syncStatus,"is-selected":l})}),id:e,onClick:()=>{o(n,u),r?.(null)},onMouseEnter:()=>{a||r?.(n)},onMouseLeave:()=>r?.(null),children:[(0,d.jsx)(kC.Async,{placeholder:(0,d.jsx)(GC,{}),children:(0,d.jsx)(kC,{blocks:u,viewportWidth:g})}),(!i||b)&&(0,d.jsxs)(ws.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[b&&!n.syncStatus&&(0,d.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,d.jsx)(Ol,{className:"block-editor-patterns__pattern-icon",icon:de})}),(0,d.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:n.title})]}),!!n.description&&(0,d.jsx)(ws.VisuallyHidden,{id:f,children:n.description})]})})})})}function GC(){return(0,d.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var $C=(0,h.forwardRef)((function({isDraggable:e,blockPatterns:t,onHover:n,onClickPattern:o,orientation:r,label:i=(0,T.__)("Block patterns"),category:s,showTitlesAsTooltip:l,pagingProps:a},c){const[u,p]=(0,h.useState)(void 0),[g,m]=(0,h.useState)(null);(0,h.useEffect)((()=>{const e=t[0]?.name;p(e)}),[t]);const f=(e,t)=>{m(e.name),o(e,t)};return(0,d.jsxs)(ws.Composite,{orientation:r,activeId:u,setActiveId:p,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:c,children:[t.map((t=>(0,d.jsx)(UC,{id:t.name,pattern:t,onClick:f,onHover:n,isDraggable:e,showTitlesAsTooltip:l,category:s,isSelected:!!g&&g===t.name},t.name))),a&&(0,d.jsx)(FC,{...a})]})}));function WC({destinationRootClientId:e,destinationIndex:t,rootClientId:n,registry:o}){if(n===e)return t;const r=["",...o.select(ji).getBlockParents(e),e],i=r.indexOf(n);return-1!==i?o.select(ji).getBlockIndex(r[i+1])+1:o.select(ji).getBlockOrder(n).length}var KC=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){const l=(0,g.useRegistry)(),{getSelectedBlock:a,getClosestAllowedInsertionPoint:c,isBlockInsertionPointVisible:u}=G((0,g.useSelect)(ji)),{destinationRootClientId:d,destinationIndex:m}=(0,g.useSelect)((r=>{const{getSelectedBlockClientId:i,getBlockRootClientId:s,getBlockIndex:l,getBlockOrder:a,getInsertionPoint:c}=G(r(ji)),u=i();let d,p=e;const h=c();return void 0!==t?d=t:h&&h.hasOwnProperty("index")?(p=h?.rootClientId?h.rootClientId:e,d=h.index):n?d=l(n):!o&&u?(p=s(u),d=l(u)+1):d=a(p).length,{destinationRootClientId:p,destinationIndex:d}}),[e,t,n,o]),{replaceBlocks:f,insertBlocks:b,showInsertionPoint:k,hideInsertionPoint:v,setLastFocus:_}=G((0,g.useDispatch)(ji)),y=(0,h.useCallback)(((e,t,n=!1,c)=>{(n||i||s)&&_(null);const u=a();!o&&u&&(0,p.isUnmodifiedDefaultBlock)(u,"content")?f(u.clientId,e,null,i||n?0:null,t):b(e,o||void 0===c?m:WC({destinationRootClientId:d,destinationIndex:m,rootClientId:c,registry:l}),o||void 0===c?d:c,s,i||n?0:null,t);const h=Array.isArray(e)?e.length:1,g=(0,T.sprintf)((0,T._n)("%d block added.","%d blocks added.",h),h);(0,Uo.speak)(g),r&&r(e)}),[o,a,f,b,d,m,r,i,s]),x=(0,h.useCallback)((e=>{if(e&&!u()){const t=c(e.name,d);null!==t&&k(t,WC({destinationRootClientId:d,destinationIndex:m,rootClientId:t,registry:l}))}else v()}),[c,u,k,v,d,m]);return[d,y,x]};var ZC=(e,t,n,o)=>{const r=(0,h.useMemo)((()=>({[pt]:!!o})),[o]),{patternCategories:i,patterns:s,userPatternCategories:l}=(0,g.useSelect)((e=>{const{getSettings:n,__experimentalGetAllowedPatterns:o}=G(e(ji)),{__experimentalUserPatternCategories:i,__experimentalBlockPatternCategories:s}=n();return{patterns:o(t,r),userPatternCategories:i,patternCategories:s}}),[t,r]),{getClosestAllowedInsertionPointForPattern:a}=G((0,g.useSelect)(ji)),c=(0,h.useMemo)((()=>{const e=[...i];return l?.forEach((t=>{e.find((e=>e.name===t.name))||e.push(t)})),e}),[i,l]),{createSuccessNotice:u}=(0,g.useDispatch)(pr.store),d=(0,h.useCallback)(((r,i)=>{const s=o?t:a(r,t);if(null===s)return;const l=r.type===it.user&&"unsynced"!==r.syncStatus?[(0,p.createBlock)("core/block",{ref:r.id})]:i;e((l??[]).map((e=>{const t=(0,p.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(n)&&(t.attributes.metadata.categories=[n]),t})),r.name,!1,s),u((0,T.sprintf)((0,T.__)('Block pattern "%s" inserted.'),r.title),{type:"snackbar",id:"inserter-notice"})}),[u,e,n,t,a,o]);return[s,c,d]},qC=n(9681),YC=n.n(qC);function XC(e){return e.toLowerCase()}var QC=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],JC=/[^A-Z0-9]+/gi;function eB(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const tB=e=>e.name||"",nB=e=>e.title,oB=e=>e.description||"",rB=e=>e.keywords||[],iB=e=>e.category,sB=()=>null,lB=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],aB=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),cB=new Map,uB=new Map;function dB(e=""){if(cB.has(e))return cB.get(e);const t=function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?QC:n,r=t.stripRegexp,i=void 0===r?JC:r,s=t.transform,l=void 0===s?XC:s,a=t.delimiter,c=void 0===a?" ":a,u=eB(eB(e,o,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(l).join(c)}(e,{splitRegexp:lB,stripRegexp:aB}).split(" ").filter(Boolean);return cB.set(e,t),t}function pB(e=""){if(uB.has(e))return uB.get(e);let t=YC()(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),uB.set(e,t),t}const hB=(e="")=>dB(pB(e)),gB=(e,t,n,o)=>{if(0===hB(o).length)return e;return mB(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},mB=(e=[],t="",n={})=>{if(0===hB(t).length)return e;const o=e.map((e=>[e,fB(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function fB(e,t,n={}){const{getName:o=tB,getTitle:r=nB,getDescription:i=oB,getKeywords:s=rB,getCategory:l=iB,getCollection:a=sB}=n,c=o(e),u=r(e),d=i(e),p=s(e),h=l(e),g=a(e),m=pB(t),f=pB(u);let b=0;if(m===f)b+=30;else if(f.startsWith(m))b+=20;else{const e=[c,u,d,...p,h,g].join(" ");0===((e,t)=>e.filter((e=>!hB(t).some((t=>t.includes(e))))))(dB(m),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function bB(e,t,n,o=""){const[r,i]=(0,h.useState)(1),s=(0,m.usePrevious)(t),l=(0,m.usePrevious)(o);s===t&&l===o||1===r||i(1);const a=e.length,c=r-1,u=(0,h.useMemo)((()=>e.slice(20*c,20*c+20)),[c,e]),d=Math.ceil(e.length/20);return(0,h.useEffect)((function(){const e=(0,Ga.getScrollContainer)(n?.current);e?.scrollTo(0,0)}),[t,n]),{totalItems:a,categoryPatterns:u,numPages:d,changePage:e=>{const t=(0,Ga.getScrollContainer)(n?.current);t?.scrollTo(0,0),i(e)},currentPage:r}}function kB({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,d.jsx)(ws.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,T.sprintf)((0,T._n)("%d pattern found","%d patterns found",t),t)}):null}var vB=function({searchValue:e,selectedCategory:t,patternCategories:n,rootClientId:o,onModalClose:r}){const i=(0,h.useRef)(),s=(0,m.useDebounce)(Uo.speak,500),[l,a]=KC({rootClientId:o,shouldFocusBlock:!0}),[c,,u]=ZC(a,l,t),p=(0,h.useMemo)((()=>n.map((e=>e.name))),[n]),g=(0,h.useMemo)((()=>{const n=c.filter((e=>{if(t===at.name)return!0;if(t===ct.name&&e.type===it.user)return!0;if(t===ut.name&&e.blockTypes?.includes("core/post-content"))return!0;if("uncategorized"===t){const t=e.categories?.some((e=>p.includes(e)))??!1;return!e.categories?.length||!t}return e.categories?.includes(t)}));return e?mB(n,e):n}),[e,c,t,p]);(0,h.useEffect)((()=>{if(!e)return;const t=g.length,n=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",t),t);s(n)}),[e,s,g.length]);const f=bB(g,t,i),[b,k]=(0,h.useState)(e);e!==b&&(k(e),f.changePage(1));const v=!!g?.length;return(0,d.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,d.jsx)(kB,{filterValue:e,filteredBlockPatternsLength:g.length}),(0,d.jsx)(RC,{children:v&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)($C,{blockPatterns:f.categoryPatterns,onClickPattern:(e,t)=>{u(e,t),r()},isDraggable:!1}),(0,d.jsx)(FC,{...f})]})})]})};function _B(e,t="all"){const[n,o]=ZC(void 0,e),r=(0,h.useMemo)((()=>"all"===t?n:n.filter((e=>!dt(e,t)))),[t,n]),i=(0,h.useMemo)((()=>{const e=o.filter((e=>r.some((t=>t.categories?.includes(e.name))))).sort(((e,t)=>e.label.localeCompare(t.label)));return r.some((e=>!function(e,t){return!(!e.categories||!e.categories.length)&&e.categories.some((e=>t.some((t=>t.name===e))))}(e,o)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,T._x)("Uncategorized")}),r.some((e=>e.blockTypes?.includes("core/post-content")))&&e.unshift(ut),r.some((e=>e.type===it.user))&&e.unshift(ct),r.length>0&&e.unshift({name:at.name,label:at.label}),(0,Uo.speak)((0,T.sprintf)((0,T._n)("%d category button displayed.","%d category buttons displayed.",e.length),e.length)),e}),[o,r]);return i}function yB({initialCategory:e,rootClientId:t,onModalClose:n}){const[o,r]=(0,h.useState)(""),[i,s]=(0,h.useState)(e?.name),l=_B(t);return(0,d.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,d.jsx)(VC,{selectedCategory:i,patternCategories:l,onClickCategory:s,searchValue:o,setSearchValue:r}),(0,d.jsx)(vB,{searchValue:o,selectedCategory:i,patternCategories:l,rootClientId:t,onModalClose:n})]})}var xB=function({onModalClose:e,...t}){return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,d.jsx)(yB,{onModalClose:e,...t})})};function SB({title:e}){return(0,d.jsx)(ws.__experimentalVStack,{spacing:0,children:(0,d.jsx)(ws.__experimentalView,{children:(0,d.jsx)(ws.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,d.jsxs)(ws.__experimentalHStack,{spacing:2,children:[(0,d.jsx)(ws.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,T.isRTL)()?Zb:qb,size:"small",label:(0,T.__)("Back")}),(0,d.jsx)(ws.__experimentalSpacer,{children:(0,d.jsx)(ws.__experimentalHeading,{level:5,children:e})})]})})})})}function wB({categories:e,children:t}){return(0,d.jsxs)(ws.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,d.jsx)(ws.Navigator.Screen,{path:"/",children:(0,d.jsx)(ws.__experimentalItemGroup,{children:e.map((e=>(0,d.jsx)(ws.Navigator.Button,{path:`/category/${e.name}`,as:ws.__experimentalItem,isAction:!0,children:(0,d.jsxs)(ws.__experimentalHStack,{children:[(0,d.jsx)(ws.FlexBlock,{children:e.label}),(0,d.jsx)(Ol,{icon:(0,T.isRTL)()?qb:Zb})]})},e.name)))})}),e.map((e=>(0,d.jsxs)(ws.Navigator.Screen,{path:`/category/${e.name}`,children:[(0,d.jsx)(SB,{title:(0,T.__)("Back")}),t(e)]},e.name)))]})}const CB=e=>"all"!==e&&"user"!==e,BB=[{value:"all",label:(0,T._x)("All","patterns")},{value:it.directory,label:(0,T.__)("Pattern Directory")},{value:it.theme,label:(0,T.__)("Theme & Plugins")},{value:it.user,label:(0,T.__)("User")}];function IB({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:n,patternSourceFilter:o,scrollContainerRef:r,category:i}){const s=i.name===ct.name?it.user:o,l=CB(s),a=(e=>e.name===ct.name)(i),c=(0,h.useMemo)((()=>[{value:"all",label:(0,T._x)("All","patterns")},{value:st,label:(0,T._x)("Synced","patterns"),disabled:l},{value:lt,label:(0,T._x)("Not synced","patterns"),disabled:l}]),[l]);return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,T.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,d.jsx)(Ol,{icon:(0,d.jsx)(ws.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ws.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,d.jsxs)(d.Fragment,{children:[!a&&(0,d.jsx)(ws.MenuGroup,{label:(0,T.__)("Source"),children:(0,d.jsx)(ws.MenuItemsChoice,{choices:BB,onSelect:n=>{var o;t(o=n),CB(o)&&e("all"),r.current?.scrollTo(0,0)},value:s})}),(0,d.jsx)(ws.MenuGroup,{label:(0,T.__)("Type"),children:(0,d.jsx)(ws.MenuItemsChoice,{choices:c,onSelect:t=>{e(t),r.current?.scrollTo(0,0)},value:n})}),(0,d.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,h.createInterpolateElement)((0,T.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/patterns/")})})})]})})})}const jB=()=>{};function EB({rootClientId:e,onInsert:t,onHover:n=jB,category:o,showTitlesAsTooltip:r}){const[i,,s]=ZC(t,e,o?.name),[l,a]=(0,h.useState)("all"),[c,u]=(0,h.useState)("all"),p=_B(e,c),g=(0,h.useRef)(),m=(0,h.useMemo)((()=>i.filter((e=>!dt(e,c,l)&&(o.name===at.name||(o.name===ct.name&&e.type===it.user||(!(o.name!==ut.name||!e.blockTypes?.includes("core/post-content"))||("uncategorized"===o.name?!e.categories||!e.categories.some((e=>p.some((t=>t.name===e)))):e.categories?.includes(o.name)))))))),[i,p,o.name,c,l]),f=bB(m,o,g),{changePage:b}=f;(0,h.useEffect)((()=>()=>n(null)),[]);const k=(0,h.useCallback)((e=>{a(e),b(1)}),[a,b]),v=(0,h.useCallback)((e=>{u(e),b(1)}),[u,b]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,d.jsxs)(ws.__experimentalHStack,{children:[(0,d.jsx)(ws.FlexBlock,{children:(0,d.jsx)(ws.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:o.label})}),(0,d.jsx)(IB,{patternSyncFilter:l,patternSourceFilter:c,setPatternSyncFilter:k,setPatternSourceFilter:v,scrollContainerRef:g,category:o})]}),!m.length&&(0,d.jsx)(ws.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,T.__)("No results found")})]}),m.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,T.__)("Drag and drop patterns into the canvas.")}),(0,d.jsx)($C,{ref:g,blockPatterns:f.categoryPatterns,onClickPattern:s,onHover:n,label:o.label,orientation:"vertical",category:o.name,isDraggable:!0,showTitlesAsTooltip:r,patternFilter:c,pagingProps:f})]})]})}const{Tabs:TB}=G(ws.privateApis);var MB=function({categories:e,selectedCategory:t,onSelectCategory:n,children:o}){const r={type:"tween",duration:(0,m.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},i=(0,m.usePrevious)(t),s=t?t.name:null,[l,a]=(0,h.useState)(),c=e?.[0]?.name;return null===s&&!l&&c&&a(c),(0,d.jsxs)(TB,{selectOnMove:!1,selectedTabId:s,orientation:"vertical",onSelect:t=>{n(e.find((e=>e.name===t)))},activeTabId:l,onActiveTabIdChange:a,children:[(0,d.jsx)(TB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map((e=>(0,d.jsx)(TB.Tab,{tabId:e.name,"aria-current":e===t?"true":void 0,children:e.label},e.name)))}),e.map((e=>(0,d.jsx)(TB.TabPanel,{tabId:e.name,focusable:!1,children:(0,d.jsx)(ws.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:i?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:r,children:o})},e.name)))]})};var PB=function({onSelectCategory:e,selectedCategory:t,onInsert:n,rootClientId:o,children:r}){const[i,s]=(0,h.useState)(!1),l=_B(o),a=(0,m.useViewportMatch)("medium","<");return l.length?(0,d.jsxs)(d.Fragment,{children:[!a&&(0,d.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,d.jsx)(MB,{categories:l,selectedCategory:t,onSelectCategory:e,children:r}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,T.__)("Explore all patterns")})]}),a&&(0,d.jsx)(wB,{categories:l,children:e=>(0,d.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,d.jsx)(EB,{onInsert:n,rootClientId:o,category:e},e.name)})}),i&&(0,d.jsx)(xB,{initialCategory:t||l[0],patternCategories:l,onModalClose:()=>s(!1),rootClientId:o})]}):(0,d.jsx)(AC,{})},RB=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const AB={image:"img",video:"video",audio:"audio"};function NB(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const i=AB[t],s=(0,d.jsx)(i,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:({currentTarget:t})=>{t.src===e.previewUrl&&(t.src=o)}});return[(0,p.createBlock)(`core/${t}`,n),s]}const LB=["image"],DB={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function OB({category:e,media:t}){if(!e.getReportUrl)return null;const n=e.getReportUrl(t);return(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,T.__)("Options"),popoverProps:DB,icon:fv,children:()=>(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.MenuItem,{onClick:()=>window.open(n,"_blank").focus(),icon:RB,children:(0,T.sprintf)((0,T.__)("Report %s"),e.mediaType)})})})}function zB({onClose:e,onSubmit:t}){return(0,d.jsxs)(ws.Modal,{title:(0,T.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,children:[(0,d.jsx)("p",{children:(0,T.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,d.jsx)("p",{children:(0,T.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,T.__)("Insert")})})]})]})}function VB({media:e,onClick:t,category:n}){const[o,r]=(0,h.useState)(!1),[i,s]=(0,h.useState)(!1),[l,a]=(0,h.useState)(!1),[c,u]=(0,h.useMemo)((()=>NB(e,n.mediaType)),[e,n.mediaType]),{createErrorNotice:m,createSuccessNotice:f}=(0,g.useDispatch)(pr.store),{getSettings:b,getBlock:k}=(0,g.useSelect)(ji),{updateBlockAttributes:v}=(0,g.useDispatch)(ji),_=(0,h.useCallback)((e=>{if(l)return;const n=b(),o=(0,p.cloneBlock)(e),{id:i,url:s,caption:c}=o.attributes;i||n.mediaUpload?i?t(o):(a(!0),window.fetch(s).then((e=>e.blob())).then((e=>{const r=(0,Ua.getFilename)(s)||"image.jpg",i=new File([e],r,{type:e.type});n.mediaUpload({filesList:[i],additionalData:{caption:c},onFileChange([e]){(0,$a.isBlobURL)(e.url)||(k(o.clientId)?v(o.clientId,{...o.attributes,id:e.id,url:e.url}):(t({...o,attributes:{...o.attributes,id:e.id,url:e.url}}),f((0,T.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),a(!1))},allowedTypes:LB,onError(e){m(e,{type:"snackbar",id:"inserter-notice"}),a(!1)}})})).catch((()=>{r(!0),a(!1)}))):r(!0)}),[l,b,t,f,v,m,k]),y="string"==typeof e.title?e.title:e.title?.rendered||(0,T.__)("no title"),x=(0,h.useCallback)((()=>s(!0)),[]),S=(0,h.useCallback)((()=>s(!1)),[]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(wC,{isEnabled:!0,blocks:[c],children:({draggable:t,onDragStart:o,onDragEnd:r})=>(0,d.jsx)("div",{className:ms("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:t,onDragStart:o,onDragEnd:r,children:(0,d.jsxs)("div",{onMouseEnter:x,onMouseLeave:S,children:[(0,d.jsx)(ws.Tooltip,{text:y,children:(0,d.jsx)(ws.Composite.Item,{render:(0,d.jsx)("div",{"aria-label":y,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>_(c),children:(0,d.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[u,l&&(0,d.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,d.jsx)(ws.Spinner,{})})]})})}),!l&&(0,d.jsx)(OB,{category:n,media:e})]})})}),o&&(0,d.jsx)(zB,{onClose:()=>r(!1),onSubmit:()=>{t((0,p.cloneBlock)(c)),f((0,T.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),r(!1)}})]})}var FB=function({mediaList:e,category:t,onClick:n,label:o=(0,T.__)("Media List")}){return(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o,children:e.map(((e,o)=>(0,d.jsx)(VB,{media:e,category:t,onClick:n},e.id||e.sourceId||o)))})};function HB({rootClientId:e,onInsert:t,category:n}){const[o,r,i]=(0,m.useDebouncedInput)(),{mediaList:s,isLoading:l}=function(e,t={}){const[n,o]=(0,h.useState)(),[r,i]=(0,h.useState)(!1),s=(0,h.useRef)();return(0,h.useEffect)((()=>{(async()=>{const n=JSON.stringify({category:e.name,...t});s.current=n,i(!0),o([]);const r=await(e.fetch?.(t));n===s.current&&(o(r),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(n,{per_page:i?20:10,search:i}),a="block-editor-inserter__media-panel",c=n.labels.search_items||(0,T.__)("Search");return(0,d.jsxs)("div",{className:a,children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,className:`${a}-search`,onChange:r,value:o,label:c,placeholder:c}),l&&(0,d.jsx)("div",{className:`${a}-spinner`,children:(0,d.jsx)(ws.Spinner,{})}),!l&&!s?.length&&(0,d.jsx)(AC,{}),!l&&!!s?.length&&(0,d.jsx)(FB,{rootClientId:e,onClick:t,mediaList:s,category:n})]})}const UB=["image","video","audio"];var GB=function({rootClientId:e,selectedCategory:t,onSelectCategory:n,onInsert:o,children:r}){const i=function(e){const[t,n]=(0,h.useState)([]),o=(0,g.useSelect)((e=>G(e(ji)).getInserterMediaCategories()),[]),{canInsertImage:r,canInsertVideo:i,canInsertAudio:s}=(0,g.useSelect)((t=>{const{canInsertBlockType:n}=t(ji);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]);return(0,h.useEffect)((()=>{(async()=>{const e=[];if(!o)return;const t=new Map(await Promise.all(o.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),l={image:r,video:i,audio:s};o.forEach((n=>{l[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,i,s,o]),t}(e),s=(0,m.useViewportMatch)("medium","<"),l=(0,h.useCallback)((e=>{if(!e?.url)return;const[t]=NB(e,e.type);o(t)}),[o]),a=(0,h.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return a.length?(0,d.jsxs)(d.Fragment,{children:[!s&&(0,d.jsxs)("div",{className:"block-editor-inserter__media-tabs-container",children:[(0,d.jsx)(MB,{categories:a,selectedCategory:t,onSelectCategory:n,children:r}),(0,d.jsx)(Xa,{children:(0,d.jsx)(Ya,{multiple:!1,onSelect:l,allowedTypes:UB,render:({open:e})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:t=>{t.target.focus(),e()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,T.__)("Open Media Library")})})})]}),s&&(0,d.jsx)(wB,{categories:a,children:t=>(0,d.jsx)(HB,{onInsert:o,rootClientId:e,category:t})})]}):(0,d.jsx)(AC,{})};const{Fill:$B,Slot:WB}=(0,ws.createSlotFill)("__unstableInserterMenuExtension");$B.Slot=WB;var KB=$B;const ZB=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,qB=[];var YB=function({filterValue:e,onSelect:t,onHover:n,onHoverPattern:o,rootClientId:r,clientId:i,isAppender:s,__experimentalInsertionIndex:l,maxBlockPatterns:a,maxBlockTypes:c,showBlockDirectory:u=!1,isDraggable:p=!0,shouldFocusBlock:f=!0,prioritizePatterns:b,selectBlockOnInsert:k,isQuick:v}){const _=(0,m.useDebounce)(Uo.speak,500),{prioritizedBlocks:y}=(0,g.useSelect)((e=>{const t=e(ji).getBlockListSettings(r);return{prioritizedBlocks:t?.prioritizedInserterBlocks||qB}}),[r]),[x,S]=KC({onSelect:t,rootClientId:r,clientId:i,isAppender:s,insertionIndex:l,shouldFocusBlock:f,selectBlockOnInsert:k}),[w,C,B,I]=MC(x,S,v),[j,,E]=ZC(S,x,void 0,v),M=(0,h.useMemo)((()=>{if(0===a)return[];const t=mB(j,e);return void 0!==a?t.slice(0,a):t}),[e,j,a]);let P=c;b&&M.length>2&&(P=0);const R=(0,h.useMemo)((()=>{if(0===P)return[];let t=xt(w.filter((e=>"core/block"!==e.name)),"frecency","desc");!e&&y.length&&(t=ZB(t,y));const n=gB(t,C,B,e);return void 0!==P?n.slice(0,P):n}),[e,w,C,B,P,y]);(0,h.useEffect)((()=>{if(!e)return;const t=R.length+M.length,n=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",t),t);_(n)}),[e,_,R,M]);const A=(0,m.useAsyncList)(R,{step:9}),N=R.length>0||M.length>0,L=!!R.length&&(0,d.jsx)(TC,{title:(0,d.jsx)(ws.VisuallyHidden,{children:(0,T.__)("Blocks")}),children:(0,d.jsx)(EC,{items:A,onSelect:I,onHover:n,label:(0,T.__)("Blocks"),isDraggable:p})}),D=!!M.length&&(0,d.jsx)(TC,{title:(0,d.jsx)(ws.VisuallyHidden,{children:(0,T.__)("Block patterns")}),children:(0,d.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,d.jsx)($C,{blockPatterns:M,onClickPattern:E,onHover:o,isDraggable:p})})});return(0,d.jsxs)(RC,{children:[!u&&!N&&(0,d.jsx)(AC,{}),b?D:L,!!R.length&&!!M.length&&(0,d.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?L:D,u&&(0,d.jsx)(KB.Slot,{fillProps:{onSelect:I,onHover:n,filterValue:e,hasItems:N,rootClientId:x},children:e=>e.length?e:N?null:(0,d.jsx)(AC,{})})]})},XB=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const{Tabs:QB}=G(ws.privateApis);var JB=(0,h.forwardRef)((function({defaultTabId:e,onClose:t,onSelect:n,selectedTab:o,tabs:r,closeButtonLabel:i},s){return(0,d.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,d.jsxs)(QB,{selectOnMove:!1,defaultTabId:e,onSelect:n,selectedTabId:o,children:[(0,d.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,d.jsx)(ws.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:XB,label:i,onClick:()=>t(),size:"compact"}),(0,d.jsx)(QB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:r.map((e=>(0,d.jsx)(QB.Tab,{tabId:e.name,className:"block-editor-tabbed-sidebar__tab",children:e.title},e.name)))})]}),r.map((e=>(0,d.jsx)(QB.TabPanel,{tabId:e.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:e.panelRef,children:e.panel},e.name)))]})})}));function eI(e=!0){const{setZoomLevel:t,resetZoomLevel:n}=G((0,g.useDispatch)(ji)),{isZoomedOut:o,isZoomOut:r}=(0,g.useSelect)((e=>{const{isZoomOut:t}=G(e(ji));return{isZoomedOut:t(),isZoomOut:t}}),[]),i=(0,h.useRef)(!1),s=(0,h.useRef)(e);(0,h.useEffect)((()=>{o!==s.current&&(i.current=!1)}),[o]),(0,h.useEffect)((()=>(s.current=e,e!==r()&&(i.current=!0,e?t("auto-scaled"):n()),()=>{i.current&&r()&&n()})),[e,r,n,t])}const tI=()=>{};const nI=(0,h.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:l="",shouldFocusBlock:a=!0,onPatternCategorySelection:c,onClose:u,__experimentalInitialTab:p,__experimentalInitialCategory:f},b){const{isZoomOutMode:k,hasSectionRootClientId:v}=(0,g.useSelect)((e=>{const{isZoomOut:t,getSectionRootClientId:n}=G(e(ji));return{isZoomOutMode:t(),hasSectionRootClientId:!!n()}}),[]),[_,y,x]=(0,m.useDebouncedInput)(l),[S,w]=(0,h.useState)(null),[C,B]=(0,h.useState)(f),[I,j]=(0,h.useState)("all"),[E,M]=(0,h.useState)(null),P=(0,m.useViewportMatch)("large"),[R,A]=(0,h.useState)(p||(k?"patterns":"blocks"));eI(v&&("patterns"===R||"media"===R)&&P);const[N,L,D]=KC({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:a}),O=(0,h.useRef)(),z=(0,h.useCallback)(((e,t,n,o)=>{L(e,t,n,o),r(e),window.requestAnimationFrame((()=>{a||O.current?.contains(b.current.ownerDocument.activeElement)||O.current?.querySelector("button").focus()}))}),[L,r,a]),V=(0,h.useCallback)(((e,t,...n)=>{D(!1),L(e,{patternName:t},...n),r()}),[L,r]),F=(0,h.useCallback)((e=>{D(e),w(e)}),[D,w]),H=(0,h.useCallback)(((e,t)=>{B(e),j(t),c?.()}),[B,c]),U="patterns"===R&&!x&&!!C,$="media"===R&&!!E,W=(0,h.useMemo)((()=>"media"===R?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{S&&w(null),y(e)},value:_,label:(0,T.__)("Search"),placeholder:(0,T.__)("Search")}),!!x&&(0,d.jsx)(YB,{filterValue:x,onSelect:r,onHover:F,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:a,prioritizePatterns:"patterns"===R})]})),[R,S,w,y,_,x,r,F,a,t,e,o,n]),K=(0,h.useMemo)((()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,d.jsx)(DC,{ref:O,rootClientId:N,onInsert:z,onHover:F,showMostUsedBlocks:s})}),i&&(0,d.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"h2",children:(0,T.__)("A tip for using the block editor")}),(0,d.jsx)(Kb,{})]})]})),[N,z,F,s,i]),Z=(0,h.useMemo)((()=>(0,d.jsx)(PB,{rootClientId:N,onInsert:V,onSelectCategory:H,selectedCategory:C,children:U&&(0,d.jsx)(EB,{rootClientId:N,onInsert:V,category:C,patternFilter:I,showTitlesAsTooltip:!0})})),[N,V,H,I,C,U]),q=(0,h.useMemo)((()=>(0,d.jsx)(GB,{rootClientId:N,selectedCategory:E,onSelectCategory:M,onInsert:z,children:$&&(0,d.jsx)(HB,{rootClientId:N,onInsert:z,category:E})})),[N,z,E,M,$]),Y=(0,h.useRef)();return(0,h.useLayoutEffect)((()=>{Y.current&&window.requestAnimationFrame((()=>{Y.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()}))}),[]),(0,d.jsxs)("div",{className:ms("block-editor-inserter__menu",{"show-panel":U||$,"is-zoom-out":k}),ref:b,children:[(0,d.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,d.jsx)(JB,{ref:Y,onSelect:e=>{"patterns"!==e&&B(null),A(e)},onClose:u,selectedTab:R,closeButtonLabel:(0,T.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,T.__)("Blocks"),panel:(0,d.jsxs)(d.Fragment,{children:[W,"blocks"===R&&!x&&K]})},{name:"patterns",title:(0,T.__)("Patterns"),panel:(0,d.jsxs)(d.Fragment,{children:[W,"patterns"===R&&!x&&Z]})},{name:"media",title:(0,T.__)("Media"),panel:(0,d.jsxs)(d.Fragment,{children:[W,q]})}]})}),i&&S&&(0,d.jsx)(ws.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,d.jsx)(_C,{item:S})})]})}));var oI=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(nI,{...e,onPatternCategorySelection:tI,ref:t})}));function rI({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:r,hasSearch:i=!0}){const[s,l]=(0,h.useState)(""),[a,c]=KC({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:r}),[u]=MC(a,c,!0),{setInserterIsOpened:p,insertionIndex:m}=(0,g.useSelect)((e=>{const{getSettings:t,getBlockIndex:o,getBlockCount:r}=e(ji),i=t(),s=o(n),l=r();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===s?l:s}}),[n]),f=i&&u.length>6;(0,h.useEffect)((()=>{p&&p(!1)}),[p]);return(0,d.jsxs)("div",{className:ms("block-editor-inserter__quick-inserter",{"has-search":f,"has-expand":p}),children:[f&&(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{l(e)},label:(0,T.__)("Search"),placeholder:(0,T.__)("Search")}),(0,d.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,d.jsx)(YB,{filterValue:s,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:s?2:0,maxBlockTypes:6,isDraggable:!1,selectBlockOnInsert:r,isQuick:!0})}),p&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{p({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})},"aria-label":(0,T.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,T.__)("Browse all")})]})}const iI=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:i={}})=>{const{as:s=ws.Button,label:l,onClick:a,...c}=i;let u=l;return!u&&r?u=(0,T.sprintf)((0,T._x)("Add %s","directly add the only allowed block"),o):u||(u=(0,T._x)("Add block","Generic label for block inserter button")),(0,d.jsx)(s,{__next40pxDefaultSize:!i.as||void 0,icon:cc,label:u,tooltipPosition:"bottom",onClick:function(t){e&&e(t),a&&a(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t,...c})};class sI extends h.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s,hasItems:l,renderToggle:a=iI}=this.props;return a({onToggle:e,isOpen:t,disabled:n||!l,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:l}=this.props;return i?(0,d.jsx)(rI,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;s&&"function"==typeof s&&s(n),e()},rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:l}):(0,d.jsx)(oI,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,d.jsx)(ws.Dropdown,{className:"block-editor-inserter",contentClassName:ms("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,T.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var lI=(0,m.compose)([(0,g.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:o=!0})=>{const{getBlockRootClientId:r,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:l}=e(ji),{getBlockVariations:a}=e(p.store),c=s(n=n||r(t)||void 0),u=o&&l(n),d=1===c?.length&&0===a(c[0].name,"inserter")?.length;let h=!1;return d&&(h=c[0]),{hasItems:i(n),hasSingleBlockType:d,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:u,rootClientId:n}})),(0,g.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:i,hasSingleBlockType:s,allowedBlockType:l,directInsertBlock:a,onSelectOrClose:c,selectBlockOnInsert:u}=t;if(!s&&!a)return;const{insertBlock:d}=e(ji);let h;if(a){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=n(ji);if(!e||!r&&!o)return{};const s={};let l={};if(r){const e=t(r),n=t(i(r));e?.name===n?.name&&(l=n?.attributes||{})}else{const e=t(o);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];a&&a?.name===t.name&&(l=t.attributes)}}return e.forEach((e=>{l.hasOwnProperty(e)&&(s[e]=l[e])})),s}(a.attributesToCopy);h=(0,p.createBlock)(a.name,{...a.attributes||{},...e})}else h=(0,p.createBlock)(l.name);d(h,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:s,getBlockRootClientId:l}=n(ji);if(r)return e(r);const a=t();return!i&&a&&l(a)===o?e(a)+1:s(o).length}(),o,u),c&&c(h);const g=(0,T.sprintf)((0,T.__)("%s block added"),l.title);(0,Uo.speak)(g)}}))),(0,m.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(sI);function aI({rootClientId:e,className:t,onFocus:n,tabIndex:o,onSelect:r},i){return(0,d.jsx)(lI,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...e)=>{r&&"function"==typeof r&&r(...e)},renderToggle:({onToggle:e,disabled:r,isOpen:s,blockTitle:l,hasSingleBlockType:a})=>{const c=!a,u=a?(0,T.sprintf)((0,T._x)("Add %s","directly add the only allowed block"),l):(0,T._x)("Add block","Generic label for block inserter button");return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:n,tabIndex:o,className:ms(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":c?"true":void 0,"aria-expanded":c?s:void 0,disabled:r,label:u,showTooltip:!0,children:(0,d.jsx)(Ol,{icon:cc})})},isAppender:!0})}const cI=(0,h.forwardRef)(((e,t)=>(I()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),aI(e,t))));var uI=(0,h.forwardRef)(aI);function dI({clientId:e,contentRef:t,parentLayout:n}){const o=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree),[]),r=bh(e);if(o||!r)return null;const i=n?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,d.jsx)(pI,{gridClientId:e,gridElement:r,isManualGrid:i,ref:t})}const pI=(0,h.forwardRef)((({gridClientId:e,gridElement:t,isManualGrid:n},o)=>{const[r,i]=(0,h.useState)((()=>$b(t))),[s,l]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{const e=()=>i($b(t)),n=new window.ResizeObserver(e);n.observe(t,{box:"border-box"});const o=new window.ResizeObserver(e);return o.observe(t),()=>{n.disconnect(),o.disconnect()}}),[t]),(0,h.useEffect)((()=>{function e(){l(!0)}function t(){l(!1)}return document.addEventListener("drag",e),document.addEventListener("dragend",t),()=>{document.removeEventListener("drag",e),document.removeEventListener("dragend",t)}}),[]),(0,d.jsx)(of,{className:ms("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,d.jsx)("div",{ref:o,className:"block-editor-grid-visualizer__grid",style:r.style,children:n?(0,d.jsx)(hI,{gridClientId:e,gridInfo:r}):Array.from({length:r.numItems},((e,t)=>(0,d.jsx)(gI,{color:r.currentColor},t)))})})}));function hI({gridClientId:e,gridInfo:t}){const[n,o]=(0,h.useState)(null),r=(0,g.useSelect)((t=>{const{getBlockOrder:n,getBlockStyles:o}=G(t(ji));return o(n(e))}),[e]),i=(0,h.useMemo)((()=>{const e=[];for(const t of Object.values(r)){const{columnStart:n,rowStart:o,columnSpan:r=1,rowSpan:i=1}=t?.layout??{};n&&o&&e.push(new Fb({columnStart:n,rowStart:o,columnSpan:r,rowSpan:i}))}return e}),[r]);return Vb(1,t.numRows).map((r=>Vb(1,t.numColumns).map((s=>{const l=i.some((e=>e.contains(s,r))),a=n?.contains(s,r)??!1;return(0,d.jsx)(gI,{color:t.currentColor,className:a&&"is-highlighted",children:l?(0,d.jsx)(fI,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o}):(0,d.jsx)(bI,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o})},`${r}-${s}`)}))))}function gI({color:e,children:t,className:n}){return(0,d.jsx)("div",{className:ms("block-editor-grid-visualizer__cell",n),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function mI(e,t,n,o,r){const{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:l,getBlockName:a}=(0,g.useSelect)(ji),{updateBlockAttributes:c,moveBlocksToPosition:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,g.useDispatch)(ji),p=km(n,o.numColumns);return function({validateDrag:e,onDragEnter:t,onDragLeave:n,onDrop:o}){const{getDraggedBlockClientIds:r}=(0,g.useSelect)(ji);return(0,m.__experimentalUseDropZone)({onDragEnter(){const[n]=r();n&&e(n)&&t(n)},onDragLeave(){n()},onDrop(){const[t]=r();t&&e(t)&&o(t)}})}({validateDrag(r){const s=a(r);if(!l(s,n))return!1;const c=i(r),u=new Fb({columnStart:e,rowStart:t,columnSpan:c.style?.layout?.columnSpan,rowSpan:c.style?.layout?.rowSpan});return new Fb({columnSpan:o.numColumns,rowSpan:o.numRows}).containsRect(u)},onDragEnter(n){const o=i(n);r(new Fb({columnStart:e,rowStart:t,columnSpan:o.style?.layout?.columnSpan,rowSpan:o.style?.layout?.rowSpan}))},onDragLeave(){r((n=>n?.columnStart===e&&n?.rowStart===t?null:n))},onDrop(o){r(null);const l=i(o);c(o,{style:{...l.style,layout:{...l.style?.layout,columnStart:e,rowStart:t}}}),d(),u([o],s(o),n,p(e,t))}})}function fI({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){return(0,d.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:mI(e,t,n,o,r)})}function bI({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){const{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,g.useDispatch)(ji),a=km(n,o.numColumns);return(0,d.jsx)(uI,{rootClientId:n,className:"block-editor-grid-visualizer__appender",ref:mI(e,t,n,o,r),style:{color:o.currentColor},onSelect:o=>{o&&(i(o.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),l(),s([o.clientId],n,n,a(e,t)))}})}function kI({clientId:e,bounds:t,onChange:n,parentLayout:o}){const r=bh(e),i=r?.parentElement,{isManualPlacement:s}=o;return r&&i?(0,d.jsx)(vI,{clientId:e,bounds:t,blockElement:r,rootBlockElement:i,onChange:n,isManualGrid:s&&window.__experimentalEnableGridInteractivity}):null}function vI({clientId:e,bounds:t,blockElement:n,rootBlockElement:o,onChange:r,isManualGrid:i}){const[s,l]=(0,h.useState)(null),[a,c]=(0,h.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,h.useEffect)((()=>{const e=new window.ResizeObserver((()=>{const e=n.getBoundingClientRect(),t=o.getBoundingClientRect();c({top:e.top>t.top,bottom:e.bottom<t.bottom,left:e.left>t.left,right:e.right<t.right})}));return e.observe(n),()=>e.disconnect()}),[n,o]);const u={right:"left",left:"right"},p={top:"flex-end",bottom:"flex-start"},g={display:"flex",justifyContent:"center",alignItems:"center",...u[s]&&{justifyContent:u[s]},...p[s]&&{alignItems:p[s]}};return(0,d.jsx)(of,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:g,children:(0,d.jsx)(ws.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:a.bottom,bottomLeft:!1,bottomRight:!1,left:a.left,right:a.right,top:a.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:e,pointerId:t})=>{e.setPointerCapture(t)},onResizeStart:(e,t)=>{l(t)},onResizeStop:(e,t,s)=>{const l=parseFloat(Hb(o,"column-gap")),a=parseFloat(Hb(o,"row-gap")),c=Ub(Hb(o,"grid-template-columns"),l),u=Ub(Hb(o,"grid-template-rows"),a),d=new window.DOMRect(n.offsetLeft+s.offsetLeft,n.offsetTop+s.offsetTop,s.offsetWidth,s.offsetHeight),p=Gb(c,d.left)+1,h=Gb(u,d.top)+1,g=Gb(c,d.right,"end")+1,m=Gb(u,d.bottom,"end")+1;r({columnSpan:g-p+1,rowSpan:m-h+1,columnStart:i?p:void 0,rowStart:i?h:void 0})}})})}var _I=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),yI=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});function xI({layout:e,parentLayout:t,onChange:n,gridClientId:o,blockClientId:r}){const{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,g.useDispatch)(ji),l=e?.columnStart??1,a=e?.rowStart??1,c=l+(e?.columnSpan??1)-1,u=a+(e?.rowSpan??1)-1,p=t?.columnCount,h=t?.rowCount,m=km(o,p);return(0,d.jsx)(Rs,{group:"parent",children:(0,d.jsxs)(ws.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,d.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,d.jsx)(SI,{icon:(0,T.isRTL)()?Zb:qb,label:(0,T.__)("Move left"),description:(0,T.__)("Move left"),isDisabled:l<=1,onClick:()=>{n({columnStart:l-1}),s(),i([r],o,o,m(l-1,a))}})}),(0,d.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,d.jsx)(SI,{className:"is-up-button",icon:_I,label:(0,T.__)("Move up"),description:(0,T.__)("Move up"),isDisabled:a<=1,onClick:()=>{n({rowStart:a-1}),s(),i([r],o,o,m(l,a-1))}}),(0,d.jsx)(SI,{className:"is-down-button",icon:yI,label:(0,T.__)("Move down"),description:(0,T.__)("Move down"),isDisabled:h&&u>=h,onClick:()=>{n({rowStart:a+1}),s(),i([r],o,o,m(l,a+1))}})]}),(0,d.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,d.jsx)(SI,{icon:(0,T.isRTL)()?qb:Zb,label:(0,T.__)("Move right"),description:(0,T.__)("Move right"),isDisabled:p&&c>=p,onClick:()=>{n({columnStart:l+1}),s(),i([r],o,o,m(l+1,a))}})})]})})}function SI({className:e,icon:t,label:n,isDisabled:o,onClick:r,description:i}){const s=`block-editor-grid-item-mover-button__description-${(0,m.useInstanceId)(SI)}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarButton,{className:ms("block-editor-grid-item-mover-button",e),icon:t,label:n,"aria-describedby":s,onClick:o?null:r,disabled:o,accessibleWhenDisabled:!0}),(0,d.jsx)(ws.VisuallyHidden,{id:s,children:i})]})}const wI={};function CI({clientId:e,style:t,setAttributes:n,allowSizingOnChildren:o,isManualPlacement:r,parentLayout:i}){const{rootClientId:s,isVisible:l}=(0,g.useSelect)((t=>{const{getBlockRootClientId:n,getBlockEditingMode:o,getTemplateLock:r}=t(ji),i=n(e);return r(i)||"default"!==o(i)?{rootClientId:i,isVisible:!1}:{rootClientId:i,isVisible:!0}}),[e]),[a,c]=(0,h.useState)();if(!l)return null;function u(e){n({style:{...t,layout:{...t?.layout,...e}}})}return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(dI,{clientId:s,contentRef:c,parentLayout:i}),o&&(0,d.jsx)(kI,{clientId:e,bounds:a,onChange:u,parentLayout:i}),r&&window.__experimentalEnableGridInteractivity&&(0,d.jsx)(xI,{layout:t?.layout,parentLayout:i,onChange:u,gridClientId:s,blockClientId:e})]})}var BI={useBlockProps:function({style:e}){const t=(0,g.useSelect)((e=>!e(ji).getSettings().disableLayoutStyles)),n=e?.layout??{},{selfStretch:o,flexSize:r,columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=n,c=ta()||{},{columnCount:u,minimumColumnWidth:d}=c,p=(0,m.useInstanceId)(wI),h=`.wp-container-content-${p}`;let f="";if(t&&("fixed"===o&&r?f=`${h} {\n\t\t\t\tflex-basis: ${r};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===o?f=`${h} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`:i&&l?f=`${h} {\n\t\t\t\tgrid-column: ${i} / span ${l};\n\t\t\t}`:i?f=`${h} {\n\t\t\t\tgrid-column: ${i};\n\t\t\t}`:l&&(f=`${h} {\n\t\t\t\tgrid-column: span ${l};\n\t\t\t}`),s&&a?f+=`${h} {\n\t\t\t\tgrid-row: ${s} / span ${a};\n\t\t\t}`:s?f+=`${h} {\n\t\t\t\tgrid-row: ${s};\n\t\t\t}`:a&&(f+=`${h} {\n\t\t\t\tgrid-row: span ${a};\n\t\t\t}`),(l||i)&&(d||!u))){let e=parseFloat(d);isNaN(e)&&(e=12);let t=d?.replace(e,"");["px","rem","em"].includes(t)||(t="rem");let n=2;n=l&&i?l+i-1:l||i;const o="px"===t?24:1.5,r=n*e+(n-1)*o,s=2*e+o-1,a=l&&l>1?"1/-1":"auto";f+=`@container (max-width: ${Math.max(r,s)}${t}) {\n\t\t\t\t${h} {\n\t\t\t\t\tgrid-column: ${a};\n\t\t\t\t\tgrid-row: auto;\n\t\t\t\t}\n\t\t\t}`}if(_s({css:f}),f)return{className:`wp-container-content-${p}`}},edit:function({clientId:e,style:t,setAttributes:n}){const o=ta()||{},{type:r="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=o;return"grid"!==r?null:(0,d.jsx)(CI,{clientId:e,style:t,setAttributes:n,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:o})},attributeKeys:["style"],hasSupport:()=>!0};var II={edit:function({clientId:e}){const{templateLock:t,isLockedByParent:n,isEditingAsBlocks:o}=(0,g.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=G(t(ji));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{stopEditingAsBlocks:r}=G((0,g.useDispatch)(ji)),i=!n&&"contentOnly"===t,s=(0,h.useCallback)((()=>{r(e)}),[e,r]);return i||o?o&&!i&&(0,d.jsx)(Rs,{group:"other",children:(0,d.jsx)(ws.ToolbarButton,{onClick:s,children:(0,T.__)("Done")})}):null},hasSupport:()=>!0};const jI="metadata";(0,f.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[jI]?.type||(e.attributes={...e.attributes,[jI]:{type:"object"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",(function(e,t,n,o){if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(o.length>1&&t.length>1&&o.length!==t.length)return e;const r=t[n]?.attributes?.metadata;if(!r)return e;const i={};return r.noteId&&!e.attributes?.metadata?.noteId&&(i.noteId=r.noteId),r.name&&!e.attributes?.metadata?.name&&(0,p.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=r.name),void 0!==r.blockVisibility&&!e.attributes?.metadata?.blockVisibility&&(0,p.hasBlockSupport)(e.name,"blockVisibility",!0)&&(i.blockVisibility=r.blockVisibility),Object.keys(i).length>0?{...e,attributes:{...e.attributes,metadata:{...e.attributes.metadata,...i}}}:e}));const EI={};var TI={edit:function({name:e,clientId:t,metadata:{ignoredHookedBlocks:n=[]}={}}){const o=(0,g.useSelect)((e=>e(p.store).getBlockTypes()),[]),r=(0,h.useMemo)((()=>o?.filter((({name:t,blockHooks:o})=>o&&e in o||n.includes(t)))),[o,e,n]),i=(0,g.useSelect)((n=>{const{getBlocks:o,getBlockRootClientId:i,getGlobalBlockCount:s}=n(ji),l=i(t),a=r.reduce(((n,r)=>{if(0===s(r.name))return n;const i=r?.blockHooks?.[e];let a;switch(i){case"before":case"after":a=o(l);break;case"first_child":case"last_child":a=o(t);break;case void 0:a=[...o(l),...o(t)]}const c=a?.find((e=>e.name===r.name));return c?{...n,[r.name]:c.clientId}:n}),{});return Object.values(a).length>0?a:EI}),[r,e,t]),{getBlockIndex:s,getBlockCount:l,getBlockRootClientId:a}=(0,g.useSelect)(ji),{insertBlock:c,removeBlock:u}=(0,g.useDispatch)(ji);if(!r.length)return null;const m=r.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,d.jsx)(Fa,{children:(0,d.jsxs)(ws.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,T.__)("Plugins"),initialOpen:!0,children:[(0,d.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,T.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(m).map((n=>(0,d.jsxs)(h.Fragment,{children:[(0,d.jsx)("h3",{children:n}),m[n].map((n=>{const o=n.name in i;return(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,checked:o,label:n.title,onChange:()=>{if(o)u(i[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{const o=s(t),r=l(t),i=a(t);switch(n){case"before":case"after":c(e,"after"===n?o+1:o,i,!1);break;case"first_child":case"last_child":c(e,"first_child"===n?0:r,t,!1);break;case void 0:c(e,o+1,i,!1)}})((0,p.createBlock)(n.name),o)}}},n.title)}))]},n)))]})})},attributeKeys:["metadata"],hasSupport:()=>!0};const{Menu:MI}=G(ws.privateApis),PI={},RI=(e,t)=>{const n=(0,p.getBlockType)(e).attributes?.[t]?.type;return"rich-text"===n?"string":n};function AI({attribute:e,binding:t,sources:n}){const{clientId:o}=C(),{updateBlockBindings:r}=dv(),i=(0,m.useViewportMatch)("medium","<"),s=(0,h.useContext)(sv),{attributeType:l,select:a}=(0,g.useSelect)((t=>{const{name:n}=t(ji).getBlock(o);return{attributeType:RI(n,e),select:t}}),[o,e]);return(0,d.jsx)(MI,{placement:i?"bottom-start":"left-start",children:Object.entries(n).map((([n,o])=>{const c=o.data?.filter((e=>e?.type===l));return!c||0===c.length?null:(0,d.jsxs)(MI,{placement:i?"bottom-start":"left-start",children:[(0,d.jsx)(MI.SubmenuTriggerItem,{children:(0,d.jsx)(MI.ItemLabel,{children:o.label})}),(0,d.jsx)(MI.Popover,{gutter:8,children:(0,d.jsx)(MI.Group,{children:c.map((i=>{const l={source:n,args:i?.args||{key:i.key}},c=o.getValues({select:a,context:s,bindings:{[e]:l}});return(0,d.jsxs)(MI.CheckboxItem,{onChange:()=>{const n=E()(t?.args,i.args)??i.key===t?.args?.key;r(n?{[e]:void 0}:{[e]:l})},name:e+"-binding",value:c[e],checked:E()(t?.args,i.args)??i.key===t?.args?.key,children:[(0,d.jsx)(MI.ItemLabel,{children:i?.label}),(0,d.jsx)(MI.ItemHelpText,{children:c[e]})]},n+JSON.stringify(i.args)||i.key)}))})})]},n)}))})}function NI({attribute:e,binding:t,sources:n,blockName:o}){const{source:r,args:i}=t||{},s=n?.[r];let l,a=!0;if(void 0===t){const t=RI(o,e);l=Object.values(n).some((e=>e.data?.some((e=>e?.type===t))))?(0,T.__)("Not connected"):(0,T.__)("No sources available"),a=!0}else s?l=s.data?.find((e=>E()(e.args,i)))?.label||s.label||r:(a=!1,l=(0,T.__)("Source not registered"),0===Object.keys(n).length&&(l=(0,T.__)("No sources available")));return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,d.jsx)(ws.__experimentalText,{truncate:!0,children:e}),(0,d.jsx)(ws.__experimentalText,{truncate:!0,variant:a?"muted":void 0,isDestructive:!a,children:l})]})}function LI({attribute:e,binding:t,sources:n,blockName:o}){const r=(0,m.useViewportMatch)("medium","<");return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,children:(0,d.jsx)(MI,{placement:r?"bottom-start":"left-start",children:(0,d.jsx)(MI.TriggerButton,{render:(0,d.jsx)(ws.__experimentalItem,{}),disabled:!0,children:(0,d.jsx)(NI,{attribute:e,binding:t,sources:n,blockName:o})})})})}function DI({attribute:e,binding:t,sources:n,blockName:o}){const{updateBlockBindings:r}=dv(),i=(0,m.useViewportMatch)("medium","<");return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:()=>{r({[e]:void 0})},children:(0,d.jsxs)(MI,{placement:i?"bottom-start":"left-start",children:[(0,d.jsx)(MI.TriggerButton,{render:(0,d.jsx)(ws.__experimentalItem,{}),children:(0,d.jsx)(NI,{attribute:e,binding:t,sources:n,blockName:o})}),(0,d.jsx)(MI.Popover,{gutter:i?8:36,children:(0,d.jsx)(AI,{attribute:e,binding:t,sources:n})})]})})}var OI={edit:({name:e,metadata:t})=>{const n=(0,h.useContext)(sv),{removeAllBlockBindings:o}=dv(),r=(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},i={},{sources:s,canUpdateBlockBindings:l,bindableAttributes:a}=(0,g.useSelect)((t=>{const{__experimentalBlockBindingsSupportedAttributes:o}=t(ji).getSettings(),r=o?.[e];if(!r||0===r.length)return PI;const s=(0,p.getBlockBindingsSources)();return Object.entries(s).forEach((([e,{getFieldsList:o,usesContext:r,label:s,getValues:l}])=>{const a={};if(r?.length)for(const e of r)a[e]=n[e];if(o){const n=o({select:t,context:a});i[e]={data:n||[],label:s,getValues:l}}else i[e]={data:[],label:s,getValues:l}})),{sources:Object.values(i).length>0?i:PI,canUpdateBlockBindings:t(ji).getSettings().canUpdateBlockBindings,bindableAttributes:r}}),[n,e]);if(!a||0===a.length)return null;const{bindings:c}=t||{},u=Object.values(s).some((e=>e.data&&e.data.length>0)),f=!l||!u;return void 0!==c||u?(0,d.jsx)(Fa,{group:"bindings",children:(0,d.jsxs)(ws.__experimentalToolsPanel,{label:(0,T.__)("Attributes"),resetAll:()=>{o()},dropdownMenuProps:r,className:"block-editor-bindings__panel",children:[(0,d.jsx)(ws.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:a.map((t=>{const n=c?.[t],o=RI(e,t),r=Object.values(s).some((e=>e.data?.some((e=>e?.type===o))));return f||!r?(0,d.jsx)(LI,{attribute:t,binding:n,sources:s,blockName:e},t):(0,d.jsx)(DI,{attribute:t,binding:n,sources:s,blockName:e},t)}))}),(0,d.jsx)(ws.__experimentalText,{as:"div",variant:"muted",children:(0,d.jsx)("p",{children:(0,T.__)("Attributes connected to custom fields or other dynamic data.")})})]})}):null},attributeKeys:["metadata"],hasSupport:()=>!0};function zI(e,t,n,o,r=1,i=1){for(let s=i;;s++)for(let l=s===i?r:1;l<=t;l++){const t=new Fb({columnStart:l,rowStart:s,columnSpan:n,rowSpan:o});if(!e.some((e=>e.intersectsRect(t))))return[l,s]}}function VI(e){!function({clientId:e}){const{gridLayout:t,blockOrder:n,selectedBlockLayout:o}=(0,g.useSelect)((t=>{const{getBlockAttributes:n,getBlockOrder:o}=t(ji),r=t(ji).getSelectedBlock();return{gridLayout:n(e).layout??{},blockOrder:o(e),selectedBlockLayout:r?.attributes.style?.layout}}),[e]),{getBlockAttributes:r,getBlockRootClientId:i}=(0,g.useSelect)(ji),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,g.useDispatch)(ji),a=(0,h.useMemo)((()=>o?new Fb(o):null),[o]),c=(0,m.usePrevious)(a),u=(0,m.usePrevious)(t.isManualPlacement),d=(0,m.usePrevious)(n);(0,h.useEffect)((()=>{const o={};if(t.isManualPlacement){const s=[];for(const e of n){const{columnStart:t,rowStart:n,columnSpan:o=1,rowSpan:i=1}=r(e).style?.layout??{};t&&n&&s.push(new Fb({columnStart:t,rowStart:n,columnSpan:o,rowSpan:i}))}for(const e of n){const n=r(e),{columnStart:i,rowStart:l,columnSpan:a=1,rowSpan:u=1}=n.style?.layout??{};if(i&&l)continue;const[d,p]=zI(s,t.columnCount,a,u,c?.columnEnd,c?.rowEnd);s.push(new Fb({columnStart:d,rowStart:p,columnSpan:a,rowSpan:u})),o[e]={style:{...n.style,layout:{...n.style?.layout,columnStart:d,rowStart:p}}}}const l=Math.max(...s.map((e=>e.rowEnd)));(!t.rowCount||t.rowCount<l)&&(o[e]={layout:{...t,rowCount:l}});for(const e of d??[])if(!n.includes(e)){const t=i(e);if(null===t)continue;const n=r(t);if("grid"===n?.layout?.type)continue;const s=r(e),{columnStart:l,rowStart:a,columnSpan:c,rowSpan:u,...d}=s.style?.layout??{};if(l||a||c||u){const t=0===Object.keys(d).length;o[e]=me(s,["style","layout"],t?void 0:d)}}}else{if(!0===u)for(const e of n){const t=r(e),{columnStart:n,rowStart:i,...s}=t.style?.layout??{};if(n||i){const n=0===Object.keys(s).length;o[e]=me(t,["style","layout"],n?void 0:s)}}t.rowCount&&(o[e]={layout:{...t,rowCount:void 0}})}Object.keys(o).length&&(l(),s(Object.keys(o),o,!0))}),[e,t,d,n,c,u,l,r,i,s])}(e)}function FI({clientId:e,layout:t}){const n=(0,g.useSelect)((t=>{const{isBlockSelected:n,isDraggingBlocks:o,getTemplateLock:r,getBlockEditingMode:i}=t(ji);return!(!o()&&!n(e)||r(e)||"default"!==i(e))}),[e]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(VI,{clientId:e}),n&&(0,d.jsx)(dI,{clientId:e,parentLayout:t})]})}(0,f.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,p.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const HI=(0,m.createHigherOrderComponent)((e=>t=>"grid"!==t.attributes.layout?.type?(0,d.jsx)(e,{...t},"edit"):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(FI,{clientId:t.clientId,layout:t.attributes.layout}),(0,d.jsx)(e,{...t},"edit")]})),"addGridVisualizerToBlockEdit");function UI(e){const t=e.style?.border||{};return{className:Lp(e)||void 0,style:kf({border:t})}}function GI(e){const{colors:t}=Nd(),n=UI(e),{borderColor:o}=e;if(o){const e=Ip({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function $I(e){return{style:kf({shadow:e.style?.shadow||""})}}function WI(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,i=Ad("background-color",t),s=Ad("color",n),l=Op(o),a=l||r?.color?.gradient;return{className:ms(s,l,{[i]:!a&&!!i,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:kf({color:r?.color||{}})}}function KI(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,i,s,l,a,c]=Ti("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),u=(0,h.useMemo)((()=>[...r||[],...i||[],...s||[]]),[r,i,s]),d=(0,h.useMemo)((()=>[...l||[],...a||[],...c||[]]),[l,a,c]),p=WI(e);if(t){const e=Pd(u,t);p.style.backgroundColor=e.color}if(o&&(p.style.background=zp(d,o)),n){const e=Pd(u,n);p.style.color=e.color}return p}function ZI(e){const{style:t}=e;return{style:kf({spacing:t?.spacing||{}})}}(0,f.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",HI);const{kebabCase:qI}=G(ws.privateApis);function YI(e,t){let n=e?.style?.typography||{};n={...n,fontSize:Wi({size:e?.style?.typography?.fontSize},t)};const o=kf({typography:n}),r=e?.fontFamily?`has-${qI(e.fontFamily)}-font-family`:"";return{className:ms(r,e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"",Pg(e?.fontSize)),style:o}}function XI(e){const[t,n]=(0,h.useState)(e);return(0,h.useEffect)((()=>{e&&n(e)}),[e]),t}var QI;!function(e){e=e.map((e=>({...e,Edit:(0,h.memo)(e.edit)})));const t=(0,m.createHigherOrderComponent)((t=>n=>{const o=C();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:i,attributeKeys:s=[],shareWithChildBlocks:l}=e;if(!(o[b]||o[k]&&l)||!i(n.name))return null;const a={};for(const e of s)n.attributes[e]&&(a[e]=n.attributes[e]);return(0,d.jsx)(r,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...a},t)})),(0,d.jsx)(t,{...n},"edit")]}),"withBlockEditHooks");(0,f.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([ka,Kg,qu,Xu,Cf,Zf,Xg,lb,Lb,II,TI,OI,BI,Wu].filter(Boolean)),function(e){const t=(0,m.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,h.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:i=[],useBlockProps:s,isMatch:l}=e,a={};for(const e of i)n.attributes[e]&&(a[e]=n.attributes[e]);return!Object.keys(a).length||!o(n.name)||l&&!l(a)?null:(0,d.jsx)(Ss,{index:t,useBlockProps:s,setAllWrapperProps:r,name:n.name,clientId:n.clientId,...a},t)})),(0,d.jsx)(t,{...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:ms(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})},"edit")]}),"withBlockListBlockHooks");(0,f.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([ka,Kg,Ou,Cf,Ph,gf,Zf,jg,Ng,Xg,Dp,lb,Mb,BI]),QI=[ka,Kg,qu,Yu,Xu,Dp,Xg,Ph,Cf,jg,Ng],(0,f.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return QI.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:i=[],addSaveProps:s}=o,l={};for(const e of i)n[e]&&(l[e]=n[e]);return Object.keys(l).length&&r(t)?s(e,t,l):e}),e)}),0),(0,f.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const{kebabCase:JI}=G(ws.privateApis),ej=([e,...t])=>e.toUpperCase()+t.join(""),tj=e=>(0,m.createHigherOrderComponent)((t=>n=>(0,d.jsx)(t,{...n,colors:e})),"withCustomColorPalette"),nj=()=>(0,m.createHigherOrderComponent)((e=>t=>{const[n,o,r]=Ti("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,h.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,d.jsx)(e,{...t,colors:i})}),"withEditorColorPalette");function oj(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:JI(t)}:t})),{});return(0,m.compose)([t,e=>class extends h.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=wd(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=ej(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=Rd(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return Object.entries(n).reduce(((n,[r,i])=>{const s=Pd(t,e[r],e[`custom${ej(r)}`]),l=o[r],a=l?.color;return a===s.color&&l?n[r]=l:n[r]={...s,class:Ad(i,s.slug)},n}),{})}render(){return(0,d.jsx)(e,{...{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils}})}}])}function rj(e){return(...t)=>{const n=tj(e);return(0,m.createHigherOrderComponent)(oj(t,n),"withCustomColors")}}function ij(...e){const t=nj();return(0,m.createHigherOrderComponent)(oj(e,t),"withColors")}var sj=function(e){const[t,n]=Ti("typography.fontSizes","typography.customFontSize");return(0,d.jsx)(ws.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})};const lj=[],aj=([e,...t])=>e.toUpperCase()+t.join("");var cj=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${aj(t)}`,e)),{});return(0,m.createHigherOrderComponent)((0,m.compose)([(0,m.createHigherOrderComponent)((e=>t=>{const[n]=Ti("typography.fontSizes");return(0,d.jsx)(e,{...t,fontSizes:n||lj})}),"withFontSizes"),e=>class extends h.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${aj(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const i=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const i=e[o],s=Tg(n,i,e[r]);return t[o]={...s,class:Pg(i)},t}),{});return{...o,...i}}render(){return(0,d.jsx)(e,{...{...this.props,fontSizes:void 0,...this.state,...this.setters}})}}]),"withFontSizes")};const uj=()=>{};var dj={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockId:n,prioritizedBlocks:o}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlock:n,getBlockListSettings:o,getBlockRootClientId:r}=e(ji),{getActiveBlockVariation:i}=e(p.store),s=t(),{name:l,attributes:a}=n(s),c=i(l,a),u=r(s);return{selectedBlockId:c?`${l}/${c.name}`:l,rootClientId:u,prioritizedBlocks:o(u)?.prioritizedInserterBlocks}}),[]),[r,i,s]=MC(t,uj,!0),l=(0,h.useMemo)((()=>(e.trim()?gB(r,i,s,e):ZB(xt(r,"frecency","desc"),o)).filter((e=>e.id!==n)).slice(0,9)),[e,n,r,i,s,o]);return[(0,h.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Vu,{icon:n,showColors:!0},"icon"),t]}),isDisabled:o}}))),[l])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,blocks:i}=e;return{action:"replace",value:"unsynced"===r?(i??[]).map((e=>(0,p.cloneBlock)(e))):(0,p.createBlock)(t,n,(0,p.createBlocksFromInnerBlocksTemplate)(o))}}};const pj=window.wp.apiFetch;var hj=n.n(pj),gj=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var mj={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await hj()({path:(0,Ua.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Ol,{icon:"page"===e.subtype?pc:gj},"icon"),(0,vS.decodeEntities)(e.title)]}),getOptionCompletion:e=>(0,d.jsx)("a",{href:e.url,children:e.title})};const fj=[];function bj({completers:e=fj}){const{name:t}=C();return(0,h.useMemo)((()=>{let n=[...e,mj];return(t===(0,p.getDefaultBlockName)()||(0,p.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,dj]),(0,f.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,f.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}var kj=function(e){return(0,d.jsx)(ws.Autocomplete,{...e,completers:bj(e)})},vj=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});var _j=function({isActive:e,label:t=(0,T.__)("Full height"),onToggle:n,isDisabled:o}){return(0,d.jsx)(ws.ToolbarButton,{isActive:e,icon:vj,label:t,onClick:()=>n(!e),disabled:o})};const yj=()=>{};var xj=function(e){const{label:t=(0,T.__)("Change matrix alignment"),onChange:n=yj,value:o="center",isDisabled:r}=e,i=(0,d.jsx)(ws.AlignmentMatrixControl.Icon,{value:o});return(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,d.jsx)(ws.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==Wa.DOWN||(t.preventDefault(),e())},label:t,icon:i,showTooltip:!0,disabled:r}),renderContent:()=>(0,d.jsx)(ws.AlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function Sj({clientId:e,maximumLength:t,context:n}){const o=(0,g.useSelect)((t=>{if(!e)return null;const{getBlockName:o,getBlockAttributes:r}=t(ji),{getBlockType:i,getActiveBlockVariation:s}=t(p.store),l=o(e),a=i(l);if(!a)return null;const c=r(e),u=(0,p.__experimentalGetBlockLabel)(a,c,n);if(u!==a.title)return u;const d=s(l,c);return d?.title||a.title}),[e,n]);if(!o)return null;if(t&&t>0&&o.length>t){const e="...";return o.slice(0,t-e.length)+e}return o}function wj({clientId:e,maximumLength:t,context:n}){return Sj({clientId:e,maximumLength:t,context:n})}var Cj=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,g.useDispatch)(ji),{clientId:o,parents:r,hasSelection:i}=(0,g.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=G(e(ji)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=e||(0,T.__)("Document"),l=(0,h.useRef)();return fh(o,l),(0,d.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,T.__)("Block breadcrumb"),children:[(0,d.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{const e=l.current?.closest(".editor-styles-wrapper");n(),function(e){if(!e)return null;const t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find((t=>(t.contentDocument||t.contentWindow.document)===e.ownerDocument))??e;return t?.closest('[role="region"]')??t}(e)?.focus()},children:s}),!i&&(0,d.jsx)("span",{children:s}),!!o&&(0,d.jsx)(Ol,{icon:oc,className:"block-editor-block-breadcrumb__separator"})]}),r.map((e=>(0,d.jsxs)("li",{children:[(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(e),children:(0,d.jsx)(wj,{clientId:e,maximumLength:35})}),(0,d.jsx)(Ol,{icon:oc,className:"block-editor-block-breadcrumb__separator"})]},e))),!!o&&(0,d.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,d.jsx)(wj,{clientId:o,maximumLength:35})})]})};function Bj(e){return(0,g.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(ji);return n(e)}),[e])}const Ij={placement:"top-start"},jj={...Ij,flip:!1,shift:!0},Ej={...Ij,flip:!0,shift:!1};function Tj(e,t,n,o,r){if(!e||!t)return jj;const i=n?.scrollTop||0,s=Qm(t),l=i+e.getBoundingClientRect().top,a=e.ownerDocument.documentElement.clientHeight,c=l+o,u=s.top>c,d=s.height>a-o;return r||!u&&!d?Ej:jj}function Mj({contentElement:e,clientId:t}){const n=bh(t),[o,r]=(0,h.useState)(0),{blockIndex:i,isSticky:s}=(0,g.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(ji);return{blockIndex:n(t),isSticky:rb(o(t))}}),[t]),l=(0,h.useMemo)((()=>{if(e)return(0,Ga.getScrollContainer)(e)}),[e]),[a,c]=(0,h.useState)((()=>Tj(e,n,l,o,s))),u=(0,m.useRefEffect)((e=>{r(e.offsetHeight)}),[]),d=(0,h.useCallback)((()=>c(Tj(e,n,l,o,s))),[e,n,l,o]);return(0,h.useLayoutEffect)(d,[i,d]),(0,h.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",d);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(d),o.observe(n)),()=>{t?.removeEventHandler?.("resize",d),o&&o.disconnect()}}),[d,e,n]),{...a,ref:u}}function Pj(e){const t=(0,g.useSelect)((t=>{const{getBlockRootClientId:n,getBlockParents:o,__experimentalGetBlockListSettingsForBlocks:r,isBlockInsertionPointVisible:i,getBlockInsertionPoint:s,getBlockOrder:l,hasMultiSelection:a,getLastMultiSelectedBlockClientId:c}=t(ji),u=o(e),d=r(u),p=u.find((e=>d[e]?.__experimentalCaptureToolbars));let h=!1;if(i()){const t=s();h=l(t.rootClientId)[t.index]===e}return{capturingClientId:p,isInsertionPointVisible:h,lastClientId:a()?c():null,rootClientId:n(e)}}),[e]);return t}function Rj({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:i}=Pj(e),s=Mj({contentElement:t?.current,clientId:e});return(0,d.jsx)(of,{clientId:n||e,bottomClientId:r,className:ms("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":o}),__unstableContentRef:t,...s,children:(0,d.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,d.jsx)(lI,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var Aj=({appendToOwnerDocument:e,children:t,clientIds:n,cloneClassname:o,elementId:r,onDragStart:i,onDragEnd:s,fadeWhenDisabled:l=!1,dragComponent:a})=>{const{srcRootClientId:c,isDraggable:u,icon:f,visibleInserter:b,getBlockType:k}=(0,g.useSelect)((e=>{const{canMoveBlocks:t,getBlockRootClientId:o,getBlockName:r,getBlockAttributes:i,isBlockInsertionPointVisible:s}=e(ji),{getBlockType:l,getActiveBlockVariation:a}=e(p.store),c=o(n[0]),u=r(n[0]),d=a(u,i(n[0]));return{srcRootClientId:c,isDraggable:t(n),icon:d?.icon||l(u)?.icon,visibleInserter:s(),getBlockType:l}}),[n]),v=(0,h.useRef)(!1),[_,y,x]=function(){const e=(0,h.useRef)(null),t=(0,h.useRef)(null),n=(0,h.useRef)(null),o=(0,h.useRef)(null);return(0,h.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,h.useCallback)((r=>{e.current=r.clientY,n.current=(0,Ga.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,h.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,i=e.current-n.current.offsetTop,s=o.clientY-n.current.offsetTop;if(o.clientY>i){const e=Math.max(r-i-50,0),n=Math.max(s-i-50,0),o=0===e||0===n?0:n/e;t.current=25*o}else if(o.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-s-50,0),o=0===e||0===n?0:n/e;t.current=-25*o}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{getAllowedBlocks:S,getBlockNamesByClientId:w,getBlockRootClientId:C}=(0,g.useSelect)(ji),{startDraggingBlocks:B,stopDraggingBlocks:I}=(0,g.useDispatch)(ji);(0,h.useEffect)((()=>()=>{v.current&&I()}),[]);const j=bh(n[0]),E=j?.closest("body");if((0,h.useEffect)((()=>{if(!E||!l)return;const e=(0,m.throttle)((e=>{if(!e.target.closest("[data-block]"))return;const t=w(n),o=e.target.closest("[data-block]").getAttribute("data-block"),r=S(o),i=w([o])[0];let s;if(0===r?.length){const e=C(o),n=w([e])[0],r=S(e);s=GS(k,r,t,n)}else s=GS(k,r,t,i);s||b?window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.add("block-draggable-invalid-drag-token")}),200);return E.addEventListener("dragover",e),()=>{E.removeEventListener("dragover",e)}}),[n,E,l,S,w,C,k,b]),!u)return t({draggable:!1});const T={type:"block",srcClientIds:n,srcRootClientId:c};return(0,d.jsx)(ws.Draggable,{appendToOwnerDocument:e,cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:T,onDragStart:e=>{window.requestAnimationFrame((()=>{B(n),v.current=!0,_(e),i&&i()}))},onDragOver:y,onDragEnd:()=>{I(),v.current=!1,x(),s&&s()},__experimentalDragComponent:void 0!==a?a:(0,d.jsx)(SC,{count:n.length,icon:f,fadeWhenDisabled:!0}),elementId:r,children:({onDraggableStart:e,onDraggableEnd:n})=>t({draggable:!0,onDragStart:e,onDragEnd:n})})};const Nj=(e,t)=>"up"===e?"horizontal"===t?(0,T.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,T.isRTL)()?"left":"right":"down":null;function Lj(e,t,n,o,r,i,s){const l=n+1;if(e>1)return function(e,t,n,o,r,i){const s=t+1;if(n&&o)return(0,T.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=Nj("down",i);if("down"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if("left"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r>0&&o){const e=Nj("down",i);if("down"===e)return(0,T.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,T.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,T.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=Nj("up",i);if("up"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if("left"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r<0&&n){const e=Nj("up",i);if("up"===e)return(0,T.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,T.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,T.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,i,s);if(o&&r)return(0,T.sprintf)((0,T.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!r){const e=Nj("down",s);if("down"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(i>0&&r){const e=Nj("down",s);if("down"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!o){const e=Nj("up",s);if("up"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(i<0&&o){const e=Nj("up",s);if("up"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const Dj=(e,t)=>"up"===e?"horizontal"===t?(0,T.isRTL)()?Zb:qb:_I:"down"===e?"horizontal"===t?(0,T.isRTL)()?qb:Zb:yI:null,Oj=(e,t)=>"up"===e?"horizontal"===t?(0,T.isRTL)()?(0,T.__)("Move right"):(0,T.__)("Move left"):(0,T.__)("Move up"):"down"===e?"horizontal"===t?(0,T.isRTL)()?(0,T.__)("Move left"):(0,T.__)("Move right"):(0,T.__)("Move down"):null,zj=(0,h.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},r)=>{const i=(0,m.useInstanceId)(zj),s=Array.isArray(e)?e:[e],l=s.length,{disabled:a}=o,{blockType:c,isDisabled:u,rootClientId:h,isFirst:f,isLast:b,firstIndex:k,orientation:v="vertical"}=(0,g.useSelect)((e=>{const{getBlockIndex:o,getBlockRootClientId:r,getBlockOrder:i,getBlock:l,getBlockListSettings:c}=e(ji),u=s[0],d=r(u),h=o(u),g=o(s[s.length-1]),m=i(d),f=l(u),b=0===h,k=g===m.length-1,{orientation:v}=c(d)||{};return{blockType:f?(0,p.getBlockType)(f.name):null,isDisabled:a||("up"===t?b:k),rootClientId:d,firstIndex:h,isFirst:b,isLast:k,orientation:n||v}}),[e,t]),{moveBlocksDown:_,moveBlocksUp:y}=(0,g.useDispatch)(ji),x="up"===t?y:_,S=`block-editor-block-mover-button__description-${i}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,ref:r,className:ms("block-editor-block-mover-button",`is-${t}-button`),icon:Dj(t,v),label:Oj(t,v),"aria-describedby":S,...o,onClick:u?null:t=>{x(e,h),o.onClick&&o.onClick(t)},disabled:u,accessibleWhenDisabled:!0}),(0,d.jsx)(ws.VisuallyHidden,{id:S,children:Lj(l,c&&c.title,k,f,b,"up"===t?-1:1,v)})]})})),Vj=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(zj,{direction:"up",ref:t,...e}))),Fj=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(zj,{direction:"down",ref:t,...e})));var Hj=function({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:n,isBlockMoverDownButtonDisabled:o}){const{canMove:r,rootClientId:i,isFirst:s,isLast:l,orientation:a,isManualGrid:c}=(0,g.useSelect)((t=>{const{getBlockIndex:n,getBlockListSettings:o,canMoveBlocks:r,getBlockOrder:i,getBlockRootClientId:s,getBlockAttributes:l}=t(ji),a=Array.isArray(e)?e:[e],c=a[0],u=s(c),d=n(c),p=n(a[a.length-1]),h=i(u),{layout:g={}}=l(u)??{};return{canMove:r(e),rootClientId:u,isFirst:0===d,isLast:p===h.length-1,orientation:o(u)?.orientation,isManualGrid:"grid"===g.type&&g.isManualPlacement&&window.__experimentalEnableGridInteractivity}}),[e]);return!r||s&&l&&!i||t&&c?null:(0,d.jsxs)(ws.ToolbarGroup,{className:ms("block-editor-block-mover",{"is-horizontal":"horizontal"===a}),children:[!t&&(0,d.jsx)(Aj,{clientIds:e,fadeWhenDisabled:!0,children:e=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,icon:xC,className:"block-editor-block-mover__drag-handle",label:(0,T.__)("Drag"),tabIndex:"-1",...e})}),!c&&(0,d.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,d.jsx)(ws.ToolbarItem,{children:t=>(0,d.jsx)(Vj,{disabled:n,clientIds:e,...t})}),(0,d.jsx)(ws.ToolbarItem,{children:t=>(0,d.jsx)(Fj,{disabled:o,clientIds:e,...t})})]})]})};const{clearTimeout:Uj,setTimeout:Gj}=window,$j=200;function Wj({ref:e,isFocused:t,highlightParent:n,debounceTimeout:o=$j}){const{getSelectedBlockClientId:r,getBlockRootClientId:i}=(0,g.useSelect)(ji),{toggleBlockHighlight:s}=(0,g.useDispatch)(ji),l=(0,h.useRef)(),a=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree),[]),c=e=>{if(e&&a)return;const t=r(),o=n?i(t):t;s(o,e)},u=()=>{const n=e?.current&&e.current.matches(":hover");return!t&&!n},d=()=>{const e=l.current;e&&Uj&&Uj(e)};return(0,h.useEffect)((()=>()=>{c(!1),d()}),[]),{debouncedShowGestures:e=>{e&&e.stopPropagation(),d(),c(!0)},debouncedHideGestures:e=>{e&&e.stopPropagation(),d(),l.current=Gj((()=>{u()&&c(!1)}),o)}}}function Kj({ref:e,highlightParent:t=!1,debounceTimeout:n=$j}){const[o,r]=(0,h.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=Wj({ref:e,debounceTimeout:n,isFocused:o,highlightParent:t}),l=(0,h.useRef)(!1),a=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,h.useEffect)((()=>{const t=e.current,n=()=>{a()&&(r(!0),i())},o=()=>{a()||(r(!1),s())};return t&&!l.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),l.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,l,r,i,s]),{onMouseMove:i,onMouseLeave:s}}function Zj(){const{selectBlock:e}=(0,g.useDispatch)(ji),{parentClientId:t}=(0,g.useSelect)((e=>{const{getBlockParents:t,getSelectedBlockClientId:n,getParentSectionBlock:o}=G(e(ji)),r=n(),i=o(r),s=t(r);return{parentClientId:i??s[s.length-1]}}),[]),n=Xf(t),o=(0,h.useRef)(),r=Kj({ref:o,highlightParent:!0});return(0,d.jsx)("div",{className:"block-editor-block-parent-selector",ref:o,...r,children:(0,d.jsx)(ws.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,T.sprintf)((0,T.__)("Select parent block: %s"),n?.title),showTooltip:!0,icon:(0,d.jsx)(Vu,{icon:n?.icon})})},t)}var qj=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});function Yj({blocks:e}){return(0,m.useViewportMatch)("medium","<")?null:(0,d.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,d.jsx)(ws.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,d.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,d.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,T.__)("Preview")}),(0,d.jsx)(kC,{viewportWidth:601,blocks:e})]})})})}const Xj={};function Qj({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i}=e;return(0,d.jsxs)(ws.MenuItem,{className:(0,p.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,d.jsx)(Vu,{icon:r,showColors:!0}),i]})}var Jj=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,h.useState)();return(0,d.jsxs)(d.Fragment,{children:[o&&(0,d.jsx)(Yj,{blocks:(0,p.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,d.jsx)(Qj,{item:e,onSelect:t,setHoveredTransformItemName:r},e.name)))]})};function eE({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,d.jsx)(tE,{item:e,onSelect:t,setHoveredTransformItemName:n},e.name)))}function tE({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i,isDisabled:s}=e;return(0,d.jsxs)(ws.MenuItem,{className:(0,p.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:s,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,d.jsx)(Vu,{icon:r,showColors:!0}),i]})}var nE=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:i})=>{const[s,l]=(0,h.useState)(),{priorityTextTransformations:a,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,h.useMemo)((()=>{const n=Object.keys(t),o=e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]});if(1===o.priorityTextTransformations.length&&"core/quote"===o.priorityTextTransformations[0].name){const e=o.priorityTextTransformations.pop();o.restTransformations.push(e)}return o}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e]<t[n]?-1:1)),n}(t),u=a.length&&c.length,g=!!c.length&&(0,d.jsx)(eE,{restTransformations:c,onSelect:o,setHoveredTransformItemName:l});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Transform to"),className:e,children:[s&&(0,d.jsx)(Yj,{blocks:(0,p.switchToBlockType)(i,s)}),!!n?.length&&(0,d.jsx)(Jj,{transformations:n,blocks:i,onSelect:r}),a.map((e=>(0,d.jsx)(tE,{item:e,onSelect:o,setHoveredTransformItemName:l},e.name))),!u&&g]}),!!u&&(0,d.jsx)(ws.MenuGroup,{className:e,children:g})]})};function oE(e,t,n){const o=new(wg())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function rE(e){return e?.find((e=>e.isDefault))}function iE({clientId:e,onSwitch:t}){const{styles:n,block:o,blockType:r,className:i}=(0,g.useSelect)((t=>{const{getBlock:n}=t(ji),o=n(e);if(!o)return{};const r=(0,p.getBlockType)(o.name),{getBlockStyles:i}=t(p.store);return{block:o,blockType:r,styles:i(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:s}=(0,g.useDispatch)(ji),l=function(e){return e&&0!==e.length?rE(e)?e:[{name:"default",label:(0,T._x)("Default","block style"),isDefault:!0},...e]:[]}(n),a=function(e,t){for(const n of new(wg())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=e?.find((({name:e})=>e===t));if(o)return o}return rE(e)}(l,i),c=function(e,t){return(0,h.useMemo)((()=>{const n=t?.example,o=t?.name;return n&&o?(0,p.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,p.cloneBlock)(e):void 0}),[t?.example?e?.name:e,t])}(o,r);return{onSelect:n=>{const o=oE(i,a,n);s(e,{className:o}),t()},stylesToRender:l,activeStyle:a,genericPreviewBlock:c,className:i}}const sE=()=>{};function lE({clientId:e,onSwitch:t=sE}){const{onSelect:n,stylesToRender:o,activeStyle:r}=iE({clientId:e,onSwitch:t});return o&&0!==o.length?(0,d.jsx)(d.Fragment,{children:o.map((e=>{const t=e.label||e.name;return(0,d.jsx)(ws.MenuItem,{icon:r.name===e.name?ip:null,onClick:()=>n(e),children:(0,d.jsx)(ws.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:t})},e.name)}))}):null}function aE({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,d.jsx)(ws.MenuGroup,{label:(0,T.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,d.jsx)(lE,{clientId:n,onSwitch:t})})}const cE=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:i=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of i){const o=cE(e,t,n);if(o)return o}}},uE=(e,t)=>{const n=((e,t)=>{const n=(0,p.getBlockAttributesNamesByRole)(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 dE=(e,t)=>(0,h.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,p.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=cE(r,t.name,o);if(n){e=!0,o.add(n.clientId),uE(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function pE({patterns:e,onSelect:t}){const n=(0,m.useViewportMatch)("medium","<");return(0,d.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,d.jsx)(ws.Popover,{className:"block-editor-block-switcher__popover-preview",placement:n?"bottom":"right-start",offset:16,children:(0,d.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,d.jsx)(hE,{patterns:e,onSelect:t})})})})}function hE({patterns:e,onSelect:t}){return(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,T.__)("Patterns list"),children:e.map((e=>(0,d.jsx)(gE,{pattern:e,onSelect:t},e.name)))})}function gE({pattern:e,onSelect:t}){const n="block-editor-block-switcher__preview-patterns-container",o=(0,m.useInstanceId)(gE,`${n}-list__item-description`);return(0,d.jsxs)("div",{className:`${n}-list__list-item`,children:[(0,d.jsxs)(ws.Composite.Item,{render:(0,d.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?o:void 0,className:`${n}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,d.jsx)(kC,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,d.jsx)("div",{className:`${n}-list__item-title`,children:e.title})]}),!!e.description&&(0,d.jsx)(ws.VisuallyHidden,{id:o,children:e.description})]})}var mE=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,h.useState)(!1),i=dE(t,e);return i.length?(0,d.jsxs)(ws.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[o&&(0,d.jsx)(pE,{patterns:i,onSelect:n}),(0,d.jsx)(ws.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Zb,children:(0,T.__)("Patterns")})]}):null};function fE({onClose:e,clientIds:t,hasBlockStyles:n,canRemove:o}){const{replaceBlocks:r,multiSelect:i,updateBlockAttributes:s}=(0,g.useDispatch)(ji),{possibleBlockTransformations:l,patterns:a,blocks:c,isUsingBindings:u}=(0,g.useSelect)((e=>{const{getBlockAttributes:n,getBlocksByClientId:o,getBlockRootClientId:r,getBlockTransformItems:i,__experimentalGetPatternTransformItems:s}=e(ji),l=r(t[0]),a=o(t);return{blocks:a,possibleBlockTransformations:i(a,l),patterns:s(a,l),isUsingBindings:t.every((e=>!!n(e)?.metadata?.bindings))}}),[t]),m=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,g.useSelect)((n=>{const{getBlockAttributes:o,canRemoveBlocks:r}=n(ji),{getActiveBlockVariation:i,getBlockVariations:s}=n(p.store),l=r(e);if(1!==t.length||!l)return Xj;const[a]=t;return{blockVariationTransformations:s(a.name,"transform"),activeBlockVariation:i(a.name,o(a.clientId))}}),[e,t]);return(0,h.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:t,blocks:c});function f(e){e.length>1&&i(e[0].clientId,e[e.length-1].clientId)}const b=1===c.length,k=b&&((0,p.isTemplatePart)(c[0])||(0,p.isReusableBlock)(c[0])),v=!!l?.length&&o&&!k,_=!!m?.length,y=!!a?.length&&o,x=v||_;if(!(n||x||y))return(0,d.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,T.__)("No transforms.")});const S=b?(0,T._x)("This block is connected.","block toolbar button label and description"):(0,T._x)("These blocks are connected.","block toolbar button label and description");return(0,d.jsxs)("div",{className:"block-editor-block-switcher__container",children:[y&&(0,d.jsx)(mE,{blocks:c,patterns:a,onSelect:n=>{!function(e){r(t,e),f(e)}(n),e()}}),x&&(0,d.jsx)(nE,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,possibleBlockVariationTransformations:m,blocks:c,onSelect:n=>{!function(e){const n=(0,p.switchToBlockType)(c,e);r(t,n),f(n)}(n),e()},onSelectVariation:t=>{!function(e){s(c[0].clientId,{...m.find((({name:t})=>t===e)).attributes})}(t),e()}}),n&&(0,d.jsx)(aE,{hoveredBlock:c[0],onSwitch:e}),u&&(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:S})})]})}var bE=({clientIds:e})=>{const{hasContentOnlyLocking:t,canRemove:n,hasBlockStyles:o,icon:r,invalidBlocks:i,isReusable:s,isTemplate:l,isDisabled:a,isSectionInSelection:c}=(0,g.useSelect)((t=>{const{getTemplateLock:n,getBlocksByClientId:o,getBlockAttributes:r,canRemoveBlocks:i,getBlockEditingMode:s,isSectionBlock:l}=G(t(ji)),{getBlockStyles:a,getBlockType:c,getActiveBlockVariation:u}=t(p.store),d=o(e);if(!d.length||d.some((e=>!e)))return{invalidBlocks:!0};const[{name:h}]=d,g=1===d.length,m=c(h),f=s(e[0]);let b,k;if(g){const t=u(h,r(e[0]));b=t?.icon||m.icon,k="contentOnly"===n(e[0])}else{const t=1===new Set(d.map((({name:e})=>e))).size;k=e.some((e=>"contentOnly"===n(e))),b=t?m.icon:qj}const v=e.some((e=>l(e)));return{canRemove:i(e),hasBlockStyles:g&&!!a(h)?.length,icon:b,isReusable:g&&(0,p.isReusableBlock)(d[0]),isTemplate:g&&(0,p.isTemplatePart)(d[0]),hasContentOnlyLocking:k,isDisabled:"default"!==f,isSectionInSelection:v}}),[e]),u=Sj({clientId:e?.[0],maximumLength:35}),h=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]);if(i)return null;const m=1===e.length,f=m?u:(0,T.__)("Multiple blocks selected"),b=(s||l)&&!h&&u?u:void 0;if(window?.__experimentalContentOnlyPatternInsertion&&c||a||!o&&!n||t)return(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,d.jsx)(Vu,{className:"block-editor-block-switcher__toggle",icon:r,showColors:!0}),text:b})});const k=m?(0,T.__)("Change block type or style"):(0,T.sprintf)((0,T._n)("Change type of %d block","Change type of %d blocks",e.length),e.length);return(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarItem,{children:t=>(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-block-switcher",label:f,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,d.jsx)(Vu,{className:"block-editor-block-switcher__toggle",icon:r,showColors:!0}),text:b,toggleProps:{description:k,...t},menuProps:{orientation:"both"},children:({onClose:t})=>(0,d.jsx)(fE,{onClose:t,clientIds:e,hasBlockStyles:o,canRemove:n})})})})};const{Fill:kE,Slot:vE}=(0,ws.createSlotFill)("__unstableBlockToolbarLastItem");kE.Slot=vE;var _E=kE;const yE="align",xE="__experimentalBorder",SE="color",wE="customClassName",CE="typography.__experimentalFontFamily",BE="typography.fontSize",IE="typography.textAlign",jE="layout",EE=["shadow",...["typography.lineHeight",BE,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",CE,IE,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalWritingMode","typography.__experimentalLetterSpacing"],xE,SE,"spacing"];const TE={align:e=>(0,p.hasBlockSupport)(e,yE),borderColor:e=>function(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,xE);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}(e,"color"),backgroundColor:e=>{const t=(0,p.getBlockSupport)(e,SE);return t&&!1!==t.background},textAlign:e=>(0,p.hasBlockSupport)(e,IE),textColor:e=>{const t=(0,p.getBlockSupport)(e,SE);return t&&!1!==t.text},gradient:e=>{const t=(0,p.getBlockSupport)(e,SE);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,p.hasBlockSupport)(e,wE,!0),fontFamily:e=>(0,p.hasBlockSupport)(e,CE),fontSize:e=>(0,p.hasBlockSupport)(e,BE),layout:e=>(0,p.hasBlockSupport)(e,jE),style:e=>EE.some((t=>(0,p.hasBlockSupport)(e,t)))};function ME(e,t){return Object.entries(TE).reduce(((n,[o,r])=>(r(e.name)&&r(t.name)&&(n[o]=e.attributes[o]),n)),{})}function PE(e,t,n){for(let o=0;o<Math.min(t.length,e.length);o+=1)n(e[o].clientId,ME(t[o],e[o])),PE(e[o].innerBlocks,t[o].innerBlocks,n)}function RE(){const e=(0,g.useRegistry)(),{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{createSuccessNotice:n,createWarningNotice:o,createErrorNotice:r}=(0,g.useDispatch)(pr.store);return(0,h.useCallback)((async i=>{let s="";try{if(!window.navigator.clipboard)return void r((0,T.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});s=await window.navigator.clipboard.readText()}catch(e){return void r((0,T.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!s||!function(e){try{const t=(0,p.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(s))return void o((0,T.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const l=(0,p.parse)(s);if(1===l.length?e.batch((()=>{PE(i,i.map((()=>l[0])),t)})):e.batch((()=>{PE(i,l,t)})),1===i.length){const e=(0,p.getBlockType)(i[0].name)?.title;n((0,T.sprintf)((0,T.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,T.sprintf)((0,T.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function AE({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{getDefaultBlockName:o,getGroupingBlockName:r}=(0,g.useSelect)(p.store),i=(0,g.useSelect)((t=>{const{canInsertBlockType:n,getBlockRootClientId:r,getBlocksByClientId:i,getDirectInsertBlock:s,canRemoveBlocks:l}=t(ji),a=i(e),c=r(e[0]),u=n(o(),c),d=c?s(c):null;return{canRemove:l(e),canInsertBlock:a.every((e=>(u||!!d)&&n(e.name,c))),canCopyStyles:a.every((e=>!!e&&((0,p.hasBlockSupport)(e.name,"color")||(0,p.hasBlockSupport)(e.name,"typography")))),canDuplicate:a.every((e=>!!e&&(0,p.hasBlockSupport)(e.name,"multiple",!0)&&n(e.name,c)))}}),[e,o]),{getBlocksByClientId:s,getBlocks:l}=(0,g.useSelect)(ji),{canRemove:a,canInsertBlock:c,canCopyStyles:u,canDuplicate:d}=i,{removeBlocks:h,replaceBlocks:m,duplicateBlocks:f,insertAfterBlock:b,insertBeforeBlock:k,flashBlock:v}=(0,g.useDispatch)(ji),_=RE();return t({canCopyStyles:u,canDuplicate:d,canInsertBlock:c,canRemove:a,onDuplicate:()=>f(e,n),onRemove:()=>h(e,n),onInsertBefore(){k(e[0])},onInsertAfter(){b(e[e.length-1])},onGroup(){if(!e.length)return;const t=r(),n=(0,p.switchToBlockType)(s(e),t);n&&m(e,n)},onUngroup(){if(!e.length)return;const t=l(e[0]);t.length&&m(e,t)},onCopy(){1===e.length&&v(e[0])},async onPasteStyles(){await _(s(e))}})}var NE=(0,ws.createSlotFill)(Symbol("CommentIconSlotFill"));var LE=function({clientId:e}){const t=(0,g.useSelect)((t=>t(ji).getBlock(e)),[e]),{replaceBlocks:n}=(0,g.useDispatch)(ji);return t&&"core/html"===t.name?(0,d.jsx)(ws.MenuItem,{onClick:()=>n(e,(0,p.rawHandler)({HTML:(0,p.getBlockContent)(t)})),children:(0,T.__)("Convert to Blocks")}):null};const{Fill:DE,Slot:OE}=(0,ws.createSlotFill)("__unstableBlockSettingsMenuFirstItem");DE.Slot=OE;var zE=DE;function VE(e){return(0,g.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:i}=t(ji),{getGroupingBlockName:s,getBlockType:l}=t(p.store),a=e?.length?e:o(),c=n(a),[u]=c,d=1===a.length&&r(a[0]);return{clientIds:a,isGroupable:i(a),isUngroupable:d,blocksSelection:c,groupingBlockName:s(),onUngroup:d&&l(u.name)?.transforms?.ungroup}}),[e])}function FE({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:i,onClose:s=()=>{}}){const{getSelectedBlockClientIds:l}=(0,g.useSelect)(ji),{replaceBlocks:a}=(0,g.useDispatch)(ji);if(!t&&!n)return null;const c=l();return(0,d.jsxs)(d.Fragment,{children:[t&&(0,d.jsx)(ws.MenuItem,{shortcut:c.length>1?Wa.displayShortcut.primary("g"):void 0,onClick:()=>{(()=>{const t=(0,p.switchToBlockType)(r,i);t&&a(e,t)})(),s()},children:(0,T._x)("Group","verb")}),n&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),a(e,t))})(),s()},children:(0,T._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}function HE(e){return(0,g.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:i,getBlockName:s,getTemplateLock:l}=t(ji),a=n(e),c=o(e),u=r(e);return{canEdit:a,canMove:c,canRemove:u,canLock:i(s(e)),isContentLocked:"contentOnly"===l(e),isLocked:!a||!c||!u}}),[e])}var UE=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})}),GE=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})}),$E=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});const WE=["core/navigation"];function KE(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function ZE({clientId:e,onClose:t}){const[n,o]=(0,h.useState)({move:!1,remove:!1}),{canEdit:r,canMove:i,canRemove:s}=HE(e),{allowsEditLocking:l,templateLock:a,hasTemplateLock:c}=(0,g.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(ji),r=n(e),i=(0,p.getBlockType)(r);return{allowsEditLocking:WE.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!i?.attributes?.templateLock}}),[e]),[u,m]=(0,h.useState)(!!a),{updateBlockAttributes:f}=(0,g.useDispatch)(ji),b=Xf(e);(0,h.useEffect)((()=>{o({move:!i,remove:!s,...l?{edit:!r}:{}})}),[r,i,s,l]);const k=Object.values(n).every(Boolean),v=Object.values(n).some(Boolean)&&!k;return(0,d.jsx)(ws.Modal,{title:(0,T.sprintf)((0,T.__)("Lock %s"),b.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,d.jsxs)("form",{onSubmit:o=>{o.preventDefault(),f([e],{lock:n,templateLock:u?KE(n):void 0}),t()},children:[(0,d.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,d.jsx)("legend",{children:(0,T.__)("Select the features you want to lock")}),(0,d.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,d.jsxs)("li",{children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-all",label:(0,T.__)("Lock all"),checked:k,indeterminate:v,onChange:e=>o({move:e,remove:e,...l?{edit:e}:{}})}),(0,d.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[l&&(0,d.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Lock editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,d.jsx)(ws.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?$E:UE})]}),(0,d.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Lock movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,d.jsx)(ws.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?$E:UE})]}),(0,d.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Lock removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,d.jsx)(ws.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?$E:UE})]})]})]})}),c&&(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,T.__)("Apply to all blocks inside"),checked:u,disabled:n.move&&!n.remove,onChange:()=>m(!u)})]}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,T.__)("Apply")})})]})]})})}function qE({clientId:e}){const{canLock:t,isLocked:n}=HE(e),[o,r]=(0,h.useReducer)((e=>!e),!1);if(!t)return null;const i=n?(0,T.__)("Unlock"):(0,T.__)("Lock");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.MenuItem,{icon:n?UE:GE,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog",children:i}),o&&(0,d.jsx)(ZE,{clientId:e,onClose:r})]})}const YE=()=>{};function XE({clientId:e,onToggle:t=YE}){const{blockType:n,mode:o,enabled:r}=(0,g.useSelect)((t=>{const{getBlock:n,getBlockMode:o,getSettings:r}=t(ji),i=n(e);return{mode:o(e),blockType:i?(0,p.getBlockType)(i.name):null,enabled:r().codeEditingEnabled&&!!i?.isValid}}),[e]),{toggleBlockMode:i}=(0,g.useDispatch)(ji);if(!n||!(0,p.hasBlockSupport)(n,"html",!0)||!r)return null;const s="visual"===o?(0,T.__)("Edit as HTML"):(0,T.__)("Edit visually");return(0,d.jsx)(ws.MenuItem,{onClick:()=>{i(e),t()},children:s})}function QE({clientId:e,onClose:t}){const{templateLock:n,isLockedByParent:o,isEditingAsBlocks:r}=(0,g.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=G(t(ji));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),i=(0,g.useDispatch)(ji),s=!o&&"contentOnly"===n;if(!s&&!r)return null;const{modifyContentLockBlock:l}=G(i);return!r&&s&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{l(e),t()},children:(0,T._x)("Modify","Unlock content locked blocks")})}function JE({clientId:e,onClose:t}){const[n,o]=(0,h.useState)(),r=Xf(e),{metadata:i}=(0,g.useSelect)((t=>{const{getBlockAttributes:n}=t(ji);return{metadata:n(e)?.metadata}}),[e]),{updateBlockAttributes:s}=(0,g.useDispatch)(ji),l=i?.name||"",a=r?.title,c=!!l&&!!i?.bindings&&Object.values(i.bindings).some((e=>"core/pattern-overrides"===e.source)),u=void 0!==n&&n!==l,p=n===a,m=(f=n,0===f?.trim()?.length);var f;const b=u||p;return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,d.jsx)("form",{onSubmit:o=>{o.preventDefault(),b&&(()=>{const o=p||m?void 0:n,r=p||m?(0,T.sprintf)((0,T.__)('Block name reset to: "%s".'),n):(0,T.sprintf)((0,T.__)('Block name changed to: "%s".'),n);(0,Uo.speak)(r,"assertive"),s([e],{metadata:fs({...i,name:o})}),t()})()},children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:"3",children:[(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:n??l,label:(0,T.__)("Name"),help:c?(0,T.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:a,onChange:o,onFocus:e=>e.target.select()}),(0,d.jsxs)(ws.__experimentalHStack,{justify:"right",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,T.__)("Cancel")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!b,variant:"primary",type:"submit",children:(0,T.__)("Save")})]})]})})})}function eT({clientId:e}){const[t,n]=(0,h.useState)(!1);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,T.__)("Rename")}),t&&(0,d.jsx)(JE,{clientId:e,onClose:()=>n(!1)})]})}var tT=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),nT=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});function oT({clientIds:e}){const{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{createSuccessNotice:n}=(0,g.useDispatch)(pr.store),o=(0,g.useSelect)((t=>t(ji).getBlocksByClientId(e)),[e]),r=(0,g.useSelect)((e=>e(Yk.store).getShortcutRepresentation("core/editor/toggle-list-view")),[]),i=o.some((e=>!1===e.attributes.metadata?.blockVisibility));return(0,d.jsx)(ws.MenuItem,{icon:i?tT:nT,onClick:()=>{const s=!i,l=Object.fromEntries(o?.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!s&&void 0})}])));t(e,l,{uniqueByBlock:!0}),s&&(o.length>1?n((0,T.sprintf)((0,T.__)("Blocks hidden. You can access them via the List View (%s)."),r),{id:"block-visibility-hidden",type:"snackbar"}):n((0,T.sprintf)((0,T.__)("Block hidden. You can access it via the List View (%s)."),r),{id:"block-visibility-hidden",type:"snackbar"}))},children:i?(0,T.__)("Show"):(0,T.__)("Hide")})}const{Fill:rT,Slot:iT}=(0,ws.createSlotFill)("BlockSettingsMenuControls");function sT({...e}){return(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(rT,{...e})})}sT.Slot=({fillProps:e,clientIds:t=null})=>{const{selectedBlocks:n,selectedClientIds:o,isContentOnly:r,canToggleSelectedBlocksVisibility:i}=(0,g.useSelect)((e=>{const{getBlocksByClientId:n,getBlockNamesByClientId:o,getSelectedBlockClientIds:r,getBlockEditingMode:i}=e(ji),s=null!==t?t:r();return{selectedBlocks:o(s),selectedClientIds:s,isContentOnly:"contentOnly"===i(s[0]),canToggleSelectedBlocksVisibility:n(s).every((e=>(0,p.hasBlockSupport)(e.name,"blockVisibility",!0)))}}),[t]),{canLock:s}=HE(o[0]),{canRename:l}=(a=n[0],{canRename:(0,p.getBlockSupport)(a,"renaming",!0)});var a;const c=1===o.length&&s&&!r,u=1===o.length&&l&&!r,h=i&&!r,m=VE(o),{isGroupable:f,isUngroupable:b}=m,k=(f||b)&&!r;return(0,d.jsx)(iT,{fillProps:{...e,selectedBlocks:n,selectedClientIds:o},children:t=>!t?.length>0&&!k&&!c?null:(0,d.jsxs)(ws.MenuGroup,{children:[k&&(0,d.jsx)(FE,{...m,onClose:e?.onClose}),c&&(0,d.jsx)(qE,{clientId:o[0]}),u&&(0,d.jsx)(eT,{clientId:o[0]}),h&&(0,d.jsx)(oT,{clientIds:o}),t,1===o.length&&(0,d.jsx)(QE,{clientId:o[0],onClose:e?.onClose}),1===e?.count&&!r&&(0,d.jsx)(XE,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};var lT=sT;function aT({parentClientId:e,parentBlockType:t}){const n=(0,m.useViewportMatch)("medium","<"),{selectBlock:o}=(0,g.useDispatch)(ji),r=(0,h.useRef)(),i=Kj({ref:r,highlightParent:!0});return n?(0,d.jsx)(ws.MenuItem,{...i,ref:r,icon:(0,d.jsx)(Vu,{icon:t.icon}),onClick:()=>o(e),children:(0,T.sprintf)((0,T.__)("Select parent block (%s)"),t.title)}):null}const cT={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function uT({clientIds:e,onCopy:t,label:n,shortcut:o,eventType:r="copy",__experimentalUpdateSelection:i=!1}){const{getBlocksByClientId:s}=(0,g.useSelect)(ji),{removeBlocks:l}=(0,g.useDispatch)(ji),a=jw(),c=(0,m.useCopyToClipboard)((()=>(0,p.serialize)(s(e))),(()=>{switch(r){case"copy":case"copyStyles":t(),a(r,e);break;case"cut":a(r,e),l(e,i)}})),u=n||(0,T.__)("Copy");return(0,d.jsx)(ws.MenuItem,{ref:c,shortcut:o,children:u})}function dT({block:e,clientIds:t,children:n,__experimentalSelectBlock:o,...r}){const i=e?.clientId,s=t.length,l=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:f,openedBlockSettingsMenu:b,isContentOnly:k,isZoomOut:v}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockRootClientId:n,getPreviousBlockClientId:o,getSelectedBlockClientIds:r,getBlockAttributes:i,getOpenedBlockSettingsMenu:s,getBlockEditingMode:a,isZoomOut:c}=G(e(ji)),{getActiveBlockVariation:u}=e(p.store),d=n(l),h=d&&t(d);return{firstParentClientId:d,parentBlockType:d&&(u(h,i(d))||(0,p.getBlockType)(h)),previousBlockClientId:o(l),selectedBlockClientIds:r(),openedBlockSettingsMenu:s(),isContentOnly:"contentOnly"===a(l),isZoomOut:c()}}),[l]),{getBlockOrder:_,getSelectedBlockClientIds:y}=(0,g.useSelect)(ji),{setOpenedBlockSettingsMenu:x}=G((0,g.useDispatch)(ji)),S=(0,g.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Yk.store);return{copy:t("core/block-editor/copy"),cut:t("core/block-editor/cut"),duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),w=f.length>0;async function C(e){if(!o)return;const t=await e;t&&t[0]&&o(t[0],!1)}function B(){if(!o)return;let e=u||a;e||(e=_()[0]);const t=w&&0===y().length;o(e,t)}const I=f?.includes(a),j=i?b===i||!1:void 0;function E(e){e&&b!==i?x(i):!e&&b&&b===i&&x(void 0)}const M=!I&&!!a;return(0,d.jsx)(AE,{clientIds:t,__experimentalUpdateSelection:!o,children:({canCopyStyles:e,canDuplicate:i,canInsertBlock:u,canRemove:p,onDuplicate:g,onInsertAfter:f,onInsertBefore:b,onRemove:_,onCopy:y,onPasteStyles:x})=>!p&&!i&&!u&&k?null:(0,d.jsx)(ws.DropdownMenu,{icon:fv,label:(0,T.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:cT,open:j,onToggle:E,noIcons:!0,...r,children:({onClose:r})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.MenuGroup,{children:[(0,d.jsx)(zE.Slot,{fillProps:{onClose:r}}),M&&(0,d.jsx)(aT,{parentClientId:a,parentBlockType:c}),1===s&&(0,d.jsx)(LE,{clientId:l}),!k&&(0,d.jsx)(uT,{clientIds:t,onCopy:y,shortcut:S.copy}),!k&&(0,d.jsx)(uT,{clientIds:t,label:(0,T.__)("Cut"),eventType:"cut",shortcut:S.cut,__experimentalUpdateSelection:!o}),i&&(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,g,C),shortcut:S.duplicate,children:(0,T.__)("Duplicate")}),u&&!v&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,b),shortcut:S.insertBefore,children:(0,T.__)("Add before")}),(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,f),shortcut:S.insertAfter,children:(0,T.__)("Add after")})]}),1===s&&(0,d.jsx)(NE.Slot,{fillProps:{onClose:r}})]}),e&&!k&&(0,d.jsxs)(ws.MenuGroup,{children:[(0,d.jsx)(uT,{clientIds:t,onCopy:y,label:(0,T.__)("Copy styles"),eventType:"copyStyles"}),(0,d.jsx)(ws.MenuItem,{onClick:x,children:(0,T.__)("Paste styles")})]}),!k&&(0,d.jsx)(lT.Slot,{fillProps:{onClose:r,count:s,firstBlockClientId:l},clientIds:t}),"function"==typeof n?n({onClose:r}):h.Children.map((e=>(0,h.cloneElement)(e,{onClose:r}))),p&&(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,_,B),shortcut:S.remove,children:(0,T.__)("Delete")})})]})})})}var pT=dT;var hT=(0,ws.createSlotFill)(Symbol("CommentIconToolbarSlotFill"));var gT=function({clientIds:e,...t}){return(0,d.jsxs)(ws.ToolbarGroup,{children:[(0,d.jsx)(hT.Slot,{}),(0,d.jsx)(ws.ToolbarItem,{children:n=>(0,d.jsx)(pT,{clientIds:e,toggleProps:n,...t})})]})};function mT({clientId:e}){const{canLock:t,isLocked:n}=HE(e),[o,r]=(0,h.useReducer)((e=>!e),!1),i=(0,h.useRef)(!1);if((0,h.useEffect)((()=>{n&&(i.current=!0)}),[n]),!n&&!i.current)return null;let s=n?(0,T.__)("Unlock"):(0,T.__)("Lock");return!t&&n&&(s=(0,T.__)("Locked")),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,d.jsx)(ws.ToolbarButton,{disabled:!t,icon:n?$E:UE,label:s,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"})}),o&&(0,d.jsx)(ZE,{clientId:e,onClose:r})]})}function fT({clientIds:e}){const{blocks:t,canToggleBlockVisibility:n}=(0,g.useSelect)((t=>{const{getBlockName:n,getBlocksByClientId:o}=t(ji),r=o(e);return{blocks:r,canToggleBlockVisibility:r.every((({clientId:e})=>(0,p.hasBlockSupport)(n(e),"blockVisibility",!0)))}}),[e]),o=t.some((e=>!1===e.attributes.metadata?.blockVisibility)),r=(0,h.useRef)(!1),{updateBlockAttributes:i}=(0,g.useDispatch)(ji);if((0,h.useEffect)((()=>{o&&(r.current=!0)}),[o]),!o&&!r.current)return null;return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,d.jsx)(ws.ToolbarButton,{disabled:!n,icon:o?nT:tT,label:o?(0,T.__)("Hidden"):(0,T.__)("Visible"),onClick:()=>{const n=Object.fromEntries(t?.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!!o&&void 0})}])));i(e,n,{uniqueByBlock:!0})}})})})}var bT=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),kT=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),vT=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),_T=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})});const yT={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};var xT=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=VE(),{replaceBlocks:r}=(0,g.useDispatch)(ji),{canRemove:i,variations:s}=(0,g.useSelect)((e=>{const{canRemoveBlocks:o}=e(ji),{getBlockVariations:r}=e(p.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),l=o=>{const i=(0,p.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),i&&i.length>0&&(i[0].attributes.layout=yT[o],r(t,i))};if(!o||!i)return null;const a=!!s.find((({name:e})=>"group-row"===e)),c=!!s.find((({name:e})=>"group-stack"===e)),u=!!s.find((({name:e})=>"group-grid"===e));return(0,d.jsxs)(ws.ToolbarGroup,{children:[(0,d.jsx)(ws.ToolbarButton,{icon:bT,label:(0,T._x)("Group","action: convert blocks to group"),onClick:l}),a&&(0,d.jsx)(ws.ToolbarButton,{icon:kT,label:(0,T._x)("Row","action: convert blocks to row"),onClick:()=>l("row")}),c&&(0,d.jsx)(ws.ToolbarButton,{icon:vT,label:(0,T._x)("Stack","action: convert blocks to stack"),onClick:()=>l("stack")}),u&&(0,d.jsx)(ws.ToolbarButton,{icon:_T,label:(0,T._x)("Grid","action: convert blocks to grid"),onClick:()=>l("grid")})]})};function ST({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,g.useSelect)((e=>!!t&&"html"===e(ji).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,g.useDispatch)(ji);return n?(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{onClick:()=>{o(t)},children:(0,T.__)("Edit visually")})}):null}const wT=(0,h.createContext)("");wT.displayName="__unstableBlockNameContext";var CT=wT;function BT(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function IT(e){return e.contains(e.ownerDocument.activeElement)}function jT({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:n,defaultIndex:o,onIndexChange:r,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){const[l]=(0,h.useState)(t),[a]=(0,h.useState)(o),c=(0,h.useCallback)((()=>{!function(e){const[t]=Ga.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[e]);(0,Yk.useShortcut)("core/block-editor/focus-toolbar",(()=>{i&&c()})),(0,h.useEffect)((()=>{l&&c()}),[n,l,c]),(0,h.useEffect)((()=>{const t=e.current;let n=0;return l||IT(t)||(n=window.requestAnimationFrame((()=>{const e=BT(t),n=a||0;e[n]&&IT(t)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=BT(t).findIndex((e=>0===e.tabIndex));r(e)}}),[a,l,r,e]);const{getLastFocus:u}=G((0,g.useSelect)(ji));(0,h.useEffect)((()=>{const t=e.current;if(s){const e=e=>{const t=u();e.keyCode===Wa.ESCAPE&&t?.current&&(e.preventDefault(),t.current.focus())};return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}}),[s,u,e])}function ET({children:e,focusOnMount:t,focusEditorOnEscape:n=!1,shouldUseKeyboardFocusShortcut:o=!0,__experimentalInitialIndex:r,__experimentalOnIndexChange:i,orientation:s="horizontal",...l}){const a=(0,h.useRef)(),c=function(e){const[t,n]=(0,h.useState)(!0),o=(0,h.useCallback)((()=>{const t=!Ga.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||I()("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)}),[e]);return(0,h.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[o,t,e]),t}(a);return jT({toolbarRef:a,focusOnMount:t,defaultIndex:r,onIndexChange:i,isAccessibleToolbar:c,shouldUseKeyboardFocusShortcut:o,focusEditorOnEscape:n}),c?(0,d.jsx)(ws.Toolbar,{label:l["aria-label"],ref:a,orientation:s,...l,children:e}):(0,d.jsx)(ws.NavigableMenu,{orientation:s,role:"toolbar",ref:a,...l,children:e})}function TT(){const e=(0,g.useSelect)((e=>{const{getBlockEditingMode:t,getBlockName:n,getBlockSelectionStart:o}=e(ji),r=o(),i=r&&(0,p.getBlockType)(n(r));return i&&(0,p.hasBlockSupport)(i,"__experimentalToolbar",!0)&&"disabled"!==t(r)}),[]);return e}const MT=[],PT=6,RT={placement:"bottom-start"};function AT({clientId:e}){const{categories:t,currentPatternName:n,patterns:o}=(0,g.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:o,__experimentalGetAllowedPatterns:r}=t(ji),i=n(e),s=i?.metadata?.categories||MT,l=o(e),a=s.length>0?r(l):MT;return{categories:s,currentPatternName:i?.metadata?.patternName,patterns:a}}),[e]),{replaceBlocks:r}=(0,g.useDispatch)(ji),i=(0,h.useMemo)((()=>0!==t.length&&o&&0!==o.length?o.filter((e=>{const o="core"===e.source||e.source?.startsWith("pattern-directory")&&"pattern-directory/theme"!==e.source;return 1===e.blocks.length&&!o&&n!==e.name&&e.categories?.some((e=>t.includes(e)))&&("unsynced"===e.syncStatus||!e.id)})).slice(0,PT):MT),[t,n,o]);if(i.length<2)return null;const s=n=>{const o=(n.blocks??[]).map((e=>(0,p.cloneBlock)(e)));o[0].attributes.metadata={...o[0].attributes.metadata,categories:t},r(e,o)};return(0,d.jsx)(ws.Dropdown,{popoverProps:RT,renderToggle:({onToggle:e,isOpen:t})=>(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{onClick:()=>e(!t),"aria-expanded":t,children:(0,T.__)("Change design")})}),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,d.jsx)($C,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}const NT=(0,d.jsxs)(ws.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,d.jsx)(ws.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"}),(0,d.jsx)(ws.Path,{stroke:"currentColor",strokeWidth:"1.5",d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"})]});var LT=function({clientId:e}){const{stylesToRender:t,activeStyle:n,className:o}=iE({clientId:e}),{updateBlockAttributes:r}=(0,g.useDispatch)(ji),{merged:i}=(0,h.useContext)(is),{globalSettings:s,globalStyles:l,blockName:a}=(0,g.useSelect)((t=>{const n=t(ji).getSettings();return{globalSettings:n.__experimentalFeatures,globalStyles:n[N],blockName:t(ji).getBlockName(e)}}),[e]),c=n?.name?Tb({settings:i?.settings??s,styles:i?.styles??l},a,n.name)?.color?.background:void 0;return t&&0!==t.length?(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{onClick:()=>{const i=(t.findIndex((e=>e.name===n.name))+1)%t.length,s=t[i],l=oE(o,n,s);r(e,{className:l})},label:(0,T.__)("Shuffle styles"),children:(0,d.jsx)(ws.Icon,{icon:NT,style:{fill:c||"transparent"}})})}):null};function DT({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,variant:r="unstyled"}){const{blockClientId:i,blockClientIds:s,isDefaultEditingMode:l,blockType:a,toolbarKey:c,shouldShowVisualToolbar:u,showParentSelector:f,isUsingBindings:b,hasParentPattern:k,hasContentOnlyLocking:v,showShuffleButton:_,showSlots:y,showGroupButtons:x,showLockButtons:S,showBlockVisibilityButton:w,showSwitchSectionStyleButton:C}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getBlockParents:o,getSelectedBlockClientIds:r,isBlockValid:i,getBlockEditingMode:s,getBlockAttributes:l,getBlockParentsByBlockName:a,getTemplateLock:c,getParentSectionBlock:u,isZoomOut:d,isSectionBlock:h}=G(e(ji)),g=r(),m=g[0],f=o(m),b=u(m)??f[f.length-1],k=t(b),v=(0,p.getBlockType)(k),_=s(m),y="default"===_,x=t(m),S=g.every((e=>i(e))),w=g.every((e=>"visual"===n(e))),C=g.every((e=>!!l(e)?.metadata?.bindings)),B=g.every((e=>a(e,"core/block",!0).length>0)),I=g.some((e=>"contentOnly"===c(e))),j=d(),E=window?.__experimentalContentOnlyPatternInsertion&&(j||h(m));return{blockClientId:m,blockClientIds:g,isDefaultEditingMode:y,blockType:m&&(0,p.getBlockType)(x),shouldShowVisualToolbar:S&&w,toolbarKey:`${m}${b}`,showParentSelector:!j&&v&&"contentOnly"!==_&&"disabled"!==s(b)&&(0,p.hasBlockSupport)(v,"__experimentalParentSelector",!0)&&1===g.length,isUsingBindings:C,hasParentPattern:B,hasContentOnlyLocking:I,showShuffleButton:j,showSlots:!j,showGroupButtons:!j,showLockButtons:!j,showBlockVisibilityButton:!j,showSwitchSectionStyleButton:E}}),[]),B=(0,h.useRef)(null),I=(0,h.useRef)(),j=Kj({ref:I}),E=!(0,m.useViewportMatch)("medium","<");if(!TT())return null;const M=s.length>1,P=(0,p.isReusableBlock)(a)||(0,p.isTemplatePart)(a),R=ms("block-editor-block-contextual-toolbar",{"has-parent":f}),A=ms("block-editor-block-toolbar",{"is-synced":P,"is-connected":b});return(0,d.jsx)(ET,{focusEditorOnEscape:!0,className:R,"aria-label":(0,T.__)("Block tools"),variant:"toolbar"===r?void 0:r,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,children:(0,d.jsxs)("div",{ref:B,className:A,children:[f&&!M&&E&&(0,d.jsx)(Zj,{}),(u||M)&&!k&&(0,d.jsx)("div",{ref:I,...j,children:(0,d.jsxs)(ws.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,d.jsx)(bE,{clientIds:s}),l&&w&&(0,d.jsx)(fT,{clientIds:s}),!M&&l&&S&&(0,d.jsx)(mT,{clientId:i}),(0,d.jsx)(Hj,{clientIds:s,hideDragHandle:e})]})}),!v&&u&&M&&x&&(0,d.jsx)(xT,{}),_&&(0,d.jsx)(AT,{clientId:s[0]}),C&&(0,d.jsx)(LT,{clientId:s[0]}),u&&y&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Rs.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(CT.Provider,{value:a?.name,children:(0,d.jsx)(_E.Slot,{})})]}),(0,d.jsx)(ST,{clientIds:s}),(0,d.jsx)(gT,{clientIds:s})]})},c)}function OT({hideDragHandle:e,variant:t}){return(0,d.jsx)(DT,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}function zT({clientId:e,isTyping:t,__unstableContentRef:n}){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:i}=Pj(e),s=(0,h.useRef)();(0,h.useEffect)((()=>{s.current=void 0}),[e]);const{stopTyping:l}=(0,g.useDispatch)(ji),a=(0,h.useRef)(!1);(0,Yk.useShortcut)("core/block-editor/focus-toolbar",(()=>{a.current=!0,l(!0)})),(0,h.useEffect)((()=>{a.current=!1}));const c=o||e,u=Mj({contentElement:n?.current,clientId:c});return!t&&(0,d.jsx)(ef,{clientId:c,bottomClientId:i,className:ms("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...u,__unstableContentRef:n,children:(0,d.jsx)(DT,{focusOnMount:a.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:e=>{s.current=e},variant:"toolbar"})})}var VT=function({onClick:e}){return(0,d.jsx)(ws.Button,{variant:"primary",icon:cc,size:"compact",className:ms("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,T._x)("Add pattern","Generic label for pattern inserter button")})};var FT=function(){const[e,t]=(0,h.useState)(!1),{hasSelection:n,blockOrder:o,setInserterIsOpened:r,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:l,insertionPointVisible:a}=(0,g.useSelect)((e=>{const{getSettings:t,getBlockOrder:n,getSelectionStart:o,getSelectedBlockClientId:r,getSectionRootClientId:i,getBlockInsertionPoint:s,isBlockInsertionPointVisible:l}=G(e(ji)),a=i();return{hasSelection:!!o().clientId,blockOrder:n(a),sectionRootClientId:a,setInserterIsOpened:t().__experimentalSetIsInserterOpened,selectedBlockClientId:r(),blockInsertionPoint:s(),insertionPointVisible:l()}}),[]),{showInsertionPoint:c}=G((0,g.useDispatch)(ji));if((0,h.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),500);return()=>{clearTimeout(e)}}),[]),!e||!n)return null;const u=s,p=o.findIndex((e=>s===e))+1,m=o[p];return a&&l?.index===p?null:(0,d.jsx)(CS,{previousClientId:u,nextClientId:m,children:(0,d.jsx)(VT,{onClick:()=>{r({rootClientId:i,insertionIndex:p,tab:"patterns",category:"all"}),c(i,p,{operation:"insert"})}})})};function HT(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getSettings:o,isTyping:r,isDragging:i,isZoomOut:s}=G(e(ji));return{clientId:t()||n(),hasFixedToolbar:o().hasFixedToolbar,isTyping:r(),isZoomOutMode:s(),isDragging:i()}}function UT({children:e,__unstableContentRef:t,...n}){const{clientId:o,hasFixedToolbar:r,isTyping:i,isZoomOutMode:s,isDragging:l}=(0,g.useSelect)(HT,[]),a=(0,Yk.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:c,getSelectedBlockClientIds:u,getBlockRootClientId:m,isGroupable:f,getBlockName:b}=(0,g.useSelect)(ji),{getGroupingBlockName:k}=(0,g.useSelect)(p.store),{showEmptyBlockSideInserter:v,showBlockToolbarPopover:_}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlock:o,getBlockMode:r,getSettings:i,isTyping:s,isBlockInterfaceHidden:l}=G(e(ji)),a=t()||n(),c=o(a),u=!!a&&!!c,d=u&&(0,p.isUnmodifiedDefaultBlock)(c,"content")&&"html"!==r(a),h=a&&!s()&&d;return{showEmptyBlockSideInserter:h,showBlockToolbarPopover:!l()&&!i().hasFixedToolbar&&!h&&u&&!d}}),[]),y=RE(),{duplicateBlocks:x,removeBlocks:S,replaceBlocks:w,insertAfterBlock:C,insertBeforeBlock:B,selectBlock:I,moveBlocksUp:j,moveBlocksDown:E,expandBlock:M,updateBlockAttributes:P}=G((0,g.useDispatch)(ji));const R=Fm(t),A=Fm(t);return(0,d.jsx)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(a("core/block-editor/move-up",e)||a("core/block-editor/move-down",e)){const t=u();if(t.length){e.preventDefault();const n=m(t[0]);"up"===(a("core/block-editor/move-up",e)?"up":"down")?j(t,n):E(t,n);const o=Array.isArray(t)?t.length:1,r=(0,T.sprintf)((0,T._n)("%d block moved.","%d blocks moved.",t.length),o);(0,Uo.speak)(r)}}else if(a("core/block-editor/duplicate",e)){const t=u();t.length&&(e.preventDefault(),x(t))}else if(a("core/block-editor/remove",e)){const t=u();t.length&&(e.preventDefault(),S(t))}else if(a("core/block-editor/paste-styles",e)){const t=u();if(t.length){e.preventDefault();const n=c(t);y(n)}}else if(a("core/block-editor/insert-after",e)){const t=u();t.length&&(e.preventDefault(),C(t[t.length-1]))}else if(a("core/block-editor/insert-before",e)){const t=u();t.length&&(e.preventDefault(),B(t[0]))}else if(a("core/block-editor/unselect",e)){if(e.target.closest("[role=toolbar]"))return;const t=u();t.length>1&&(e.preventDefault(),I(t[0]))}else if(a("core/block-editor/collapse-list-view",e)){if((0,Ga.isTextField)(e.target)||(0,Ga.isTextField)(e.target?.contentWindow?.document?.activeElement))return;e.preventDefault(),M(o)}else if(a("core/block-editor/group",e)){const t=u();if(t.length>1&&f(t)){e.preventDefault();const n=c(t),o=k(),r=(0,p.switchToBlockType)(n,o);w(t,r),(0,Uo.speak)((0,T.__)("Selected blocks are grouped."))}}else if(a("core/block-editor/toggle-block-visibility",e)){const t=u();if(t.length){e.preventDefault();const n=c(t);if(!n.every((e=>(0,p.hasBlockSupport)(b(e.clientId),"blockVisibility",!0))))return;const o=n.some((e=>!1===e.attributes.metadata?.blockVisibility)),r=Object.fromEntries(n.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!!o&&void 0})}])));P(t,r,{uniqueByBlock:!0})}}},children:(0,d.jsxs)(jS.Provider,{value:(0,h.useRef)(!1),children:[!i&&!s&&(0,d.jsx)(TS,{__unstableContentRef:t}),v&&(0,d.jsx)(Rj,{__unstableContentRef:t,clientId:o}),_&&(0,d.jsx)(zT,{__unstableContentRef:t,clientId:o,isTyping:i}),!s&&!r&&(0,d.jsx)(ws.Popover.Slot,{name:"block-toolbar",ref:R}),e,(0,d.jsx)(ws.Popover.Slot,{name:"__unstable-block-tools-after",ref:A}),s&&!l&&(0,d.jsx)(FT,{__unstableContentRef:t})]})})}const GT=window.wp.commands;var $T=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),WT=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});const KT=()=>function(){const{replaceBlocks:e,multiSelect:t}=(0,g.useDispatch)(ji),{blocks:n,clientIds:o,canRemove:r,possibleBlockTransformations:i,invalidSelection:s}=(0,g.useSelect)((e=>{const{getBlockRootClientId:t,getBlockTransformItems:n,getSelectedBlockClientIds:o,getBlocksByClientId:r,canRemoveBlocks:i}=e(ji),s=o(),l=r(s);if(l.filter((e=>!e)).length>0)return{invalidSelection:!0};return{blocks:l,clientIds:s,possibleBlockTransformations:n(l,t(s[0])),canRemove:i(s),invalidSelection:!1}}),[]);if(s)return{isLoading:!1,commands:[]};const l=1===n.length&&(0,p.isTemplatePart)(n[0]);function a(r){const i=(0,p.switchToBlockType)(n,r);var s;e(o,i),(s=i).length>1&&t(s[0].clientId,s[s.length-1].clientId)}const c=!!i.length&&r&&!l;if(!o||o.length<1||!c)return{isLoading:!1,commands:[]};return{isLoading:!1,commands:i.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,T.sprintf)((0,T.__)("Transform to %s"),n),icon:(0,d.jsx)(Vu,{icon:o}),callback:({close:e})=>{a(t),e()}}}))}},ZT=()=>{(0,GT.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:KT()}),(0,GT.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:function(){const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,g.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(ji);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:i,canRemoveBlocks:s,getBlockName:l}=(0,g.useSelect)(ji),{getDefaultBlockName:a,getGroupingBlockName:c}=(0,g.useSelect)(p.store),u=i(e),{removeBlocks:d,replaceBlocks:h,duplicateBlocks:m,insertAfterBlock:f,insertBeforeBlock:b,updateBlockAttributes:k}=(0,g.useDispatch)(ji),v=()=>{if(!u.length)return;const t=c(),n=(0,p.switchToBlockType)(u,t);n&&h(e,n)},_=()=>{if(!u.length)return;const t=u[0].innerBlocks;t.length&&h(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const y=r(e[0]),x=o(a(),y),S=u.every((e=>!!e&&(0,p.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,y))),w=s(e),C=u.every((({clientId:e})=>(0,p.hasBlockSupport)(l(e),"blockVisibility",!0))),B=[];if(S&&B.push({name:"duplicate",label:(0,T.__)("Duplicate"),callback:()=>m(e,!0),icon:qj}),x&&B.push({name:"add-before",label:(0,T.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;b(t)},icon:cc},{name:"add-after",label:(0,T.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;f(t)},icon:cc}),n&&B.push({name:"Group",label:(0,T.__)("Group"),callback:v,icon:bT}),t&&B.push({name:"ungroup",label:(0,T.__)("Ungroup"),callback:_,icon:$T}),w&&B.push({name:"remove",label:(0,T.__)("Delete"),callback:()=>d(e,!0),icon:WT}),C){const t=u.some((e=>!1===e.attributes.metadata?.blockVisibility));B.push({name:"core/toggle-block-visibility",label:t?(0,T.__)("Show"):(0,T.__)("Hide"),callback:()=>{const n=Object.fromEntries(u?.map((({clientId:e,attributes:n})=>[e,{metadata:fs({...n?.metadata,blockVisibility:!!t&&void 0})}])));k(e,n,{uniqueByBlock:!0})},icon:t?tT:nT})}return{isLoading:!1,commands:B.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},context:"block-selection-edit"})},qT={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function YT({shouldIframe:e=!0,height:t="300px",children:n=(0,d.jsx)(dw,{}),styles:o,contentRef:r,iframeProps:i}){ZT();const s=(0,m.useViewportMatch)("medium","<"),l=nw(),a=PS(),c=(0,h.useRef)(),u=(0,m.useMergeRefs)([r,a,c]),p=(0,g.useSelect)((e=>G(e(ji)).getZoomLevel()),[]),f=100===p||s?{}:{scale:p,frameSize:"40px"};return e?(0,d.jsx)(UT,{__unstableContentRef:c,style:{height:t,display:"flex"},children:(0,d.jsxs)(Fw,{...i,...f,ref:l,contentRef:u,style:{...i?.style},name:"editor-canvas",children:[(0,d.jsx)(cC,{styles:o}),n]})}):(0,d.jsxs)(UT,{__unstableContentRef:c,style:{height:t,display:"flex"},children:[(0,d.jsx)(cC,{styles:o,scope:":where(.editor-styles-wrapper)",transformOptions:qT}),(0,d.jsx)(Aw,{ref:u,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:n})]})}var XT=function({children:e,height:t,styles:n}){return(0,d.jsx)(YT,{height:t,styles:n,children:e})};const QT=()=>(0,d.jsx)(ws.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,d.jsx)(ws.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})}),JT=({style:e,className:t})=>(0,d.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,d.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,d.jsx)(QT,{})})}),eM=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,T.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==Wa.DOWN||(e.preventDefault(),n())},icon:(0,d.jsx)(t,{children:(0,d.jsx)(e,{children:(0,d.jsx)(JT,{})})})})});var tM=({children:e,...t})=>(I()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:eM(t),renderContent:()=>e})),nM=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});const oM=(0,h.createContext)({});oM.displayName="ListViewContext";const rM=()=>(0,h.useContext)(oM);function iM({children:e,...t}){const n=(0,h.useRef)();return(0,h.useEffect)((()=>{n.current&&(n.current.textContent=n.current.textContent)}),[e]),(0,d.jsx)("div",{hidden:!0,...t,ref:n,children:e})}const sM=(0,h.forwardRef)((({nestingLevel:e,blockCount:t,clientId:n,...o},r)=>{const{insertedBlock:i,setInsertedBlock:s}=rM(),l=(0,m.useInstanceId)(sM),{directInsert:a,hideInserter:c}=(0,g.useSelect)((e=>{const{getBlockListSettings:t,getTemplateLock:o,isZoomOut:r}=G(e(ji)),i=t(n);return{directInsert:i?.directInsert||!1,hideInserter:!!o(n)||r()}}),[n]),u=Sj({clientId:n,context:"list-view"}),p=Sj({clientId:i?.clientId,context:"list-view"});if((0,h.useEffect)((()=>{p?.length&&(0,Uo.speak)((0,T.sprintf)((0,T.__)("%s block inserted"),p),"assertive")}),[p]),c)return null;const f=`list-view-appender__${l}`,b=(0,T.sprintf)((0,T.__)("Append to %1$s block at position %2$d, Level %3$d"),u,t+1,e);return(0,d.jsxs)("div",{className:"list-view-appender",children:[(0,d.jsx)(lI,{ref:r,rootClientId:n,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:a,__experimentalIsQuick:!0,...o,toggleProps:{"aria-describedby":f},onSelectOrClose:e=>{e?.clientId&&s(e)}}),(0,d.jsx)(iM,{id:f,children:b})]})})),lM=Jx(ws.__experimentalTreeGridRow),aM=(0,h.forwardRef)((({isDragged:e,isSelected:t,position:n,level:o,rowCount:r,children:i,className:s,path:l,...a},c)=>{const u=tS({clientId:a["data-block"],enableAnimation:!0,triggerAnimationOnChange:l}),p=(0,m.useMergeRefs)([c,u]);return(0,d.jsx)(lM,{ref:p,className:ms("block-editor-list-view-leaf",s),level:o,positionInSet:n,setSize:r,isExpanded:void 0,...a,children:i})}));var cM=aM;var uM=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),dM=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});function pM({onClick:e}){return(0,d.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,d.jsx)(Ol,{icon:(0,T.isRTL)()?nc:oc})})}const hM={"core/image":({clientId:e,attributes:t})=>{if(t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/cover":({clientId:e,attributes:t})=>{if("image"===t.backgroundType&&t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/media-text":({clientId:e,attributes:t})=>{if("image"===t.mediaType&&t.mediaUrl)return{url:t.mediaUrl,alt:t.mediaAlt||"",clientId:e}},"core/gallery":({innerBlocks:e})=>{const t=[],n=e?.length?hM[e[0].name]:void 0;if(!n)return t;for(const o of e){const e=n(o);if(e&&t.push(e),t.length>=3)return t}return t}};function gM({clientId:e,isExpanded:t}){const{block:n}=(0,g.useSelect)((t=>({block:t(ji).getBlock(e)})),[e]);return(0,h.useMemo)((()=>function(e,t){const n=hM[e.name],o=n?n(e):void 0;return o?Array.isArray(o)?t?[]:o:[o]:[]}(n,t)),[n,t])}const{Badge:mM}=G(ws.privateApis);var fM=(0,h.forwardRef)((function({className:e,block:{clientId:t},onClick:n,onContextMenu:o,onMouseDown:r,onToggleExpanded:i,tabIndex:s,onFocus:l,onDragStart:a,onDragEnd:c,draggable:u,isExpanded:h,ariaDescribedBy:m},f){const b=Xf(t),k=Sj({clientId:t,context:"list-view"}),{isLocked:v}=HE(t),{canToggleBlockVisibility:_,isBlockHidden:y,isContentOnly:x}=(0,g.useSelect)((e=>{const{getBlockName:n}=e(ji),{isBlockHidden:o}=G(e(ji));return{canToggleBlockVisibility:(0,p.hasBlockSupport)(n(t),"blockVisibility",!0),isBlockHidden:o(t),isContentOnly:"contentOnly"===e(ji).getBlockEditingMode(t)}}),[t]),S=v&&!x,w=_&&y,C="sticky"===b?.positionType,B=gM({clientId:t,isExpanded:h});return(0,d.jsxs)("a",{className:ms("block-editor-list-view-block-select-button",e),onClick:n,onContextMenu:o,onKeyDown:function(e){e.keyCode!==Wa.ENTER&&e.keyCode!==Wa.SPACE||n(e)},onMouseDown:r,ref:f,tabIndex:s,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),a?.(e)},onDragEnd:c,draggable:u,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":h,children:[(0,d.jsx)(pM,{onClick:i}),(0,d.jsx)(Vu,{icon:b?.icon,showColors:!0,context:"list-view"}),(0,d.jsxs)(ws.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,d.jsx)(ws.__experimentalTruncate,{ellipsizeMode:"auto",children:k})}),b?.anchor&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,d.jsx)(mM,{className:"block-editor-list-view-block-select-button__anchor",children:b.anchor})}),C&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,d.jsx)(Ol,{icon:uM})}),B.length?(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:B.map(((e,t)=>(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${e.url})`,zIndex:B.length-t}},e.clientId)))}):null,w&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility",children:(0,d.jsx)(Ol,{icon:nT})}),S&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,d.jsx)(Ol,{icon:dM})})]})]})}));const bM=(0,h.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:i,level:s,isExpanded:l,selectedClientIds:a,...c},u)=>{const{clientId:p}=n,{AdditionalBlockContent:h,insertedBlock:g,setInsertedBlock:m}=rM(),f=a.includes(p)?a:[p];return(0,d.jsxs)(d.Fragment,{children:[h&&(0,d.jsx)(h,{block:n,insertedBlock:g,setInsertedBlock:m}),(0,d.jsx)(Aj,{appendToOwnerDocument:!0,clientIds:f,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:a,onDragStart:p,onDragEnd:h})=>(0,d.jsx)(fM,{ref:u,className:"block-editor-list-view-block-contents",block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:i,level:s,draggable:a,onDragStart:p,onDragEnd:h,isExpanded:l,...c})})]})}));var kM=bM;function vM(e,t){const n=()=>{const n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?Ga.focus.focusable.find(n)[0]:null};let o=n();o?o.focus():window.requestAnimationFrame((()=>{o=n(),o&&o.focus()}))}var _M=(0,h.memo)((function e({block:{clientId:t},displacement:n,isAfterDraggedBlocks:o,isDragged:r,isNesting:i,isSelected:s,isBranchSelected:l,selectBlock:a,position:c,level:u,rowCount:f,siblingBlockCount:b,showBlockMovers:k,path:v,isExpanded:_,selectedClientIds:y,isSyncedBranch:x}){const S=(0,h.useRef)(null),w=(0,h.useRef)(null),C=(0,h.useRef)(null),[B,I]=(0,h.useState)(!1),[j,E]=(0,h.useState)(),{isLocked:M,canEdit:P,canMove:R}=HE(t),A=s&&y[0]===t,N=s&&y[y.length-1]===t,{toggleBlockHighlight:L,duplicateBlocks:D,multiSelect:O,replaceBlocks:z,removeBlocks:V,insertAfterBlock:F,insertBeforeBlock:H,setOpenedBlockSettingsMenu:U,updateBlockAttributes:$}=G((0,g.useDispatch)(ji)),W=(0,m.useDebounce)(L,50),{canInsertBlockType:K,getSelectedBlockClientIds:Z,getPreviousBlockClientId:q,getBlockRootClientId:Y,getBlockOrder:X,getBlockParents:Q,getBlocksByClientId:J,canRemoveBlocks:ee,isGroupable:te}=(0,g.useSelect)(ji),{getGroupingBlockName:ne}=(0,g.useSelect)(p.store),oe=Xf(t),re=RE(),{block:ie,blockName:se,allowRightClickOverrides:le,isBlockHidden:ae}=(0,g.useSelect)((e=>{const{getBlock:n,getBlockName:o,getSettings:r}=e(ji),{isBlockHidden:i}=G(e(ji));return{block:n(t),blockName:o(t),allowRightClickOverrides:r().allowRightClickOverrides,isBlockHidden:i(t)}}),[t]),ce=(0,p.hasBlockSupport)(se,"__experimentalToolbar",!0),ue=`list-view-block-select-button__description-${(0,m.useInstanceId)(e)}`,{expand:de,collapse:pe,collapseAll:he,BlockSettingsMenu:ge,listViewInstanceId:me,expandedState:fe,setInsertedBlock:be,treeGridElementRef:ke,rootClientId:ve}=rM(),_e=(0,Yk.__unstableUseShortcutEventMatch)();function ye(){const e=Z(),n=e.includes(t),o=n?e[0]:t,r=Y(o);return{blocksToUpdate:n?e:[t],firstBlockClientId:o,firstBlockRootClientId:r,selectedBlockClientIds:e}}const xe=(0,h.useCallback)((()=>{I(!0),W(t,!0)}),[t,I,W]),Se=(0,h.useCallback)((()=>{I(!1),W(t,!1)}),[t,I,W]),we=(0,h.useCallback)((e=>{a(e,t),e.preventDefault()}),[t,a]),Ce=(0,h.useCallback)(((e,t)=>{t&&a(void 0,e,null,null),vM(e,ke?.current)}),[a,ke]),Be=(0,h.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?pe(t):!1===_&&de(t)}),[t,de,pe,_]),Ie=(0,h.useCallback)((e=>{ce&&le&&(C.current?.click(),E(new window.DOMRect(e.clientX,e.clientY,0,0)),e.preventDefault())}),[le,C,ce]),je=(0,h.useCallback)((e=>{le&&2===e.button&&e.preventDefault()}),[le]),Ee=(0,h.useMemo)((()=>{const{ownerDocument:e}=w?.current||{};if(j&&e)return{ownerDocument:e,getBoundingClientRect:()=>j}}),[j]),Te=(0,h.useCallback)((()=>{E(void 0)}),[E]);if(function({isSelected:e,selectedClientIds:t,rowItemRef:n}){const o=1===t.length;(0,h.useLayoutEffect)((()=>{if(!e||!o||!n.current)return;const t=(0,Ga.getScrollContainer)(n.current),{ownerDocument:r}=n.current;if(t===r.body||t===r.documentElement||!t)return;const i=n.current.getBoundingClientRect(),s=t.getBoundingClientRect();(i.top<s.top||i.bottom>s.bottom)&&n.current.scrollIntoView()}),[e,o,n])}({isSelected:s,rowItemRef:w,selectedClientIds:y}),!ie)return null;const Me=((e,t,n)=>(0,T.sprintf)((0,T.__)("Block %1$d of %2$d, Level %3$d."),e,t,n))(c,b,u),Pe=((e,t)=>[e?.positionLabel?`${(0,T.sprintf)((0,T.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,T.__)("This block is locked."):void 0].filter(Boolean).join(" "))(oe,M),Re=ae?(0,T.__)("Block is hidden."):null,Ae=k&&b>0,Ne=ms("block-editor-list-view-block__mover-cell",{"is-visible":B||s}),Le=ms("block-editor-list-view-block__menu-cell",{"is-visible":B||A});let De;Ae?De=2:ce||(De=3);const Oe=ms({"is-selected":s,"is-first-selected":A,"is-last-selected":N,"is-branch-selected":l,"is-synced-branch":x,"is-dragging":r,"has-single-cell":!ce,"is-synced":oe?.isSynced,"is-draggable":R,"is-displacement-normal":"normal"===n,"is-displacement-up":"up"===n,"is-displacement-down":"down"===n,"is-after-dragged-blocks":o,"is-nesting":i}),ze=y.includes(t)?y:[t],Ve=s&&1===y.length;return(0,d.jsxs)(cM,{className:Oe,isDragged:r,onKeyDown:async function(e){if(e.defaultPrevented)return;if(e.target.closest("[role=dialog]"))return;const t=[Wa.BACKSPACE,Wa.DELETE].includes(e.keyCode);if(_e("core/block-editor/unselect",e)&&y.length>0)e.stopPropagation(),e.preventDefault(),a(e,void 0);else if(t||_e("core/block-editor/remove",e)){const{blocksToUpdate:e,firstBlockClientId:t,firstBlockRootClientId:n,selectedBlockClientIds:o}=ye();if(!ee(e))return;let r=q(t)??n;V(e,!1);const i=o.length>0&&0===Z().length;r||(r=X()[0]),Ce(r,i)}else if(_e("core/block-editor/paste-styles",e)){e.preventDefault();const{blocksToUpdate:t}=ye(),n=J(t);re(n)}else if(_e("core/block-editor/duplicate",e)){e.preventDefault();const{blocksToUpdate:t,firstBlockRootClientId:n}=ye();if(J(t).every((e=>!!e&&(0,p.hasBlockSupport)(e.name,"multiple",!0)&&K(e.name,n)))){const e=await D(t,!1);e?.length&&Ce(e[0],!1)}}else if(_e("core/block-editor/insert-before",e)){e.preventDefault();const{blocksToUpdate:t}=ye();await H(t[0]);const n=Z();U(void 0),Ce(n[0],!1)}else if(_e("core/block-editor/insert-after",e)){e.preventDefault();const{blocksToUpdate:t}=ye();await F(t.at(-1));const n=Z();U(void 0),Ce(n[0],!1)}else if(_e("core/block-editor/select-all",e)){e.preventDefault();const{firstBlockRootClientId:t,selectedBlockClientIds:n}=ye(),o=X(t);if(!o.length)return;if(Ja()(n,o)&&t&&t!==ve)return void Ce(t,!0);O(o[0],o[o.length-1],null)}else if(_e("core/block-editor/collapse-list-view",e)){e.preventDefault();const{firstBlockClientId:t}=ye(),n=Q(t,!1);he(),de(n)}else if(_e("core/block-editor/group",e)){const{blocksToUpdate:t}=ye();if(t.length>1&&te(t)){e.preventDefault();const n=J(t),o=ne(),r=(0,p.switchToBlockType)(n,o);z(t,r),(0,Uo.speak)((0,T.__)("Selected blocks are grouped."));const i=Z();U(void 0),Ce(i[0],!1)}}else if(_e("core/block-editor/toggle-block-visibility",e)){e.preventDefault();const{blocksToUpdate:t}=ye(),n=J(t);if(!n.every((e=>(0,p.hasBlockSupport)(e.name,"blockVisibility",!0))))return;const o=n.some((e=>!1===e.attributes.metadata?.blockVisibility)),r=Object.fromEntries(n.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!!o&&void 0})}])));$(t,r,{uniqueByBlock:!0})}},onMouseEnter:xe,onMouseLeave:Se,onFocus:xe,onBlur:Se,level:u,position:c,rowCount:f,path:v,id:`list-view-${me}-block-${t}`,"data-block":t,"data-expanded":P?_:void 0,ref:w,children:[(0,d.jsx)(ws.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:De,ref:S,"aria-selected":!!s,children:({ref:e,tabIndex:t,onFocus:n})=>(0,d.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,d.jsx)(kM,{block:ie,onClick:we,onContextMenu:Ie,onMouseDown:je,onToggleExpanded:Be,isSelected:s,position:c,siblingBlockCount:b,level:u,ref:e,tabIndex:Ve?0:t,onFocus:n,isExpanded:P?_:void 0,selectedClientIds:y,ariaDescribedBy:ue}),(0,d.jsx)(iM,{id:ue,children:[Me,Pe,Re].filter(Boolean).join(" ")})]})}),Ae&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(ws.__experimentalTreeGridCell,{className:Ne,withoutGridItem:!0,children:[(0,d.jsx)(ws.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,d.jsx)(Vj,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})}),(0,d.jsx)(ws.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,d.jsx)(Fj,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})})]})}),ce&&ge&&(0,d.jsx)(ws.__experimentalTreeGridCell,{className:Le,"aria-selected":!!s,ref:C,children:({ref:e,tabIndex:t,onFocus:n})=>(0,d.jsx)(ge,{clientIds:ze,block:ie,icon:fv,label:(0,T.__)("Options"),popoverProps:{anchor:Ee},toggleProps:{ref:e,className:"block-editor-list-view-block__menu",tabIndex:t,onClick:Te,onFocus:n,size:"small"},disableOpenOnArrowDown:!0,expand:de,expandedState:fe,setInsertedBlock:be,__experimentalSelectBlock:Ce})})]})}));function yM(e,t,n,o){const r=n?.includes(e.clientId);if(r)return 0;return t[e.clientId]??o?1+e.innerBlocks.reduce(xM(t,n,o),0):1}const xM=(e,t,n)=>(o,r)=>{const i=t?.includes(r.clientId);if(i)return o;return(e[r.clientId]??n)&&r.innerBlocks.length>0?o+yM(r,e,t,n):o+1},SM=()=>{};var wM=(0,h.memo)((function e(t){const{blocks:n,selectBlock:o=SM,showBlockMovers:r,selectedClientIds:i,level:s=1,path:l="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:p,parentId:m,shouldShowInnerBlocks:f=!0,isSyncedBranch:b=!1,showAppender:k=!0}=t,v=Xf(m),_=b||!!v?.isSynced,y=(0,g.useSelect)((e=>!m||e(ji).canEditBlock(m)),[m]),{blockDropPosition:x,blockDropTargetIndex:S,firstDraggedBlockIndex:w,blockIndexes:C,expandedState:B,draggedClientIds:I}=rM(),j=(0,h.useRef)();if(!y)return null;const E=k&&1===s,T=n.filter(Boolean),M=T.length,P=E?M+1:M;return j.current=c,(0,d.jsxs)(d.Fragment,{children:[T.map(((t,n)=>{const{clientId:c,innerBlocks:h}=t;n>0&&(j.current+=yM(T[n-1],B,I,p));const m=!!I?.includes(c),{displacement:b,isAfterDraggedBlocks:k,isNesting:v}=function({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:n,clientId:o,firstDraggedBlockIndex:r,isDragged:i}){let s,l,a;if(!i){l=!1;const i=e[o];a=i>r,null!=t&&void 0!==r?void 0!==i&&(s=i>=r&&i<t?"up":i<r&&i>=t?"down":"normal",l="number"==typeof t&&t-1===i&&"inside"===n):null===t&&void 0!==r?s=void 0!==i&&i>=r?"up":"normal":null!=t&&void 0===r?void 0!==i&&(s=i<t?"normal":"down"):null===t&&(s="normal")}return{displacement:s,isNesting:l,isAfterDraggedBlocks:a}}({blockIndexes:C,blockDropTargetIndex:S,blockDropPosition:x,clientId:c,firstDraggedBlockIndex:w,isDragged:m}),{itemInView:y}=u,E=y(j.current),R=n+1,A=l.length>0?`${l}_${R}`:`${R}`,N=!!h?.length,L=N&&f?B[c]??p:void 0,D=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(c,i),O=a||D&&N,z=m||E||D&&c===i[0]||0===n||n===M-1;return(0,d.jsxs)(g.AsyncModeProvider,{value:!D,children:[z&&(0,d.jsx)(_M,{block:t,selectBlock:o,isSelected:D,isBranchSelected:O,isDragged:m,level:s,position:R,rowCount:P,siblingBlockCount:M,showBlockMovers:r,path:A,isExpanded:!m&&L,listPosition:j.current,selectedClientIds:i,isSyncedBranch:_,displacement:b,isAfterDraggedBlocks:k,isNesting:v}),!z&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{className:"block-editor-list-view-placeholder"})}),N&&L&&!m&&(0,d.jsx)(e,{parentId:c,blocks:h,selectBlock:o,showBlockMovers:r,level:s+1,path:A,listPosition:j.current+1,fixedListWindow:u,isBranchSelected:O,selectedClientIds:i,isExpanded:p,isSyncedBranch:_})]},c)})),E&&(0,d.jsx)(ws.__experimentalTreeGridRow,{level:s,setSize:P,positionInSet:P,isExpanded:!0,children:(0,d.jsx)(ws.__experimentalTreeGridCell,{children:e=>(0,d.jsx)(sM,{clientId:m,nestingLevel:s,blockCount:M,...e})})})]})}));function CM({draggedBlockClientId:e,listViewRef:t,blockDropTarget:n}){const o=Xf(e),r=Sj({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:l}=n||{},[a,c]=(0,h.useMemo)((()=>{if(!t.current)return[];return[i?t.current.querySelector(`[data-block="${i}"]`):void 0,s?t.current.querySelector(`[data-block="${s}"]`):void 0]}),[t,i,s]),u=c||a,p=(0,T.isRTL)(),g=(0,h.useCallback)(((e,t)=>{if(!u)return 0;let n=u.offsetWidth;const o=(0,Ga.getScrollContainer)(u,"horizontal"),r=u.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const r=o.getBoundingClientRect(),i=(0,T.isRTL)()?r.right-e.right:e.left-r.left,s=o.clientWidth;if(s<n+i&&(n=s-i),!p&&e.left+t<r.left)return n-=r.left-e.left,n;if(p&&e.right-t>r.right)return n-=e.right-r.right,n}return n-t}),[p,u]),m=(0,h.useMemo)((()=>{if(!u)return{};const e=u.getBoundingClientRect();return{width:g(e,0)}}),[g,u]),f=(0,h.useMemo)((()=>{if(!u)return{};const e=(0,Ga.getScrollContainer)(u),t=u.ownerDocument,n=e===t.body||e===t.documentElement;if(e&&!n){const t=e.getBoundingClientRect(),n=u.getBoundingClientRect(),o=p?t.right-n.right:n.left-t.left;if(!p&&t.left>n.left)return{transform:`translateX( ${o}px )`};if(p&&t.right<n.right)return{transform:`translateX( ${-1*o}px )`}}return{}}),[p,u]),b=(0,h.useMemo)((()=>{if(!a)return 1;const e=parseInt(a.getAttribute("aria-level"),10);return e?e+1:1}),[a]),k=(0,h.useMemo)((()=>!!u&&u.classList.contains("is-branch-selected")),[u]),v=(0,h.useMemo)((()=>{if(u&&("top"===l||"bottom"===l||"inside"===l))return{contextElement:u,getBoundingClientRect(){const e=u.getBoundingClientRect();let t=e.left,n=0;const o=(0,Ga.getScrollContainer)(u,"horizontal"),r=u.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const e=o.getBoundingClientRect(),n=p?o.offsetWidth-o.clientWidth:0;t<e.left+n&&(t=e.left+n)}n="top"===l?e.top-2*e.height:e.top;const s=g(e,0),a=e.height;return new window.DOMRect(t,n,s,a)}}}),[u,l,g,p]);return u?(0,d.jsx)(ws.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,d.jsx)("div",{style:m,className:ms("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":k}),children:(0,d.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":b,children:[(0,d.jsxs)("div",{className:ms("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:f,children:[(0,d.jsx)(pM,{onClick:()=>{}}),(0,d.jsx)(Vu,{icon:o?.icon,showColors:!0,context:"list-view"}),(0,d.jsx)(ws.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,d.jsx)(ws.__experimentalTruncate,{ellipsizeMode:"auto",children:r})})})]}),(0,d.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}function BM(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,g.useDispatch)(ji),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:l,hasSelectedBlock:a}=(0,g.useSelect)(ji),{getBlockType:c}=(0,g.useSelect)(p.store);return{updateBlockSelection:(0,h.useCallback)((async(u,d,p,h)=>{if(!u?.shiftKey&&u?.keyCode!==Wa.ESCAPE)return void n(d,h);u.preventDefault();const g="keydown"===u.type&&u.keyCode===Wa.ESCAPE,m="keydown"===u.type&&(u.keyCode===Wa.UP||u.keyCode===Wa.DOWN||u.keyCode===Wa.HOME||u.keyCode===Wa.END);if(!m&&!a()&&!l())return void n(d,null);const f=s(),b=[...r(d),d];if((g||m&&!f.some((e=>b.includes(e))))&&await e(),!g){let e=i(),n=d;m&&(a()||l()||(e=d),p&&(n=p));const o=r(e),s=r(n),{start:c,end:u}=function(e,t,n,o){const r=[...n,e],i=[...o,t],s=Math.min(r.length,i.length)-1;return{start:r[s],end:i[s]}}(e,n,o,s);await t(c,u,null)}const k=s();if((u.keyCode===Wa.HOME||u.keyCode===Wa.END)&&k.length>1)return;const v=f.filter((e=>!k.includes(e)));let _;if(1===v.length){const e=c(o(v[0]))?.title;e&&(_=(0,T.sprintf)((0,T.__)("%s deselected."),e))}else v.length>1&&(_=(0,T.sprintf)((0,T.__)("%s blocks deselected."),v.length));_&&(0,Uo.speak)(_,"assertive")}),[e,o,c,r,i,s,l,a,t,n])}}const IM=24;function jM(e,t){const n=e[t+1];return n&&n.isDraggedBlock?jM(e,t+1):n}const EM=["top","bottom"];function TM(e,t,n=!1){let o,r,i,s,l;for(let n=0;n<e.length;n++){const a=e[n];if(a.isDraggedBlock)continue;const c=a.element.getBoundingClientRect(),[u,d]=zS(t,c,EM),p=VS(t,c);if(void 0===i||u<i||p){i=u;const t=e.indexOf(a),n=e[t-1];if("top"===d&&n&&n.rootClientId===a.rootClientId&&!n.isDraggedBlock?(r=n,o="bottom",s=n.element.getBoundingClientRect(),l=t-1):(r=a,o=d,s=c,l=t),p)break}}if(!r)return;const a=function(e,t){const n=[];let o=e;for(;o;)n.push({...o}),o=t.find((e=>e.clientId===o.rootClientId));return n}(r,e),c="bottom"===o;if(c&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0&&r.isExpanded||function(e,t,n=1,o=!1){const r=o?t.right-n*IM:t.left+n*IM;return(o?e.x<r-IM:e.x>r+IM)&&e.y<t.bottom}(t,s,a.length,n))){const e=r.isExpanded?0:r.innerBlockCount||0;return{rootClientId:r.clientId,clientId:r.clientId,blockIndex:e,dropPosition:"inside"}}if(c&&r.rootClientId&&function(e,t,n=1,o=!1){const r=o?t.right-n*IM:t.left+n*IM;return o?e.x>r:e.x<r}(t,s,a.length,n)){const i=jM(e,l),c=r.nestingLevel,u=i?i.nestingLevel:1;if(c&&u){const d=function(e,t,n=1,o=!1){const r=o?t.right-n*IM:t.left+n*IM,i=o?r-e.x:e.x-r,s=Math.round(i/IM);return Math.abs(s)}(t,s,a.length,n),p=Math.max(Math.min(d,c-u),0);if(a[p]){let t=r.blockIndex;if(a[p].nestingLevel===i?.nestingLevel)t=i?.blockIndex;else for(let n=l;n>=0;n--){const o=e[n];if(o.rootClientId===a[p].rootClientId){t=o.blockIndex+1;break}}return{rootClientId:a[p].rootClientId,clientId:r.clientId,blockIndex:t,dropPosition:o}}}}if(!r.canInsertDraggedBlocksAsSibling)return;const u=c?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+u,dropPosition:o}}const MM={leading:!1,trailing:!0};function PM({selectBlock:e}){const t=(0,g.useRegistry)(),{getBlockOrder:n,getBlockRootClientId:o,getBlocksByClientId:r,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:l,canInsertBlockType:a,canRemoveBlocks:c}=(0,g.useSelect)(ji),{flashBlock:u,removeBlocks:d,replaceBlocks:h,insertBlocks:f}=(0,g.useDispatch)(ji),b=jw();return(0,m.useRefEffect)((g=>{function m(t,n){n&&e(void 0,t,null,null),vM(t,g)}function k(e){if(e.defaultPrevented)return;if(!g.contains(e.target.ownerDocument.activeElement))return;const k=e.target.ownerDocument.activeElement?.closest("[role=row]"),v=k?.dataset?.block;if(!v)return;const{blocksToUpdate:_,firstBlockClientId:y,firstBlockRootClientId:x,originallySelectedBlockClientIds:S}=function(e){const t=s(),n=t.includes(e),r=n?t[0]:e;return{blocksToUpdate:n?t:[e],firstBlockClientId:r,firstBlockRootClientId:o(r),originallySelectedBlockClientIds:t}}(v);if(0!==_.length){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===_.length&&u(_[0]),b(e.type,_);Mw(e,r(_),t)}if("cut"===e.type){if(!c(_))return;let e=i(y)??x;d(_,!1);const t=S.length>0&&0===s().length;e||(e=n()[0]),m(e,t)}else if("paste"===e.type){const{__experimentalCanUserUseUnfilteredHTML:t}=l(),n=function(e,t){const{plainText:n,html:o,files:r}=Ew(e);let i=[];if(r.length){const e=(0,p.getBlockTransforms)("from");i=r.reduce(((t,n)=>{const o=(0,p.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else i=(0,p.pasteHandler)({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}(e,t);if(1===_.length){const[e]=_;if(n.every((t=>a(t.name,e))))return f(n,void 0,e),void m(n[0]?.clientId,!1)}h(_,n,n.length-1,-1),m(n[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",k),g.ownerDocument.addEventListener("cut",k),g.ownerDocument.addEventListener("paste",k),()=>{g.ownerDocument.removeEventListener("copy",k),g.ownerDocument.removeEventListener("cut",k),g.ownerDocument.removeEventListener("paste",k)}}),[])}const RM=(e,t)=>"clear"===t.type?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const AM=(0,h.forwardRef)((function e({id:t,blocks:n,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:i=!1,showAppender:s=!1,blockSettingsMenu:l=dT,rootClientId:a,description:c,onSelect:u,additionalBlockContent:p},f){n&&I()("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const b=(0,m.useInstanceId)(e),{clientIdsTree:k,draggedClientIds:v,selectedClientIds:_}=function({blocks:e,rootClientId:t}){return(0,g.useSelect)((n=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,getEnabledClientIdsTree:i}=G(n(ji));return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:e??i(t)}}),[e,t])}({blocks:n,rootClientId:a}),y=function(e){return(0,h.useMemo)((()=>{const t={};let n=0;const o=e=>{e.forEach((e=>{t[e.clientId]=n,n++,e.innerBlocks.length>0&&o(e.innerBlocks)}))};return o(e),t}),[e])}(k),{getBlock:x}=(0,g.useSelect)(ji),{visibleBlockCount:S}=(0,g.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(ji),o=v?.length>0?n(v).length+1:0;return{visibleBlockCount:t()-o}}),[v]),{updateBlockSelection:w}=BM(),[C,B]=(0,h.useReducer)(RM,{}),[j,E]=(0,h.useState)(null),{setSelectedTreeId:M}=function({firstSelectedBlockClientId:e,setExpandedState:t}){const[n,o]=(0,h.useState)(null),{selectedBlockParentClientIds:r}=(0,g.useSelect)((t=>{const{getBlockParents:n}=t(ji);return{selectedBlockParentClientIds:n(e,!1)}}),[e]);return(0,h.useEffect)((()=>{n!==e&&r?.length&&t({type:"expand",clientIds:r})}),[e,r,n,t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:_[0],setExpandedState:B}),P=(0,h.useCallback)(((e,t,n)=>{w(e,t,null,n),M(t),u&&u(x(t))}),[M,w,u,x]),{ref:R,target:A}=function({dropZoneElement:e,expandedState:t,setExpandedState:n}){const{getBlockRootClientId:o,getBlockIndex:r,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:l}=(0,g.useSelect)(ji),[a,c]=(0,h.useState)(),{rootClientId:u,blockIndex:d}=a||{},p=OS(u,d),f=(0,T.isRTL)(),b=(0,m.usePrevious)(u),k=(0,h.useCallback)(((e,t)=>{const{rootClientId:o}=t||{};o&&("inside"!==t?.dropPosition||e[o]||n({type:"expand",clientIds:[o]}))}),[n]),v=(0,m.useThrottle)(k,500,MM);(0,h.useEffect)((()=>{"inside"===a?.dropPosition&&b===a?.rootClientId?v(t,a):v.cancel()}),[t,b,a,v]);const _=s(),y=(0,m.useThrottle)((0,h.useCallback)(((e,t)=>{const n={x:e.clientX,y:e.clientY},s=!!_?.length,a=TM(Array.from(t.querySelectorAll("[data-block]")).map((e=>{const t=e.dataset.block,n="true"===e.dataset.expanded,a=e.classList.contains("is-dragging"),c=parseInt(e.getAttribute("aria-level"),10),u=o(t);return{clientId:t,isExpanded:n,rootClientId:u,blockIndex:r(t),element:e,nestingLevel:c||void 0,isDraggedBlock:!!s&&a,innerBlockCount:i(t),canInsertDraggedBlocksAsSibling:!s||l(_,u),canInsertDraggedBlocksAsChild:!s||l(_,t)}})),n,f);a&&c(a)}),[l,_,i,r,o,f]),50);return{ref:(0,m.__experimentalUseDropZone)({dropZoneElement:e,onDrop(e){y.cancel(),a&&p(e),c(void 0)},onDragLeave(){y.cancel(),c(null)},onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),c(void 0)}}),target:a}}({dropZoneElement:o,expandedState:C,setExpandedState:B}),N=(0,h.useRef)(),L=PM({selectBlock:P}),D=(0,m.useMergeRefs)([L,N,R,f]);(0,h.useEffect)((()=>{_?.length&&vM(_[0],N?.current)}),[]);const O=(0,h.useCallback)((e=>{if(!e)return;const t=Array.isArray(e)?e:[e];B({type:"expand",clientIds:t})}),[B]),z=(0,h.useCallback)((e=>{e&&B({type:"collapse",clientIds:[e]})}),[B]),V=(0,h.useCallback)((()=>{B({type:"clear"})}),[B]),F=(0,h.useCallback)((e=>{O(e?.dataset?.block)}),[O]),H=(0,h.useCallback)((e=>{z(e?.dataset?.block)}),[z]),U=(0,h.useCallback)(((e,t,n)=>{e.shiftKey&&w(e,t?.dataset?.block,n?.dataset?.block)}),[w]);!function({collapseAll:e,expand:t}){const{expandedBlock:n,getBlockParents:o}=(0,g.useSelect)((e=>{const{getBlockParents:t,getExpandedBlock:n}=G(e(ji));return{expandedBlock:n(),getBlockParents:t}}),[]);(0,h.useEffect)((()=>{if(n){const r=o(n,!1);e(),t(r)}}),[e,t,n,o])}({collapseAll:V,expand:O});const $=v?.[0],{blockDropTargetIndex:W,blockDropPosition:K,firstDraggedBlockIndex:Z}=(0,h.useMemo)((()=>{let e,t;if(A?.clientId){const t=y[A.clientId];e=void 0===t||"top"===A?.dropPosition?t:t+1}else null===A&&(e=null);if($){const e=y[$];t=void 0===e||"top"===A?.dropPosition?e:e+1}return{blockDropTargetIndex:e,blockDropPosition:A?.dropPosition,firstDraggedBlockIndex:t}}),[A,y,$]),q=(0,h.useMemo)((()=>({blockDropPosition:K,blockDropTargetIndex:W,blockIndexes:y,draggedClientIds:v,expandedState:C,expand:O,firstDraggedBlockIndex:Z,collapse:z,collapseAll:V,BlockSettingsMenu:l,listViewInstanceId:b,AdditionalBlockContent:p,insertedBlock:j,setInsertedBlock:E,treeGridElementRef:N,rootClientId:a})),[K,W,y,v,C,O,Z,z,V,l,b,p,j,E,a]),[Y]=(0,m.__experimentalUseFixedWindowList)(N,32,S,{expandedState:C,useWindowing:!0,windowOverscan:40});if(!k.length&&!s)return null;const X=c&&`block-editor-list-view-description-${b}`;return(0,d.jsxs)(g.AsyncModeProvider,{value:!0,children:[(0,d.jsx)(CM,{draggedBlockClientId:$,listViewRef:N,blockDropTarget:A}),c&&(0,d.jsx)(ws.VisuallyHidden,{id:X,children:c}),(0,d.jsx)(ws.__experimentalTreeGrid,{id:t,className:ms("block-editor-list-view-tree",{"is-dragging":v?.length>0&&void 0!==W}),"aria-label":(0,T.__)("Block navigation structure"),ref:D,onCollapseRow:H,onExpandRow:F,onFocusRow:U,applicationAriaLabel:(0,T.__)("Block navigation structure"),"aria-describedby":X,style:{"--wp-admin--list-view-dragged-items-height":v?.length?32*(v.length-1)+"px":null},children:(0,d.jsx)(oM.Provider,{value:q,children:(0,d.jsx)(wM,{blocks:k,parentId:a,selectBlock:P,showBlockMovers:r,fixedListWindow:Y,selectedClientIds:_,isExpanded:i,showAppender:s})})})]})}));var NM=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(AM,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0})));function LM({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...r,ref:o,icon:nM,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,T.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}var DM=(0,h.forwardRef)((function({isDisabled:e,...t},n){I()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,g.useSelect)((e=>!!e(ji).getBlockCount()),[])&&!e;return(0,d.jsx)(ws.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:r})=>(0,d.jsx)(LM,{...t,innerRef:n,isOpen:e,onToggle:r,isEnabled:o}),renderContent:()=>(0,d.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,d.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,T.__)("List view")}),(0,d.jsx)(NM,{})]})})}));function OM({genericPreviewBlock:e,style:t,className:n,activeStyle:o}){const r=(0,p.getBlockType)(e.name)?.example,i=oE(n,o,t),s=(0,h.useMemo)((()=>({...e,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:i+" block-editor-block-styles__block-preview-container"},example:r})),[e,i]);return(0,d.jsx)(_C,{item:s})}const zM=()=>{};var VM=function({clientId:e,onSwitch:t=zM,onHoverClassName:n=zM}){const{onSelect:o,stylesToRender:r,activeStyle:i,genericPreviewBlock:s,className:l}=iE({clientId:e,onSwitch:t}),[a,c]=(0,h.useState)(null),u=(0,m.useViewportMatch)("medium","<");if(!r||0===r.length)return null;const p=(0,m.debounce)(c,250),g=e=>{a!==e?(p(e),n(e?.name??null)):p.cancel()};return(0,d.jsxs)("div",{className:"block-editor-block-styles",children:[(0,d.jsx)("div",{className:"block-editor-block-styles__variants",children:r.map((e=>{const t=e.label||e.name;return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:ms("block-editor-block-styles__item",{"is-active":i.name===e.name}),variant:"secondary",label:t,onMouseEnter:()=>g(e),onFocus:()=>g(e),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>(e=>{o(e),n(null),c(null),p.cancel()})(e),"aria-current":i.name===e.name,children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:t})},e.name)}))}),a&&!u&&(0,d.jsx)(ws.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,d.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null),children:(0,d.jsx)(OM,{activeStyle:i,className:l,genericPreviewBlock:s,style:a})})})]})};const FM={0:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})}),1:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})}),2:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})}),3:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})}),4:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})}),5:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})}),6:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})})};function HM({level:e}){return FM[e]?(0,d.jsx)(ws.Icon,{icon:FM[e]}):null}const UM=[1,2,3,4,5,6],GM={className:"block-library-heading-level-dropdown"};function $M({options:e=UM,value:t,onChange:n}){const o=e.filter((e=>0===e||UM.includes(e))).sort(((e,t)=>e-t));return(0,d.jsx)(ws.ToolbarDropdownMenu,{popoverProps:GM,icon:(0,d.jsx)(HM,{level:t}),label:(0,T.__)("Change level"),controls:o.map((e=>{const o=e===t;return{icon:(0,d.jsx)(HM,{level:e}),title:0===e?(0,T.__)("Paragraph"):(0,T.sprintf)((0,T.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}))})}var WM=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var KM=function({icon:e=WM,label:t=(0,T.__)("Choose variation"),instructions:n=(0,T.__)("Select a variation to start with:"),variations:o,onSelect:r,allowSkip:i}){const s=ms("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,d.jsxs)(ws.Placeholder,{icon:e,label:t,instructions:n,className:s,children:[(0,d.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,T.__)("Block variations"),children:o.map((e=>(0,d.jsxs)("li",{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,d.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:e.title})]},e.name)))}),i&&(0,d.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(),children:(0,T.__)("Skip")})})]})};const ZM="carousel",qM="grid",YM=({onBlockPatternSelect:e})=>(0,d.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,T.__)("Choose")})}),XM=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,d.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,d.jsx)(ws.Button,{size:"compact",icon:(0,T.isRTL)()?Zb:qb,label:(0,T.__)("Previous pattern"),onClick:e,disabled:0===n,accessibleWhenDisabled:!0}),(0,d.jsx)(ws.Button,{size:"compact",icon:(0,T.isRTL)()?qb:Zb,label:(0,T.__)("Next pattern"),onClick:t,disabled:n===o-1,accessibleWhenDisabled:!0})]});var QM=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i,onBlockPatternSelect:s})=>{const l=e===ZM,a=(0,d.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,d.jsx)(ws.Button,{size:"compact",icon:ca,label:(0,T.__)("Carousel view"),onClick:()=>t(ZM),isPressed:l}),(0,d.jsx)(ws.Button,{size:"compact",icon:_T,label:(0,T.__)("Grid view"),onClick:()=>t(qM),isPressed:e===qM})]});return(0,d.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[l&&(0,d.jsx)(XM,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i}),a,l&&(0,d.jsx)(YM,{onBlockPatternSelect:s})]})};var JM=function(e,t,n){return(0,g.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=o(ji),l=r(e);return n?s(l).filter(n):i(t,l)}),[e,t,n])};const eP=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o,showTitles:r})=>{const i="block-editor-block-pattern-setup__container";if(e===ZM){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,d.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,d.jsx)("div",{className:i,children:(0,d.jsx)("div",{className:"carousel-container",children:n.map(((n,o)=>(0,d.jsx)(nP,{active:o===t,className:e.get(o)||"",pattern:n},n.name)))})})})}return(0,d.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,d.jsx)(ws.Composite,{role:"listbox",className:i,"aria-label":(0,T.__)("Patterns list"),children:n.map((e=>(0,d.jsx)(tP,{pattern:e,onSelect:o,showTitles:r},e.name)))})})};function tP({pattern:e,onSelect:t,showTitles:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,description:i,viewportWidth:s=700}=e,l=(0,m.useInstanceId)(tP,`${o}__item-description`);return(0,d.jsx)("div",{className:`${o}__list-item`,children:(0,d.jsxs)(ws.Composite.Item,{render:(0,d.jsx)("div",{"aria-describedby":i?l:void 0,"aria-label":e.title,className:`${o}__item`}),id:`${o}__pattern__${e.name}`,role:"option",onClick:()=>t(r),children:[(0,d.jsx)(kC,{blocks:r,viewportWidth:s}),n&&(0,d.jsx)("div",{className:`${o}__item-title`,children:e.title}),!!i&&(0,d.jsx)(ws.VisuallyHidden,{id:l,children:i})]})})}function nP({active:e,className:t,pattern:n,minHeight:o}){const{blocks:r,title:i,description:s}=n,l=(0,m.useInstanceId)(nP,"block-editor-block-pattern-setup-list__item-description");return(0,d.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?l:void 0,children:[(0,d.jsx)(kC,{blocks:r,minHeight:o}),!!s&&(0,d.jsx)(ws.VisuallyHidden,{id:l,children:s})]})}var oP=({clientId:e,blockName:t,filterPatternsFn:n,onBlockPatternSelect:o,initialViewMode:r=ZM,showTitles:i=!1})=>{const[s,l]=(0,h.useState)(r),[a,c]=(0,h.useState)(0),{replaceBlock:u}=(0,g.useDispatch)(ji),m=JM(e,t,n);if(!m?.length)return null;const f=o||(t=>{const n=t.map((e=>(0,p.cloneBlock)(e)));u(e,n)});return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,d.jsx)(eP,{viewMode:s,activeSlide:a,patterns:m,onBlockPatternSelect:f,showTitles:i}),(0,d.jsx)(QM,{viewMode:s,setViewMode:l,activeSlide:a,totalSlides:m.length,handleNext:()=>{c((e=>Math.min(e+1,m.length-1)))},handlePrevious:()=>{c((e=>Math.max(e-1,0)))},onBlockPatternSelect:()=>{f(m[a].blocks)}})]})})};function rP({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,d.jsxs)("fieldset",{className:e,children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Transform to variation")}),o.map((e=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,d.jsx)(Vu,{icon:e.icon,showColors:!0}),isPressed:n===e.name,label:n===e.name?e.title:(0,T.sprintf)((0,T.__)("Transform to %s"),e.title),onClick:()=>t(e.name),"aria-label":e.title,showTooltip:!0},e.name)))]})}function iP({className:e,onSelectVariation:t,selectedValue:n,variations:o}){const r=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n})));return(0,d.jsx)(ws.DropdownMenu,{className:e,label:(0,T.__)("Transform to variation"),text:(0,T.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${e}__popover`},icon:yI,toggleProps:{iconPosition:"right"},children:()=>(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.MenuItemsChoice,{choices:r,value:n,onSelect:t})})})}function sP({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,d.jsx)("div",{className:e,children:(0,d.jsx)(ws.__experimentalToggleGroupControl,{label:(0,T.__)("Transform to variation"),value:n,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:o.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:(0,d.jsx)(Vu,{icon:e.icon,showColors:!0}),value:e.name,label:n===e.name?e.title:(0,T.sprintf)((0,T.__)("Transform to %s"),e.title)},e.name)))})})}var lP=function({blockClientId:e}){const{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{activeBlockVariation:n,variations:o,isContentOnly:r,isSection:i}=(0,g.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:o}=t(p.store),{getBlockName:r,getBlockAttributes:i,getBlockEditingMode:s,isSectionBlock:l}=G(t(ji)),a=e&&r(e),{hasContentRoleAttribute:c}=G(t(p.store)),u=c(a);return{activeBlockVariation:n(a,i(e),"transform"),variations:a&&o(a,"transform"),isContentOnly:"contentOnly"===s(e)&&!u,isSection:l(e)}}),[e]),s=n?.name,l=(0,h.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{t.icon&&e.add(t.icon?.src||t.icon)})),e.size===o.length)}),[o]),a=window?.__experimentalContentOnlyPatternInsertion&&i;if(!o?.length||r||a)return null;const c=o.length>5,u=l?c?rP:sP:iP;return(0,d.jsx)(u,{className:"block-editor-block-variation-transforms",onSelectVariation:n=>{t(e,{...o.find((({name:e})=>e===n)).attributes})},selectedValue:s,variations:o})},aP=(0,m.createHigherOrderComponent)((e=>t=>{const[n,o,r,i,s]=Ti("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),l=s?[...o||[],...n||[],...r||[]]:[...o||[],...r||[]],{colors:a=l,disableCustomColors:c=!i}=t,u=a&&a.length>0||!c;return(0,d.jsx)(e,{...{...t,colors:a,disableCustomColors:c,hasColorsToChoose:u}})}),"withColorContext"),cP=aP(ws.ColorPalette);function uP({onChange:e,value:t,...n}){return(0,d.jsx)(qp,{...n,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}const dP=window.wp.date,pP=new Date;function hP({format:e,defaultFormat:t,onChange:n}){return(0,d.jsxs)(ws.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Date format")}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Default format"),help:`${(0,T.__)("Example:")} ${(0,dP.dateI18n)(t,pP)}`,checked:!e,onChange:e=>n(e?null:t)}),e&&(0,d.jsx)(gP,{format:e,onChange:n})]})}function gP({format:e,onChange:t}){const n=[...[...new Set(["Y-m-d",(0,T._x)("n/j/Y","short date format"),(0,T._x)("n/j/Y g:i A","short date format with time"),(0,T._x)("M j, Y","medium date format"),(0,T._x)("M j, Y g:i A","medium date format with time"),(0,T._x)("F j, Y","long date format"),(0,T._x)("M j","short date format without the year")])].map(((e,t)=>({key:`suggested-${t}`,name:(0,dP.dateI18n)(e,pP),format:e}))),{key:"human-diff",name:(0,dP.humanTimeDiff)(pP),format:"human-diff"}],o={key:"custom",name:(0,T.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,T.__)("Enter your own date format")},[r,i]=(0,h.useState)((()=>!!e&&!n.some((t=>t.format===e))));return(0,d.jsxs)(ws.__experimentalVStack,{children:[(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Choose a format"),options:[...n,o],value:r?o:n.find((t=>t.format===e))??o,onChange:({selectedItem:e})=>{e===o?i(!0):(i(!1),t(e.format))}}),r&&(0,d.jsx)(ws.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Custom format"),hideLabelFromVision:!0,help:(0,h.createInterpolateElement)((0,T.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:e=>t(e)})]})}pP.setDate(20),pP.setMonth(pP.getMonth()-3),4===pP.getMonth()&&pP.setMonth(3);const mP=({setting:e,children:t,panelId:n,...o})=>(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()},isShownByDefault:void 0===e.isShownByDefault||e.isShownByDefault,...o,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:n,resetAllFilter:e.resetAllFilter,children:t}),fP=({colorValue:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,d.jsx)(ws.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),bP=e=>({onToggle:t,isOpen:n})=>{const{clearable:o,colorValue:r,gradientValue:i,onColorChange:s,onGradientChange:l,label:a}=e,c=(0,h.useRef)(void 0),u={onClick:t,className:ms("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,ref:c},p=r??i;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...u,children:(0,d.jsx)(fP,{colorValue:p,label:a})}),o&&p&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Ha,onClick:()=>{r?s():i&&l(),n&&t(),c.current?.focus()}})]})};function kP({colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradients:r,settings:i,__experimentalIsRenderedInSidebar:s,...l}){let a;return s&&(a={placement:"left-start",offset:36,shift:!0}),(0,d.jsx)(d.Fragment,{children:i.map(((i,c)=>{const u={clearable:!1,colorValue:i.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradientValue:i.gradientValue,gradients:r,label:i.label,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...i},p={clearable:i.clearable,label:i.label,colorValue:i.colorValue,gradientValue:i.gradientValue,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange};return i&&(0,d.jsx)(mP,{setting:i,...l,children:(0,d.jsx)(ws.Dropdown,{popoverProps:a,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:bP(p),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,d.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,d.jsx)(qp,{...u})})})})},c)}))})}const vP=["colors","disableCustomColors","gradients","disableCustomGradients"],_P=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:i,settings:s,title:l,showTitle:a=!0,__experimentalIsRenderedInSidebar:c,enableAlpha:u})=>{const p=(0,m.useInstanceId)(_P),{batch:h}=(0,g.useRegistry)();return t&&0!==t.length||n&&0!==n.length||!o||!r||!s?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,d.jsxs)(ws.__experimentalToolsPanel,{className:ms("block-editor-panel-color-gradient-settings",e),label:a?l:void 0,resetAll:()=>{h((()=>{s.forEach((({colorValue:e,gradientValue:t,onColorChange:n,onGradientChange:o})=>{e?n():t&&o()}))}))},panelId:p,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,d.jsx)(kP,{settings:s,panelId:p,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:c,enableAlpha:u}),!!i&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalSpacer,{marginY:4})," ",i]})]}):null},yP=e=>{const t=Nd();return(0,d.jsx)(_P,{...{...t,...e}})};var xP=e=>vP.every((t=>e.hasOwnProperty(t)))?(0,d.jsx)(_P,{...e}):(0,d.jsx)(yP,{...e}),SP=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const wP=100,CP=300,BP={placement:"bottom-start"},IP={crop:(0,T.__)("Image cropped."),rotate:(0,T.__)("Image rotated."),cropAndRotate:(0,T.__)("Image cropped and rotated.")};const jP=(0,h.createContext)({});jP.displayName="ImageEditingContext";const EP=()=>(0,h.useContext)(jP);function TP({id:e,url:t,naturalWidth:n,naturalHeight:o,onFinishEditing:r,onSaveImage:i,children:s}){const l=function({url:e,naturalWidth:t,naturalHeight:n}){const[o,r]=(0,h.useState)(),[i,s]=(0,h.useState)(),[l,a]=(0,h.useState)({x:0,y:0}),[c,u]=(0,h.useState)(100),[d,p]=(0,h.useState)(0),g=t/n,[m,b]=(0,h.useState)(g),k=(0,h.useCallback)((()=>{const t=(d+90)%360;let n=g;if(d%180==90&&(n=1/g),0===t)return r(),p(t),b(g),void a((e=>({x:-e.y*n,y:e.x*n})));const o=new window.Image;o.src=e,o.onload=function(e){const o=document.createElement("canvas");let i=0,s=0;t%180?(o.width=e.target.height,o.height=e.target.width):(o.width=e.target.width,o.height=e.target.height),90!==t&&180!==t||(i=o.width),270!==t&&180!==t||(s=o.height);const l=o.getContext("2d");l.translate(i,s),l.rotate(t*Math.PI/180),l.drawImage(e.target,0,0),o.toBlob((e=>{r(URL.createObjectURL(e)),p(t),b(o.width/o.height),a((e=>({x:-e.y*n,y:e.x*n})))}))};const i=(0,f.applyFilters)("media.crossOrigin",void 0,e);"string"==typeof i&&(o.crossOrigin=i)}),[d,g,e]);return(0,h.useMemo)((()=>({editedUrl:o,setEditedUrl:r,crop:i,setCrop:s,position:l,setPosition:a,zoom:c,setZoom:u,rotation:d,setRotation:p,rotateClockwise:k,aspect:m,setAspect:b,defaultAspect:g})),[o,i,l,c,d,k,m,g])}({url:t,naturalWidth:n,naturalHeight:o}),a=function({crop:e,rotation:t,url:n,id:o,onSaveImage:r,onFinishEditing:i}){const{createErrorNotice:s,createSuccessNotice:l}=(0,g.useDispatch)(pr.store),[a,c]=(0,h.useState)(!1),{editMediaEntity:u}=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return{editMediaEntity:t?.[V]}}),[]),d=(0,h.useCallback)((()=>{c(!1),i()}),[i]),p=(0,h.useCallback)((async()=>{if(!u)return i(),void s((0,T.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});c(!0);const a=[];if(t>0&&a.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&a.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),0===a.length)return c(!1),void i();const d=1===a.length?a[0].type:"cropAndRotate";try{const e=await u(o,{src:n,modifiers:a},{throwOnError:!0});e&&(r({id:e.id,url:e.source_url}),l(IP[d],{type:"snackbar",actions:[{label:(0,T.__)("Undo"),onClick:()=>{r({id:o,url:n})}}]}))}catch(e){s((0,T.sprintf)((0,T.__)("Could not edit image. %s"),(0,Ga.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})}finally{c(!1),i()}}),[e,t,o,n,r,s,l,i,u]);return(0,h.useMemo)((()=>({isInProgress:a,apply:p,cancel:d})),[a,p,d])}({id:e,url:t,onSaveImage:i,onFinishEditing:r,...l}),c=(0,h.useMemo)((()=>({...l,...a})),[l,a]);return(0,d.jsx)(jP.Provider,{value:c,children:s})}function MP({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,d.jsx)(ws.MenuGroup,{label:n,children:e.map((({name:e,slug:n,ratio:i})=>(0,d.jsx)(ws.MenuItem,{disabled:t,onClick:()=>{o(i)},role:"menuitemradio",isSelected:i===r,icon:i===r?ip:void 0,children:e},n)))})}function PP(e){const[t,n,...o]=e.split("/").map(Number);return t<=0||n<=0||Number.isNaN(t)||Number.isNaN(n)||o.length?NaN:n?t/n:t}function RP({ratio:e,...t}){return{ratio:PP(e),...t}}function AP({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=EP(),[i,s,l]=Ti("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,d.jsx)(ws.DropdownMenu,{icon:SP,label:(0,T.__)("Aspect Ratio"),popoverProps:BP,toggleProps:e,children:({onClose:e})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(MP,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{slug:"original",name:(0,T.__)("Original"),ratio:r},...l?i.map(RP).filter((({ratio:e})=>1===e)):[]]}),s?.length>0&&(0,d.jsx)(MP,{label:(0,T.__)("Theme"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:s}),l&&(0,d.jsx)(MP,{label:(0,T.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(RP).filter((({ratio:e})=>e>1))}),l&&(0,d.jsx)(MP,{label:(0,T.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(RP).filter((({ratio:e})=>e<1))})]})})}var NP=function(e,t){return NP=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])},NP(e,t)};function LP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}NP(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var DP=function(){return DP=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},DP.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var OP=n(7520),zP=n.n(OP);function VP(e,t,n,o,r){void 0===r&&(r=0);var i=KP(t.width,t.height,r),s=i.width,l=i.height;return{x:FP(e.x,s,n.width,o),y:FP(e.y,l,n.height,o)}}function FP(e,t,n,o){var r=t*o/2-n/2;return ZP(e,-r,r)}function HP(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function UP(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function GP(e,t){return Math.min(e,Math.max(0,t))}function $P(e,t){return t}function WP(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function KP(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function ZP(e,t,n){return Math.min(Math.max(e,t),n)}function qP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var YP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=ic.createRef(),n.videoRef=ic.createRef(),n.containerPosition={x:0,y:0},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,mediaObjectFit:void 0},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.currentDoc.removeEventListener("scroll",n.onScroll))},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,i){var s=KP(t.width,t.height,n),l=ZP(o.width/s.width*(100/e.width),r,i);return{crop:{x:l*s.width/2-o.width/2-s.width*l*(e.x/100),y:l*s.height/2-o.height/2-s.height*l*(e.y/100)},zoom:l}}(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 i=function(e,t,n,o,r,i){void 0===n&&(n=0);var s=KP(t.naturalWidth,t.naturalHeight,n),l=ZP(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,i),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((s.width-e.width)/2-e.x)*a,y:((s.height-e.height)/2-e.y)*a},zoom:l}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=i.crop,r=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,i,s,l=n.imageRef.current||n.videoRef.current;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var a=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(l.offsetWidth<c||l.offsetHeight<u)switch(n.state.mediaObjectFit){default:case"contain":p=a>d?{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}}else p={width:l.offsetWidth,height:l.offsetHeight};n.mediaSize=DP(DP({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,i){void 0===i&&(i=0);var s=KP(e,t,i),l=s.width,a=s.height,c=Math.min(l,n),u=Math.min(a,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===(i=n.state.cropSize)||void 0===i?void 0:i.height)===h.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},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),n.saveContainerPosition(),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 i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,i=e.y;n.dragStartPosition={x:r,y:i},n.dragStartCrop=DP({},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,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},s=n.props.restrictPosition?VP(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(s)}})))},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=zP()(e).pixelY,i=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(i,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,t){var o=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-t.x),y:n.containerRect.height/2-(r-t.y)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,i=r.crop,s=r.zoom;return{x:(t+i.x)/s,y:(o+i.y)/s}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,i=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var s=ZP(e,n.props.minZoom,n.props.maxZoom);if(i){var l=n.getPointOnContainer(t,n.containerPosition),a=n.getPointOnMedia(l),c={x:a.x*s-l.x,y:a.y*s-l.y},u=n.props.restrictPosition?VP(c,n.mediaSize,n.state.cropSize,s,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(s)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,i,s){void 0===i&&(i=0),void 0===s&&(s=!0);var l=s?GP:$P,a=KP(t.width,t.height,i),c=KP(t.naturalWidth,t.naturalHeight,i),u={x:l(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:l(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:l(100,n.width/a.width*100/r),height:l(100,n.height/a.height*100/r)},d=Math.round(l(c.width,u.width*c.width/100)),p=Math.round(l(c.height,u.height*c.height/100)),h=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:DP(DP({},h),{x:Math.round(l(c.width-h.width,u.x*c.width/100)),y:Math.round(l(c.height-h.height,u.y*c.height/100))})}}(n.props.restrictPosition?VP(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?VP(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 LP(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.currentDoc.addEventListener("scroll",this.onScroll),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,i,s,l,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?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===(i=e.crop)||void 0===i?void 0:i.x)===(null===(s=this.props.crop)||void 0===s?void 0:s.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(a=this.props.crop)||void 0===a?void 0:a.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());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,o;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(o=this.videoRef.current)||void 0===o?void 0:o.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=HP(n,o),this.lastPinchRotation=UP(n,o),this.onDragStart(WP(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]),i=WP(o,r);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=HP(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var s=UP(o,r),l=n.props.rotation+(s-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=s}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,i=t.transform,s=t.crop,l=s.x,a=s.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,h=t.style,g=h.containerStyle,m=h.cropAreaStyle,f=h.mediaStyle,b=t.classes,k=b.containerClassName,v=b.cropAreaClassName,_=b.mediaClassName,y=this.state.mediaObjectFit;return ic.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:qP("reactEasyCrop_Container",k)},n?ic.createElement("img",DP({alt:"",className:qP("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",_)},r,{src:n,ref:this.imageRef,style:DP(DP({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&ic.createElement("video",DP({autoPlay:!0,loop:!0,muted:!0,className:qP("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",_)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:DP(DP({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return ic.createElement("source",DP({key:e.src},e))}))),this.state.cropSize&&ic.createElement("div",{style:DP(DP({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:qP("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",v)}))},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}(ic.Component);function XP({url:e,width:t,height:n,naturalHeight:o,naturalWidth:r,borderProps:i}){const{isInProgress:s,editedUrl:l,position:a,zoom:c,aspect:u,setPosition:p,setCrop:h,setZoom:g,rotation:f}=EP(),[b,{width:k}]=(0,m.useResizeObserver)();let v=n||k*o/r;f%180==90&&(v=k*r/o);const _=(0,d.jsxs)("div",{className:ms("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||k,height:v},children:[(0,d.jsx)(YP,{image:l||e,disabled:s,minZoom:wP/100,maxZoom:CP/100,crop:a,zoom:c/100,aspect:u,onCropChange:e=>{p(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),s&&(0,d.jsx)(ws.Spinner,{})]});return(0,d.jsxs)(d.Fragment,{children:[b,_]})}var QP=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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 JP(){const{isInProgress:e,zoom:t,setZoom:n}=EP();return(0,d.jsx)(ws.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:BP,renderToggle:({isOpen:t,onToggle:n})=>(0,d.jsx)(ws.ToolbarButton,{icon:QP,label:(0,T.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Zoom"),min:wP,max:CP,value:Math.round(t),onChange:n})})})}var eR=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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 tR(){const{isInProgress:e,rotateClockwise:t}=EP();return(0,d.jsx)(ws.ToolbarButton,{icon:eR,label:(0,T.__)("Rotate"),onClick:t,disabled:e})}function nR(){const{isInProgress:e,apply:t,cancel:n}=EP();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarButton,{onClick:t,disabled:e,children:(0,T.__)("Apply")}),(0,d.jsx)(ws.ToolbarButton,{onClick:n,children:(0,T.__)("Cancel")})]})}function oR({id:e,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i,onSaveImage:s,onFinishEditing:l,borderProps:a}){return(0,d.jsxs)(TP,{id:e,url:t,naturalWidth:i,naturalHeight:r,onSaveImage:s,onFinishEditing:l,children:[(0,d.jsx)(XP,{borderProps:a,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i}),(0,d.jsxs)(Rs,{children:[(0,d.jsxs)(ws.ToolbarGroup,{children:[(0,d.jsx)(JP,{}),(0,d.jsx)(ws.ToolbarItem,{children:e=>(0,d.jsx)(AP,{toggleProps:e})}),(0,d.jsx)(tR,{})]}),(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(nR,{})})]})]})}const rR=[25,50,75,100],iR=()=>{};function sR(e,t,n){return{scaledWidth:Math.round(t*(e/100)),scaledHeight:Math.round(n*(e/100))}}function lR({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:i,width:s,height:l,onChange:a,onChangeImage:c=iR}){const{currentHeight:u,currentWidth:p,updateDimension:g,updateDimensions:m}=function(e,t,n,o,r){const[i,s]=(0,h.useState)(t??o??""),[l,a]=(0,h.useState)(e??n??"");return(0,h.useEffect)((()=>{void 0===t&&void 0!==o&&s(o),void 0===e&&void 0!==n&&a(n)}),[o,n]),(0,h.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(l)&&a(e)}),[t,e]),{currentHeight:l,currentWidth:i,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?s(n):a(n),r({[e]:n})},updateDimensions:(e,t)=>{a(e??n),s(t??o),r({height:e,width:t})}}}(l,s,n,t,a),f=rR.find((e=>{const{scaledWidth:o,scaledHeight:r}=sR(e,t,n);return p===o&&u===r}));return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[o&&o.length>0&&(0,d.jsx)(ws.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Resolution"),value:i,options:o,onChange:c,help:e,size:"__unstable-large"}),r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Width"),value:p,min:1,onChange:e=>g("width",e),size:"__unstable-large"}),(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Height"),value:u,min:1,onChange:e=>g("height",e),size:"__unstable-large"})]}),(0,d.jsx)(ws.__experimentalToggleGroupControl,{label:(0,T.__)("Image size presets"),hideLabelFromVision:!0,onChange:e=>{if(void 0===e)return void m();const{scaledWidth:o,scaledHeight:r}=sR(e,t,n);m(r,o)},value:f,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:rR.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:e,label:(0,T.sprintf)((0,T.__)("%d%%"),e)},e)))})]})]})}function aR({url:e,urlLabel:t,className:n}){const o=ms(n,"block-editor-url-popover__link-viewer-url");return e?(0,d.jsx)(ws.ExternalLink,{className:o,href:e,children:t||(0,Ua.filterURLForDisplay)((0,Ua.safeDecodeURI)(e))}):(0,d.jsx)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:cR}=G(ws.privateApis),uR=(0,h.forwardRef)((({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:i,...s},l)=>{let a;void 0!==i&&I()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?a=o:void 0!==i&&(a=cR(i)),a=a||"bottom";const[c,u]=(0,h.useState)(!1),p=!!n&&c;return(0,d.jsxs)(ws.Popover,{ref:l,role:"dialog","aria-modal":"true","aria-label":(0,T.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:r,placement:a,shift:!0,variant:"toolbar",...s,children:[(0,d.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,d.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!n&&(0,d.jsx)(ws.Button,{className:"block-editor-url-popover__settings-toggle",icon:yI,label:(0,T.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c,size:"compact"})]})}),p&&(0,d.jsx)("div",{className:"block-editor-url-popover__settings",children:n()}),e&&!p&&(0,d.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})}));uR.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,d.jsxs)("form",{className:ms("block-editor-url-popover__link-editor",t),...r,children:[(0,d.jsx)(ac,{value:o,onChange:n,autocompleteRef:e}),(0,d.jsx)(ws.Button,{icon:tc,label:(0,T.__)("Apply"),type:"submit",size:"compact"})]})},uR.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...i}){return(0,d.jsxs)("div",{className:ms("block-editor-url-popover__link-viewer",e),...i,children:[(0,d.jsx)(aR,{url:o,urlLabel:r,className:t}),n&&(0,d.jsx)(ws.Button,{icon:Wc,label:(0,T.__)("Edit"),onClick:n,size:"compact"})]})};var dR=uR;const pR=()=>{},hR=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,d.jsx)(dR,{anchor:r,onClose:o,children:(0,d.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n,children:(0,d.jsx)(ws.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,T.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,T.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{size:"small",icon:tc,label:(0,T.__)("Apply"),type:"submit"})})})})}),gR=({src:e,onChangeSrc:t,onSelectURL:n})=>{const[o,r]=(0,h.useState)(null),[i,s]=(0,h.useState)(!1),l=()=>{s(!1),o?.focus()};return(0,d.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:()=>{s(!0)},isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:r,children:(0,T.__)("Insert from URL")}),i&&(0,d.jsx)(hR,{src:e,onChange:t,onSubmit:t=>{t.preventDefault(),e&&n&&(n(e),l())},onClose:l,popoverAnchor:o})]})};var mR=(0,ws.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:i,notices:s,isAppender:l,accept:a,addToGallery:c,multiple:u=!1,handleUpload:p=!0,disableDropZone:m,disableMediaButtons:f,onError:b,onSelect:k,onCancel:v,onSelectURL:_,onToggleFeaturedImage:y,onDoubleClick:x,onFilesPreUpload:S=pR,onHTMLDrop:w,children:C,mediaLibraryButton:B,placeholder:j,style:E}){w&&I()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const M=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return t().mediaUpload}),[]),[P,R]=(0,h.useState)("");(0,h.useEffect)((()=>{R(e?.src??"")}),[e?.src]);const A=n=>{if(!p||"function"==typeof p&&!p(n))return k(n);let o;if(S(n),u)if(c){let t=[];o=n=>{const o=(e??[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));k(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=k;else o=([e])=>k(e);M({allowedTypes:t,filesList:n,onFileChange:o,onError:b,multiple:u})};async function N(e){const{blocks:n}=DS(e);if(!n?.length)return;const o=await Promise.all(n.map((e=>{const n=e.name.split("/")[1];return e.attributes.id?(e.attributes.type=n,e.attributes):new Promise(((o,r)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((i=>M({filesList:[i],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption,type:n},onFileChange:([e])=>{e.id&&o(e)},allowedTypes:t,onError:r}))).catch((()=>o(e.attributes.url)))}))}))).catch((e=>b(e)));o?.length&&k(u?o:o[0])}const L=e=>{A(e.target.files)},D=j??(e=>{let{instructions:a,title:c}=r;if(M||_||(a=(0,T.__)("To edit this block, you need permission to upload media.")),void 0===a||void 0===c){const e=t??[],[n]=e,o=1===e.length,r=o&&"audio"===n,i=o&&"image"===n,s=o&&"video"===n;void 0===a&&M&&(a=(0,T.__)("Drag and drop an image or video, upload, or choose from your library."),r?a=(0,T.__)("Drag and drop an audio file, upload, or choose from your library."):i?a=(0,T.__)("Drag and drop an image, upload, or choose from your library."):s&&(a=(0,T.__)("Drag and drop a video, upload, or choose from your library."))),void 0===c&&(c=(0,T.__)("Media"),r?c=(0,T.__)("Audio"):i?c=(0,T.__)("Image"):s&&(c=(0,T.__)("Video")))}const u=ms("block-editor-media-placeholder",n,{"is-appender":l});return(0,d.jsxs)(ws.Placeholder,{icon:o,label:c,instructions:a,className:u,notices:s,onDoubleClick:x,preview:i,style:E,children:[e,C]})}),O=()=>m?null:(0,d.jsx)(ws.DropZone,{onFilesDrop:A,onDrop:N,isEligible:e=>{const n="wp-block:core/",o=[];for(const t of e.types)t.startsWith(n)&&o.push(t.slice(14));return o.every((e=>t.includes(e)))&&(!!u||1===o.length)}}),z=()=>v&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,T.__)("Cancel"),variant:"link",onClick:v,children:(0,T.__)("Cancel")}),V=()=>_&&(0,d.jsx)(gR,{src:P,onChangeSrc:R,onSelectURL:_}),F=()=>y&&(0,d.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:y,variant:"secondary",children:(0,T.__)("Use featured image")})});return f?(0,d.jsx)(Xa,{children:O()}):(0,d.jsx)(Xa,{fallback:D(V()),children:(()=>{const n=B??(({open:e})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{e()},children:(0,T.__)("Media Library")})),o=(0,d.jsx)(Ya,{addToGallery:c,gallery:u&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:u,onSelect:k,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(M&&l)return(0,d.jsxs)(d.Fragment,{children:[O(),(0,d.jsx)(ws.FormFileUpload,{onChange:L,accept:a,multiple:!!u,render:({openFileDialog:e})=>{const t=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",className:ms("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e,children:(0,T._x)("Upload","verb")}),o,V(),F(),z()]});return D(t)}})]});if(M){const e=(0,d.jsxs)(d.Fragment,{children:[O(),(0,d.jsx)(ws.FormFileUpload,{render:({openFileDialog:e})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"primary",className:ms("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,T._x)("Upload","verb")}),onChange:L,accept:a,multiple:!!u}),o,V(),F(),z()]});return D(e)}return D(o)})()})}));var fR=({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,d.jsx)(xP,{settings:n,gradients:[],disableCustomGradients:!0,...t})};const bR={placement:"bottom-start"};var kR=()=>(0,d.jsxs)(d.Fragment,{children:[["bold","italic","link","unknown"].map((e=>(0,d.jsx)(ws.Slot,{name:`RichText.ToolbarControls.${e}`},e))),(0,d.jsx)(ws.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,d.jsx)(ws.ToolbarItem,{children:n=>(0,d.jsx)(ws.DropdownMenu,{icon:yI,label:(0,T.__)("More"),toggleProps:{...n,className:ms(n.className,{"is-pressed":t}),description:(0,T.__)("Displays more block tools")},controls:xt(e.map((([{props:e}])=>e)),"title"),popoverProps:bR})})}})]});function vR({popoverAnchor:e}){return(0,d.jsx)(ws.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,d.jsx)(ET,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,T.__)("Format tools"),children:(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(kR,{})})})})}var _R=({inline:e,editableContentElement:t})=>e?(0,d.jsx)(vR,{popoverAnchor:t}):(0,d.jsx)(Rs,{group:"inline",children:(0,d.jsx)(kR,{})});function yR(e){return e(pe.store).getFormatTypes()}const xR=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function SR(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function wR(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)),{})}const CR=["`",'"',"'","“”","‘’"];function BR(e){let t=e.length;for(;t--;){const n=mr(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].toString().replace(gr,""),[e[t].clientId,n,0,0];const o=BR(e[t].innerBlocks);if(o)return o}return[]}function IR(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function jR({allowedFormats:e,disableFormats:t}){return t?jR.EMPTY_ARRAY:e}jR.EMPTY_ARRAY=[];const ER=[e=>t=>{function n(n){const{inputType:o,data:r}=n,{value:i,onChange:s,registry:l}=e.current;if("insertText"!==o)return;if((0,pe.isCollapsed)(i))return;const a=(0,f.applyFilters)("blockEditor.wrapSelectionSettings",CR).find((([e,t])=>e===r||t===r));if(!a)return;const[c,u=c]=a,d=i.start,p=i.end+c.length;let h=(0,pe.insert)(i,c,d,d);h=(0,pe.insert)(h,u,p,p);const{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:m}=l.dispatch(ji);g(),s(h),m();const b={};for(const e in n)b[e]=n[e];b.data=u;const{ownerDocument:k}=t,{defaultView:v}=k,_=new v.InputEvent("input",b);window.queueMicrotask((()=>{n.target.dispatchEvent(_)})),n.preventDefault()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},e=>t=>{function n(){const{getValue:t,onReplace:n,selectionChange:o,registry:r}=e.current;if(!n)return;const i=t(),{start:s,text:l}=i;if(" "!==l.slice(s-1,s))return;const a=l.slice(0,s).trim(),c=(0,p.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),u=(0,p.findTransform)(c,(({prefix:e})=>a===e));if(!u)return;const d=(0,pe.toHTMLString)({value:(0,pe.insert)(i,gr,0,s)}),h=u.transform(d);return o(...BR([h])),n([h]),r.dispatch(ji).__unstableMarkAutomaticChange(),!0}function o(t){const{inputType:o,type:r}=t,{getValue:i,onChange:s,__unstableAllowPrefixTransformations:l,formatTypes:a,registry:c}=e.current;if("insertText"!==o&&"compositionend"!==r)return;if(l&&n())return;const u=i(),d=a.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,pe.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(u)),{__unstableMarkLastChangeAsPersistent:p,__unstableMarkAutomaticChange:h}=c.dispatch(ji);d!==u&&(p(),s({...d,activeFormats:u.activeFormats}),h())}return t.addEventListener("input",o),t.addEventListener("compositionend",o),()=>{t.removeEventListener("input",o),t.removeEventListener("compositionend",o)}},e=>t=>{function n(t){if("insertReplacementText"!==t.inputType)return;const{registry:n}=e.current;n.dispatch(ji).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},()=>e=>{function t(e){(Wa.isKeyboardEvent.primary(e,"z")||Wa.isKeyboardEvent.primary(e,"y")||Wa.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},e=>t=>{const{keyboardShortcuts:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},e=>t=>{const{inputEvents:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("input",o),()=>{t.removeEventListener("input",o)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;if(n!==Wa.BACKSPACE&&n!==Wa.ESCAPE)return;const{registry:o}=e.current,{didAutomaticChange:r,getSettings:i}=o.select(ji),{__experimentalUndo:s}=i();s&&r()&&(t.preventDefault(),s())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(n){const{disableFormats:o,onChange:r,value:i,formatTypes:s,tagName:l,onReplace:a,__unstableEmbedURLOnPaste:c,preserveWhiteSpace:u,pastePlainText:d}=e.current;if(!t.contains(n.target))return;if(n.defaultPrevented)return;const{plainText:h,html:g}=Ew(n);if(n.preventDefault(),window.console.log("Received HTML:\n\n",g),window.console.log("Received plain text:\n\n",h),o)return void r((0,pe.insert)(i,h));function m(e){const t=s.reduce(((e,{__unstablePasteRule:t})=>(t&&e===i&&(e=t(i,{html:g,plainText:h})),e)),i);if(t!==i)r(t);else{const t=(0,pe.create)({html:e});!function(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}(t,i.activeFormats),r((0,pe.insert)(i,t))}}if("true"===n.clipboardData.getData("rich-text"))return void m(g);if(d)return void r((0,pe.insert)(i,(0,pe.create)({text:h})));let f="INLINE";const b=h.trim();c&&(0,pe.isEmpty)(i)&&(0,Ua.isURL)(b)&&/^https?:/.test(b)&&(f="BLOCKS");const k=(0,p.pasteHandler)({HTML:g,plainText:h,mode:f,tagName:l,preserveWhiteSpace:u});"string"==typeof k?m(k):k.length>0&&a&&(0,pe.isEmpty)(i)&&a(k,k.length-1,-1)}const{defaultView:o}=t.ownerDocument;return o.addEventListener("paste",n),()=>{o.removeEventListener("paste",n)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;const{value:o,onMerge:r,onRemove:i}=e.current;if(n===Wa.DELETE||n===Wa.BACKSPACE){const{start:e,end:s,text:l}=o,a=n===Wa.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,pe.isCollapsed)(o)||c||a&&0!==e||!a&&s!==l.length)return;r?r(!a):i&&(0,pe.isEmpty)(o)&&a&&i(!a),t.preventDefault()}}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(t){if(t.keyCode!==Wa.ENTER)return;const{onReplace:n,onSplit:o}=e.current;n&&o&&(t.__deprecatedOnSplit=!0)}function o(n){if(n.defaultPrevented)return;if(n.target!==t)return;if(n.keyCode!==Wa.ENTER)return;const{value:o,onChange:r,disableLineBreaks:i,onSplitAtEnd:s,onSplitAtDoubleLineEnd:l,registry:a}=e.current;n.preventDefault();const{text:c,start:u,end:d}=o;n.shiftKey?i||r((0,pe.insert)(o,"\n")):s&&u===d&&d===c.length?s():l&&u===d&&d===c.length&&"\n\n"===c.slice(-2)?a.batch((()=>{const e={...o};e.start=e.end-2,r((0,pe.remove)(e)),l()})):i||r((0,pe.insert)(o,"\n"))}const{defaultView:r}=t.ownerDocument;return r.addEventListener("keydown",o),t.addEventListener("keydown",n),()=>{r.removeEventListener("keydown",o),t.removeEventListener("keydown",n)}},e=>t=>{function n(){const{registry:n}=e.current;if(!n.select(ji).isMultiSelecting())return;const o=t.parentElement.closest('[contenteditable="true"]');o&&o.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}];function TR(e){const t=(0,h.useRef)(e);(0,h.useInsertionEffect)((()=>{t.current=e}));const n=(0,h.useMemo)((()=>ER.map((e=>e(t)))),[t]);return(0,m.useRefEffect)((t=>{if(!e.isSelected)return;const o=n.map((e=>e(t)));return()=>{o.forEach((e=>e()))}}),[n,e.isSelected])}const MR={},PR=Symbol("usesContext");function RR({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:i,edit:s,[PR]:l}=r,a=(0,h.useContext)(sv),c=(0,h.useMemo)((()=>l?Object.fromEntries(Object.entries(a).filter((([e])=>l.includes(e)))):MR),[l,a]);if(!s)return null;const u=(0,pe.getActiveFormat)(n,i),p=void 0!==u,g=(0,pe.getActiveObject)(n),m=void 0!==g&&g.type===i;return(0,d.jsx)(s,{isActive:p,activeAttributes:p&&u.attributes||{},isObjectActive:m,activeObjectAttributes:m&&g.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:c},i)}function AR({formatTypes:e,...t}){return e.map((e=>(0,ic.createElement)(RR,{settings:e,...t,key:e.name})))}function NR(e,t){if(WR.isEmpty(e)){const e=IR(t);return e?`<${e}></${e}>`:""}return Array.isArray(e)?(I()("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/"}),p.children.toHTML(e)):"string"==typeof e?e:e.toHTMLString()}function LR({value:e,tagName:t,multiline:n,format:o,...r}){return e=(0,d.jsx)(h.RawHTML,{children:NR(e,n)}),t?(0,d.jsx)(t,{...r,children:e}):e}var DR=(0,h.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:i,...s},l){I()("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:a}=C(),{getSelectionStart:c,getSelectionEnd:u}=(0,g.useSelect)(ji),{selectionChange:p}=(0,g.useDispatch)(ji),h=IR(i),m=`</${h}>${o=o||`<${h}></${h}>`}<${h}>`.split(`</${h}><${h}>`);function f(e){r(`<${h}>${e.join(`</${h}><${h}>`)}</${h}>`)}return m.shift(),m.pop(),(0,d.jsx)(n,{ref:l,children:m.map(((e,n)=>(0,d.jsx)(HR,{identifier:`${t}-${n}`,tagName:h,value:e,onChange:e=>{const t=m.slice();t[n]=e,f(t)},isSelected:void 0,onKeyDown:o=>{if(o.keyCode!==Wa.ENTER)return;o.preventDefault();const{offset:r}=c(),{offset:i}=u();if("number"!=typeof r||"number"!=typeof i)return;const s=(0,pe.create)({html:e});s.start=r,s.end=i;const l=(0,pe.split)(s).map((e=>(0,pe.toHTMLString)({value:e}))),d=m.slice();d.splice(n,1,...l),f(d),p(a,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=m.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}f(o),p(a,`${t}-${n-(e?0:1)}`,r,r)},...s},n)))})}));const OR=(0,h.createContext)();OR.displayName="keyboardShortcutContext";const zR=(0,h.createContext)();zR.displayName="inputEventContext";const VR=Symbol("instanceId");function FR(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:i,tagsToEliminate:s,disableEditingMenu:l,fontSize:a,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:h,disableSuggestions:g,disableAutocorrection:m,...f}=e;return f}function HR({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:i,inlineToolbar:s,wrapperClassName:l,autocompleters:a,onReplace:c,placeholder:u,allowedFormats:f,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:y,__unstableOnSplitAtEnd:x,__unstableOnSplitAtDoubleLineEnd:S,identifier:w,preserveWhiteSpace:B,__unstablePastePlainText:j,__unstableEmbedURLOnPaste:M,__unstableDisableFormats:P,disableLineBreaks:R,__unstableAllowPrefixTransformations:A,readOnly:N,...L},D){L=FR(L),y&&I()("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});const O=(0,m.useInstanceId)(HR),z=(0,h.useRef)(),V=C(),{clientId:H,isSelected:U}=V,G=V[_],$=(0,h.useContext)(sv),{bindableAttributes:W}=(0,h.useContext)(pv),K=(0,g.useRegistry)(),{selectionStart:Z,selectionEnd:q,isSelected:Y,isContentOnly:X}=(0,g.useSelect)((e=>{if(!U)return{isSelected:!1};const{getSelectionStart:t,getSelectionEnd:n,getBlockEditingMode:o}=e(ji),i=t(),s=n();let l;return void 0===r?l=i.clientId===H&&s.clientId===H&&(w?i.attributeKey===w:i[VR]===O):r&&(l=i.clientId===H),{selectionStart:l?i.offset:void 0,selectionEnd:l?s.offset:void 0,isSelected:l,isContentOnly:"contentOnly"===o(H)}}),[H,w,O,r,U]),{disableBoundBlock:Q,bindingsPlaceholder:J,bindingsLabel:ee}=(0,g.useSelect)((e=>{if(!G?.[w]||!W)return{};const t=G[w],o=(0,p.getBlockBindingsSource)(t.source),r={};if(o?.usesContext?.length)for(const e of o.usesContext)r[e]=$[e];const i=!o?.canUserEditValue?.({select:e,context:r,args:t.args});if(n.length>0)return{disableBoundBlock:i,bindingsPlaceholder:null,bindingsLabel:null};const{getBlockAttributes:s}=e(ji),l=s(H);let a=null;if(o?.getFieldsList){const n=o.getFieldsList({select:e,context:r});a=n?.find((e=>E()(e.args,t?.args)))?.label}const c=a??o?.label,u=i?c:(0,T.sprintf)((0,T.__)("Add %s"),c),d=i?t?.args?.key||o?.label:(0,T.sprintf)((0,T.__)("Empty %s; start writing to edit its value"),t?.args?.key||o?.label);return{disableBoundBlock:i,bindingsPlaceholder:l?.placeholder||u,bindingsLabel:d}}),[G,w,W,n,H,$]),te=N||Q||!!$?.["pattern/overrides"]&&!("core/pattern-overrides"===G?.__default?.source),{getSelectionStart:ne,getSelectionEnd:oe,getBlockRootClientId:re}=(0,g.useSelect)(ji),{selectionChange:ie}=(0,g.useDispatch)(ji),se=jR({allowedFormats:f,disableFormats:P}),le=!se||se.length>0,ae=(0,h.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t,r={clientId:H,[w?"attributeKey":VR]:w||O};if("number"==typeof e||o){if(void 0===t&&re(H)!==re(oe().clientId))return;n.start={...r,offset:e}}if("number"==typeof t||o){if(void 0===e&&re(H)!==re(ne().clientId))return;n.end={...r,offset:t}}ie(n)}),[H,re,oe,ne,w,O,ie]),{formatTypes:ce,prepareHandlers:ue,valueHandlers:de,changeHandlers:he,dependencies:ge}=function({clientId:e,identifier:t,allowedFormats:n,withoutInteractiveFormatting:o,disableNoneEssentialFormatting:r=!1}){const i=(0,g.useSelect)(yR,[]),s=(0,h.useMemo)((()=>i.filter((({name:e,interactive:t,tagName:i,[F]:s})=>!(n&&!n.includes(e)||r&&!s||o&&(t||xR.has(i)))))),[i,n,r,o]),l=(0,g.useSelect)((n=>s.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...SR(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[s,e,t]),a=(0,g.useDispatch)(),c=[],u=[],d=[],p=[];for(const e in l)p.push(l[e]);return s.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(wR(l,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(o):c.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e}));const r=wR(l,n.name);d.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:s,prepareHandlers:c,valueHandlers:u,changeHandlers:d,dependencies:p}}({clientId:H,identifier:w,allowedFormats:se,withoutInteractiveFormatting:b,disableNoneEssentialFormatting:X});function me(e){return ce.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,pe.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:fe,getValue:be,onChange:ke,ref:ve}=(0,pe.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(he).forEach((e=>{e(t,n)}))},selectionStart:Z,selectionEnd:q,onSelectionChange:ae,placeholder:J||u,__unstableIsSelected:Y,__unstableDisableFormats:P,preserveWhiteSpace:B,__unstableDependencies:[...ge,t],__unstableAfterParse:function(e){return de.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:me,__unstableAddInvisibleFormats:function(e){return ue.reduce(((t,n)=>n(t,e.text)),e.formats)}}),_e=function(e){return(0,ws.__unstableUseAutocompleteProps)({...e,completers:bj(e)})}({onReplace:c,completers:a,record:fe,onChange:ke});!function({html:e,value:t}){const n=(0,h.useRef)(),o=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:r}=(0,g.useDispatch)(ji);(0,h.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:fe});const ye=(0,h.useRef)(new Set),xe=(0,h.useRef)(new Set);function Se(){z.current?.focus()}const we=t;return(0,d.jsxs)(d.Fragment,{children:[Y&&(0,d.jsx)(OR.Provider,{value:ye,children:(0,d.jsx)(zR.Provider,{value:xe,children:(0,d.jsxs)(ws.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:fe,onChange:ke,onFocus:Se}),(0,d.jsx)(AR,{value:fe,onChange:ke,onFocus:Se,formatTypes:ce,forwardedRef:z})]})})}),Y&&le&&(0,d.jsx)(_R,{inline:s,editableContentElement:z.current}),(0,d.jsx)(we,{role:"textbox","aria-multiline":!R,"aria-readonly":te,...L,draggable:void 0,"aria-label":ee||L["aria-label"]||u,..._e,ref:(0,m.useMergeRefs)([ve,D,_e.ref,L.ref,TR({registry:K,getValue:be,onChange:ke,__unstableAllowPrefixTransformations:A,formatTypes:ce,onReplace:c,selectionChange:ie,isSelected:Y,disableFormats:P,value:fe,tagName:t,onSplit:y,__unstableEmbedURLOnPaste:M,pastePlainText:j,onMerge:v,onRemove:k,removeEditorOnlyFormats:me,disableLineBreaks:R,onSplitAtEnd:x,onSplitAtDoubleLineEnd:S,keyboardShortcuts:ye,inputEvents:xe}),z]),contentEditable:!te,suppressContentEditableWarning:!0,className:ms("block-editor-rich-text__editable",L.className,"rich-text"),tabIndex:0!==L.tabIndex||te?L.tabIndex:null,"data-wp-block-attribute-key":w})]})}const UR=(GR=(0,h.forwardRef)(HR),(0,h.forwardRef)(((e,t)=>{let n=e.value,o=e.onChange;Array.isArray(n)&&(I()("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/"}),n=p.children.toHTML(e.value),o=t=>e.onChange(p.children.fromDOM((0,pe.__unstableCreateElement)(document,t).childNodes)));const r=e.multiline?DR:GR;return(0,d.jsx)(r,{...e,value:n,onChange:o,ref:t})})));var GR;UR.Content=LR,UR.isEmpty=e=>!e||0===e.length;const $R=(0,h.forwardRef)(((e,t)=>{if(C()[y]){const{children:t,tagName:n="div",value:o,onChange:r,isSelected:i,multiline:s,inlineToolbar:l,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:p,allowedFormats:h,withoutInteractiveFormatting:g,onRemove:m,onMerge:f,onSplit:b,__unstableOnSplitAtEnd:k,__unstableOnSplitAtDoubleLineEnd:v,identifier:_,preserveWhiteSpace:y,__unstablePastePlainText:x,__unstableEmbedURLOnPaste:S,__unstableDisableFormats:w,disableLineBreaks:C,__unstableAllowPrefixTransformations:B,readOnly:I,...j}=FR(e);return(0,d.jsx)(n,{...j,dangerouslySetInnerHTML:{__html:NR(o,s)}})}return(0,d.jsx)(UR,{ref:t,...e,readOnly:!1})}));$R.Content=LR,$R.isEmpty=e=>!e||0===e.length;var WR=$R;const KR=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(WR,{ref:t,...e,__unstableDisableFormats:!0})));KR.Content=({value:e="",tagName:t="div",...n})=>(0,d.jsx)(t,{...n,children:e});var ZR=KR;var qR=(0,h.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,d.jsx)(ZR,{ref:n,...t});const{className:o,onChange:r,...i}=t;return(0,d.jsx)(Ev.A,{ref:n,className:ms("block-editor-plain-text",o),onChange:e=>r(e.target.value),...i})}));function YR({property:e,viewport:t,desc:n}){const o=(0,m.useInstanceId)(YR),r=n||(0,T.sprintf)((0,T._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,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{"aria-describedby":`rbc-desc-${o}`,children:t.label}),(0,d.jsx)(ws.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`,children:r})]})}var XR=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:l=!1,defaultLabel:a={id:"all",label:(0,T._x)("All","screen sizes")},viewports:c=[{id:"small",label:(0,T.__)("Small screens")},{id:"medium",label:(0,T.__)("Medium screens")},{id:"large",label:(0,T.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const u=o||(0,T.sprintf)((0,T.__)("Use the same %s on all screen sizes."),n),p=(0,T.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),g=i((0,d.jsx)(YR,{property:n,viewport:a}),a);return(0,d.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,d.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,d.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:u,checked:!l,onChange:r,help:p}),(0,d.jsxs)("div",{className:ms("block-editor-responsive-block-control__group",{"is-responsive":l}),children:[!l&&g,l&&(s?s(c):c.map((e=>(0,d.jsx)(h.Fragment,{children:i((0,d.jsx)(YR,{property:n,viewport:e}),e)},e.id))))]})]})]})};function QR({character:e,type:t,onUse:n}){const o=(0,h.useContext)(OR),r=(0,h.useRef)();return r.current=n,(0,h.useEffect)((()=>{function n(n){Wa.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function JR({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&n&&(r=Wa.displayShortcut[t](n)),(0,d.jsx)(ws.Fill,{name:i,children:(0,d.jsx)(ws.ToolbarButton,{...o,shortcut:r})})}function eA({inputType:e,onInput:t}){const n=(0,h.useContext)(zR),o=(0,h.useRef)();return o.current=t,(0,h.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}function tA({units:e,...t}){const[n]=Ti("spacing.units"),o=(0,ws.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"],units:e});return(0,d.jsx)(ws.__experimentalUnitControl,{units:o,...t})}var nA=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var oA=function({url:e,onChange:t}){const[n,o]=(0,h.useReducer)((e=>!e),!1);return(0,d.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,d.jsx)(ws.Button,{size:"compact",icon:Ld,label:e?(0,T.__)("Edit link"):(0,T.__)("Insert link"),onClick:o,className:"components-toolbar__control",isPressed:!!e}),n&&(0,d.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:e=>{e.preventDefault(),o()},children:(0,d.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:nA,label:(0,T.__)("Close"),onClick:o}),(0,d.jsx)(ac,{value:e||"",onChange:t,suffix:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{size:"small",icon:tc,label:(0,T.__)("Submit"),type:"submit"})})})]})})]})},rA=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});const iA="none",sA="custom",lA="media",aA="attachment",cA=["noreferrer","noopener"],uA=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:i,linkTarget:s,linkClass:l,rel:a,showLightboxSetting:c,lightboxEnabled:u,onSetLightbox:p,resetLightbox:g})=>{const[m,f]=(0,h.useState)(!1),[b,k]=(0,h.useState)(null),[v,_]=(0,h.useState)(!1),[y,x]=(0,h.useState)(null),S=(0,h.useRef)(null),w=(0,h.useRef)();(0,h.useEffect)((()=>{if(!w.current)return;(Ga.focus.focusable.find(w.current)[0]||w.current).focus()}),[v,n,u]);const C=()=>{e!==lA&&e!==aA||x(""),_(!0)},B=()=>{_(!1)},I=()=>{const e=[{linkDestination:lA,title:(0,T.__)("Link to image file"),url:"image"===o?r:void 0,icon:rA}];return"image"===o&&i&&e.push({linkDestination:aA,title:(0,T.__)("Link to attachment page"),url:"image"===o?i:void 0,icon:pc}),e},j=(0,d.jsxs)(ws.__experimentalVStack,{spacing:"3",children:[(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(a??"").split(" ");cA.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(a??"").split(" ").filter((e=>!1===cA.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===s}),(0,d.jsx)(ws.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Link relation"),value:a??"",onChange:e=>{t({rel:e})},help:(0,h.createInterpolateElement)((0,T.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,d.jsx)(ws.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,d.jsx)(ws.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Link CSS class"),value:l||"",onChange:e=>{t({linkClass:e})}})]}),E=null!==y?y:n,M=!u||u&&!c,P=!E&&M,R=(I().find((t=>t.linkDestination===e))||{}).title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarButton,{icon:Ld,className:"components-toolbar__control",label:(0,T.__)("Link"),"aria-expanded":m,onClick:()=>{f(!0)},ref:k,isActive:!!n||u&&c}),m&&(0,d.jsx)(dR,{ref:w,anchor:b,onFocusOutside:e=>{const t=S.current;t&&t.contains(e.target)||(f(!1),x(null),B())},onClose:()=>{x(null),B(),f(!1)},renderSettings:M?()=>j:null,additionalControls:P&&(0,d.jsxs)(ws.NavigableMenu,{children:[I().map((e=>(0,d.jsx)(ws.MenuItem,{icon:e.icon,iconPosition:"left",onClick:()=>{x(null),(e=>{const n=I();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:sA}).linkDestination:iA,t({linkDestination:o,href:e})})(e.url),B()},children:e.title},e.linkDestination))),c&&(0,d.jsx)(ws.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:vj,info:(0,T.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:iA,href:""}),p?.(!0),B()},children:(0,T.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:u&&c&&!n&&!v?(0,d.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,d.jsx)(Ol,{icon:vj}),(0,d.jsxs)("div",{className:"text",children:[(0,d.jsx)("p",{children:(0,T.__)("Enlarge on click")}),(0,d.jsx)("p",{className:"description",children:(0,T.__)("Scales the image with a lightbox effect")})]}),(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Disable enlarge on click"),onClick:()=>{p?.(!1)},size:"compact"})]}):!n||v?(0,d.jsx)(dR.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:E,onChangeInputValue:x,onSubmit:e=>{if(y){const e=I().find((e=>e.url===y))?.linkDestination||sA;t({href:(0,Ua.prependHTTP)(y),linkDestination:e,lightbox:{enabled:!1}})}B(),x(null),e.preventDefault()},autocompleteRef:S}):n&&!v?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(dR.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:C,urlLabel:R}),(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Remove link"),onClick:()=>{t({linkDestination:iA,href:""}),g?.()},size:"compact"})]}):void 0})]})};function dA(){return I()("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}function pA(e){const[t,n]=(0,h.useState)(window.innerWidth);(0,h.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<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px",n="40px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,overflowY:"auto"};default:return{marginLeft:r,marginRight:r}}})(e)}function hA({clientId:e}){const{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{attributes:n}=(0,g.useSelect)((t=>({attributes:t(ji).getBlockAttributes(e)})),[e]);return n?.metadata?.patternName?(0,d.jsx)(ws.Button,{className:"block-editor-block-inspector-edit-contents-button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{const{patternName:o,...r}=n?.metadata??{};t(e,{...n,metadata:r})},children:(0,T.__)("Edit contents")}):null}function gA(){const e=(0,g.useSelect)((e=>e(ji).getBlockSelectionStart()),[]),t=(0,h.useRef)();fh(e,t);return e?(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,T.__)("Skip to the selected block")}):null}function mA(){const e=(0,g.useSelect)((e=>e(ji).getSelectedBlockCount()),[]);return(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,d.jsx)(Vu,{icon:qj,showColors:!0}),(0,d.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,T.sprintf)((0,T._n)("%d Block","%d Blocks",e),e)})]})}var fA=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),bA=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});const kA={name:"settings",title:(0,T.__)("Settings"),value:"settings",icon:fA},vA={name:"styles",title:(0,T.__)("Styles"),value:"styles",icon:bA},_A={name:"content",title:(0,T.__)("Content"),value:"content",icon:pc},yA={name:"list",title:(0,T.__)("List View"),value:"list-view",icon:nM};var xA=()=>{const e=(0,ws.__experimentalUseSlotFills)(Va.slotName),t=(0,ws.__experimentalUseSlotFills)(Pa.name),n=Boolean(e&&e.length),o=Boolean(t&&t.length);return n||o?(0,d.jsxs)(ws.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,T.__)("Advanced"),initialOpen:!1,children:[(0,d.jsx)(Fa.Slot,{group:"advanced"}),(0,d.jsx)(Pa.Slot,{})]}):null};const SA=()=>{const{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:n}=(0,g.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(ji),o=n(),r=t(o);return{selectedClientIds:o,selectedBlocks:r,hasPositionAttribute:r?.some((({attributes:e})=>!!e?.style?.position?.type))}}),[]),{updateBlockAttributes:o}=(0,g.useDispatch)(ji),r=Ji();function i(){if(!e?.length||!t?.length)return;const n=Object.fromEntries(t?.map((({clientId:e,attributes:t})=>[e,{style:fs({...t?.style,position:{...t?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}])));o(e,n,!0)}return(0,d.jsx)(ws.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,T.__)("Position"),resetAll:i,dropdownMenuProps:r,children:(0,d.jsx)(ws.__experimentalToolsPanelItem,{isShownByDefault:n,label:(0,T.__)("Position"),hasValue:()=>n,onDeselect:i,children:(0,d.jsx)(Fa.Slot,{group:"position"})})})};var wA=()=>{const e=(0,ws.__experimentalUseSlotFills)(Ma.position.name);return Boolean(e&&e.length)?(0,d.jsx)(SA,{}):null};var CA=({showAdvancedControls:e=!1})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa.Slot,{}),(0,d.jsx)(wA,{}),(0,d.jsx)(Fa.Slot,{group:"bindings"}),e&&(0,d.jsx)("div",{children:(0,d.jsx)(xA,{})})]});var BA=({blockName:e,clientId:t,hasBlockStyles:n,isSectionBlock:o})=>{const r=Ap({blockName:e});return(0,d.jsxs)(d.Fragment,{children:[n&&(0,d.jsx)("div",{children:(0,d.jsx)(ws.PanelBody,{title:(0,T.__)("Styles"),children:(0,d.jsx)(VM,{clientId:t})})}),!o&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa.Slot,{group:"color",label:(0,T.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,d.jsx)(Fa.Slot,{group:"background",label:(0,T.__)("Background image")}),(0,d.jsx)(Fa.Slot,{group:"filter"}),(0,d.jsx)(Fa.Slot,{group:"typography",label:(0,T.__)("Typography")}),(0,d.jsx)(Fa.Slot,{group:"dimensions",label:(0,T.__)("Dimensions")}),(0,d.jsx)(Fa.Slot,{group:"border",label:r}),(0,d.jsx)(Fa.Slot,{group:"styles"})]})]})};function IA({clientIds:e,onSelect:t}){return e.length?(0,d.jsx)(ws.__experimentalVStack,{spacing:1,children:e.map((e=>(0,d.jsx)(jA,{onSelect:t,clientId:e},e)))}):null}function jA({clientId:e,onSelect:t}){const n=Xf(e),o=Sj({clientId:e,context:"list-view"}),{isSelected:r}=(0,g.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(ji);return{isSelected:n(e)||o(e,!0)}}),[e]),{selectBlock:i}=(0,g.useDispatch)(ji);return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,isPressed:r,onClick:async()=>{await i(e),t&&t(e)},children:(0,d.jsxs)(ws.Flex,{children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Vu,{icon:n?.icon})}),(0,d.jsx)(ws.FlexBlock,{style:{textAlign:"left"},children:(0,d.jsx)(ws.__experimentalTruncate,{children:o})})]})})}var EA=({contentClientIds:e})=>e&&0!==e.length?(0,d.jsx)(ws.PanelBody,{title:(0,T.__)("Content"),children:(0,d.jsx)(IA,{clientIds:e})}):null;const TA=["core/navigation"];var MA=e=>!TA.includes(e);const{Tabs:PA}=G(ws.privateApis);function RA({blockName:e,clientId:t,hasBlockStyles:n,tabs:o,isSectionBlock:r,contentClientIds:i}){const s=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]),l=MA(e)?void 0:yA.name,[a,c]=(0,h.useState)(l??o[0]?.name);return(0,h.useEffect)((()=>{if(!l&&o?.length&&a){o.find((e=>e.name===a))||c(o[0].name)}}),[o,a,l]),(0,d.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,d.jsxs)(PA,{defaultTabId:l,selectedTabId:a,onSelect:c,children:[(0,d.jsx)(PA.TabList,{children:o.map((e=>s?(0,d.jsx)(PA.Tab,{tabId:e.name,children:e.title},e.name):(0,d.jsx)(ws.Tooltip,{text:e.title,children:(0,d.jsx)(PA.Tab,{tabId:e.name,"aria-label":e.title,children:(0,d.jsx)(ws.Icon,{icon:e.icon})})},e.name)))}),(0,d.jsx)(PA.TabPanel,{tabId:kA.name,focusable:!1,children:(0,d.jsx)(CA,{showAdvancedControls:!!e})}),(0,d.jsx)(PA.TabPanel,{tabId:vA.name,focusable:!1,children:(0,d.jsx)(BA,{blockName:e,clientId:t,hasBlockStyles:n,isSectionBlock:r})}),(0,d.jsx)(PA.TabPanel,{tabId:_A.name,focusable:!1,children:(0,d.jsx)(EA,{contentClientIds:i})}),(0,d.jsx)(PA.TabPanel,{tabId:yA.name,focusable:!1,children:(0,d.jsx)(Fa.Slot,{group:"list"})})]},t)})}const AA=[];function NA({clientId:e}){return(0,d.jsx)(ws.PanelBody,{title:(0,T.__)("Styles"),children:(0,d.jsx)(VM,{clientId:e})})}function LA({blockName:e,showAdvancedControls:t=!0,showPositionControls:n=!0,showListControls:o=!1,showBindingsControls:r=!0}){const i=Ap({blockName:e});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa.Slot,{}),o&&(0,d.jsx)(Fa.Slot,{group:"list"}),(0,d.jsx)(Fa.Slot,{group:"color",label:(0,T.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,d.jsx)(Fa.Slot,{group:"background",label:(0,T.__)("Background image")}),(0,d.jsx)(Fa.Slot,{group:"typography",label:(0,T.__)("Typography")}),(0,d.jsx)(Fa.Slot,{group:"dimensions",label:(0,T.__)("Dimensions")}),(0,d.jsx)(Fa.Slot,{group:"border",label:i}),(0,d.jsx)(Fa.Slot,{group:"styles"}),n&&(0,d.jsx)(wA,{}),r&&(0,d.jsx)(Fa.Slot,{group:"bindings"}),t&&(0,d.jsx)("div",{children:(0,d.jsx)(xA,{})})]})}const DA=({animate:e,wrapper:t,children:n})=>e?t(n):n,OA=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,d.jsx)(ws.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},children:n},t)},zA=({clientId:e,blockName:t,isSectionBlock:n,availableTabs:o,contentClientIds:r,hasBlockStyles:i})=>{const s=o?.length>1,l=Xf(e),a=l.isSynced,c=!a&&s;return(0,d.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,d.jsx)(Xb,{...l,className:a&&"is-synced",allowParentNavigation:!0,children:window?.__experimentalContentOnlyPatternInsertion&&(0,d.jsx)(hA,{clientId:e})}),(0,d.jsx)(lP,{blockClientId:e}),c&&(0,d.jsx)(RA,{hasBlockStyles:i,clientId:e,blockName:t,tabs:o,isSectionBlock:n,contentClientIds:r}),!c&&(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsx)(NA,{clientId:e}),(0,d.jsx)(EA,{contentClientIds:r}),!n&&(0,d.jsx)(LA,{blockName:t,showListControls:!0})]}),(0,d.jsx)(gA,{},"back")]})};var VA=function(){const{selectedBlockCount:e,selectedBlockName:t,selectedBlockClientId:n,blockType:o,isSectionBlock:r,isSectionBlockInSelection:i,hasBlockStyles:s}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockClientIds:n,getSelectedBlockCount:o,getBlockName:r,getParentSectionBlock:i,isSectionBlock:s}=G(e(ji)),{getBlockStyles:l}=e(p.store),a=t(),c=i(a)||a,u=c&&r(c),d=u&&(0,p.getBlockType)(u),h=n().some((e=>s(e))),g=u&&l(u),m=g&&g.length>0;return{selectedBlockCount:o(),selectedBlockClientId:c,selectedBlockName:u,blockType:d,isSectionBlockInSelection:h,isSectionBlock:s(c),hasBlockStyles:m}}),[]),l=(0,g.useSelect)((e=>{if(!r||!n)return[];const{getClientIdsOfDescendants:t,getBlockName:o,getBlockEditingMode:i}=G(e(ji)),s=t(n),l=new Set;return s.forEach((e=>{if("core/navigation"===o(e)){t(e).forEach((e=>l.add(e)))}})),s.filter((e=>!l.has(e)&&("core/list-item"!==o(e)&&"contentOnly"===i(e))))}),[r,n]),a=function(e,t,n,o){const r=[],{bindings:i,border:s,color:l,default:a,dimensions:c,list:u,position:d,styles:p,typography:h,effects:m}=Ma,f=MA(e),b=(0,ws.__experimentalUseSlotFills)(u.name),k=!f&&!!b&&b.length,v=[...(0,ws.__experimentalUseSlotFills)(s.name)||[],...(0,ws.__experimentalUseSlotFills)(l.name)||[],...(0,ws.__experimentalUseSlotFills)(c.name)||[],...(0,ws.__experimentalUseSlotFills)(p.name)||[],...(0,ws.__experimentalUseSlotFills)(h.name)||[],...(0,ws.__experimentalUseSlotFills)(m.name)||[]].length,_=[...(0,ws.__experimentalUseSlotFills)(Va.slotName)||[],...(0,ws.__experimentalUseSlotFills)(i.name)||[]],y=[...(0,ws.__experimentalUseSlotFills)(a.name)||[],...(0,ws.__experimentalUseSlotFills)(d.name)||[],...k&&v>1?_:[]],x=!!(t&&t.length>0);k&&!n&&r.push(yA),x&&r.push(_A),y.length&&!n&&r.push(kA),(n?o:v)&&r.push(vA);return function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,g.useSelect)((e=>e(ji).getSettings().blockInspectorTabs),[]))?r:AA}(o?.name,l,r,s),c=a?.length>1,u=function(e){return(0,g.useSelect)((t=>{if(e){const n=t(ji).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:i}=t(ji);return i(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[e])}(o),h=e>1;if(h&&!i)return(0,d.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,d.jsx)(mA,{}),c?(0,d.jsx)(RA,{tabs:a}):(0,d.jsx)(LA,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(h&&i)return(0,d.jsx)("div",{className:"block-editor-block-inspector",children:(0,d.jsx)(mA,{})});const m=t===(0,p.getUnregisteredTypeHandlerName)();return!o||!n||m?(0,d.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,T.__)("No block selected.")}):(0,d.jsx)(DA,{animate:u,wrapper:e=>(0,d.jsx)(OA,{blockInspectorAnimationSettings:u,selectedBlockClientId:n,children:e}),children:(0,d.jsx)(zA,{clientId:n,blockName:o.name,isSectionBlock:r,availableTabs:a,contentClientIds:l,hasBlockStyles:s})})};const FA=()=>(I()("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Pw());function HA(e){return I()("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,d.jsx)("div",{...e,ref:Pw()})}const UA=()=>{};const GA=(0,h.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:l,__experimentalFilterValue:a,onPatternCategorySelection:c,onSelect:u=UA,shouldFocusBlock:p=!1,onClose:h},m){const{destinationRootClientId:f}=(0,g.useSelect)((n=>{const{getBlockRootClientId:o}=n(ji);return{destinationRootClientId:e||o(t)||void 0}}),[t,e]);return(0,d.jsx)(nI,{onSelect:u,rootClientId:f,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onPatternCategorySelection:c,__experimentalInitialTab:s,__experimentalInitialCategory:l,shouldFocusBlock:p,ref:m,onClose:h})}));var $A=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(GA,{...e,onPatternCategorySelection:void 0,ref:t})}));function WA(){return I()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const KA=-1!==window.navigator.userAgent.indexOf("Trident"),ZA=new Set([Wa.UP,Wa.DOWN,Wa.LEFT,Wa.RIGHT]),qA=.75;function YA(){const e=(0,g.useSelect)((e=>e(ji).hasSelectedBlock()),[]);return(0,m.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,i,s;function l(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){i&&o.cancelAnimationFrame(i),i=o.requestAnimationFrame((()=>{c(e),i=null}))}function c({keyCode:e}){if(!h())return;const r=(0,Ga.computeCaretRect)(o);if(!r)return;if(!s)return void(s=r);if(ZA.has(e))return void(s=r);const i=r.top-s.top;if(0===i)return;const l=(0,Ga.getScrollContainer)(t);if(!l)return;const a=l===n.body||l===n.documentElement,c=a?o.scrollY:l.scrollTop,u=a?0:l.getBoundingClientRect().top,d=a?s.top/o.innerHeight:(s.top-u)/(o.innerHeight-u);if(0===c&&d<qA&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(s=r);const p=a?o.innerHeight:l.clientHeight;s.top+s.height>u+p||s.top<u?s=r:a?o.scrollBy(0,i):l.scrollTop+=i}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){h()&&(s=(0,Ga.computeCaretRect)(o))}function h(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",l,!0),o.addEventListener("resize",l,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",l,!0),o.removeEventListener("resize",l,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(i)}}),[e])}var XA=KA?e=>e.children:function({children:e}){return(0,d.jsx)("div",{ref:YA(),className:"block-editor__typewriter",children:e})};const QA=(0,h.createContext)({});function JA({children:e,uniqueId:t,blockName:n=""}){const o=(0,h.useContext)(QA),{name:r}=C();n=n||r;const i=(0,h.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,d.jsx)(QA.Provider,{value:i,children:e})}function eN(e,t=""){const n=(0,h.useContext)(QA),{name:o}=C();return t=t||o,Boolean(n[t]?.has(e))}QA.displayName="RenderedRefsContext";const tN=e=>(I()("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,d.jsx)(JA,{...e})),nN=(...e)=>(I()("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),eN(...e));function oN({title:e,help:t,actions:n=[],onClose:o}){return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,d.jsxs)(ws.__experimentalHStack,{alignment:"center",children:[(0,d.jsx)(ws.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,d.jsx)(ws.__experimentalSpacer,{}),n.map((({label:e,icon:t,onClick:n})=>(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n,children:!t&&e},e))),o&&(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,T.__)("Close"),icon:XB,onClick:o})]}),t&&(0,d.jsx)(ws.__experimentalText,{children:t})]})}const rN=(0,h.forwardRef)((function({onClose:e,onChange:t,showPopoverHeaderActions:n,isCompact:o,currentDate:r,title:i,...s},l){const a={startOfWeek:(0,dP.getSettings)().l10n.startOfWeek,onChange:t,currentDate:o?void 0:r,currentTime:o?r:void 0,...s},c=o?ws.TimePicker:ws.DateTimePicker;return(0,d.jsxs)("div",{ref:l,className:"block-editor-publish-date-time-picker",children:[(0,d.jsx)(oN,{title:i||(0,T.__)("Publish"),actions:n?[{label:(0,T.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,d.jsx)(c,{...a})]})}));var iN=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(rN,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}));const sN={button:"wp-element-button",caption:"wp-element-caption"},lN=e=>sN[e]?sN[e]:"";var aN=()=>"";function cN(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function uN({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=Ji(),i=()=>{e(void 0)};let s=!1;return n?.lightbox?.enabled&&(s=n.lightbox.enabled),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T._x)("Settings","Image settings"),resetAll:i,panelId:o,dropdownMenuProps:r,children:(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,T.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:o,children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Enlarge on click"),checked:s,onChange:t=>{e({enabled:t})}})})})})}function dN({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,h.useState)(null),i=n?.css;return(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,children:[o&&(0,d.jsx)(ws.Notice,{status:"error",onRemove:()=>r(null),children:o}),(0,d.jsx)(ws.TextareaControl,{label:(0,T.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:i,onChange:n=>function(n){if(t({...e,css:n}),o){const[e]=lC([{css:n}],".for-validation-only");e&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=lC([{css:e.target.value}],".for-validation-only");r(null===t?(0,T.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}const pN=new Map,hN=[],gN={caption:(0,T.__)("Caption"),link:(0,T.__)("Link"),button:(0,T.__)("Button"),heading:(0,T.__)("Heading"),h1:(0,T.__)("H1"),h2:(0,T.__)("H2"),h3:(0,T.__)("H3"),h4:(0,T.__)("H4"),h5:(0,T.__)("H5"),h6:(0,T.__)("H6"),"settings.color":(0,T.__)("Color"),"settings.typography":(0,T.__)("Typography"),"settings.shadow":(0,T.__)("Shadow"),"settings.layout":(0,T.__)("Layout"),"styles.color":(0,T.__)("Colors"),"styles.spacing":(0,T.__)("Spacing"),"styles.background":(0,T.__)("Background"),"styles.typography":(0,T.__)("Typography")},mN=function(e,t){var n,o,r=0;function i(){var i,s,l=n,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(s=0;s<a;s++)if(l.args[s]!==arguments[s]){l=l.next;continue e}return l!==n&&(l===o&&(o=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return l={args:i,val:e.apply(null,i)},n?(n.prev=l,l.next=n):o=l,r===t.maxSize?(o=o.prev).next=null:r++,n=l,l.val}return t=t||{},i.clear=function(){n=null,o=null,r=0},i}((()=>(0,p.getBlockTypes)().reduce(((e,{name:t,title:n})=>(e[t]=n,e)),{}))),fN=e=>null!==e&&"object"==typeof e;function bN(e,t,n=""){if(!fN(e)&&!fN(t))return e!==t?n.split(".").slice(0,2).join("."):void 0;e=fN(e)?e:{},t=fN(t)?t:{};const o=new Set([...Object.keys(e),...Object.keys(t)]);let r=[];for(const i of o){const o=n?n+"."+i:i,s=bN(e[i],t[i],o);s&&(r=r.concat(s))}return r}function kN(e,t){const n=JSON.stringify({next:e,previous:t});if(pN.has(n))return pN.get(n);const o=bN({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o.length)return pN.set(n,hN),hN;const r=[...new Set(o)].reduce(((e,t)=>{const n=function(e){if(gN[e])return gN[e];const t=e.split(".");if("blocks"===t?.[0]){const e=mN()?.[t[1]];return e||t[1]}return"elements"===t?.[0]?gN[t[1]]||t[1]:void 0}(t);return n&&e.push([t.split(".")[0],n]),e}),[]);return pN.set(n,r),r}function vN(e,t,n={}){let o=kN(e,t);const r=o.length,{maxResults:i}=n;return r?(i&&r>i&&(o=o.slice(0,i)),Object.entries(o.reduce(((e,t)=>{const n=e[t[0]]||[];return n.includes(t[1])||(e[t[0]]=[...n,t[1]]),e}),{})).map((([e,t])=>{const n=t.length,o=t.join((0,T.__)(", "));switch(e){case"blocks":return(0,T.sprintf)((0,T._n)("%s block.","%s blocks.",n),o);case"elements":return(0,T.sprintf)((0,T._n)("%s element.","%s elements.",n),o);case"settings":return(0,T.sprintf)((0,T.__)("%s settings."),o);case"styles":return(0,T.sprintf)((0,T.__)("%s styles."),o);default:return(0,T.sprintf)((0,T.__)("%s."),o)}}))):hN}function _N(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return yN(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case h.StrictMode:case h.Fragment:return yN(r.children,t,n);case h.RawHTML:return;case ew.Content:return xN(t,n);case LR:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?yN(r.children,t,n):void 0;case"function":return _N(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function yN(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n<e.length;n++)_N(e[n],...t)}function xN(e,t){for(let n=0;n<t.length;n++){const{name:o,attributes:r,innerBlocks:i}=t[n];_N((0,p.getSaveElement)(o,r,(0,d.jsx)(ew.Content,{})),e,i)}}const SN=[{value:"fill",label:(0,T._x)("Fill","Scale option for dimensions control"),help:(0,T.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,T._x)("Contain","Scale option for dimensions control"),help:(0,T.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,T._x)("Cover","Scale option for dimensions control"),help:(0,T.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,T._x)("None","Scale option for dimensions control"),help:(0,T.__)("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,T._x)("Scale down","Scale option for dimensions control"),help:(0,T.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function wN({panelId:e,value:t,onChange:n,options:o=SN,defaultValue:r=SN[0].value,isShownByDefault:i=!0}){const s=t??"fill",l=(0,h.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==r,onDeselect:()=>n(r),panelId:e,children:(0,d.jsx)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Scale"),isBlock:!0,help:l[s],value:s,onChange:n,size:"__unstable-large",children:o.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{...e},e.value)))})})}function CN(){return CN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},CN.apply(null,arguments)}function BN(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var IN=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jN=BN((function(e){return IN.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var EN=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),TN=Math.abs,MN=String.fromCharCode,PN=Object.assign;function RN(e){return e.trim()}function AN(e,t,n){return e.replace(t,n)}function NN(e,t){return e.indexOf(t)}function LN(e,t){return 0|e.charCodeAt(t)}function DN(e,t,n){return e.slice(t,n)}function ON(e){return e.length}function zN(e){return e.length}function VN(e,t){return t.push(e),e}var FN=1,HN=1,UN=0,GN=0,$N=0,WN="";function KN(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:FN,column:HN,length:s,return:""}}function ZN(e,t){return PN(KN("",null,null,"",null,null,0),e,{length:-e.length},t)}function qN(){return $N=GN>0?LN(WN,--GN):0,HN--,10===$N&&(HN=1,FN--),$N}function YN(){return $N=GN<UN?LN(WN,GN++):0,HN++,10===$N&&(HN=1,FN++),$N}function XN(){return LN(WN,GN)}function QN(){return GN}function JN(e,t){return DN(WN,e,t)}function eL(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function tL(e){return FN=HN=1,UN=ON(WN=e),GN=0,[]}function nL(e){return WN="",e}function oL(e){return RN(JN(GN-1,sL(91===e?e+2:40===e?e+1:e)))}function rL(e){for(;($N=XN())&&$N<33;)YN();return eL(e)>2||eL($N)>3?"":" "}function iL(e,t){for(;--t&&YN()&&!($N<48||$N>102||$N>57&&$N<65||$N>70&&$N<97););return JN(e,QN()+(t<6&&32==XN()&&32==YN()))}function sL(e){for(;YN();)switch($N){case e:return GN;case 34:case 39:34!==e&&39!==e&&sL($N);break;case 40:41===e&&sL(e);break;case 92:YN()}return GN}function lL(e,t){for(;YN()&&e+$N!==57&&(e+$N!==84||47!==XN()););return"/*"+JN(t,GN-1)+"*"+MN(47===e?e:YN())}function aL(e){for(;!eL(XN());)YN();return JN(e,GN)}var cL="-ms-",uL="-moz-",dL="-webkit-",pL="comm",hL="rule",gL="decl",mL="@keyframes";function fL(e,t){for(var n="",o=zN(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function bL(e,t,n,o){switch(e.type){case"@import":case gL:return e.return=e.return||e.value;case pL:return"";case mL:return e.return=e.value+"{"+fL(e.children,o)+"}";case hL:e.value=e.props.join(",")}return ON(n=fL(e.children,o))?e.return=e.value+"{"+n+"}":""}function kL(e){return nL(vL("",null,null,null,[""],e=tL(e),0,[0],e))}function vL(e,t,n,o,r,i,s,l,a){for(var c=0,u=0,d=s,p=0,h=0,g=0,m=1,f=1,b=1,k=0,v="",_=r,y=i,x=o,S=v;f;)switch(g=k,k=YN()){case 40:if(108!=g&&58==LN(S,d-1)){-1!=NN(S+=AN(oL(k),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=oL(k);break;case 9:case 10:case 13:case 32:S+=rL(g);break;case 92:S+=iL(QN()-1,7);continue;case 47:switch(XN()){case 42:case 47:VN(yL(lL(YN(),QN()),t,n),a);break;default:S+="/"}break;case 123*m:l[c++]=ON(S)*b;case 125*m:case 59:case 0:switch(k){case 0:case 125:f=0;case 59+u:h>0&&ON(S)-d&&VN(h>32?xL(S+";",o,n,d-1):xL(AN(S," ","")+";",o,n,d-2),a);break;case 59:S+=";";default:if(VN(x=_L(S,t,n,c,u,r,l,v,_=[],y=[],d),i),123===k)if(0===u)vL(S,t,x,x,_,i,d,l,y);else switch(99===p&&110===LN(S,3)?100:p){case 100:case 109:case 115:vL(e,x,x,o&&VN(_L(e,x,x,0,0,r,l,v,r,_=[],d),y),r,y,d,l,o?_:y);break;default:vL(S,x,x,x,[""],y,0,l,y)}}c=u=h=0,m=b=1,v=S="",d=s;break;case 58:d=1+ON(S),h=g;default:if(m<1)if(123==k)--m;else if(125==k&&0==m++&&125==qN())continue;switch(S+=MN(k),k*m){case 38:b=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(ON(S)-1)*b,b=1;break;case 64:45===XN()&&(S+=oL(YN())),p=XN(),u=d=ON(v=S+=aL(QN())),k++;break;case 45:45===g&&2==ON(S)&&(m=0)}}return i}function _L(e,t,n,o,r,i,s,l,a,c,u){for(var d=r-1,p=0===r?i:[""],h=zN(p),g=0,m=0,f=0;g<o;++g)for(var b=0,k=DN(e,d+1,d=TN(m=s[g])),v=e;b<h;++b)(v=RN(m>0?p[b]+" "+k:AN(k,/&\f/g,p[b])))&&(a[f++]=v);return KN(e,t,n,0===r?hL:l,a,c,u)}function yL(e,t,n){return KN(e,t,n,pL,MN($N),DN(e,2,-2),0)}function xL(e,t,n,o){return KN(e,t,n,gL,DN(e,0,o),DN(e,o+1,-1),o)}var SL=function(e,t,n){for(var o=0,r=0;o=r,r=XN(),38===o&&12===r&&(t[n]=1),!eL(r);)YN();return JN(e,GN)},wL=function(e,t){return nL(function(e,t){var n=-1,o=44;do{switch(eL(o)){case 0:38===o&&12===XN()&&(t[n]=1),e[n]+=SL(GN-1,t,n);break;case 2:e[n]+=oL(o);break;case 4:if(44===o){e[++n]=58===XN()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=MN(o)}}while(o=YN());return e}(tL(e),t))},CL=new WeakMap,BL=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)||CL.get(n))&&!o){CL.set(e,!0);for(var r=[],i=wL(t,r),s=n.props,l=0,a=0;l<i.length;l++)for(var c=0;c<s.length;c++,a++)e.props[a]=r[l]?i[l].replace(/&\f/g,s[c]):s[c]+" "+i[l]}}},IL=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function jL(e,t){switch(function(e,t){return 45^LN(e,0)?(((t<<2^LN(e,0))<<2^LN(e,1))<<2^LN(e,2))<<2^LN(e,3):0}(e,t)){case 5103:return dL+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return dL+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return dL+e+uL+e+cL+e+e;case 6828:case 4268:return dL+e+cL+e+e;case 6165:return dL+e+cL+"flex-"+e+e;case 5187:return dL+e+AN(e,/(\w+).+(:[^]+)/,dL+"box-$1$2"+cL+"flex-$1$2")+e;case 5443:return dL+e+cL+"flex-item-"+AN(e,/flex-|-self/,"")+e;case 4675:return dL+e+cL+"flex-line-pack"+AN(e,/align-content|flex-|-self/,"")+e;case 5548:return dL+e+cL+AN(e,"shrink","negative")+e;case 5292:return dL+e+cL+AN(e,"basis","preferred-size")+e;case 6060:return dL+"box-"+AN(e,"-grow","")+dL+e+cL+AN(e,"grow","positive")+e;case 4554:return dL+AN(e,/([^-])(transform)/g,"$1"+dL+"$2")+e;case 6187:return AN(AN(AN(e,/(zoom-|grab)/,dL+"$1"),/(image-set)/,dL+"$1"),e,"")+e;case 5495:case 3959:return AN(e,/(image-set\([^]*)/,dL+"$1$`$1");case 4968:return AN(AN(e,/(.+:)(flex-)?(.*)/,dL+"box-pack:$3"+cL+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+dL+e+e;case 4095:case 3583:case 4068:case 2532:return AN(e,/(.+)-inline(.+)/,dL+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ON(e)-1-t>6)switch(LN(e,t+1)){case 109:if(45!==LN(e,t+4))break;case 102:return AN(e,/(.+:)(.+)-([^]+)/,"$1"+dL+"$2-$3$1"+uL+(108==LN(e,t+3)?"$3":"$2-$3"))+e;case 115:return~NN(e,"stretch")?jL(AN(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==LN(e,t+1))break;case 6444:switch(LN(e,ON(e)-3-(~NN(e,"!important")&&10))){case 107:return AN(e,":",":"+dL)+e;case 101:return AN(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dL+(45===LN(e,14)?"inline-":"")+"box$3$1"+dL+"$2$3$1"+cL+"$2box$3")+e}break;case 5936:switch(LN(e,t+11)){case 114:return dL+e+cL+AN(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dL+e+cL+AN(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dL+e+cL+AN(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dL+e+cL+e+e}return e}var EL=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case gL:e.return=jL(e.value,e.length);break;case mL:return fL([ZN(e,{value:AN(e.value,"@","@"+dL)})],o);case hL: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 fL([ZN(e,{props:[AN(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return fL([ZN(e,{props:[AN(t,/:(plac\w+)/,":"+dL+"input-$1")]}),ZN(e,{props:[AN(t,/:(plac\w+)/,":-moz-$1")]}),ZN(e,{props:[AN(t,/:(plac\w+)/,cL+"input-$1")]})],o)}return""}))}}];const TL=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||EL;var r,i,s={},l=[];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<t.length;n++)s[t[n]]=!0;l.push(e)}));var a,c,u,d,p=[bL,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[BL,IL].concat(o,p),u=zN(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});i=function(e,t,n,o){a=n,fL(kL(e?e+"{"+t.styles+"}":t.styles),h),o&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new EN({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return g.sheet.hydrate(l),g};const ML=function(e){for(var t,n=0,o=0,r=e.length;r>=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)};const PL={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};var RL=/[A-Z]|^ms/g,AL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,NL=function(e){return 45===e.charCodeAt(1)},LL=function(e){return null!=e&&"boolean"!=typeof e},DL=BN((function(e){return NL(e)?e:e.replace(RL,"-$&").toLowerCase()})),OL=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(AL,(function(e,t,n){return VL={name:t,styles:n,next:VL},t}))}return 1===PL[e]||NL(e)||"number"!=typeof t||0===t?t:t+"px"};function zL(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 VL={name:n.name,styles:n.styles,next:VL},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)VL={name:o.name,styles:o.styles,next:VL},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=zL(e,t,n[r])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?o+=i+"{"+t[s]+"}":LL(s)&&(o+=DL(i)+":"+OL(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=zL(e,t,s);switch(i){case"animation":case"animationName":o+=DL(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var a=0;a<s.length;a++)LL(s[a])&&(o+=DL(i)+":"+OL(i,s[a])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=VL,i=n(e);return VL=r,zL(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var VL,FL=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var HL=!!ic.useInsertionEffect&&ic.useInsertionEffect,UL=HL||function(e){return e()},GL=(0,ic.createContext)("undefined"!=typeof HTMLElement?TL({key:"css"}):null);GL.Provider;var $L=function(e){return(0,ic.forwardRef)((function(t,n){var o=(0,ic.useContext)(GL);return e(t,o,n)}))},WL=(0,ic.createContext)({});var KL=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},ZL=jN,qL=function(e){return"theme"!==e},YL=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ZL:qL},XL=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},QL=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;KL(t,n,o);UL((function(){return function(e,t,n){KL(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};const JL=function e(t,n){var o,r,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var l=XL(t,n,i),a=l||YL(s),c=!a("as");return function(){var u=arguments,d=i&&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,h=1;h<p;h++)d.push(u[h],u[0][h])}var g=$L((function(e,t,n){var o=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var h in p={},e)p[h]=e[h];p.theme=(0,ic.useContext)(WL)}"string"==typeof e.className?i=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var g=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";VL=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=zL(n,t,i)):r+=i[0];for(var s=1;s<e.length;s++)r+=zL(n,t,e[s]),o&&(r+=i[s]);FL.lastIndex=0;for(var l,a="";null!==(l=FL.exec(r));)a+="-"+l[1];return{name:ML(r)+a,styles:r,next:VL}}(d.concat(u),t.registered,p);i+=t.key+"-"+g.name,void 0!==r&&(i+=" "+r);var m=c&&void 0===l?YL(o):a,f={};for(var b in e)c&&"as"===b||m(b)&&(f[b]=e[b]);return f.className=i,f.ref=n,(0,ic.createElement)(ic.Fragment,null,(0,ic.createElement)(QL,{cache:t,serialized:g,isStringTag:"string"==typeof o}),(0,ic.createElement)(o,f))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+r}}),g.withComponent=function(t,o){return e(t,CN({},n,o,{shouldForwardProp:XL(g,o,!0)})).apply(void 0,d)},g}};var eD=JL.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){eD[e]=eD(e)}));const tD=eD(ws.__experimentalToolsPanelItem)`
+*/o=[e,t],n=function(e,t){"use strict";var n,o,r="function"==typeof Map?new Map:(n=[],o=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return o[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),o.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function s(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!r.has(e)){var t=null,n=null,o=null,s=function(){e.clientWidth!==n&&p()},l=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",l,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),r.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",l,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",r.set(e,{destroy:l,update:p}),a()}function a(){var n=window.getComputedStyle(e,null);"vertical"===n.resize?e.style.resize="none":"both"===n.resize&&(e.style.resize="horizontal"),t="content-box"===n.boxSizing?-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function u(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function d(){if(0!==e.scrollHeight){var o=u(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",n=e.clientWidth,o.forEach((function(e){e.node.scrollTop=e.scrollTop})),r&&(document.documentElement.scrollTop=r)}}function p(){d();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(c("scroll"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(c("hidden"),d(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),o!==r){o=r;var s=i("autosize:resized");try{e.dispatchEvent(s)}catch(e){}}}}function l(e){var t=r.get(e);t&&t.destroy()}function a(e){var t=r.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return s(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e}),t.default=c,e.exports=t.default},void 0===(r="function"==typeof n?n.apply(t,o):n)||(e.exports=r)},4462:function(e,t,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&(n[o[r]]=e[o[r]])}return n};t.__esModule=!0;var l=n(1609),a=n(5826),c=n(4306),u=n(461),d="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:u(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.maxRows,o=t.async;"number"==typeof n&&this.updateLineHeight(),"number"==typeof n||o?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(d,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(d,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,n=(t.onResize,t.maxRows),o=(t.onChange,t.style),r=(t.innerRef,t.children),a=s(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,u=n&&c?c*n:null;return l.createElement("textarea",i({},a,{onChange:this.onChange,style:u?i({},o,{maxHeight:u}):o,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),r)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:a.number,maxRows:a.number,onResize:a.func,innerRef:a.any,async:a.bool},t}(l.Component);t.TextareaAutosize=l.forwardRef((function(e,t){return l.createElement(p,i({},e,{innerRef:t}))}))},4725:e=>{function t(e,t){var o,r,i=e.type,s=e.value;return t&&void 0!==(r=t(e))?r:"word"===i||"space"===i?s:"string"===i?(o=e.quote||"")+s+(e.unclosed?"":o):"comment"===i?"/*"+s+(e.unclosed?"":"*/"):"div"===i?(e.before||"")+s+(e.after||""):Array.isArray(e.nodes)?(o=n(e.nodes,t),"function"!==i?o:s+"("+(e.before||"")+o+(e.after||"")+(e.unclosed?"":")")):s}function n(e,n){var o,r;if(Array.isArray(e)){for(o="",r=e.length-1;~r;r-=1)o=t(e[r],n)+o;return o}return t(e,n)}e.exports=n},5042:e=>{e.exports={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let o="",r=0|n;for(;r--;)o+=e[Math.random()*e.length|0];return o}}},5215:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},5380:(e,t,n)=>{"use strict";let{nanoid:o}=n(5042),{isAbsolute:r,resolve:i}=n(197),{SourceMapConsumer:s,SourceMapGenerator:l}=n(1866),{fileURLToPath:a,pathToFileURL:c}=n(2739),u=n(356),d=n(5696),p=n(9746),h=Symbol("fromOffsetCache"),g=Boolean(s&&l),m=Boolean(i&&r);class f{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!m||/^\w+:\/\//.test(t.from)||r(t.from)?this.file=t.from:this.file=i(t.from)),m&&g){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,o={}){let r,i,s;if(t&&"object"==typeof t){let e=t,o=n;if("number"==typeof e.offset){let o=this.fromOffset(e.offset);t=o.line,n=o.col}else t=e.line,n=e.column;if("number"==typeof o.offset){let e=this.fromOffset(o.offset);i=e.line,r=e.col}else i=o.line,r=o.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,i,r);return s=l?new u(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,o.plugin):new u(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:r,line:i},this.css,this.file,o.plugin),s.input={column:n,endColumn:r,endLine:i,line:t,source:this.css},this.file&&(c&&(s.input.url=c(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let o=0,r=e.length;o<r;o++)n[o]=t,t+=e[o].length+1;this[h]=n}t=n[n.length-1];let o=0;if(e>=t)o=n.length-1;else{let t,r=n.length-2;for(;o<r;)if(t=o+(r-o>>1),e<n[t])r=t-1;else{if(!(e>=n[t+1])){o=t;break}o=t+1}}return{col:e-n[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,o){if(!this.map)return!1;let i,s,l=this.map.consumer(),u=l.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof n&&(i=l.originalPositionFor({column:o,line:n})),s=r(u.source)?c(u.source):new URL(u.source,this.map.consumer().sourceRoot||c(this.map.mapFile));let d={column:u.column,endColumn:i&&i.column,endLine:i&&i.line,line:u.line,url:s.toString()};if("file:"===s.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");d.file=a(s)}let p=l.sourceContentFor(u.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=f,f.default=f,p&&p.registerInput&&p.registerInput(f)},5404:(e,t,n)=>{const o=n(1544);e.exports=e=>{const t=Object.assign({skipHostRelativeUrls:!0},e);return{postcssPlugin:"rebaseUrl",Declaration(n){const r=o(n.value);let i=!1;r.walk((n=>{if("function"!==n.type||"url"!==n.value)return;const o=n.nodes[0].value,r=new URL(o,e.rootUrl);return r.pathname===o&&t.skipHostRelativeUrls||(n.nodes[0].value=r.toString(),i=!0),!1})),i&&(n.value=o.stringify(r))}}},e.exports.postcss=!0},5417:(e,t)=>{"use strict";function n(){}function o(e,t,n,o,r){for(var i=0,s=t.length,l=0,a=0;i<s;i++){var c=t[i];if(c.removed){if(c.value=e.join(o.slice(a,a+c.count)),a+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&r){var d=n.slice(l,l+c.count);d=d.map((function(e,t){var n=o[a+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(l,l+c.count));l+=c.count,c.added||(a+=c.count)}}var p=t[s-1];return s>1&&"string"==typeof p.value&&(p.added||p.removed)&&e.equals("",p.value)&&(t[s-2].value+=p.value,t.pop()),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var i=this;function s(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var l=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,c=1,u=l+a,d=[{newPos:-1,components:[]}],p=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=l&&p+1>=a)return s([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*c;n<=c;n+=2){var r=void 0,u=d[n-1],p=d[n+1],h=(p?p.newPos:0)-n;u&&(d[n-1]=void 0);var g=u&&u.newPos+1<l,m=p&&0<=h&&h<a;if(g||m){if(!g||m&&u.newPos<p.newPos?(r={newPos:(f=p).newPos,components:f.components.slice(0)},i.pushComponent(r.components,void 0,!0)):((r=u).newPos++,i.pushComponent(r.components,!0,void 0)),h=i.extractCommon(r,t,e,n),r.newPos+1>=l&&h+1>=a)return s(o(i,r.components,t,e,i.useLongestToken));d[n]=r}else d[n]=void 0}var f;c++}if(r)!function e(){setTimeout((function(){if(c>u)return r();h()||e()}),0)}();else for(;c<=u;){var g=h();if(g)return g}},pushComponent:function(e,t,n){var o=e[e.length-1];o&&o.added===t&&o.removed===n?e[e.length-1]={count:o.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,o){for(var r=t.length,i=n.length,s=e.newPos,l=s-o,a=0;s+1<r&&l+1<i&&this.equals(t[s+1],n[l+1]);)s++,l++,a++;return a&&e.components.push({count:a}),e.newPos=s,l},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}},5696:(e,t,n)=>{"use strict";let{existsSync:o,readFileSync:r}=n(9977),{dirname:i,join:s}=n(197),{SourceMapConsumer:l,SourceMapGenerator:a}=n(1866);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,o=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=i(this.mapFile)),o&&(this.text=o)}consumer(){return this.consumerCache||(this.consumerCache=new l(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return o=e.substr(n[0].length),Buffer?Buffer.from(o,"base64").toString():window.atob(o);var o;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),o=e.indexOf("*/",n);n>-1&&o>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,o)))}loadFile(e){if(this.root=i(e),o(e))return this.mapFile=e,r(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof l)return a.fromSourceMap(t).toString();if(t instanceof a)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=s(i(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},5776:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},5826:(e,t,n)=>{e.exports=n(628)()},6109:e=>{e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},6589:(e,t,n)=>{"use strict";let o=n(7490);class r extends o{constructor(e){super(e),this.type="comment"}}e.exports=r,r.default=r},7191:(e,t,n)=>{"use strict";var o=n(2213),r=n(1087);function i(e){var t=0,n=0,o=0,r=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),o=10*t,r=10*n,"deltaY"in e&&(r=e.deltaY),"deltaX"in e&&(o=e.deltaX),(o||r)&&e.deltaMode&&(1==e.deltaMode?(o*=40,r*=40):(o*=800,r*=800)),o&&!t&&(t=o<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:t,spinY:n,pixelX:o,pixelY:r}}i.getEventType=function(){return o.firefox()?"DOMMouseScroll":r("wheel")?"wheel":"mousewheel"},e.exports=i},7374:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,n){let o=[],r="",i=!1,s=0,l=!1,a="",c=!1;for(let n of e)c?c=!1:"\\"===n?c=!0:l?n===a&&(l=!1):'"'===n||"'"===n?(l=!0,a=n):"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(i=!0),i?(""!==r&&o.push(r.trim()),r="",i=!1):r+=n;return(n||""!==r)&&o.push(r.trim()),o}};e.exports=t,t.default=t},7490:(e,t,n)=>{"use strict";let o=n(356),r=n(346),i=n(633),{isClean:s,my:l}=n(1381);function a(e,t){let n=new e.constructor;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;if("proxyCache"===o)continue;let r=e[o],i=typeof r;"parent"===o&&"object"===i?t&&(n[o]=t):"source"===o?n[o]=r:Array.isArray(r)?n[o]=r.map((e=>a(e,n))):("object"===i&&null!==r&&(r=a(r)),n[o]=r)}return n}function c(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,o=1,r=0;for(let i=0;i<e.length;i++){if(o===t.line&&n===t.column){r=i;break}"\n"===e[i]?(n=1,o+=1):n+=1}return r}class u{get proxyOf(){return this}constructor(e={}){this.raws={},this[s]=!1,this[l]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=a(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:o}=this.rangeBy(t);return this.source.input.error(e,{column:o.column,line:o.line},{column:n.column,line:n.line},t)}return new o(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let e=this;for(;e=e.parent;)e[s]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,o=n.slice(c(n,this.source.start),c(n,this.source.end)).indexOf(e.word);-1!==o&&(t=this.positionInside(o))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,o="document"in this.source.input?this.source.input.document:this.source.input.css,r=c(o,this.source.start),i=r+e;for(let e=r;e<i;e++)"\n"===o[e]?(t=1,n+=1):t+=1;return{column:t,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let o="document"in this.source.input?this.source.input.document:this.source.input.css,r=o.slice(c(o,this.source.start),c(o,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r),n=this.positionInside(r+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new r).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let o of e)o===this?n=!0:n?(this.parent.insertAfter(t,o),t=o):this.parent.insertBefore(t,o);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},o=null==t;t=t||new Map;let r=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let o=this[e];if(Array.isArray(o))n[e]=o.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof o&&o.toJSON)n[e]=o.toJSON(null,t);else if("source"===e){let i=t.get(o.input);null==i&&(i=r,t.set(o.input,r),r++),n[e]={end:o.end,inputId:i,start:o.start}}else n[e]=o}return o&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=i){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let o={node:this};for(let e in n)o[e]=n[e];return e.warn(t,o)}}e.exports=u,u.default=u},7520:(e,t,n)=>{e.exports=n(7191)},7661:(e,t,n)=>{"use strict";let o=n(1670),r=n(4295);const i=n(9055);let s=n(633);n(3122);class l{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let l=s;this.result=new i(this._processor,r,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get:()=>a.root});let c=new o(l,r,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}}e.exports=l,l.default=l},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],n.get(r[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(r of t.entries())if(!n.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(t[r]!==n[r])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(r=o;0!=r--;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;0!=r--;){var s=i[r];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}},8021:(e,t,n)=>{"use strict";var o;t.JJ=function(e,t,n){return r.diff(e,t,n)};var r=new(((o=n(5417))&&o.__esModule?o:{default:o}).default)},8202:e=>{"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},8491:e=>{var t="(".charCodeAt(0),n=")".charCodeAt(0),o="'".charCodeAt(0),r='"'.charCodeAt(0),i="\\".charCodeAt(0),s="/".charCodeAt(0),l=",".charCodeAt(0),a=":".charCodeAt(0),c="*".charCodeAt(0),u="u".charCodeAt(0),d="U".charCodeAt(0),p="+".charCodeAt(0),h=/^[a-f0-9?-]+$/i;e.exports=function(e){for(var g,m,f,b,k,v,_,y,x,S=[],w=e,C=0,B=w.charCodeAt(C),I=w.length,j=[{nodes:S}],E=0,T="",M="",P="";C<I;)if(B<=32){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);b=w.slice(C,g),f=S[S.length-1],B===n&&E?P=b:f&&"div"===f.type?(f.after=b,f.sourceEndIndex+=b.length):B===l||B===a||B===s&&w.charCodeAt(g+1)!==c&&(!x||x&&"function"===x.type&&"calc"!==x.value)?M=b:S.push({type:"space",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else if(B===o||B===r){g=C,b={type:"string",sourceIndex:C,quote:m=B===o?"'":'"'};do{if(k=!1,~(g=w.indexOf(m,g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=m).length-1,b.unclosed=!0}while(k);b.value=w.slice(C+1,g),b.sourceEndIndex=b.unclosed?g:g+1,S.push(b),C=g+1,B=w.charCodeAt(C)}else if(B===s&&w.charCodeAt(C+1)===c)b={type:"comment",sourceIndex:C,sourceEndIndex:(g=w.indexOf("*/",C))+2},-1===g&&(b.unclosed=!0,g=w.length,b.sourceEndIndex=g),b.value=w.slice(C+2,g),S.push(b),C=g+2,B=w.charCodeAt(C);else if(B!==s&&B!==c||!x||"function"!==x.type||"calc"!==x.value)if(B===s||B===l||B===a)b=w[C],S.push({type:"div",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b,before:M,after:""}),M="",C+=1,B=w.charCodeAt(C);else if(t===B){g=C;do{g+=1,B=w.charCodeAt(g)}while(B<=32);if(y=C,b={type:"function",sourceIndex:C-T.length,value:T,before:w.slice(y+1,g)},C=g,"url"===T&&B!==o&&B!==r){g-=1;do{if(k=!1,~(g=w.indexOf(")",g+1)))for(v=g;w.charCodeAt(v-1)===i;)v-=1,k=!k;else g=(w+=")").length-1,b.unclosed=!0}while(k);_=g;do{_-=1,B=w.charCodeAt(_)}while(B<=32);y<_?(b.nodes=C!==_+1?[{type:"word",sourceIndex:C,sourceEndIndex:_+1,value:w.slice(C,_+1)}]:[],b.unclosed&&_+1!==g?(b.after="",b.nodes.push({type:"space",sourceIndex:_+1,sourceEndIndex:g,value:w.slice(_+1,g)})):(b.after=w.slice(_+1,g),b.sourceEndIndex=g)):(b.after="",b.nodes=[]),C=g+1,b.sourceEndIndex=b.unclosed?g:C,B=w.charCodeAt(C),S.push(b)}else E+=1,b.after="",b.sourceEndIndex=C+1,S.push(b),j.push(b),S=b.nodes=[],x=b;T=""}else if(n===B&&E)C+=1,B=w.charCodeAt(C),x.after=P,x.sourceEndIndex+=P.length,P="",E-=1,j[j.length-1].sourceEndIndex=C,j.pop(),S=(x=j[E]).nodes;else{g=C;do{B===i&&(g+=1),g+=1,B=w.charCodeAt(g)}while(g<I&&!(B<=32||B===o||B===r||B===l||B===a||B===s||B===t||B===c&&x&&"function"===x.type&&"calc"===x.value||B===s&&"function"===x.type&&"calc"===x.value||B===n&&E));b=w.slice(C,g),t===B?T=b:u!==b.charCodeAt(0)&&d!==b.charCodeAt(0)||p!==b.charCodeAt(1)||!h.test(b.slice(2))?S.push({type:"word",sourceIndex:C,sourceEndIndex:g,value:b}):S.push({type:"unicode-range",sourceIndex:C,sourceEndIndex:g,value:b}),C=g}else b=w[C],S.push({type:"word",sourceIndex:C-M.length,sourceEndIndex:C+b.length,value:b}),C+=1,B=w.charCodeAt(C);for(C=j.length-1;C;C-=1)j[C].unclosed=!0,j[C].sourceEndIndex=w.length;return j[0].nodes}},9055:(e,t,n)=>{"use strict";let o=n(5776);class r{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new o(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}}e.exports=r,r.default=r},9434:(e,t,n)=>{"use strict";let o,r,i=n(683);class s extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let o=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of o)e.raws.before=t.raws.before;return o}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new o(new r,this,e).stringify()}}s.registerLazyResult=e=>{o=e},s.registerProcessor=e=>{r=e},e.exports=s,s.default=s,i.registerRoot(s)},9656:(e,t,n)=>{"use strict";let o=n(271),r=n(448),i=n(7661),s=n(9434);class l{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new r(this,e,t):new i(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=l,l.default=l,s.registerProcessor(l),o.registerProcessor(l)},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),o=new RegExp(n,"g"),r=new RegExp(n,"");function i(e){return t[e]}var s=function(e){return e.replace(o,i)};e.exports=s,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=s},9746:()=>{},9977:()=>{}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{"use strict";n.r(o),n.d(o,{AlignmentControl:()=>Vg,AlignmentToolbar:()=>Fg,Autocomplete:()=>kj,BlockAlignmentControl:()=>pa,BlockAlignmentToolbar:()=>ha,BlockBreadcrumb:()=>Cj,BlockCanvas:()=>XT,BlockColorsStyleSelector:()=>tM,BlockContextProvider:()=>iv,BlockControls:()=>Rs,BlockEdit:()=>vv,BlockEditorKeyboardShortcuts:()=>Qk,BlockEditorProvider:()=>ov,BlockFormatControls:()=>Ps,BlockIcon:()=>Vu,BlockInspector:()=>VA,BlockList:()=>dw,BlockMover:()=>Hj,BlockNavigationDropdown:()=>DM,BlockPopover:()=>tf,BlockPreview:()=>kC,BlockSelectionClearer:()=>RS,BlockSettingsMenu:()=>gT,BlockSettingsMenuControls:()=>lT,BlockStyles:()=>VM,BlockTitle:()=>wj,BlockToolbar:()=>OT,BlockTools:()=>UT,BlockVerticalAlignmentControl:()=>vl,BlockVerticalAlignmentToolbar:()=>_l,ButtonBlockAppender:()=>uI,ButtonBlockerAppender:()=>cI,ColorPalette:()=>cP,ColorPaletteControl:()=>uP,ContrastChecker:()=>dh,CopyHandler:()=>HA,DefaultBlockAppender:()=>yS,FontSizePicker:()=>sj,HeadingLevelDropdown:()=>$M,HeightControl:()=>bm,InnerBlocks:()=>ew,Inserter:()=>lI,InspectorAdvancedControls:()=>Va,InspectorControls:()=>Fa,JustifyContentControl:()=>Sl,JustifyToolbar:()=>wl,LineHeightControl:()=>Oh,LinkControl:()=>uu,MediaPlaceholder:()=>mR,MediaReplaceFlow:()=>hu,MediaUpload:()=>Ya,MediaUploadCheck:()=>Xa,MultiSelectScrollIntoView:()=>WA,NavigableToolbar:()=>ET,ObserveTyping:()=>rw,PanelColorSettings:()=>fR,PlainText:()=>qR,RecursionProvider:()=>JA,RichText:()=>WR,RichTextShortcut:()=>QR,RichTextToolbarButton:()=>JR,SETTINGS_DEFAULTS:()=>P,SkipToSelectedBlock:()=>gA,Typewriter:()=>XA,URLInput:()=>ac,URLInputButton:()=>oA,URLPopover:()=>dR,Warning:()=>bv,WritingFlow:()=>Aw,__experimentalBlockAlignmentMatrixControl:()=>xj,__experimentalBlockFullHeightAligmentControl:()=>_j,__experimentalBlockPatternSetup:()=>oP,__experimentalBlockPatternsList:()=>$C,__experimentalBlockVariationPicker:()=>KM,__experimentalBlockVariationTransforms:()=>lP,__experimentalBorderRadiusControl:()=>rp,__experimentalColorGradientControl:()=>qp,__experimentalColorGradientSettingsDropdown:()=>kP,__experimentalDateFormatPicker:()=>hP,__experimentalDuotoneControl:()=>Ef,__experimentalFontAppearanceControl:()=>Lh,__experimentalFontFamilyControl:()=>Ah,__experimentalGetBorderClassesAndStyles:()=>UI,__experimentalGetColorClassesAndStyles:()=>WI,__experimentalGetElementClassName:()=>lN,__experimentalGetGapCSSValue:()=>ul,__experimentalGetGradientClass:()=>Op,__experimentalGetGradientObjectByGradientValue:()=>Vp,__experimentalGetShadowClassesAndStyles:()=>$I,__experimentalGetSpacingClassesAndStyles:()=>ZI,__experimentalImageEditor:()=>oR,__experimentalImageSizeControl:()=>lR,__experimentalImageURLInputUI:()=>uA,__experimentalInspectorPopoverHeader:()=>oN,__experimentalLetterSpacingControl:()=>zh,__experimentalLibrary:()=>$A,__experimentalLinkControl:()=>cu,__experimentalLinkControlSearchInput:()=>Gc,__experimentalLinkControlSearchItem:()=>Bc,__experimentalLinkControlSearchResults:()=>Nc,__experimentalListView:()=>NM,__experimentalPanelColorGradientSettings:()=>xP,__experimentalPreviewOptions:()=>dA,__experimentalPublishDateTimePicker:()=>iN,__experimentalRecursionProvider:()=>tN,__experimentalResponsiveBlockControl:()=>XR,__experimentalSpacingSizesControl:()=>mm,__experimentalTextDecorationControl:()=>tg,__experimentalTextTransformControl:()=>Xh,__experimentalUnitControl:()=>tA,__experimentalUseBlockOverlayActive:()=>Bj,__experimentalUseBlockPreview:()=>vC,__experimentalUseBorderProps:()=>GI,__experimentalUseColorProps:()=>KI,__experimentalUseCustomSides:()=>mf,__experimentalUseGradient:()=>Hp,__experimentalUseHasRecursion:()=>nN,__experimentalUseMultipleOriginColorsAndGradients:()=>Nd,__experimentalUseResizeCanvas:()=>pA,__experimentalWritingModeControl:()=>ig,__unstableBlockNameContext:()=>CT,__unstableBlockSettingsMenuFirstItem:()=>zE,__unstableBlockToolbarLastItem:()=>_E,__unstableEditorStyles:()=>cC,__unstableIframe:()=>Fw,__unstableInserterMenuExtension:()=>KB,__unstableRichTextInputEvent:()=>eA,__unstableUseBlockSelectionClearer:()=>PS,__unstableUseClipboardHandler:()=>FA,__unstableUseMouseMoveTypingReset:()=>nw,__unstableUseTypewriter:()=>YA,__unstableUseTypingObserver:()=>ow,createCustomColorsHOC:()=>rj,getColorClassName:()=>Ad,getColorObjectByAttributeValues:()=>Pd,getColorObjectByColorValue:()=>Rd,getComputedFluidTypographyValue:()=>zi,getCustomValueFromPreset:()=>il,getFontSize:()=>Tg,getFontSizeClass:()=>Pg,getFontSizeObjectByValue:()=>Mg,getGradientSlugByValue:()=>Fp,getGradientValueBySlug:()=>zp,getPxFromCssUnit:()=>aN,getSpacingPresetCssVar:()=>ll,getTypographyClassesAndStyles:()=>YI,isValueSpacingPreset:()=>rl,privateApis:()=>sD,store:()=>ji,storeConfig:()=>Ii,transformStyles:()=>lC,useBlockBindingsUtils:()=>dv,useBlockCommands:()=>ZT,useBlockDisplayInformation:()=>Xf,useBlockEditContext:()=>C,useBlockEditingMode:()=>ga,useBlockProps:()=>gS,useCachedTruthy:()=>XI,useHasRecursion:()=>eN,useInnerBlocksProps:()=>JS,useSetting:()=>Mi,useSettings:()=>Ti,useStyleOverride:()=>_s,withColorContext:()=>aP,withColors:()=>ij,withFontSizes:()=>cj});var e={};n.r(e),n.d(e,{getAllPatterns:()=>ze,getBlockRemovalRules:()=>Pe,getBlockSettings:()=>ye,getBlockStyles:()=>Ye,getBlockWithoutAttributes:()=>Ce,getClosestAllowedInsertionPoint:()=>et,getClosestAllowedInsertionPointForPattern:()=>tt,getContentLockingParent:()=>$e,getEnabledBlockParents:()=>Te,getEnabledClientIdsTree:()=>Ee,getExpandedBlock:()=>Ge,getInserterMediaCategories:()=>Le,getInsertionPoint:()=>nt,getLastFocus:()=>He,getLastInsertedBlocksClientIds:()=>we,getOpenedBlockSettingsMenu:()=>Re,getParentSectionBlock:()=>We,getPatternBySlug:()=>Oe,getRegisteredInserterMediaCategories:()=>Ne,getRemovalPromptData:()=>Me,getReusableBlocks:()=>Fe,getSectionRootClientId:()=>Xe,getStyleOverrides:()=>Ae,getTemporarilyEditingAsBlocks:()=>Ze,getTemporarilyEditingFocusModeToRevert:()=>qe,getZoomLevel:()=>Je,hasAllowedPatterns:()=>De,hasBlockSpotlight:()=>rt,isBlockHidden:()=>ot,isBlockInterfaceHidden:()=>Se,isBlockSubtreeDisabled:()=>Be,isContainerInsertableToInContentOnlyMode:()=>Ie,isDragging:()=>Ue,isSectionBlock:()=>Ke,isZoomOut:()=>Qe});var t={};n.r(t),n.d(t,{__experimentalGetActiveBlockIdByBlockNames:()=>To,__experimentalGetAllowedBlocks:()=>lo,__experimentalGetAllowedPatterns:()=>mo,__experimentalGetBlockListSettingsForBlocks:()=>xo,__experimentalGetDirectInsertBlock:()=>co,__experimentalGetGlobalBlocksByName:()=>zt,__experimentalGetLastBlockAttributeChanges:()=>Co,__experimentalGetParsedPattern:()=>uo,__experimentalGetPatternTransformItems:()=>ko,__experimentalGetPatternsByBlockTypes:()=>bo,__experimentalGetReusableBlockTitle:()=>So,__unstableGetBlockWithoutInnerBlocks:()=>Mt,__unstableGetClientIdWithClientIdsTree:()=>Rt,__unstableGetClientIdsTree:()=>At,__unstableGetContentLockingParent:()=>Vo,__unstableGetSelectedBlocksWithPartialSelection:()=>yn,__unstableGetTemporarilyEditingAsBlocks:()=>Fo,__unstableGetTemporarilyEditingFocusModeToRevert:()=>Ho,__unstableGetVisibleBlocks:()=>Ao,__unstableHasActiveBlockOverlayActive:()=>No,__unstableIsFullySelected:()=>bn,__unstableIsLastBlockChangeIgnored:()=>wo,__unstableIsSelectionCollapsed:()=>kn,__unstableIsSelectionMergeable:()=>_n,__unstableIsWithinBlockOverlay:()=>Lo,__unstableSelectionHasUnmergeableBlock:()=>vn,areInnerBlocksControlled:()=>Eo,canEditBlock:()=>Xn,canInsertBlockType:()=>$n,canInsertBlocks:()=>Wn,canLockBlockType:()=>Qn,canMoveBlock:()=>qn,canMoveBlocks:()=>Yn,canRemoveBlock:()=>Kn,canRemoveBlocks:()=>Zn,didAutomaticChange:()=>Io,getAdjacentBlockClientId:()=>nn,getAllowedBlocks:()=>so,getBlock:()=>Tt,getBlockAttributes:()=>Et,getBlockCount:()=>Ht,getBlockEditingMode:()=>Do,getBlockHierarchyRootClientId:()=>en,getBlockIndex:()=>Sn,getBlockInsertionPoint:()=>On,getBlockListSettings:()=>vo,getBlockMode:()=>Mn,getBlockName:()=>It,getBlockNamesByClientId:()=>Ft,getBlockOrder:()=>xn,getBlockParents:()=>Qt,getBlockParentsByBlockName:()=>Jt,getBlockRootClientId:()=>Xt,getBlockSelectionEnd:()=>Wt,getBlockSelectionStart:()=>$t,getBlockTransformItems:()=>ro,getBlocks:()=>Pt,getBlocksByClientId:()=>Vt,getBlocksByName:()=>Ot,getClientIdsOfDescendants:()=>Nt,getClientIdsWithDescendants:()=>Lt,getDirectInsertBlock:()=>ao,getDraggedBlockClientIds:()=>An,getFirstMultiSelectedBlockClientId:()=>un,getGlobalBlockCount:()=>Dt,getHoveredBlockClientId:()=>Ro,getInserterItems:()=>oo,getLastMultiSelectedBlockClientId:()=>dn,getLowestCommonAncestorWithSelectedBlock:()=>tn,getMultiSelectedBlockClientIds:()=>an,getMultiSelectedBlocks:()=>cn,getMultiSelectedBlocksEndClientId:()=>fn,getMultiSelectedBlocksStartClientId:()=>mn,getNextBlockClientId:()=>rn,getPatternsByBlockTypes:()=>fo,getPreviousBlockClientId:()=>on,getSelectedBlock:()=>Yt,getSelectedBlockClientId:()=>qt,getSelectedBlockClientIds:()=>ln,getSelectedBlockCount:()=>Kt,getSelectedBlocksInitialCaretPosition:()=>sn,getSelectionEnd:()=>Gt,getSelectionStart:()=>Ut,getSettings:()=>_o,getTemplate:()=>Fn,getTemplateLock:()=>Hn,hasBlockMovingClientId:()=>Bo,hasDraggedInnerBlock:()=>Bn,hasInserterItems:()=>io,hasMultiSelection:()=>jn,hasSelectedBlock:()=>Zt,hasSelectedInnerBlock:()=>Cn,isAncestorBeingDragged:()=>Ln,isAncestorMultiSelected:()=>gn,isBlockBeingDragged:()=>Nn,isBlockHighlighted:()=>jo,isBlockInsertionPointVisible:()=>zn,isBlockMultiSelected:()=>hn,isBlockSelected:()=>wn,isBlockValid:()=>jt,isBlockVisible:()=>Po,isBlockWithinSelection:()=>In,isCaretWithinFormattedText:()=>Dn,isDraggingBlocks:()=>Rn,isFirstMultiSelectedBlock:()=>pn,isGroupable:()=>zo,isLastBlockChangePersistent:()=>yo,isMultiSelecting:()=>En,isSelectionEnabled:()=>Tn,isTyping:()=>Pn,isUngroupable:()=>Oo,isValidTemplate:()=>Vn,wasBlockJustInserted:()=>Mo});var r={};n.r(r),n.d(r,{__experimentalUpdateSettings:()=>$o,clearBlockRemovalPrompt:()=>Xo,deleteStyleOverride:()=>tr,ensureDefaultBlock:()=>qo,expandBlock:()=>sr,hideBlockInterface:()=>Wo,modifyContentLockBlock:()=>ar,privateRemoveBlocks:()=>Zo,resetZoomLevel:()=>ur,setBlockRemovalRules:()=>Qo,setInsertionPoint:()=>lr,setLastFocus:()=>nr,setOpenedBlockSettingsMenu:()=>Jo,setStyleOverride:()=>er,setZoomLevel:()=>cr,showBlockInterface:()=>Ko,startDragging:()=>rr,stopDragging:()=>ir,stopEditingAsBlocks:()=>or,toggleBlockSpotlight:()=>dr});var i={};n.r(i),n.d(i,{__unstableDeleteSelection:()=>Wr,__unstableExpandSelection:()=>Zr,__unstableMarkAutomaticChange:()=>hi,__unstableMarkLastChangeAsPersistent:()=>di,__unstableMarkNextChangeAsNotPersistent:()=>pi,__unstableSaveReusableBlock:()=>ui,__unstableSetEditorMode:()=>gi,__unstableSetTemporarilyEditingAsBlocks:()=>Si,__unstableSplitSelection:()=>Kr,clearSelectedBlock:()=>Mr,duplicateBlocks:()=>fi,enterFormattedText:()=>ri,exitFormattedText:()=>ii,flashBlock:()=>_i,hideInsertionPoint:()=>Ur,hoverBlock:()=>Cr,insertAfterBlock:()=>ki,insertBeforeBlock:()=>bi,insertBlock:()=>Vr,insertBlocks:()=>Fr,insertDefaultBlock:()=>li,mergeBlocks:()=>qr,moveBlockToPosition:()=>zr,moveBlocksDown:()=>Lr,moveBlocksToPosition:()=>Or,moveBlocksUp:()=>Dr,multiSelect:()=>Tr,receiveBlocks:()=>yr,registerInserterMediaCategory:()=>wi,removeBlock:()=>Xr,removeBlocks:()=>Yr,replaceBlock:()=>Ar,replaceBlocks:()=>Rr,replaceInnerBlocks:()=>Qr,resetBlocks:()=>kr,resetSelection:()=>_r,selectBlock:()=>wr,selectNextBlock:()=>Ir,selectPreviousBlock:()=>Br,selectionChange:()=>si,setBlockEditingMode:()=>Ci,setBlockMovingClientId:()=>mi,setBlockVisibility:()=>xi,setHasControlledInnerBlocks:()=>yi,setTemplateValidity:()=>Gr,showInsertionPoint:()=>Hr,startDraggingBlocks:()=>ni,startMultiSelect:()=>jr,startTyping:()=>ei,stopDraggingBlocks:()=>oi,stopMultiSelect:()=>Er,stopTyping:()=>ti,synchronizeTemplate:()=>$r,toggleBlockHighlight:()=>vi,toggleBlockMode:()=>Jr,toggleSelection:()=>Pr,unsetBlockEditingMode:()=>Bi,updateBlock:()=>Sr,updateBlockAttributes:()=>xr,updateBlockListSettings:()=>ai,updateSettings:()=>ci,validateBlocksToTemplate:()=>vr});var s={};n.r(s),n.d(s,{getItems:()=>ok,getSettings:()=>lk,isUploading:()=>rk,isUploadingById:()=>sk,isUploadingByUrl:()=>ik});var l={};n.r(l),n.d(l,{getAllItems:()=>ak,getBlobUrls:()=>gk,getItem:()=>ck,getPausedUploadForPost:()=>pk,isBatchUploaded:()=>uk,isPaused:()=>hk,isUploadingToPost:()=>dk});var a={};n.r(a),n.d(a,{addItems:()=>Bk,cancelItem:()=>Ik});var c={};n.r(c),n.d(c,{addItem:()=>Tk,finishOperation:()=>Nk,pauseQueue:()=>Pk,prepareItem:()=>Lk,processItem:()=>Mk,removeItem:()=>Ak,resumeQueue:()=>Rk,revokeBlobUrls:()=>Ok,updateSettings:()=>zk,uploadItem:()=>Dk});var u={};n.r(u),n.d(u,{AdvancedPanel:()=>dN,BackgroundPanel:()=>Tu,BorderPanel:()=>Sp,ColorPanel:()=>uh,DimensionsPanel:()=>zm,FiltersPanel:()=>Uf,GlobalStylesContext:()=>is,ImageSettingsPanel:()=>uN,TypographyPanel:()=>yg,areGlobalStyleConfigsEqual:()=>os,getBlockCSSSelector:()=>Rf,getBlockSelectors:()=>Sb,getGlobalStylesChanges:()=>vN,getLayoutStyles:()=>mb,toStyles:()=>yb,useGlobalSetting:()=>cs,useGlobalStyle:()=>us,useGlobalStylesOutput:()=>Bb,useGlobalStylesOutputWithConfig:()=>Cb,useGlobalStylesReset:()=>as,useHasBackgroundPanel:()=>Iu,useHasBorderPanel:()=>gp,useHasBorderPanelControls:()=>mp,useHasColorPanel:()=>Yp,useHasDimensionsPanel:()=>Bm,useHasFiltersPanel:()=>Lf,useHasImageSettingsPanel:()=>cN,useHasTypographyPanel:()=>ag,useSettingsForBlockElement:()=>ds});const d=window.ReactJSXRuntime,p=window.wp.blocks,h=window.wp.element,g=window.wp.data,m=window.wp.compose,f=window.wp.hooks,b=Symbol("mayDisplayControls"),k=Symbol("mayDisplayParentControls"),v=Symbol("blockEditingMode"),_=Symbol("blockBindings"),y=Symbol("isPreviewMode"),x={name:"",isSelected:!1},S=(0,h.createContext)(x);S.displayName="BlockEditContext";const{Provider:w}=S;function C(){return(0,h.useContext)(S)}const B=window.wp.deprecated;var I=n.n(B),j=n(7734),E=n.n(j);const T=window.wp.i18n,M={insertUsage:{}},P={alignWide:!1,supportsLayout:!0,colors:[{name:(0,T.__)("Black"),slug:"black",color:"#000000"},{name:(0,T.__)("Cyan bluish gray"),slug:"cyan-bluish-gray",color:"#abb8c3"},{name:(0,T.__)("White"),slug:"white",color:"#ffffff"},{name:(0,T.__)("Pale pink"),slug:"pale-pink",color:"#f78da7"},{name:(0,T.__)("Vivid red"),slug:"vivid-red",color:"#cf2e2e"},{name:(0,T.__)("Luminous vivid orange"),slug:"luminous-vivid-orange",color:"#ff6900"},{name:(0,T.__)("Luminous vivid amber"),slug:"luminous-vivid-amber",color:"#fcb900"},{name:(0,T.__)("Light green cyan"),slug:"light-green-cyan",color:"#7bdcb5"},{name:(0,T.__)("Vivid green cyan"),slug:"vivid-green-cyan",color:"#00d084"},{name:(0,T.__)("Pale cyan blue"),slug:"pale-cyan-blue",color:"#8ed1fc"},{name:(0,T.__)("Vivid cyan blue"),slug:"vivid-cyan-blue",color:"#0693e3"},{name:(0,T.__)("Vivid purple"),slug:"vivid-purple",color:"#9b51e0"}],fontSizes:[{name:(0,T._x)("Small","font size name"),size:13,slug:"small"},{name:(0,T._x)("Normal","font size name"),size:16,slug:"normal"},{name:(0,T._x)("Medium","font size name"),size:20,slug:"medium"},{name:(0,T._x)("Large","font size name"),size:36,slug:"large"},{name:(0,T._x)("Huge","font size name"),size:42,slug:"huge"}],imageDefaultSize:"large",imageSizes:[{slug:"thumbnail",name:(0,T.__)("Thumbnail")},{slug:"medium",name:(0,T.__)("Medium")},{slug:"large",name:(0,T.__)("Large")},{slug:"full",name:(0,T.__)("Full Size")}],imageEditing:!0,maxWidth:580,allowedBlockTypes:!0,maxUploadFileSize:0,allowedMimeTypes:null,canLockBlocks:!0,enableOpenverseMediaCategory:!0,clearBlockSelection:!0,__experimentalCanUserUseUnfilteredHTML:!1,__experimentalBlockDirectory:!1,__mobileEnablePageTemplates:!1,__experimentalBlockPatterns:[],__experimentalBlockPatternCategories:[],isPreviewMode:!1,blockInspectorAnimation:{animationParent:"core/navigation","core/navigation":{enterDirection:"leftToRight"},"core/navigation-submenu":{enterDirection:"rightToLeft"},"core/navigation-link":{enterDirection:"rightToLeft"},"core/search":{enterDirection:"rightToLeft"},"core/social-links":{enterDirection:"rightToLeft"},"core/page-list":{enterDirection:"rightToLeft"},"core/spacer":{enterDirection:"rightToLeft"},"core/home-link":{enterDirection:"rightToLeft"},"core/site-title":{enterDirection:"rightToLeft"},"core/site-logo":{enterDirection:"rightToLeft"}},generateAnchors:!1,gradients:[{name:(0,T.__)("Vivid cyan blue to vivid purple"),gradient:"linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)",slug:"vivid-cyan-blue-to-vivid-purple"},{name:(0,T.__)("Light green cyan to vivid green cyan"),gradient:"linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)",slug:"light-green-cyan-to-vivid-green-cyan"},{name:(0,T.__)("Luminous vivid amber to luminous vivid orange"),gradient:"linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)",slug:"luminous-vivid-amber-to-luminous-vivid-orange"},{name:(0,T.__)("Luminous vivid orange to vivid red"),gradient:"linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)",slug:"luminous-vivid-orange-to-vivid-red"},{name:(0,T.__)("Very light gray to cyan bluish gray"),gradient:"linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)",slug:"very-light-gray-to-cyan-bluish-gray"},{name:(0,T.__)("Cool to warm spectrum"),gradient:"linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)",slug:"cool-to-warm-spectrum"},{name:(0,T.__)("Blush light purple"),gradient:"linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)",slug:"blush-light-purple"},{name:(0,T.__)("Blush bordeaux"),gradient:"linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)",slug:"blush-bordeaux"},{name:(0,T.__)("Luminous dusk"),gradient:"linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)",slug:"luminous-dusk"},{name:(0,T.__)("Pale ocean"),gradient:"linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)",slug:"pale-ocean"},{name:(0,T.__)("Electric grass"),gradient:"linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)",slug:"electric-grass"},{name:(0,T.__)("Midnight"),gradient:"linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)",slug:"midnight"}],__unstableResolvedAssets:{styles:[],scripts:[]}};function R(e,t,n){return[...e.slice(0,n),...Array.isArray(t)?t:[t],...e.slice(n)]}function A(e,t,n,o=1){const r=[...e];return r.splice(t,o),R(r,e.slice(t,t+o),n)}const N=Symbol("globalStylesDataKey"),L=Symbol("globalStylesLinks"),D=Symbol("selectBlockPatternsKey"),O=Symbol("reusableBlocksSelect"),z=Symbol("sectionRootClientIdKey"),V=Symbol("mediaEditKey"),F=Symbol("essentialFormat"),H=window.wp.privateApis,{lock:U,unlock:G}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-editor"),{isContentBlock:$}=G(p.privateApis),W=e=>e;function K(e,t=""){const n=new Map,o=[];return n.set(t,o),e.forEach((e=>{const{clientId:t,innerBlocks:r}=e;o.push(t),K(r,t).forEach(((e,t)=>{n.set(t,e)}))})),n}function Z(e,t=""){const n=[],o=[[t,e]];for(;o.length;){const[e,t]=o.shift();t.forEach((({innerBlocks:t,...r})=>{n.push([r.clientId,e]),t?.length&&o.push([r.clientId,t])}))}return n}function q(e,t=W){const n=[],o=[...e];for(;o.length;){const{innerBlocks:e,...r}=o.shift();o.push(...e),n.push([r.clientId,t(r)])}return n}function Y(e){return q(e,(e=>{const{attributes:t,...n}=e;return n}))}function X(e){return q(e,(e=>e.attributes))}function Q(e,t){return"UPDATE_BLOCK_ATTRIBUTES"===e.type&&void 0!==t&&"UPDATE_BLOCK_ATTRIBUTES"===t.type&&E()(e.clientIds,t.clientIds)&&function(e,t){return E()(Object.keys(e),Object.keys(t))}(e.attributes,t.attributes)}function J(e,t){const n=e.tree,o=[...t],r=[...t];for(;o.length;){const e=o.shift();o.push(...e.innerBlocks),r.push(...e.innerBlocks)}for(const e of r)n.set(e.clientId,{});for(const t of r)n.set(t.clientId,Object.assign(n.get(t.clientId),{...e.byClientId.get(t.clientId),attributes:e.attributes.get(t.clientId),innerBlocks:t.innerBlocks.map((e=>n.get(e.clientId)))}))}function ee(e,t,n=!1){const o=e.tree,r=new Set([]),i=new Set;for(const o of t){let t=n?o:e.parents.get(o);do{if(e.controlledInnerBlocks[t]){i.add(t);break}r.add(t),t=e.parents.get(t)}while(void 0!==t)}for(const e of r)o.set(e,{...o.get(e)});for(const t of r)o.get(t).innerBlocks=(e.order.get(t)||[]).map((e=>o.get(e)));for(const t of i)o.set("controlled||"+t,{innerBlocks:(e.order.get(t)||[]).map((e=>o.get(e)))})}const te=(0,m.pipe)(g.combineReducers,(e=>(t,n)=>{if(t&&"SAVE_REUSABLE_BLOCK_SUCCESS"===n.type){const{id:e,updatedId:o}=n;if(e===o)return t;(t={...t}).attributes=new Map(t.attributes),t.attributes.forEach(((n,r)=>{const{name:i}=t.byClientId.get(r);"core/block"===i&&n.ref===e&&t.attributes.set(r,{...n,ref:o})}))}return e(t,n)}),(e=>(t={},n)=>{const o=e(t,n);if(o===t)return t;switch(o.tree=t.tree?t.tree:new Map,n.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":o.tree=new Map(o.tree),J(o,n.blocks),ee(o,n.rootClientId?[n.rootClientId]:[""],!0);break;case"UPDATE_BLOCK":o.tree=new Map(o.tree),o.tree.set(n.clientId,{...o.tree.get(n.clientId),...o.byClientId.get(n.clientId),attributes:o.attributes.get(n.clientId)}),ee(o,[n.clientId],!1);break;case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":o.tree=new Map(o.tree),n.clientIds.forEach((e=>{o.tree.set(e,{...o.tree.get(e),attributes:o.attributes.get(e)})})),ee(o,n.clientIds,!1);break;case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const e=function(e){const t={},n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t[o.clientId]=!0}return t}(n.blocks);o.tree=new Map(o.tree),n.replacedClientIds.forEach((t=>{o.tree.delete(t),e[t]||o.tree.delete("controlled||"+t)})),J(o,n.blocks),ee(o,n.blocks.map((e=>e.clientId)),!1);const r=[];for(const e of n.clientIds){const n=t.parents.get(e);void 0===n||""!==n&&!o.byClientId.get(n)||r.push(n)}ee(o,r,!0);break}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":const e=[];for(const r of n.clientIds){const n=t.parents.get(r);void 0===n||""!==n&&!o.byClientId.get(n)||e.push(n)}o.tree=new Map(o.tree),n.removedClientIds.forEach((e=>{o.tree.delete(e),o.tree.delete("controlled||"+e)})),ee(o,e,!0);break;case"MOVE_BLOCKS_TO_POSITION":{const e=[];n.fromRootClientId?e.push(n.fromRootClientId):e.push(""),n.toRootClientId&&e.push(n.toRootClientId),o.tree=new Map(o.tree),ee(o,e,!0);break}case"MOVE_BLOCKS_UP":case"MOVE_BLOCKS_DOWN":{const e=[n.rootClientId?n.rootClientId:""];o.tree=new Map(o.tree),ee(o,e,!0);break}case"SAVE_REUSABLE_BLOCK_SUCCESS":{const e=[];o.attributes.forEach(((t,r)=>{"core/block"===o.byClientId.get(r).name&&t.ref===n.updatedId&&e.push(r)})),o.tree=new Map(o.tree),e.forEach((e=>{o.tree.set(e,{...o.byClientId.get(e),attributes:o.attributes.get(e),innerBlocks:o.tree.get(e).innerBlocks})})),ee(o,e,!1)}}return o}),(e=>(t,n)=>{const o=e=>{let o=e;for(let r=0;r<o.length;r++)!t.order.get(o[r])||n.keepControlledInnerBlocks&&n.keepControlledInnerBlocks[o[r]]||(o===e&&(o=[...o]),o.push(...t.order.get(o[r])));return o};if(t)switch(n.type){case"REMOVE_BLOCKS":n={...n,type:"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN",removedClientIds:o(n.clientIds)};break;case"REPLACE_BLOCKS":n={...n,type:"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN",replacedClientIds:o(n.clientIds)}}return e(t,n)}),(e=>(t,n)=>{if("REPLACE_INNER_BLOCKS"!==n.type)return e(t,n);const o={};if(Object.keys(t.controlledInnerBlocks).length){const e=[...n.blocks];for(;e.length;){const{innerBlocks:n,...r}=e.shift();e.push(...n),t.controlledInnerBlocks[r.clientId]&&(o[r.clientId]=!0)}}let r=t;t.order.get(n.rootClientId)&&(r=e(r,{type:"REMOVE_BLOCKS",keepControlledInnerBlocks:o,clientIds:t.order.get(n.rootClientId)}));let i=r;if(n.blocks.length){i=e(i,{...n,type:"INSERT_BLOCKS",index:0});const r=new Map(i.order);Object.keys(o).forEach((e=>{t.order.get(e)&&r.set(e,t.order.get(e))})),i.order=r,i.tree=new Map(i.tree),Object.keys(o).forEach((e=>{const n=`controlled||${e}`;t.tree.has(n)&&i.tree.set(n,t.tree.get(n))}))}return i}),(e=>(t,n)=>{if("RESET_BLOCKS"===n.type){const e={...t,byClientId:new Map(Y(n.blocks)),attributes:new Map(X(n.blocks)),order:K(n.blocks),parents:new Map(Z(n.blocks)),controlledInnerBlocks:{}};return e.tree=new Map(t?.tree),J(e,n.blocks),e.tree.set("",{innerBlocks:n.blocks.map((t=>e.tree.get(t.clientId)))}),e}return e(t,n)}),(function(e){let t,n,o=!1;return(r,i)=>{let s,l=e(r,i);if("SET_EXPLICIT_PERSISTENT"===i.type&&(n=i.isPersistentChange,s=r.isPersistentChange??!0),void 0!==n)return s=n,s===l.isPersistentChange?l:{...l,isPersistentChange:s};const a="MARK_LAST_CHANGE_AS_PERSISTENT"===i.type||o;return r!==l||a?(l={...l,isPersistentChange:a?!o:!Q(i,t)},t=i,o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,l):(o="MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"===i.type,s=r?.isPersistentChange??!0,r.isPersistentChange===s?r:{...l,isPersistentChange:s})}}),(function(e){const t=new Set(["RECEIVE_BLOCKS"]);return(n,o)=>{const r=e(n,o);return r!==n&&(r.isIgnoredChange=t.has(o.type)),r}}),(e=>(t,n)=>{if("SET_HAS_CONTROLLED_INNER_BLOCKS"===n.type){const o=e(t,{type:"REPLACE_INNER_BLOCKS",rootClientId:n.clientId,blocks:[]});return e(o,n)}return e(t,n)}))({byClientId(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return Y(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.has(t.clientId))return e;const{attributes:n,...o}=t.updates;if(0===Object.values(o).length)return e;const r=new Map(e);return r.set(t.clientId,{...e.get(t.clientId),...o}),r}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),Y(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},attributes(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const n=new Map(e);return X(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"UPDATE_BLOCK":{if(!e.get(t.clientId)||!t.updates.attributes)return e;const n=new Map(e);return n.set(t.clientId,{...e.get(t.clientId),...t.updates.attributes}),n}case"SYNC_DERIVED_BLOCK_ATTRIBUTES":case"UPDATE_BLOCK_ATTRIBUTES":{if(t.clientIds.every((t=>!e.get(t))))return e;let n=!1;const o=new Map(e);for(const r of t.clientIds){const i=Object.entries(t.options?.uniqueByBlock?t.attributes[r]:t.attributes??{});if(0===i.length)continue;let s=!1;const l=e.get(r),a={};i.forEach((([e,t])=>{l[e]!==t&&(s=!0,a[e]=t)})),n=n||s,s&&o.set(r,{...l,...a})}return n?o:e}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{if(!t.blocks)return e;const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),X(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},order(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=K(t.blocks),o=new Map(e);return n.forEach(((e,t)=>{""!==t&&o.set(t,e)})),o.set("",(e.get("")??[]).concat(n[""])),o}case"INSERT_BLOCKS":{const{rootClientId:n=""}=t,o=e.get(n)||[],r=K(t.blocks,n),{index:i=o.length}=t,s=new Map(e);return r.forEach(((e,t)=>{s.set(t,e)})),s.set(n,R(o,r.get(n),i)),s}case"MOVE_BLOCKS_TO_POSITION":{const{fromRootClientId:n="",toRootClientId:o="",clientIds:r}=t,{index:i=e.get(o).length}=t;if(n===o){const t=e.get(o).indexOf(r[0]),n=new Map(e);return n.set(o,A(e.get(o),t,i,r.length)),n}const s=new Map(e);return s.set(n,e.get(n)?.filter((e=>!r.includes(e)))??[]),s.set(o,R(e.get(o),r,i)),s}case"MOVE_BLOCKS_UP":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=e.get(o);if(!i.length||r===i[0])return e;const s=i.indexOf(r),l=new Map(e);return l.set(o,A(i,s,s-1,n.length)),l}case"MOVE_BLOCKS_DOWN":{const{clientIds:n,rootClientId:o=""}=t,r=n[0],i=n[n.length-1],s=e.get(o);if(!s.length||i===s[s.length-1])return e;const l=s.indexOf(r),a=new Map(e);return a.set(o,A(s,l,l+1,n.length)),a}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const{clientIds:n}=t;if(!t.blocks)return e;const o=K(t.blocks),r=new Map(e);return t.replacedClientIds.forEach((e=>{r.delete(e)})),o.forEach(((e,t)=>{""!==t&&r.set(t,e)})),r.forEach(((e,t)=>{const i=Object.values(e).reduce(((e,t)=>t===n[0]?[...e,...o.get("")]:(-1===n.indexOf(t)&&e.push(t),e)),[]);r.set(t,i)})),r}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n.forEach(((e,o)=>{const r=e?.filter((e=>!t.removedClientIds.includes(e)))??[];r.length!==e.length&&n.set(o,r)})),n}}return e},parents(e=new Map,t){switch(t.type){case"RECEIVE_BLOCKS":{const n=new Map(e);return Z(t.blocks).forEach((([e,t])=>{n.set(e,t)})),n}case"INSERT_BLOCKS":{const n=new Map(e);return Z(t.blocks,t.rootClientId||"").forEach((([e,t])=>{n.set(e,t)})),n}case"MOVE_BLOCKS_TO_POSITION":{const n=new Map(e);return t.clientIds.forEach((e=>{n.set(e,t.toRootClientId||"")})),n}case"REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.replacedClientIds.forEach((e=>{n.delete(e)})),Z(t.blocks,e.get(t.clientIds[0])).forEach((([e,t])=>{n.set(e,t)})),n}case"REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN":{const n=new Map(e);return t.removedClientIds.forEach((e=>{n.delete(e)})),n}}return e},controlledInnerBlocks:(e={},{type:t,clientId:n,hasControlledInnerBlocks:o})=>"SET_HAS_CONTROLLED_INNER_BLOCKS"===t?{...e,[n]:o}:e});function ne(e={},t){switch(t.type){case"CLEAR_SELECTED_BLOCK":return e.clientId?{}:e;case"SELECT_BLOCK":return t.clientId===e.clientId?e:{clientId:t.clientId};case"REPLACE_INNER_BLOCKS":case"INSERT_BLOCKS":return t.updateSelection&&t.blocks.length?{clientId:t.blocks[0].clientId}:e;case"REMOVE_BLOCKS":return t.clientIds&&t.clientIds.length&&-1!==t.clientIds.indexOf(e.clientId)?{}:e;case"REPLACE_BLOCKS":{if(-1===t.clientIds.indexOf(e.clientId))return e;const n=t.blocks[t.indexToSelect]||t.blocks[t.blocks.length-1];return n?n.clientId===e.clientId?e:{clientId:n.clientId}:{}}}return e}const oe=(0,g.combineReducers)({blocks:te,isDragging:function(e=!1,t){switch(t.type){case"START_DRAGGING":return!0;case"STOP_DRAGGING":return!1}return e},isTyping:function(e=!1,t){switch(t.type){case"START_TYPING":return!0;case"STOP_TYPING":return!1}return e},isBlockInterfaceHidden:function(e=!1,t){switch(t.type){case"HIDE_BLOCK_INTERFACE":return!0;case"SHOW_BLOCK_INTERFACE":return!1}return e},draggedBlocks:function(e=[],t){switch(t.type){case"START_DRAGGING_BLOCKS":return t.clientIds;case"STOP_DRAGGING_BLOCKS":return[]}return e},selection:function(e={},t){switch(t.type){case"SELECTION_CHANGE":return t.clientId?{selectionStart:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.startOffset},selectionEnd:{clientId:t.clientId,attributeKey:t.attributeKey,offset:t.endOffset}}:{selectionStart:t.start||e.selectionStart,selectionEnd:t.end||e.selectionEnd};case"RESET_SELECTION":const{selectionStart:n,selectionEnd:o}=t;return{selectionStart:n,selectionEnd:o};case"MULTI_SELECT":const{start:r,end:i}=t;return r===e.selectionStart?.clientId&&i===e.selectionEnd?.clientId?e:{selectionStart:{clientId:r},selectionEnd:{clientId:i}};case"RESET_BLOCKS":const s=e?.selectionStart?.clientId,l=e?.selectionEnd?.clientId;if(!s&&!l)return e;if(!t.blocks.some((e=>e.clientId===s)))return{selectionStart:{},selectionEnd:{}};if(!t.blocks.some((e=>e.clientId===l)))return{...e,selectionEnd:e.selectionStart}}const n=ne(e.selectionStart,t),o=ne(e.selectionEnd,t);return n===e.selectionStart&&o===e.selectionEnd?e:{selectionStart:n,selectionEnd:o}},isMultiSelecting:function(e=!1,t){switch(t.type){case"START_MULTI_SELECT":return!0;case"STOP_MULTI_SELECT":return!1}return e},isSelectionEnabled:function(e=!0,t){return"TOGGLE_SELECTION"===t.type?t.isSelectionEnabled:e},initialPosition:function(e=null,t){return"REPLACE_BLOCKS"===t.type&&void 0!==t.initialPosition||["MULTI_SELECT","SELECT_BLOCK","RESET_SELECTION","INSERT_BLOCKS","REPLACE_INNER_BLOCKS"].includes(t.type)?t.initialPosition:e},blocksMode:function(e={},t){if("TOGGLE_BLOCK_MODE"===t.type){const{clientId:n}=t;return{...e,[n]:e[n]&&"html"===e[n]?"visual":"html"}}return e},blockListSettings:(e={},t)=>{switch(t.type){case"REPLACE_BLOCKS":case"REMOVE_BLOCKS":return Object.fromEntries(Object.entries(e).filter((([e])=>!t.clientIds.includes(e))));case"UPDATE_BLOCK_LIST_SETTINGS":{const n="string"==typeof t.clientId?{[t.clientId]:t.settings}:t.clientId;for(const t in n)n[t]?E()(e[t],n[t])&&delete n[t]:e[t]||delete n[t];if(0===Object.keys(n).length)return e;const o={...e,...n};for(const e in n)n[e]||delete o[e];return o}}return e},insertionPoint:function(e=null,t){switch(t.type){case"SET_INSERTION_POINT":return t.value;case"SELECT_BLOCK":return null}return e},insertionCue:function(e=null,t){switch(t.type){case"SHOW_INSERTION_POINT":{const{rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s}=t,l={rootClientId:n,index:o,__unstableWithInserter:r,operation:i,nearestSide:s};return E()(e,l)?e:l}case"HIDE_INSERTION_POINT":return null}return e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},settings:function(e=P,t){if("UPDATE_SETTINGS"===t.type){const n=t.reset?{...P,...t.settings}:{...e,...t.settings};return Object.defineProperty(n,"__unstableIsPreviewMode",{get(){return I()("__unstableIsPreviewMode",{since:"6.8",alternative:"isPreviewMode"}),this.isPreviewMode}}),n}return e},preferences:function(e=M,t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":{const n=t.blocks.reduce(((e,n)=>{const{attributes:o,name:r}=n;let i=r;const s=(0,g.select)(p.store).getActiveBlockVariation(r,o);return s?.name&&(i+="/"+s.name),"core/block"===r&&(i+="/"+o.ref),{...e,[i]:{time:t.time,count:e[i]?e[i].count+1:1}}}),e.insertUsage);return{...e,insertUsage:n}}}return e},lastBlockAttributesChange:function(e=null,t){switch(t.type){case"UPDATE_BLOCK":if(!t.updates.attributes)break;return{[t.clientId]:t.updates.attributes};case"UPDATE_BLOCK_ATTRIBUTES":return t.clientIds.reduce(((e,n)=>({...e,[n]:t.options?.uniqueByBlock?t.attributes[n]:t.attributes})),{})}return e},lastFocus:function(e=!1,t){return"LAST_FOCUS"===t.type?t.lastFocus:e},expandedBlock:function(e=null,t){switch(t.type){case"SET_BLOCK_EXPANDED_IN_LIST_VIEW":return t.clientId;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},highlightedBlock:function(e,t){switch(t.type){case"TOGGLE_BLOCK_HIGHLIGHT":const{clientId:n,isHighlighted:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":if(t.clientId!==e)return null}return e},lastBlockInserted:function(e={},t){switch(t.type){case"INSERT_BLOCKS":case"REPLACE_BLOCKS":if(!t.blocks.length)return e;const n=t.blocks.map((e=>e.clientId)),o=t.meta?.source;return{clientIds:n,source:o};case"RESET_BLOCKS":return{}}return e},temporarilyEditingAsBlocks:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.temporarilyEditingAsBlocks:e},temporarilyEditingFocusModeRevert:function(e="",t){return"SET_TEMPORARILY_EDITING_AS_BLOCKS"===t.type?t.focusModeToRevert:e},blockVisibility:function(e={},t){return"SET_BLOCK_VISIBILITY"===t.type?{...e,...t.updates}:e},blockEditingModes:function(e=new Map,t){switch(t.type){case"SET_BLOCK_EDITING_MODE":return e.get(t.clientId)===t.mode?e:new Map(e).set(t.clientId,t.mode);case"UNSET_BLOCK_EDITING_MODE":{if(!e.has(t.clientId))return e;const n=new Map(e);return n.delete(t.clientId),n}case"RESET_BLOCKS":return e.has("")?(new Map).set("",e.get("")):e}return e},styleOverrides:function(e=new Map,t){switch(t.type){case"SET_STYLE_OVERRIDE":return new Map(e).set(t.id,t.style);case"DELETE_STYLE_OVERRIDE":{const n=new Map(e);return n.delete(t.id),n}}return e},removalPromptData:function(e=!1,t){switch(t.type){case"DISPLAY_BLOCK_REMOVAL_PROMPT":const{clientIds:e,selectPrevious:n,message:o}=t;return{clientIds:e,selectPrevious:n,message:o};case"CLEAR_BLOCK_REMOVAL_PROMPT":return!1}return e},blockRemovalRules:function(e=!1,t){return"SET_BLOCK_REMOVAL_RULES"===t.type?t.rules:e},openedBlockSettingsMenu:function(e=null,t){return"SET_OPENED_BLOCK_SETTINGS_MENU"===t.type?t?.clientId??null:e},registeredInserterMediaCategories:function(e=[],t){return"REGISTER_INSERTER_MEDIA_CATEGORY"===t.type?[...e,t.category]:e},zoomLevel:function(e=100,t){switch(t.type){case"SET_ZOOM_LEVEL":return t.zoom;case"RESET_ZOOM_LEVEL":return 100}return e},hasBlockSpotlight:function(e,t){switch(t.type){case"TOGGLE_BLOCK_SPOTLIGHT":const{clientId:n,hasBlockSpotlight:o}=t;return o?n:e===n?null:e;case"SELECT_BLOCK":return t.clientId!==e?null:e;case"SELECTION_CHANGE":return t.start?.clientId!==e||t.end?.clientId!==e?null:e;case"CLEAR_SELECTED_BLOCK":return null}return e}});function re(e,t){if(""===t){const n=e.blocks.tree.get(t);if(!n)return;return{clientId:"",...n}}if(!e.blocks.controlledInnerBlocks[t])return e.blocks.tree.get(t);const n=e.blocks.tree.get(`controlled||${t}`);return{...e.blocks.tree.get(t),innerBlocks:n?.innerBlocks}}function ie(e,t,n){const o=re(e,t);if(o&&(n(o),o?.innerBlocks?.length))for(const t of o?.innerBlocks)ie(e,t.clientId,n)}function se(e,t,n){if(!n.length)return;let o=e.blocks.parents.get(t);for(;void 0!==o;){if(n.includes(o))return o;o=e.blocks.parents.get(o)}}function le(e,t=""){const n=e?.zoomLevel<100||"auto-scaled"===e?.zoomLevel,o=new Map,r=e.settings?.[z],i=e.blocks.order.get(r),s=Array.from(e.blockEditingModes).some((([,e])=>"disabled"===e)),l=[],a=[];Object.keys(e.blocks.controlledInnerBlocks).forEach((t=>{const n=e.blocks.byClientId?.get(t);"core/template-part"===n?.name&&l.push(t),"core/block"===n?.name&&a.push(t)}));const c=[...Object.keys(e.blockListSettings).filter((t=>"contentOnly"===e.blockListSettings[t]?.templateLock)),...window?.__experimentalContentOnlyPatternInsertion?Array.from(e.blocks.attributes.keys()).filter((t=>e.blocks.attributes.get(t)?.metadata?.patternName)):[],...window?.__experimentalContentOnlyPatternInsertion?l:[]];return ie(e,t,(t=>{const{clientId:l,name:u}=t;if(!e.blockEditingModes.has(l)){if(s){let t,n=e.blocks.parents.get(l);for(;void 0!==n&&(e.blockEditingModes.has(n)&&(t=e.blockEditingModes.get(n)),!t);)n=e.blocks.parents.get(n);if("disabled"===t)return void o.set(l,"disabled")}if(n)return l===r||i?.length&&i.includes(l)?void o.set(l,"contentOnly"):void o.set(l,"disabled");if(a.length){if(a.includes(l))return se(e,l,a)?void o.set(l,"disabled"):void 0;const n=se(e,l,a);if(n){if(se(e,n,a))return void o.set(l,"disabled");if(function(e){return e?.attributes?.metadata?.bindings&&Object.keys(e?.attributes?.metadata?.bindings).length}(t))return void o.set(l,"contentOnly");o.set(l,"disabled")}}if(c.length){!!se(e,l,c)&&($(u)?o.set(l,"contentOnly"):o.set(l,"disabled"))}}})),o}function ae({prevState:e,nextState:t,addedBlocks:n,removedClientIds:o}){const r=e.derivedBlockEditingModes;let i;return o?.forEach((t=>{ie(e,t,(e=>{r.has(e.clientId)&&(i||(i=new Map(r)),i.delete(e.clientId))}))})),n?.forEach((e=>{const n=le(t,e.clientId);n.size&&(i=i?new Map([...i?.size?i:[],...n]):new Map([...r?.size?r:[],...n]))})),i}var ce=(0,m.pipe)((function(e){return(t,n)=>{const o=e(t,n);if("SET_EDITOR_MODE"!==n.type&&o===t)return t;switch(n.type){case"REMOVE_BLOCKS":{const e=ae({prevState:t,nextState:o,removedClientIds:n.clientIds});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"RECEIVE_BLOCKS":case"INSERT_BLOCKS":{const e=ae({prevState:t,nextState:o,addedBlocks:n.blocks});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_ATTRIBUTES":{const e=[],r=[];for(const i of n?.clientIds){const s=n.options?.uniqueByBlock?n.attributes[i]:n.attributes;if(!s)break;s.metadata?.patternName&&!t.blocks.attributes.get(i)?.metadata?.patternName?e.push(o.blocks.tree.get(i)):s.metadata&&!s.metadata?.patternName&&t.blocks.attributes.get(i)?.metadata?.patternName&&r.push(i)}if(!e?.length&&!r?.length)break;const i=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:r});if(i)return{...o,derivedBlockEditingModes:i??t.derivedBlockEditingModes};break}case"UPDATE_BLOCK_LIST_SETTINGS":{const e=[],r=[],i="string"==typeof n.clientId?{[n.clientId]:n.settings}:n.clientId;for(const n in i){const i="contentOnly"!==t.blockListSettings[n]?.templateLock&&"contentOnly"===o.blockListSettings[n]?.templateLock,s="contentOnly"===t.blockListSettings[n]?.templateLock&&"contentOnly"!==o.blockListSettings[n]?.templateLock;i?e.push(o.blocks.tree.get(n)):s&&r.push(n)}if(!e.length&&!r.length)break;const s=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:r});if(s)return{...o,derivedBlockEditingModes:s??t.derivedBlockEditingModes};break}case"SET_BLOCK_EDITING_MODE":case"UNSET_BLOCK_EDITING_MODE":case"SET_HAS_CONTROLLED_INNER_BLOCKS":{const e=re(o,n.clientId);if(!e)break;const r=ae({prevState:t,nextState:o,removedClientIds:[n.clientId],addedBlocks:[e]});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"REPLACE_BLOCKS":{const e=ae({prevState:t,nextState:o,addedBlocks:n.blocks,removedClientIds:n.clientIds});if(e)return{...o,derivedBlockEditingModes:e??t.derivedBlockEditingModes};break}case"REPLACE_INNER_BLOCKS":{const e=t.blocks.order.get(n.rootClientId),r=ae({prevState:t,nextState:o,addedBlocks:n.blocks,removedClientIds:e});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"MOVE_BLOCKS_TO_POSITION":{const e=n.clientIds.map((e=>o.blocks.byClientId.get(e))),r=ae({prevState:t,nextState:o,addedBlocks:e,removedClientIds:n.clientIds});if(r)return{...o,derivedBlockEditingModes:r??t.derivedBlockEditingModes};break}case"UPDATE_SETTINGS":if(t?.settings?.[z]!==o?.settings?.[z])return{...o,derivedBlockEditingModes:le(o)};break;case"RESET_BLOCKS":case"SET_EDITOR_MODE":case"RESET_ZOOM_LEVEL":case"SET_ZOOM_LEVEL":return{...o,derivedBlockEditingModes:le(o)}}return o.derivedBlockEditingModes=t?.derivedBlockEditingModes??new Map,o}}),(function(e){return(t,n)=>{const o=e(t,n);return t?(o.automaticChangeStatus=t.automaticChangeStatus,"MARK_AUTOMATIC_CHANGE"===n.type?{...o,automaticChangeStatus:"pending"}:"MARK_AUTOMATIC_CHANGE_FINAL"===n.type&&"pending"===t.automaticChangeStatus?{...o,automaticChangeStatus:"final"}:o.blocks===t.blocks&&o.selection===t.selection||"final"!==o.automaticChangeStatus&&o.selection!==t.selection?o:{...o,automaticChangeStatus:void 0}):o}}))(oe);const ue=window.wp.primitives;var de=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const pe=window.wp.richText,he=window.wp.blockSerializationDefaultParser,ge="core/block-editor";function me(e,t,n){t=Array.isArray(t)?[...t]:[t],e=Array.isArray(e)?[...e]:{...e};const o=t.pop();let r=e;for(const e of t){const t=r[e];r=r[e]=Array.isArray(t)?[...t]:{...t}}return r[o]=n,e}const fe=(e,t,n)=>{const o=Array.isArray(t)?t:t.split(".");let r=e;return o.forEach((e=>{r=r?.[e]})),r??n};const be=["color","border","dimensions","typography","spacing"],ke={"color.palette":e=>e.colors,"color.gradients":e=>e.gradients,"color.custom":e=>void 0===e.disableCustomColors?void 0:!e.disableCustomColors,"color.customGradient":e=>void 0===e.disableCustomGradients?void 0:!e.disableCustomGradients,"typography.fontSizes":e=>e.fontSizes,"typography.customFontSize":e=>void 0===e.disableCustomFontSizes?void 0:!e.disableCustomFontSizes,"typography.lineHeight":e=>e.enableCustomLineHeight,"spacing.units":e=>{if(void 0!==e.enableCustomUnits)return!0===e.enableCustomUnits?["px","em","rem","vh","vw","%"]:e.enableCustomUnits},"spacing.padding":e=>e.enableCustomSpacing},ve={"border.customColor":"border.color","border.customStyle":"border.style","border.customWidth":"border.width","typography.customFontStyle":"typography.fontStyle","typography.customFontWeight":"typography.fontWeight","typography.customLetterSpacing":"typography.letterSpacing","typography.customTextDecorations":"typography.textDecoration","typography.customTextTransforms":"typography.textTransform","border.customRadius":"border.radius","spacing.customMargin":"spacing.margin","spacing.customPadding":"spacing.padding","typography.customLineHeight":"typography.lineHeight"},_e=e=>ve[e]||e;function ye(e,t,...n){const o=It(e,t),r=[];if(t){let n=t;do{const t=It(e,n);(0,p.hasBlockSupport)(t,"__experimentalSettings",!1)&&r.push(n)}while(n=e.blocks.parents.get(n))}return n.map((n=>{if(be.includes(n))return void console.warn("Top level useSetting paths are disabled. Please use a subpath to query the information needed.");let i=(0,f.applyFilters)("blockEditor.useSetting.before",void 0,n,t,o);if(void 0!==i)return i;const s=_e(n);for(const t of r){const n=Et(e,t);if(i=fe(n.settings?.blocks?.[o],s)??fe(n.settings,s),void 0!==i)break}const l=_o(e);if(void 0===i&&o&&(i=fe(l.__experimentalFeatures?.blocks?.[o],s)),void 0===i&&(i=fe(l.__experimentalFeatures,s)),void 0!==i)return p.__EXPERIMENTAL_PATHS_WITH_OVERRIDE[s]?i.custom??i.theme??i.default:i;const a=ke[s]?.(l);return void 0!==a?a:"typography.dropCap"===s||void 0}))}const{isContentBlock:xe}=G(p.privateApis);function Se(e){return e.isBlockInterfaceHidden}function we(e){return e?.lastBlockInserted?.clientIds}function Ce(e,t){return e.blocks.byClientId.get(t)}const Be=(e,t)=>{const n=t=>"disabled"===Do(e,t)&&xn(e,t).every(n);return xn(e,t).every(n)};function Ie(e,t,n){const o=xe(t),r=It(e,n),i=xe(r);return Xe(e)===n||i&&o}function je(e,t){const n=xn(e,t),o=[];for(const t of n){const n=je(e,t);"disabled"!==Do(e,t)?o.push({clientId:t,innerBlocks:n}):o.push(...n)}return o}const Ee=(0,g.createRegistrySelector)((()=>(0,g.createSelector)(je,(e=>[e.blocks.order,e.derivedBlockEditingModes,e.blockEditingModes])))),Te=(0,g.createSelector)(((e,t,n=!1)=>Qt(e,t,n).filter((t=>"disabled"!==Do(e,t)))),(e=>[e.blocks.parents,e.blockEditingModes,e.settings.templateLock,e.blockListSettings]));function Me(e){return e.removalPromptData}function Pe(e){return e.blockRemovalRules}function Re(e){return e.openedBlockSettingsMenu}const Ae=(0,g.createSelector)((e=>{const t=Lt(e).reduce(((e,t,n)=>(e[t]=n,e)),{});return[...e.styleOverrides].sort(((e,n)=>{const[,{clientId:o}]=e,[,{clientId:r}]=n;return(t[o]??-1)-(t[r]??-1)}))}),(e=>[e.blocks.order,e.styleOverrides]));function Ne(e){return e.registeredInserterMediaCategories}const Le=(0,g.createSelector)((e=>{const{settings:{inserterMediaCategories:t,allowedMimeTypes:n,enableOpenverseMediaCategory:o},registeredInserterMediaCategories:r}=e;if(!t&&!r.length||!n)return;const i=t?.map((({name:e})=>e))||[];return[...t||[],...(r||[]).filter((({name:e})=>!i.includes(e)))].filter((e=>!(!o&&"openverse"===e.name)&&Object.values(n).some((t=>t.startsWith(`${e.mediaType}/`)))))}),(e=>[e.settings.inserterMediaCategories,e.settings.allowedMimeTypes,e.settings.enableOpenverseMediaCategory,e.registeredInserterMediaCategories])),De=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null)=>{const{getAllPatterns:o}=G(e(ge)),r=o(),{allowedBlockTypes:i}=_o(t);return r.some((e=>{const{inserter:o=!0}=e;if(!o)return!1;const r=bt(e);return vt(r,i)&&r.every((({name:e})=>$n(t,e,n)))}))}),((t,n)=>[..._t(e)(t),...yt(e)(t,n)])))),Oe=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n)=>{if(n?.startsWith("core/block/")){const o=parseInt(n.slice(11),10),r=G(e(ge)).getReusableBlocks().find((({id:e})=>e===o));return r?mt(r,t.settings.__experimentalUserPatternCategories):null}return[...t.settings.__experimentalBlockPatterns??[],...t.settings[D]?.(e)??[]].find((({name:e})=>e===n))}),((t,n)=>n?.startsWith("core/block/")?[G(e(ge)).getReusableBlocks(),t.settings.__experimentalReusableBlocks]:[t.settings.__experimentalBlockPatterns,t.settings[D]?.(e)])))),ze=(0,g.createRegistrySelector)((e=>(0,g.createSelector)((t=>[...G(e(ge)).getReusableBlocks().map((e=>mt(e,t.settings.__experimentalUserPatternCategories))),...t.settings.__experimentalBlockPatterns??[],...t.settings[D]?.(e)??[]].filter(((e,t,n)=>t===n.findIndex((t=>e.name===t.name))))),_t(e)))),Ve=[],Fe=(0,g.createRegistrySelector)((e=>t=>{const n=t.settings[O];return(n?n(e):t.settings.__experimentalReusableBlocks)??Ve}));function He(e){return e.lastFocus}function Ue(e){return e.isDragging}function Ge(e){return e.expandedBlock}const $e=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)"contentOnly"===Hn(e,o)&&(n=o);return n},We=(e,t)=>{let n,o=t;for(;!n&&(o=e.blocks.parents.get(o));)Ke(e,o)&&(n=o);return n};function Ke(e,t){const n=It(e,t);if("core/block"===n||"contentOnly"===Hn(e,t))return!0;const o=Et(e,t),r="core/template-part"===n;return!(!o?.metadata?.patternName&&!r||!window?.__experimentalContentOnlyPatternInsertion)}function Ze(e){return e.temporarilyEditingAsBlocks}function qe(e){return e.temporarilyEditingFocusModeRevert}const Ye=(0,g.createSelector)(((e,t)=>t.reduce(((t,n)=>(t[n]=e.blocks.attributes.get(n)?.style,t)),{})),((e,t)=>[...t.map((t=>e.blocks.attributes.get(t)?.style))]));function Xe(e){return e.settings?.[z]}function Qe(e){return"auto-scaled"===e.zoomLevel||e.zoomLevel<100}function Je(e){return e.zoomLevel}function et(e,t,n=""){const o=Array.isArray(t)?t:[t],r=t=>o.every((n=>$n(e,n,t)));if(!n){if(r(n))return n;const t=Xe(e);return t&&r(t)?t:null}let i=n;for(;null!==i&&!r(i);){i=Xt(e,i)}return i}function tt(e,t,n){const{allowedBlockTypes:o}=_o(e);if(!vt(bt(t),o))return null;return et(e,bt(t).map((({blockName:e})=>e)),n)}function nt(e){return e.insertionPoint}const ot=(e,t)=>{const n=It(e,t);if(!(0,p.hasBlockSupport)(e,n,"blockVisibility",!0))return!1;const o=e.blocks.attributes.get(t);return!1===o?.metadata?.blockVisibility};function rt(e){return!!e.hasBlockSpotlight}const it={user:"user",theme:"theme",directory:"directory"},st="fully",lt="unsynced",at={name:"allPatterns",label:(0,T._x)("All","patterns")},ct={name:"myPatterns",label:(0,T.__)("My patterns")},ut={name:"core/starter-content",label:(0,T.__)("Starter content")};function dt(e,t,n){const o=e.name.startsWith("core/block"),r="core"===e.source||e.source?.startsWith("pattern-directory");return!(t!==it.theme||!o&&!r)||(!(t!==it.directory||!o&&r)||(t===it.user&&e.type!==it.user||(n===st&&""!==e.syncStatus||!(n!==lt||"unsynced"===e.syncStatus||!o))))}const pt=Symbol("isFiltered"),ht=new WeakMap,gt=new WeakMap;function mt(e,t=[]){return{name:`core/block/${e.id}`,id:e.id,type:it.user,title:e.title?.raw,categories:e.wp_pattern_category?.map((e=>{const n=t.find((({id:t})=>t===e));return n?n.slug:e})),content:e.content?.raw,syncStatus:e.wp_pattern_sync_status}}function ft(e){let t=ht.get(e);return t||(t=function(e){const t=(0,p.parse)(e.content,{__unstableSkipMigrationLogs:!0});return 1===t.length&&(t[0].attributes={...t[0].attributes,metadata:{...t[0].attributes.metadata||{},categories:e.categories,patternName:e.name,name:t[0].attributes.metadata?.name||e.title}}),{...e,blocks:t}}(e),ht.set(e,t)),t}function bt(e){let t=gt.get(e);return t||(t=(0,he.parse)(e.content),t=t.filter((e=>null!==e.blockName)),gt.set(e,t)),t}const kt=(e,t,n=null)=>"boolean"==typeof e?e:Array.isArray(e)?!(!e.includes("core/post-content")||null!==t)||e.includes(t):n,vt=(e,t)=>{if("boolean"==typeof t)return t;const n=[...e];for(;n.length>0;){const e=n.shift();if(!kt(t,e.name||e.blockName,!0))return!1;e.innerBlocks?.forEach((e=>{n.push(e)}))}return!0},_t=e=>t=>[t.settings.__experimentalBlockPatterns,t.settings.__experimentalUserPatternCategories,t.settings.__experimentalReusableBlocks,t.settings[D]?.(e),t.blockPatterns,G(e(ge)).getReusableBlocks()],yt=()=>(e,t)=>[e.blockListSettings[t],e.blocks.byClientId.get(t),e.settings.allowedBlockTypes,e.settings.templateLock,Do(e,t),Xe(e),Ke(e,t)];function xt(e,t,n="asc"){return e.concat().sort(((e,t,n)=>(o,r)=>{let i,s;if("function"==typeof e?(i=e(o),s=e(r)):(i=o[e],s=r[e]),i>s)return"asc"===n?1:-1;if(s>i)return"asc"===n?-1:1;const l=t.findIndex((e=>e===o)),a=t.findIndex((e=>e===r));return l>a?1:a>l?-1:0})(t,e,n))}const{isContentBlock:St}=G(p.privateApis),wt=[],Ct=new Set,Bt={[pt]:!0};function It(e,t){const n=e.blocks.byClientId.get(t),o="core/social-link";if("web"!==h.Platform.OS&&n?.name===o){const n=e.blocks.attributes.get(t),{service:r}=n??{};return r?`${o}-${r}`:o}return n?n.name:null}function jt(e,t){const n=e.blocks.byClientId.get(t);return!!n&&n.isValid}function Et(e,t){return e.blocks.byClientId.get(t)?e.blocks.attributes.get(t):null}function Tt(e,t){return e.blocks.byClientId.has(t)?e.blocks.tree.get(t):null}const Mt=(0,g.createSelector)(((e,t)=>{const n=e.blocks.byClientId.get(t);return n?{...n,attributes:Et(e,t)}:null}),((e,t)=>[e.blocks.byClientId.get(t),e.blocks.attributes.get(t)]));function Pt(e,t){const n=t&&Eo(e,t)?"controlled||"+t:t||"";return e.blocks.tree.get(n)?.innerBlocks||wt}const Rt=(0,g.createSelector)(((e,t)=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdWithClientIdsTree",{since:"6.3",version:"6.5"}),{clientId:t,innerBlocks:At(e,t)})),(e=>[e.blocks.order])),At=(0,g.createSelector)(((e,t="")=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetClientIdsTree",{since:"6.3",version:"6.5"}),xn(e,t).map((t=>Rt(e,t))))),(e=>[e.blocks.order])),Nt=(0,g.createSelector)(((e,t)=>{t=Array.isArray(t)?[...t]:[t];const n=[];for(const o of t){const t=e.blocks.order.get(o);t&&n.push(...t)}let o=0;for(;o<n.length;){const t=n[o],r=e.blocks.order.get(t);r&&n.splice(o+1,0,...r),o++}return n}),(e=>[e.blocks.order])),Lt=e=>Nt(e,""),Dt=(0,g.createSelector)(((e,t)=>{const n=Lt(e);if(!t)return n.length;let o=0;for(const r of n){e.blocks.byClientId.get(r).name===t&&o++}return o}),(e=>[e.blocks.order,e.blocks.byClientId])),Ot=(0,g.createSelector)(((e,t)=>{if(!t)return wt;const n=Array.isArray(t)?t:[t],o=Lt(e).filter((t=>{const o=e.blocks.byClientId.get(t);return n.includes(o.name)}));return o.length>0?o:wt}),(e=>[e.blocks.order,e.blocks.byClientId]));function zt(e,t){return I()("wp.data.select( 'core/block-editor' ).__experimentalGetGlobalBlocksByName",{since:"6.5",alternative:"wp.data.select( 'core/block-editor' ).getBlocksByName"}),Ot(e,t)}const Vt=(0,g.createSelector)(((e,t)=>(Array.isArray(t)?t:[t]).map((t=>Tt(e,t)))),((e,t)=>(Array.isArray(t)?t:[t]).map((t=>e.blocks.tree.get(t))))),Ft=(0,g.createSelector)(((e,t)=>Vt(e,t).filter(Boolean).map((e=>e.name))),((e,t)=>Vt(e,t)));function Ht(e,t){return xn(e,t).length}function Ut(e){return e.selection.selectionStart}function Gt(e){return e.selection.selectionEnd}function $t(e){return e.selection.selectionStart.clientId}function Wt(e){return e.selection.selectionEnd.clientId}function Kt(e){const t=an(e).length;return t||(e.selection.selectionStart.clientId?1:0)}function Zt(e){const{selectionStart:t,selectionEnd:n}=e.selection;return!!t.clientId&&t.clientId===n.clientId}function qt(e){const{selectionStart:t,selectionEnd:n}=e.selection,{clientId:o}=t;return o&&o===n.clientId?o:null}function Yt(e){const t=qt(e);return t?Tt(e,t):null}function Xt(e,t){return e.blocks.parents.get(t)??null}const Qt=(0,g.createSelector)(((e,t,n=!1)=>{const o=[];let r=t;for(;r=e.blocks.parents.get(r);)o.push(r);return o.length?n?o:o.reverse():wt}),(e=>[e.blocks.parents])),Jt=(0,g.createSelector)(((e,t,n,o=!1)=>{const r=Qt(e,t,o),i=Array.isArray(n)?e=>n.includes(e):e=>n===e;return r.filter((t=>i(It(e,t))))}),(e=>[e.blocks.parents]));function en(e,t){let n,o=t;do{n=o,o=e.blocks.parents.get(o)}while(o);return n}function tn(e,t){const n=qt(e),o=[...Qt(e,t),t],r=[...Qt(e,n),n];let i;const s=Math.min(o.length,r.length);for(let e=0;e<s&&o[e]===r[e];e++)i=o[e];return i}function nn(e,t,n=1){if(void 0===t&&(t=qt(e)),void 0===t&&(t=n<0?un(e):dn(e)),!t)return null;const o=Xt(e,t);if(null===o)return null;const{order:r}=e.blocks,i=r.get(o),s=i.indexOf(t)+1*n;return s<0||s===i.length?null:i[s]}function on(e,t){return nn(e,t,-1)}function rn(e,t){return nn(e,t,1)}function sn(e){return e.initialPosition}const ln=(0,g.createSelector)((e=>{const{selectionStart:t,selectionEnd:n}=e.selection;if(!t.clientId||!n.clientId)return wt;if(t.clientId===n.clientId)return[t.clientId];const o=Xt(e,t.clientId);if(null===o)return wt;const r=xn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId);return i>s?r.slice(s,i+1):r.slice(i,s+1)}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function an(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?wt:ln(e)}const cn=(0,g.createSelector)((e=>{const t=an(e);return t.length?t.map((t=>Tt(e,t))):wt}),(e=>[...ln.getDependants(e),e.blocks.byClientId,e.blocks.order,e.blocks.attributes]));function un(e){return an(e)[0]||null}function dn(e){const t=an(e);return t[t.length-1]||null}function pn(e,t){return un(e)===t}function hn(e,t){return-1!==an(e).indexOf(t)}const gn=(0,g.createSelector)(((e,t)=>{let n=t,o=!1;for(;n&&!o;)n=Xt(e,n),o=hn(e,n);return o}),(e=>[e.blocks.order,e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId]));function mn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:t.clientId||null}function fn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId===n.clientId?null:n.clientId||null}function bn(e){const t=Ut(e),n=Gt(e);return!t.attributeKey&&!n.attributeKey&&void 0===t.offset&&void 0===n.offset}function kn(e){const t=Ut(e),n=Gt(e);return!!t&&!!n&&t.clientId===n.clientId&&t.attributeKey===n.attributeKey&&t.offset===n.offset}function vn(e){return ln(e).some((t=>{const n=It(e,t);return!(0,p.getBlockType)(n).merge}))}function _n(e,t){const n=Ut(e),o=Gt(e);if(n.clientId===o.clientId)return!1;if(!n.attributeKey||!o.attributeKey||void 0===n.offset||void 0===o.offset)return!1;const r=Xt(e,n.clientId);if(r!==Xt(e,o.clientId))return!1;const i=xn(e,r);let s,l;i.indexOf(n.clientId)>i.indexOf(o.clientId)?(s=o,l=n):(s=n,l=o);const a=t?l.clientId:s.clientId,c=t?s.clientId:l.clientId,u=It(e,a);if(!(0,p.getBlockType)(u).merge)return!1;const d=Tt(e,c);if(d.name===u)return!0;const h=(0,p.switchToBlockType)(d,u);return h&&h.length}const yn=e=>{const t=Ut(e),n=Gt(e);if(t.clientId===n.clientId)return wt;if(!t.attributeKey||!n.attributeKey||void 0===t.offset||void 0===n.offset)return wt;const o=Xt(e,t.clientId);if(o!==Xt(e,n.clientId))return wt;const r=xn(e,o),i=r.indexOf(t.clientId),s=r.indexOf(n.clientId),[l,a]=i>s?[n,t]:[t,n],c=Tt(e,l.clientId),u=Tt(e,a.clientId),d=c.attributes[l.attributeKey],p=u.attributes[a.attributeKey];let h=(0,pe.create)({html:d}),g=(0,pe.create)({html:p});return h=(0,pe.remove)(h,0,l.offset),g=(0,pe.remove)(g,a.offset,g.text.length),[{...c,attributes:{...c.attributes,[l.attributeKey]:(0,pe.toHTMLString)({value:h})}},{...u,attributes:{...u.attributes,[a.attributeKey]:(0,pe.toHTMLString)({value:g})}}]};function xn(e,t){return e.blocks.order.get(t||"")||wt}function Sn(e,t){return xn(e,Xt(e,t)).indexOf(t)}function wn(e,t){const{selectionStart:n,selectionEnd:o}=e.selection;return n.clientId===o.clientId&&n.clientId===t}function Cn(e,t,n=!1){const o=ln(e);return!!o.length&&(n?o.some((n=>Qt(e,n,!0).includes(t))):o.some((n=>Xt(e,n)===t)))}function Bn(e,t,n=!1){return xn(e,t).some((t=>Nn(e,t)||n&&Bn(e,t,n)))}function In(e,t){if(!t)return!1;const n=an(e),o=n.indexOf(t);return o>-1&&o<n.length-1}function jn(e){const{selectionStart:t,selectionEnd:n}=e.selection;return t.clientId!==n.clientId}function En(e){return e.isMultiSelecting}function Tn(e){return e.isSelectionEnabled}function Mn(e,t){return e.blocksMode[t]||"visual"}function Pn(e){return e.isTyping}function Rn(e){return!!e.draggedBlocks.length}function An(e){return e.draggedBlocks}function Nn(e,t){return e.draggedBlocks.includes(t)}function Ln(e,t){if(!Rn(e))return!1;return Qt(e,t).some((t=>Nn(e,t)))}function Dn(){return I()('wp.data.select( "core/block-editor" ).isCaretWithinFormattedText',{since:"6.1",version:"6.3"}),!1}const On=(0,g.createSelector)((e=>{let t,n;const{insertionCue:o,selection:{selectionEnd:r}}=e;if(null!==o)return o;const{clientId:i}=r;return i?(t=Xt(e,i)||void 0,n=Sn(e,r.clientId)+1):n=xn(e).length,{rootClientId:t,index:n}}),(e=>[e.insertionCue,e.selection.selectionEnd.clientId,e.blocks.parents,e.blocks.order]));function zn(e){return null!==e.insertionCue}function Vn(e){return e.template.isValid}function Fn(e){return e.settings.template}function Hn(e,t){return t?vo(e,t)?.templateLock??!1:e.settings.templateLock??!1}const Un=(e,t,n=null)=>{let o,r;if(t&&"object"==typeof t?(o=t,r=t.name):(o=(0,p.getBlockType)(t),r=t),!o)return!1;const{allowedBlockTypes:i}=_o(e);if(!kt(i,r,!0))return!1;const s=(Array.isArray(o.parent)?o.parent:[]).concat(Array.isArray(o.ancestor)?o.ancestor:[]);if(s.length>0){if(s.includes("core/post-content"))return!0;let t=n,o=!1;do{if(s.includes(It(e,t))){o=!0;break}t=e.blocks.parents.get(t)}while(t);return o}return!0},Gn=(e,t,n=null)=>{if(!Un(e,t,n))return!1;let o;if(t&&"object"==typeof t?(o=t,t=o.name):o=(0,p.getBlockType)(t),Hn(e,n))return!1;const r=Do(e,n??"");if("disabled"===r)return!1;const i=vo(e,n);if(n&&void 0===i)return!1;const s=St(t),l=!!Ke(e,n),a=!!We(e,n);if((l||a)&&!s)return!1;if((l||"contentOnly"===r)&&!Ie(e,t,n))return!1;const c=It(e,n),u=(0,p.getBlockType)(c),d=u?.allowedBlocks;let h=kt(d,t);if(!1!==h){const e=i?.allowedBlocks,n=kt(e,t);null!==n&&(h=n)}const g=o.parent,m=kt(g,c);let b=!0;const k=o.ancestor;if(k){b=[n,...Qt(e,n)].some((t=>kt(k,It(e,t))))}const v=b&&(null===h&&null===m||!0===h||!0===m);return v?(0,f.applyFilters)("blockEditor.__unstableCanInsertBlockType",v,o,n,{getBlock:Tt.bind(null,e),getBlockParentsByBlockName:Jt.bind(null,e)}):v},$n=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(Gn,((t,n,o)=>yt(e)(t,o)))));function Wn(e,t,n=null){return t.every((t=>$n(e,It(e,t),n)))}function Kn(e,t){const n=Et(e,t);if(null===n)return!0;if(void 0!==n.lock?.remove)return!n.lock.remove;const o=Xt(e,t);if(Hn(e,o))return!1;const r=!!We(e,t),i=St(It(e,t));if(r&&!i)return!1;const s=!!Ke(e,o),l=Do(e,o);return!((s||"contentOnly"===l)&&!Ie(e,It(e,t),o))&&"disabled"!==l}function Zn(e,t){return t.every((t=>Kn(e,t)))}function qn(e,t){const n=Et(e,t);if(null===n)return!0;if(void 0!==n.lock?.move)return!n.lock.move;const o=Xt(e,t),r=Hn(e,o);if("all"===r||"contentOnly"===r)return!1;const i=!!We(e,t),s=St(It(e,t));if(i&&!s)return!1;const l=!!Ke(e,o),a=Do(e,o);return!((l||"contentOnly"===a)&&!Ie(e,It(e,t),o))&&"disabled"!==Do(e,o)}function Yn(e,t){return t.every((t=>qn(e,t)))}function Xn(e,t){const n=Et(e,t);if(null===n)return!0;const{lock:o}=n;return!o?.edit}function Qn(e,t){return!!(0,p.hasBlockSupport)(t,"lock",!0)&&!!e.settings?.canLockBlocks}function Jn(e,t){return e.preferences.insertUsage?.[t]??null}const eo=(e,t,n)=>!!(0,p.hasBlockSupport)(t,"inserter",!0)&&Gn(e,t.name,n),to=(e,t)=>{if(!e)return t;const n=Date.now()-e;switch(!0){case n<36e5:return 4*t;case n<864e5:return 2*t;case n<6048e5:return t/2;default:return t/4}},no=(e,{buildScope:t="inserter"})=>n=>{const o=n.name;let r=!1;(0,p.hasBlockSupport)(n.name,"multiple",!0)||(r=Vt(e,Lt(e)).some((({name:e})=>e===n.name)));const{time:i,count:s=0}=Jn(e,o)||{},l={id:o,name:n.name,title:n.title,icon:n.icon,isDisabled:r,frecency:to(i,s)};if("transform"===t)return l;const a=(0,p.getBlockVariations)(n.name,"inserter");return{...l,initialAttributes:{},description:n.description,category:n.category,keywords:n.keywords,parent:n.parent,ancestor:n.ancestor,variations:a,example:n.example,utility:1}},oo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null,o=Bt)=>{const r=Gn(t,"core/block",n)?G(e(ge)).getReusableBlocks().map((e=>{const n=e.wp_pattern_sync_status?de:{src:de,foreground:"var(--wp-block-synced-color)"},o=mt(e),{time:r,count:i=0}=Jn(t,o.name)||{},s=to(r,i);return{id:o.name,name:"core/block",initialAttributes:{ref:e.id},title:o.title,icon:n,category:"reusable",keywords:["reusable"],isDisabled:!1,utility:1,frecency:s,content:o.content,get blocks(){return ft(o).blocks},syncStatus:o.syncStatus}})):[],i=no(t,{buildScope:"inserter"});let s=(0,p.getBlockTypes)().filter((e=>(0,p.hasBlockSupport)(e,"inserter",!0))).map(i);s=!1!==o[pt]?s.filter((e=>eo(t,e,n))):s.filter((e=>Un(t,e,n))).map((e=>({...e,isAllowedInCurrentRoot:eo(t,e,n)})));const l=s.reduce(((e,n)=>{const{variations:o=[]}=n;if(o.some((({isDefault:e})=>e))||e.push(n),o.length){const r=((e,t)=>n=>{const o=`${t.id}/${n.name}`,{time:r,count:i=0}=Jn(e,o)||{};return{...t,id:o,icon:n.icon||t.icon,title:n.title||t.title,description:n.description||t.description,category:n.category||t.category,example:n.hasOwnProperty("example")?n.example:t.example,initialAttributes:{...t.initialAttributes,...n.attributes},innerBlocks:n.innerBlocks,keywords:n.keywords||t.keywords,frecency:to(r,i)}})(t,n);e.push(...o.map(r))}return e}),[]),{core:a,noncore:c}=l.reduce(((e,t)=>{const{core:n,noncore:o}=e;return(t.name.startsWith("core/")?n:o).push(t),e}),{core:[],noncore:[]});return[...[...a,...c],...r]}),((t,n)=>[(0,p.getBlockTypes)(),G(e(ge)).getReusableBlocks(),t.blocks.order,t.preferences.insertUsage,...yt(e)(t,n)])))),ro=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((e,t,n=null)=>{const o=Array.isArray(t)?t:[t],r=no(e,{buildScope:"transform"}),i=(0,p.getBlockTypes)().filter((t=>eo(e,t,n))).map(r),s=Object.fromEntries(Object.entries(i).map((([,e])=>[e.name,e])));return xt((0,p.getPossibleBlockTransformations)(o).reduce(((e,t)=>(s[t?.name]&&e.push(s[t.name]),e)),[]),(e=>s[e.name].frecency),"desc")}),((t,n,o)=>[(0,p.getBlockTypes)(),t.preferences.insertUsage,...yt(e)(t,o)])))),io=(e,t=null)=>{if((0,p.getBlockTypes)().some((n=>eo(e,n,t))))return!0;return Gn(e,"core/block",t)},so=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((e,t=null)=>{if(!t)return;const n=(0,p.getBlockTypes)().filter((n=>eo(e,n,t)));return Gn(e,"core/block",t)&&n.push("core/block"),n}),((t,n)=>[(0,p.getBlockTypes)(),...yt(e)(t,n)])))),lo=(0,g.createSelector)(((e,t=null)=>(I()('wp.data.select( "core/block-editor" ).__experimentalGetAllowedBlocks',{alternative:'wp.data.select( "core/block-editor" ).getAllowedBlocks',since:"6.2",version:"6.4"}),so(e,t))),((e,t)=>so.getDependants(e,t)));function ao(e,t=null){if(!t)return;const{defaultBlock:n,directInsert:o}=e.blockListSettings[t]??{};return n&&o?n:void 0}function co(e,t=null){return I()('wp.data.select( "core/block-editor" ).__experimentalGetDirectInsertBlock',{alternative:'wp.data.select( "core/block-editor" ).getDirectInsertBlock',since:"6.3",version:"6.4"}),ao(e,t)}const uo=(0,g.createRegistrySelector)((e=>(t,n)=>{const o=G(e(ge)).getPatternBySlug(n);return o?ft(o):null})),po=e=>(t,n)=>[..._t(e)(t),...yt(e)(t,n)],ho=new WeakMap;function go(e){let t=ho.get(e);return t||(t={...e,get blocks(){return ft(e).blocks}},ho.set(e,t)),t}const mo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n=null,o=Bt)=>{const{getAllPatterns:r}=G(e(ge)),i=r(),{allowedBlockTypes:s}=_o(t);return i.filter((({inserter:e=!0})=>!!e)).map(go).filter((e=>vt(bt(e),s))).filter((e=>bt(e).every((({blockName:e})=>!1!==o[pt]?$n(t,e,n):Un(t,e,n)))))}),po(e)))),fo=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n,o=null)=>{if(!n)return wt;const r=e(ge).__experimentalGetAllowedPatterns(o),i=Array.isArray(n)?n:[n],s=r.filter((e=>e?.blockTypes?.some?.((e=>i.includes(e)))));return 0===s.length?wt:s}),((t,n,o)=>po(e)(t,o))))),bo=(0,g.createRegistrySelector)((e=>(I()('wp.data.select( "core/block-editor" ).__experimentalGetPatternsByBlockTypes',{alternative:'wp.data.select( "core/block-editor" ).getPatternsByBlockTypes',since:"6.2",version:"6.4"}),e(ge).getPatternsByBlockTypes))),ko=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n,o=null)=>{if(!n)return wt;if(n.some((({clientId:e,innerBlocks:n})=>n.length||Eo(t,e))))return wt;const r=Array.from(new Set(n.map((({name:e})=>e))));return e(ge).getPatternsByBlockTypes(r,o)}),((t,n,o)=>po(e)(t,o)))));function vo(e,t){return e.blockListSettings[t]}function _o(e){return e.settings}function yo(e){return e.blocks.isPersistentChange}const xo=(0,g.createSelector)(((e,t=[])=>t.reduce(((t,n)=>e.blockListSettings[n]?{...t,[n]:e.blockListSettings[n]}:t),{})),(e=>[e.blockListSettings])),So=(0,g.createRegistrySelector)((e=>(0,g.createSelector)(((t,n)=>{I()("wp.data.select( 'core/block-editor' ).__experimentalGetReusableBlockTitle",{since:"6.6",version:"6.8"});const o=G(e(ge)).getReusableBlocks().find((e=>e.id===n));return o?o.title?.raw:null}),(()=>[G(e(ge)).getReusableBlocks()]))));function wo(e){return e.blocks.isIgnoredChange}function Co(e){return e.lastBlockAttributesChange}function Bo(){return I()('wp.data.select( "core/block-editor" ).hasBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),!1}function Io(e){return!!e.automaticChangeStatus}function jo(e,t){return e.highlightedBlock===t}function Eo(e,t){return!!e.blocks.controlledInnerBlocks[t]}const To=(0,g.createSelector)(((e,t)=>{if(!t.length)return null;const n=qt(e);if(t.includes(It(e,n)))return n;const o=an(e),r=Jt(e,n||o[0],t);return r?r[r.length-1]:null}),((e,t)=>[e.selection.selectionStart.clientId,e.selection.selectionEnd.clientId,t]));function Mo(e,t,n){const{lastBlockInserted:o}=e;return o.clientIds?.includes(t)&&o.source===n}function Po(e,t){return e.blockVisibility?.[t]??!0}function Ro(){I()("wp.data.select( 'core/block-editor' ).getHoveredBlockClientId",{since:"6.9",version:"7.1"})}const Ao=(0,g.createSelector)((e=>{const t=new Set(Object.keys(e.blockVisibility).filter((t=>e.blockVisibility[t])));return 0===t.size?Ct:t}),(e=>[e.blockVisibility]));function No(e,t){if("default"!==Do(e,t))return!1;if(!Xn(e,t))return!0;if(Qe(e)){const n=Xe(e);if(n){const o=xn(e,n);if(o?.includes(t))return!0}else if(t&&!Xt(e,t))return!0}return!(0,p.hasBlockSupport)(It(e,t),"__experimentalDisableBlockOverlay",!1)&&Eo(e,t)&&!wn(e,t)&&!Cn(e,t,!0)}function Lo(e,t){let n=e.blocks.parents.get(t);for(;n;){if(No(e,n))return!0;n=e.blocks.parents.get(n)}return!1}function Do(e,t=""){return null===t&&(t=""),e.derivedBlockEditingModes?.has(t)?e.derivedBlockEditingModes.get(t):e.blockEditingModes.has(t)?e.blockEditingModes.get(t):"default"}const Oo=(0,g.createRegistrySelector)((e=>(t,n="")=>{const o=n||qt(t);if(!o)return!1;const{getGroupingBlockName:r}=e(p.store),i=Tt(t,o),s=r();return i&&(i.name===s||(0,p.getBlockType)(i.name)?.transforms?.ungroup)&&!!i.innerBlocks.length&&Kn(t,o)})),zo=(0,g.createRegistrySelector)((e=>(t,n=wt)=>{const{getGroupingBlockName:o}=e(p.store),r=o(),i=n?.length?n:ln(t),s=i?.length?Xt(t,i[0]):void 0;return $n(t,r,s)&&i.length&&Zn(t,i)})),Vo=(e,t)=>(I()("wp.data.select( 'core/block-editor' ).__unstableGetContentLockingParent",{since:"6.1",version:"6.7"}),$e(e,t));function Fo(e){return I()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingAsBlocks",{since:"6.1",version:"6.7"}),Ze(e)}function Ho(e){return I()("wp.data.select( 'core/block-editor' ).__unstableGetTemporarilyEditingFocusModeToRevert",{since:"6.5",version:"6.7"}),qe(e)}const Uo=window.wp.a11y,Go=["inserterMediaCategories","blockInspectorAnimation","mediaSideload"];function $o(e,{stripExperimentalSettings:t=!1,reset:n=!1}={}){let o=e;Object.hasOwn(o,"__unstableIsPreviewMode")&&(I()("__unstableIsPreviewMode argument in wp.data.dispatch('core/block-editor').updateSettings",{since:"6.8",alternative:"isPreviewMode"}),o={...o},o.isPreviewMode=o.__unstableIsPreviewMode,delete o.__unstableIsPreviewMode);let r=o;if(t&&"web"===h.Platform.OS){r={};for(const e in o)Go.includes(e)||(r[e]=o[e])}return{type:"UPDATE_SETTINGS",settings:r,reset:n}}function Wo(){return{type:"HIDE_BLOCK_INTERFACE"}}function Ko(){return{type:"SHOW_BLOCK_INTERFACE"}}const Zo=(e,t=!0,n=!1)=>({select:o,dispatch:r,registry:i})=>{if(!e||!e.length)return;var s;s=e,e=Array.isArray(s)?s:[s];if(!o.canRemoveBlocks(e))return;const l=!n&&o.getBlockRemovalRules();if(l){let n=function(e){const t=[],n=[...e];for(;n.length;){const{innerBlocks:e,...o}=n.shift();n.push(...e),t.push(o)}return t};const i=n(e.map(o.getBlock));let s;for(const n of l)if(s=n.callback(i),s)return void r(Yo(e,t,s))}t&&r.selectPreviousBlock(e[0],t),i.batch((()=>{r({type:"REMOVE_BLOCKS",clientIds:e}),r(qo())}))},qo=()=>({select:e,dispatch:t})=>{if(e.getBlockCount()>0)return;const{__unstableHasCustomAppender:n}=e.getSettings();n||t.insertDefaultBlock()};function Yo(e,t,n){return{type:"DISPLAY_BLOCK_REMOVAL_PROMPT",clientIds:e,selectPrevious:t,message:n}}function Xo(){return{type:"CLEAR_BLOCK_REMOVAL_PROMPT"}}function Qo(e=!1){return{type:"SET_BLOCK_REMOVAL_RULES",rules:e}}function Jo(e){return{type:"SET_OPENED_BLOCK_SETTINGS_MENU",clientId:e}}function er(e,t){return{type:"SET_STYLE_OVERRIDE",id:e,style:t}}function tr(e){return{type:"DELETE_STYLE_OVERRIDE",id:e}}function nr(e=null){return{type:"LAST_FOCUS",lastFocus:e}}function or(e){return({select:t,dispatch:n,registry:o})=>{const r=G(o.select(ji)).getTemporarilyEditingFocusModeToRevert();n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:"contentOnly"}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:"contentOnly"}),n.updateSettings({focusMode:r}),n.__unstableSetTemporarilyEditingAsBlocks()}}function rr(){return{type:"START_DRAGGING"}}function ir(){return{type:"STOP_DRAGGING"}}function sr(e){return{type:"SET_BLOCK_EXPANDED_IN_LIST_VIEW",clientId:e}}function lr(e){return{type:"SET_INSERTION_POINT",value:e}}const ar=e=>({select:t,dispatch:n})=>{n.selectBlock(e),n.__unstableMarkNextChangeAsNotPersistent(),n.updateBlockAttributes(e,{templateLock:void 0}),n.updateBlockListSettings(e,{...t.getBlockListSettings(e),templateLock:!1});const o=t.getSettings().focusMode;n.updateSettings({focusMode:!0}),n.__unstableSetTemporarilyEditingAsBlocks(e,o)},cr=(e=100)=>({select:t,dispatch:n})=>{if(100!==e){const e=t.getBlockSelectionStart(),o=t.getSectionRootClientId();if(e){let r;if(o){const n=t.getBlockOrder(o);r=n?.includes(e)?e:t.getBlockParents(e).find((e=>n.includes(e)))}else r=t.getBlockHierarchyRootClientId(e);r?n.selectBlock(r):n.clearSelectedBlock(),(0,Uo.speak)((0,T.__)("You are currently in zoom-out mode."))}}n({type:"SET_ZOOM_LEVEL",zoom:e})};function ur(){return{type:"RESET_ZOOM_LEVEL"}}function dr(e,t){return{type:"TOGGLE_BLOCK_SPOTLIGHT",clientId:e,hasBlockSpotlight:t}}const pr=window.wp.notices,hr=window.wp.preferences,gr="";function mr(e){if(e)return Object.keys(e).find((t=>{const n=e[t];return("string"==typeof n||n instanceof pe.RichTextData)&&-1!==n.toString().indexOf(gr)}))}function fr(e){for(const[t,n]of Object.entries(e.attributes))if("rich-text"===n.source||"html"===n.source)return t}const br=e=>Array.isArray(e)?e:[e],kr=e=>({dispatch:t})=>{t({type:"RESET_BLOCKS",blocks:e}),t(vr(e))},vr=e=>({select:t,dispatch:n})=>{const o=t.getTemplate(),r=t.getTemplateLock(),i=!o||"all"!==r||(0,p.doBlocksMatchTemplate)(e,o);if(i!==t.isValidTemplate())return n.setTemplateValidity(i),i};function _r(e,t,n){return{type:"RESET_SELECTION",selectionStart:e,selectionEnd:t,initialPosition:n}}function yr(e){return I()('wp.data.dispatch( "core/block-editor" ).receiveBlocks',{since:"5.9",alternative:"resetBlocks or insertBlocks"}),{type:"RECEIVE_BLOCKS",blocks:e}}function xr(e,t,n={uniqueByBlock:!1}){return"boolean"==typeof n&&(n={uniqueByBlock:n}),{type:"UPDATE_BLOCK_ATTRIBUTES",clientIds:br(e),attributes:t,options:n}}function Sr(e,t){return{type:"UPDATE_BLOCK",clientId:e,updates:t}}function wr(e,t=0){return{type:"SELECT_BLOCK",initialPosition:t,clientId:e}}function Cr(){return I()('wp.data.dispatch( "core/block-editor" ).hoverBlock',{since:"6.9",version:"7.1"}),{type:"DO_NOTHING"}}const Br=(e,t=!1)=>({select:n,dispatch:o})=>{const r=n.getPreviousBlockClientId(e);if(r)o.selectBlock(r,-1);else if(t){const t=n.getBlockRootClientId(e);t&&o.selectBlock(t,-1)}},Ir=e=>({select:t,dispatch:n})=>{const o=t.getNextBlockClientId(e);o&&n.selectBlock(o)};function jr(){return{type:"START_MULTI_SELECT"}}function Er(){return{type:"STOP_MULTI_SELECT"}}const Tr=(e,t,n=0)=>({select:o,dispatch:r})=>{if(o.getBlockRootClientId(e)!==o.getBlockRootClientId(t))return;r({type:"MULTI_SELECT",start:e,end:t,initialPosition:n});const i=o.getSelectedBlockCount();(0,Uo.speak)((0,T.sprintf)((0,T._n)("%s block selected.","%s blocks selected.",i),i),"assertive")};function Mr(){return{type:"CLEAR_SELECTED_BLOCK"}}function Pr(e=!0){return{type:"TOGGLE_SELECTION",isSelectionEnabled:e}}const Rr=(e,t,n,o=0,r)=>({select:i,dispatch:s,registry:l})=>{e=br(e),t=br(t);const a=i.getBlockRootClientId(e[0]);for(let e=0;e<t.length;e++){const n=t[e];if(!i.canInsertBlockType(n.name,a))return}l.batch((()=>{s({type:"REPLACE_BLOCKS",clientIds:e,blocks:t,time:Date.now(),indexToSelect:n,initialPosition:o,meta:r}),s.ensureDefaultBlock()}))};function Ar(e,t){return Rr(e,t)}const Nr=e=>(t,n)=>({select:o,dispatch:r})=>{o.canMoveBlocks(t)&&r({type:e,clientIds:br(t),rootClientId:n})},Lr=Nr("MOVE_BLOCKS_DOWN"),Dr=Nr("MOVE_BLOCKS_UP"),Or=(e,t="",n="",o)=>({select:r,dispatch:i})=>{if(r.canMoveBlocks(e)){if(t!==n){if(!r.canRemoveBlocks(e))return;if(!r.canInsertBlocks(e,n))return}i({type:"MOVE_BLOCKS_TO_POSITION",fromRootClientId:t,toRootClientId:n,clientIds:e,index:o})}};function zr(e,t="",n="",o){return Or([e],t,n,o)}function Vr(e,t,n,o,r){return Fr([e],t,n,o,0,r)}const Fr=(e,t,n,o=!0,r=0,i)=>({select:s,dispatch:l})=>{null!==r&&"object"==typeof r&&(i=r,r=0,I()("meta argument in wp.data.dispatch('core/block-editor')",{since:"5.8",hint:"The meta argument is now the 6th argument of the function"})),e=br(e);const a=[];for(const t of e){s.canInsertBlockType(t.name,n)&&a.push(t)}a.length&&l({type:"INSERT_BLOCKS",blocks:a,index:t,rootClientId:n,time:Date.now(),updateSelection:o,initialPosition:o?r:null,meta:i})};function Hr(e,t,n={}){const{__unstableWithInserter:o,operation:r,nearestSide:i}=n;return{type:"SHOW_INSERTION_POINT",rootClientId:e,index:t,__unstableWithInserter:o,operation:r,nearestSide:i}}const Ur=()=>({select:e,dispatch:t})=>{e.isBlockInsertionPointVisible()&&t({type:"HIDE_INSERTION_POINT"})};function Gr(e){return{type:"SET_TEMPLATE_VALIDITY",isValid:e}}const $r=()=>({select:e,dispatch:t})=>{t({type:"SYNCHRONIZE_TEMPLATE"});const n=e.getBlocks(),o=e.getTemplate(),r=(0,p.synchronizeBlocksWithTemplate)(n,o);t.resetBlocks(r)},Wr=e=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd();if(r.clientId===i.clientId)return;if(!r.attributeKey||!i.attributeKey||void 0===r.offset||void 0===i.offset)return!1;const s=n.getBlockRootClientId(r.clientId);if(s!==n.getBlockRootClientId(i.clientId))return;const l=n.getBlockOrder(s);let a,c;l.indexOf(r.clientId)>l.indexOf(i.clientId)?(a=i,c=r):(a=r,c=i);const u=e?c:a,d=n.getBlock(u.clientId),h=(0,p.getBlockType)(d.name);if(!h.merge)return;const g=a,m=c,f=n.getBlock(g.clientId),b=n.getBlock(m.clientId),k=f.attributes[g.attributeKey],v=b.attributes[m.attributeKey];let _=(0,pe.create)({html:k}),y=(0,pe.create)({html:v});_=(0,pe.remove)(_,g.offset,_.text.length),y=(0,pe.insert)(y,gr,0,m.offset);const x=(0,p.cloneBlock)(f,{[g.attributeKey]:(0,pe.toHTMLString)({value:_})}),S=(0,p.cloneBlock)(b,{[m.attributeKey]:(0,pe.toHTMLString)({value:y})}),w=e?x:S,C=f.name===b.name?[w]:(0,p.switchToBlockType)(w,h.name);if(!C||!C.length)return;let B;if(e){const e=C.pop();B=h.merge(e.attributes,S.attributes)}else{const e=C.shift();B=h.merge(x.attributes,e.attributes)}const I=mr(B),j=B[I],E=(0,pe.create)({html:j}),T=E.text.indexOf(gr),M=(0,pe.remove)(E,T,T+1),P=(0,pe.toHTMLString)({value:M});B[I]=P;const R=n.getSelectedBlockClientIds(),A=[...e?C:[],{...d,attributes:{...d.attributes,...B}},...e?[]:C];t.batch((()=>{o.selectionChange(d.clientId,I,T,T),o.replaceBlocks(R,A,0,n.getSelectedBlocksInitialCaretPosition())}))},Kr=(e=[])=>({registry:t,select:n,dispatch:o})=>{const r=n.getSelectionStart(),i=n.getSelectionEnd(),s=n.getBlockRootClientId(r.clientId),l=n.getBlockRootClientId(i.clientId);if(s!==l)return;const a=n.getBlockOrder(s);let c,u;a.indexOf(r.clientId)>a.indexOf(i.clientId)?(c=i,u=r):(c=r,u=i);const d=c,h=u,g=n.getBlock(d.clientId),m=n.getBlock(h.clientId),f=(0,p.getBlockType)(g.name),b=(0,p.getBlockType)(m.name),k="string"==typeof d.attributeKey?d.attributeKey:fr(f),v="string"==typeof h.attributeKey?h.attributeKey:fr(b),_=n.getBlockAttributes(d.clientId),y=_?.metadata?.bindings;if(y?.[k]){if(e.length){const{createWarningNotice:e}=t.dispatch(pr.store);return void e((0,T.__)("Blocks can't be inserted into other blocks with bindings"),{type:"snackbar"})}return void o.insertAfterBlock(d.clientId)}if(!k||!v||void 0===r.offset||void 0===i.offset)return;if(d.clientId===h.clientId&&k===v&&d.offset===h.offset)if(e.length){if((0,p.isUnmodifiedDefaultBlock)(g))return void o.replaceBlocks([d.clientId],e,e.length-1,-1)}else if(!n.getBlockOrder(d.clientId).length){let e=function(){const e=(0,p.getDefaultBlockName)();return n.canInsertBlockType(e,s)?(0,p.createBlock)(e):(0,p.createBlock)(n.getBlockName(d.clientId))};const t=_[k].length;if(0===d.offset&&t)return void o.insertBlocks([e()],n.getBlockIndex(d.clientId),s,!1);if(d.offset===t)return void o.insertBlocks([e()],n.getBlockIndex(d.clientId)+1,s)}const x=g.attributes[k],S=m.attributes[v];let w=(0,pe.create)({html:x}),C=(0,pe.create)({html:S});w=(0,pe.remove)(w,d.offset,w.text.length),C=(0,pe.remove)(C,0,h.offset);let B={...g,innerBlocks:g.clientId===m.clientId?[]:g.innerBlocks,attributes:{...g.attributes,[k]:(0,pe.toHTMLString)({value:w})}},I={...m,clientId:g.clientId===m.clientId?(0,p.createBlock)(m.name).clientId:m.clientId,attributes:{...m.attributes,[v]:(0,pe.toHTMLString)({value:C})}};const j=(0,p.getDefaultBlockName)();if(g.clientId===m.clientId&&j&&I.name!==j&&n.canInsertBlockType(j,s)){const e=(0,p.switchToBlockType)(I,j);1===e?.length&&(I=e[0])}if(!e.length)return void o.replaceBlocks(n.getSelectedBlockClientIds(),[B,I]);let E;const M=[],P=[...e],R=P.shift(),A=(0,p.getBlockType)(B.name),N=A.merge&&R.name===A.name?[R]:(0,p.switchToBlockType)(R,A.name);if(N?.length){const e=N.shift();B={...B,attributes:{...B.attributes,...A.merge(B.attributes,e.attributes)}},M.push(B),E={clientId:B.clientId,attributeKey:k,offset:(0,pe.create)({html:B.attributes[k]}).text.length},P.unshift(...N)}else(0,p.isUnmodifiedBlock)(B)||M.push(B),M.push(R);const L=P.pop(),D=(0,p.getBlockType)(I.name);if(P.length&&M.push(...P),L){const e=D.merge&&D.name===L.name?[L]:(0,p.switchToBlockType)(L,D.name);if(e?.length){const t=e.pop();M.push({...I,attributes:{...I.attributes,...D.merge(t.attributes,I.attributes)}}),M.push(...e),E={clientId:I.clientId,attributeKey:v,offset:(0,pe.create)({html:t.attributes[v]}).text.length}}else M.push(L),(0,p.isUnmodifiedBlock)(I)||M.push(I)}else(0,p.isUnmodifiedBlock)(I)||M.push(I);t.batch((()=>{o.replaceBlocks(n.getSelectedBlockClientIds(),M,M.length-1,0),E&&o.selectionChange(E.clientId,E.attributeKey,E.offset,E.offset)}))},Zr=()=>({select:e,dispatch:t})=>{const n=e.getSelectionStart(),o=e.getSelectionEnd();t.selectionChange({start:{clientId:n.clientId},end:{clientId:o.clientId}})},qr=(e,t)=>({registry:n,select:o,dispatch:r})=>{const i=e,s=t,l=o.getBlock(i),a=(0,p.getBlockType)(l.name);if(!a||"disabled"===o.getBlockEditingMode(i)||"disabled"===o.getBlockEditingMode(s))return;const c=o.getBlock(s);if(!a.merge&&(0,p.getBlockSupport)(l.name,"__experimentalOnMerge")){const e=(0,p.switchToBlockType)(c,a.name);if(1!==e?.length)return void r.selectBlock(l.clientId);const[t]=e;return t.innerBlocks.length<1?void r.selectBlock(l.clientId):void n.batch((()=>{r.insertBlocks(t.innerBlocks,void 0,i),r.removeBlock(s),r.selectBlock(t.innerBlocks[0].clientId);const e=o.getNextBlockClientId(i);if(e&&o.getBlockName(i)===o.getBlockName(e)){const t=o.getBlockAttributes(i),n=o.getBlockAttributes(e);Object.keys(t).every((e=>t[e]===n[e]))&&(r.moveBlocksToPosition(o.getBlockOrder(e),e,i),r.removeBlock(e,!1))}}))}if((0,p.isUnmodifiedDefaultBlock)(l))return void r.removeBlock(i,o.isBlockSelected(i));if((0,p.isUnmodifiedDefaultBlock)(c))return void r.removeBlock(s,o.isBlockSelected(s));if(!a.merge)return void((0,p.isUnmodifiedBlock)(c,"content")?r.removeBlock(s,o.isBlockSelected(s)):r.selectBlock(l.clientId));const u=(0,p.getBlockType)(c.name),{clientId:d,attributeKey:h,offset:g}=o.getSelectionStart(),m=(d===i?a:u).attributes[h],f=(d===i||d===s)&&void 0!==h&&void 0!==g&&!!m;m||("number"==typeof h?window.console.error("RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was "+typeof h):window.console.error("The RichText identifier prop does not match any attributes defined by the block."));const b=(0,p.cloneBlock)(l),k=(0,p.cloneBlock)(c);if(f){const e=d===i?b:k,t=e.attributes[h],n=(0,pe.insert)((0,pe.create)({html:t}),gr,g,g);e.attributes[h]=(0,pe.toHTMLString)({value:n})}const v=l.name===c.name?[k]:(0,p.switchToBlockType)(k,l.name);if(!v||!v.length)return;const _=a.merge(b.attributes,v[0].attributes);if(f){const e=mr(_),t=_[e],n=(0,pe.create)({html:t}),o=n.text.indexOf(gr),i=(0,pe.remove)(n,o,o+1),s=(0,pe.toHTMLString)({value:i});_[e]=s,r.selectionChange(l.clientId,e,o,o)}r.replaceBlocks([l.clientId,c.clientId],[{...l,attributes:{...l.attributes,..._}},...v.slice(1)],0)},Yr=(e,t=!0)=>Zo(e,t);function Xr(e,t){return Yr([e],t)}function Qr(e,t,n=!1,o=0){return{type:"REPLACE_INNER_BLOCKS",rootClientId:e,blocks:t,updateSelection:n,initialPosition:n?o:null,time:Date.now()}}function Jr(e){return{type:"TOGGLE_BLOCK_MODE",clientId:e}}function ei(){return{type:"START_TYPING"}}function ti(){return{type:"STOP_TYPING"}}function ni(e=[]){return{type:"START_DRAGGING_BLOCKS",clientIds:e}}function oi(){return{type:"STOP_DRAGGING_BLOCKS"}}function ri(){return I()('wp.data.dispatch( "core/block-editor" ).enterFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function ii(){return I()('wp.data.dispatch( "core/block-editor" ).exitFormattedText',{since:"6.1",version:"6.3"}),{type:"DO_NOTHING"}}function si(e,t,n,o){return"string"==typeof e?{type:"SELECTION_CHANGE",clientId:e,attributeKey:t,startOffset:n,endOffset:o}:{type:"SELECTION_CHANGE",...e}}const li=(e,t,n)=>({dispatch:o})=>{const r=(0,p.getDefaultBlockName)();if(!r)return;const i=(0,p.createBlock)(r,e);return o.insertBlock(i,n,t)};function ai(e,t){return{type:"UPDATE_BLOCK_LIST_SETTINGS",clientId:e,settings:t}}function ci(e){return $o(e,{stripExperimentalSettings:!0})}function ui(e,t){return{type:"SAVE_REUSABLE_BLOCK_SUCCESS",id:e,updatedId:t}}function di(){return{type:"MARK_LAST_CHANGE_AS_PERSISTENT"}}function pi(){return{type:"MARK_NEXT_CHANGE_AS_NOT_PERSISTENT"}}const hi=()=>({dispatch:e})=>{e({type:"MARK_AUTOMATIC_CHANGE"});const{requestIdleCallback:t=e=>setTimeout(e,100)}=window;t((()=>{e({type:"MARK_AUTOMATIC_CHANGE_FINAL"})}))},gi=e=>({registry:t})=>{t.dispatch(hr.store).set("core","editorTool",e),"navigation"===e?(0,Uo.speak)((0,T.__)("You are currently in Write mode.")):"edit"===e&&(0,Uo.speak)((0,T.__)("You are currently in Design mode."))};function mi(){return I()('wp.data.dispatch( "core/block-editor" ).setBlockMovingClientId',{since:"6.7",hint:"Block moving mode feature has been removed"}),{type:"DO_NOTHING"}}const fi=(e,t=!0)=>({select:n,dispatch:o})=>{if(!e||!e.length)return;const r=n.getBlocksByClientId(e);if(r.some((e=>!e)))return;if(r.map((e=>e.name)).some((e=>!(0,p.hasBlockSupport)(e,"multiple",!0))))return;const i=n.getBlockRootClientId(e[0]),s=br(e),l=n.getBlockIndex(s[s.length-1]),a=r.map((e=>(0,p.__experimentalCloneSanitizedBlock)(e)));return o.insertBlocks(a,l+1,i,t),a.length>1&&t&&o.multiSelect(a[0].clientId,a[a.length-1].clientId),a.map((e=>e.clientId))},bi=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,p.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r,o)},ki=e=>({select:t,dispatch:n})=>{if(!e)return;const o=t.getBlockRootClientId(e);if(t.getTemplateLock(o))return;const r=t.getBlockIndex(e),i=o?t.getDirectInsertBlock(o):null;if(!i)return n.insertDefaultBlock({},o,r+1);const s={};if(i.attributesToCopy){const n=t.getBlockAttributes(e);i.attributesToCopy.forEach((e=>{n[e]&&(s[e]=n[e])}))}const l=(0,p.createBlock)(i.name,{...i.attributes,...s});return n.insertBlock(l,r+1,o)};function vi(e,t){return{type:"TOGGLE_BLOCK_HIGHLIGHT",clientId:e,isHighlighted:t}}const _i=(e,t=150)=>async({dispatch:n})=>{n(vi(e,!0)),await new Promise((e=>setTimeout(e,t))),n(vi(e,!1))};function yi(e,t){return{type:"SET_HAS_CONTROLLED_INNER_BLOCKS",hasControlledInnerBlocks:t,clientId:e}}function xi(e){return{type:"SET_BLOCK_VISIBILITY",updates:e}}function Si(e,t){return{type:"SET_TEMPORARILY_EDITING_AS_BLOCKS",temporarilyEditingAsBlocks:e,focusModeToRevert:t}}const wi=e=>({select:t,dispatch:n})=>{if(!e||"object"!=typeof e)return void console.error("Category should be an `InserterMediaCategory` object.");if(!e.name)return void console.error("Category should have a `name` that should be unique among all media categories.");if(!e.labels?.name)return void console.error("Category should have a `labels.name`.");if(!["image","audio","video"].includes(e.mediaType))return void console.error("Category should have `mediaType` property that is one of `image|audio|video`.");if(!e.fetch||"function"!=typeof e.fetch)return void console.error("Category should have a `fetch` function defined with the following signature `(InserterMediaRequest) => Promise<InserterMediaItem[]>`.");const o=t.getRegisteredInserterMediaCategories();o.some((({name:t})=>t===e.name))?console.error(`A category is already registered with the same name: "${e.name}".`):o.some((({labels:{name:t}={}})=>t===e.labels?.name))?console.error(`A category is already registered with the same labels.name: "${e.labels.name}".`):n({type:"REGISTER_INSERTER_MEDIA_CATEGORY",category:{...e,isExternalResource:!0}})};function Ci(e="",t){return{type:"SET_BLOCK_EDITING_MODE",clientId:e,mode:t}}function Bi(e=""){return{type:"UNSET_BLOCK_EDITING_MODE",clientId:e}}const Ii={reducer:ce,selectors:t,actions:i},ji=(0,g.createReduxStore)(ge,{...Ii,persist:["preferences"]}),Ei=(0,g.registerStore)(ge,{...Ii,persist:["preferences"]});function Ti(...e){const{clientId:t=null}=C();return(0,g.useSelect)((n=>G(n(ji)).getBlockSettings(t,...e)),[t,...e])}function Mi(e){I()("wp.blockEditor.useSetting",{since:"6.5",alternative:"wp.blockEditor.useSettings",note:"The new useSettings function can retrieve multiple settings at once, with better performance."});const[t]=Ti(e);return t}G(Ei).registerPrivateActions(r),G(Ei).registerPrivateSelectors(e),G(ji).registerPrivateActions(r),G(ji).registerPrivateSelectors(e);const Pi=window.wp.styleEngine,Ri="1600px",Ai="320px",Ni=1,Li=.25,Di=.75,Oi="14px";function zi({minimumFontSize:e,maximumFontSize:t,fontSize:n,minimumViewportWidth:o=Ai,maximumViewportWidth:r=Ri,scaleFactor:i=Ni,minimumFontSizeLimit:s}){if(s=Vi(s)?s:Oi,n){const o=Vi(n);if(!o?.unit)return null;const r=Vi(s,{coerceTo:o.unit});if(r?.value&&!e&&!t&&o?.value<=r?.value)return null;if(t||(t=`${o.value}${o.unit}`),!e){const t="px"===o.unit?o.value:16*o.value,n=Math.min(Math.max(1-.075*Math.log2(t),Li),Di),i=Fi(o.value*n,3);e=r?.value&&i<r?.value?`${r.value}${r.unit}`:`${i}${o.unit}`}}const l=Vi(e),a=l?.unit||"rem",c=Vi(t,{coerceTo:a});if(!l||!c)return null;const u=Vi(e,{coerceTo:"rem"}),d=Vi(r,{coerceTo:a}),p=Vi(o,{coerceTo:a});if(!d||!p||!u)return null;const h=d.value-p.value;if(!h)return null;const g=Fi(p.value/100,3),m=Fi(g,3)+a,f=Fi(((c.value-l.value)/h*100||1)*i,3);return`clamp(${e}, ${`${u.value}${u.unit} + ((1vw - ${m}) * ${f})`}, ${t})`}function Vi(e,t={}){if("string"!=typeof e&&"number"!=typeof e)return null;isFinite(e)&&(e=`${e}px`);const{coerceTo:n,rootSizeValue:o,acceptableUnits:r}={coerceTo:"",rootSizeValue:16,acceptableUnits:["rem","px","em"],...t},i=r?.join("|"),s=new RegExp(`^(\\d*\\.?\\d+)(${i}){1,1}$`),l=e.match(s);if(!l||l.length<3)return null;let[,a,c]=l,u=parseFloat(a);return"px"!==n||"em"!==c&&"rem"!==c||(u*=o,c=n),"px"!==c||"em"!==n&&"rem"!==n||(u/=o,c=n),"em"!==n&&"rem"!==n||"em"!==c&&"rem"!==c||(c=n),{value:Fi(u,3),unit:c}}function Fi(e,t=3){const n=Math.pow(10,t);return Number.isFinite(e)?parseFloat(Math.round(e*n)/n):void 0}function Hi(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":case"400":t=(0,T._x)("Regular","font weight");break;case"bold":case"700":t=(0,T._x)("Bold","font weight");break;case"100":t=(0,T._x)("Thin","font weight");break;case"200":t=(0,T._x)("Extra Light","font weight");break;case"300":t=(0,T._x)("Light","font weight");break;case"500":t=(0,T._x)("Medium","font weight");break;case"600":t=(0,T._x)("Semi Bold","font weight");break;case"800":t=(0,T._x)("Extra Bold","font weight");break;case"900":t=(0,T._x)("Black","font weight");break;case"1000":t=(0,T._x)("Extra Black","font weight");break;default:t=e}return{name:t,value:e}}const Ui=[{name:(0,T._x)("Regular","font style"),value:"normal"},{name:(0,T._x)("Italic","font style"),value:"italic"}],Gi=[{name:(0,T._x)("Thin","font weight"),value:"100"},{name:(0,T._x)("Extra Light","font weight"),value:"200"},{name:(0,T._x)("Light","font weight"),value:"300"},{name:(0,T._x)("Regular","font weight"),value:"400"},{name:(0,T._x)("Medium","font weight"),value:"500"},{name:(0,T._x)("Semi Bold","font weight"),value:"600"},{name:(0,T._x)("Bold","font weight"),value:"700"},{name:(0,T._x)("Extra Bold","font weight"),value:"800"},{name:(0,T._x)("Black","font weight"),value:"900"},{name:(0,T._x)("Extra Black","font weight"),value:"1000"}];function $i(e){let t=[],n=[];const o=[],r=!e||0===e?.length;let i=!1;return e?.forEach((e=>{if("string"==typeof e.fontWeight&&/\s/.test(e.fontWeight.trim())){i=!0;let[t,o]=e.fontWeight.split(" ");t=parseInt(t.slice(0,1)),o="1000"===o?10:parseInt(o.slice(0,1));for(let e=t;e<=o;e++){const t=`${e.toString()}00`;n.some((e=>e.value===t))||n.push(Hi(t))}}const o=Hi("number"==typeof e.fontWeight?e.fontWeight.toString():e.fontWeight),r=function(e){if(!e)return{};if("object"==typeof e)return e;let t;switch(e){case"normal":t=(0,T._x)("Regular","font style");break;case"italic":t=(0,T._x)("Italic","font style");break;case"oblique":t=(0,T._x)("Oblique","font style");break;default:t=e}return{name:t,value:e}}(e.fontStyle);r&&Object.keys(r).length&&(t.some((e=>e.value===r.value))||t.push(r)),o&&Object.keys(o).length&&(n.some((e=>e.value===o.value))||i||n.push(o))})),n.some((e=>e.value>="600"))||n.push({name:(0,T._x)("Bold","font weight"),value:"700"}),t.some((e=>"italic"===e.value))||t.push({name:(0,T._x)("Italic","font style"),value:"italic"}),r&&(t=Ui,n=Gi),t=0===t.length?Ui:t,n=0===n.length?Gi:n,t.forEach((({name:e,value:t})=>{n.forEach((({name:n,value:r})=>{const i="normal"===t?n:(0,T.sprintf)((0,T._x)("%1$s %2$s","font"),n,e);o.push({key:`${t}-${r}`,name:i,style:{fontStyle:t,fontWeight:r}})}))})),{fontStyles:t,fontWeights:n,combinedStyleAndWeightOptions:o,isSystemFont:r,isVariableFont:i}}function Wi(e,t){const{size:n}=e;if(!n||"0"===n||!1===e?.fluid)return n;if(!Ki(t?.typography)&&!Ki(e))return n;let o=function(e){const t=e?.typography,n=e?.layout,o=Vi(n?.wideSize)?n?.wideSize:null;return Ki(t)&&o?{fluid:{maxViewportWidth:o,...t.fluid}}:{fluid:t?.fluid}}(t);o="object"==typeof o?.fluid?o?.fluid:{};const r=zi({minimumFontSize:e?.fluid?.min,maximumFontSize:e?.fluid?.max,fontSize:n,minimumFontSizeLimit:o?.minFontSize,maximumViewportWidth:o?.maxViewportWidth,minimumViewportWidth:o?.minViewportWidth});return r||n}function Ki(e){const t=e?.fluid;return!0===t||t&&"object"==typeof t&&Object.keys(t).length>0}function Zi(e,t){if(!(t="number"==typeof t?t.toString():t)||"string"!=typeof t)return"";if(!e||0===e.length)return t;const n=e?.reduce(((e,{value:n})=>Math.abs(parseInt(n)-parseInt(t))<Math.abs(parseInt(e)-parseInt(t))?n:e),e[0]?.value);return n}const qi="body",Yi=":root",Xi=[{path:["color","palette"],valueKey:"color",cssVarInfix:"color",classes:[{classSuffix:"color",propertyName:"color"},{classSuffix:"background-color",propertyName:"background-color"},{classSuffix:"border-color",propertyName:"border-color"}]},{path:["color","gradients"],valueKey:"gradient",cssVarInfix:"gradient",classes:[{classSuffix:"gradient-background",propertyName:"background"}]},{path:["color","duotone"],valueKey:"colors",cssVarInfix:"duotone",valueFunc:({slug:e})=>`url( '#wp-duotone-${e}' )`,classes:[]},{path:["shadow","presets"],valueKey:"shadow",cssVarInfix:"shadow",classes:[]},{path:["typography","fontSizes"],valueFunc:(e,t)=>Wi(e,t),valueKey:"size",cssVarInfix:"font-size",classes:[{classSuffix:"font-size",propertyName:"font-size"}]},{path:["typography","fontFamilies"],valueKey:"fontFamily",cssVarInfix:"font-family",classes:[{classSuffix:"font-family",propertyName:"font-family"}]},{path:["spacing","spacingSizes"],valueKey:"size",cssVarInfix:"spacing",classes:[]},{path:["border","radiusSizes"],valueKey:"size",cssVarInfix:"border-radius",classes:[]}],Qi={"color.background":"color","color.text":"color","filter.duotone":"duotone","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.caption.color.text":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",shadow:"shadow","typography.fontSize":"font-size","typography.fontFamily":"font-family"};function Ji(){return(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}function es(e,t,n,o,r){const i=[fe(e,["blocks",t,...n]),fe(e,n)];for(const s of i)if(s){const i=["custom","theme","default"];for(const l of i){const i=s[l];if(i){const s=i.find((e=>e[o]===r));if(s){if("slug"===o)return s;return es(e,t,n,"slug",s.slug)[o]===s[o]?s:void 0}}}}}function ts(e,t,n){if(!n||"string"!=typeof n){if("string"!=typeof n?.ref)return n;if(!(n=fe(e,n.ref))||n?.ref)return n}const o="var:",r="var(--wp--";let i;if(n.startsWith(o))i=n.slice(4).split("|");else{if(!n.startsWith(r)||!n.endsWith(")"))return n;i=n.slice(10,-1).split("--")}const[s,...l]=i;return"preset"===s?function(e,t,n,[o,r]){const i=Xi.find((e=>e.cssVarInfix===o));if(!i)return n;const s=es(e.settings,t,i.path,"slug",r);if(s){const{valueKey:n}=i;return ts(e,t,s[n])}return n}(e,t,n,l):"custom"===s?function(e,t,n,o){const r=fe(e.settings,["blocks",t,"custom",...o])??fe(e.settings,["custom",...o]);return r?ts(e,t,r):n}(e,t,n,l):n}function ns(e,t){if(!e||!t)return t;const n=e.split(","),o=t.split(","),r=[];return n.forEach((e=>{o.forEach((t=>{r.push(`${e.trim()} ${t.trim()}`)}))})),r.join(", ")}function os(e,t){return"object"!=typeof e||"object"!=typeof t?e===t:E()(e?.styles,t?.styles)&&E()(e?.settings,t?.settings)}function rs(e,t){if(!e||!t)return e;const n=function(e,t){if(!e||!t)return e;if("string"!=typeof e&&e?.ref){const n=(0,Pi.getCSSValueFromRawStyle)(fe(t,e.ref));if(n?.ref)return;return void 0===n?e:n}return e}(e,t);return n?.url&&(n.url=function(e,t){if(!e||!t||!Array.isArray(t))return e;const n=t.find((t=>t?.name===e));return n?.href?n?.href:e}(n.url,t?._links?.["wp:theme-file"])),n}const is=(0,h.createContext)({user:{},base:{},merged:{},setUserConfig:()=>{}});is.displayName="GlobalStylesContext";const ss={settings:{},styles:{}},ls=["appearanceTools","useRootPaddingAwareAlignments","background.backgroundImage","background.backgroundRepeat","background.backgroundSize","background.backgroundPosition","border.color","border.radius","border.style","border.width","border.radiusSizes","shadow.presets","shadow.defaultPresets","color.background","color.button","color.caption","color.custom","color.customDuotone","color.customGradient","color.defaultDuotone","color.defaultGradients","color.defaultPalette","color.duotone","color.gradients","color.heading","color.link","color.palette","color.text","custom","dimensions.aspectRatio","dimensions.minHeight","layout.contentSize","layout.definitions","layout.wideSize","lightbox.enabled","lightbox.allowEditing","position.fixed","position.sticky","spacing.customSpacingSize","spacing.defaultSpacingSizes","spacing.spacingSizes","spacing.spacingScale","spacing.blockGap","spacing.margin","spacing.padding","spacing.units","typography.fluid","typography.customFontSize","typography.defaultFontSizes","typography.dropCap","typography.fontFamilies","typography.fontSizes","typography.fontStyle","typography.fontWeight","typography.letterSpacing","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.textTransform","typography.writingMode"],as=()=>{const{user:e,setUserConfig:t}=(0,h.useContext)(is),n={settings:e.settings,styles:e.styles};return[!!n&&!E()(n,ss),(0,h.useCallback)((()=>t(ss)),[t])]};function cs(e,t,n="all"){const{setUserConfig:o,...r}=(0,h.useContext)(is),i=t?".blocks."+t:"",s=e?"."+e:"",l=`settings${i}${s}`,a=`settings${s}`,c="all"===n?"merged":n;return[(0,h.useMemo)((()=>{const t=r[c];if(!t)throw"Unsupported source";if(e)return fe(t,l)??fe(t,a);let n={};return ls.forEach((e=>{const o=fe(t,`settings${i}.${e}`)??fe(t,`settings.${e}`);void 0!==o&&(n=me(n,e.split("."),o))})),n}),[r,c,e,l,a,i]),e=>{o((t=>me(t,l.split("."),e)))}]}function us(e,t,n="all",{shouldDecodeEncode:o=!0}={}){const{merged:r,base:i,user:s,setUserConfig:l}=(0,h.useContext)(is),a=e?"."+e:"",c=t?`styles.blocks.${t}${a}`:`styles${a}`;let u,d;switch(n){case"all":u=fe(r,c),d=o?ts(r,t,u):u;break;case"user":u=fe(s,c),d=o?ts(r,t,u):u;break;case"base":u=fe(i,c),d=o?ts(i,t,u):u;break;default:throw"Unsupported source"}return[d,n=>{l((i=>me(i,c.split("."),o?function(e,t,n,o){if(!o)return o;const r=Qi[n],i=Xi.find((e=>e.cssVarInfix===r));if(!i)return o;const{valueKey:s,path:l}=i,a=es(e,t,l,s,o);return a?`var:preset|${r}|${a.slug}`:o}(r.settings,t,e,n):n)))}]}function ds(e,t,n){const{supportedStyles:o,supports:r}=(0,g.useSelect)((e=>({supportedStyles:G(e(p.store)).getSupportedStyles(t,n),supports:e(p.store).getBlockType(t)?.supports})),[t,n]);return(0,h.useMemo)((()=>{const t={...e};return o.includes("fontSize")||(t.typography={...t.typography,fontSizes:{},customFontSize:!1,defaultFontSizes:!1}),o.includes("fontFamily")||(t.typography={...t.typography,fontFamilies:{}}),t.color={...t.color,text:t.color?.text&&o.includes("color"),background:t.color?.background&&(o.includes("background")||o.includes("backgroundColor")),button:t.color?.button&&o.includes("buttonColor"),heading:t.color?.heading&&o.includes("headingColor"),link:t.color?.link&&o.includes("linkColor"),caption:t.color?.caption&&o.includes("captionColor")},o.includes("background")||(t.color.gradients=[],t.color.customGradient=!1),o.includes("filter")||(t.color.defaultDuotone=!1,t.color.customDuotone=!1),["lineHeight","fontStyle","fontWeight","letterSpacing","textAlign","textTransform","textDecoration","writingMode"].forEach((e=>{o.includes(e)||(t.typography={...t.typography,[e]:!1})})),o.includes("columnCount")||(t.typography={...t.typography,textColumns:!1}),["contentSize","wideSize"].forEach((e=>{o.includes(e)||(t.layout={...t.layout,[e]:!1})})),["padding","margin","blockGap"].forEach((e=>{o.includes(e)||(t.spacing={...t.spacing,[e]:!1});const n=Array.isArray(r?.spacing?.[e])?r?.spacing?.[e]:r?.spacing?.[e]?.sides;n?.length&&t.spacing?.[e]&&(t.spacing={...t.spacing,[e]:{...t.spacing?.[e],sides:n}})})),["aspectRatio","minHeight"].forEach((e=>{o.includes(e)||(t.dimensions={...t.dimensions,[e]:!1})})),["radius","color","style","width"].forEach((e=>{o.includes("border"+e.charAt(0).toUpperCase()+e.slice(1))||(t.border={...t.border,[e]:!1})})),["backgroundImage","backgroundSize"].forEach((e=>{o.includes(e)||(t.background={...t.background,[e]:!1})})),t.shadow=!!o.includes("shadow")&&t.shadow,n&&(t.typography.textAlign=!1),t}),[e,o,r,n])}function ps(e){const t=e?.color?.palette?.custom,n=e?.color?.palette?.theme,o=e?.color?.palette?.default,r=e?.color?.defaultPalette;return(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),colors:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),colors:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),colors:t}),e}),[t,n,o,r])}function hs(e){const t=e?.color?.gradients?.custom,n=e?.color?.gradients?.theme,o=e?.color?.gradients?.default,r=e?.color?.defaultGradients;return(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),gradients:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),gradients:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),gradients:t}),e}),[t,n,o,r])}function gs(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=gs(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}const ms=function(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=gs(e))&&(o&&(o+=" "),o+=t);return o},fs=e=>{if(null===e||"object"!=typeof e||Array.isArray(e))return e;const t=Object.entries(e).map((([e,t])=>[e,fs(t)])).filter((([,e])=>void 0!==e));return t.length?Object.fromEntries(t):void 0};function bs(e,t,n,o,r,i){if(Object.values(e??{}).every((e=>!e)))return n;if(1===i.length&&n.innerBlocks.length===o.length)return n;let s=o[0]?.attributes;if(i.length>1&&o.length>1){if(!o[r])return n;s=o[r]?.attributes}let l=n;return Object.entries(e).forEach((([e,n])=>{n&&t[e].forEach((e=>{const t=fe(s,e);t&&(l={...l,attributes:me(l.attributes,e,t)})}))})),l}function ks(e,t,n){const o=(0,p.getBlockSupport)(e,t),r=o?.__experimentalSkipSerialization;return Array.isArray(r)?r.includes(n):r}const vs=new WeakMap;function _s({id:e,css:t}){return ys({id:e,css:t})}function ys({id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i}={}){const{setStyleOverride:s,deleteStyleOverride:l}=G((0,g.useDispatch)(ji)),a=(0,g.useRegistry)(),c=(0,h.useId)();(0,h.useEffect)((()=>{if(!t&&!n)return;const u=e||c,d={id:e,css:t,assets:n,__unstableType:o,variation:r,clientId:i};return vs.get(a)||vs.set(a,[]),vs.get(a).push([u,d]),window.queueMicrotask((()=>{vs.get(a)?.length&&a.batch((()=>{vs.get(a).forEach((e=>{s(...e)})),vs.set(a,[])}))})),()=>{const e=vs.get(a)?.find((([e])=>e===u));e?vs.set(a,vs.get(a).filter((([e])=>e!==u))):l(u)}}),[e,t,i,n,o,c,s,l,a])}function xs(e,t){const[n,o,r,i,s,l,a,c,u,d,p,g,m,f,b,k,v,_,y,x,S,w,C,B,I,j,E,T,M,P,R,A,N,L,D,O,z,V,F,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re,ie]=Ti("background.backgroundImage","background.backgroundSize","typography.fontFamilies.custom","typography.fontFamilies.default","typography.fontFamilies.theme","typography.defaultFontSizes","typography.fontSizes.custom","typography.fontSizes.default","typography.fontSizes.theme","typography.customFontSize","typography.fontStyle","typography.fontWeight","typography.lineHeight","typography.textAlign","typography.textColumns","typography.textDecoration","typography.writingMode","typography.textTransform","typography.letterSpacing","spacing.padding","spacing.margin","spacing.blockGap","spacing.defaultSpacingSizes","spacing.customSpacingSize","spacing.spacingSizes.custom","spacing.spacingSizes.default","spacing.spacingSizes.theme","spacing.units","dimensions.aspectRatio","dimensions.minHeight","layout","border.color","border.radius","border.style","border.width","border.radiusSizes","color.custom","color.palette.custom","color.customDuotone","color.palette.theme","color.palette.default","color.defaultPalette","color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients","color.customGradient","color.background","color.link","color.text","color.heading","color.button","shadow");return ds((0,h.useMemo)((()=>({background:{backgroundImage:n,backgroundSize:o},color:{palette:{custom:V,theme:H,default:U},gradients:{custom:q,theme:Y,default:X},duotone:{custom:W,theme:K,default:Z},defaultGradients:Q,defaultPalette:G,defaultDuotone:$,custom:z,customGradient:J,customDuotone:F,background:ee,link:te,heading:oe,button:re,text:ne},typography:{fontFamilies:{custom:r,default:i,theme:s},fontSizes:{custom:a,default:c,theme:u},customFontSize:d,defaultFontSizes:l,fontStyle:p,fontWeight:g,lineHeight:m,textAlign:f,textColumns:b,textDecoration:k,textTransform:_,letterSpacing:y,writingMode:v},spacing:{spacingSizes:{custom:I,default:j,theme:E},customSpacingSize:B,defaultSpacingSizes:C,padding:x,margin:S,blockGap:w,units:T},border:{color:A,radius:N,style:L,width:D,radiusSizes:O},dimensions:{aspectRatio:M,minHeight:P},layout:R,parentLayout:t,shadow:ie})),[n,o,r,i,s,l,a,c,u,d,p,g,m,f,b,k,_,y,v,x,S,w,C,B,I,j,E,T,M,P,R,t,A,N,L,D,O,z,V,F,H,U,G,$,W,K,Z,q,Y,X,Q,J,ee,te,ne,oe,re,ie]),e)}const Ss=(0,h.memo)((function({index:e,useBlockProps:t,setAllWrapperProps:n,...o}){const r=t(o),i=t=>n((n=>{const o=[...n];return o[e]=t,o}));return(0,h.useEffect)((()=>(i(r),()=>{i(void 0)}))),null}));(0,f.addFilter)("blocks.registerBlockType","core/compat/migrateLightBlockWrapper",(function(e){const{apiVersion:t=1}=e;return t<2&&(0,p.hasBlockSupport)(e,"lightBlockWrapper",!1)&&(e.apiVersion=2),e}));const ws=window.wp.components;var Cs={default:(0,ws.createSlotFill)("BlockControls"),block:(0,ws.createSlotFill)("BlockControlsBlock"),inline:(0,ws.createSlotFill)("BlockFormatControls"),other:(0,ws.createSlotFill)("BlockControlsOther"),parent:(0,ws.createSlotFill)("BlockControlsParent")};function Bs({group:e="default",controls:t,children:n,__experimentalShareWithChildBlocks:o=!1}){const r=function(e,t){const n=C();return n[b]?Cs[e]?.Fill:n[k]&&t?Cs.parent.Fill:null}(e,o);if(!r)return null;const i=(0,d.jsxs)(d.Fragment,{children:["default"===e&&(0,d.jsx)(ws.ToolbarGroup,{controls:t}),n]});return(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(r,{children:e=>{const{forwardedContext:t=[]}=e;return t.reduce(((e,[t,n])=>(0,d.jsx)(t,{...n,children:e})),i)}})})}const Is=window.wp.warning;var js=n.n(Is);const{ComponentsContext:Es}=G(ws.privateApis);function Ts({group:e="default",...t}){const n=(0,h.useContext)(ws.__experimentalToolbarContext),o=(0,h.useContext)(Es),r=(0,h.useMemo)((()=>({forwardedContext:[[ws.__experimentalToolbarContext.Provider,{value:n}],[Es.Provider,{value:o}]]})),[n,o]),i=Cs[e],s=(0,ws.__experimentalUseSlotFills)(i.name);if(!i)return js()(`Unknown BlockControls group "${e}" provided.`),null;if(!s?.length)return null;const{Slot:l}=i,a=(0,d.jsx)(l,{...t,bubblesVirtually:!0,fillProps:r});return"default"===e?a:(0,d.jsx)(ws.ToolbarGroup,{children:a})}const Ms=Bs;Ms.Slot=Ts;const Ps=e=>(0,d.jsx)(Bs,{group:"inline",...e});Ps.Slot=e=>(0,d.jsx)(Ts,{group:"inline",...e});var Rs=Ms,As=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 9v6h11V9H9zM4 20h1.5V4H4v16z"})}),Ns=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12.5 15v5H11v-5H4V9h7V4h1.5v5h7v6h-7Z"})}),Ls=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z"})}),Ds=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z"})}),Os=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 4H5.5V20H4V4ZM7 10L17 10V14L7 14V10ZM20 4H18.5V20H20V4Z"})}),zs=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})}),Vs=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});const Fs={default:{name:"default",slug:"flow",className:"is-layout-flow",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},constrained:{name:"constrained",slug:"constrained",className:"is-layout-constrained",baseStyles:[{selector:" > .alignleft",rules:{float:"left","margin-inline-start":"0","margin-inline-end":"2em"}},{selector:" > .alignright",rules:{float:"right","margin-inline-start":"2em","margin-inline-end":"0"}},{selector:" > .aligncenter",rules:{"margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > :where(:not(.alignleft):not(.alignright):not(.alignfull))",rules:{"max-width":"var(--wp--style--global--content-size)","margin-left":"auto !important","margin-right":"auto !important"}},{selector:" > .alignwide",rules:{"max-width":"var(--wp--style--global--wide-size)"}}],spacingStyles:[{selector:" > :first-child",rules:{"margin-block-start":"0"}},{selector:" > :last-child",rules:{"margin-block-end":"0"}},{selector:" > *",rules:{"margin-block-start":null,"margin-block-end":"0"}}]},flex:{name:"flex",slug:"flex",className:"is-layout-flex",displayMode:"flex",baseStyles:[{selector:"",rules:{"flex-wrap":"wrap","align-items":"center"}},{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]},grid:{name:"grid",slug:"grid",className:"is-layout-grid",displayMode:"grid",baseStyles:[{selector:" > :is(*, div)",rules:{margin:"0"}}],spacingStyles:[{selector:"",rules:{gap:null}}]}};function Hs(e,t=""){return e.split(",").map((e=>`${e}${t?` ${t}`:""}`)).join(",")}function Us(e,t=Fs,n,o){let r="";return t?.[n]?.spacingStyles?.length&&o&&t[n].spacingStyles.forEach((t=>{r+=`${Hs(e,t.selector.trim())} { `,r+=Object.entries(t.rules).map((([e,t])=>`${e}: ${t||o}`)).join("; "),r+="; }"})),r}function Gs(e){const{contentSize:t,wideSize:n,type:o="default"}=e,r={},i=/^(?!0)\d+(px|em|rem|vw|vh|%|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)?$/i;return i.test(t)&&"constrained"===o&&(r.none=(0,T.sprintf)((0,T.__)("Max %s wide"),t)),i.test(n)&&(r.wide=(0,T.sprintf)((0,T.__)("Max %s wide"),n)),r}var $s=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z"})}),Ws=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m4.5 7.5v9h1.5v-9z"}),(0,d.jsx)(ue.Path,{d:"m18 7.5v9h1.5v-9z"})]}),Ks=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9z"}),(0,d.jsx)(ue.Path,{d:"m7.5 19.5h9v-1.5h-9z"})]}),Zs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m16.5 6h-9v-1.5h9z"})]}),qs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m18 16.5v-9h1.5v9z"})]}),Ys=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m16.5 19.5h-9v-1.5h9z"})]}),Xs=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7.5 6h9v-1.5h-9zm0 13.5h9v-1.5h-9zm-3-3h1.5v-9h-1.5zm13.5-9v9h1.5v-9z",style:{opacity:.25}}),(0,d.jsx)(ue.Path,{d:"m4.5 16.5v-9h1.5v9z"})]});const Qs=8,Js=["top","right","bottom","left"],el={top:void 0,right:void 0,bottom:void 0,left:void 0},tl={custom:$s,axial:$s,horizontal:Ws,vertical:Ks,top:Zs,right:qs,bottom:Ys,left:Xs},nl={default:(0,T.__)("Spacing control"),top:(0,T.__)("Top"),bottom:(0,T.__)("Bottom"),left:(0,T.__)("Left"),right:(0,T.__)("Right"),mixed:(0,T.__)("Mixed"),vertical:(0,T.__)("Vertical"),horizontal:(0,T.__)("Horizontal"),axial:(0,T.__)("Horizontal & vertical"),custom:(0,T.__)("Custom")},ol={axial:"axial",top:"top",right:"right",bottom:"bottom",left:"left",custom:"custom"};function rl(e){return!!e?.includes&&("0"===e||e.includes("var:preset|spacing|"))}function il(e,t){if(!rl(e))return e;const n=al(e),o=t.find((e=>String(e.slug)===n));return o?.size}function sl(e,t){if(!e||rl(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|spacing|${n.slug}`:e}function ll(e){if(!e)return;const t=e.match(/var:preset\|spacing\|(.+)/);return t?`var(--wp--preset--spacing--${t[1]})`:e}function al(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|spacing\|(.+)/);return t?t[1]:void 0}function cl(e,t){if(!e||!e.length)return!1;const n=e.includes("horizontal")||e.includes("left")&&e.includes("right"),o=e.includes("vertical")||e.includes("top")&&e.includes("bottom");return"horizontal"===t?n:"vertical"===t?o:n||o}function ul(e,t="0"){const n=function(e){if(!e)return null;const t="string"==typeof e;return{top:t?e:e?.top,left:t?e:e?.left}}(e);if(!n)return null;const o=ll(n?.top)||t,r=ll(n?.left)||t;return o===r?o:`${o} ${r}`}var dl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 20h6V9H9v11zM4 4v1.5h16V4H4z"})}),pl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z"})}),hl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z"})}),gl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 4L20 4L20 5.5L4 5.5L4 4ZM10 7L14 7L14 17L10 17L10 7ZM20 18.5L4 18.5L4 20L20 20L20 18.5Z"})}),ml=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 4H17V8L7 8V4ZM7 16L17 16V20L7 20V16ZM20 11.25H4V12.75H20V11.25Z"})});const fl={top:{icon:dl,title:(0,T._x)("Align top","Block vertical alignment setting")},center:{icon:pl,title:(0,T._x)("Align middle","Block vertical alignment setting")},bottom:{icon:hl,title:(0,T._x)("Align bottom","Block vertical alignment setting")},stretch:{icon:gl,title:(0,T._x)("Stretch to fill","Block vertical alignment setting")},"space-between":{icon:ml,title:(0,T._x)("Space between","Block vertical alignment setting")}},bl=["top","center","bottom"];var kl=function({value:e,onChange:t,controls:n=bl,isCollapsed:o=!0,isToolbar:r}){const i=fl[e],s=fl.top,l=r?ws.ToolbarGroup:ws.ToolbarDropdownMenu,a=r?{isCollapsed:o}:{};return(0,d.jsx)(l,{icon:i?i.icon:s.icon,label:(0,T._x)("Change vertical alignment","Block vertical alignment setting label"),controls:n.map((n=>{return{...fl[n],isActive:e===n,role:o?"menuitemradio":void 0,onClick:(r=n,()=>t(e===r?void 0:r))};var r})),...a})};const vl=e=>(0,d.jsx)(kl,{...e,isToolbar:!1}),_l=e=>(0,d.jsx)(kl,{...e,isToolbar:!0}),yl={left:As,center:Ns,right:Ls,"space-between":Ds,stretch:Os};var xl=function({allowedControls:e=["left","center","right","space-between"],isCollapsed:t=!0,onChange:n,value:o,popoverProps:r,isToolbar:i}){const s=e=>{n(e===o?void 0:e)},l=o?yl[o]:yl.left,a=[{name:"left",icon:As,title:(0,T.__)("Justify items left"),isActive:"left"===o,onClick:()=>s("left")},{name:"center",icon:Ns,title:(0,T.__)("Justify items center"),isActive:"center"===o,onClick:()=>s("center")},{name:"right",icon:Ls,title:(0,T.__)("Justify items right"),isActive:"right"===o,onClick:()=>s("right")},{name:"space-between",icon:Ds,title:(0,T.__)("Space between items"),isActive:"space-between"===o,onClick:()=>s("space-between")},{name:"stretch",icon:Os,title:(0,T.__)("Stretch items"),isActive:"stretch"===o,onClick:()=>s("stretch")}],c=i?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u=i?{isCollapsed:t}:{};return(0,d.jsx)(c,{icon:l,popoverProps:r,label:(0,T.__)("Change items justification"),controls:a.filter((t=>e.includes(t.name))),...u})};const Sl=e=>(0,d.jsx)(xl,{...e,isToolbar:!1}),wl=e=>(0,d.jsx)(xl,{...e,isToolbar:!0}),Cl={left:"flex-start",right:"flex-end",center:"center","space-between":"space-between"},Bl={left:"flex-start",right:"flex-end",center:"center",stretch:"stretch"},Il={top:"flex-start",center:"center",bottom:"flex-end",stretch:"stretch","space-between":"space-between"},jl="center",El="top",Tl=["wrap","nowrap"];var Ml={name:"flex",label:(0,T.__)("Flex"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowOrientation:o=!0,allowJustification:r=!0}=n;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.Flex,{children:[r&&(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Al,{layout:e,onChange:t})}),o&&(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Ll,{layout:e,onChange:t})})]}),(0,d.jsx)(Nl,{layout:e,onChange:t})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowVerticalAlignment:o=!0,allowJustification:r=!0}=n;return r||o?(0,d.jsxs)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:[r&&(0,d.jsx)(Al,{layout:e,onChange:t,isToolbar:!0}),o&&(0,d.jsx)(Pl,{layout:e,onChange:t})]}):null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{orientation:s="horizontal"}=t,l=n?.spacing?.blockGap&&!ks(o,"spacing","blockGap")?ul(n?.spacing?.blockGap,"0.5em"):void 0,a=Cl[t.justifyContent],c=Tl.includes(t.flexWrap)?t.flexWrap:"wrap",u=Il[t.verticalAlignment],d=Bl[t.justifyContent]||Bl.left;let p="";const h=[];return c&&"wrap"!==c&&h.push(`flex-wrap: ${c}`),"horizontal"===s?(u&&h.push(`align-items: ${u}`),a&&h.push(`justify-content: ${a}`)):(u&&h.push(`justify-content: ${u}`),h.push("flex-direction: column"),h.push(`align-items: ${d}`)),h.length&&(p=`${Hs(e)} {\n\t\t\t\t${h.join("; ")};\n\t\t\t}`),r&&l&&(p+=Us(e,i,"flex",l)),p},getOrientation(e){const{orientation:t="horizontal"}=e;return t},getAlignments:()=>[]};function Pl({layout:e,onChange:t}){const{orientation:n="horizontal"}=e,o="horizontal"===n?jl:El,{verticalAlignment:r=o}=e;return(0,d.jsx)(vl,{onChange:n=>{t({...e,verticalAlignment:n})},value:r,controls:"horizontal"===n?["top","center","bottom","stretch"]:["top","center","bottom","space-between"]})}const Rl={placement:"bottom-start"};function Al({layout:e,onChange:t,isToolbar:n=!1}){const{justifyContent:o="left",orientation:r="horizontal"}=e,i=n=>{t({...e,justifyContent:n})},s=["left","center","right"];if("horizontal"===r?s.push("space-between"):s.push("stretch"),n)return(0,d.jsx)(Sl,{allowedControls:s,value:o,onChange:i,popoverProps:Rl});const l=[{value:"left",icon:As,label:(0,T.__)("Justify items left")},{value:"center",icon:Ns,label:(0,T.__)("Justify items center")},{value:"right",icon:Ls,label:(0,T.__)("Justify items right")}];return"horizontal"===r?l.push({value:"space-between",icon:Ds,label:(0,T.__)("Space between items")}):l.push({value:"stretch",icon:Os,label:(0,T.__)("Stretch items")}),(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Justification"),value:o,onChange:i,className:"block-editor-hooks__flex-layout-justification-controls",children:l.map((({value:e,icon:t,label:n})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})}function Nl({layout:e,onChange:t}){const{flexWrap:n="wrap"}=e;return(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Allow to wrap to multiple lines"),onChange:n=>{t({...e,flexWrap:n?"wrap":"nowrap"})},checked:"wrap"===n})}function Ll({layout:e,onChange:t}){const{orientation:n="horizontal",verticalAlignment:o,justifyContent:r}=e;return(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-editor-hooks__flex-layout-orientation-controls",label:(0,T.__)("Orientation"),value:n,onChange:n=>{let i=o,s=r;return"horizontal"===n?("space-between"===o&&(i="center"),"stretch"===r&&(s="left")):("stretch"===o&&(i="top"),"space-between"===r&&(s="left")),t({...e,orientation:n,verticalAlignment:i,justifyContent:s})},children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:zs,value:"horizontal",label:(0,T.__)("Horizontal")}),(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:Vs,value:"vertical",label:(0,T.__)("Vertical")})]})}var Dl={name:"default",label:(0,T.__)("Flow"),inspectorControls:function(){return null},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,style:t,blockName:n,hasBlockGapSupport:o,layoutDefinitions:r=Fs}){const i=ul(t?.spacing?.blockGap);let s="";ks(n,"spacing","blockGap")||(i?.top?s=ul(i?.top):"string"==typeof i&&(s=ul(i)));let l="";return o&&s&&(l+=Us(e,r,"default",s)),l},getOrientation:()=>"vertical",getAlignments(e,t){const n=Gs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:n[e]})));const o=[{name:"left"},{name:"center"},{name:"right"}];if(!t){const{contentSize:t,wideSize:r}=e;t&&o.unshift({name:"full"}),r&&o.unshift({name:"wide",info:n.wide})}return o.unshift({name:"none",info:n.none}),o}},Ol=(0,h.forwardRef)((({icon:e,size:t=24,...n},o)=>(0,h.cloneElement)(e,{width:t,height:t,...n,ref:o}))),zl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),Vl=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M16 5.5H8V4h8v1.5ZM16 20H8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),Fl={name:"constrained",label:(0,T.__)("Constrained"),inspectorControls:function({layout:e,onChange:t,layoutBlockSupport:n={}}){const{wideSize:o,contentSize:r,justifyContent:i="center"}=e,{allowJustification:s=!0,allowCustomContentAndWideSize:l=!0}=n,a=[{value:"left",icon:As,label:(0,T.__)("Justify items left")},{value:"center",icon:Ns,label:(0,T.__)("Justify items center")},{value:"right",icon:Ls,label:(0,T.__)("Justify items right")}],[c]=Ti("spacing.units"),u=(0,ws.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vw"]});return(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,className:"block-editor-hooks__layout-constrained",children:[l&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Content width"),labelPosition:"top",value:r||o||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,contentSize:n})},units:u,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:zl})})}),(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Wide width"),labelPosition:"top",value:o||r||"",onChange:n=>{n=0>parseFloat(n)?"0":n,t({...e,wideSize:n})},units:u,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:Vl})})}),(0,d.jsx)("p",{className:"block-editor-hooks__layout-constrained-helptext",children:(0,T.__)("Customize the width for all elements that are assigned to the center or wide columns.")})]}),s&&(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Justification"),value:i,onChange:n=>{t({...e,justifyContent:n})},children:a.map((({value:e,icon:t,label:n})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:n},e)))})]})},toolBarControls:function({layout:e={},onChange:t,layoutBlockSupport:n}){const{allowJustification:o=!0}=n;return o?(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(Ul,{layout:e,onChange:t})}):null},getLayoutStyle:function({selector:e,layout:t={},style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{contentSize:s,wideSize:l,justifyContent:a}=t,c=ul(n?.spacing?.blockGap);let u="";ks(o,"spacing","blockGap")||(c?.top?u=ul(c?.top):"string"==typeof c&&(u=ul(c)));const d="left"===a?"0 !important":"auto !important",p="right"===a?"0 !important":"auto !important";let h=s||l?`\n\t\t\t\t\t${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")} {\n\t\t\t\t\t\tmax-width: ${s??l};\n\t\t\t\t\t\tmargin-left: ${d};\n\t\t\t\t\t\tmargin-right: ${p};\n\t\t\t\t\t}\n\t\t\t\t\t${Hs(e,"> .alignwide")} {\n\t\t\t\t\t\tmax-width: ${l??s};\n\t\t\t\t\t}\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`:"";if("left"===a?h+=`${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-left: ${d}; }`:"right"===a&&(h+=`${Hs(e,"> :where(:not(.alignleft):not(.alignright):not(.alignfull))")}\n\t\t\t{ margin-right: ${p}; }`),n?.spacing?.padding){(0,Pi.getCSSRules)(n).forEach((t=>{if("paddingRight"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-right: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}else if("paddingLeft"===t.key){const n="0"===t.value?"0px":t.value;h+=`\n\t\t\t\t\t${Hs(e,"> .alignfull")} {\n\t\t\t\t\t\tmargin-left: calc(${n} * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`}}))}return r&&u&&(h+=Us(e,i,"constrained",u)),h},getOrientation:()=>"vertical",getAlignments(e){const t=Gs(e);if(void 0!==e.alignments)return e.alignments.includes("none")||e.alignments.unshift("none"),e.alignments.map((e=>({name:e,info:t[e]})));const{contentSize:n,wideSize:o}=e,r=[{name:"left"},{name:"center"},{name:"right"}];return n&&r.unshift({name:"full"}),o&&r.unshift({name:"wide",info:t.wide}),r.unshift({name:"none",info:t.none}),r}};const Hl={placement:"bottom-start"};function Ul({layout:e,onChange:t}){const{justifyContent:n="center"}=e;return(0,d.jsx)(Sl,{allowedControls:["left","center","right"],value:n,onChange:n=>{t({...e,justifyContent:n})},popoverProps:Hl})}const Gl={px:600,"%":100,vw:100,vh:100,em:38,rem:38,svw:100,lvw:100,dvw:100,svh:100,lvh:100,dvh:100,vi:100,svi:100,lvi:100,dvi:100,vb:100,svb:100,lvb:100,dvb:100,vmin:100,svmin:100,lvmin:100,dvmin:100,vmax:100,svmax:100,lvmax:100,dvmax:100},$l=[{value:"px",label:"px",default:0},{value:"rem",label:"rem",default:0},{value:"em",label:"em",default:0}];var Wl={name:"grid",label:(0,T.__)("Grid"),inspectorControls:function({layout:e={},onChange:t,layoutBlockSupport:n={}}){const{allowSizingOnChildren:o=!1}=n,r=window.__experimentalEnableGridInteractivity||!!e?.columnCount,i=window.__experimentalEnableGridInteractivity||!e?.columnCount;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ql,{layout:e,onChange:t}),(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,children:[r&&(0,d.jsx)(Zl,{layout:e,onChange:t,allowSizingOnChildren:o}),i&&(0,d.jsx)(Kl,{layout:e,onChange:t})]})]})},toolBarControls:function(){return null},getLayoutStyle:function({selector:e,layout:t,style:n,blockName:o,hasBlockGapSupport:r,layoutDefinitions:i=Fs}){const{minimumColumnWidth:s=null,columnCount:l=null,rowCount:a=null}=t;const c=n?.spacing?.blockGap&&!ks(o,"spacing","blockGap")?ul(n?.spacing?.blockGap,"0.5em"):void 0;let u="";const d=[];if(s&&l>0){const e=`max(${s}, ( 100% - (${c||"1.2rem"}*${l-1}) ) / ${l})`;d.push(`grid-template-columns: repeat(auto-fill, minmax(${e}, 1fr))`,"container-type: inline-size"),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)}else l?(d.push(`grid-template-columns: repeat(${l}, minmax(0, 1fr))`),a&&d.push(`grid-template-rows: repeat(${a}, minmax(1rem, auto))`)):d.push(`grid-template-columns: repeat(auto-fill, minmax(min(${s||"12rem"}, 100%), 1fr))`,"container-type: inline-size");return d.length&&(u=`${Hs(e)} { ${d.join("; ")}; }`),r&&c&&(u+=Us(e,i,"grid",c)),u},getOrientation:()=>"horizontal",getAlignments:()=>[]};function Kl({layout:e,onChange:t}){const{minimumColumnWidth:n,columnCount:o,isManualPlacement:r}=e,i=n||(r||o?null:"12rem"),[s,l="rem"]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(i);return(0,d.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-minimum-width-control",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Minimum column width")}),(0,d.jsxs)(ws.Flex,{gap:4,children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalUnitControl,{size:"__unstable-large",onChange:n=>{t({...e,minimumColumnWidth:""===n?void 0:n})},onUnitChange:n=>{let o;["em","rem"].includes(n)&&"px"===l?o=(s/16).toFixed(2)+n:["em","rem"].includes(l)&&"px"===n&&(o=Math.round(16*s)+n),t({...e,minimumColumnWidth:o})},value:i,units:$l,min:0,label:(0,T.__)("Minimum column width"),hideLabelFromVision:!0})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:n=>{t({...e,minimumColumnWidth:[n,l].join("")})},value:s||0,min:0,max:Gl[l]||600,withInputField:!1,label:(0,T.__)("Minimum column width"),hideLabelFromVision:!0})})]})]})}function Zl({layout:e,onChange:t,allowSizingOnChildren:n}){const o=window.__experimentalEnableGridInteractivity?void 0:3,{columnCount:r=o,rowCount:i,isManualPlacement:s}=e;return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("fieldset",{className:"block-editor-hooks__grid-layout-columns-and-rows-controls",children:[(!window.__experimentalEnableGridInteractivity||!s)&&(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Columns")}),(0,d.jsxs)(ws.Flex,{gap:4,children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{if(window.__experimentalEnableGridInteractivity){const o=""===n||"0"===n?s?1:void 0:parseInt(n,10);t({...e,columnCount:o})}else{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,columnCount:o})}},value:r,min:1,label:(0,T.__)("Columns"),hideLabelFromVision:!window.__experimentalEnableGridInteractivity||!s})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:window.__experimentalEnableGridInteractivity&&n&&s?(0,d.jsx)(ws.__experimentalNumberControl,{size:"__unstable-large",onChange:n=>{const o=""===n||"0"===n?1:parseInt(n,10);t({...e,rowCount:o})},value:i,min:1,label:(0,T.__)("Rows")}):(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:r??1,onChange:n=>t({...e,columnCount:""===n||"0"===n?1:n}),min:1,max:16,withInputField:!1,label:(0,T.__)("Columns"),hideLabelFromVision:!0})})]})]})})}function ql({layout:e,onChange:t}){const{columnCount:n,rowCount:o,minimumColumnWidth:r,isManualPlacement:i}=e,[s,l]=(0,h.useState)(n||3),[a,c]=(0,h.useState)(o),[u,p]=(0,h.useState)(r||"12rem"),g=i||n&&!window.__experimentalEnableGridInteractivity?"manual":"auto",m="manual"===g?(0,T.__)("Grid items can be manually placed in any position on the grid."):(0,T.__)("Grid items are placed automatically depending on their order.");return(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Grid item position"),value:g,onChange:i=>{"manual"===i?p(r||"12rem"):(l(n||3),c(o)),t({...e,columnCount:"manual"===i?s:null,rowCount:"manual"===i&&window.__experimentalEnableGridInteractivity?a:void 0,isManualPlacement:!("manual"!==i||!window.__experimentalEnableGridInteractivity)||void 0,minimumColumnWidth:"auto"===i?u:null})},isBlock:!0,help:window.__experimentalEnableGridInteractivity?m:void 0,children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"auto",label:(0,T.__)("Auto")},"auto"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"manual",label:(0,T.__)("Manual")},"manual")]})}const Yl=[Dl,Ml,Fl,Wl];function Xl(e="default"){return Yl.find((t=>t.name===e))}const Ql={type:"default"},Jl=(0,h.createContext)(Ql);Jl.displayName="BlockLayoutContext";const ea=Jl.Provider;function ta(){return(0,h.useContext)(Jl)}const na=[],oa=["none","left","center","right","wide","full"],ra=["wide","full"];function ia(e=oa){e.includes("none")||(e=["none",...e]);const t=1===e.length&&"none"===e[0],[n,o,r]=(0,g.useSelect)((e=>{if(t)return[!1,!1,!1];const n=e(ji).getSettings();return[n.alignWide??!1,n.supportsLayout,n.__unstableIsBlockBasedTheme]}),[t]),i=ta();if(t)return na;const s=Xl(i?.type);if(o){const t=s.getAlignments(i,r).filter((t=>e.includes(t.name)));return 1===t.length&&"none"===t[0].name?na:t}if("default"!==s.name&&"constrained"!==s.name)return na;const l=e.filter((e=>i.alignments?i.alignments.includes(e):!(!n&&ra.includes(e))&&oa.includes(e))).map((e=>({name:e})));return 1===l.length&&"none"===l[0].name?na:l}var sa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),la=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),aa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),ca=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M5 4h14v11H5V4Zm11 16H8v-1.5h8V20Z"})});const ua={none:{icon:zl,title:(0,T._x)("None","Alignment option")},left:{icon:sa,title:(0,T.__)("Align left")},center:{icon:la,title:(0,T.__)("Align center")},right:{icon:aa,title:(0,T.__)("Align right")},wide:{icon:Vl,title:(0,T.__)("Wide width")},full:{icon:ca,title:(0,T.__)("Full width")}};var da=function({value:e,onChange:t,controls:n,isToolbar:o,isCollapsed:r=!0}){const i=ia(n);if(!!!i.length)return null;function s(n){t([e,"none"].includes(n)?void 0:n)}const l=ua[e],a=ua.none,c=o?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u={icon:l?l.icon:a.icon,label:(0,T.__)("Align")},p=o?{isCollapsed:r,controls:i.map((({name:t})=>({...ua[t],isActive:e===t||!e&&"none"===t,role:r?"menuitemradio":void 0,onClick:()=>s(t)})))}:{toggleProps:{description:(0,T.__)("Change alignment")},children:({onClose:t})=>(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.MenuGroup,{className:"block-editor-block-alignment-control__menu-group",children:i.map((({name:n,info:o})=>{const{icon:r,title:i}=ua[n],l=n===e||!e&&"none"===n;return(0,d.jsx)(ws.MenuItem,{icon:r,iconPosition:"left",className:ms("components-dropdown-menu__menu-item",{"is-active":l}),isSelected:l,onClick:()=>{s(n),t()},role:"menuitemradio",info:o,children:i},n)}))})})};return(0,d.jsx)(c,{...u,...p})};const pa=e=>(0,d.jsx)(da,{...e,isToolbar:!1}),ha=e=>(0,d.jsx)(da,{...e,isToolbar:!0});function ga(e){const t=C(),{clientId:n=""}=t,{setBlockEditingMode:o,unsetBlockEditingMode:r}=(0,g.useDispatch)(ji),i=(0,g.useSelect)((e=>n?null:e(ji).getBlockEditingMode()),[n]);return(0,h.useEffect)((()=>(e&&o(n,e),()=>{e&&r(n)})),[n,e,o,r]),n?t[v]:i}const ma=["left","center","right","wide","full"],fa=["wide","full"];function ba(e,t=!0,n=!0){let o;return o=Array.isArray(e)?ma.filter((t=>e.includes(t))):!0===e?[...ma]:[],!n||!0===e&&!t?o.filter((e=>!fa.includes(e))):o}var ka={shareWithChildBlocks:!0,edit:function({name:e,align:t,setAttributes:n}){const o=ia(ba((0,p.getBlockSupport)(e,"align"),(0,p.hasBlockSupport)(e,"alignWide",!0))).map((({name:e})=>e)),r=ga();return o.length&&"default"===r?(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(pa,{value:t,onChange:t=>{if(!t){const n=(0,p.getBlockType)(e),o=n?.attributes?.align?.default;o&&(t="")}n({align:t})},controls:o})}):null},useBlockProps:function({name:e,align:t}){const n=ba((0,p.getBlockSupport)(e,"align"),(0,p.hasBlockSupport)(e,"alignWide",!0));if(ia(n).some((e=>e.name===t)))return{"data-align":t};return{}},addSaveProps:function(e,t,n){const{align:o}=n,r=(0,p.getBlockSupport)(t,"align"),i=(0,p.hasBlockSupport)(t,"alignWide",!0);ba(r,i).includes(o)&&(e.className=ms(`align${o}`,e.className));return e},attributeKeys:["align"],hasSupport:e=>(0,p.hasBlockSupport)(e,"align",!1)};(0,f.addFilter)("blocks.registerBlockType","core/editor/align/addAttribute",(function(e){return"type"in(e.attributes?.align??{})||(0,p.hasBlockSupport)(e,"align")&&(e.attributes={...e.attributes,align:{type:"string",enum:[...ma,""]}}),e}));const va=(0,ws.createSlotFill)("InspectorControls"),_a=(0,ws.createSlotFill)("InspectorAdvancedControls"),ya=(0,ws.createSlotFill)("InspectorControlsBindings"),xa=(0,ws.createSlotFill)("InspectorControlsBackground"),Sa=(0,ws.createSlotFill)("InspectorControlsBorder"),wa=(0,ws.createSlotFill)("InspectorControlsColor"),Ca=(0,ws.createSlotFill)("InspectorControlsFilter"),Ba=(0,ws.createSlotFill)("InspectorControlsDimensions"),Ia=(0,ws.createSlotFill)("InspectorControlsPosition"),ja=(0,ws.createSlotFill)("InspectorControlsTypography"),Ea=(0,ws.createSlotFill)("InspectorControlsListView"),Ta=(0,ws.createSlotFill)("InspectorControlsStyles");var Ma={default:va,advanced:_a,background:xa,bindings:ya,border:Sa,color:wa,dimensions:Ba,effects:(0,ws.createSlotFill)("InspectorControlsEffects"),filter:Ca,list:Ea,position:Ia,settings:va,styles:Ta,typography:ja};const Pa=(0,ws.createSlotFill)(Symbol("PrivateInspectorControlsAllowedBlocks"));function Ra({children:e,group:t="default",__experimentalGroup:n,resetAllFilter:o}){n&&(I()("`__experimentalGroup` property in `InspectorControlsFill`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=n);const r=C(),i=Ma[t]?.Fill;return i?r[b]?(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(i,{children:t=>(0,d.jsx)(Na,{fillProps:t,children:e,resetAllFilter:o})})}):null:(js()(`Unknown InspectorControls group "${t}" provided.`),null)}function Aa({resetAllFilter:e,children:t}){const{registerResetAllFilter:n,deregisterResetAllFilter:o}=(0,h.useContext)(ws.__experimentalToolsPanelContext);return(0,h.useEffect)((()=>{if(e&&n&&o)return n(e),()=>{o(e)}}),[e,n,o]),t}function Na({children:e,resetAllFilter:t,fillProps:n}){const{forwardedContext:o=[]}=n,r=(0,d.jsx)(Aa,{resetAllFilter:t,children:e});return o.reduce(((e,[t,n])=>(0,d.jsx)(t,{...n,children:e})),r)}function La({children:e,group:t,label:n}){const{updateBlockAttributes:o}=(0,g.useDispatch)(ji),{getBlockAttributes:r,getMultiSelectedBlockClientIds:i,getSelectedBlockClientId:s,hasMultiSelection:l}=(0,g.useSelect)(ji),a=Ji(),c=s(),u=(0,h.useCallback)(((e=[])=>{const t={},n=l()?i():[c];n.forEach((n=>{const{style:o}=r(n);let i={style:o};e.forEach((e=>{i={...i,...e(i)}})),i={...i,style:fs(i.style)},t[n]=i})),o(n,t,!0)}),[r,i,l,c,o]);return(0,d.jsx)(ws.__experimentalToolsPanel,{className:`${t}-block-support-panel`,label:n,resetAll:u,panelId:c,hasInnerWrapper:!0,shouldRenderPlaceholderItems:!0,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:a,children:e},c)}function Da({Slot:e,fillProps:t,...n}){const o=(0,h.useContext)(ws.__experimentalToolsPanelContext),r=(0,h.useMemo)((()=>({...t??{},forwardedContext:[...t?.forwardedContext??[],[ws.__experimentalToolsPanelContext.Provider,{value:o}]]})),[o,t]);return(0,d.jsx)(e,{...n,fillProps:r,bubblesVirtually:!0})}function Oa({__experimentalGroup:e,group:t="default",label:n,fillProps:o,...r}){e&&(I()("`__experimentalGroup` property in `InspectorControlsSlot`",{since:"6.2",version:"6.4",alternative:"`group`"}),t=e);const i=Ma[t],s=(0,ws.__experimentalUseSlotFills)(i?.name);if(!i)return js()(`Unknown InspectorControls group "${t}" provided.`),null;if(!s?.length)return null;const{Slot:l}=i;return n?(0,d.jsx)(La,{group:t,label:n,children:(0,d.jsx)(Da,{...r,fillProps:o,Slot:l})}):(0,d.jsx)(l,{...r,fillProps:o,bubblesVirtually:!0})}const za=Ra;za.Slot=Oa;const Va=e=>(0,d.jsx)(Ra,{...e,group:"advanced"});Va.Slot=e=>(0,d.jsx)(Oa,{...e,group:"advanced"}),Va.slotName="InspectorAdvancedControls";var Fa=za,Ha=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 11.5h10V13H7z"})});const Ua=window.wp.url,Ga=window.wp.dom,$a=window.wp.blob,Wa=window.wp.keycodes;var Ka=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),Za=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})}),qa=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});var Ya=(0,ws.withFilters)("editor.MediaUpload")((()=>null));var Xa=function({fallback:e=null,children:t}){const n=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return!!t().mediaUpload}),[]);return n?t:e};const Qa=window.wp.isShallowEqual;var Ja=n.n(Qa),ec=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),tc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})}),nc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),oc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});var rc=function e({children:t,settingsOpen:n,setSettingsOpen:o}){const r=(0,m.useReducedMotion)(),i=r?h.Fragment:ws.__unstableAnimatePresence,s=r?"div":ws.__unstableMotion.div,l=`link-control-settings-drawer-${(0,m.useInstanceId)(e)}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-link-control__drawer-toggle","aria-expanded":n,onClick:()=>o(!n),icon:(0,T.isRTL)()?nc:oc,"aria-controls":l,children:(0,T._x)("Advanced","Additional link settings")}),(0,d.jsx)(i,{children:n&&(0,d.jsx)(s,{className:"block-editor-link-control__drawer",hidden:!n,id:l,initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.1},children:(0,d.jsx)("div",{className:"block-editor-link-control__drawer-inner",children:t})})})]})},ic=n(1609);function sc(e){return"function"==typeof e}class lc extends h.Component{constructor(e){super(e),this.onChange=this.onChange.bind(this),this.onFocus=this.onFocus.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.selectLink=this.selectLink.bind(this),this.handleOnClick=this.handleOnClick.bind(this),this.bindSuggestionNode=this.bindSuggestionNode.bind(this),this.autocompleteRef=e.autocompleteRef||(0,h.createRef)(),this.inputRef=e.inputRef||(0,h.createRef)(),this.updateSuggestions=(0,m.debounce)(this.updateSuggestions.bind(this),200),this.suggestionNodes=[],this.suggestionsRequest=null,this.state={suggestions:[],showSuggestions:!1,suggestionsValue:null,selectedSuggestion:null,suggestionsListboxId:"",suggestionOptionIdPrefix:""}}componentDidUpdate(e){const{showSuggestions:t,selectedSuggestion:n}=this.state,{value:o,__experimentalShowInitialSuggestions:r=!1}=this.props;t&&null!==n&&this.suggestionNodes[n]&&this.suggestionNodes[n].scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}),e.value===o||this.props.disableSuggestions||(o?.length?this.updateSuggestions(o):r&&this.updateSuggestions())}componentDidMount(){this.shouldShowInitialSuggestions()&&this.updateSuggestions()}componentWillUnmount(){this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null}bindSuggestionNode(e){return t=>{this.suggestionNodes[e]=t}}shouldShowInitialSuggestions(){const{__experimentalShowInitialSuggestions:e=!1,value:t}=this.props;return e&&!(t&&t.length)}updateSuggestions(e=""){const{__experimentalFetchLinkSuggestions:t,__experimentalHandleURLSuggestions:n}=this.props;if(!t)return;const o=!e?.length;if(e=e.trim(),!o&&(e.length<2||!n&&(0,Ua.isURL)(e)))return this.suggestionsRequest?.cancel?.(),this.suggestionsRequest=null,void this.setState({suggestions:[],showSuggestions:!1,suggestionsValue:e,selectedSuggestion:null,loading:!1});this.setState({selectedSuggestion:null,loading:!0});const r=t(e,{isInitialSuggestions:o});r.then((t=>{this.suggestionsRequest===r&&(this.setState({suggestions:t,suggestionsValue:e,loading:!1,showSuggestions:!!t.length}),t.length?this.props.debouncedSpeak((0,T.sprintf)((0,T._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",t.length),t.length),"assertive"):this.props.debouncedSpeak((0,T.__)("No results."),"assertive"))})).catch((()=>{this.suggestionsRequest===r&&this.setState({loading:!1})})).finally((()=>{this.suggestionsRequest===r&&(this.suggestionsRequest=null)})),this.suggestionsRequest=r}onChange(e){this.props.onChange(e)}onFocus(){const{suggestions:e}=this.state,{disableSuggestions:t,value:n}=this.props;!n||t||e&&e.length||null!==this.suggestionsRequest||this.updateSuggestions(n)}onKeyDown(e){this.props.onKeyDown?.(e);const{showSuggestions:t,selectedSuggestion:n,suggestions:o,loading:r}=this.state;if(!t||!o.length||r){switch(e.keyCode){case Wa.UP:0!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(0,0));break;case Wa.DOWN:this.props.value.length!==e.target.selectionStart&&(e.preventDefault(),e.target.setSelectionRange(this.props.value.length,this.props.value.length));break;case Wa.ENTER:this.props.onSubmit&&(e.preventDefault(),this.props.onSubmit(null,e))}return}const i=this.state.suggestions[this.state.selectedSuggestion];switch(e.keyCode){case Wa.UP:{e.preventDefault();const t=n?n-1:o.length-1;this.setState({selectedSuggestion:t});break}case Wa.DOWN:{e.preventDefault();const t=null===n||n===o.length-1?0:n+1;this.setState({selectedSuggestion:t});break}case Wa.TAB:null!==this.state.selectedSuggestion&&(this.selectLink(i),this.props.speak((0,T.__)("Link selected.")));break;case Wa.ENTER:e.preventDefault(),null!==this.state.selectedSuggestion?(this.selectLink(i),this.props.onSubmit&&this.props.onSubmit(i,e)):this.props.onSubmit&&this.props.onSubmit(null,e)}}selectLink(e){this.props.onChange(e.url,e),this.setState({selectedSuggestion:null,showSuggestions:!1})}handleOnClick(e){this.selectLink(e),this.inputRef.current.focus()}static getDerivedStateFromProps({value:e,instanceId:t,disableSuggestions:n,__experimentalShowInitialSuggestions:o=!1},{showSuggestions:r}){let i=r;const s=e&&e.length;return o||s||(i=!1),!0===n&&(i=!1),{showSuggestions:i,suggestionsListboxId:`block-editor-url-input-suggestions-${t}`,suggestionOptionIdPrefix:`block-editor-url-input-suggestion-${t}`}}render(){return(0,d.jsxs)(d.Fragment,{children:[this.renderControl(),this.renderSuggestions()]})}renderControl(){const{label:e=null,className:t,isFullWidth:n,instanceId:o,placeholder:r=(0,T.__)("Paste URL or type to search"),__experimentalRenderControl:i,value:s="",hideLabelFromVision:l=!1,help:a=null,disabled:c=!1}=this.props,{loading:u,showSuggestions:p,selectedSuggestion:h,suggestionsListboxId:g,suggestionOptionIdPrefix:m}=this.state,f=`url-input-control-${o}`,b={id:f,label:e,className:ms("block-editor-url-input",t,{"is-full-width":n}),hideLabelFromVision:l},k={id:f,value:s,required:!0,type:"text",onChange:c?()=>{}:this.onChange,onFocus:c?()=>{}:this.onFocus,placeholder:r,onKeyDown:c?()=>{}:this.onKeyDown,role:"combobox","aria-label":e?void 0:(0,T.__)("URL"),"aria-expanded":p,"aria-autocomplete":"list","aria-owns":g,"aria-activedescendant":null!==h?`${m}-${h}`:void 0,ref:this.inputRef,disabled:c,suffix:this.props.suffix,help:a};return i?i(b,k,u):(0,d.jsxs)(ws.BaseControl,{__nextHasNoMarginBottom:!0,...b,children:[(0,d.jsx)(ws.__experimentalInputControl,{...k,__next40pxDefaultSize:!0}),u&&(0,d.jsx)(ws.Spinner,{})]})}renderSuggestions(){const{className:e,__experimentalRenderSuggestions:t}=this.props,{showSuggestions:n,suggestions:o,suggestionsValue:r,selectedSuggestion:i,suggestionsListboxId:s,suggestionOptionIdPrefix:l,loading:a}=this.state;if(!n||0===o.length)return null;const c={id:s,ref:this.autocompleteRef,role:"listbox"},u=(e,t)=>({role:"option",tabIndex:"-1",id:`${l}-${t}`,ref:this.bindSuggestionNode(t),"aria-selected":t===i||void 0});return sc(t)?t({suggestions:o,selectedSuggestion:i,suggestionsListProps:c,buildSuggestionItemProps:u,isLoading:a,handleSuggestionClick:this.handleOnClick,isInitialSuggestions:!r?.length,currentInputValue:r}):(0,d.jsx)(ws.Popover,{placement:"bottom",focusOnMount:!1,children:(0,d.jsx)("div",{...c,className:ms("block-editor-url-input__suggestions",{[`${e}__suggestions`]:e}),children:o.map(((e,t)=>(0,ic.createElement)(ws.Button,{__next40pxDefaultSize:!0,...u(0,t),key:e.id,className:ms("block-editor-url-input__suggestion",{"is-selected":t===i}),onClick:()=>this.handleOnClick(e)},e.title)))})})}}var ac=(0,m.compose)(m.withSafeTimeout,ws.withSpokenMessages,m.withInstanceId,(0,g.withSelect)(((e,t)=>{if(sc(t.__experimentalFetchLinkSuggestions))return;const{getSettings:n}=e(ji);return{__experimentalFetchLinkSuggestions:n().__experimentalFetchLinkSuggestions}})))(lc),cc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var uc=({searchTerm:e,onClick:t,itemProps:n,buttonText:o})=>{if(!e)return null;let r;return r=o?"function"==typeof o?o(e):o:(0,h.createInterpolateElement)((0,T.sprintf)((0,T.__)("Create: <mark>%s</mark>"),e),{mark:(0,d.jsx)("mark",{})}),(0,d.jsx)(ws.MenuItem,{...n,iconPosition:"left",icon:cc,className:"block-editor-link-control__search-item",onClick:t,children:r})},dc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})}),pc=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,d.jsx)(ue.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),hc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),gc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),mc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})}),fc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),bc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),kc=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});const vc={post:{icon:dc,label:(0,T.__)("Post")},page:{icon:pc,label:(0,T.__)("Page")},post_tag:{icon:hc,label:(0,T.__)("Tag")},category:{icon:gc,label:(0,T.__)("Category")},attachment:{icon:mc,label:(0,T.__)("Attachment")}};function _c({isURL:e,suggestion:t}){let n=null;return e?n=fc:t.type in vc&&(n=vc[t.type].icon,"page"===t.type&&(t.isFrontPage&&(n=bc),t.isBlogHome&&(n=kc))),n?(0,d.jsx)(Ol,{className:"block-editor-link-control__search-item-icon",icon:n}):null}function yc(e){const t=e?.trim();return t?.length?e?.replace(/^\/?/,"/"):e}function xc(e){const t=e?.trim();return t?.length?e?.replace(/\/$/,""):e}const Sc=({itemProps:e,suggestion:t,searchTerm:n,onClick:o,isURL:r=!1,shouldShowType:i=!1})=>{const s=r?(0,T.__)("Press ENTER to add this link"):(l=t.url)?(0,m.pipe)(Ua.safeDecodeURI,Ua.getPath,(e=>t=>null==t||t!=t?e:t)(""),((e,...t)=>(...n)=>e(...n,...t))(Ua.filterURLForDisplay,24),xc,yc)(l):l;var l;return(0,d.jsx)(ws.MenuItem,{...e,info:s,iconPosition:"left",icon:(0,d.jsx)(_c,{suggestion:t,isURL:r}),onClick:o,shortcut:i&&wc(t),className:"block-editor-link-control__search-item",children:(0,d.jsx)(ws.TextHighlight,{text:(0,Ga.__unstableStripHTML)(t.title),highlight:n})})};function wc(e){return e.isFrontPage?(0,T.__)("Front page"):e.isBlogHome?(0,T.__)("Blog home"):e.type in vc?vc[e.type].label:e.type}var Cc=Sc;const Bc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchItem",{since:"6.8"}),(0,d.jsx)(Sc,{...e})),Ic="__CREATE__",jc="link",Ec="mailto",Tc="internal",Mc=[jc,Ec,"tel",Tc],Pc=[{id:"opensInNewTab",title:(0,T.__)("Open in new tab")}];function Rc({withCreateSuggestion:e,currentInputValue:t,handleSuggestionClick:n,suggestionsListProps:o,buildSuggestionItemProps:r,suggestions:i,selectedSuggestion:s,isLoading:l,isInitialSuggestions:a,createSuggestionButtonText:c,suggestionsQuery:u}){const p=ms("block-editor-link-control__search-results",{"is-loading":l}),h=1===i.length&&Mc.includes(i[0].type),g=e&&!h&&!a,m=!u?.type,f=a?(0,T.__)("Suggestions"):(0,T.sprintf)((0,T.__)('Search results for "%s"'),t);return(0,d.jsx)("div",{className:"block-editor-link-control__search-results-wrapper",children:(0,d.jsx)("div",{...o,className:p,"aria-label":f,children:(0,d.jsx)(ws.MenuGroup,{children:i.map(((e,o)=>g&&Ic===e.type?(0,d.jsx)(uc,{searchTerm:t,buttonText:c,onClick:()=>n(e),itemProps:r(e,o),isSelected:o===s},e.type):Ic===e.type?null:(0,d.jsx)(Cc,{itemProps:r(e,o),suggestion:e,index:o,onClick:()=>{n(e)},isSelected:o===s,isURL:Mc.includes(e.type),searchTerm:t,shouldShowType:m,isFrontPage:e?.isFrontPage,isBlogHome:e?.isBlogHome},`${e.id}-${e.type}`)))})})})}var Ac=Rc;const Nc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchResults",{since:"6.8"}),(0,d.jsx)(Rc,{...e}));function Lc(e){if(e.includes(" "))return!1;const t=(0,Ua.getProtocol)(e),n=(0,Ua.isValidProtocol)(t),o=function(e,t=6){const n=e.split(/[?#]/)[0];return new RegExp(`(?<=\\S)\\.(?:[a-zA-Z_]{2,${t}})(?:\\/|$)`).test(n)}(e),r=e?.startsWith("www."),i=e?.startsWith("#")&&(0,Ua.isValidFragment)(e);return n||r||i||o}const Dc=()=>Promise.resolve([]),Oc=e=>{let t=jc;const n=(0,Ua.getProtocol)(e)||"";return n.includes("mailto")&&(t=Ec),n.includes("tel")&&(t="tel"),e?.startsWith("#")&&(t=Tc),Promise.resolve([{id:e,title:e,url:"URL"===t?(0,Ua.prependHTTP)(e):e,type:t}])};function zc(e,t,n){const{fetchSearchSuggestions:o,pageOnFront:r,pageForPosts:i}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{pageOnFront:t().pageOnFront,pageForPosts:t().pageForPosts,fetchSearchSuggestions:t().__experimentalFetchLinkSuggestions}}),[]),s=t?Oc:Dc;return(0,h.useCallback)(((t,{isInitialSuggestions:l})=>Lc(t)?s(t,{isInitialSuggestions:l}):(async(e,t,n,o,r,i)=>{const{isInitialSuggestions:s}=t,l=await n(e,t);return l.map((e=>Number(e.id)===r?(e.isFrontPage=!0,e):Number(e.id)===i?(e.isBlogHome=!0,e):e)),s||Lc(e)||!o?l:l.concat({title:e,url:e,type:Ic})})(t,{...e,isInitialSuggestions:l},o,n,r,i)),[s,o,r,i,e,n])}const Vc=()=>Promise.resolve([]),Fc=()=>{},Hc=(0,h.forwardRef)((({value:e,children:t,currentLink:n={},className:o=null,placeholder:r=null,withCreateSuggestion:i=!1,onCreateSuggestion:s=Fc,onChange:l=Fc,onSelect:a=Fc,showSuggestions:c=!0,renderSuggestions:u=e=>(0,d.jsx)(Ac,{...e}),fetchSuggestions:p=null,allowDirectEntry:g=!0,showInitialSuggestions:m=!1,suggestionsQuery:f={},withURLSuggestion:b=!0,createSuggestionButtonText:k,hideLabelFromVision:v=!1,suffix:_,isEntity:y=!1},x)=>{const S=zc(f,g,i),w=c?p||S:Vc,[C,B]=(0,h.useState)(),I=async e=>{let t=e;if(Ic!==e.type){if(g||t&&Object.keys(t).length>=1){const{id:e,url:o,...r}=n??{};a({...r,...t},t)}}else try{t=await s(e.title),t?.url&&a(t)}catch(e){}},j=r??(0,T.__)("Search or type URL"),E=v&&""!==r?j:(0,T.__)("Link");return(0,d.jsxs)("div",{className:"block-editor-link-control__search-input-container",children:[(0,d.jsx)(ac,{disableSuggestions:n?.url===e,label:E,hideLabelFromVision:v,className:o,value:e,onChange:(e,t)=>{l(e),B(t)},placeholder:j,__experimentalRenderSuggestions:c?e=>u({...e,withCreateSuggestion:i,createSuggestionButtonText:k,suggestionsQuery:f,handleSuggestionClick:t=>{e.handleSuggestionClick&&e.handleSuggestionClick(t),I(t)}}):null,__experimentalFetchLinkSuggestions:w,__experimentalHandleURLSuggestions:!0,__experimentalShowInitialSuggestions:m,onSubmit:(t,n)=>{const o=t||C;o||e?.trim()?.length?I(o||{url:e}):n.preventDefault()},inputRef:x,suffix:_,disabled:y}),t]})}));var Uc=Hc;const Gc=e=>(I()("wp.blockEditor.__experimentalLinkControlSearchInput",{since:"6.8"}),(0,d.jsx)(Hc,{...e}));var $c=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})}),Wc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),Kc=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});const{Slot:Zc,Fill:qc}=(0,ws.createSlotFill)("BlockEditorLinkControlViewer");function Yc(e,t){switch(t.type){case"RESOLVED":return{...e,isFetching:!1,richData:t.richData};case"ERROR":return{...e,isFetching:!1,richData:null};case"LOADING":return{...e,isFetching:!0};default:throw new Error(`Unexpected action type ${t.type}`)}}var Xc=function(e){const[t,n]=(0,h.useReducer)(Yc,{richData:null,isFetching:!1}),{fetchRichUrlData:o}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{fetchRichUrlData:t().__experimentalFetchRichUrlData}}),[]);return(0,h.useEffect)((()=>{if(e?.length&&o&&"undefined"!=typeof AbortController){n({type:"LOADING"});const t=new window.AbortController,r=t.signal;return o(e,{signal:r}).then((e=>{n({type:"RESOLVED",richData:e})})).catch((()=>{r.aborted||n({type:"ERROR"})})),()=>{t.abort()}}}),[e]),t};function Qc({value:e,onEditClick:t,hasRichPreviews:n=!1,hasUnlinkControl:o=!1,onRemove:r}){const i=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]),s=n?e?.url:null,{richData:l,isFetching:a}=Xc(s),c=l&&Object.keys(l).length,u=e&&(0,Ua.filterURLForDisplay)((0,Ua.safeDecodeURI)(e.url),24)||"",p=!e?.url?.length,h=!p&&(0,Ga.__unstableStripHTML)(l?.title||e?.title||u),f=!e?.url||h.replace(/^[a-z\-.\+]+[0-9]*:(\/\/)?/i,"").replace(/^www\./i,"")===u;let b;b=l?.icon?(0,d.jsx)("img",{src:l?.icon,alt:""}):p?(0,d.jsx)(Ol,{icon:$c,size:32}):(0,d.jsx)(Ol,{icon:fc});const{createNotice:k}=(0,g.useDispatch)(pr.store),v=(0,m.useCopyToClipboard)(e.url,(()=>{k("info",(0,T.__)("Link copied to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,d.jsx)("div",{role:"group","aria-label":(0,T.__)("Manage link"),className:ms("block-editor-link-control__search-item",{"is-current":!0,"is-rich":c,"is-fetching":!!a,"is-preview":!0,"is-error":p,"is-url-title":h===u}),children:(0,d.jsxs)("div",{className:"block-editor-link-control__search-item-top",children:[(0,d.jsxs)("span",{className:"block-editor-link-control__search-item-header",role:"figure","aria-label":(0,T.__)("Link information"),children:[(0,d.jsx)("span",{className:ms("block-editor-link-control__search-item-icon",{"is-image":l?.icon}),children:b}),(0,d.jsx)("span",{className:"block-editor-link-control__search-item-details",children:p?(0,d.jsx)("span",{className:"block-editor-link-control__search-item-error-notice",children:(0,T.__)("Link is empty")}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ExternalLink,{className:"block-editor-link-control__search-item-title",href:e.url,children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,children:h})}),!f&&(0,d.jsx)("span",{className:"block-editor-link-control__search-item-info",children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,children:u})})]})})]}),(0,d.jsx)(ws.Button,{icon:Wc,label:(0,T.__)("Edit link"),onClick:t,size:"compact",showTooltip:!i}),o&&(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Remove link"),onClick:r,size:"compact",showTooltip:!i}),(0,d.jsx)(ws.Button,{icon:Kc,label:(0,T.__)("Copy link"),ref:v,accessibleWhenDisabled:!0,disabled:p,size:"compact",showTooltip:!i}),(0,d.jsx)(Zc,{fillProps:e})]})})}const Jc=()=>{};var eu=({value:e,onChange:t=Jc,settings:n})=>{if(!n||!n.length)return null;const o=n=>o=>{t({...e,[n.id]:o})},r=n.map((n=>{if("render"in n){if("function"==typeof n.render){const o=n.render(n,e,t);return(0,d.jsx)("div",{className:"block-editor-link-control__setting",children:o},n.id)}return null}return(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-link-control__setting",label:n.title,onChange:o(n),checked:!!e&&!!e[n.id],help:n?.help},n.id)})).filter(Boolean);return(0,d.jsxs)("fieldset",{className:"block-editor-link-control__settings",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Currently selected link settings")}),r]})};const tu=e=>{let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o({isCanceled:!0}):n(e)),(e=>o(t?{isCanceled:!0}:e)))})),cancel(){t=!0}}};var nu=n(5215),ou=n.n(nu);const ru=()=>{},iu="core/block-editor",su="linkControlSettingsDrawer";function lu({searchInputPlaceholder:e,value:t,settings:n=Pc,onChange:o=ru,onRemove:r,onCancel:i,noDirectEntry:s=!1,showSuggestions:l=!0,showInitialSuggestions:a,forceIsEditingLink:c,createSuggestion:u,withCreateSuggestion:p,inputValue:f="",suggestionsQuery:b={},noURLSuggestion:k=!1,createSuggestionButtonText:v,hasRichPreviews:_=!1,hasTextControl:y=!1,renderControlBottom:x=null,handleEntities:S=!1}){void 0===p&&u&&(p=!0);const[w,C]=(0,h.useState)(!1),{advancedSettingsPreference:B}=(0,g.useSelect)((e=>({advancedSettingsPreference:e(hr.store).get(iu,su)??!1})),[]),{set:I}=(0,g.useDispatch)(hr.store),j=B||w,E=(0,h.useRef)(!0),M=(0,h.useRef)(),P=(0,h.useRef)(),R=(0,h.useRef)(),A=(0,h.useRef)(!1),N=n.map((({id:e})=>e)),[L,D,O,z,V]=function(e){const[t,n]=(0,h.useState)(e||{}),[o,r]=(0,h.useState)(e);return ou()(e,o)||(r(e),n(e)),[t,n,e=>{n({...t,url:e})},e=>{n({...t,title:e})},e=>o=>{const r=Object.keys(o).reduce(((t,n)=>(e.includes(n)&&(t[n]=o[n]),t)),{});n({...t,...r})}]}(t),F=S&&!!L?.id,H=(0,m.useInstanceId)(lu,"link-control"),U=F?`${H}__help`:null,G=t&&!(0,Qa.isShallowEqualObjects)(L,t),[$,W]=(0,h.useState)(void 0!==c?c:!t||!t.url),{createPage:K,isCreatingPage:Z,errorMessage:q}=function(e){const t=(0,h.useRef)(),[n,o]=(0,h.useState)(!1),[r,i]=(0,h.useState)(null);return(0,h.useEffect)((()=>()=>{t.current&&t.current.cancel()}),[]),{createPage:async function(n){o(!0),i(null);try{return t.current=tu(Promise.resolve(e(n))),await t.current.promise}catch(e){if(e&&e.isCanceled)return;throw i(e.message||(0,T.__)("An unknown error occurred during creation. Please try again.")),e}finally{o(!1)}},isCreatingPage:n,errorMessage:r}}(u);(0,h.useEffect)((()=>{void 0!==c&&W(c)}),[c]),(0,h.useEffect)((()=>{if(E.current)return;(Ga.focus.focusable.find(M.current)[0]||M.current).focus(),A.current=!1}),[$,Z]),(0,h.useEffect)((()=>(E.current=!1,()=>{E.current=!0})),[]);const Y=t?.url?.trim()?.length>0,X=()=>{A.current=!!M.current?.contains(M.current.ownerDocument.activeElement),W(!1)},Q=()=>{G&&o({...t,...L,url:te}),X()},[J,ee]=(0,h.useState)(!1);(0,h.useEffect)((()=>{J&&(R.current?.focus(),ee(!1))}),[J]);const te=f||L?.url||"",ne=!te?.trim()?.length,oe=r&&t&&!$&&!Z,re=$&&Y,ie=Y&&y,se=($||!t)&&!Z,le=!G||ne,ae=!!n?.length&&$&&Y;return(0,d.jsxs)("div",{tabIndex:-1,ref:M,className:"block-editor-link-control",children:[Z&&(0,d.jsxs)("div",{className:"block-editor-link-control__loading",children:[(0,d.jsx)(ws.Spinner,{})," ",(0,T.__)("Creating"),"…"]}),se&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:ms({"block-editor-link-control__search-input-wrapper":!0,"has-text-control":ie,"has-actions":re}),children:[ie&&(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,ref:P,className:"block-editor-link-control__field block-editor-link-control__text-content",label:(0,T.__)("Text"),value:L?.title,onChange:z,onKeyDown:e=>{const{keyCode:t}=e;t!==Wa.ENTER||ne||(e.preventDefault(),Q())},__next40pxDefaultSize:!0}),(0,d.jsx)(Uc,{ref:R,currentLink:t,className:"block-editor-link-control__field block-editor-link-control__search-input",placeholder:e,value:te,withCreateSuggestion:p,onCreateSuggestion:K,onChange:O,onSelect:e=>{const t=Object.keys(e).reduce(((t,n)=>(N.includes(n)||(t[n]=e[n]),t)),{});o({...L,...t,title:L?.title||e?.title}),X()},showInitialSuggestions:a,allowDirectEntry:!s,showSuggestions:l,suggestionsQuery:b,withURLSuggestion:!k,createSuggestionButtonText:v,hideLabelFromVision:!ie,isEntity:F,suffix:(0,d.jsx)(au,{isEntity:F,showActions:re,isDisabled:le,onUnlink:()=>{const{id:e,kind:t,type:n,...o}=L;D({...o,id:void 0,kind:void 0,type:void 0,url:void 0}),ee(!0)},onSubmit:Q,helpTextId:U})}),F&&U&&(0,d.jsx)("p",{id:U,className:"block-editor-link-control__help",children:(0,T.sprintf)((0,T.__)("Synced with the selected %s."),L?.type||"item")})]}),q&&(0,d.jsx)(ws.Notice,{className:"block-editor-link-control__search-error",status:"error",isDismissible:!1,children:q})]}),t&&!$&&!Z&&(0,d.jsx)(Qc,{value:t,onEditClick:()=>W(!0),hasRichPreviews:_,hasUnlinkControl:oe,onRemove:()=>{r(),W(!0)}},t?.url),ae&&(0,d.jsx)("div",{className:"block-editor-link-control__tools",children:!ne&&(0,d.jsx)(rc,{settingsOpen:j,setSettingsOpen:e=>{I&&I(iu,su,e),C(e)},children:(0,d.jsx)(eu,{value:L,settings:n,onChange:V(N)})})}),re&&(0,d.jsxs)(ws.__experimentalHStack,{justify:"right",className:"block-editor-link-control__search-actions",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),D(t),Y?X():r?.(),i?.()},children:(0,T.__)("Cancel")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:le?ru:Q,className:"block-editor-link-control__search-submit","aria-disabled":le,children:(0,T.__)("Apply")})]}),!Z&&x&&x()]})}function au({isEntity:e,showActions:t,isDisabled:n,onUnlink:o,onSubmit:r,helpTextId:i}){return e?(0,d.jsx)(ws.Button,{icon:ec,onClick:o,"aria-describedby":i,showTooltip:!0,label:(0,T.__)("Unsync and edit"),__next40pxDefaultSize:!0}):t?void 0:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{onClick:n?ru:r,label:(0,T.__)("Submit"),icon:tc,className:"block-editor-link-control__search-submit","aria-disabled":n,size:"small"})})}lu.ViewerFill=qc,lu.DEFAULT_LINK_SETTINGS=Pc;const cu=e=>(I()("wp.blockEditor.__experimentalLinkControl",{since:"6.8",alternative:"wp.blockEditor.LinkControl"}),(0,d.jsx)(lu,{...e}));cu.ViewerFill=lu.ViewerFill,cu.DEFAULT_LINK_SETTINGS=lu.DEFAULT_LINK_SETTINGS;var uu=lu;const du=()=>{};let pu=0;var hu=(0,m.compose)([(0,g.withDispatch)((e=>{const{createNotice:t,removeNotice:n}=e(pr.store);return{createNotice:t,removeNotice:n}})),(0,ws.withFilters)("editor.MediaReplaceFlow")])((({mediaURL:e,mediaId:t,mediaIds:n,allowedTypes:o,accept:r,onError:i,onSelect:s,onSelectURL:l,onReset:a,onToggleFeaturedImage:c,useFeaturedImage:u,onFilesUpload:p=du,name:h=(0,T.__)("Replace"),createNotice:m,removeNotice:f,children:b,multiple:k=!1,addToGallery:v,handleUpload:_=!0,popoverProps:y,renderToggle:x})=>{const{getSettings:S}=(0,g.useSelect)(ji),w="block-editor/media-replace-flow/error-notice/"+ ++pu,C=e=>{const t=(0,Ga.__unstableStripHTML)(e);i?i(t):setTimeout((()=>{m("error",t,{speak:!0,id:w,isDismissible:!0})}),1e3)},B=(e,t)=>{u&&c&&c(),t(),s(e),(0,Uo.speak)((0,T.__)("The media file has been replaced")),f(w)},I=e=>{e.keyCode===Wa.DOWN&&(e.preventDefault(),e.target.click())},j=k&&!(!o||0===o.length)&&o.every((e=>"image"===e||e.startsWith("image/")));return(0,d.jsx)(ws.Dropdown,{popoverProps:y,contentClassName:"block-editor-media-replace-flow__options",renderToggle:({isOpen:e,onToggle:t})=>x?x({"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:I,children:h}):(0,d.jsx)(ws.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:t,onKeyDown:I,children:h}),renderContent:({onClose:i})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.NavigableMenu,{className:"block-editor-media-replace-flow__media-upload-menu",children:[(0,d.jsxs)(Xa,{children:[(0,d.jsx)(Ya,{gallery:j,addToGallery:v,multiple:k,value:k?n:t,onSelect:e=>B(e,i),allowedTypes:o,render:({open:e})=>(0,d.jsx)(ws.MenuItem,{icon:Ka,onClick:e,children:(0,T.__)("Open Media Library")})}),(0,d.jsx)(ws.FormFileUpload,{onChange:e=>{((e,t)=>{const n=e.target.files;if(!_)return t(),s(n);p(n),S().mediaUpload({allowedTypes:o,filesList:n,onFileChange:([e])=>{B(e,t)},onError:C})})(e,i)},accept:r,multiple:!!k,render:({openFileDialog:e})=>(0,d.jsx)(ws.MenuItem,{icon:Za,onClick:()=>{e()},children:(0,T._x)("Upload","verb")})})]}),c&&(0,d.jsx)(ws.MenuItem,{icon:qa,onClick:c,isPressed:u,children:(0,T.__)("Use featured image")}),e&&a&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{a(),i()},children:(0,T.__)("Reset")}),"function"==typeof b?b({onClose:i}):b]}),l&&(0,d.jsxs)("form",{className:"block-editor-media-flow__url-input",children:[(0,d.jsx)("span",{className:"block-editor-media-replace-flow__image-url-label",children:(0,T.__)("Current media URL:")}),(0,d.jsx)(uu,{value:{url:e},settings:[],showSuggestions:!1,onChange:({url:e})=>{l(e)},searchInputPlaceholder:(0,T.__)("Paste or type URL")})]})]})})}));const gu="image",mu={placement:"left-start",offset:36,shift:!0,className:"block-editor-global-styles-background-panel__popover"},fu=()=>{},bu=e=>{window.requestAnimationFrame((()=>{const[t]=Ga.focus.tabbable.find(e?.current);t&&t.focus()}))};const ku=e=>{if(!e||isNaN(e.x)&&isNaN(e.y))return;return`${100*(isNaN(e.x)?.5:e.x)}% ${100*(isNaN(e.y)?.5:e.y)}%`},vu=e=>{if(!e)return{x:void 0,y:void 0};let[t,n]=e.split(" ").map((e=>parseFloat(e)/100));return t=isNaN(t)?void 0:t,n=isNaN(n)?t:n,{x:t,y:n}};function _u({as:e="span",imgUrl:t,toggleProps:n={},filename:o,label:r,onToggleCallback:i=fu}){const{isOpen:s,...l}=n;(0,h.useEffect)((()=>{void 0!==s&&i(s)}),[s,i]);const a=()=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",as:"span",className:"block-editor-global-styles-background-panel__inspector-preview-inner",children:[t&&(0,d.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator-wrapper","aria-hidden":!0,children:(0,d.jsx)("span",{className:"block-editor-global-styles-background-panel__inspector-image-indicator",style:{backgroundImage:`url(${t})`}})}),(0,d.jsxs)(ws.FlexItem,{as:"span",style:t?{}:{flexGrow:1},children:[(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,className:"block-editor-global-styles-background-panel__inspector-media-replace-title",children:r}),(0,d.jsx)(ws.VisuallyHidden,{as:"span",children:t?(0,T.sprintf)((0,T.__)("Background image: %s"),o||r):(0,T.__)("No background image selected")})]})]});return"button"===e?(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...l,children:a()}):a()}function yu({label:e,filename:t,url:n,children:o,onToggle:r=fu,hasImageValue:i,onReset:s,containerRef:l}){if(!i)return;const a=e||(0,Ua.getFilename)(n)||(0,T.__)("Add background image");return(0,d.jsx)(ws.Dropdown,{popoverProps:mu,renderToggle:({onToggle:e,isOpen:o})=>{const i={onClick:e,className:"block-editor-global-styles-background-panel__dropdown-toggle","aria-expanded":o,"aria-label":(0,T.__)("Background size, position and repeat options."),isOpen:o};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(_u,{imgUrl:n,filename:t,label:a,toggleProps:i,as:"button",onToggleCallback:r}),s&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-global-styles-background-panel__reset",size:"small",icon:Ha,onClick:()=>{s(),o&&e(),bu(l)}})]})},renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{className:"block-editor-global-styles-background-panel__dropdown-content-wrapper",paddingSize:"medium",children:o})})}function xu(){return(0,d.jsx)(ws.Placeholder,{className:"block-editor-global-styles-background-panel__loading",children:(0,d.jsx)(ws.Spinner,{})})}function Su({onChange:e,style:t,inheritedValue:n,onRemoveImage:o=fu,onResetImage:r=fu,displayInPanel:i,defaultValues:s,containerRef:l}){const[a,c]=(0,h.useState)(!1),{getSettings:u}=(0,g.useSelect)(ji),{id:p,title:m,url:f}=t?.background?.backgroundImage||{...n?.background?.backgroundImage},{createErrorNotice:b}=(0,g.useDispatch)(pr.store),k=e=>{b(e,{type:"snackbar"}),c(!1)},v=n=>{if(!n||!n.url)return e(me(t,["background","backgroundImage"],void 0)),void c(!1);if((0,$a.isBlobURL)(n.url))return void c(!0);if(n.media_type&&n.media_type!==gu||!n.media_type&&n.type&&n.type!==gu)return void k((0,T.__)("Only images can be used as a background image."));const o=t?.background?.backgroundSize||s?.backgroundSize,r=t?.background?.backgroundPosition;e(me(t,["background"],{...t?.background,backgroundImage:{url:n.url,id:n.id,source:"file",title:n.title||void 0},backgroundPosition:r||"auto"!==o&&o?r:"50% 0",backgroundSize:o})),c(!1),bu(l)},_=ju(t),y=!_&&ju(n),x=m||(0,Ua.getFilename)(f)||(0,T.__)("Add background image");return(0,d.jsxs)("div",{className:"block-editor-global-styles-background-panel__image-tools-panel-item",children:[a&&(0,d.jsx)(xu,{}),(0,d.jsx)(hu,{mediaId:p,mediaURL:f,allowedTypes:[gu],accept:"image/*",onSelect:v,popoverProps:{className:ms({"block-editor-global-styles-background-panel__media-replace-popover":i})},name:(0,d.jsx)(_u,{imgUrl:f,filename:m,label:x}),renderToggle:e=>(0,d.jsx)(ws.Button,{...e,__next40pxDefaultSize:!0}),onError:k,onReset:()=>{bu(l),r()},children:y&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{bu(l),e(me(t,["background"],{backgroundImage:"none"})),o()},children:(0,T.__)("Remove")})}),(0,d.jsx)(ws.DropZone,{onFilesDrop:e=>{u().mediaUpload({allowedTypes:[gu],filesList:e,onFileChange([e]){v(e)},onError:k,multiple:!1})},label:(0,T.__)("Drop to upload")})]})}function wu({onChange:e,style:t,inheritedValue:n,defaultValues:o}){const r=t?.background?.backgroundSize||n?.background?.backgroundSize,i=t?.background?.backgroundRepeat||n?.background?.backgroundRepeat,s=t?.background?.backgroundImage?.url||n?.background?.backgroundImage?.url,l=t?.background?.backgroundImage?.id,a=t?.background?.backgroundPosition||n?.background?.backgroundPosition,c=t?.background?.backgroundAttachment||n?.background?.backgroundAttachment;let u=!r&&l?o?.backgroundSize:r||"auto";u=["cover","contain","auto"].includes(u)?u:"auto";const p=!("no-repeat"===i||"cover"===u&&void 0===i),h=n=>{let o=i,r=a;"contain"===n&&(o="no-repeat",r=void 0),"cover"===n&&(o=void 0,r=void 0),"cover"!==u&&"contain"!==u||"auto"!==n||(o=void 0,t?.background?.backgroundImage?.id&&(r="50% 0")),n||"auto"!==u||(n="auto"),e(me(t,["background"],{...t?.background,backgroundPosition:r,backgroundRepeat:o,backgroundSize:n}))},g=!a&&l&&"contain"===r?o?.backgroundPosition:a;return(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,d.jsx)(ws.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Focal point"),url:s,value:vu(g),onChange:n=>{e(me(t,["background","backgroundPosition"],ku(n)))}}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Fixed background"),checked:"fixed"===c,onChange:()=>e(me(t,["background","backgroundAttachment"],"fixed"===c?"scroll":"fixed"))}),(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,T.__)("Size"),value:u,onChange:h,isBlock:!0,help:(m=r||o?.backgroundSize,"cover"===m||void 0===m?(0,T.__)("Image covers the space evenly."):"contain"===m?(0,T.__)("Image is contained without distortion."):(0,T.__)("Image has a fixed width.")),children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"cover",label:(0,T._x)("Cover","Size option for background image control")},"cover"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"contain",label:(0,T._x)("Contain","Size option for background image control")},"contain"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"auto",label:(0,T._x)("Tile","Size option for background image control")},"tile")]}),(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",spacing:2,as:"span",children:[(0,d.jsx)(ws.__experimentalUnitControl,{"aria-label":(0,T.__)("Background image width"),onChange:h,value:r,size:"__unstable-large",__unstableInputWidth:"100px",min:0,placeholder:(0,T.__)("Auto"),disabled:"auto"!==u||void 0===u}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Repeat"),checked:p,onChange:()=>e(me(t,["background","backgroundRepeat"],!0===p?"no-repeat":"repeat")),disabled:"cover"===u})]})]});var m}function Cu({value:e,onChange:t,inheritedValue:n=e,settings:o,defaultValues:r={}}){const{globalStyles:i,_links:s}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji),n=t();return{globalStyles:n[N],_links:n[L]}}),[]),l=(0,h.useMemo)((()=>{const e={background:{}};return n?.background?(Object.entries(n?.background).forEach((([t,n])=>{e.background[t]=rs(n,{styles:i,_links:s})})),e):n}),[i,s,n]),a=()=>t(me(e,["background"],{})),{title:c,url:u}=e?.background?.backgroundImage||{...l?.background?.backgroundImage},p=ju(e)||ju(l),m=p&&"none"!==(e?.background?.backgroundImage||n?.background?.backgroundImage)&&(o?.background?.backgroundSize||o?.background?.backgroundPosition||o?.background?.backgroundRepeat),[f,b]=(0,h.useState)(!1),k=(0,h.useRef)();return(0,d.jsx)("div",{ref:k,className:ms("block-editor-global-styles-background-panel__inspector-media-replace-container",{"is-open":f}),children:m?(0,d.jsx)(yu,{label:c,filename:c,url:u,onToggle:b,hasImageValue:p,onReset:a,containerRef:k,children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,className:"single-column",children:[(0,d.jsx)(Su,{onChange:t,style:e,inheritedValue:l,displayInPanel:!0,onResetImage:()=>{b(!1),a()},onRemoveImage:()=>b(!1),defaultValues:r,containerRef:k}),(0,d.jsx)(wu,{onChange:t,style:e,defaultValues:r,inheritedValue:l})]})}):(0,d.jsx)(Su,{onChange:t,style:e,inheritedValue:l,defaultValues:r,onResetImage:()=>{b(!1),a()},onRemoveImage:()=>b(!1),containerRef:k})})}const Bu={backgroundImage:!0};function Iu(e){return"web"===h.Platform.OS&&e?.background?.backgroundImage}function ju(e){return!!e?.background?.backgroundImage?.id||"string"==typeof e?.background?.backgroundImage||!!e?.background?.backgroundImage?.url}function Eu({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,headerLabel:i}){const s=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}function Tu({as:e=Eu,value:t,onChange:n,inheritedValue:o,settings:r,panelId:i,defaultControls:s=Bu,defaultValues:l={},headerLabel:a=(0,T.__)("Background image")}){const c=Iu(r),u=(0,h.useCallback)((e=>({...e,background:{}})),[]);return(0,d.jsx)(e,{resetAllFilter:u,value:t,onChange:n,panelId:i,headerLabel:a,children:c&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.background,label:(0,T.__)("Image"),onDeselect:()=>n(me(t,["background"],{})),isShownByDefault:s.backgroundImage,panelId:i,children:(0,d.jsx)(Cu,{value:t,onChange:n,settings:r,inheritedValue:o,defaultControls:s,defaultValues:l})})})}const Mu="background",Pu={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Ru(e,t="any"){const n=(0,p.getBlockSupport)(e,Mu);return!0===n||("any"===t?!!n?.backgroundImage||!!n?.backgroundSize||!!n?.backgroundRepeat:!!n?.[t])}function Au(e){if(!e||!e?.backgroundImage?.url)return;let t;return e?.backgroundSize||(t={backgroundSize:Pu.backgroundSize}),"contain"!==e?.backgroundSize||e?.backgroundPosition||(t={backgroundPosition:Pu.backgroundPosition}),t}function Nu(e){return ju(e)?"has-background":""}function Lu({children:e}){const t=(0,h.useCallback)((e=>({...e,style:{...e.style,background:void 0}})),[]);return(0,d.jsx)(Fa,{group:"background",resetAllFilter:t,children:e})}function Du({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,inheritedValue:i}=(0,g.useSelect)((n=>{const{getBlockAttributes:o,getSettings:r}=n(ji),i=r();return{style:o(e)?.style,inheritedValue:i[N]?.blocks?.[t]}}),[e,t]);if(!Iu(o)||!Ru(t,"backgroundImage"))return null;const s={...o,background:{...o.background,backgroundSize:o?.background?.backgroundSize&&Ru(t,"backgroundSize")}},l=(0,p.getBlockSupport)(t,[Mu,"defaultControls"]);return(0,d.jsx)(Tu,{inheritedValue:i,as:Lu,panelId:e,defaultValues:Pu,settings:s,onChange:e=>{n({style:fs(e)})},defaultControls:l,value:r})}var Ou={useBlockProps:function({name:e,style:t}){if(!Ru(e)||!t?.background?.backgroundImage)return;const n=Au(t?.background);return n?{style:{...n}}:void 0},attributeKeys:["style"],hasSupport:Ru};(0,f.addFilter)("blocks.registerBlockType","core/lock/addAttribute",(function(e){return"type"in(e.attributes?.lock??{})||(e.attributes={...e.attributes,lock:{type:"object"}}),e}));var zu=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});var Vu=(0,h.memo)((function({icon:e,showColors:t=!1,className:n,context:o}){"block-default"===e?.src&&(e={src:zu});const r=(0,d.jsx)(ws.Icon,{icon:e&&e.src?e.src:e,context:o}),i=t?{backgroundColor:e&&e.background,color:e&&e.foreground}:{};return(0,d.jsx)("span",{style:i,className:ms("block-editor-block-icon",n,{"has-colors":t}),children:r})}));var Fu=function({blockTypes:e,value:t,onItemChange:n}){return(0,d.jsx)("ul",{className:"block-editor-block-manager__checklist",children:e.map((e=>(0,d.jsxs)("li",{className:"block-editor-block-manager__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,checked:t.includes(e.name),onChange:(...t)=>n(e,...t)}),(0,d.jsx)(Vu,{icon:e.icon})]},e.name)))})};var Hu=function e({title:t,blockTypes:n,selectedBlockTypes:o,onChange:r}){const i=(0,m.useInstanceId)(e),s=(0,h.useCallback)(((e,t)=>{r(t?[...o,e]:o.filter((({name:t})=>t!==e.name)))}),[o,r]),l=(0,h.useCallback)((e=>{r(e?[...o,...n.filter((e=>!o.find((({name:t})=>t===e.name))))]:o.filter((e=>!n.find((({name:t})=>t===e.name)))))}),[n,o,r]);if(!n.length)return null;const a=n.map((({name:e})=>e)).filter((e=>(o??[]).some((t=>t.name===e)))),c="block-editor-block-manager__category-title-"+i,u=a.length===n.length,p=!u&&a.length>0;return(0,d.jsxs)("div",{role:"group","aria-labelledby":c,className:"block-editor-block-manager__category",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:u,onChange:l,className:"block-editor-block-manager__category-title",indeterminate:p,label:(0,d.jsx)("span",{id:c,children:t})}),(0,d.jsx)(Fu,{blockTypes:n,value:a,onItemChange:s})]})};function Uu({blockTypes:e,selectedBlockTypes:t,onChange:n,showSelectAll:o=!0}){const r=(0,m.useDebounce)(Uo.speak,500),[i,s]=(0,h.useState)(""),{categories:l,isMatchingSearchTerm:a}=(0,g.useSelect)((e=>({categories:e(p.store).getCategories(),isMatchingSearchTerm:e(p.store).isMatchingSearchTerm})),[]),c=e.filter((e=>!i||a(e,i))),u=t.length>0&&t.length!==e.length,f=e.length>0&&t.length===e.length;return(0,h.useEffect)((()=>{if(!i)return;const e=c.length,t=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",e),e);r(t)}),[c?.length,i,r]),(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-block-manager__content",spacing:4,children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Search for a block"),placeholder:(0,T.__)("Search for a block"),value:i,onChange:e=>s(e),className:"block-editor-block-manager__search"}),o&&(0,d.jsx)(ws.CheckboxControl,{className:"block-editor-block-manager__select-all",label:(0,T.__)("Select all"),checked:f,onChange:()=>{n(f?[]:e)},indeterminate:u,__nextHasNoMarginBottom:!0}),(0,d.jsxs)("div",{tabIndex:"0",role:"region","aria-label":(0,T.__)("Available block types"),className:"block-editor-block-manager__results",children:[0===c.length&&(0,d.jsx)("p",{className:"block-editor-block-manager__no-results",children:(0,T.__)("No blocks found.")}),l.map((e=>(0,d.jsx)(Hu,{title:e.title,blockTypes:c.filter((t=>t.category===e.slug)),selectedBlockTypes:t,onChange:n},e.slug))),(0,d.jsx)(Hu,{title:(0,T.__)("Uncategorized"),blockTypes:c.filter((({category:e})=>!e)),selectedBlockTypes:t,onChange:n})]})]})}function Gu({clientId:e,blockTypes:t,selectedBlockTypes:n,onClose:o}){const[r,i]=(0,h.useState)(n),{updateBlockAttributes:s}=(0,g.useDispatch)(ji);return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Manage allowed blocks"),onRequestClose:o,overlayClassName:"block-editor-block-allowed-blocks-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,d.jsxs)(ws.__experimentalVStack,{as:"form",onSubmit:n=>{n.preventDefault(),(()=>{const n=r.length===t.length,i=r.map((({name:e})=>e));s(e,{allowedBlocks:n?void 0:i}),o()})()},spacing:"4",children:[(0,d.jsx)(ws.__experimentalText,{children:(0,T.__)("Select which blocks can be added inside this container.")}),(0,d.jsx)(Uu,{blockTypes:t,selectedBlockTypes:r,onChange:e=>{i(e)}}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-allowed-blocks-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:o,__next40pxDefaultSize:!0,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,T.__)("Apply")})})]})]})})}function $u({clientId:e}){const[t,n]=(0,h.useState)(!1),{blockTypes:o,selectedBlockNames:r}=(0,g.useSelect)((t=>{const{getBlockAttributes:n}=t(ji);return{blockTypes:t(p.store).getBlockTypes(),selectedBlockNames:n(e)?.allowedBlocks}}),[e]),i=o.filter((e=>(0,p.hasBlockSupport)(e,"inserter",!0)&&(!e.parent||e.parent.includes("core/post-content"))));if(!i)return null;const s=void 0===r?i:i.filter((e=>r.includes(e.name)));return(0,d.jsxs)("div",{className:"block-editor-block-allowed-blocks-control",children:[(0,d.jsxs)(ws.BaseControl,{help:(0,T.__)("Specify which blocks are allowed inside this container."),__nextHasNoMarginBottom:!0,children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{children:(0,T.__)("Allowed Blocks")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{n(!0)},className:"block-editor-block-allowed-blocks-control__button",children:(0,T.__)("Manage allowed blocks")})]}),t&&(0,d.jsx)(Gu,{clientId:e,blockTypes:i,selectedBlockTypes:s,onClose:()=>n(!1)})]})}var Wu={edit:function({clientId:e}){return(0,g.useSelect)((t=>"contentOnly"===t(ji).getBlockEditingMode(e)),[e])?null:(0,d.jsx)(Pa.Fill,{children:(0,d.jsx)($u,{clientId:e})})},attributeKeys:["allowedBlocks"],hasSupport:e=>(0,p.hasBlockSupport)(e,"allowedBlocks")};(0,f.addFilter)("blocks.registerBlockType","core/allowedBlocks/attribute",(function(e){return e?.attributes?.allowedBlocks?.type||(0,p.hasBlockSupport)(e,"allowedBlocks")&&(e.attributes={...e.attributes,allowedBlocks:{type:"array"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/allowedBlocks/addTransforms",(function(e,t,n,o){if(!(0,p.hasBlockSupport)(e.name,"allowedBlocks"))return e;if(1!==t.length&&1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(o.length>1&&t.length>1&&o.length!==t.length)return e;if(e.attributes.allowedBlocks)return e;const r=t[n]?.attributes?.allowedBlocks;if(!r)return e;const i=(0,p.getBlockType)(e.name),s=i?.allowedBlocks||[];if(!s.length)return{...e,attributes:{...e.attributes,allowedBlocks:r}};const l=r.filter((e=>s.includes(e)));return{...e,attributes:{...e.attributes,allowedBlocks:l}}}));const Ku=/[\s#]/g,Zu={type:"string",source:"attribute",attribute:"id",selector:"*"};var qu={addSaveProps:function(e,t,n){(0,p.hasBlockSupport)(t,"anchor")&&(e.id=""===n.anchor?null:n.anchor);return e},edit:function({anchor:e,setAttributes:t}){if("default"!==ga())return null;const n="web"===h.Platform.OS;return(0,d.jsx)(Fa,{group:"advanced",children:(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"html-anchor-control",label:(0,T.__)("HTML anchor"),help:(0,d.jsxs)(d.Fragment,{children:[(0,T.__)("Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor”. Then, you’ll be able to link directly to this section of your page."),n&&(0,d.jsxs)(d.Fragment,{children:[" ",(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/page-jumps/"),children:(0,T.__)("Learn more about anchors")})]})]}),value:e||"",placeholder:n?null:(0,T.__)("Add an anchor"),onChange:e=>{e=e.replace(Ku,"-"),t({anchor:e})},autoCapitalize:"none",autoComplete:"off"})})},attributeKeys:["anchor"],hasSupport:e=>(0,p.hasBlockSupport)(e,"anchor")};(0,f.addFilter)("blocks.registerBlockType","core/anchor/attribute",(function(e){return"type"in(e.attributes?.anchor??{})||(0,p.hasBlockSupport)(e,"anchor")&&(e.attributes={...e.attributes,anchor:Zu}),e}));var Yu={addSaveProps:function(e,t,n){return(0,p.hasBlockSupport)(t,"ariaLabel")&&(e["aria-label"]=""===n.ariaLabel?null:n.ariaLabel),e},attributeKeys:["ariaLabel"],hasSupport:e=>(0,p.hasBlockSupport)(e,"ariaLabel")};(0,f.addFilter)("blocks.registerBlockType","core/ariaLabel/attribute",(function(e){return e?.attributes?.ariaLabel?.type||(0,p.hasBlockSupport)(e,"ariaLabel")&&(e.attributes={...e.attributes,ariaLabel:{type:"string"}}),e}));var Xu={edit:function({className:e,setAttributes:t}){return"default"!==ga()?null:(0,d.jsx)(Fa,{group:"advanced",children:(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,T.__)("Additional CSS class(es)"),value:e||"",onChange:e=>{t({className:""!==e?e:void 0})},help:(0,T.__)("Separate multiple classes with spaces.")})})},addSaveProps:function(e,t,n){(0,p.hasBlockSupport)(t,"customClassName",!0)&&n.className&&(e.className=ms(e.className,n.className));return e},attributeKeys:["className"],hasSupport:e=>(0,p.hasBlockSupport)(e,"customClassName",!0)};(0,f.addFilter)("blocks.registerBlockType","core/editor/custom-class-name/attribute",(function(e){return(0,p.hasBlockSupport)(e,"customClassName",!0)&&(e.attributes={...e.attributes,className:{type:"string"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/customClassName/addTransforms",(function(e,t,n,o){if(!(0,p.hasBlockSupport)(e.name,"customClassName",!0))return e;if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(t[n]){const o=t[n]?.attributes.className;if(o&&void 0===e.attributes.className)return{...e,attributes:{...e.attributes,className:o}}}return e})),(0,f.addFilter)("blocks.getSaveContent.extraProps","core/generated-class-name/save-props",(function(e,t){return(0,p.hasBlockSupport)(t,"className",!0)&&("string"==typeof e.className?e.className=[...new Set([(0,p.getBlockDefaultClassName)(t.name),...e.className.split(" ")])].join(" ").trim():e.className=(0,p.getBlockDefaultClassName)(t.name)),e}));var Qu={grad:.9,turn:360,rad:360/(2*Math.PI)},Ju=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},ed=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},td=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},nd=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},od=function(e){return{r:td(e.r,0,255),g:td(e.g,0,255),b:td(e.b,0,255),a:td(e.a)}},rd=function(e){return{r:ed(e.r),g:ed(e.g),b:ed(e.b),a:ed(e.a,3)}},id=/^#([0-9a-f]{3,8})$/i,sd=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},ld=function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=Math.max(t,n,o),s=i-Math.min(t,n,o),l=s?i===t?(n-o)/s:i===n?2+(o-t)/s:4+(t-n)/s:0;return{h:60*(l<0?l+6:l),s:i?s/i*100:0,v:i/255*100,a:r}},ad=function(e){var t=e.h,n=e.s,o=e.v,r=e.a;t=t/360*6,n/=100,o/=100;var i=Math.floor(t),s=o*(1-n),l=o*(1-(t-i)*n),a=o*(1-(1-t+i)*n),c=i%6;return{r:255*[o,l,s,s,a,o][c],g:255*[a,o,o,l,s,s][c],b:255*[s,s,a,o,o,l][c],a:r}},cd=function(e){return{h:nd(e.h),s:td(e.s,0,100),l:td(e.l,0,100),a:td(e.a)}},ud=function(e){return{h:ed(e.h),s:ed(e.s),l:ed(e.l),a:ed(e.a,3)}},dd=function(e){return ad((n=(t=e).s,{h:t.h,s:(n*=((o=t.l)<50?o:100-o)/100)>0?2*n/(o+n)*100:0,v:o+n,a:t.a}));var t,n,o},pd=function(e){return{h:(t=ld(e)).h,s:(r=(200-(n=t.s))*(o=t.v)/100)>0&&r<200?n*o/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,n,o,r},hd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,gd=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,md=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,fd=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,bd={string:[[function(e){var t=id.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?ed(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?ed(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=md.exec(e)||fd.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:od({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=hd.exec(e)||gd.exec(e);if(!t)return null;var n,o,r=cd({h:(n=t[1],o=t[2],void 0===o&&(o="deg"),Number(n)*(Qu[o]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return dd(r)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,o=e.b,r=e.a,i=void 0===r?1:r;return Ju(t)&&Ju(n)&&Ju(o)?od({r:Number(t),g:Number(n),b:Number(o),a:Number(i)}):null},"rgb"],[function(e){var t=e.h,n=e.s,o=e.l,r=e.a,i=void 0===r?1:r;if(!Ju(t)||!Ju(n)||!Ju(o))return null;var s=cd({h:Number(t),s:Number(n),l:Number(o),a:Number(i)});return dd(s)},"hsl"],[function(e){var t=e.h,n=e.s,o=e.v,r=e.a,i=void 0===r?1:r;if(!Ju(t)||!Ju(n)||!Ju(o))return null;var s=function(e){return{h:nd(e.h),s:td(e.s,0,100),v:td(e.v,0,100),a:td(e.a)}}({h:Number(t),s:Number(n),v:Number(o),a:Number(i)});return ad(s)},"hsv"]]},kd=function(e,t){for(var n=0;n<t.length;n++){var o=t[n][0](e);if(o)return[o,t[n][1]]}return[null,void 0]},vd=function(e){return"string"==typeof e?kd(e.trim(),bd.string):"object"==typeof e&&null!==e?kd(e,bd.object):[null,void 0]},_d=function(e,t){var n=pd(e);return{h:n.h,s:td(n.s+100*t,0,100),l:n.l,a:n.a}},yd=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},xd=function(e,t){var n=pd(e);return{h:n.h,s:n.s,l:td(n.l+100*t,0,100),a:n.a}},Sd=function(){function e(e){this.parsed=vd(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return ed(yd(this.rgba),2)},e.prototype.isDark=function(){return yd(this.rgba)<.5},e.prototype.isLight=function(){return yd(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=rd(this.rgba)).r,n=e.g,o=e.b,i=(r=e.a)<1?sd(ed(255*r)):"","#"+sd(t)+sd(n)+sd(o)+i;var e,t,n,o,r,i},e.prototype.toRgb=function(){return rd(this.rgba)},e.prototype.toRgbString=function(){return t=(e=rd(this.rgba)).r,n=e.g,o=e.b,(r=e.a)<1?"rgba("+t+", "+n+", "+o+", "+r+")":"rgb("+t+", "+n+", "+o+")";var e,t,n,o,r},e.prototype.toHsl=function(){return ud(pd(this.rgba))},e.prototype.toHslString=function(){return t=(e=ud(pd(this.rgba))).h,n=e.s,o=e.l,(r=e.a)<1?"hsla("+t+", "+n+"%, "+o+"%, "+r+")":"hsl("+t+", "+n+"%, "+o+"%)";var e,t,n,o,r},e.prototype.toHsv=function(){return e=ld(this.rgba),{h:ed(e.h),s:ed(e.s),v:ed(e.v),a:ed(e.a,3)};var e},e.prototype.invert=function(){return wd({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),wd(_d(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),wd(_d(this.rgba,-e))},e.prototype.grayscale=function(){return wd(_d(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),wd(xd(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),wd(xd(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?wd({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):ed(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=pd(this.rgba);return"number"==typeof e?wd({h:e,s:t.s,l:t.l,a:t.a}):ed(t.h)},e.prototype.isEqual=function(e){return this.toHex()===wd(e).toHex()},e}(),wd=function(e){return e instanceof Sd?e:new Sd(e)},Cd=[],Bd=function(e){e.forEach((function(e){Cd.indexOf(e)<0&&(e(Sd,bd),Cd.push(e))}))};function Id(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},o={};for(var r in n)o[n[r]]=r;var i={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,s,l=o[this.toHex()];if(l)return l;if(null==t?void 0:t.closest){var a=this.toRgb(),c=1/0,u="black";if(!i.length)for(var d in n)i[d]=new e(n[d]).toRgb();for(var p in n){var h=(r=a,s=i[p],Math.pow(r.r-s.r,2)+Math.pow(r.g-s.g,2)+Math.pow(r.b-s.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var o=t.toLowerCase(),r="transparent"===o?"#0000":n[o];return r?new e(r).toRgb():null},"name"])}var jd=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},Ed=function(e){return.2126*jd(e.r)+.7152*jd(e.g)+.0722*jd(e.b)};function Td(e){e.prototype.luminance=function(){return e=Ed(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,o,r,i,s,l,a,c=t instanceof e?t:new e(t);return i=this.rgba,s=c.toRgb(),n=(l=Ed(i))>(a=Ed(s))?(l+.05)/(a+.05):(a+.05)/(l+.05),void 0===(o=2)&&(o=0),void 0===r&&(r=Math.pow(10,o)),Math.floor(r*n)/r+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(s=void 0===(i=(n=t).size)?"normal":i,"AAA"===(r=void 0===(o=n.level)?"AA":o)&&"normal"===s?7:"AA"===r&&"large"===s?3:4.5);var n,o,r,i,s}}Bd([Id,Td]);const{kebabCase:Md}=G(ws.privateApis),Pd=(e,t,n)=>{if(t){const n=e?.find((e=>e.slug===t));if(n)return n}return{color:n}},Rd=(e,t)=>e?.find((e=>e.color===t));function Ad(e,t){if(e&&t)return`has-${Md(t)}-${e}`}function Nd(){const[e,t,n,o,r,i,s,l,a,c]=Ti("color.custom","color.palette.custom","color.palette.theme","color.palette.default","color.defaultPalette","color.customGradient","color.gradients.custom","color.gradients.theme","color.gradients.default","color.defaultGradients"),u={disableCustomColors:!e,disableCustomGradients:!i};return u.colors=(0,h.useMemo)((()=>{const e=[];return n&&n.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",colors:n}),r&&o&&o.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),slug:"default",colors:o}),t&&t.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),slug:"custom",colors:t}),e}),[t,n,o,r]),u.gradients=(0,h.useMemo)((()=>{const e=[];return l&&l.length&&e.push({name:(0,T._x)("Theme","Indicates this palette comes from the theme."),slug:"theme",gradients:l}),c&&a&&a.length&&e.push({name:(0,T._x)("Default","Indicates this palette comes from WordPress."),slug:"default",gradients:a}),s&&s.length&&e.push({name:(0,T._x)("Custom","Indicates this palette is created by the user."),slug:"custom",gradients:s}),e}),[s,l,a,c]),u.hasColorsOrGradients=!!u.colors.length||!!u.gradients.length,u}var Ld=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});function Dd({isLinked:e,...t}){const n=e?(0,T.__)("Unlink radii"):(0,T.__)("Link radii");return(0,d.jsx)(ws.Button,{...t,className:"components-border-radius-control__linked-button",size:"small",icon:e?Ld:ec,iconSize:24,label:n})}function Od(e){return[...e].sort(((t,n)=>e.filter((e=>e===n)).length-e.filter((e=>e===t)).length)).shift()}function zd(e){return!!e?.includes&&("0"===e||e.includes("var:preset|border-radius|"))}function Vd(e){if(!e)return;if("0"===e||"default"===e)return e;const t=e.match(/var:preset\|border-radius\|(.+)/);return t?t[1]:void 0}function Fd(e,t){if(!zd(e))return e;const n=0===parseFloat(e,10)?"0":Vd(e),o=t.find((e=>String(e.slug)===n));return o?.size}function Hd(e,t,n){const o=parseInt(e,10);if("selectList"===t){if(0===o)return}else if(0===o)return"0";return`var:preset|border-radius|${n[e]?.slug}`}function Ud(e,t){if(!e||zd(e)||"0"===e)return e;const n=t.find((t=>String(t.size)===String(e)));return n?.slug?`var:preset|border-radius|${n.slug}`:e}var Gd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,d.jsx)(ue.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),$d=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Zm-12.5 9v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),Wd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.75a.25.25 0 0 0-.25.25v3h-1.5V6c0-.966.784-1.75 1.75-1.75h3v1.5H6Z"})]}),Kd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5Z"})]}),Zd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.75 15v3c0 .138.112.25.25.25h3v1.5H6A1.75 1.75 0 0 1 4.25 18v-3h1.5Z"})]}),qd=(0,d.jsxs)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,d.jsx)(ue.G,{opacity:".25",children:(0,d.jsx)(ue.Path,{d:"M5.75 6A.25.25 0 0 1 6 5.75h3v-1.5H6A1.75 1.75 0 0 0 4.25 6v3h1.5V6ZM18 18.25h-3v1.5h3A1.75 1.75 0 0 0 19.75 18v-3h-1.5v3a.25.25 0 0 1-.25.25ZM18.25 9V6a.25.25 0 0 0-.25-.25h-3v-1.5h3c.966 0 1.75.784 1.75 1.75v3h-1.5ZM5.75 18v-3h-1.5v3c0 .966.784 1.75 1.75 1.75h3v-1.5H6a.25.25 0 0 1-.25-.25Z"})}),(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 18.25h3a.25.25 0 0 0 .25-.25v-3h1.5v3A1.75 1.75 0 0 1 18 19.75h-3v-1.5Z"})]});const Yd={topLeft:void 0,topRight:void 0,bottomLeft:void 0,bottomRight:void 0},Xd=8,Qd=[],Jd={all:(0,T.__)("Border radius"),topLeft:(0,T.__)("Top left"),topRight:(0,T.__)("Top right"),bottomLeft:(0,T.__)("Bottom left"),bottomRight:(0,T.__)("Bottom right")},ep={all:$d,topLeft:Wd,topRight:Kd,bottomLeft:Zd,bottomRight:qd},tp=0,np={px:100,em:20,rem:20};function op({corner:e,onChange:t,selectedUnits:n,setSelectedUnits:o,values:r,units:i,presets:s}){const l=n=>{t("all"===e?{topLeft:n,topRight:n,bottomLeft:n,bottomRight:n}:{...a,[e]:n})},a="string"!=typeof r?r:{topLeft:r,topRight:r,bottomLeft:r,bottomRight:r};let c;if("all"===e){const e=function(e,t){if(!e||"object"!=typeof e)return e;const n={};return Object.keys(e).forEach((o=>{const r=e[o];if(zd(r)){const e=Fd(r,t);n[o]=void 0!==e?e:r}else n[o]=r})),n}(a,s),t=function(e={}){if("string"==typeof e)return e;const t=Object.values(e).map((e=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(e))),n=t.map((e=>e[0]??"")),o=t.map((e=>e[1])),r=n.every((e=>e===n[0]))?n[0]:"",i=Od(o);return 0===r||r?`${r}${i||""}`:void 0}(e);c=Ud(t,s)}else c=Ud(a[e],s);const u=zd(c)?Fd(c,s):c,[p,g]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(u),m=c?g:n[e]||n.flat||"px",f=i&&i.find((e=>e.value===m)),b=f?.step||1,[k,v]=(0,h.useState)(void 0!==c&&!zd(c)),_=s.length<=Xd,y=function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":Vd(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(c,s),x=s.slice(1,s.length-1).map(((e,t)=>({value:t+1,label:void 0}))),S=x.length>0;let w=[];_||(w=[...s,{name:(0,T.__)("Custom"),slug:"custom",size:u}].map(((e,t)=>({key:t,name:e.name}))));const C=ep[e];return(0,d.jsxs)(ws.__experimentalHStack,{children:[C&&(0,d.jsx)(ws.Icon,{className:"components-border-radius-control__icon",icon:C,size:24}),(!S||k)&&(0,d.jsxs)("div",{className:"components-border-radius-control__input-controls-wrapper",children:[(0,d.jsx)(ws.Tooltip,{text:Jd[e],placement:"top",children:(0,d.jsx)("div",{className:"components-border-radius-control__tooltip-wrapper",children:(0,d.jsx)(ws.__experimentalUnitControl,{className:"components-border-radius-control__unit-control","aria-label":Jd[e],value:[p,m].join(""),onChange:e=>{if(!t)return;const n=!isNaN(parseFloat(e));l(n?e:void 0)},onUnitChange:t=>{const r={...n};"all"===e?(r.topLeft=t,r.topRight=t,r.bottomLeft=t,r.bottomRight=t):r[e]=t,o(r)},size:"__unstable-large",min:tp,units:i})})}),(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Border radius"),hideLabelFromVision:!0,className:"components-border-radius-control__range-control",value:p??"",min:tp,max:np[m],initialPosition:0,withInputField:!1,onChange:e=>{l(void 0!==e?`${e}${m}`:void 0)},step:b,__nextHasNoMarginBottom:!0})]}),S&&_&&!k&&(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,className:"components-border-radius-control__range-control",value:y,onChange:e=>{l(Hd(e,"range",s))},withInputField:!1,"aria-valuenow":y,"aria-valuetext":s[y]?.name,renderTooltipContent:e=>void 0===c?void 0:s[e]?.name,min:0,max:s.length-1,marks:x,label:Jd[e],hideLabelFromVision:!0,__nextHasNoMarginBottom:!0}),!_&&!k&&(0,d.jsx)(ws.CustomSelectControl,{className:"components-border-radius-control__custom-select-control",value:w.find((e=>e.key===y))||w[w.length-1],onChange:e=>{e.selectedItem.key===w.length-1?v(!0):l(Hd(e.selectedItem.key,"selectList",s))},options:w,label:Jd[e],hideLabelFromVision:!0,size:"__unstable-large"}),S&&(0,d.jsx)(ws.Button,{label:k?(0,T.__)("Use border radius preset"):(0,T.__)("Set custom border radius"),icon:Gd,onClick:()=>{v(!k)},isPressed:k,size:"small",className:"components-border-radius-control__custom-toggle",iconSize:24})]})}function rp({onChange:e,values:t,presets:n}){const[o,r]=(0,h.useState)(!function(e){return!!e&&("string"==typeof e||!!Object.values(e).filter((e=>!!e||0===e)).length)}(t)||!function(e={}){if("string"==typeof e)return!1;if(!e||"object"!=typeof e)return!1;const t=Object.values(e);if(0===t.length)return!1;const n=t[0];return!t.every((e=>e===n))}(t)),i=function(e){const t=e?.default??Qd,n=e?.custom??Qd,o=e?.theme??Qd;return(0,h.useMemo)((()=>{const e=[{name:(0,T.__)("None"),slug:"0",size:0},...n,...o,...t];return e.length>Xd?[{name:(0,T.__)("Default"),slug:"default",size:void 0},...e]:e}),[n,o,t])}(n),[s,l]=(0,h.useState)({flat:"string"==typeof t?(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t)[1]:void 0,topLeft:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.topLeft)[1],topRight:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.topRight)[1],bottomLeft:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomLeft)[1],bottomRight:(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(t?.bottomRight)[1]}),[a]=Ti("spacing.units"),c=(0,ws.__experimentalUseCustomUnits)({availableUnits:a||["px","em","rem"]});return(0,d.jsxs)("fieldset",{className:"components-border-radius-control",children:[(0,d.jsxs)(ws.__experimentalHStack,{className:"components-border-radius-control__header",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Radius")}),(0,d.jsx)(Dd,{onClick:()=>r(!o),isLinked:o})]}),o?(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(op,{onChange:e,selectedUnits:s,setSelectedUnits:l,values:t,units:c,corner:"all",presets:i})}):(0,d.jsx)(ws.__experimentalVStack,{children:["topLeft","topRight","bottomLeft","bottomRight"].map((n=>(0,d.jsx)(op,{onChange:e,selectedUnits:s,setSelectedUnits:l,values:t||Yd,units:c,corner:n,presets:i},n)))})]})}var ip=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})}),sp=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})});const lp=[];function ap({shadow:e,onShadowChange:t,settings:n}){const o=hp(n);return(0,d.jsx)("div",{className:"block-editor-global-styles__shadow-popover-container",children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:4,children:[(0,d.jsx)(ws.__experimentalHeading,{level:5,children:(0,T.__)("Drop shadow")}),(0,d.jsx)(cp,{presets:o,activeShadow:e,onSelect:t}),(0,d.jsx)("div",{className:"block-editor-global-styles__clear-shadow",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(void 0),disabled:!e,accessibleWhenDisabled:!0,children:(0,T.__)("Clear")})})]})})}function cp({presets:e,activeShadow:t,onSelect:n}){return e?(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-global-styles__shadow__list","aria-label":(0,T.__)("Drop shadows"),children:e.map((({name:e,slug:o,shadow:r})=>(0,d.jsx)(up,{label:e,isActive:r===t,type:"unset"===o?"unset":"preset",onSelect:()=>n(r===t?void 0:r),shadow:r},o)))}):null}function up({type:e,label:t,isActive:n,onSelect:o,shadow:r}){return(0,d.jsx)(ws.Tooltip,{text:t,children:(0,d.jsx)(ws.Composite.Item,{role:"option","aria-label":t,"aria-selected":n,className:ms("block-editor-global-styles__shadow__item",{"is-active":n}),render:(0,d.jsx)("button",{className:ms("block-editor-global-styles__shadow-indicator",{unset:"unset"===e}),onClick:o,style:{boxShadow:r},"aria-label":t,children:n&&(0,d.jsx)(Ol,{icon:ip})})})})}function dp({shadow:e,onShadowChange:t,settings:n}){return(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"block-editor-global-styles__shadow-dropdown",renderToggle:pp(e,t),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,d.jsx)(ap,{shadow:e,onShadowChange:t,settings:n})})})}function pp(e,t){return({onToggle:n,isOpen:o})=>{const r=(0,h.useRef)(void 0),i={onClick:n,className:ms("block-editor-global-styles__shadow-dropdown-toggle",{"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(void 0),r.current?.focus()},className:ms("block-editor-global-styles__shadow-editor__remove-button",{"is-open":o}),label:(0,T.__)("Remove")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...i,children:(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(Ol,{className:"block-editor-global-styles__toggle-icon",icon:sp,size:24}),(0,d.jsx)(ws.FlexItem,{children:(0,T.__)("Drop shadow")})]})}),!!e&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,size:"small",icon:Ha,...s})]})}}function hp(e){return(0,h.useMemo)((()=>{if(!e?.shadow)return lp;const t=e?.shadow?.defaultPresets,{default:n,theme:o,custom:r}=e?.shadow?.presets??{},i={name:(0,T.__)("Unset"),slug:"unset",shadow:"none"},s=[...t&&n||lp,...o||lp,...r||lp];return s.length&&s.unshift(i),s}),[e])}function gp(e){return Object.values(mp(e)).some(Boolean)}function mp(e){return{hasBorderColor:fp(e),hasBorderRadius:bp(e),hasBorderStyle:kp(e),hasBorderWidth:vp(e),hasShadow:_p(e)}}function fp(e){return e?.border?.color}function bp(e){return e?.border?.radius}function kp(e){return e?.border?.style}function vp(e){return e?.border?.width}function _p(e){const t=hp(e);return!!e?.shadow&&t.length>0}function yp({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r,label:i}){const s=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:i,resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:s,children:r})}const xp={radius:!0,color:!0,width:!0,shadow:!0};function Sp({as:e=yp,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,name:s,defaultControls:l=xp}){const a=ps(r),c=(0,h.useCallback)((e=>ts({settings:r},"",e)),[r]),u=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},p=(0,h.useMemo)((()=>{if((0,ws.__experimentalHasSplitBorders)(o?.border)){const e={...o?.border};return["top","right","bottom","left"].forEach((t=>{e[t]={...e[t],color:c(e[t]?.color)}})),e}return{...o?.border,color:o?.border?.color?c(o?.border?.color):void 0}}),[o?.border,c]),g=e=>n({...t,border:e}),m=fp(r),f=kp(r),b=vp(r),k=bp(r),v=(0,h.useMemo)((()=>"object"!=typeof p?.radius?p?.radius:{topLeft:p?.radius?.topLeft,topRight:p?.radius?.topRight,bottomLeft:p?.radius?.bottomLeft,bottomRight:p?.radius?.bottomRight}),[p?.radius]),_=e=>g({...p,radius:e}),y=()=>{const e=t?.border?.radius;return"object"==typeof e?Object.entries(e).some(Boolean):!!e},x=_p(r),S=c(o?.shadow),w=r?.shadow?.presets??{},C=w.custom??w.theme??w.default??[],B=e=>{const o=C?.find((({shadow:t})=>t===e))?.slug;n(me(t,["shadow"],o?`var:preset|shadow|${o}`:e||void 0))},I=(0,h.useCallback)((e=>({...e,border:void 0,shadow:void 0})),[]),j=l?.color||l?.width,E=m||f||b||k,M=Ap({blockName:s,hasShadowControl:x,hasBorderControl:E});return(0,d.jsxs)(e,{resetAllFilter:I,value:t,onChange:n,panelId:i,label:M,children:[(b||m)&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>(0,ws.__experimentalIsDefinedBorder)(t?.border),label:(0,T.__)("Border"),onDeselect:()=>(()=>{if(y())return g({radius:t?.border?.radius});g(void 0)})(),isShownByDefault:j,panelId:i,children:(0,d.jsx)(ws.BorderBoxControl,{colors:a,enableAlpha:!0,enableStyle:f,onChange:e=>{const t={...e};(0,ws.__experimentalHasSplitBorders)(t)?["top","right","bottom","left"].forEach((e=>{t[e]&&(t[e]={...t[e],color:u(t[e]?.color)})})):t&&(t.color=u(t.color)),g({radius:p?.radius,...t})},popoverOffset:40,popoverPlacement:"left-start",value:p,__experimentalIsRenderedInSidebar:!0,size:"__unstable-large",hideLabelFromVision:!x,label:(0,T.__)("Border")})}),k&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:y,label:(0,T.__)("Radius"),onDeselect:()=>_(void 0),isShownByDefault:l.radius,panelId:i,children:(0,d.jsx)(rp,{presets:r?.border?.radiusSizes,values:v,onChange:e=>{_(e||void 0)}})}),x&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Shadow"),hasValue:()=>!!t?.shadow,onDeselect:()=>B(void 0),isShownByDefault:l.shadow,panelId:i,children:[E?(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:(0,T.__)("Shadow")}):null,(0,d.jsx)(dp,{shadow:S,onShadowChange:B,settings:r})]})]})}const wp="__experimentalBorder",Cp="shadow",Bp=(e,t,n)=>{let o;return e.some((e=>e.colors.some((e=>e[t]===n&&(o=e,!0))))),o},Ip=({colors:e,namedColor:t,customColor:n})=>{if(t){const n=Bp(e,"slug",t);if(n)return n}if(!n)return{color:void 0};const o=Bp(e,"color",n);return o||{color:n}};function jp(e){const t=/var:preset\|color\|(.+)/.exec(e);return t&&t[1]?t[1]:null}function Ep(e){if((0,ws.__experimentalHasSplitBorders)(e?.border))return{style:e,borderColor:void 0};const t=e?.border?.color,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o={...e};return o.border={...o.border,color:n?void 0:t},{style:fs(o),borderColor:n}}function Tp(e){return(0,ws.__experimentalHasSplitBorders)(e.style?.border)?e.style:{...e.style,border:{...e.style?.border,color:e.borderColor?"var:preset|color|"+e.borderColor:e.style?.border?.color}}}function Mp({label:e,children:t,resetAllFilter:n}){const o=(0,h.useCallback)((e=>{const t=Tp(e),o=n(t);return{...e,...Ep(o)}}),[n]);return(0,d.jsx)(Fa,{group:"border",resetAllFilter:o,label:e,children:t})}function Pp({clientId:e,name:t,setAttributes:n,settings:o}){const r=gp(o);const{style:i,borderColor:s}=(0,g.useSelect)((function(t){const{style:n,borderColor:o}=t(ji).getBlockAttributes(e)||{};return{style:n,borderColor:o}}),[e]),l=(0,h.useMemo)((()=>Tp({style:i,borderColor:s})),[i,s]);if(!r)return null;const a={...(0,p.getBlockSupport)(t,[wp,"__experimentalDefaultControls"]),...(0,p.getBlockSupport)(t,[Cp,"__experimentalDefaultControls"])};return(0,d.jsx)(Sp,{as:Mp,panelId:e,settings:o,value:l,onChange:e=>{n(Ep(e))},defaultControls:a})}function Rp(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,wp);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}function Ap({blockName:e,hasBorderControl:t,hasShadowControl:n}={}){const o=mp(xs(e));return t||n||!e||(t=o?.hasBorderColor||o?.hasBorderStyle||o?.hasBorderWidth||o?.hasBorderRadius,n=o?.hasShadow),t&&n?(0,T.__)("Border & Shadow"):n?(0,T.__)("Shadow"):(0,T.__)("Border")}function Np(e,t,n){if(!Rp(t,"color")||ks(t,wp,"color"))return e;const o=Lp(n),r=ms(e.className,o);return e.className=r||void 0,e}function Lp(e){const{borderColor:t,style:n}=e,o=Ad("border-color",t);return ms({"has-border-color":t||n?.border?.color,[o]:!!o})}var Dp={useBlockProps:function({name:e,borderColor:t,style:n}){const{colors:o}=Nd();if(!Rp(e,"color")||ks(e,wp,"color"))return{};const{color:r}=Ip({colors:o,namedColor:t}),{color:i}=Ip({colors:o,namedColor:jp(n?.border?.top?.color)}),{color:s}=Ip({colors:o,namedColor:jp(n?.border?.right?.color)}),{color:l}=Ip({colors:o,namedColor:jp(n?.border?.bottom?.color)}),{color:a}=Ip({colors:o,namedColor:jp(n?.border?.left?.color)});return Np({style:fs({borderTopColor:i||r,borderRightColor:s||r,borderBottomColor:l||r,borderLeftColor:a||r})||{}},e,{borderColor:t,style:n})},addSaveProps:Np,attributeKeys:["borderColor","style"],hasSupport:e=>Rp(e,"color")};function Op(e){if(e)return`has-${e}-gradient-background`}function zp(e,t){const n=e?.find((e=>e.slug===t));return n&&n.gradient}function Vp(e,t){const n=e?.find((e=>e.gradient===t));return n}function Fp(e,t){const n=Vp(e,t);return n&&n.slug}function Hp({gradientAttribute:e="gradient",customGradientAttribute:t="customGradient"}={}){const{clientId:n}=C(),[o,r,i]=Ti("color.gradients.custom","color.gradients.theme","color.gradients.default"),s=(0,h.useMemo)((()=>[...o||[],...r||[],...i||[]]),[o,r,i]),{gradient:l,customGradient:a}=(0,g.useSelect)((o=>{const{getBlockAttributes:r}=o(ji),i=r(n)||{};return{customGradient:i[t],gradient:i[e]}}),[n,e,t]),{updateBlockAttributes:c}=(0,g.useDispatch)(ji),u=(0,h.useCallback)((o=>{const r=Fp(s,o);c(n,r?{[e]:r,[t]:void 0}:{[e]:void 0,[t]:o})}),[s,n,c]),d=Op(l);let p;return p=l?zp(s,l):a,{gradientClass:d,gradientValue:p,setGradient:u}}(0,f.addFilter)("blocks.registerBlockType","core/border/addAttributes",(function(e){return Rp(e,"color")?e.attributes.borderColor?e:{...e,attributes:{...e.attributes,borderColor:{type:"string"}}}:e}));const{Tabs:Up}=G(ws.privateApis),Gp=["colors","disableCustomColors","gradients","disableCustomGradients"],$p="color",Wp="gradient";function Kp({colors:e,gradients:t,disableCustomColors:n,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,className:i,label:s,onColorChange:l,onGradientChange:a,colorValue:c,gradientValue:u,clearable:p,showTitle:h=!0,enableAlpha:g,headingLevel:m}){const f=l&&(e&&e.length>0||!n),b=a&&(t&&t.length>0||!o);if(!f&&!b)return null;const k={[$p]:(0,d.jsx)(ws.ColorPalette,{value:c,onChange:b?e=>{l(e),a()}:l,colors:e,disableCustomColors:n,__experimentalIsRenderedInSidebar:r,clearable:p,enableAlpha:g,headingLevel:m}),[Wp]:(0,d.jsx)(ws.GradientPicker,{value:u,onChange:f?e=>{a(e),l()}:a,gradients:t,disableCustomGradients:o,__experimentalIsRenderedInSidebar:r,clearable:p,headingLevel:m})},v=e=>(0,d.jsx)("div",{className:"block-editor-color-gradient-control__panel",children:k[e]});return(0,d.jsx)(ws.BaseControl,{__nextHasNoMarginBottom:!0,className:ms("block-editor-color-gradient-control",i),children:(0,d.jsx)("fieldset",{className:"block-editor-color-gradient-control__fieldset",children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:1,children:[h&&(0,d.jsx)("legend",{children:(0,d.jsx)("div",{className:"block-editor-color-gradient-control__color-indicator",children:(0,d.jsx)(ws.BaseControl.VisualLabel,{children:s})})}),f&&b&&(0,d.jsx)("div",{children:(0,d.jsxs)(Up,{defaultTabId:u?Wp:!!f&&$p,children:[(0,d.jsxs)(Up.TabList,{children:[(0,d.jsx)(Up.Tab,{tabId:$p,children:(0,T.__)("Color")}),(0,d.jsx)(Up.Tab,{tabId:Wp,children:(0,T.__)("Gradient")})]}),(0,d.jsx)(Up.TabPanel,{tabId:$p,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.color}),(0,d.jsx)(Up.TabPanel,{tabId:Wp,className:"block-editor-color-gradient-control__panel",focusable:!1,children:k.gradient})]})}),!b&&v($p),!f&&v(Wp)]})})})}function Zp(e){const[t,n,o,r]=Ti("color.palette","color.gradients","color.custom","color.customGradient");return(0,d.jsx)(Kp,{colors:t,gradients:n,disableCustomColors:!o,disableCustomGradients:!r,...e})}var qp=function(e){return Gp.every((t=>e.hasOwnProperty(t)))?(0,d.jsx)(Kp,{...e}):(0,d.jsx)(Zp,{...e})};function Yp(e){const t=Xp(e),n=nh(e),o=Qp(e),r=eh(e),i=th(e),s=Jp(e);return t||n||o||r||i||s}function Xp(e){const t=ps(e);return e?.color?.text&&(t?.length>0||e?.color?.custom)}function Qp(e){const t=ps(e);return e?.color?.link&&(t?.length>0||e?.color?.custom)}function Jp(e){const t=ps(e);return e?.color?.caption&&(t?.length>0||e?.color?.custom)}function eh(e){const t=ps(e),n=hs(e);return e?.color?.heading&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function th(e){const t=ps(e),n=hs(e);return e?.color?.button&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function nh(e){const t=ps(e),n=hs(e);return e?.color?.background&&(t?.length>0||e?.color?.custom||n?.length>0||e?.color?.customGradient)}function oh({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Elements"),resetAll:()=>{const o=e(n);t(o)},panelId:o,hasInnerWrapper:!0,headingLevel:3,className:"color-block-support-panel",__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",dropdownMenuProps:i,children:(0,d.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:r})})}const rh={text:!0,background:!0,link:!0,heading:!0,button:!0,caption:!0},ih={placement:"left-start",offset:36,shift:!0,flip:!0,resize:!1},{Tabs:sh}=G(ws.privateApis),lh=({indicators:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.__experimentalZStack,{isLayered:!1,offset:-8,children:e.map(((e,t)=>(0,d.jsx)(ws.Flex,{expanded:!1,children:(0,d.jsx)(ws.ColorIndicator,{colorValue:e})},t)))}),(0,d.jsx)(ws.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:t})]});function ah({isGradient:e,inheritedValue:t,userValue:n,setValue:o,colorGradientControlSettings:r}){return(0,d.jsx)(qp,{...r,showTitle:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,colorValue:e?void 0:t,gradientValue:e?t:void 0,onColorChange:e?void 0:o,onGradientChange:e?o:void 0,clearable:t===n,headingLevel:3})}function ch({label:e,hasValue:t,resetValue:n,isShownByDefault:o,indicators:r,tabs:i,colorGradientControlSettings:s,panelId:l}){const a=i.find((e=>void 0!==e.userValue)),{key:c,...u}=i[0]??{},p=(0,h.useRef)(void 0);return(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",hasValue:t,label:e,onDeselect:n,isShownByDefault:o,panelId:l,children:(0,d.jsx)(ws.Dropdown,{popoverProps:ih,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:({onToggle:o,isOpen:i})=>{const s={onClick:o,className:ms("block-editor-panel-color-gradient-settings__dropdown",{"is-open":i}),"aria-expanded":i,ref:p};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{...s,__next40pxDefaultSize:!0,children:(0,d.jsx)(lh,{indicators:r,label:e})}),t()&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Ha,onClick:()=>{n(),i&&o(),p.current?.focus()}})]})},renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,d.jsxs)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:[1===i.length&&(0,d.jsx)(ah,{...u,colorGradientControlSettings:s},c),i.length>1&&(0,d.jsxs)(sh,{defaultTabId:a?.key,children:[(0,d.jsx)(sh.TabList,{children:i.map((e=>(0,d.jsx)(sh.Tab,{tabId:e.key,children:e.label},e.key)))}),i.map((e=>{const{key:t,...n}=e;return(0,d.jsx)(sh.TabPanel,{tabId:t,focusable:!1,children:(0,d.jsx)(ah,{...n,colorGradientControlSettings:s},t)},t)}))]})]})})})})}function uh({as:e=oh,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=rh,children:l}){const a=ps(r),c=hs(r),u=r?.color?.custom,p=r?.color?.customGradient,g=a.length>0||u,m=c.length>0||p,f=e=>ts({settings:r},"",e),b=e=>{const t=a.flatMap((({colors:e})=>e)).find((({color:t})=>t===e));return t?"var:preset|color|"+t.slug:e},k=e=>{const t=c.flatMap((({gradients:e})=>e)).find((({gradient:t})=>t===e));return t?"var:preset|gradient|"+t.slug:e},v=nh(r),_=f(o?.color?.background),y=f(t?.color?.background),x=f(o?.color?.gradient),S=f(t?.color?.gradient),w=Qp(r),C=f(o?.elements?.link?.color?.text),B=f(t?.elements?.link?.color?.text),I=f(o?.elements?.link?.[":hover"]?.color?.text),j=f(t?.elements?.link?.[":hover"]?.color?.text),E=Xp(r),M=f(o?.color?.text),P=f(t?.color?.text),R=e=>{let o=me(t,["color","text"],b(e));M===C&&(o=me(o,["elements","link","color","text"],b(e))),n(o)},A=[{name:"caption",label:(0,T.__)("Captions"),showPanel:Jp(r)},{name:"button",label:(0,T.__)("Button"),showPanel:th(r)},{name:"heading",label:(0,T.__)("Heading"),showPanel:eh(r)},{name:"h1",label:(0,T.__)("H1"),showPanel:eh(r)},{name:"h2",label:(0,T.__)("H2"),showPanel:eh(r)},{name:"h3",label:(0,T.__)("H3"),showPanel:eh(r)},{name:"h4",label:(0,T.__)("H4"),showPanel:eh(r)},{name:"h5",label:(0,T.__)("H5"),showPanel:eh(r)},{name:"h6",label:(0,T.__)("H6"),showPanel:eh(r)}],N=(0,h.useCallback)((e=>({...e,color:void 0,elements:{...e?.elements,link:{...e?.elements?.link,color:void 0,":hover":{color:void 0}},...A.reduce(((t,n)=>({...t,[n.name]:{...e?.elements?.[n.name],color:void 0}})),{})}})),[]),L=[E&&{key:"text",label:(0,T.__)("Text"),hasValue:()=>!!P,resetValue:()=>R(void 0),isShownByDefault:s.text,indicators:[M],tabs:[{key:"text",label:(0,T.__)("Text"),inheritedValue:M,setValue:R,userValue:P}]},v&&{key:"background",label:(0,T.__)("Background"),hasValue:()=>!!y||!!S,resetValue:()=>{const e=me(t,["color","background"],void 0);e.color.gradient=void 0,n(e)},isShownByDefault:s.background,indicators:[x??_],tabs:[g&&{key:"background",label:(0,T.__)("Color"),inheritedValue:_,setValue:e=>{const o=me(t,["color","background"],b(e));o.color.gradient=void 0,n(o)},userValue:y},m&&{key:"gradient",label:(0,T.__)("Gradient"),inheritedValue:x,setValue:e=>{const o=me(t,["color","gradient"],k(e));o.color.background=void 0,n(o)},userValue:S,isGradient:!0}].filter(Boolean)},w&&{key:"link",label:(0,T.__)("Link"),hasValue:()=>!!B||!!j,resetValue:()=>{let e=me(t,["elements","link",":hover","color","text"],void 0);e=me(e,["elements","link","color","text"],void 0),n(e)},isShownByDefault:s.link,indicators:[C,I],tabs:[{key:"link",label:(0,T.__)("Default"),inheritedValue:C,setValue:e=>{n(me(t,["elements","link","color","text"],b(e)))},userValue:B},{key:"hover",label:(0,T.__)("Hover"),inheritedValue:I,setValue:e=>{n(me(t,["elements","link",":hover","color","text"],b(e)))},userValue:j}]}].filter(Boolean);return A.forEach((({name:e,label:r,showPanel:i})=>{if(!i)return;const l=f(o?.elements?.[e]?.color?.background),a=f(o?.elements?.[e]?.color?.gradient),c=f(o?.elements?.[e]?.color?.text),u=f(t?.elements?.[e]?.color?.background),d=f(t?.elements?.[e]?.color?.gradient),p=f(t?.elements?.[e]?.color?.text),h="caption"!==e;L.push({key:e,label:r,hasValue:()=>!!(p||u||d),resetValue:()=>{const o=me(t,["elements",e,"color","background"],void 0);o.elements[e].color.gradient=void 0,o.elements[e].color.text=void 0,n(o)},isShownByDefault:s[e],indicators:h?[c,a??l]:[c],tabs:[g&&{key:"text",label:(0,T.__)("Text"),inheritedValue:c,setValue:o=>{n(me(t,["elements",e,"color","text"],b(o)))},userValue:p},g&&h&&{key:"background",label:(0,T.__)("Background"),inheritedValue:l,setValue:o=>{const r=me(t,["elements",e,"color","background"],b(o));r.elements[e].color.gradient=void 0,n(r)},userValue:u},m&&h&&{key:"gradient",label:(0,T.__)("Gradient"),inheritedValue:a,setValue:o=>{const r=me(t,["elements",e,"color","gradient"],k(o));r.elements[e].color.background=void 0,n(r)},userValue:d,isGradient:!0}].filter(Boolean)})})),(0,d.jsxs)(e,{resetAllFilter:N,value:t,onChange:n,panelId:i,children:[L.map((e=>{const{key:t,...n}=e;return(0,d.jsx)(ch,{...n,colorGradientControlSettings:{colors:a,disableCustomColors:!u,gradients:c,disableCustomGradients:!p},panelId:i},t)})),l]})}Bd([Id,Td]);var dh=function({backgroundColor:e,fallbackBackgroundColor:t,fallbackTextColor:n,fallbackLinkColor:o,fontSize:r,isLargeText:i,textColor:s,linkColor:l,enableAlphaChecker:a=!1}){const c=e||t;if(!c)return null;const u=s||n,p=l||o;if(!u&&!p)return null;const h=[{color:u,description:(0,T.__)("text color")},{color:p,description:(0,T.__)("link color")}],g=wd(c),m=g.alpha()<1,f=g.brightness(),b={level:"AA",size:i||!1!==i&&r>=24?"large":"small"};let k="",v="";for(const e of h){if(!e.color)continue;const t=wd(e.color),n=t.isReadable(g,b),o=t.alpha()<1;if(!n){if(m||o)continue;k=f<t.brightness()?(0,T.sprintf)((0,T.__)("This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s."),e.description):(0,T.sprintf)((0,T.__)("This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s."),e.description),v=(0,T.__)("This color combination may be hard for people to read.");break}o&&a&&(k=(0,T.__)("Transparent text may be hard for people to read."),v=(0,T.__)("Transparent text may be hard for people to read."))}return k?((0,Uo.speak)(v),(0,d.jsx)("div",{className:"block-editor-contrast-checker",children:(0,d.jsx)(ws.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,children:k})})):null};const ph=(0,h.createContext)({refsMap:(0,m.observableMap)()});function hh({children:e}){const t=(0,h.useMemo)((()=>({refsMap:(0,m.observableMap)()})),[]);return(0,d.jsx)(ph.Provider,{value:t,children:e})}function gh(e){const{refsMap:t}=(0,h.useContext)(ph);return(0,m.useRefEffect)((n=>(t.set(e,n),()=>t.delete(e))),[e])}function mh(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function fh(e,t){const{refsMap:n}=(0,h.useContext)(ph);(0,h.useLayoutEffect)((()=>{mh(t,n.get(e));const o=n.subscribe(e,(()=>mh(t,n.get(e))));return()=>{o(),mh(t,null)}}),[n,e,t])}function bh(e){const[t,n]=(0,h.useState)(null);return fh(e,n),t}function kh(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function vh(e,t){return Object.keys(t).some((n=>e[n]!==t[n]))?t:e}function _h({clientId:e}){const t=bh(e),[n,o]=(0,h.useReducer)(vh,{});return(0,h.useLayoutEffect)((()=>{function e(){o(function(e){if(!e)return{};const t=e.querySelector("a"),n=t?.innerText?kh(t,"color"):void 0,o=kh(e,"color");let r=e,i=kh(r,"background-color");for(;"rgba(0, 0, 0, 0)"===i&&r.parentNode&&r.parentNode.nodeType===r.parentNode.ELEMENT_NODE;)r=r.parentNode,i=kh(r,"background-color");return{textColor:o,backgroundColor:i,linkColor:n}}(t))}t&&window.requestAnimationFrame((()=>window.requestAnimationFrame(e)))})),(0,d.jsx)(dh,{backgroundColor:n.backgroundColor,textColor:n.textColor,linkColor:n.linkColor,enableAlphaChecker:!0})}ph.displayName="BlockRefsContext";const yh="color",xh=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&(!0===t.link||!0===t.gradient||!1!==t.background||!1!==t.text)},Sh=e=>{if("web"!==h.Platform.OS)return!1;const t=(0,p.getBlockSupport)(e,yh);return null!==t&&"object"==typeof t&&!!t.link},wh=e=>{const t=(0,p.getBlockSupport)(e,yh);return null!==t&&"object"==typeof t&&!!t.gradients},Ch=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&!1!==t.background},Bh=e=>{const t=(0,p.getBlockSupport)(e,yh);return t&&!1!==t.text};function Ih(e,t,n){if(!xh(t)||ks(t,yh))return e;const o=wh(t),{backgroundColor:r,textColor:i,gradient:s,style:l}=n,a=e=>!ks(t,yh,e),c=a("text")?Ad("color",i):void 0,u=a("gradients")?Op(s):void 0,d=a("background")?Ad("background-color",r):void 0,p=a("background")||a("gradients"),h=r||l?.color?.background||o&&(s||l?.color?.gradient),g=ms(e.className,c,u,{[d]:!(o&&l?.color?.gradient||!d),"has-text-color":a("text")&&(i||l?.color?.text),"has-background":p&&h,"has-link-color":a("link")&&l?.elements?.link?.color});return e.className=g||void 0,e}function jh(e){const t=e?.color?.text,n=t?.startsWith("var:preset|color|")?t.substring(17):void 0,o=e?.color?.background,r=o?.startsWith("var:preset|color|")?o.substring(17):void 0,i=e?.color?.gradient,s=i?.startsWith("var:preset|gradient|")?i.substring(20):void 0,l={...e};return l.color={...l.color,text:n?void 0:t,background:r?void 0:o,gradient:s?void 0:i},{style:fs(l),textColor:n,backgroundColor:r,gradient:s}}function Eh(e){return{...e.style,color:{...e.style?.color,text:e.textColor?"var:preset|color|"+e.textColor:e.style?.color?.text,background:e.backgroundColor?"var:preset|color|"+e.backgroundColor:e.style?.color?.background,gradient:e.gradient?"var:preset|gradient|"+e.gradient:e.style?.color?.gradient}}}function Th({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=Eh(e),o=t(n);return{...e,...jh(o)}}),[t]);return(0,d.jsx)(Fa,{group:"color",resetAllFilter:n,children:e})}function Mh({clientId:e,name:t,setAttributes:n,settings:o}){const r=Yp(o);const{style:i,textColor:s,backgroundColor:l,gradient:a}=(0,g.useSelect)((function(t){const{style:n,textColor:o,backgroundColor:r,gradient:i}=t(ji).getBlockAttributes(e)||{};return{style:n,textColor:o,backgroundColor:r,gradient:i}}),[e]),c=(0,h.useMemo)((()=>Eh({style:i,textColor:s,backgroundColor:l,gradient:a})),[i,s,l,a]);if(!r)return null;const u=(0,p.getBlockSupport)(t,[yh,"__experimentalDefaultControls"]),m="web"===h.Platform.OS&&!c?.color?.gradient&&(o?.color?.text||o?.color?.link)&&!1!==(0,p.getBlockSupport)(t,[yh,"enableContrastChecker"]);return(0,d.jsx)(uh,{as:Th,panelId:e,settings:o,value:c,onChange:e=>{n(jh(e))},defaultControls:u,enableContrastChecker:!1!==(0,p.getBlockSupport)(t,[yh,"enableContrastChecker"]),children:m&&(0,d.jsx)(_h,{clientId:e})})}var Ph={useBlockProps:function({name:e,backgroundColor:t,textColor:n,gradient:o,style:r}){const[i,s,l]=Ti("color.palette.custom","color.palette.theme","color.palette.default"),a=(0,h.useMemo)((()=>[...i||[],...s||[],...l||[]]),[i,s,l]);if(!xh(e)||ks(e,yh))return{};const c={};n&&!ks(e,yh,"text")&&(c.color=Pd(a,n)?.color),t&&!ks(e,yh,"background")&&(c.backgroundColor=Pd(a,t)?.color);const u=Ih({style:c},e,{textColor:n,backgroundColor:t,gradient:o,style:r}),d=t||r?.color?.background||o||r?.color?.gradient;return{...u,className:ms(u.className,!d&&Nu(r))}},addSaveProps:Ih,attributeKeys:["backgroundColor","textColor","gradient","style"],hasSupport:xh};const Rh={linkColor:[["style","elements","link","color","text"]],textColor:[["textColor"],["style","color","text"]],backgroundColor:[["backgroundColor"],["style","color","background"]],gradient:[["gradient"],["style","color","gradient"]]};function Ah({__next40pxDefaultSize:e=!1,__nextHasNoMarginBottom:t=!1,value:n="",onChange:o,fontFamilies:r,className:i,...s}){const[l]=Ti("typography.fontFamilies");if(r||(r=l),!r||0===r.length)return null;const a=[{key:"",name:(0,T.__)("Default")},...r.map((({fontFamily:e,name:t})=>({key:e,name:t||e,style:{fontFamily:e}})))];t||I()("Bottom margin styles for wp.blockEditor.FontFamilyControl",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version"}),e||void 0!==s.size&&"default"!==s.size||I()("36px default size for wp.blockEditor.__experimentalFontFamilyControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."});const c=a.find((e=>e.key===n))??"";return(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,label:(0,T.__)("Font"),value:c,onChange:({selectedItem:e})=>o(e.key),options:a,className:ms("block-editor-font-family-control",i,{"is-next-has-no-margin-bottom":t}),...s})}(0,f.addFilter)("blocks.registerBlockType","core/color/addAttribute",(function(e){return xh(e)?(e.attributes.backgroundColor||Object.assign(e.attributes,{backgroundColor:{type:"string"}}),e.attributes.textColor||Object.assign(e.attributes,{textColor:{type:"string"}}),wh(e)&&!e.attributes.gradient&&Object.assign(e.attributes,{gradient:{type:"string"}}),e):e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/color/addTransforms",(function(e,t,n,o){const r=e.name;return bs({linkColor:Sh(r),textColor:Bh(r),backgroundColor:Ch(r),gradient:wh(r)},Rh,e,t,n,o)}));const Nh=(e,t)=>e?t?(0,T.__)("Appearance"):(0,T.__)("Font style"):(0,T.__)("Font weight");function Lh(e){const{__next40pxDefaultSize:t=!1,onChange:n,hasFontStyles:o=!0,hasFontWeights:r=!0,fontFamilyFaces:i,value:{fontStyle:s,fontWeight:l},...a}=e,c=o||r,u=Nh(o,r),p={key:"default",name:(0,T.__)("Default"),style:{fontStyle:void 0,fontWeight:void 0}},{fontStyles:g,fontWeights:m,combinedStyleAndWeightOptions:f}=$i(i),b=(0,h.useMemo)((()=>o&&r?(()=>{const e=[p];return f&&e.push(...f),e})():o?(()=>{const e=[p];return g.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:n,fontWeight:void 0}})})),e})():(()=>{const e=[p];return m.forEach((({name:t,value:n})=>{e.push({key:n,name:t,style:{fontStyle:void 0,fontWeight:n}})})),e})()),[e.options,g,m,f]),k=b.find((e=>e.style.fontStyle===s&&e.style.fontWeight===l))||b[0];return t||void 0!==a.size&&"default"!==a.size||I()("36px default size for wp.blockEditor.__experimentalFontAppearanceControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),c&&(0,d.jsx)(ws.CustomSelectControl,{...a,className:"components-font-appearance-control",__next40pxDefaultSize:t,__shouldNotWarnDeprecated36pxSize:!0,label:u,describedBy:k?o?r?(0,T.sprintf)((0,T.__)("Currently selected font appearance: %s"),k.name):(0,T.sprintf)((0,T.__)("Currently selected font style: %s"),k.name):(0,T.sprintf)((0,T.__)("Currently selected font weight: %s"),k.name):(0,T.__)("No selected font appearance"),options:b,value:k,onChange:({selectedItem:e})=>n(e.style)})}const Dh=1.5;var Oh=({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r})=>{const i=function(e){return void 0!==e&&""!==e}(t),s=(e,t)=>{if(i)return e;switch(`${e}`){case"0.1":return 1.6;case"0":return t?e:1.4;case"":return Dh;default:return e}},l=i?t:"";return e||void 0!==r.size&&"default"!==r.size||I()("36px default size for wp.blockEditor.LineHeightControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,d.jsx)("div",{className:"block-editor-line-height-control",children:(0,d.jsx)(ws.__experimentalNumberControl,{...r,__shouldNotWarnDeprecated36pxSize:!0,__next40pxDefaultSize:e,__unstableInputWidth:o,__unstableStateReducer:(e,t)=>{const n=["insertText","insertFromPaste"].includes(t.payload.event.nativeEvent?.inputType),o=s(e.value,n);return{...e,value:o}},onChange:(e,{event:t})=>{""!==e?"click"!==t.type?n(`${e}`):n(s(`${e}`,!1)):n()},label:(0,T.__)("Line height"),placeholder:Dh,step:.01,spinFactor:10,value:l,min:0,spinControls:"custom"})})};function zh({__next40pxDefaultSize:e=!1,value:t,onChange:n,__unstableInputWidth:o="60px",...r}){const[i]=Ti("spacing.units"),s=(0,ws.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem"],defaultValues:{px:2,em:.2,rem:.2}});return e||void 0!==r.size&&"default"!==r.size||I()("36px default size for wp.blockEditor.__experimentalLetterSpacingControl",{since:"6.8",version:"7.1",hint:"Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version."}),(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:e,__shouldNotWarnDeprecated36pxSize:!0,...r,label:(0,T.__)("Letter spacing"),value:t,__unstableInputWidth:o,units:s,onChange:n})}var Vh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),Fh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),Hh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),Uh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M4 12.8h16v-1.5H4v1.5zm0 7h12.4v-1.5H4v1.5zM4 4.3v1.5h16V4.3H4z"})});const Gh=[{label:(0,T.__)("Align text left"),value:"left",icon:Vh},{label:(0,T.__)("Align text center"),value:"center",icon:Fh},{label:(0,T.__)("Align text right"),value:"right",icon:Hh},{label:(0,T.__)("Justify text"),value:"justify",icon:Uh}],$h=["left","center","right"];function Wh({className:e,value:t,onChange:n,options:o=$h}){const r=(0,h.useMemo)((()=>Gh.filter((e=>o.includes(e.value)))),[o]);return r.length?(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Text alignment"),className:ms("block-editor-text-alignment-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:r.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))}):null}var Kh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z"})}),Zh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z"})}),qh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z"})});const Yh=[{label:(0,T.__)("None"),value:"none",icon:Ha},{label:(0,T.__)("Uppercase"),value:"uppercase",icon:Kh},{label:(0,T.__)("Lowercase"),value:"lowercase",icon:Zh},{label:(0,T.__)("Capitalize"),value:"capitalize",icon:qh}];function Xh({className:e,value:t,onChange:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Letter case"),className:ms("block-editor-text-transform-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:Yh.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}var Qh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z"})}),Jh=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});const eg=[{label:(0,T.__)("None"),value:"none",icon:Ha},{label:(0,T.__)("Underline"),value:"underline",icon:Qh},{label:(0,T.__)("Strikethrough"),value:"line-through",icon:Jh}];function tg({value:e,onChange:t,className:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Decoration"),className:ms("block-editor-text-decoration-control",n),value:e,onChange:n=>{t(n===e?void 0:n)},children:eg.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}var ng=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M8.2 14.4h3.9L13 17h1.7L11 6.5H9.3L5.6 17h1.7l.9-2.6zm2-5.5 1.4 4H8.8l1.4-4zm7.4 7.5-1.3.8.8 1.4H5.5V20h14.3l-2.2-3.6z"})}),og=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M7 5.6v1.7l2.6.9v3.9L7 13v1.7L17.5 11V9.3L7 5.6zm4.2 6V8.8l4 1.4-4 1.4zm-5.7 5.6V5.5H4v14.3l3.6-2.2-.8-1.3-1.3.9z"})});const rg=[{label:(0,T.__)("Horizontal"),value:"horizontal-tb",icon:ng},{label:(0,T.__)("Vertical"),value:(0,T.isRTL)()?"vertical-lr":"vertical-rl",icon:og}];function ig({className:e,value:t,onChange:n}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{isDeselectable:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("Orientation"),className:ms("block-editor-writing-mode-control",e),value:t,onChange:e=>{n(e===t?void 0:e)},children:rg.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{value:e.value,icon:e.icon,label:e.label},e.value)))})}const sg=1,lg=6;function ag(e){const t=ug(e),n=dg(e),o=pg(e),r=hg(e),i=mg(e),s=gg(e),l=fg(e),a=bg(e),c=kg(e),u=cg(e);return t||n||o||r||i||s||u||l||a||c}function cg(e){return!1!==e?.typography?.defaultFontSizes&&e?.typography?.fontSizes?.default?.length||e?.typography?.fontSizes?.theme?.length||e?.typography?.fontSizes?.custom?.length||e?.typography?.customFontSize}function ug(e){return["default","theme","custom"].some((t=>e?.typography?.fontFamilies?.[t]?.length))}function dg(e){return e?.typography?.lineHeight}function pg(e){return e?.typography?.fontStyle||e?.typography?.fontWeight}function hg(e){return e?.typography?.letterSpacing}function gg(e){return e?.typography?.textTransform}function mg(e){return e?.typography?.textAlign}function fg(e){return e?.typography?.textDecoration}function bg(e){return e?.typography?.writingMode}function kg(e){return e?.typography?.textColumns}function vg({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Typography"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const _g={fontFamily:!0,fontSize:!0,fontAppearance:!0,lineHeight:!0,letterSpacing:!0,textAlign:!0,textTransform:!0,textDecoration:!0,writingMode:!0,textColumns:!0};function yg({as:e=vg,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=_g}){const l=e=>ts({settings:r},"",e),a=ug(r),c=l(o?.typography?.fontFamily),{fontFamilies:u,fontFamilyFaces:p}=(0,h.useMemo)((()=>function(e,t){const n=e?.typography?.fontFamilies,o=["default","theme","custom"].flatMap((e=>n?.[e]??[])),r=o.find((e=>e.fontFamily===t))?.fontFace??[];return{fontFamilies:o,fontFamilyFaces:r}}(r,c)),[r,c]),g=e=>{const o=u?.find((({fontFamily:t})=>t===e))?.slug;n(me(t,["typography","fontFamily"],o?`var:preset|font-family|${o}`:e||void 0))},m=cg(r),f=!r?.typography?.customFontSize,b=function(e){const t=e?.typography?.fontSizes,n=!!e?.typography?.defaultFontSizes;return[...t?.custom??[],...t?.theme??[],...n?t?.default??[]:[]]}(r),k=l(o?.typography?.fontSize),v=(()=>{const e=o?.typography?.fontSize;if(!e||"string"!=typeof e)return;if(e.startsWith("var:preset|font-size|"))return e.replace("var:preset|font-size|","");const t=e.match(/^var\(--wp--preset--font-size--([^)]+)\)$/);return t?t[1]:void 0})(),_=(e,o)=>{n(me(t,["typography","fontSize"],(o?.slug?`var:preset|font-size|${o?.slug}`:e)||void 0))},y=pg(r),x=function(e){return e?.typography?.fontStyle?e?.typography?.fontWeight?(0,T.__)("Appearance"):(0,T.__)("Font style"):(0,T.__)("Font weight")}(r),S=r?.typography?.fontStyle,w=r?.typography?.fontWeight,C=l(o?.typography?.fontStyle),B=l(o?.typography?.fontWeight),{nearestFontStyle:I,nearestFontWeight:j}=function(e,t,n){let o=t,r=n;const{fontStyles:i,fontWeights:s,combinedStyleAndWeightOptions:l}=$i(e),a=i?.some((({value:e})=>e===t)),c=s?.some((({value:e})=>e?.toString()===n?.toString()));var u,d;return a||(o=t?(u=i,"string"==typeof(d=t)&&d&&["normal","italic","oblique"].includes(d)?!u||0===u.length||u.find((e=>e.value===d))?d:"oblique"!==d||u.find((e=>"oblique"===e.value))?"":"italic":""):l?.find((e=>e.style.fontWeight===Zi(s,n)))?.style?.fontStyle),c||(r=n?Zi(s,n):l?.find((e=>e.style.fontStyle===(o||t)))?.style?.fontWeight),{nearestFontStyle:o,nearestFontWeight:r}}(p,C,B),E=(0,h.useCallback)((({fontStyle:e,fontWeight:o})=>{e===C&&o===B||n({...t,typography:{...t?.typography,fontStyle:e||void 0,fontWeight:o||void 0}})}),[C,B,n,t]),M=(0,h.useCallback)((()=>{E({})}),[E]);(0,h.useEffect)((()=>{I&&j?E({fontStyle:I,fontWeight:j}):M()}),[I,j,M,E]);const P=dg(r),R=l(o?.typography?.lineHeight),A=e=>{n(me(t,["typography","lineHeight"],e||void 0))},N=hg(r),L=l(o?.typography?.letterSpacing),D=e=>{n(me(t,["typography","letterSpacing"],e||void 0))},O=kg(r),z=l(o?.typography?.textColumns),V=e=>{n(me(t,["typography","textColumns"],e||void 0))},F=gg(r),H=l(o?.typography?.textTransform),U=e=>{n(me(t,["typography","textTransform"],e||void 0))},G=fg(r),$=l(o?.typography?.textDecoration),W=e=>{n(me(t,["typography","textDecoration"],e||void 0))},K=bg(r),Z=l(o?.typography?.writingMode),q=e=>{n(me(t,["typography","writingMode"],e||void 0))},Y=mg(r),X=l(o?.typography?.textAlign),Q=e=>{n(me(t,["typography","textAlign"],e||void 0))},J=(0,h.useCallback)((e=>({...e,typography:{}})),[]);return(0,d.jsxs)(e,{resetAllFilter:J,value:t,onChange:n,panelId:i,children:[a&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Font"),hasValue:()=>!!t?.typography?.fontFamily,onDeselect:()=>g(void 0),isShownByDefault:s.fontFamily,panelId:i,children:(0,d.jsx)(Ah,{fontFamilies:u,value:c,onChange:g,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),m&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Size"),hasValue:()=>!!t?.typography?.fontSize,onDeselect:()=>_(void 0),isShownByDefault:s.fontSize,panelId:i,children:(0,d.jsx)(ws.FontSizePicker,{value:v||k,valueMode:v?"slug":"literal",onChange:_,fontSizes:b,disableCustomFontSizes:f,withReset:!1,withSlider:!0,size:"__unstable-large"})}),y&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:x,hasValue:()=>!!t?.typography?.fontStyle||!!t?.typography?.fontWeight,onDeselect:M,isShownByDefault:s.fontAppearance,panelId:i,children:(0,d.jsx)(Lh,{value:{fontStyle:C,fontWeight:B},onChange:E,hasFontStyles:S,hasFontWeights:w,fontFamilyFaces:p,size:"__unstable-large"})}),P&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Line height"),hasValue:()=>void 0!==t?.typography?.lineHeight,onDeselect:()=>A(void 0),isShownByDefault:s.lineHeight,panelId:i,children:(0,d.jsx)(Oh,{__unstableInputWidth:"auto",value:R,onChange:A,size:"__unstable-large"})}),N&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Letter spacing"),hasValue:()=>!!t?.typography?.letterSpacing,onDeselect:()=>D(void 0),isShownByDefault:s.letterSpacing,panelId:i,children:(0,d.jsx)(zh,{value:L,onChange:D,size:"__unstable-large",__unstableInputWidth:"auto"})}),O&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Columns"),hasValue:()=>!!t?.typography?.textColumns,onDeselect:()=>V(void 0),isShownByDefault:s.textColumns,panelId:i,children:(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Columns"),max:lg,min:sg,onChange:V,size:"__unstable-large",spinControls:"custom",value:z,initialPosition:1})}),G&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Decoration"),hasValue:()=>!!t?.typography?.textDecoration,onDeselect:()=>W(void 0),isShownByDefault:s.textDecoration,panelId:i,children:(0,d.jsx)(tg,{value:$,onChange:W,size:"__unstable-large",__unstableInputWidth:"auto"})}),K&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{className:"single-column",label:(0,T.__)("Orientation"),hasValue:()=>!!t?.typography?.writingMode,onDeselect:()=>q(void 0),isShownByDefault:s.writingMode,panelId:i,children:(0,d.jsx)(ig,{value:Z,onChange:q,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),F&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Letter case"),hasValue:()=>!!t?.typography?.textTransform,onDeselect:()=>U(void 0),isShownByDefault:s.textTransform,panelId:i,children:(0,d.jsx)(Xh,{value:H,onChange:U,showNone:!0,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0})}),Y&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Text alignment"),hasValue:()=>!!t?.typography?.textAlign,onDeselect:()=>Q(void 0),isShownByDefault:s.textAlign,panelId:i,children:(0,d.jsx)(Wh,{value:X,onChange:Q,size:"__unstable-large",__nextHasNoMarginBottom:!0})})]})}const xg="typography.lineHeight";const Sg=window.wp.tokenList;var wg=n.n(Sg);const Cg="typography.__experimentalFontFamily",{kebabCase:Bg}=G(ws.privateApis);function Ig(e,t,n){if(!(0,p.hasBlockSupport)(t,Cg))return e;if(ks(t,Jg,"fontFamily"))return e;if(!n?.fontFamily)return e;const o=new(wg())(e.className);o.add(`has-${Bg(n?.fontFamily)}-font-family`);const r=o.value;return e.className=r||void 0,e}var jg={useBlockProps:function({name:e,fontFamily:t}){return Ig({},e,{fontFamily:t})},addSaveProps:Ig,attributeKeys:["fontFamily"],hasSupport:e=>(0,p.hasBlockSupport)(e,Cg)};(0,f.addFilter)("blocks.registerBlockType","core/fontFamily/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Cg)?(e.attributes.fontFamily||Object.assign(e.attributes,{fontFamily:{type:"string"}}),e):e}));const{kebabCase:Eg}=G(ws.privateApis),Tg=(e,t,n)=>{if(t){const n=e?.find((({slug:e})=>e===t));if(n)return n}return{size:n}};function Mg(e,t){const n=e?.find((({size:e})=>e===t));return n||{size:t}}function Pg(e){if(e)return`has-${Eg(e)}-font-size`}const Rg="typography.fontSize";function Ag(e,t,n){if(!(0,p.hasBlockSupport)(t,Rg))return e;if(ks(t,Jg,"fontSize"))return e;const o=new(wg())(e.className);o.add(Pg(n.fontSize));const r=o.value;return e.className=r||void 0,e}var Ng={useBlockProps:function({name:e,fontSize:t,style:n}){const[o,r,i]=Ti("typography.fontSizes","typography.fluid","layout");if(!(0,p.hasBlockSupport)(e,Rg)||ks(e,Jg,"fontSize")||!t&&!n?.typography?.fontSize)return;let s;return n?.typography?.fontSize&&(s={style:{fontSize:Wi({size:n.typography.fontSize},{typography:{fluid:r},layout:i})}}),t&&(s={style:{fontSize:Tg(o,t,n?.typography?.fontSize).size}}),s?Ag(s,e,{fontSize:t}):void 0},addSaveProps:Ag,attributeKeys:["fontSize","style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Rg)};const Lg={fontSize:[["fontSize"],["style","typography","fontSize"]]};(0,f.addFilter)("blocks.registerBlockType","core/font/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Rg)?(e.attributes.fontSize||Object.assign(e.attributes,{fontSize:{type:"string"}}),e):e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/font-size/addTransforms",(function(e,t,n,o){const r=e.name;return bs({fontSize:(0,p.hasBlockSupport)(r,Rg)},Lg,e,t,n,o)}));const Dg=[{icon:Vh,title:(0,T.__)("Align text left"),align:"left"},{icon:Fh,title:(0,T.__)("Align text center"),align:"center"},{icon:Hh,title:(0,T.__)("Align text right"),align:"right"}],Og={placement:"bottom-start"};var zg=function({value:e,onChange:t,alignmentControls:n=Dg,label:o=(0,T.__)("Align text"),description:r=(0,T.__)("Change text alignment"),isCollapsed:i=!0,isToolbar:s}){function l(n){return()=>t(e===n?void 0:n)}const a=n.find((t=>t.align===e)),c=s?ws.ToolbarGroup:ws.ToolbarDropdownMenu,u=s?{isCollapsed:i}:{toggleProps:{description:r},popoverProps:Og};return(0,d.jsx)(c,{icon:a?a.icon:(0,T.isRTL)()?Hh:Vh,label:o,controls:n.map((t=>{const{align:n}=t,o=e===n;return{...t,isActive:o,role:i?"menuitemradio":void 0,onClick:l(n)}})),...u})};const Vg=e=>(0,d.jsx)(zg,{...e,isToolbar:!1}),Fg=e=>(0,d.jsx)(zg,{...e,isToolbar:!0}),Hg="typography.textAlign",Ug=[{icon:Vh,title:(0,T.__)("Align text left"),align:"left"},{icon:Fh,title:(0,T.__)("Align text center"),align:"center"},{icon:Hh,title:(0,T.__)("Align text right"),align:"right"}],Gg=["left","center","right"],$g=[];function Wg(e){return Array.isArray(e)?Gg.filter((t=>e.includes(t))):!0===e?Gg:$g}var Kg={edit:function({style:e,name:t,setAttributes:n}){const o=xs(t),r=o?.typography?.textAlign,i=ga();if(!r||"default"!==i)return null;const s=Wg((0,p.getBlockSupport)(t,Hg));if(!s.length)return null;const l=Ug.filter((e=>s.includes(e.align)));return(0,d.jsx)(Rs,{group:"block",children:(0,d.jsx)(Vg,{value:e?.typography?.textAlign,onChange:t=>{const o={...e,typography:{...e?.typography,textAlign:t}};n({style:fs(o)})},alignmentControls:l})})},useBlockProps:function({name:e,style:t}){if(!t?.typography?.textAlign)return null;if(!Wg((0,p.getBlockSupport)(e,Hg)).length)return null;if(ks(e,Jg,"textAlign"))return null;const n=t.typography.textAlign;return{className:ms({[`has-text-align-${n}`]:n})}},addSaveProps:function(e,t,n){if(!n?.style?.typography?.textAlign)return e;const{textAlign:o}=n.style.typography,r=(0,p.getBlockSupport)(t,Hg);Wg(r).includes(o)&&!ks(t,Jg,"textAlign")&&(e.className=ms(`has-text-align-${o}`,e.className));return e},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Hg,!1)};function Zg(e,t){return`${e} { font-size: ${t}px !important; }`}function qg(e,t,n){if(!e)return;n("");const o=function(e,t,n){const o=e.scrollHeight>e.clientHeight;let r=5,i=600,s=r;for(;r<=i;){const l=Math.floor((r+i)/2);n(Zg(t,l));const a=e.scrollWidth<=e.clientWidth,c=o||e.scrollHeight<=e.clientHeight;a&&c?(s=l,r=l+1):i=l-1}return s}(e,t,n);n(Zg(t,o))}const Yg="typography.fitText";(0,f.addFilter)("blocks.registerBlockType","core/fit-text/addAttribute",(function(e){return(0,p.hasBlockSupport)(e,Yg)?e.attributes?.fitText?e:{...e,attributes:{...e.attributes,fitText:{type:"boolean"}}}:e}));var Xg={useBlockProps:function({name:e,fitText:t,clientId:n}){return function({fitText:e,name:t,clientId:n}){const o=(0,p.hasBlockSupport)(t,Yg),r=bh(n),i=(0,g.useSelect)((t=>{if(n&&o&&e)return t(ji).getBlockAttributes(n)}),[n,o,e]),s=(0,h.useCallback)((()=>{if(!r||!o||!e)return;const t=`fit-text-${n}`;let i=r.ownerDocument.getElementById(t);i||(i=r.ownerDocument.createElement("style"),i.id=t,r.ownerDocument.head.appendChild(i)),qg(r,`#block-${n}`,(e=>{i.textContent=e}))}),[r,n,o,e]);(0,h.useEffect)((()=>{if(!(e&&r&&n&&o))return;const t=r,i=t.style.visibility;let l,a=null,c=null,u=null;return a=window.requestAnimationFrame((()=>{t.style.visibility="hidden",c=window.requestAnimationFrame((()=>{s(),u=setTimeout((()=>{t.style.visibility=i}),10)}))})),window.ResizeObserver&&t.parentElement&&(l=new window.ResizeObserver(s),l.observe(t.parentElement)),()=>{null!==a&&window.cancelAnimationFrame(a),null!==c&&window.cancelAnimationFrame(c),null!==u&&clearTimeout(u),l&&l.disconnect();const e=`fit-text-${n}`,o=t.ownerDocument.getElementById(e);o&&o.remove()}}),[e,n,s,r,o]),(0,h.useEffect)((()=>{if(e&&r&&o){const e=window.requestAnimationFrame((()=>{r&&s()}));return()=>window.cancelAnimationFrame(e)}}),[i,e,s,r,o])}({fitText:t,name:e,clientId:n}),t&&(0,p.hasBlockSupport)(e,Yg)?{className:"has-fit-text"}:{}},addSaveProps:function(e,t,n){if(!(0,p.hasBlockSupport)(t,Yg))return e;const{fitText:o}=n;if(!o)return e;const r=e.className?`${e.className} has-fit-text`:"has-fit-text";return{...e,className:r}},attributeKeys:["fitText","fontSize","style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Yg),edit:function({clientId:e,fitText:t=!1,setAttributes:n,name:o,fontSize:r,style:i}){return(0,p.hasBlockSupport)(o,Yg)?(0,d.jsx)(Fa,{group:"typography",children:(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>t,label:(0,T.__)("Fit text"),onDeselect:()=>n({fitText:void 0}),resetAllFilter:()=>({fitText:void 0}),panelId:e,children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Fit text"),checked:t,onChange:()=>{const e=!t||void 0,o={fitText:e};e&&(r&&(o.fontSize=void 0),i?.typography?.fontSize&&(o.style={...i,typography:{...i?.typography,fontSize:void 0}})),n(o)},help:t?(0,T.__)("Text will resize to fit its container."):(0,T.__)("The text will resize to fit its container, resetting other font size settings.")})})}):null}};function Qg(e,t){return Object.fromEntries(Object.entries(e).filter((([e])=>!t.includes(e))))}const Jg="typography",em=[xg,Rg,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",Cg,Hg,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalWritingMode","typography.__experimentalTextTransform","typography.__experimentalLetterSpacing",Yg];function tm(e){const t={...Qg(e,["fontFamily"])},n=e?.typography?.fontSize,o=e?.typography?.fontFamily,r="string"==typeof n&&n?.startsWith("var:preset|font-size|")?n.substring(21):void 0,i=o?.startsWith("var:preset|font-family|")?o.substring(23):void 0;return t.typography={...Qg(t.typography,["fontFamily"]),fontSize:r?void 0:n},{style:fs(t),fontFamily:i,fontSize:r}}function nm(e){return{...e.style,typography:{...e.style?.typography,fontFamily:e.fontFamily?"var:preset|font-family|"+e.fontFamily:void 0,fontSize:e.fontSize?"var:preset|font-size|"+e.fontSize:e.style?.typography?.fontSize}}}function om({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=nm(e),o=t(n);return{...e,...tm(o)}}),[t]);return(0,d.jsx)(Fa,{group:"typography",resetAllFilter:n,children:e})}function rm({clientId:e,name:t,setAttributes:n,settings:o}){const{style:r,fontFamily:i,fontSize:s,fitText:l}=(0,g.useSelect)((function(t){const{style:n,fontFamily:o,fontSize:r,fitText:i}=t(ji).getBlockAttributes(e)||{};return{style:n,fontFamily:o,fontSize:r,fitText:i}}),[e]),a=ag(o),c=(0,h.useMemo)((()=>nm({style:r,fontFamily:i,fontSize:s})),[r,s,i]);if(!a)return null;const u=(0,p.getBlockSupport)(t,[Jg,"__experimentalDefaultControls"]);return(0,d.jsx)(yg,{as:om,panelId:e,settings:o,value:c,onChange:e=>{const t=tm(e);(t.fontSize||t.style?.typography?.fontSize)&&l&&(t.fitText=void 0),n(t)},defaultControls:u})}const im=[],sm=new Intl.Collator("und",{numeric:!0}).compare;function lm(){const[e,t,n,o]=Ti("spacing.spacingSizes.custom","spacing.spacingSizes.theme","spacing.spacingSizes.default","spacing.defaultSpacingSizes"),r=e??im,i=t??im,s=n&&!1!==o?n:im;return(0,h.useMemo)((()=>{const e=[{name:(0,T.__)("None"),slug:"0",size:0},...r,...i,...s];return e.every((({slug:e})=>/^[0-9]/.test(e)))&&e.sort(((e,t)=>sm(e.slug,t.slug))),e.length>Qs?[{name:(0,T.__)("Default"),slug:"default",size:void 0},...e]:e}),[r,i,s])}const am={px:{max:300,steps:1},"%":{max:100,steps:1},vw:{max:100,steps:1},vh:{max:100,steps:1},em:{max:10,steps:.1},rm:{max:10,steps:.1},svw:{max:100,steps:1},lvw:{max:100,steps:1},dvw:{max:100,steps:1},svh:{max:100,steps:1},lvh:{max:100,steps:1},dvh:{max:100,steps:1},vi:{max:100,steps:1},svi:{max:100,steps:1},lvi:{max:100,steps:1},dvi:{max:100,steps:1},vb:{max:100,steps:1},svb:{max:100,steps:1},lvb:{max:100,steps:1},dvb:{max:100,steps:1},vmin:{max:100,steps:1},svmin:{max:100,steps:1},lvmin:{max:100,steps:1},dvmin:{max:100,steps:1},vmax:{max:100,steps:1},svmax:{max:100,steps:1},lvmax:{max:100,steps:1},dvmax:{max:100,steps:1}};function cm({icon:e,isMixed:t=!1,minimumCustomValue:n,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,side:l,spacingSizes:a,type:c,value:u}){u=sl(u,a);let p=a;const f=a.length<=Qs,b=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return t?.disableCustomSpacingSizes})),[k,v]=(0,h.useState)(!b&&void 0!==u&&!rl(u)),[_,y]=(0,h.useState)(n),x=(0,m.usePrevious)(u);u&&x!==u&&!rl(u)&&!0!==k&&v(!0);const[S]=Ti("spacing.units"),w=(0,ws.__experimentalUseCustomUnits)({availableUnits:S||["px","em","rem"]});let C=null;!f&&!k&&void 0!==u&&(!rl(u)||rl(u)&&t)?(p=[...a,{name:t?(0,T.__)("Mixed"):(0,T.sprintf)((0,T.__)("Custom (%s)"),u),slug:"custom",size:u}],C=p.length-1):t||(C=k?il(u,a):function(e,t){if(void 0===e)return 0;const n=0===parseFloat(e,10)?"0":al(e),o=t.findIndex((e=>String(e.slug)===n));return-1!==o?o:NaN}(u,a));const B=(0,h.useMemo)((()=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(C)),[C])[1]||w[0]?.value,I=parseFloat(C,10),j=(e,t)=>{const n=parseInt(e,10);if("selectList"===t){if(0===n)return;if(1===n)return"0"}else if(0===n)return"0";return`var:preset|spacing|${a[e]?.slug}`},E=t?(0,T.__)("Mixed"):null,M=p.map(((e,t)=>({key:t,name:e.name}))),P=a.slice(1,a.length-1).map(((e,t)=>({value:t+1,label:void 0}))),R=Js.includes(l)&&s?nl[l]:"",A=s?c?.toLowerCase():c,N=(0,T.sprintf)((0,T._x)("%1$s %2$s","spacing"),R,A).trim();return(0,d.jsxs)(ws.__experimentalHStack,{className:"spacing-sizes-control__wrapper",children:[e&&(0,d.jsx)(ws.Icon,{className:"spacing-sizes-control__icon",icon:e,size:24}),k&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalUnitControl,{onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,onChange:e=>o((e=>isNaN(parseFloat(e))?void 0:e)(e)),value:C,units:w,min:_,placeholder:E,disableUnits:t,label:N,hideLabelFromVision:!0,className:"spacing-sizes-control__custom-value-input",size:"__unstable-large",onDragStart:()=>{"-"===u?.charAt(0)&&y(0)},onDrag:()=>{"-"===u?.charAt(0)&&y(0)},onDragEnd:()=>{y(n)}}),(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r,value:I,min:0,max:am[B]?.max??10,step:am[B]?.steps??.1,withInputField:!1,onChange:e=>{o([e,B].join(""))},className:"spacing-sizes-control__custom-value-range",__nextHasNoMarginBottom:!0,label:N,hideLabelFromVision:!0})]}),f&&!k&&(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,onMouseOver:i,onMouseOut:r,className:"spacing-sizes-control__range-control",value:C,onChange:e=>o(j(e)),onMouseDown:e=>{e?.nativeEvent?.offsetX<35&&void 0===u&&o("0")},withInputField:!1,"aria-valuenow":C,"aria-valuetext":a[C]?.name,renderTooltipContent:e=>void 0===u?void 0:a[e]?.name,min:0,max:a.length-1,marks:P,label:N,hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,onFocus:i,onBlur:r}),!f&&!k&&(0,d.jsx)(ws.CustomSelectControl,{className:"spacing-sizes-control__custom-select-control",value:M.find((e=>e.key===C))||"",onChange:e=>{o(j(e.selectedItem.key,"selectList"))},options:M,label:N,hideLabelFromVision:!0,size:"__unstable-large",onMouseOver:i,onMouseOut:r,onFocus:i,onBlur:r}),!b&&(0,d.jsx)(ws.Button,{label:k?(0,T.__)("Use size preset"):(0,T.__)("Set custom size"),icon:Gd,onClick:()=>{v(!k)},isPressed:k,size:"small",className:"spacing-sizes-control__custom-toggle",iconSize:24})]})}const um=["vertical","horizontal"];function dm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=e=>n=>{if(!t)return;const o={...Object.keys(l).reduce(((e,t)=>(e[t]=sl(l[t],i),e)),{})};"vertical"===e&&(o.top=n,o.bottom=n),"horizontal"===e&&(o.left=n,o.right=n),t(o)},c=r?.length?um.filter((e=>cl(r,e))):um;return(0,d.jsx)(d.Fragment,{children:c.map((t=>{const r="vertical"===t?l.top:l.left;return(0,d.jsx)(cm,{icon:tl[t],label:nl[t],minimumCustomValue:e,onChange:a(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:r,withInputField:!1},`spacing-sizes-control-${t}`)}))})}function pm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,sides:r,spacingSizes:i,type:s,values:l}){const a=r?.length?Js.filter((e=>r.includes(e))):Js,c=e=>n=>{const o={...Object.keys(l).reduce(((e,t)=>(e[t]=sl(l[t],i),e)),{})};o[e]=n,t(o)};return(0,d.jsx)(d.Fragment,{children:a.map((t=>(0,d.jsx)(cm,{icon:tl[t],label:nl[t],minimumCustomValue:e,onChange:c(t),onMouseOut:n,onMouseOver:o,side:t,spacingSizes:i,type:s,value:l[t],withInputField:!1},`spacing-sizes-control-${t}`)))})}function hm({minimumCustomValue:e,onChange:t,onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,values:a}){return(0,d.jsx)(cm,{label:nl[i],minimumCustomValue:e,onChange:(c=i,e=>{const n={...Object.keys(a).reduce(((e,t)=>(e[t]=sl(a[t],s),e)),{})};n[c]=e,t(n)}),onMouseOut:n,onMouseOver:o,showSideInLabel:r,side:i,spacingSizes:s,type:l,value:a[i],withInputField:!1});var c}function gm({isLinked:e,...t}){const n=e?(0,T.__)("Unlink sides"):(0,T.__)("Link sides");return(0,d.jsx)(ws.Button,{...t,size:"small",icon:e?Ld:ec,iconSize:24,label:n})}function mm({inputProps:e,label:t,minimumCustomValue:n=0,onChange:o,onMouseOut:r,onMouseOver:i,showSideInLabel:s=!0,sides:l=Js,useSelect:a,values:c}){const u=lm(),p=c||el,g=1===l?.length,m=l?.includes("horizontal")&&l?.includes("vertical")&&2===l?.length,[f,b]=(0,h.useState)(function(e={},t){const{top:n,right:o,bottom:r,left:i}=e,s=[n,o,r,i].filter(Boolean),l=!(n!==r||i!==o||!n&&!i),a=!s.length&&function(e=[]){const t={top:0,right:0,bottom:0,left:0};return e.forEach((e=>t[e]+=1)),(t.top+t.bottom)%2==0&&(t.left+t.right)%2==0}(t),c=t?.includes("horizontal")&&t?.includes("vertical")&&2===t?.length;if(cl(t)&&(l||a))return ol.axial;if(c&&1===s.length){let t;return Object.entries(e).some((([e,n])=>(t=e,void 0!==n))),t}return 1!==t?.length||s.length?ol.custom:t[0]}(p,l)),k={...e,minimumCustomValue:n,onChange:e=>{const t={...c,...e};o(t)},onMouseOut:r,onMouseOver:i,sides:l,spacingSizes:u,type:t,useSelect:a,values:p},v=Js.includes(f)&&s?nl[f]:"",_=(0,T.sprintf)((0,T._x)("%1$s %2$s","spacing"),t,v).trim();return(0,d.jsxs)("fieldset",{className:"spacing-sizes-control",children:[(0,d.jsxs)(ws.__experimentalHStack,{className:"spacing-sizes-control__header",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",className:"spacing-sizes-control__label",children:_}),!g&&!m&&(0,d.jsx)(gm,{label:t,onClick:()=>{b(f===ol.axial?ol.custom:ol.axial)},isLinked:f===ol.axial})]}),(0,d.jsx)(ws.__experimentalVStack,{spacing:.5,children:f===ol.axial?(0,d.jsx)(dm,{...k}):f===ol.custom?(0,d.jsx)(pm,{...k}):(0,d.jsx)(hm,{side:f,...k,showSideInLabel:s})})]})}const fm={px:{max:1e3,step:1},"%":{max:100,step:1},vw:{max:100,step:1},vh:{max:100,step:1},em:{max:50,step:.1},rem:{max:50,step:.1},svw:{max:100,step:1},lvw:{max:100,step:1},dvw:{max:100,step:1},svh:{max:100,step:1},lvh:{max:100,step:1},dvh:{max:100,step:1},vi:{max:100,step:1},svi:{max:100,step:1},lvi:{max:100,step:1},dvi:{max:100,step:1},vb:{max:100,step:1},svb:{max:100,step:1},lvb:{max:100,step:1},dvb:{max:100,step:1},vmin:{max:100,step:1},svmin:{max:100,step:1},lvmin:{max:100,step:1},dvmin:{max:100,step:1},vmax:{max:100,step:1},svmax:{max:100,step:1},lvmax:{max:100,step:1},dvmax:{max:100,step:1}};function bm({label:e=(0,T.__)("Height"),onChange:t,value:n}){const o=parseFloat(n),[r]=Ti("spacing.units"),i=(0,ws.__experimentalUseCustomUnits)({availableUnits:r||["%","px","em","rem","vh","vw"]}),s=(0,h.useMemo)((()=>(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(n)),[n])[1]||i[0]?.value||"px";return(0,d.jsxs)("fieldset",{className:"block-editor-height-control",children:[(0,d.jsx)(ws.BaseControl.VisualLabel,{as:"legend",children:e}),(0,d.jsxs)(ws.Flex,{children:[(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalUnitControl,{value:n,units:i,onChange:t,onUnitChange:e=>{const[o,r]=(0,ws.__experimentalParseQuantityAndUnitFromRawValue)(n);["em","rem"].includes(e)&&"px"===r?t((o/16).toFixed(2)+e):["em","rem"].includes(r)&&"px"===e?t(Math.round(16*o)+e):["%","vw","svw","lvw","dvw","vh","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax"].includes(e)&&o>100&&t(100+e)},min:0,size:"__unstable-large",label:e,hideLabelFromVision:!0})}),(0,d.jsx)(ws.FlexItem,{isBlock:!0,children:(0,d.jsx)(ws.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,value:o,min:0,max:fm[s]?.max??100,step:fm[s]?.step??.1,withInputField:!1,onChange:e=>{t([e,s].join(""))},__nextHasNoMarginBottom:!0,label:e,hideLabelFromVision:!0})})})]})]})}function km(e,t){const{getBlockOrder:n,getBlockAttributes:o}=(0,g.useSelect)(ji);return(r,i)=>{const s=(i-1)*t+r-1;let l=0;for(const r of n(e)){const{columnStart:e,rowStart:n}=o(r).style?.layout??{};(n-1)*t+e-1<s&&l++}return l}}function vm(e,t){const{orientation:n="horizontal"}=t;return"fill"===e?(0,T.__)("Stretch to fill available space."):"fixed"===e&&"horizontal"===n?(0,T.__)("Specify a fixed width."):"fixed"===e?(0,T.__)("Specify a fixed height."):(0,T.__)("Fit contents.")}function _m({value:e={},onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{type:i,default:{type:s="default"}={}}=n??{},l=i||s;return"flex"===l?(0,d.jsx)(ym,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):"grid"===l?(0,d.jsx)(Sm,{childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}):null}function ym({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{selfStretch:i,flexSize:s}=e,{orientation:l="horizontal"}=n??{},a="horizontal"===l?(0,T.__)("Width"):(0,T.__)("Height"),[c]=Ti("spacing.units"),u=(0,ws.__experimentalUseCustomUnits)({availableUnits:c||["%","px","em","rem","vh","vw"]});return(0,h.useEffect)((()=>{"fixed"!==i||s||t({...e,selfStretch:"fit"})}),[]),(0,d.jsxs)(ws.__experimentalVStack,{as:ws.__experimentalToolsPanelItem,spacing:2,hasValue:()=>!!i,label:a,onDeselect:()=>{t({selfStretch:void 0,flexSize:void 0})},isShownByDefault:o,panelId:r,children:[(0,d.jsxs)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:xm(n),value:i||"fit",help:vm(i,n),onChange:e=>{t({selfStretch:e,flexSize:"fixed"!==e?null:s})},isBlock:!0,children:[(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fit",label:(0,T._x)("Fit","Intrinsic block width in flex layout")},"fit"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fill",label:(0,T._x)("Grow","Block with expanding width in flex layout")},"fill"),(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:"fixed",label:(0,T._x)("Fixed","Block with fixed width in flex layout")},"fixed")]}),"fixed"===i&&(0,d.jsx)(ws.__experimentalUnitControl,{size:"__unstable-large",units:u,onChange:e=>{t({selfStretch:i,flexSize:e})},value:s,min:0,label:a,hideLabelFromVision:!0})]})}function xm(e){const{orientation:t="horizontal"}=e;return"horizontal"===t?(0,T.__)("Width"):(0,T.__)("Height")}function Sm({childLayout:e,onChange:t,parentLayout:n,isShownByDefault:o,panelId:r}){const{columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=e,{columnCount:c,rowCount:u}=n??{},p=(0,g.useSelect)((e=>e(ji).getBlockRootClientId(r))),{moveBlocksToPosition:h,__unstableMarkNextChangeAsNotPersistent:m}=(0,g.useDispatch)(ji),f=km(p,c||3),b=c?c-(i??1)+1:void 0,k=window.__experimentalEnableGridInteractivity&&u?u-(s??1)+1:void 0;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.Flex,{as:ws.__experimentalToolsPanelItem,hasValue:()=>!!l||!!a,label:(0,T.__)("Grid span"),onDeselect:()=>{t({columnSpan:void 0,rowSpan:void 0})},isShownByDefault:o,panelId:r,children:[(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Column span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10),o=b?Math.min(n,b):n;t({columnStart:i,rowStart:s,rowSpan:a,columnSpan:o})},value:l??1,min:1,max:b})}),(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Row span"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10),o=k?Math.min(n,k):n;t({columnStart:i,rowStart:s,columnSpan:l,rowSpan:o})},value:a??1,min:1,max:k})})]}),window.__experimentalEnableGridInteractivity&&(0,d.jsxs)(ws.Flex,{as:ws.__experimentalToolsPanelItem,hasValue:()=>!!i||!!s,label:(0,T.__)("Grid placement"),onDeselect:()=>{t({columnStart:void 0,rowStart:void 0})},isShownByDefault:!1,panelId:r,children:[(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Column"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:n,rowStart:s,columnSpan:l,rowSpan:a}),m(),h([r],p,p,f(n,s))},value:i??1,min:1,max:c?c-(l??1)+1:void 0})}),(0,d.jsx)(ws.FlexItem,{style:{width:"50%"},children:(0,d.jsx)(ws.__experimentalInputControl,{size:"__unstable-large",label:(0,T.__)("Row"),type:"number",onChange:e=>{const n=""===e?1:parseInt(e,10);t({columnStart:i,rowStart:n,columnSpan:l,rowSpan:a}),m(),h([r],p,p,f(i,n))},value:s??1,min:1,max:u?u-(a??1)+1:void 0})})]})]})}function wm({panelId:e,value:t,onChange:n=()=>{},options:o,defaultValue:r="auto",hasValue:i,isShownByDefault:s=!0}){const l=t??"auto",[a,c,u]=Ti("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),p=c?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=a?.map((({name:e,ratio:t})=>({label:e,value:t}))),g=[{label:(0,T._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...u?h:[],...p||[],{label:(0,T._x)("Custom","Aspect ratio option for dimensions control"),value:"custom",disabled:!0,hidden:!0}];return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:i||(()=>l!==r),label:(0,T.__)("Aspect ratio"),onDeselect:()=>n(void 0),isShownByDefault:s,panelId:e,children:(0,d.jsx)(ws.SelectControl,{label:(0,T.__)("Aspect ratio"),value:l,options:o??g,onChange:n,size:"__unstable-large",__nextHasNoMarginBottom:!0})})}const Cm=["horizontal","vertical"];function Bm(e){const t=Im(e),n=jm(e),o=Em(e),r=Tm(e),i=Mm(e),s=Pm(e),l=Rm(e),a=Am(e);return"web"===h.Platform.OS&&(t||n||o||r||i||s||l||a)}function Im(e){return e?.layout?.contentSize}function jm(e){return e?.layout?.wideSize}function Em(e){return e?.spacing?.padding}function Tm(e){return e?.spacing?.margin}function Mm(e){return e?.spacing?.blockGap}function Pm(e){return e?.dimensions?.minHeight}function Rm(e){return e?.dimensions?.aspectRatio}function Am(e){const{type:t="default",default:{type:n="default"}={},allowSizingOnChildren:o=!1}=e?.parentLayout??{},r=("flex"===n||"flex"===t||"grid"===n||"grid"===t)&&o;return!!e?.layout&&r}function Nm(e,t){if(!t||!e)return e;const n={};return t.forEach((t=>{"vertical"===t&&(n.top=e.top,n.bottom=e.bottom),"horizontal"===t&&(n.left=e.left,n.right=e.right),n[t]=e?.[t]})),n}function Lm(e){return e&&"string"==typeof e?{top:e,right:e,bottom:e,left:e}:e}function Dm({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T.__)("Dimensions"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const Om={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,aspectRatio:!0,childLayout:!0};function zm({as:e=Dm,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=Om,onVisualize:l=()=>{},includeLayoutControls:a=!1}){const{dimensions:c,spacing:u}=r,p=e=>e&&"object"==typeof e?Object.keys(e).reduce(((t,n)=>(t[n]=ts({settings:{dimensions:c,spacing:u}},"",e[n]),t)),{}):ts({settings:{dimensions:c,spacing:u}},"",e),g=function(e){const{defaultSpacingSizes:t,spacingSizes:n}=e?.spacing||{};return!1!==t&&n?.default?.length>0||n?.theme?.length>0||n?.custom?.length>0}(r),m=(0,ws.__experimentalUseCustomUnits)({availableUnits:r?.spacing?.units||["%","px","em","rem","vw"]}),f=-1/0,[b,k]=(0,h.useState)(f),v=Im(r)&&a,_=p(o?.layout?.contentSize),y=e=>{n(me(t,["layout","contentSize"],e||void 0))},x=jm(r)&&a,S=p(o?.layout?.wideSize),w=e=>{n(me(t,["layout","wideSize"],e||void 0))},C=Em(r),B=Lm(p(o?.spacing?.padding)),I=Array.isArray(r?.spacing?.padding)?r?.spacing?.padding:r?.spacing?.padding?.sides,j=I&&I.some((e=>Cm.includes(e))),E=e=>{const o=Nm(e,I);n(me(t,["spacing","padding"],o))},M=()=>l("padding"),P=Tm(r),R=Lm(p(o?.spacing?.margin)),A=Array.isArray(r?.spacing?.margin)?r?.spacing?.margin:r?.spacing?.margin?.sides,N=A&&A.some((e=>Cm.includes(e))),L=e=>{const o=Nm(e,A);n(me(t,["spacing","margin"],o))},D=()=>l("margin"),O=Mm(r),z=Array.isArray(r?.spacing?.blockGap)?r?.spacing?.blockGap:r?.spacing?.blockGap?.sides,V=z&&z.some((e=>Cm.includes(e))),F=p(o?.spacing?.blockGap),H=function(e,t){return e?"string"==typeof e?t?{top:e,right:e,bottom:e,left:e}:{top:e}:{...e,right:e?.left,bottom:e?.top}:e}(F,V),U=e=>{n(me(t,["spacing","blockGap"],e))},G=e=>{e||U(null),!V&&e?.hasOwnProperty("top")?U(e.top):U({top:e?.top,left:e?.left})},$=Pm(r),W=p(o?.dimensions?.minHeight),K=e=>{const o=me(t,["dimensions","minHeight"],e);n(me(o,["dimensions","aspectRatio"],void 0))},Z=Rm(r),q=p(o?.dimensions?.aspectRatio),Y=Am(r),X=o?.layout,Q=(0,h.useCallback)((e=>({...e,layout:fs({...e?.layout,contentSize:void 0,wideSize:void 0,selfStretch:void 0,flexSize:void 0,columnStart:void 0,rowStart:void 0,columnSpan:void 0,rowSpan:void 0}),spacing:{...e?.spacing,padding:void 0,margin:void 0,blockGap:void 0},dimensions:{...e?.dimensions,minHeight:void 0,aspectRatio:void 0}})),[]),J=()=>l(!1);return(0,d.jsxs)(e,{resetAllFilter:Q,value:t,onChange:n,panelId:i,children:[(v||x)&&(0,d.jsx)("span",{className:"span-columns",children:(0,T.__)("Set the width of the main content area.")}),v&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Content width"),hasValue:()=>!!t?.layout?.contentSize,onDeselect:()=>y(void 0),isShownByDefault:s.contentSize??Om.contentSize,panelId:i,children:(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Content width"),labelPosition:"top",value:_||"",onChange:e=>{y(e)},units:m,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:zl})})})}),x&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Wide width"),hasValue:()=>!!t?.layout?.wideSize,onDeselect:()=>w(void 0),isShownByDefault:s.wideSize??Om.wideSize,panelId:i,children:(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Wide width"),labelPosition:"top",value:S||"",onChange:e=>{w(e)},units:m,prefix:(0,d.jsx)(ws.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,d.jsx)(Ol,{icon:Vl})})})}),C&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.padding&&Object.keys(t?.spacing?.padding).length,label:(0,T.__)("Padding"),onDeselect:()=>E(void 0),isShownByDefault:s.padding??Om.padding,className:ms({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,values:B,onChange:E,label:(0,T.__)("Padding"),sides:I,units:m,allowReset:!1,splitOnAxis:j,inputProps:{onMouseOver:M,onMouseOut:J}}),g&&(0,d.jsx)(mm,{values:B,onChange:E,label:(0,T.__)("Padding"),sides:I,units:m,allowReset:!1,onMouseOver:M,onMouseOut:J})]}),P&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.margin&&Object.keys(t?.spacing?.margin).length,label:(0,T.__)("Margin"),onDeselect:()=>L(void 0),isShownByDefault:s.margin??Om.margin,className:ms({"tools-panel-item-spacing":g}),panelId:i,children:[!g&&(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,values:R,onChange:L,inputProps:{min:b,onDragStart:()=>{k(0)},onDragEnd:()=>{k(f)},onMouseOver:D,onMouseOut:J},label:(0,T.__)("Margin"),sides:A,units:m,allowReset:!1,splitOnAxis:N}),g&&(0,d.jsx)(mm,{values:R,onChange:L,minimumCustomValue:-1/0,label:(0,T.__)("Margin"),sides:A,units:m,allowReset:!1,onMouseOver:D,onMouseOut:J})]}),O&&(0,d.jsxs)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.spacing?.blockGap,label:(0,T.__)("Block spacing"),onDeselect:()=>U(void 0),isShownByDefault:s.blockGap??Om.blockGap,className:ms({"tools-panel-item-spacing":g,"single-column":!g&&!V}),panelId:i,children:[!g&&(V?(0,d.jsx)(ws.BoxControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Block spacing"),min:0,onChange:G,units:m,sides:z,values:H,allowReset:!1,splitOnAxis:V}):(0,d.jsx)(ws.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Block spacing"),min:0,onChange:U,units:m,value:F})),g&&(0,d.jsx)(mm,{label:(0,T.__)("Block spacing"),min:0,onChange:G,showSideInLabel:!1,sides:V?z:["top"],values:H,allowReset:!1})]}),Y&&(0,d.jsx)(_m,{value:X,onChange:e=>{n({...t,layout:{...e}})},parentLayout:r?.parentLayout,panelId:i,isShownByDefault:s.childLayout??Om.childLayout}),$&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.dimensions?.minHeight,label:(0,T.__)("Minimum height"),onDeselect:()=>{K(void 0)},isShownByDefault:s.minHeight??Om.minHeight,panelId:i,children:(0,d.jsx)(bm,{label:(0,T.__)("Minimum height"),value:W,onChange:K})}),Z&&(0,d.jsx)(wm,{hasValue:()=>!!t?.dimensions?.aspectRatio,value:q,onChange:e=>{const o=me(t,["dimensions","aspectRatio"],e);n(me(o,["dimensions","minHeight"],void 0))},panelId:i,isShownByDefault:s.aspectRatio??Om.aspectRatio})]})}const Vm=new WeakMap;var Fm=function(e){const t=(0,m.useRefEffect)((t=>{function n(n){const{deltaX:o,deltaY:r,target:i}=n,s=e.current;let l=Vm.get(s);l||(l=(0,Ga.getScrollContainer)(s),Vm.set(s,l));const a=(0,Ga.getScrollContainer)(i);t.contains(a)||l.scrollBy(o,r)}const o={passive:!0};return t.addEventListener("wheel",n,o),()=>{t.removeEventListener("wheel",n,o)}}),[e]);return e?t:null};const Hm=".block-editor-block-list__block",Um=".block-list-appender",Gm=".block-editor-button-block-appender";function $m(e,t){return e.closest(Hm)===t.closest(Hm)}function Wm(e,t){return t.closest([Hm,Um,Gm].join(","))===e}function Km(e){for(;e&&e.nodeType!==e.ELEMENT_NODE;)e=e.parentNode;if(!e)return;const t=e.closest(Hm);return t?t.id.slice(6):void 0}function Zm(e,t){const n=Math.min(e.left,t.left),o=Math.max(e.right,t.right),r=Math.max(e.bottom,t.bottom),i=Math.min(e.top,t.top);return new window.DOMRectReadOnly(n,i,o-n,r-i)}function qm(e){const t=e.ownerDocument.defaultView;if(!t)return!1;if(e.classList.contains("components-visually-hidden"))return!1;const n=e.getBoundingClientRect();if(0===n.width||0===n.height)return!1;if(e.checkVisibility)return e.checkVisibility?.({opacityProperty:!0,contentVisibilityAuto:!0,visibilityProperty:!0});const o=t.getComputedStyle(e);return"none"!==o.display&&"hidden"!==o.visibility&&"0"!==o.opacity}function Ym(e){const t=window.getComputedStyle(e);return"auto"===t.overflowX||"scroll"===t.overflowX||"auto"===t.overflowY||"scroll"===t.overflowY}const Xm=["core/navigation"];function Qm(e){const t=e.ownerDocument.defaultView;if(!t)return new window.DOMRectReadOnly;let n=e.getBoundingClientRect();const o=e.getAttribute("data-type");if(o&&Xm.includes(o)){const t=[e];let o;for(;o=t.pop();)if(!Ym(o))for(const e of o.children)if(qm(e)){n=Zm(n,e.getBoundingClientRect()),t.push(e)}}const r=Math.max(n.left,0),i=Math.min(n.right,t.innerWidth);return n=new window.DOMRectReadOnly(r,n.top,i-r,n.height),n}const Jm=Number.MAX_SAFE_INTEGER;const ef=(0,h.forwardRef)((function({clientId:e,bottomClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,shift:i=!0,...s},l){const a=bh(e),c=bh(t??e),u=(0,m.useMergeRefs)([l,Fm(r)]),[p,g]=(0,h.useReducer)((e=>(e+1)%Jm),0);(0,h.useLayoutEffect)((()=>{if(!a)return;const e=new window.MutationObserver(g);return e.observe(a,{attributes:!0}),()=>{e.disconnect()}}),[a]);const f=(0,h.useMemo)((()=>{if(!(p<0||!a||t&&!c))return{getBoundingClientRect:()=>c?Zm(Qm(a),Qm(c)):Qm(a),contextElement:a}}),[p,a,t,c]);return!a||t&&!c?null:(0,d.jsx)(ws.Popover,{ref:u,animate:!1,focusOnMount:!1,anchor:f,__unstableSlotName:o,inline:!o,placement:"top-start",resize:!1,flip:!1,shift:i,...s,className:ms("block-editor-block-popover",s.className),variant:"unstyled",children:n})}));var tf=(0,h.forwardRef)((({clientId:e,bottomClientId:t,children:n,...o},r)=>(0,d.jsx)(ef,{...o,bottomClientId:t,clientId:e,__unstableContentRef:void 0,__unstablePopoverSlot:void 0,ref:r,children:n})));function nf({selectedElement:e,additionalStyles:t={},children:n}){const[o,r]=(0,h.useState)(e.offsetWidth),[i,s]=(0,h.useState)(e.offsetHeight);(0,h.useEffect)((()=>{const t=new window.ResizeObserver((()=>{r(e.offsetWidth),s(e.offsetHeight)}));return t.observe(e,{box:"border-box"}),()=>t.disconnect()}),[e]);const l=(0,h.useMemo)((()=>({position:"absolute",width:o,height:i,...t})),[o,i,t]);return(0,d.jsx)("div",{style:l,children:n})}var of=(0,h.forwardRef)((function({clientId:e,bottomClientId:t,children:n,shift:o=!1,additionalStyles:r,...i},s){t??=e;const l=bh(e);return(0,d.jsx)(ef,{ref:s,clientId:e,bottomClientId:t,shift:o,...i,children:l&&e===t?(0,d.jsx)(nf,{selectedElement:l,additionalStyles:r,children:n}):n})}));function rf({clientId:e,value:t,computeStyle:n,forceShow:o}){const r=bh(e),[i,s]=(0,h.useReducer)((()=>n(r)));(0,h.useEffect)((()=>{if(!r)return;const e=new window.MutationObserver(s);return e.observe(r,{attributes:!0,attributeFilter:["style","class"]}),()=>{e.disconnect()}}),[r]);const l=(0,h.useRef)(t),[a,c]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{if(Ja()(t,l.current)||o)return;c(!0),l.current=t;const e=setTimeout((()=>{c(!1)}),400);return()=>{c(!1),clearTimeout(e)}}),[t,o]),a||o?(0,d.jsx)(of,{clientId:e,__unstablePopoverSlot:"block-toolbar",children:(0,d.jsx)("div",{className:"block-editor__spacing-visualizer",style:i})}):null}function sf(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function lf({clientId:e,value:t,forceShow:n}){return(0,d.jsx)(rf,{clientId:e,value:t?.spacing?.margin,computeStyle:e=>{const t=sf(e,"margin-top"),n=sf(e,"margin-right"),o=sf(e,"margin-bottom"),r=sf(e,"margin-left");return{borderTopWidth:t,borderRightWidth:n,borderBottomWidth:o,borderLeftWidth:r,top:t?`-${t}`:0,right:n?`-${n}`:0,bottom:o?`-${o}`:0,left:r?`-${r}`:0}},forceShow:n})}function af({clientId:e,value:t,forceShow:n}){return(0,d.jsx)(rf,{clientId:e,value:t?.spacing?.padding,computeStyle:e=>({borderTopWidth:sf(e,"padding-top"),borderRightWidth:sf(e,"padding-right"),borderBottomWidth:sf(e,"padding-bottom"),borderLeftWidth:sf(e,"padding-left")}),forceShow:n})}const cf="dimensions",uf="spacing";function df({children:e,resetAllFilter:t}){const n=(0,h.useCallback)((e=>{const n=e.style,o=t(n);return{...e,style:o}}),[t]);return(0,d.jsx)(Fa,{group:"dimensions",resetAllFilter:n,children:e})}function pf({clientId:e,name:t,setAttributes:n,settings:o}){const r=Bm(o),i=(0,g.useSelect)((t=>t(ji).getBlockAttributes(e)?.style),[e]),[s,l]=function(){const[e,t]=(0,h.useState)(!1),{hideBlockInterface:n,showBlockInterface:o}=G((0,g.useDispatch)(ji));return(0,h.useEffect)((()=>{e?n():o()}),[e,o,n]),[e,t]}();if(!r)return null;const a={...(0,p.getBlockSupport)(t,[cf,"__experimentalDefaultControls"]),...(0,p.getBlockSupport)(t,[uf,"__experimentalDefaultControls"])};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(zm,{as:df,panelId:e,settings:o,value:i,onChange:e=>{n({style:fs(e)})},defaultControls:a,onVisualize:l}),!!o?.spacing?.padding&&(0,d.jsx)(af,{forceShow:"padding"===s,clientId:e,value:i}),!!o?.spacing?.margin&&(0,d.jsx)(lf,{forceShow:"margin"===s,clientId:e,value:i})]})}function hf(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,cf);return!0===n||("any"===t?!(!n?.aspectRatio&&!n?.minHeight):!!n?.[t])}var gf={useBlockProps:function({name:e,minHeight:t,style:n}){if(!hf(e,"aspectRatio")||ks(e,cf,"aspectRatio"))return{};const o=ms({"has-aspect-ratio":!!n?.dimensions?.aspectRatio}),r={};n?.dimensions?.aspectRatio?r.minHeight="unset":(t||n?.dimensions?.minHeight)&&(r.aspectRatio="unset");return{className:o,style:r}},attributeKeys:["minHeight","style"],hasSupport:e=>hf(e,"aspectRatio")};function mf(){I()("wp.blockEditor.__experimentalUseCustomSides",{since:"6.3",version:"6.4"})}const ff=[...em,wp,yh,cf,Mu,uf,Cp],bf=e=>ff.some((t=>(0,p.hasBlockSupport)(e,t)));function kf(e={}){const t={};return(0,Pi.getCSSRules)(e).forEach((e=>{t[e.key]=e.value})),t}const vf={[`${wp}.__experimentalSkipSerialization`]:["border"],[`${yh}.__experimentalSkipSerialization`]:[yh],[`${Jg}.__experimentalSkipSerialization`]:[Jg],[`${cf}.__experimentalSkipSerialization`]:[cf],[`${uf}.__experimentalSkipSerialization`]:[uf],[`${Cp}.__experimentalSkipSerialization`]:[Cp]},_f={...vf,[`${cf}.aspectRatio`]:[`${cf}.aspectRatio`],[`${Mu}`]:[Mu]},yf={[`${cf}.aspectRatio`]:!0,[`${Mu}`]:!0},xf={gradients:"gradient"};function Sf(e,t,n=!1){if(!e)return e;let o=e;return n||(o=JSON.parse(JSON.stringify(e))),Array.isArray(t)||(t=[t]),t.forEach((e=>{if(Array.isArray(e)||(e=e.split(".")),e.length>1){const[t,...n]=e;Sf(o[t],[n],!0)}else 1===e.length&&delete o[e[0]]})),o}function wf(e,t,n,o=_f){if(!bf(t))return e;let{style:r}=n;return Object.entries(o).forEach((([e,n])=>{const o=yf[e]||(0,p.getBlockSupport)(t,e);!0===o&&(r=Sf(r,n)),Array.isArray(o)&&o.forEach((e=>{const t=xf[e]||e;r=Sf(r,[[...n,t]])}))})),e.style={...kf(r),...e.style},e}var Cf={edit:function({clientId:e,name:t,setAttributes:n,__unstableParentLayout:o}){const r=xs(t,o),i=ga(),s={clientId:e,name:t,setAttributes:n,settings:{...r,typography:{...r.typography,textAlign:!1}}};return"default"!==i?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Mh,{...s}),(0,d.jsx)(Du,{...s}),(0,d.jsx)(rm,{...s}),(0,d.jsx)(Pp,{...s}),(0,d.jsx)(pf,{...s})]})},hasSupport:bf,addSaveProps:wf,attributeKeys:["style"],useBlockProps:function({name:e,style:t}){const n=(0,m.useInstanceId)(If,"wp-elements"),o=`.${n}`,r=t?.elements,i=(0,h.useMemo)((()=>{if(!r)return;const t=[];return Bf.forEach((({elementType:n,pseudo:i,elements:s})=>{if(ks(e,yh,n))return;const l=r?.[n];if(l){const e=ns(o,p.__EXPERIMENTAL_ELEMENTS[n]);t.push((0,Pi.compileCSS)(l,{selector:e})),i&&i.forEach((e=>{l[e]&&t.push((0,Pi.compileCSS)(l[e],{selector:ns(o,`${p.__EXPERIMENTAL_ELEMENTS[n]}${e}`)}))}))}s&&s.forEach((e=>{r[e]&&t.push((0,Pi.compileCSS)(r[e],{selector:ns(o,p.__EXPERIMENTAL_ELEMENTS[e])}))}))})),t.length>0?t.join(""):void 0}),[o,r,e]);return _s({css:i}),wf({className:n},e,{style:t},vf)}};const Bf=[{elementType:"button"},{elementType:"link",pseudo:[":hover"]},{elementType:"heading",elements:["h1","h2","h3","h4","h5","h6"]}],If={};(0,f.addFilter)("blocks.registerBlockType","core/style/addAttribute",(function(e){return bf(e)?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));(0,f.addFilter)("blocks.registerBlockType","core/settings/addAttribute",(function(e){return t=e,(0,p.hasBlockSupport)(t,"__experimentalSettings",!1)?(e?.attributes?.settings||(e.attributes={...e.attributes,settings:{type:"object"}}),e):e;var t}));var jf=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z"})});var Ef=function e({id:t,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l}){let a;a="unset"===s?(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"}):s?(0,d.jsx)(ws.DuotoneSwatch,{values:s}):(0,d.jsx)(Ol,{icon:jf});const c=(0,T.__)("Apply duotone filter"),u=`${(0,m.useInstanceId)(e,"duotone-control",t)}__description`;return(0,d.jsx)(ws.Dropdown,{popoverProps:{className:"block-editor-duotone-control__popover",headerTitle:(0,T.__)("Duotone")},renderToggle:({isOpen:e,onToggle:t})=>(0,d.jsx)(ws.ToolbarButton,{showTooltip:!0,onClick:t,"aria-haspopup":"true","aria-expanded":e,onKeyDown:n=>{e||n.keyCode!==Wa.DOWN||(n.preventDefault(),t())},label:c,icon:a}),renderContent:()=>(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Duotone"),children:[(0,d.jsx)("p",{children:(0,T.__)("Create a two-tone color effect without losing your original image.")}),(0,d.jsx)(ws.DuotonePicker,{"aria-label":c,"aria-describedby":u,colorPalette:n,duotonePalette:o,disableCustomColors:r,disableCustomDuotone:i,value:s,onChange:l})]})})};function Tf(e){return`${e}{filter:none}`}function Mf(e,t){return`${e}{filter:url(#${t})}`}function Pf(e,t){const n=function(e=[]){const t={r:[],g:[],b:[],a:[]};return e.forEach((e=>{const n=wd(e).toRgb();t.r.push(n.r/255),t.g.push(n.g/255),t.b.push(n.b/255),t.a.push(n.a)})),t}(t);return`\n<svg\n\txmlns:xlink="http://www.w3.org/1999/xlink"\n\tviewBox="0 0 0 0"\n\twidth="0"\n\theight="0"\n\tfocusable="false"\n\trole="none"\n\taria-hidden="true"\n\tstyle="visibility: hidden; position: absolute; left: -9999px; overflow: hidden;"\n>\n\t<defs>\n\t\t<filter id="${e}">\n\t\t\t\x3c!--\n\t\t\t\tUse sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\tUse perceptual brightness to convert to grayscale.\n\t\t\t--\x3e\n\t\t\t<feColorMatrix color-interpolation-filters="sRGB" type="matrix" values=" .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 .299 .587 .114 0 0 "></feColorMatrix>\n\t\t\t\x3c!-- Use sRGB instead of linearRGB to be consistent with how CSS gradients work. --\x3e\n\t\t\t<feComponentTransfer color-interpolation-filters="sRGB">\n\t\t\t\t<feFuncR type="table" tableValues="${n.r.join(" ")}"></feFuncR>\n\t\t\t\t<feFuncG type="table" tableValues="${n.g.join(" ")}"></feFuncG>\n\t\t\t\t<feFuncB type="table" tableValues="${n.b.join(" ")}"></feFuncB>\n\t\t\t\t<feFuncA type="table" tableValues="${n.a.join(" ")}"></feFuncA>\n\t\t\t</feComponentTransfer>\n\t\t\t\x3c!-- Re-mask the image with the original transparency since the feColorMatrix above loses that information. --\x3e\n\t\t\t<feComposite in2="SourceGraphic" operator="in"></feComposite>\n\t\t</filter>\n\t</defs>\n</svg>`}function Rf(e,t="root",n={}){if(!t)return null;const{fallback:o=!1}=n,{name:r,selectors:i,supports:s}=e,l=i&&Object.keys(i).length>0,a=Array.isArray(t)?t.join("."):t;let c=null;if(c=l&&i.root?i?.root:s?.__experimentalSelector?s.__experimentalSelector:".wp-block-"+r.replace("core/","").replace("/","-"),"root"===a)return c;const u=Array.isArray(t)?t:t.split(".");if(1===u.length){const e=o?c:null;if(l){return fe(i,`${a}.root`,null)||fe(i,a,null)||e}const t=fe(s,`${a}.__experimentalSelector`,null);return t?ns(c,t):e}let d;return l&&(d=fe(i,a,null)),d||(o?Rf(e,u[0],n):null)}const Af=[];function Nf(e,{presetSetting:t,defaultSetting:n}){const o=!e?.color?.[n],r=e?.color?.[t]?.custom||Af,i=e?.color?.[t]?.theme||Af,s=e?.color?.[t]?.default||Af;return(0,h.useMemo)((()=>[...r,...i,...o?Af:s]),[o,r,i,s])}function Lf(e){return Df(e)}function Df(e){return e.color.customDuotone||e.color.defaultDuotone||e.color.duotone.length>0}function Of({resetAllFilter:e,onChange:t,value:n,panelId:o,children:r}){const i=Ji();return(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T._x)("Filters","Name for applying graphical effects"),resetAll:()=>{const o=e(n);t(o)},panelId:o,dropdownMenuProps:i,children:r})}const zf={duotone:!0},Vf={placement:"left-start",offset:36,shift:!0,className:"block-editor-duotone-control__popover",headerTitle:(0,T.__)("Duotone")},Ff=({indicator:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.__experimentalZStack,{isLayered:!1,offset:-8,children:(0,d.jsx)(ws.Flex,{expanded:!1,children:"unset"!==e&&e?(0,d.jsx)(ws.DuotoneSwatch,{values:e}):(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-duotone-control__unset-indicator"})})}),(0,d.jsx)(ws.FlexItem,{title:t,children:t})]}),Hf=(e,t)=>({onToggle:n,isOpen:o})=>{const r=(0,h.useRef)(void 0),i={onClick:n,className:ms("block-editor-global-styles-filters-panel__dropdown-toggle",{"is-open":o}),"aria-expanded":o,ref:r},s={onClick:()=>{o&&n(),t(),r.current?.focus()},className:"block-editor-panel-duotone-settings__reset",label:(0,T.__)("Reset")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...i,children:(0,d.jsx)(Ff,{indicator:e,label:(0,T.__)("Duotone")})}),e&&(0,d.jsx)(ws.Button,{size:"small",icon:Ha,...s})]})};function Uf({as:e=Of,value:t,onChange:n,inheritedValue:o=t,settings:r,panelId:i,defaultControls:s=zf}){const l=Df(r),a=Nf(r,{presetSetting:"duotone",defaultSetting:"defaultDuotone"}),c=Nf(r,{presetSetting:"palette",defaultSetting:"defaultPalette"}),u=(p=o?.filter?.duotone,ts({settings:r},"",p));var p;const g=e=>{const o=a.find((({colors:t})=>t===e)),r=o?`var:preset|duotone|${o.slug}`:e;n(me(t,["filter","duotone"],r))},m=()=>g(void 0),f=(0,h.useCallback)((e=>({...e,filter:{...e.filter,duotone:void 0}})),[]);return(0,d.jsx)(e,{resetAllFilter:f,value:t,onChange:n,panelId:i,children:l&&(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Duotone"),hasValue:()=>!!t?.filter?.duotone,onDeselect:m,isShownByDefault:s.duotone,panelId:i,children:(0,d.jsx)(ws.Dropdown,{popoverProps:Vf,className:"block-editor-global-styles-filters-panel__dropdown",renderToggle:Hf(u,m),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"small",children:(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Duotone"),children:[(0,d.jsx)("p",{children:(0,T.__)("Create a two-tone color effect without losing your original image.")}),(0,d.jsx)(ws.DuotonePicker,{colorPalette:c,duotonePalette:a,disableCustomColors:!0,disableCustomDuotone:!0,value:u,onChange:g})]})})})})})}const Gf=[],$f=window?.navigator.userAgent&&window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&!window.navigator.userAgent.includes("Chromium");function Wf({presetSetting:e,defaultSetting:t}){const[n,o,r,i]=Ti(t,`${e}.custom`,`${e}.theme`,`${e}.default`);return(0,h.useMemo)((()=>[...o||Gf,...r||Gf,...n&&i||Gf]),[n,o,r,i])}function Kf(e,t){if(!e)return;const n=t?.find((({slug:t})=>e===`var:preset|duotone|${t}`));return n?n.colors:void 0}Bd([Id]);var Zf={shareWithChildBlocks:!0,edit:function({style:e,setAttributes:t,name:n}){const o=e?.color?.duotone,r=xs(n),i=ga(),s=Wf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),l=Wf({presetSetting:"color.palette",defaultSetting:"color.defaultPalette"}),[a,c]=Ti("color.custom","color.customDuotone"),u=!a,p=!c||0===l?.length&&u;if(0===s?.length&&p)return null;if("default"!==i)return null;const h="unset"===o||Array.isArray(o)?o:Kf(o,s);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa,{group:"filter",children:(0,d.jsx)(Uf,{value:{filter:{duotone:h}},onChange:n=>{const o={...e,color:{...n?.filter}};t({style:fs(o)})},settings:r})}),(0,d.jsx)(Rs,{group:"block",__experimentalShareWithChildBlocks:!0,children:(0,d.jsx)(Ef,{duotonePalette:s,colorPalette:l,disableCustomDuotone:p,disableCustomColors:u,value:h,onChange:n=>{const o=function(e,t){if(!e||!Array.isArray(e))return;const n=t?.find((t=>t?.colors?.every(((t,n)=>t===e[n]))));return n?`var:preset|duotone|${n.slug}`:void 0}(n,s),r={...e,color:{...e?.color,duotone:o??n}};t({style:fs(r)})},settings:r})})]})},useBlockProps:function({clientId:e,name:t,style:n}){const o=(0,m.useInstanceId)(Yf),r=(0,h.useMemo)((()=>{const e=(0,p.getBlockType)(t);if(e){if(!(0,p.getBlockSupport)(e,"filter.duotone",!1))return null;const t=(0,p.getBlockSupport)(e,"color.__experimentalDuotone",!1);if(t){const n=Rf(e);return"string"==typeof t?ns(n,t):n}return Rf(e,"filter.duotone",{fallback:!0})}}),[t]),i=n?.color?.duotone,s=`wp-duotone-${o}`,l=r&&i;return qf({clientId:e,id:s,selector:r,attribute:i}),{className:l?s:""}},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,"filter.duotone")};function qf({clientId:e,id:t,selector:n,attribute:o}){const r=Wf({presetSetting:"color.duotone",defaultSetting:"color.defaultDuotone"}),i=Array.isArray(o),s=i?void 0:Kf(o,r),l="string"==typeof o&&s;let a=null;l?a=s:("string"==typeof o&&!l||i)&&(a=o);const c=n.split(",").map((e=>`.${t}${e.trim()}`)).join(", "),u=Array.isArray(a)||"unset"===a;ys(u?{css:"unset"!==a?Mf(c,t):Tf(c),__unstableType:"presets"}:void 0),ys(u?{assets:"unset"!==a?Pf(t,a):"",__unstableType:"svgs"}:void 0);const d=bh(e);(0,h.useEffect)((()=>{if(u&&d&&$f){const e=d.style.display;d.style.setProperty("display","inline-block"),d.offsetHeight,d.style.setProperty("display",e)}}),[u,d,a])}const Yf={};function Xf(e){return(0,g.useSelect)((t=>{if(!e)return null;const{getBlockName:n,getBlockAttributes:o}=t(ji),{getBlockType:r,getActiveBlockVariation:i}=t(p.store),s=n(e),l=r(s);if(!l)return null;const a=o(e),c=i(s,a),u=(0,p.isReusableBlock)(l)||(0,p.isTemplatePart)(l),d=(u?(0,p.__experimentalGetBlockLabel)(l,a):void 0)||l.title,h=function(e){const t=e?.style?.position?.type;return"sticky"===t?(0,T.__)("Sticky"):"fixed"===t?(0,T.__)("Fixed"):null}(a),g={isSynced:u,title:d,icon:l.icon,description:l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name};return c?{isSynced:u,title:c.title||l.title,icon:c.icon||l.icon,description:c.description||l.description,anchor:a?.anchor,positionLabel:h,positionType:a?.style?.position?.type,name:a?.metadata?.name}:g}),[e])}(0,f.addFilter)("blocks.registerBlockType","core/editor/duotone/add-attributes",(function(e){return(0,p.hasBlockSupport)(e,"filter.duotone")?(e.attributes.style||Object.assign(e.attributes,{style:{type:"object"}}),e):e}));const Qf="position",Jf={key:"default",value:"",name:(0,T.__)("Default")},eb={key:"sticky",value:"sticky",name:(0,T._x)("Sticky","Name for the value of the CSS position property"),hint:(0,T.__)("The block will stick to the top of the window instead of scrolling.")},tb={key:"fixed",value:"fixed",name:(0,T._x)("Fixed","Name for the value of the CSS position property"),hint:(0,T.__)("The block will not move when the page is scrolled.")},nb=["top","right","bottom","left"],ob=["sticky","fixed"];function rb(e){const t=e?.style?.position?.type;return"sticky"===t||"fixed"===t}function ib({name:e}={}){const[t,n]=Ti("position.fixed","position.sticky"),o=!t&&!n;return r=e,!(0,p.getBlockSupport)(r,Qf)||o;var r}function sb({style:e={},clientId:t,name:n,setAttributes:o}){const r=function(e){const t=(0,p.getBlockSupport)(e,Qf);return!(!0!==t&&!t?.fixed)}(n),i=function(e){const t=(0,p.getBlockSupport)(e,Qf);return!(!0!==t&&!t?.sticky)}(n),s=e?.position?.type,{firstParentClientId:l}=(0,g.useSelect)((e=>{const{getBlockParents:n}=e(ji),o=n(t);return{firstParentClientId:o[o.length-1]}}),[t]),a=Xf(l),c=i&&s===eb.value&&a?(0,T.sprintf)((0,T.__)("The block will stick to the scrollable area of the parent %s block."),a.title):null,u=(0,h.useMemo)((()=>{const e=[Jf];return(i||s===eb.value)&&e.push(eb),(r||s===tb.value)&&e.push(tb),e}),[r,i,s]),m=s&&u.find((e=>e.value===s))||Jf;return h.Platform.select({web:u.length>1?(0,d.jsx)(Fa,{group:"position",children:(0,d.jsx)(ws.BaseControl,{__nextHasNoMarginBottom:!0,help:c,children:(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Position"),hideLabelFromVision:!0,describedBy:(0,T.sprintf)((0,T.__)("Currently selected position: %s"),m.name),options:u,value:m,onChange:({selectedItem:t})=>{(t=>{const n={...e,position:{...e?.position,type:t,top:"sticky"===t||"fixed"===t?"0px":void 0}};o({style:fs(n)})})(t.value)},size:"__unstable-large"})})}):null,native:null})}var lb={edit:function(e){return ib(e)?null:(0,d.jsx)(sb,{...e})},useBlockProps:function({name:e,style:t}){const n=(0,p.hasBlockSupport)(e,Qf),o=ib({name:e}),r=n&&!o,i=(0,m.useInstanceId)(ab),s=`.wp-container-${i}.wp-container-${i}`;let l;r&&(l=function({selector:e,style:t}){let n="";const{type:o}=t?.position||{};return ob.includes(o)?(n+=`${e} {`,n+=`position: ${o};`,nb.forEach((e=>{void 0!==t?.position?.[e]&&(n+=`${e}: ${t.position[e]};`)})),"sticky"!==o&&"fixed"!==o||(n+="z-index: 10"),n+="}",n):n}({selector:s,style:t})||"");const a=ms({[`wp-container-${i}`]:r&&!!l,[`is-position-${t?.position?.type}`]:r&&!!l&&!!t?.position?.type});return _s({css:l}),{className:a}},attributeKeys:["style"],hasSupport:e=>(0,p.hasBlockSupport)(e,Qf)};const ab={};const cb={button:"wp-element-button",caption:"wp-element-caption"},ub={__experimentalBorder:"border",color:"color",spacing:"spacing",typography:"typography"},{kebabCase:db}=G(ws.privateApis);function pb(e={},t,n){let o=[];return Object.keys(e).forEach((r=>{const i=t+db(r.replace("/","-")),s=e[r];if(s instanceof Object){const e=i+n;o=[...o,...pb(s,e,n)]}else o.push(`${i}: ${s}`)})),o}const hb=(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 i=gb({[e]:{[o]:t[e][o]}});n[r]=[...n[r]||[],...i],delete t[e][o]})),r||o.root){const i=r?o:o.root,s=gb({[e]:t[e]});n[i]=[...n[i]||[],...s],delete t[e]}})),n};function gb(e={},t="",n,o={},r=!1){const i=qi===t,s=Object.entries(p.__EXPERIMENTAL_STYLE_PROPERTY).reduce(((t,[o,{value:r,properties:s,useEngine:l,rootOnly:a}])=>{if(a&&!i)return t;const c=r;if("elements"===c[0]||l)return t;const u=fe(e,c);if("--wp--style--root--padding"===o&&("string"==typeof u||!n))return t;if(s&&"string"!=typeof u)Object.entries(s).forEach((e=>{const[n,o]=e;if(!fe(u,[o],!1))return;const r=n.startsWith("--")?n:db(n);t.push(`${r}: ${(0,Pi.getCSSValueFromRawStyle)(fe(u,[o]))}`)}));else if(fe(e,c,!1)){const n=o.startsWith("--")?o:db(o);t.push(`${n}: ${(0,Pi.getCSSValueFromRawStyle)(fe(e,c))}`)}return t}),[]);e.background&&(e.background?.backgroundImage&&(e.background.backgroundImage=rs(e.background.backgroundImage,o)),!i&&e.background?.backgroundImage?.id&&(e={...e,background:{...e.background,...Au(e.background)}}));return(0,Pi.getCSSRules)(e).forEach((e=>{if(i&&(n||r)&&e.key.startsWith("padding"))return;const t=e.key.startsWith("--")?e.key:db(e.key);let l=rs(e.value,o);"font-size"===t&&(l=Wi({size:l},o?.settings)),"aspect-ratio"===t&&s.push("min-height: unset"),s.push(`${t}: ${l}`)})),s}function mb({layoutDefinitions:e=Fs,style:t,selector:n,hasBlockGapSupport:o,hasFallbackGapSupport:r,fallbackGapValue:i}){let s="",l=o?ul(t?.spacing?.blockGap):"";if(r&&(n===qi?l=l||"0.5em":!o&&i&&(l=i)),l&&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||l}`)})),r.length){let i="";i=o?n===qi?`:root :where(.${e})${t?.selector||""}`:`:root :where(${n}-${e})${t?.selector||""}`:n===qi?`:where(.${e}${t?.selector||""})`:`:where(${n}.${e}${t?.selector||""})`,s+=`${i} { ${r.join("; ")}; }`}}))})),n===qi&&o&&(s+=`${Yi} { --wp--style--block-gap: ${l}; }`)),n===qi&&e){const t=["block","flex","grid"];Object.values(e).forEach((({className:e,displayMode:o,baseStyles:r})=>{o&&t.includes(o)&&(s+=`${n} .${e} { display:${o}; }`),r?.length&&r.forEach((t=>{const n=[];if(t.rules&&Object.entries(t.rules).forEach((([e,t])=>{n.push(`${e}: ${t}`)})),n.length){s+=`${`.${e}${t?.selector||""}`} { ${n.join("; ")}; }`}}))}))}return s}const fb=["border","color","dimensions","spacing","typography","filter","outline","shadow","background"];function bb(e){if(!e)return{};const t=Object.entries(e).filter((([e])=>fb.includes(e))).map((([e,t])=>[e,JSON.parse(JSON.stringify(t))]));return Object.fromEntries(t)}const kb=(e,t)=>{const n=[];if(!e?.styles)return n;const o=bb(e.styles);return o&&n.push({styles:o,selector:qi,skipSelectorWrapper:!0}),Object.entries(p.__EXPERIMENTAL_ELEMENTS).forEach((([t,o])=>{e.styles?.elements?.[t]&&n.push({styles:e.styles?.elements?.[t],selector:o,skipSelectorWrapper:!cb[t]})})),Object.entries(e.styles?.blocks??{}).forEach((([e,o])=>{const r=bb(o);if(o?.variations){const i={};Object.entries(o.variations).forEach((([o,r])=>{i[o]=bb(r),r?.css&&(i[o].css=r.css);const s=t[e]?.styleVariationSelectors?.[o];Object.entries(r?.elements??{}).forEach((([e,t])=>{t&&p.__EXPERIMENTAL_ELEMENTS[e]&&n.push({styles:t,selector:ns(s,p.__EXPERIMENTAL_ELEMENTS[e])})})),Object.entries(r?.blocks??{}).forEach((([e,o])=>{const r=ns(s,t[e]?.selector),i=ns(s,t[e]?.duotoneSelector),l=function(e,t){if(!e||!t)return;const n={};return Object.entries(t).forEach((([t,o])=>{"string"==typeof o&&(n[t]=ns(e,o)),"object"==typeof o&&(n[t]={},Object.entries(o).forEach((([o,r])=>{n[t][o]=ns(e,r)})))})),n}(s,t[e]?.featureSelectors),a=bb(o);o?.css&&(a.css=o.css),n.push({selector:r,duotoneSelector:i,featureSelectors:l,fallbackGapValue:t[e]?.fallbackGapValue,hasLayoutSupport:t[e]?.hasLayoutSupport,styles:a}),Object.entries(o.elements??{}).forEach((([e,t])=>{t&&p.__EXPERIMENTAL_ELEMENTS[e]&&n.push({styles:t,selector:ns(r,p.__EXPERIMENTAL_ELEMENTS[e])})}))}))})),r.variations=i}t?.[e]?.selector&&n.push({duotoneSelector:t[e].duotoneSelector,fallbackGapValue:t[e].fallbackGapValue,hasLayoutSupport:t[e].hasLayoutSupport,selector:t[e].selector,styles:r,featureSelectors:t[e].featureSelectors,styleVariationSelectors:t[e].styleVariationSelectors}),Object.entries(o?.elements??{}).forEach((([o,r])=>{r&&t?.[e]&&p.__EXPERIMENTAL_ELEMENTS[o]&&n.push({styles:r,selector:t[e]?.selector.split(",").map((e=>p.__EXPERIMENTAL_ELEMENTS[o].split(",").map((t=>e+" "+t)))).join(",")})}))})),n},vb=(e,t)=>{const n=[];if(!e?.settings)return n;const o=e=>{let t={};return Xi.forEach((({path:n})=>{const o=fe(e,n,!1);!1!==o&&(t=me(t,n,o))})),t},r=o(e.settings),i=e.settings?.custom;return(Object.keys(r).length>0||i)&&n.push({presets:r,custom:i,selector:Yi}),Object.entries(e.settings?.blocks??{}).forEach((([e,r])=>{const i=o(r),s=r.custom;(Object.keys(i).length>0||s)&&n.push({presets:i,custom:s,selector:t[e]?.selector})})),n},_b=(e,t)=>{const n=vb(e,t);let o="";return n.forEach((({presets:t,custom:n,selector:r})=>{const i=function(e={},t){return Xi.reduce(((n,{path:o,valueKey:r,valueFunc:i,cssVarInfix:s})=>{const l=fe(e,o,[]);return["default","theme","custom"].forEach((e=>{l[e]&&l[e].forEach((e=>{r&&!i?n.push(`--wp--preset--${s}--${db(e.slug)}: ${e[r]}`):i&&"function"==typeof i&&n.push(`--wp--preset--${s}--${db(e.slug)}: ${i(e,t)}`)}))})),n}),[])}(t,e?.settings),s=pb(n,"--wp--custom--","--");s.length>0&&i.push(...s),i.length>0&&(o+=`${r}{${i.join(";")};}`)})),o},yb=(e,t,n,o,r=!1,i=!1,s=void 0)=>{const l={blockGap:!0,blockStyles:!0,layoutStyles:!0,marginReset:!0,presets:!0,rootPadding:!0,variationStyles:!1,...s},a=kb(e,t),c=vb(e,t),u=e?.settings?.useRootPaddingAwareAlignments,{contentSize:d,wideSize:p}=e?.settings?.layout||{},h=l.marginReset||l.rootPadding||l.layoutStyles;let g="";if(l.presets&&(d||p)&&(g+=`${Yi} {`,g=d?g+` --wp--style--global--content-size: ${d};`:g,g=p?g+` --wp--style--global--wide-size: ${p};`:g,g+="}"),h&&(g+=":where(body) {margin: 0;",l.rootPadding&&u&&(g+="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\t.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }\n\t\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\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) { padding-right: 0; padding-left: 0; }\n\t\t\t\t.has-global-padding :where(:not(.alignfull.is-layout-flow) > .has-global-padding:not(.wp-block-block, .alignfull)) > .alignfull { margin-left: 0; margin-right: 0;\n\t\t\t\t"),g+="}"),l.blockStyles&&a.forEach((({selector:t,duotoneSelector:s,styles:a,fallbackGapValue:c,hasLayoutSupport:d,featureSelectors:p,styleVariationSelectors:h,skipSelectorWrapper:m})=>{if(p){const e=hb(p,a);Object.entries(e).forEach((([e,t])=>{if(t.length){const n=t.join(";");g+=`:root :where(${e}){${n};}`}}))}if(s){const e={};a?.filter&&(e.filter=a.filter,delete a.filter);const t=gb(e);t.length&&(g+=`${s}{${t.join(";")};}`)}r||qi!==t&&!d||(g+=mb({style:a,selector:t,hasBlockGapSupport:n,hasFallbackGapSupport:o,fallbackGapValue:c}));const f=gb(a,t,u,e,i);if(f?.length){g+=`${m?t:`:root :where(${t})`}{${f.join(";")};}`}a?.css&&(g+=wb(a.css,`:root :where(${t})`)),l.variationStyles&&h&&Object.entries(h).forEach((([t,n])=>{const o=a?.variations?.[t];if(o){if(p){const e=hb(p,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(";");g+=`:root :where(${o}){${r};}`}}))}const t=gb(o,n,u,e);t.length&&(g+=`:root :where(${n}){${t.join(";")};}`),o?.css&&(g+=wb(o.css,`:root :where(${n})`))}}));const b=Object.entries(a).filter((([e])=>e.startsWith(":")));b?.length&&b.forEach((([e,n])=>{const o=gb(n);if(!o?.length)return;const r=`:root :where(${t.split(",").map((t=>t+e)).join(",")}){${o.join(";")};}`;g+=r}))})),l.layoutStyles&&(g+=".wp-site-blocks > .alignleft { float: left; margin-right: 2em; }",g+=".wp-site-blocks > .alignright { float: right; margin-left: 2em; }",g+=".wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }"),l.blockGap&&n){const t=ul(e?.styles?.spacing?.blockGap)||"0.5em";g+=`:root :where(.wp-site-blocks) > * { margin-block-start: ${t}; margin-block-end: 0; }`,g+=":root :where(.wp-site-blocks) > :first-child { margin-block-start: 0; }",g+=":root :where(.wp-site-blocks) > :last-child { margin-block-end: 0; }"}return l.presets&&c.forEach((({selector:e,presets:t})=>{qi!==e&&Yi!==e||(e="");const n=function(e="*",t={}){return Xi.reduce(((n,{path:o,cssVarInfix:r,classes:i})=>{if(!i)return n;const s=fe(t,o,[]);return["default","theme","custom"].forEach((t=>{s[t]&&s[t].forEach((({slug:t})=>{i.forEach((({classSuffix:o,propertyName:i})=>{const s=`.has-${db(t)}-${o}`,l=e.split(",").map((e=>`${e}${s}`)).join(","),a=`var(--wp--preset--${r}--${db(t)})`;n+=`${l}{${i}: ${a} !important;}`}))}))})),n}),"")}(e,t);n.length>0&&(g+=n)})),g};function xb(e,t){return vb(e,t).flatMap((({presets:e})=>function(e={}){return Xi.filter((e=>"duotone"===e.path.at(-1))).flatMap((t=>{const n=fe(e,t.path,{});return["default","theme"].filter((e=>n[e])).flatMap((e=>n[e].map((e=>Pf(`wp-duotone-${e.slug}`,e.colors))))).join("")}))}(e)))}const Sb=(e,t,n)=>{const o={};return e.forEach((e=>{const r=e.name,i=Rf(e);let s=Rf(e,"filter.duotone");if(!s){const t=Rf(e),n=(0,p.getBlockSupport)(e,"color.__experimentalDuotone",!1);s=n&&ns(t,n)}const l=!!e?.supports?.layout||!!e?.supports?.__experimentalLayout,a=e?.supports?.spacing?.blockGap?.__experimentalDefault,c=t(r),u={};c?.forEach((e=>{const t=n?`-${n}`:"",o=`${e.name}${t}`,r=function(e,t){const n=`.is-style-${e}`;if(!t)return n;const o=/((?::\([^)]+\))?\s*)([^\s:]+)/,r=(e,t,o)=>t+o+n;return t.split(",").map((e=>e.replace(o,r))).join(",")}(o,i);u[o]=r}));const d=((e,t)=>{if(e?.selectors&&Object.keys(e.selectors).length>0)return e.selectors;const n={root:t};return Object.entries(ub).forEach((([t,o])=>{const r=Rf(e,t);r&&(n[o]=r)})),n})(e,i);o[r]={duotoneSelector:s,fallbackGapValue:a,featureSelectors:Object.keys(d).length?d:void 0,hasLayoutSupport:l,name:r,selector:i,styleVariationSelectors:c?.length?u:void 0}})),o};function wb(e,t){let n="";if(!e||""===e.trim())return n;return e.split("&").forEach((e=>{if(!e||""===e.trim())return;if(!e.includes("{"))n+=`:root :where(${t}){${e.trim()}}`;else{const o=e.replace("}","").split("{");if(2!==o.length)return;const[r,i]=o,s=r.match(/([>+~\s]*::[a-zA-Z-]+)/),l=s?s[1]:"",a=s?r.replace(l,"").trim():r.trim();let c;c=""===a?t:r.startsWith(" ")?ns(t,a):function(e,t){return e.includes(",")?e.split(",").map((e=>e+t)).join(","):e+t}(t,a),n+=`:root :where(${c})${l}{${i.trim()}}`}})),n}function Cb(e={},t){const[n]=cs("spacing.blockGap"),o=null!==n,r=!o,i=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return!!t().disableLayoutStyles})),{getBlockStyles:s}=(0,g.useSelect)(p.store);return(0,h.useMemo)((()=>{if(!e?.styles||!e?.settings)return[];const n=(l=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);var l;const a=Sb((0,p.getBlockTypes)(),s),c=_b(n,a),u=yb(n,a,o,r,i,t),d=xb(n,a),h=[{css:c,isGlobalStyles:!0},{css:u,isGlobalStyles:!0},{css:n.styles.css??"",isGlobalStyles:!0},{assets:d,__unstableType:"svg",isGlobalStyles:!0}];return(0,p.getBlockTypes)().forEach((e=>{if(n.styles.blocks[e.name]?.css){const t=a[e.name].selector;h.push({css:wb(n.styles.blocks[e.name]?.css,t),isGlobalStyles:!0})}})),[h,n.settings]}),[o,r,e,i,t,s])}function Bb(e=!1){const{merged:t}=(0,h.useContext)(is);return Cb(t,e)}const Ib="is-style-";function jb(e){return e?e.split(/\s+/).reduce(((e,t)=>{if(t.startsWith(Ib)){const n=t.slice(9);"default"!==n&&e.push(n)}return e}),[]):[]}function Eb({override:e}){ys(e)}function Tb(e,t,n){if(!e?.styles?.blocks?.[t]?.variations?.[n])return;const o=t=>{Object.keys(t).forEach((n=>{const r=t[n];if("object"==typeof r&&null!==r)if(void 0!==r.ref)if("string"!=typeof r.ref||""===r.ref.trim())delete t[n];else{const o=fe(e,r.ref);o?t[n]=o:delete t[n]}else o(r),0===Object.keys(r).length&&delete t[n]}))},r=JSON.parse(JSON.stringify(e.styles.blocks[t].variations[n]));return o(r),r}var Mb={hasSupport:()=>!0,attributeKeys:["className"],isMatch:({className:e})=>jb(e).length>0,useBlockProps:function({name:e,className:t,clientId:n}){const{getBlockStyles:o}=(0,g.useSelect)(p.store),r=function(e,t=[]){const n=jb(e);if(!n)return null;for(const e of n)if(t.some((t=>t.name===e)))return e;return null}(t,o(e)),i=`${Ib}${r}-${n}`,{settings:s,styles:l}=function(e,t,n){const{merged:o}=(0,h.useContext)(is),{globalSettings:r,globalStyles:i}=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return{globalSettings:t.__experimentalFeatures,globalStyles:t[N]}}),[]);return(0,h.useMemo)((()=>{const s=Tb({settings:o?.settings??r,styles:o?.styles??i},e,t);return{settings:o?.settings??r,styles:{blocks:{[e]:{variations:{[`${t}-${n}`]:s}}}}}}),[o,r,i,t,n,e])}(e,r,n),a=(0,h.useMemo)((()=>{if(!r)return;const e={settings:s,styles:l},t=Sb((0,p.getBlockTypes)(),o,n);return yb(e,t,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0})}),[r,s,l,o,n]);return ys({id:`variation-${n}`,css:a,__unstableType:"variation",variation:r,clientId:n}),r?{className:i}:{}}};const Pb="layout",{kebabCase:Rb}=G(ws.privateApis);function Ab(e){return(0,p.hasBlockSupport)(e,"layout")||(0,p.hasBlockSupport)(e,"__experimentalLayout")}function Nb(e={},t=""){const{layout:n}=e,{default:o}=(0,p.getBlockSupport)(t,Pb)||{},r=n?.inherit||n?.contentSize||n?.wideSize?{...n,type:"constrained"}:n||o||{},i=[];if(Fs[r?.type||"default"]?.className){const e=Fs[r?.type||"default"]?.className,n=t.split("/"),o=`wp-block-${"core"===n[0]?n.pop():n.join("-")}-${e}`;i.push(e,o)}return(0,g.useSelect)((e=>(r?.inherit||r?.contentSize||"constrained"===r?.type)&&e(ji).getSettings().__experimentalFeatures?.useRootPaddingAwareAlignments),[r?.contentSize,r?.inherit,r?.type])&&i.push("has-global-padding"),r?.orientation&&i.push(`is-${Rb(r.orientation)}`),r?.justifyContent&&i.push(`is-content-justification-${Rb(r.justifyContent)}`),r?.flexWrap&&"nowrap"===r.flexWrap&&i.push("is-nowrap"),i}var Lb={shareWithChildBlocks:!0,edit:function({layout:e,setAttributes:t,name:n,clientId:o}){const r=xs(n),{layout:i}=r,{themeSupportsLayout:s}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return{themeSupportsLayout:t().supportsLayout}}),[]);if("default"!==ga())return null;const l=(0,p.getBlockSupport)(n,Pb,{}),a={...i,...l},{allowSwitching:c,allowEditing:u=!0,allowInheriting:h=!0,default:m}=a;if(!u)return null;const f={...l,...e},{type:b,default:{type:k="default"}={}}=f,v=b||k,_=!(!h||v&&"default"!==v&&"constrained"!==v&&!f.inherit),y=e||m||{},{inherit:x=!1,contentSize:S=null}=y;if(("default"===v||"constrained"===v)&&!s)return null;const w=Xl(v),C=Xl("constrained"),B=!y.type&&(S||x),I=!!x||!!S,j=e=>t({layout:e});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa,{children:(0,d.jsxs)(ws.PanelBody,{title:(0,T.__)("Layout"),children:[_&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Inner blocks use content width"),checked:"constrained"===w?.name||I,onChange:()=>t({layout:{type:"constrained"===w?.name||I?"default":"constrained"}}),help:"constrained"===w?.name||I?(0,T.__)("Nested blocks use content width with options for full and wide widths."):(0,T.__)("Nested blocks will fill the width of this container.")})}),!x&&c&&(0,d.jsx)(Db,{type:v,onChange:e=>t({layout:{type:e}})}),w&&"default"!==w.name&&(0,d.jsx)(w.inspectorControls,{layout:y,onChange:j,layoutBlockSupport:a,name:n,clientId:o}),C&&B&&(0,d.jsx)(C.inspectorControls,{layout:y,onChange:j,layoutBlockSupport:a,name:n,clientId:o})]})}),!x&&w&&(0,d.jsx)(w.toolBarControls,{layout:y,onChange:j,layoutBlockSupport:l,name:n,clientId:o})]})},attributeKeys:["layout"],hasSupport:e=>Ab(e)};function Db({type:e,onChange:t}){return(0,d.jsx)(ws.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,T.__)("Layout type"),__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,isAdaptiveWidth:!0,value:e,onChange:t,children:Yl.map((({name:e,label:t})=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:e,label:t},e)))})}function Ob({block:e,props:t,blockGapSupport:n,layoutClasses:o}){const{name:r,attributes:i}=t,s=(0,m.useInstanceId)(e),{layout:l}=i,{default:a}=(0,p.getBlockSupport)(r,Pb)||{},c=l?.inherit||l?.contentSize||l?.wideSize?{...l,type:"constrained"}:l||a||{},u=`wp-container-${Rb(r)}-is-layout-`,h=`.${u}${s}`,g=null!==n,f=Xl(c?.type||"default"),b=f?.getLayoutStyle?.({blockName:r,selector:h,layout:c,style:i?.style,hasBlockGapSupport:g}),k=ms({[`${u}${s}`]:!!b},o);return _s({css:b}),(0,d.jsx)(e,{...t,__unstableLayoutClassNames:k})}const zb=(0,m.createHigherOrderComponent)((e=>t=>{const{clientId:n,name:o,attributes:r}=t,i=Ab(o),s=Nb(r,o),l=(0,g.useSelect)((e=>{if(!i)return;const{getSettings:t,getBlockSettings:o}=G(e(ji)),{disableLayoutStyles:r}=t();if(r)return;const[s]=o(n,"spacing.blockGap");return{blockGapSupport:s}}),[i,n]);return l?(0,d.jsx)(Ob,{block:e,props:t,layoutClasses:s,...l}):(0,d.jsx)(e,{...t,__unstableLayoutClassNames:i?s:void 0})}),"withLayoutStyles");function Vb(e,t){return Array.from({length:t},((t,n)=>e+n))}(0,f.addFilter)("blocks.registerBlockType","core/layout/addAttribute",(function(e){return"type"in(e.attributes?.layout??{})||Ab(e)&&(e.attributes={...e.attributes,layout:{type:"object"}}),e})),(0,f.addFilter)("editor.BlockListBlock","core/editor/layout/with-layout-styles",zb);class Fb{constructor({columnStart:e,rowStart:t,columnEnd:n,rowEnd:o,columnSpan:r,rowSpan:i}={}){this.columnStart=e??1,this.rowStart=t??1,this.columnEnd=void 0!==r?this.columnStart+r-1:n??this.columnStart,this.rowEnd=void 0!==i?this.rowStart+i-1:o??this.rowStart}get columnSpan(){return this.columnEnd-this.columnStart+1}get rowSpan(){return this.rowEnd-this.rowStart+1}contains(e,t){return e>=this.columnStart&&e<=this.columnEnd&&t>=this.rowStart&&t<=this.rowEnd}containsRect(e){return this.contains(e.columnStart,e.rowStart)&&this.contains(e.columnEnd,e.rowEnd)}intersectsRect(e){return this.columnStart<=e.columnEnd&&this.columnEnd>=e.columnStart&&this.rowStart<=e.rowEnd&&this.rowEnd>=e.rowStart}}function Hb(e,t){return e.ownerDocument.defaultView.getComputedStyle(e).getPropertyValue(t)}function Ub(e,t){const n=[];for(const o of e.split(" ")){const e=n[n.length-1],r=e?e.end+t:0,i=r+parseFloat(o);n.push({start:r,end:i})}return n}function Gb(e,t,n="start"){return e.reduce(((o,r,i)=>Math.abs(r[n]-t)<Math.abs(e[o][n]-t)?i:o),0)}function $b(e){const t=Hb(e,"grid-template-columns"),n=Hb(e,"grid-template-rows"),o=Hb(e,"border-top-width"),r=Hb(e,"border-right-width"),i=Hb(e,"border-bottom-width"),s=Hb(e,"border-left-width"),l=Hb(e,"padding-top"),a=Hb(e,"padding-right"),c=Hb(e,"padding-bottom"),u=Hb(e,"padding-left"),d=t.split(" ").length,p=n.split(" ").length;return{numColumns:d,numRows:p,numItems:d*p,currentColor:Hb(e,"color"),style:{gridTemplateColumns:t,gridTemplateRows:n,gap:Hb(e,"gap"),inset:`\n\t\t\t\tcalc(${l} + ${o})\n\t\t\t\tcalc(${a} + ${r})\n\t\t\t\tcalc(${c} + ${i})\n\t\t\t\tcalc(${u} + ${s})\n\t\t\t`}}}const Wb=[(0,h.createInterpolateElement)((0,T.__)("While writing, you can press <kbd>/</kbd> to quickly insert new blocks."),{kbd:(0,d.jsx)("kbd",{})}),(0,h.createInterpolateElement)((0,T.__)("Indent a list by pressing <kbd>space</kbd> at the beginning of a line."),{kbd:(0,d.jsx)("kbd",{})}),(0,h.createInterpolateElement)((0,T.__)("Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line."),{kbd:(0,d.jsx)("kbd",{})}),(0,T.__)("Drag files into the editor to automatically insert media blocks."),(0,T.__)("Change a block's type by pressing the block icon on the toolbar.")];var Kb=function(){const[e]=(0,h.useState)(Math.floor(Math.random()*Wb.length));return(0,d.jsx)(ws.Tip,{children:Wb[e]})},Zb=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),qb=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});const{Badge:Yb}=G(ws.privateApis);var Xb=function({title:e,icon:t,description:n,blockType:o,className:r,name:i,allowParentNavigation:s,children:l}){o&&(I()("`blockType` property in `BlockCard component`",{since:"5.7",alternative:"`title, icon and description` properties"}),({title:e,icon:t,description:n}=o));const a=(0,g.useSelect)((e=>{if(!s)return;const{getSelectedBlockClientId:t,getBlockParentsByBlockName:n}=e(ji);return n(t(),"core/navigation",!0)[0]}),[s]),{selectBlock:c}=(0,g.useDispatch)(ji);return(0,d.jsxs)("div",{className:ms("block-editor-block-card",r),children:[s&&a&&(0,d.jsx)(ws.Button,{onClick:()=>c(a),label:(0,T.__)("Go to parent Navigation block"),style:{minWidth:24,padding:0},icon:(0,T.isRTL)()?Zb:qb,size:"small"}),(0,d.jsx)(Vu,{icon:t,showColors:!0}),(0,d.jsxs)(ws.__experimentalVStack,{spacing:1,children:[(0,d.jsxs)("h2",{className:"block-editor-block-card__title",children:[(0,d.jsx)("span",{className:"block-editor-block-card__name",children:i?.length?i:e}),!!i?.length&&(0,d.jsx)(Yb,{children:e})]}),n&&(0,d.jsx)(ws.__experimentalText,{className:"block-editor-block-card__description",children:n}),l]})]})},Qb=(e=>(e.Unknown="REDUX_UNKNOWN",e.Add="ADD_ITEM",e.Prepare="PREPARE_ITEM",e.Cancel="CANCEL_ITEM",e.Remove="REMOVE_ITEM",e.PauseItem="PAUSE_ITEM",e.ResumeItem="RESUME_ITEM",e.PauseQueue="PAUSE_QUEUE",e.ResumeQueue="RESUME_QUEUE",e.OperationStart="OPERATION_START",e.OperationFinish="OPERATION_FINISH",e.AddOperations="ADD_OPERATIONS",e.CacheBlobUrl="CACHE_BLOB_URL",e.RevokeBlobUrls="REVOKE_BLOB_URLS",e.UpdateSettings="UPDATE_SETTINGS",e))(Qb||{}),Jb=(e=>(e.Processing="PROCESSING",e.Paused="PAUSED",e))(Jb||{}),ek=(e=>(e.Prepare="PREPARE",e.Upload="UPLOAD",e))(ek||{});const tk={queue:[],queueStatus:"active",blobUrls:{},settings:{mediaUpload:()=>{}}};var nk=function(e=tk,t={type:Qb.Unknown}){switch(t.type){case Qb.PauseQueue:return{...e,queueStatus:"paused"};case Qb.ResumeQueue:return{...e,queueStatus:"active"};case Qb.Add:return{...e,queue:[...e.queue,t.item]};case Qb.Cancel:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,error:t.error}:e))};case Qb.Remove:return{...e,queue:e.queue.filter((e=>e.id!==t.id))};case Qb.OperationStart:return{...e,queue:e.queue.map((e=>e.id===t.id?{...e,currentOperation:t.operation}:e))};case Qb.AddOperations:return{...e,queue:e.queue.map((e=>e.id!==t.id?e:{...e,operations:[...e.operations||[],...t.operations]}))};case Qb.OperationFinish:return{...e,queue:e.queue.map((e=>{if(e.id!==t.id)return e;const n=e.operations?e.operations.slice(1):[],o=e.attachment||t.item.attachment?{...e.attachment,...t.item.attachment}:void 0;return{...e,currentOperation:void 0,operations:n,...t.item,attachment:o,additionalData:{...e.additionalData,...t.item.additionalData}}}))};case Qb.CacheBlobUrl:{const n=e.blobUrls[t.id]||[];return{...e,blobUrls:{...e.blobUrls,[t.id]:[...n,t.blobUrl]}}}case Qb.RevokeBlobUrls:{const n={...e.blobUrls};return delete n[t.id],{...e,blobUrls:n}}case Qb.UpdateSettings:return{...e,settings:{...e.settings,...t.settings}}}return e};function ok(e){return e.queue}function rk(e){return e.queue.length>=1}function ik(e,t){return e.queue.some((e=>e.attachment?.url===t||e.sourceUrl===t))}function sk(e,t){return e.queue.some((e=>e.attachment?.id===t||e.sourceAttachmentId===t))}function lk(e){return e.settings}function ak(e){return e.queue}function ck(e,t){return e.queue.find((e=>e.id===t))}function uk(e,t){return 0===e.queue.filter((e=>t===e.batchId)).length}function dk(e,t){return e.queue.some((e=>e.currentOperation===ek.Upload&&e.additionalData.post===t))}function pk(e,t){return e.queue.find((e=>e.status===Jb.Paused&&e.additionalData.post===t))}function hk(e){return"paused"===e.queueStatus}function gk(e,t){return e.blobUrls[t]||[]}const mk={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let fk;const bk=new Uint8Array(16);function kk(){if(!fk&&(fk="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!fk))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fk(bk)}const vk=[];for(let e=0;e<256;++e)vk.push((e+256).toString(16).slice(1));function _k(e,t=0){return vk[e[t+0]]+vk[e[t+1]]+vk[e[t+2]]+vk[e[t+3]]+"-"+vk[e[t+4]]+vk[e[t+5]]+"-"+vk[e[t+6]]+vk[e[t+7]]+"-"+vk[e[t+8]]+vk[e[t+9]]+"-"+vk[e[t+10]]+vk[e[t+11]]+vk[e[t+12]]+vk[e[t+13]]+vk[e[t+14]]+vk[e[t+15]]}const yk=function(e,t,n){if(mk.randomUUID&&!t&&!e)return mk.randomUUID();const o=(e=e||{}).random||(e.rng||kk)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return _k(o)};class xk extends Error{code;file;constructor({code:e,message:t,file:n,cause:o}){super(t,{cause:o}),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.file=n}}function Sk(e,t){if(!t)return;const n=t.some((t=>t.includes("/")?t===e.type:e.type.startsWith(`${t}/`)));if(e.type&&!n)throw new xk({code:"MIME_TYPE_NOT_SUPPORTED",message:(0,T.sprintf)((0,T.__)("%s: Sorry, this file type is not supported here."),e.name),file:e})}function wk(e,t){const n=(o=t)?Object.entries(o).flatMap((([e,t])=>{const[n]=t.split("/");return[t,...e.split("|").map((e=>`${n}/${e}`))]})):null;var o;if(!n)return;const r=n.includes(e.type);if(e.type&&!r)throw new xk({code:"MIME_TYPE_NOT_ALLOWED_FOR_USER",message:(0,T.sprintf)((0,T.__)("%s: Sorry, you are not allowed to upload this file type."),e.name),file:e})}function Ck(e,t){if(e.size<=0)throw new xk({code:"EMPTY_FILE",message:(0,T.sprintf)((0,T.__)("%s: This file is empty."),e.name),file:e});if(t&&e.size>t)throw new xk({code:"SIZE_ABOVE_LIMIT",message:(0,T.sprintf)((0,T.__)("%s: This file exceeds the maximum upload size for this site."),e.name),file:e})}function Bk({files:e,onChange:t,onSuccess:n,onError:o,onBatchSuccess:r,additionalData:i,allowedTypes:s}){return async({select:l,dispatch:a})=>{const c=yk();for(const u of e){try{Sk(u,s),wk(u,l.getSettings().allowedMimeTypes)}catch(e){o?.(e);continue}try{Ck(u,l.getSettings().maxUploadFileSize)}catch(e){o?.(e);continue}a.addItem({file:u,batchId:c,onChange:t,onSuccess:n,onBatchSuccess:r,onError:o,additionalData:i})}}}function Ik(e,t,n=!1){return async({select:o,dispatch:r})=>{const i=o.getItem(e);if(i){if(i.abortController?.abort(),!n){const{onError:e}=i;e?.(t??new Error("Upload cancelled")),!e&&t&&console.error("Upload cancelled",t)}r({type:Qb.Cancel,id:e,error:t}),r.removeItem(e),r.revokeBlobUrls(e),i.batchId&&o.isBatchUploaded(i.batchId)&&i.onBatchSuccess?.()}}}function jk(e){return function(e,t){return new File([e],t,{type:e.type,lastModified:e.lastModified})}(e,e.name)}class Ek extends File{constructor(e="stub-file"){super([],e)}}function Tk({file:e,batchId:t,onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,additionalData:s={},sourceUrl:l,sourceAttachmentId:a,abortController:c,operations:u}){return async({dispatch:d})=>{const p=yk(),h=function(e){if(e instanceof File)return e;const t=e.type.split("/")[1],n="application/pdf"===e.type?"document":e.type.split("/")[0];return new File([e],`${n}.${t}`,{type:e.type})}(e);let g;h instanceof Ek||(g=(0,$a.createBlobURL)(h),d({type:Qb.CacheBlobUrl,id:p,blobUrl:g})),d({type:Qb.Add,item:{id:p,batchId:t,status:Jb.Processing,sourceFile:jk(h),file:h,attachment:{url:g},additionalData:{convert_format:!1,...s},onChange:n,onSuccess:o,onBatchSuccess:r,onError:i,sourceUrl:l,sourceAttachmentId:a,abortController:c||new AbortController,operations:Array.isArray(u)?u:[ek.Prepare]}}),d.processItem(p)}}function Mk(e){return async({select:t,dispatch:n})=>{if(t.isPaused())return;const o=t.getItem(e),{attachment:r,onChange:i,onSuccess:s,onBatchSuccess:l,batchId:a}=o,c=Array.isArray(o.operations?.[0])?o.operations[0][0]:o.operations?.[0];if(r&&i?.([r]),!c)return r&&s?.([r]),n.revokeBlobUrls(e),void(a&&t.isBatchUploaded(a)&&l?.());if(c)switch(n({type:Qb.OperationStart,id:e,operation:c}),c){case ek.Prepare:n.prepareItem(o.id);break;case ek.Upload:n.uploadItem(e)}}}function Pk(){return{type:Qb.PauseQueue}}function Rk(){return async({select:e,dispatch:t})=>{t({type:Qb.ResumeQueue});for(const n of e.getAllItems())t.processItem(n.id)}}function Ak(e){return async({select:t,dispatch:n})=>{t.getItem(e)&&n({type:Qb.Remove,id:e})}}function Nk(e,t){return async({dispatch:n})=>{n({type:Qb.OperationFinish,id:e,item:t}),n.processItem(e)}}function Lk(e){return async({dispatch:t})=>{const n=[ek.Upload];t({type:Qb.AddOperations,id:e,operations:n}),t.finishOperation(e,{})}}function Dk(e){return async({select:t,dispatch:n})=>{const o=t.getItem(e);t.getSettings().mediaUpload({filesList:[o.file],additionalData:o.additionalData,signal:o.abortController?.signal,onFileChange:([t])=>{(0,$a.isBlobURL)(t.url)||n.finishOperation(e,{attachment:t})},onSuccess:([t])=>{n.finishOperation(e,{attachment:t})},onError:t=>{n.cancelItem(e,t)}})}}function Ok(e){return async({select:t,dispatch:n})=>{const o=t.getBlobUrls(e);for(const e of o)(0,$a.revokeBlobURL)(e);n({type:Qb.RevokeBlobUrls,id:e})}}function zk(e){return{type:Qb.UpdateSettings,settings:e}}const{lock:Vk,unlock:Fk}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/upload-media"),Hk="core/upload-media",Uk={reducer:nk,selectors:s,actions:a},Gk=(0,g.createReduxStore)(Hk,{reducer:nk,selectors:s,actions:a});(0,g.register)(Gk),Fk(Gk).registerPrivateActions(c),Fk(Gk).registerPrivateSelectors(l);const $k=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,g.useRegistry)(),[r]=(0,h.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,g.createRegistry)({},t),o.registerStore(Hk,Uk),e.set(t,o)),o}(r,o,t);return i===o?(0,d.jsx)(e,{registry:o,...n}):(0,d.jsx)(g.RegistryProvider,{value:i,children:(0,d.jsx)(e,{registry:i,...n})})}),"withRegistryProvider")((e=>{const{children:t,settings:n}=e,{updateSettings:o}=Fk((0,g.useDispatch)(Gk));return(0,h.useEffect)((()=>{o(n)}),[n,o]),(0,d.jsx)(d.Fragment,{children:t})}));var Wk=$k;var Kk=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...n})=>{const o=(0,g.useRegistry)(),[r]=(0,h.useState)((()=>new WeakMap)),i=function(e,t,n){if(!n)return t;let o=e.get(t);return o||(o=(0,g.createRegistry)({},t),o.registerStore(ge,Ii),e.set(t,o)),o}(r,o,t);return i===o?(0,d.jsx)(e,{registry:o,...n}):(0,d.jsx)(g.RegistryProvider,{value:i,children:(0,d.jsx)(e,{registry:i,...n})})}),"withRegistryProvider");const Zk=()=>{};function qk({clientId:e=null,value:t,selection:n,onChange:o=Zk,onInput:r=Zk}){const i=(0,g.useRegistry)(),{resetBlocks:s,resetSelection:l,replaceInnerBlocks:a,setHasControlledInnerBlocks:c,__unstableMarkNextChangeAsNotPersistent:u}=i.dispatch(ji),{getBlockName:d,getBlocks:m,getSelectionStart:f,getSelectionEnd:b}=i.select(ji),k=(0,g.useSelect)((t=>!e||t(ji).areInnerBlocksControlled(e)),[e]),v=(0,h.useRef)({incoming:null,outgoing:[]}),_=(0,h.useRef)(!1),y=()=>{t&&(u(),e?i.batch((()=>{c(e,!0);const n=t.map((e=>(0,p.cloneBlock)(e)));_.current&&(v.current.incoming=n),u(),a(e,n)})):(_.current&&(v.current.incoming=t),s(t)))},x=(0,h.useRef)(r),S=(0,h.useRef)(o);(0,h.useEffect)((()=>{x.current=r,S.current=o}),[r,o]),(0,h.useEffect)((()=>{v.current.outgoing.includes(t)?v.current.outgoing[v.current.outgoing.length-1]===t&&(v.current.outgoing=[]):m(e)!==t&&(v.current.outgoing=[],y(),n&&l(n.selectionStart,n.selectionEnd,n.initialPosition))}),[t,e]);const w=(0,h.useRef)(!1);(0,h.useEffect)((()=>{w.current?k||(v.current.outgoing=[],y()):w.current=!0}),[k]),(0,h.useEffect)((()=>{const{getSelectedBlocksInitialCaretPosition:t,isLastBlockChangePersistent:n,__unstableIsLastBlockChangeIgnored:o,areInnerBlocksControlled:r}=i.select(ji);let s=m(e),l=n(),a=!1;_.current=!0;const c=i.subscribe((()=>{if(null!==e&&null===d(e))return;if(!(!e||r(e)))return;const i=n(),c=m(e),u=c!==s;if(s=c,u&&(v.current.incoming||o()))return v.current.incoming=null,void(l=i);if(u||a&&!u&&i&&!l){l=i,v.current.outgoing.push(s);(l?S.current:x.current)(s,{selection:{selectionStart:f(),selectionEnd:b(),initialPosition:t()}})}a=u}),ji);return()=>{_.current=!1,c()}}),[i,e]),(0,h.useEffect)((()=>()=>{u(),e?(c(e,!1),u(),a(e,[])):s([])}),[])}const Yk=window.wp.keyboardShortcuts;function Xk(){return null}Xk.Register=function(){const{registerShortcut:e}=(0,g.useDispatch)(Yk.store);return(0,h.useEffect)((()=>{e({name:"core/block-editor/copy",category:"block",description:(0,T.__)("Copy the selected block(s)."),keyCombination:{modifier:"primary",character:"c"}}),e({name:"core/block-editor/cut",category:"block",description:(0,T.__)("Cut the selected block(s)."),keyCombination:{modifier:"primary",character:"x"}}),e({name:"core/block-editor/paste",category:"block",description:(0,T.__)("Paste the selected block(s)."),keyCombination:{modifier:"primary",character:"v"}}),e({name:"core/block-editor/duplicate",category:"block",description:(0,T.__)("Duplicate the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"d"}}),e({name:"core/block-editor/remove",category:"block",description:(0,T.__)("Remove the selected block(s)."),keyCombination:{modifier:"access",character:"z"}}),e({name:"core/block-editor/paste-styles",category:"block",description:(0,T.__)("Paste the copied style to the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"v"}}),e({name:"core/block-editor/insert-before",category:"block",description:(0,T.__)("Insert a new block before the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"t"}}),e({name:"core/block-editor/insert-after",category:"block",description:(0,T.__)("Insert a new block after the selected block(s)."),keyCombination:{modifier:"primaryAlt",character:"y"}}),e({name:"core/block-editor/delete-multi-selection",category:"block",description:(0,T.__)("Delete selection."),keyCombination:{character:"del"},aliases:[{character:"backspace"}]}),e({name:"core/block-editor/select-all",category:"selection",description:(0,T.__)("Select all text when typing. Press again to select all blocks."),keyCombination:{modifier:"primary",character:"a"}}),e({name:"core/block-editor/unselect",category:"selection",description:(0,T.__)("Clear selection."),keyCombination:{character:"escape"}}),e({name:"core/block-editor/multi-text-selection",category:"selection",description:(0,T.__)("Select text across multiple blocks."),keyCombination:{modifier:"shift",character:"arrow"}}),e({name:"core/block-editor/focus-toolbar",category:"global",description:(0,T.__)("Navigate to the nearest toolbar."),keyCombination:{modifier:"alt",character:"F10"}}),e({name:"core/block-editor/move-up",category:"block",description:(0,T.__)("Move the selected block(s) up."),keyCombination:{modifier:"secondary",character:"t"}}),e({name:"core/block-editor/move-down",category:"block",description:(0,T.__)("Move the selected block(s) down."),keyCombination:{modifier:"secondary",character:"y"}}),e({name:"core/block-editor/collapse-list-view",category:"list-view",description:(0,T.__)("Collapse all other items."),keyCombination:{modifier:"alt",character:"l"}}),e({name:"core/block-editor/group",category:"block",description:(0,T.__)("Create a group block from the selected multiple blocks."),keyCombination:{modifier:"primary",character:"g"}}),e({name:"core/block-editor/toggle-block-visibility",category:"block",description:(0,T.__)("Show or hide the selected block(s)."),keyCombination:{modifier:"primaryShift",character:"h"}})}),[e]),null};var Qk=Xk;var Jk=function(e={}){return(0,h.useMemo)((()=>({mediaUpload:e.mediaUpload,mediaSideload:e.mediaSideload,maxUploadFileSize:e.maxUploadFileSize,allowedMimeTypes:e.allowedMimeTypes})),[e])};const ev=()=>{};function tv(e,{allowedTypes:t,additionalData:n={},filesList:o,onError:r=ev,onFileChange:i,onSuccess:s,onBatchSuccess:l}){e.dispatch(Gk).addItems({files:o,onChange:i,onSuccess:s,onBatchSuccess:l,onError:({message:e})=>r(e),additionalData:n,allowedTypes:t})}const nv=Kk((e=>{const{settings:t,registry:n,stripExperimentalSettings:o=!1}=e,r=Jk(t);let i=t;window.__experimentalMediaProcessing&&t.mediaUpload&&(i=(0,h.useMemo)((()=>({...t,mediaUpload:tv.bind(null,n)})),[t,n]));const{__experimentalUpdateSettings:s}=G((0,g.useDispatch)(ji));(0,h.useEffect)((()=>{s({...i,__internalIsInitialized:!0},{stripExperimentalSettings:o,reset:!0})}),[i,o,s]),qk(e);const l=(0,d.jsxs)(ws.SlotFillProvider,{passthrough:!0,children:[!i?.isPreviewMode&&(0,d.jsx)(Qk.Register,{}),(0,d.jsx)(hh,{children:e.children})]});return window.__experimentalMediaProcessing?(0,d.jsx)(Wk,{settings:r,useSubRegistry:!1,children:l}):l}));var ov=e=>(0,d.jsx)(nv,{...e,stripExperimentalSettings:!0,children:e.children});const rv=(0,h.createContext)({});function iv({value:e,children:t}){const n=(0,h.useContext)(rv),o=(0,h.useMemo)((()=>({...n,...e})),[n,e]);return(0,d.jsx)(rv.Provider,{value:o,children:t})}rv.displayName="BlockContext";var sv=rv;const lv="core/pattern-overrides";function av(e){return!e||0===Object.keys(e).length}function cv(e){return e?.__default?.source===lv}function uv(e,t){if(cv(e)){const n={};for(const o of t){const t=e[o]?e[o]:{source:lv};n[o]=t}return n}return e}function dv(e){const{clientId:t}=C(),n=e||t,{updateBlockAttributes:o}=(0,g.useDispatch)(ji),{getBlockAttributes:r}=(0,g.useRegistry)().select(ji);return{updateBlockBindings:e=>{const{metadata:{bindings:t,...i}={}}=r(n),s={...t};Object.entries(e).forEach((([e,t])=>{t||!s[e]?s[e]=t:delete s[e]}));const l={...i,bindings:s};av(l.bindings)&&delete l.bindings,o(n,{metadata:av(l)?void 0:l})},removeAllBlockBindings:()=>{const{metadata:{bindings:e,...t}={}}=r(n);o(n,{metadata:av(t)?void 0:t})}}}const pv=(0,h.createContext)({});pv.displayName="PrivateBlockContext";const hv={},gv=(0,ws.withFilters)("editor.BlockEdit")((e=>{const{name:t}=e,n=(0,p.getBlockType)(t);if(!n)return null;const o=n.edit||n.save;return(0,d.jsx)(o,{...e})}));var mv=e=>{const{name:t,clientId:n,attributes:o,setAttributes:r}=e,i=(0,g.useRegistry)(),s=(0,p.getBlockType)(t),l=(0,h.useContext)(sv),a=(0,g.useSelect)((e=>G(e(p.store)).getAllBlockBindingsSources()),[]),{bindableAttributes:c}=(0,h.useContext)(pv),{blockBindings:u,context:m,hasPatternOverrides:f}=(0,h.useMemo)((()=>{const e=s?.usesContext?Object.fromEntries(Object.entries(l).filter((([e])=>s.usesContext.includes(e)))):hv;return o?.metadata?.bindings&&Object.values(o?.metadata?.bindings||{}).forEach((t=>{a[t?.source]?.usesContext?.forEach((t=>{e[t]=l[t]}))})),{blockBindings:uv(o?.metadata?.bindings,c),context:e,hasPatternOverrides:cv(o?.metadata?.bindings)}}),[t,s?.usesContext,l,o?.metadata?.bindings,a]),b=(0,g.useSelect)((e=>{if(!u)return o;const t={},r=new Map;for(const[e,t]of Object.entries(u)){const{source:n,args:o}=t,i=a[n];i&&c?.includes(e)&&r.set(i,{...r.get(i),[e]:{args:o}})}if(r.size)for(const[o,i]of r){let r={};o.getValues?r=o.getValues({select:e,context:m,clientId:n,bindings:i}):Object.keys(i).forEach((e=>{r[e]=o.label}));for(const[e,n]of Object.entries(r))"url"!==e||n&&Lc(n)?t[e]=n:t[e]=null}return{...o,...t}}),[o,c,u,n,m,t,a]),k=(0,h.useCallback)((e=>{u?i.batch((()=>{const t={...e},o=new Map;for(const[e,n]of Object.entries(t)){if(!u[e]||!c?.includes(e))continue;const r=u[e],i=a[r?.source];i?.setValues&&(o.set(i,{...o.get(i),[e]:{args:r.args,newValue:n}}),delete t[e])}if(o.size)for(const[e,t]of o)e.setValues({select:i.select,dispatch:i.dispatch,context:m,clientId:n,bindings:t});const s=!!m["pattern/overrides"];f&&s||!Object.keys(t).length||(f&&(delete t.caption,delete t.href),r(t))})):r(e)}),[c,u,n,m,f,r,a,t,i]);if(!s)return null;if(s.apiVersion>1)return(0,d.jsx)(gv,{...e,attributes:b,context:m,setAttributes:k});const v=(0,p.hasBlockSupport)(s,"className",!0)?(0,p.getBlockDefaultClassName)(t):null,_=ms(v,o?.className,e.className);return(0,d.jsx)(gv,{...e,attributes:b,className:_,context:m,setAttributes:k})},fv=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var bv=function({className:e,actions:t,children:n,secondaryActions:o}){return(0,d.jsx)("div",{style:{display:"contents",all:"initial"},children:(0,d.jsx)("div",{className:ms(e,"block-editor-warning"),children:(0,d.jsxs)("div",{className:"block-editor-warning__contents",children:[(0,d.jsx)("p",{className:"block-editor-warning__message",children:n}),(t?.length>0||o)&&(0,d.jsxs)("div",{className:"block-editor-warning__actions",children:[t?.length>0&&t.map(((e,t)=>(0,d.jsx)("span",{className:"block-editor-warning__action",children:e},t))),o&&(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-warning__secondary",icon:fv,label:(0,T.__)("More options"),popoverProps:{placement:"bottom-end",className:"block-editor-warning__dropdown"},noIcons:!0,children:()=>(0,d.jsx)(ws.MenuGroup,{children:o.map(((e,t)=>(0,d.jsx)(ws.MenuItem,{onClick:e.onClick,children:e.title},t)))})})]})]})})})};function kv({originalBlockClientId:e,name:t,onReplace:n}){const{selectBlock:o}=(0,g.useDispatch)(ji),r=(0,p.getBlockType)(t);return(0,d.jsxs)(bv,{actions:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>o(e),children:(0,T.__)("Find original")},"find-original"),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>n([]),children:(0,T.__)("Remove")},"remove")],children:[(0,d.jsxs)("strong",{children:[r?.title,": "]}),(0,T.__)("This block can only be used once.")]})}function vv({mayDisplayControls:e,mayDisplayParentControls:t,blockEditingMode:n,isPreviewMode:o,...r}){const{name:i,isSelected:s,clientId:l,attributes:a={},__unstableLayoutClassNames:c}=r,{layout:u=null,metadata:g={}}=a,{bindings:m}=g,f=(0,p.hasBlockSupport)(i,"layout",!1)||(0,p.hasBlockSupport)(i,"__experimentalLayout",!1),{originalBlockClientId:x}=(0,h.useContext)(pv);return(0,d.jsxs)(w,{value:(0,h.useMemo)((()=>({name:i,isSelected:s,clientId:l,layout:f?u:null,__unstableLayoutClassNames:c,[b]:e,[k]:t,[v]:n,[_]:m,[y]:o})),[i,s,l,f,u,c,e,t,n,m,o]),children:[(0,d.jsx)(mv,{...r}),x&&(0,d.jsx)(kv,{originalBlockClientId:x,name:i,onReplace:r.onReplace})]})}var _v=n(8021);function yv({title:e,rawContent:t,renderedContent:n,action:o,actionText:r,className:i}){return(0,d.jsxs)("div",{className:i,children:[(0,d.jsxs)("div",{className:"block-editor-block-compare__content",children:[(0,d.jsx)("h2",{className:"block-editor-block-compare__heading",children:e}),(0,d.jsx)("div",{className:"block-editor-block-compare__html",children:t}),(0,d.jsx)("div",{className:"block-editor-block-compare__preview edit-post-visual-editor",children:(0,d.jsx)(h.RawHTML,{children:(0,Ga.safeHTML)(n)})})]}),(0,d.jsx)("div",{className:"block-editor-block-compare__action",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",tabIndex:"0",onClick:o,children:r})})]})}var xv=function({block:e,onKeep:t,onConvert:n,convertor:o,convertButtonText:r}){const i=(s=o(e),(Array.isArray(s)?s:[s]).map((e=>(0,p.getSaveContent)(e.name,e.attributes,e.innerBlocks))).join(""));var s;const l=(a=e.originalContent,c=i,(0,_v.JJ)(a,c).map(((e,t)=>{const n=ms({"block-editor-block-compare__added":e.added,"block-editor-block-compare__removed":e.removed});return(0,d.jsx)("span",{className:n,children:e.value},t)})));var a,c;return(0,d.jsxs)("div",{className:"block-editor-block-compare__wrapper",children:[(0,d.jsx)(yv,{title:(0,T.__)("Current"),className:"block-editor-block-compare__current",action:t,actionText:(0,T.__)("Convert to HTML"),rawContent:e.originalContent,renderedContent:e.originalContent}),(0,d.jsx)(yv,{title:(0,T.__)("After Conversion"),className:"block-editor-block-compare__converted",action:n,actionText:r,rawContent:l,renderedContent:i})]})};const Sv=e=>(0,p.rawHandler)({HTML:e.originalContent});function wv({clientId:e}){const{block:t,canInsertHTMLBlock:n,canInsertClassicBlock:o}=(0,g.useSelect)((t=>{const{canInsertBlockType:n,getBlock:o,getBlockRootClientId:r}=t(ji),i=r(e);return{block:o(e),canInsertHTMLBlock:n("core/html",i),canInsertClassicBlock:n("core/freeform",i)}}),[e]),{replaceBlock:r}=(0,g.useDispatch)(ji),[i,s]=(0,h.useState)(!1),l=(0,h.useCallback)((()=>s(!1)),[]),a=(0,h.useMemo)((()=>({toClassic(){const e=(0,p.createBlock)("core/freeform",{content:t.originalContent});return r(t.clientId,e)},toHTML(){const e=(0,p.createBlock)("core/html",{content:t.originalContent});return r(t.clientId,e)},toBlocks(){const e=Sv(t);return r(t.clientId,e)},toRecoveredBlock(){const e=(0,p.createBlock)(t.name,t.attributes,t.innerBlocks);return r(t.clientId,e)}})),[t,r]),c=(0,h.useMemo)((()=>[{title:(0,T._x)("Resolve","imperative verb"),onClick:()=>s(!0)},n&&{title:(0,T.__)("Convert to HTML"),onClick:a.toHTML},o&&{title:(0,T.__)("Convert to Classic Block"),onClick:a.toClassic}].filter(Boolean)),[n,o,a]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(bv,{actions:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:a.toRecoveredBlock,variant:"primary",children:(0,T.__)("Attempt recovery")},"recover")],secondaryActions:c,children:(0,T.__)("Block contains unexpected or invalid content.")}),i&&(0,d.jsx)(ws.Modal,{title:(0,T.__)("Resolve Block"),onRequestClose:l,className:"block-editor-block-compare",children:(0,d.jsx)(xv,{block:t,onKeep:a.toHTML,onConvert:a.toBlocks,convertor:Sv,convertButtonText:(0,T.__)("Convert to Blocks")})})]})}const Cv=(0,d.jsx)(bv,{className:"block-editor-block-list__block-crash-warning",children:(0,T.__)("This block has encountered an error and cannot be previewed.")});var Bv=()=>Cv;class Iv extends h.Component{constructor(){super(...arguments),this.state={hasError:!1}}componentDidCatch(){this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}var jv=Iv,Ev=n(4132);var Tv=function({clientId:e}){const[t,n]=(0,h.useState)(""),o=(0,g.useSelect)((t=>t(ji).getBlock(e)),[e]),{updateBlock:r}=(0,g.useDispatch)(ji);return(0,h.useEffect)((()=>{n((0,p.getBlockContent)(o))}),[o]),(0,d.jsx)(Ev.A,{className:"block-editor-block-list__block-html-textarea",value:t,onBlur:()=>{const i=(0,p.getBlockType)(o.name);if(!i)return;const s=(0,p.getBlockAttributes)(i,t,o.attributes),l=t||(0,p.getSaveContent)(i,s),[a]=t?(0,p.validateBlock)({...o,attributes:s,originalContent:l}):[!0];r(e,{attributes:s,originalContent:l,isValid:a}),t||n(l)},onChange:e=>n(e.target.value)})},Mv=Kv(),Pv=e=>Uv(e,Mv),Rv=Kv();Pv.write=e=>Uv(e,Rv);var Av=Kv();Pv.onStart=e=>Uv(e,Av);var Nv=Kv();Pv.onFrame=e=>Uv(e,Nv);var Lv=Kv();Pv.onFinish=e=>Uv(e,Lv);var Dv=[];Pv.setTimeout=(e,t)=>{let n=Pv.now()+t,o=()=>{let e=Dv.findIndex((e=>e.cancel==o));~e&&Dv.splice(e,1),Fv-=~e?1:0},r={time:n,handler:e,cancel:o};return Dv.splice(Ov(n),0,r),Fv+=1,Gv(),r};var Ov=e=>~(~Dv.findIndex((t=>t.time>e))||~Dv.length);Pv.cancel=e=>{Av.delete(e),Nv.delete(e),Lv.delete(e),Mv.delete(e),Rv.delete(e)},Pv.sync=e=>{Hv=!0,Pv.batchedUpdates(e),Hv=!1},Pv.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function o(...e){t=e,Pv.onStart(n)}return o.handler=e,o.cancel=()=>{Av.delete(n),t=null},o};var zv=typeof window<"u"?window.requestAnimationFrame:()=>{};Pv.use=e=>zv=e,Pv.now=typeof performance<"u"?()=>performance.now():Date.now,Pv.batchedUpdates=e=>e(),Pv.catch=console.error,Pv.frameLoop="always",Pv.advance=()=>{"demand"!==Pv.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Wv()};var Vv=-1,Fv=0,Hv=!1;function Uv(e,t){Hv?(t.delete(e),e(0)):(t.add(e),Gv())}function Gv(){Vv<0&&(Vv=0,"demand"!==Pv.frameLoop&&zv($v))}function $v(){~Vv&&(zv($v),Pv.batchedUpdates(Wv))}function Wv(){let e=Vv;Vv=Pv.now();let t=Ov(Vv);t&&(Zv(Dv.splice(0,t),(e=>e.handler())),Fv-=t),Fv?(Av.flush(),Mv.flush(e?Math.min(64,Vv-e):16.667),Nv.flush(),Rv.flush(),Lv.flush()):Vv=-1}function Kv(){let e=new Set,t=e;return{add(n){Fv+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Fv-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Fv-=t.size,Zv(t,(t=>t(n)&&e.add(t))),Fv+=e.size,t=e)}}}function Zv(e,t){e.forEach((e=>{try{t(e)}catch(e){Pv.catch(e)}}))}var qv=Object.defineProperty,Yv={};function Xv(){}((e,t)=>{for(var n in t)qv(e,n,{get:t[n],enumerable:!0})})(Yv,{assign:()=>d_,colors:()=>a_,createStringInterpolator:()=>r_,skipAnimation:()=>c_,to:()=>i_,willAdvance:()=>u_});var Qv={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Jv(e,t){if(Qv.arr(e)){if(!Qv.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var e_=(e,t)=>e.forEach(t);function t_(e,t,n){if(Qv.arr(e))for(let o=0;o<e.length;o++)t.call(n,e[o],`${o}`);else for(let o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o)}var n_=e=>Qv.und(e)?[]:Qv.arr(e)?e:[e];function o_(e,t){if(e.size){let n=Array.from(e);e.clear(),e_(n,t)}}var r_,i_,s_=(e,...t)=>o_(e,(e=>e(...t))),l_=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),a_=null,c_=!1,u_=Xv,d_=e=>{e.to&&(i_=e.to),e.now&&(Pv.now=e.now),void 0!==e.colors&&(a_=e.colors),null!=e.skipAnimation&&(c_=e.skipAnimation),e.createStringInterpolator&&(r_=e.createStringInterpolator),e.requestAnimationFrame&&Pv.use(e.requestAnimationFrame),e.batchedUpdates&&(Pv.batchedUpdates=e.batchedUpdates),e.willAdvance&&(u_=e.willAdvance),e.frameLoop&&(Pv.frameLoop=e.frameLoop)},p_=new Set,h_=[],g_=[],m_=0,f_={get idle(){return!p_.size&&!h_.length},start(e){m_>e.priority?(p_.add(e),Pv.onStart(b_)):(k_(e),Pv(__))},advance:__,sort(e){if(m_)Pv.onFrame((()=>f_.sort(e)));else{let t=h_.indexOf(e);~t&&(h_.splice(t,1),v_(e))}},clear(){h_=[],p_.clear()}};function b_(){p_.forEach(k_),p_.clear(),Pv(__)}function k_(e){h_.includes(e)||v_(e)}function v_(e){h_.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(h_,(t=>t.priority>e.priority)),0,e)}function __(e){let t=g_;for(let n=0;n<h_.length;n++){let o=h_[n];m_=o.priority,o.idle||(u_(o),o.advance(e),o.idle||t.push(o))}return m_=0,(g_=h_).length=0,(h_=t).length>0}var y_="[-+]?\\d*\\.?\\d+",x_=y_+"%";function S_(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var w_=new RegExp("rgb"+S_(y_,y_,y_)),C_=new RegExp("rgba"+S_(y_,y_,y_,y_)),B_=new RegExp("hsl"+S_(y_,x_,x_)),I_=new RegExp("hsla"+S_(y_,x_,x_,y_)),j_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,E_=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,T_=/^#([0-9a-fA-F]{6})$/,M_=/^#([0-9a-fA-F]{8})$/;function P_(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function R_(e,t,n){let o=n<.5?n*(1+t):n+t-n*t,r=2*n-o,i=P_(r,o,e+1/3),s=P_(r,o,e),l=P_(r,o,e-1/3);return Math.round(255*i)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}function A_(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function N_(e){return(parseFloat(e)%360+360)%360/360}function L_(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function D_(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function O_(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=T_.exec(e))?parseInt(t[1]+"ff",16)>>>0:a_&&void 0!==a_[e]?a_[e]:(t=w_.exec(e))?(A_(t[1])<<24|A_(t[2])<<16|A_(t[3])<<8|255)>>>0:(t=C_.exec(e))?(A_(t[1])<<24|A_(t[2])<<16|A_(t[3])<<8|L_(t[4]))>>>0:(t=j_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=M_.exec(e))?parseInt(t[1],16)>>>0:(t=E_.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=B_.exec(e))?(255|R_(N_(t[1]),D_(t[2]),D_(t[3])))>>>0:(t=I_.exec(e))?(R_(N_(t[1]),D_(t[2]),D_(t[3]))|L_(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var z_=(e,t,n)=>{if(Qv.fun(e))return e;if(Qv.arr(e))return z_({range:e,output:t,extrapolate:n});if(Qv.str(e.output[0]))return r_(e);let o=e,r=o.output,i=o.range||[0,1],s=o.extrapolateLeft||o.extrapolate||"extend",l=o.extrapolateRight||o.extrapolate||"extend",a=o.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,i);return function(e,t,n,o,r,i,s,l,a){let c=a?a(e):e;if(c<t){if("identity"===s)return c;"clamp"===s&&(c=t)}if(c>n){if("identity"===l)return c;"clamp"===l&&(c=n)}return o===r?o:t===n?e<=t?o:r:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=i(c),o===-1/0?c=-c:r===1/0?c+=o:c=c*(r-o)+o,c)}(e,i[t],i[t+1],r[t],r[t+1],a,s,l,o.map)}};var V_=1.70158,F_=1.525*V_,H_=V_+1,U_=2*Math.PI/3,G_=2*Math.PI/4.5,$_=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,W_={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>H_*e*e*e-V_*e*e,easeOutBack:e=>1+H_*Math.pow(e-1,3)+V_*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(F_+1)*e-F_)/2:(Math.pow(2*e-2,2)*((F_+1)*(2*e-2)+F_)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*U_),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*U_)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*G_)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*G_)/2+1,easeInBounce:e=>1-$_(1-e),easeOutBounce:$_,easeInOutBounce:e=>e<.5?(1-$_(1-2*e))/2:(1+$_(2*e-1))/2,steps:(e,t="end")=>n=>{let o=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(o):Math.ceil(o))/e)}},K_=Symbol.for("FluidValue.get"),Z_=Symbol.for("FluidValue.observers"),q_=e=>Boolean(e&&e[K_]),Y_=e=>e&&e[K_]?e[K_]():e,X_=e=>e[Z_]||null;function Q_(e,t){let n=e[Z_];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var J_=class{[K_];[Z_];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");ey(this,e)}},ey=(e,t)=>ry(e,K_,t);function ty(e,t){if(e[K_]){let n=e[Z_];n||ry(e,Z_,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function ny(e,t){let n=e[Z_];if(n&&n.has(t)){let o=n.size-1;o?n.delete(t):e[Z_]=null,e.observerRemoved&&e.observerRemoved(o,t)}}var oy,ry=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),iy=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,sy=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ly=new RegExp(`(${iy.source})(%|[a-z]+)`,"i"),ay=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cy=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,uy=e=>{let[t,n]=dy(e);if(!t||l_())return e;let o=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(o)return o.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&cy.test(n)?uy(n):n||e},dy=e=>{let t=cy.exec(e);if(!t)return[,];let[,n,o]=t;return[n,o]},py=(e,t,n,o,r)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(o)}, ${r})`,hy=e=>{oy||(oy=a_?new RegExp(`(${Object.keys(a_).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>Y_(e).replace(cy,uy).replace(sy,O_).replace(oy,O_))),n=t.map((e=>e.match(iy).map(Number))),o=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>z_({...e,output:t})));return e=>{let n=!ly.test(t[0])&&t.find((e=>ly.test(e)))?.replace(iy,""),r=0;return t[0].replace(iy,(()=>`${o[r++](e)}${n||""}`)).replace(ay,py)}},gy="react-spring: ",my=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${gy}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},fy=my(console.warn);my(console.warn);function by(e){return Qv.str(e)&&("#"==e[0]||/\d/.test(e)||!l_()&&cy.test(e)||e in(a_||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var ky=l_()?ic.useEffect:ic.useLayoutEffect;function vy(){let e=(0,ic.useState)()[1],t=(()=>{let e=(0,ic.useRef)(!1);return ky((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var _y=[];var yy=Symbol.for("Animated:node"),xy=e=>e&&e[yy],Sy=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,yy,t),wy=e=>e&&e[yy]&&e[yy].getPayload(),Cy=class{payload;constructor(){Sy(this,this)}getPayload(){return this.payload||[]}},By=class extends Cy{constructor(e){super(),this._value=e,Qv.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new By(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Qv.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Qv.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Iy=class extends By{_string=null;_toString;constructor(e){super(0),this._toString=z_({output:[e,e]})}static create(e){return new Iy(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Qv.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=z_({output:[this.getValue(),e]})),this._value=0,super.reset()}},jy={dependencies:null},Ey=class extends Cy{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return t_(this.source,((n,o)=>{(e=>!!e&&e[yy]===e)(n)?t[o]=n.getValue(e):q_(n)?t[o]=Y_(n):e||(t[o]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&e_(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return t_(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){jy.dependencies&&q_(e)&&jy.dependencies.add(e);let t=wy(e);t&&e_(t,(e=>this.add(e)))}},Ty=class extends Ey{constructor(e){super(e)}static create(e){return new Ty(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(My)),!0)}};function My(e){return(by(e)?Iy:By).create(e)}function Py(e){let t=xy(e);return t?t.constructor:Qv.arr(e)?Ty:by(e)?Iy:By}var Ry=(e,t)=>{let n=!Qv.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,ic.forwardRef)(((o,r)=>{let i=(0,ic.useRef)(null),s=n&&(0,ic.useCallback)((e=>{i.current=function(e,t){return e&&(Qv.fun(e)?e(t):e.current=t),t}(r,e)}),[r]),[l,a]=function(e,t){let n=new Set;return jy.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ey(e),jy.dependencies=null,[e,n]}(o,t),c=vy(),u=()=>{let e=i.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&c()},d=new Ay(u,a),p=(0,ic.useRef)();ky((()=>(p.current=d,e_(a,(e=>ty(e,d))),()=>{p.current&&(e_(p.current.deps,(e=>ny(e,p.current))),Pv.cancel(p.current.update))}))),(0,ic.useEffect)(u,[]),(e=>{(0,ic.useEffect)(e,_y)})((()=>()=>{let e=p.current;e_(e.deps,(t=>ny(t,e)))}));let h=t.getComponentProps(l.getValue());return ic.createElement(e,{...h,ref:s})}))},Ay=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&Pv.write(this.update)}};var Ny=Symbol.for("AnimatedComponent"),Ly=e=>Qv.str(e)?e:e&&Qv.str(e.displayName)?e.displayName:Qv.fun(e)&&e.name||null;function Dy(e,...t){return Qv.fun(e)?e(...t):e}var Oy=(e,t)=>!0===e||!!(t&&e&&(Qv.fun(e)?e(t):n_(e).includes(t))),zy=(e,t)=>Qv.obj(e)?t&&e[t]:e,Vy=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Fy=e=>e,Hy=(e,t=Fy)=>{let n=Uy;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let o={};for(let r of n){let n=t(e[r],r);Qv.und(n)||(o[r]=n)}return o},Uy=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Gy={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function $y(e){let t=function(e){let t={},n=0;if(t_(e,((e,o)=>{Gy[o]||(t[o]=e,n++)})),n)return t}(e);if(t){let n={to:t};return t_(e,((e,o)=>o in t||(n[o]=e))),n}return{...e}}function Wy(e){return e=Y_(e),Qv.arr(e)?e.map(Wy):by(e)?Yv.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Ky(e){return Qv.fun(e)||Qv.arr(e)&&Qv.obj(e[0])}var Zy={tension:170,friction:26,mass:1,damping:1,easing:W_.linear,clamp:!1},qy=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Zy)}};function Yy(e,t){if(Qv.und(t.decay)){let n=!Qv.und(t.tension)||!Qv.und(t.friction);(n||!Qv.und(t.frequency)||!Qv.und(t.damping)||!Qv.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Xy=[],Qy=class{changed=!1;values=Xy;toValues=null;fromValues=Xy;to;from;config=new qy;immediate=!1};function Jy(e,{key:t,props:n,defaultProps:o,state:r,actions:i}){return new Promise(((s,l)=>{let a,c,u=Oy(n.cancel??o?.cancel,t);if(u)h();else{Qv.und(n.pause)||(r.paused=Oy(n.pause,t));let e=o?.pause;!0!==e&&(e=r.paused||Oy(e,t)),a=Dy(n.delay||0,t),e?(r.resumeQueue.add(p),i.pause()):(i.resume(),p())}function d(){r.resumeQueue.add(p),r.timeouts.delete(c),c.cancel(),a=c.time-Pv.now()}function p(){a>0&&!Yv.skipAnimation?(r.delayed=!0,c=Pv.setTimeout(h,a),r.pauseQueue.add(d),r.timeouts.add(c)):h()}function h(){r.delayed&&(r.delayed=!1),r.pauseQueue.delete(d),r.timeouts.delete(c),e<=(r.cancelId||0)&&(u=!0);try{i.start({...n,callId:e,cancel:u},s)}catch(e){l(e)}}}))}var ex=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?ox(e.get()):t.every((e=>e.noop))?tx(e.get()):nx(e.get(),t.every((e=>e.finished))),tx=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nx=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),ox=e=>({value:e,cancelled:!0,finished:!1});function rx(e,t,n,o){let{callId:r,parentId:i,onRest:s}=t,{asyncTo:l,promise:a}=n;return i||e!==l||t.reset?n.promise=(async()=>{n.asyncId=r,n.asyncTo=e;let c,u,d,p=Hy(t,((e,t)=>"onRest"===t?void 0:e)),h=new Promise(((e,t)=>(c=e,u=t))),g=e=>{let t=r<=(n.cancelId||0)&&ox(o)||r!==n.asyncId&&nx(o,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let i=new sx,s=new lx;return(async()=>{if(Yv.skipAnimation)throw ix(n),s.result=nx(o,!1),u(s),s;g(i);let l=Qv.obj(e)?{...e}:{...t,to:e};l.parentId=r,t_(p,((e,t)=>{Qv.und(l[t])&&(l[t]=e)}));let a=await o.start(l);return g(i),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),a})()};if(Yv.skipAnimation)return ix(n),nx(o,!1);try{let t;t=Qv.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,o.stop.bind(o))),await Promise.all([t.then(c),h]),d=nx(o.get(),!0,!1)}catch(e){if(e instanceof sx)d=e.result;else{if(!(e instanceof lx))throw e;d=e.result}}finally{r==n.asyncId&&(n.asyncId=i,n.asyncTo=i?l:void 0,n.promise=i?a:void 0)}return Qv.fun(s)&&Pv.batchedUpdates((()=>{s(d,o,o.item)})),d})():a}function ix(e,t){o_(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var sx=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},lx=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ax=e=>e instanceof ux,cx=1,ux=class extends J_{id=cx++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=xy(this);return e&&e.getValue()}to(...e){return Yv.to(this,e)}interpolate(...e){return fy(`${gy}The "interpolate" function is deprecated in v9 (use "to" instead)`),Yv.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Q_(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||f_.sort(this),Q_(this,{type:"priority",parent:this,priority:e})}},dx=Symbol.for("SpringPhase"),px=e=>(1&e[dx])>0,hx=e=>(2&e[dx])>0,gx=e=>(4&e[dx])>0,mx=(e,t)=>t?e[dx]|=3:e[dx]&=-3,fx=(e,t)=>t?e[dx]|=4:e[dx]&=-5,bx=class extends ux{key;animation=new Qy;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Qv.und(e)||!Qv.und(t)){let n=Qv.obj(e)?{...e}:{...t,from:e};Qv.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(hx(this)||this._state.asyncTo)||gx(this)}get goal(){return Y_(this.animation.to)}get velocity(){let e=xy(this);return e instanceof By?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return px(this)}get isAnimating(){return hx(this)}get isPaused(){return gx(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,o=this.animation,{config:r,toValues:i}=o,s=wy(o.to);!s&&q_(o.to)&&(i=n_(Y_(o.to))),o.values.forEach(((l,a)=>{if(l.done)return;let c=l.constructor==Iy?1:s?s[a].lastPosition:i[a],u=o.immediate,d=c;if(!u){if(d=l.lastPosition,r.tension<=0)return void(l.done=!0);let t,n=l.elapsedTime+=e,i=o.fromValues[a],s=null!=l.v0?l.v0:l.v0=Qv.arr(r.velocity)?r.velocity[a]:r.velocity,p=r.precision||(i==c?.005:Math.min(1,.001*Math.abs(c-i)));if(Qv.und(r.duration))if(r.decay){let e=!0===r.decay?.998:r.decay,o=Math.exp(-(1-e)*n);d=i+s/(1-e)*(1-o),u=Math.abs(l.lastPosition-d)<=p,t=s*o}else{t=null==l.lastVelocity?s:l.lastVelocity;let n,o=r.restVelocity||p/10,a=r.clamp?0:r.bounce,h=!Qv.und(a),g=i==c?l.v0>0:i<c,m=!1,f=1,b=Math.ceil(e/f);for(let e=0;e<b&&(n=Math.abs(t)>o,n||(u=Math.abs(c-d)<=p,!u));++e){h&&(m=d==c||d>c==g,m&&(t=-t*a,d=c)),t+=(1e-6*-r.tension*(d-c)+.001*-r.friction*t)/r.mass*f,d+=t*f}}else{let o=1;r.duration>0&&(this._memoizedDuration!==r.duration&&(this._memoizedDuration=r.duration,l.durationProgress>0&&(l.elapsedTime=r.duration*l.durationProgress,n=l.elapsedTime+=e)),o=(r.progress||0)+n/this._memoizedDuration,o=o>1?1:o<0?0:o,l.durationProgress=o),d=i+r.easing(o)*(c-i),t=(d-l.lastPosition)/e,u=1==o}l.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[a].done&&(u=!1),u?l.done=!0:t=!1,l.setValue(d,r.round)&&(n=!0)}));let l=xy(this),a=l.getValue();if(t){let e=Y_(o.to);a===e&&!n||r.decay?n&&r.decay&&this._onChange(a):(l.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(a)}set(e){return Pv.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(hx(this)){let{to:e,config:t}=this.animation;Pv.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Qv.und(e)?(n=this.queue||[],this.queue=[]):n=[Qv.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>ex(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),ix(this._state,e&&this._lastCallId),Pv.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:o}=e;n=Qv.obj(n)?n[t]:n,(null==n||Ky(n))&&(n=void 0),o=Qv.obj(o)?o[t]:o,null==o&&(o=void 0);let r={to:n,from:o};return px(this)||(e.reverse&&([n,o]=[o,n]),o=Y_(o),Qv.und(o)?xy(this)||this._set(n):this._set(o)),r}_update({...e},t){let{key:n,defaultProps:o}=this;e.default&&Object.assign(o,Hy(e,((e,t)=>/^on/.test(t)?zy(e,n):e))),Sx(this,e,"onProps"),wx(this,"onProps",e,this);let r=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let i=this._state;return Jy(++this._lastCallId,{key:n,props:e,defaultProps:o,state:i,actions:{pause:()=>{gx(this)||(fx(this,!0),s_(i.pauseQueue),wx(this,"onPause",nx(this,kx(this,this.animation.to)),this))},resume:()=>{gx(this)&&(fx(this,!1),hx(this)&&this._resume(),s_(i.resumeQueue),wx(this,"onResume",nx(this,kx(this,this.animation.to)),this))},start:this._merge.bind(this,r)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=vx(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(ox(this));let o=!Qv.und(e.to),r=!Qv.und(e.from);if(o||r){if(!(t.callId>this._lastToId))return n(ox(this));this._lastToId=t.callId}let{key:i,defaultProps:s,animation:l}=this,{to:a,from:c}=l,{to:u=a,from:d=c}=e;r&&!o&&(!t.default||Qv.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let p=!Jv(d,c);p&&(l.from=d),d=Y_(d);let h=!Jv(u,a);h&&this._focus(u);let g=Ky(t.to),{config:m}=l,{decay:f,velocity:b}=m;(o||r)&&(m.velocity=0),t.config&&!g&&function(e,t,n){n&&(Yy(n={...n},t),t={...n,...t}),Yy(e,t),Object.assign(e,t);for(let t in Zy)null==e[t]&&(e[t]=Zy[t]);let{mass:o,frequency:r,damping:i}=e;Qv.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*o,e.friction=4*Math.PI*i*o/r)}(m,Dy(t.config,i),t.config!==s.config?Dy(s.config,i):void 0);let k=xy(this);if(!k||Qv.und(u))return n(nx(this,!0));let v=Qv.und(t.reset)?r&&!t.default:!Qv.und(d)&&Oy(t.reset,i),_=v?d:this.get(),y=Wy(u),x=Qv.num(y)||Qv.arr(y)||by(y),S=!g&&(!x||Oy(s.immediate||t.immediate,i));if(h){let e=Py(u);if(e!==k.constructor){if(!S)throw Error(`Cannot animate between ${k.constructor.name} and ${e.name}, as the "to" prop suggests`);k=this._set(y)}}let w=k.constructor,C=q_(u),B=!1;if(!C){let e=v||!px(this)&&p;(h||e)&&(B=Jv(Wy(_),y),C=!B),(!Jv(l.immediate,S)&&!S||!Jv(m.decay,f)||!Jv(m.velocity,b))&&(C=!0)}if(B&&hx(this)&&(l.changed&&!v?C=!0:C||this._stop(a)),!g&&((C||q_(a))&&(l.values=k.getPayload(),l.toValues=q_(u)?null:w==Iy?[1]:n_(y)),l.immediate!=S&&(l.immediate=S,!S&&!v&&this._set(a)),C)){let{onRest:e}=l;e_(xx,(e=>Sx(this,t,e)));let o=nx(this,kx(this,a));s_(this._pendingCalls,o),this._pendingCalls.add(n),l.changed&&Pv.batchedUpdates((()=>{l.changed=!v,e?.(o,this),v?Dy(s.onRest,o):l.onStart?.(o,this)}))}v&&this._set(_),g?n(rx(t.to,t,this._state,this)):C?this._start():hx(this)&&!h?this._pendingCalls.add(n):n(tx(_))}_focus(e){let t=this.animation;e!==t.to&&(X_(this)&&this._detach(),t.to=e,X_(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;q_(t)&&(ty(t,this),ax(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;q_(e)&&ny(e,this)}_set(e,t=!0){let n=Y_(e);if(!Qv.und(n)){let e=xy(this);if(!e||!Jv(n,e.getValue())){let o=Py(n);e&&e.constructor==o?e.setValue(n):Sy(this,o.create(n)),e&&Pv.batchedUpdates((()=>{this._onChange(n,t)}))}}return xy(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,wx(this,"onStart",nx(this,kx(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Dy(this.animation.onChange,e,this)),Dy(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;xy(this).reset(Y_(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),hx(this)||(mx(this,!0),gx(this)||this._resume())}_resume(){Yv.skipAnimation?this.finish():f_.start(this)}_stop(e,t){if(hx(this)){mx(this,!1);let n=this.animation;e_(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Q_(this,{type:"idle",parent:this});let o=t?ox(this.get()):nx(this.get(),kx(this,e??n.to));s_(this._pendingCalls,o),n.changed&&(n.changed=!1,wx(this,"onRest",o,this))}}};function kx(e,t){let n=Wy(t);return Jv(Wy(e.get()),n)}function vx(e,t=e.loop,n=e.to){let o=Dy(t);if(o){let r=!0!==o&&$y(o),i=(r||e).reverse,s=!r||r.reset;return _x({...e,loop:t,default:!1,pause:void 0,to:!i||Ky(n)?n:void 0,from:s?e.from:void 0,reset:s,...r})}}function _x(e){let{to:t,from:n}=e=$y(e),o=new Set;return Qv.obj(t)&&yx(t,o),Qv.obj(n)&&yx(n,o),e.keys=o.size?Array.from(o):null,e}function yx(e,t){t_(e,((e,n)=>null!=e&&t.add(n)))}var xx=["onStart","onRest","onChange","onPause","onResume"];function Sx(e,t,n){e.animation[n]=t[n]!==Vy(t,n)?zy(t[n],e.key):void 0}function wx(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Cx=["onStart","onChange","onRest"],Bx=1,Ix=class{id=Bx++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Qv.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(_x(e)),this}start(e){let{queue:t}=this;return e?t=n_(e).map(_x):this.queue=[],this._flush?this._flush(this,t):(Px(this,t),jx(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;e_(n_(t),(t=>n[t].stop(!!e)))}else ix(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Qv.und(e))this.start({pause:!0});else{let t=this.springs;e_(n_(e),(e=>t[e].pause()))}return this}resume(e){if(Qv.und(e))this.start({pause:!1});else{let t=this.springs;e_(n_(e),(e=>t[e].resume()))}return this}each(e){t_(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,o=this._active.size>0,r=this._changed.size>0;(o&&!this._started||r&&!this._started)&&(this._started=!0,o_(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let i=!o&&this._started,s=r||i&&n.size?this.get():null;r&&t.size&&o_(t,(([e,t])=>{t.value=s,e(t,this,this._item)})),i&&(this._started=!1,o_(n,(([e,t])=>{t.value=s,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}Pv.onFrame(this._onFrame)}};function jx(e,t){return Promise.all(t.map((t=>Ex(e,t)))).then((t=>ex(e,t)))}async function Ex(e,t,n){let{keys:o,to:r,from:i,loop:s,onRest:l,onResolve:a}=t,c=Qv.obj(t.default)&&t.default;s&&(t.loop=!1),!1===r&&(t.to=null),!1===i&&(t.from=null);let u=Qv.arr(r)||Qv.fun(r)?r:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):e_(Cx,(n=>{let o=t[n];if(Qv.fun(o)){let r=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=r.get(o);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):r.set(o,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,s_(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let p=(o||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),h=!0===t.cancel||!0===Vy(t,"cancel");(u||h&&d.asyncId)&&p.push(Jy(++e._lastAsyncId,{props:t,state:d,actions:{pause:Xv,resume:Xv,start(t,n){h?(ix(d,e._lastAsyncId),n(ox(e))):(t.onRest=l,n(rx(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let g=ex(e,await Promise.all(p));if(s&&g.finished&&(!n||!g.noop)){let n=vx(t,s,r);if(n)return Px(e,[n]),Ex(e,n,!0)}return a&&Pv.batchedUpdates((()=>a(g,e,e.item))),g}function Tx(e,t){let n=new bx;return n.key=e,t&&ty(n,t),n}function Mx(e,t,n){t.keys&&e_(t.keys,(o=>{(e[o]||(e[o]=n(o)))._prepareNode(t)}))}function Px(e,t){e_(t,(t=>{Mx(e.springs,t,(t=>Tx(t,e)))}))}var Rx=({children:e,...t})=>{let n=(0,ic.useContext)(Ax),o=t.pause||!!n.pause,r=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,ic.useState)((()=>({inputs:t,result:e()}))),o=(0,ic.useRef)(),r=o.current,i=r;return i?Boolean(t&&i.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,i.inputs))||(i={inputs:t,result:e()}):i=n,(0,ic.useEffect)((()=>{o.current=i,r==n&&(n.inputs=n.result=void 0)}),[i]),i.result}((()=>({pause:o,immediate:r})),[o,r]);let{Provider:i}=Ax;return ic.createElement(i,{value:t},e)},Ax=function(e,t){return Object.assign(e,ic.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Rx,{});Rx.Provider=Ax.Provider,Rx.Consumer=Ax.Consumer;var Nx=class extends ux{constructor(e,t){super(),this.source=e,this.calc=z_(...t);let n=this._get(),o=Py(n);Sy(this,o.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Jv(t,this.get())||(xy(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Dx(this._active)&&Ox(this)}_get(){let e=Qv.arr(this.source)?this.source.map(Y_):n_(Y_(this.source));return this.calc(...e)}_start(){this.idle&&!Dx(this._active)&&(this.idle=!1,e_(wy(this),(e=>{e.done=!1})),Yv.skipAnimation?(Pv.batchedUpdates((()=>this.advance())),Ox(this)):f_.start(this))}_attach(){let e=1;e_(n_(this.source),(t=>{q_(t)&&ty(t,this),ax(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){e_(n_(this.source),(e=>{q_(e)&&ny(e,this)})),this._active.clear(),Ox(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=n_(this.source).reduce(((e,t)=>Math.max(e,(ax(t)?t.priority:0)+1)),0))}};function Lx(e){return!1!==e.idle}function Dx(e){return!e.size||Array.from(e).every(Lx)}function Ox(e){e.idle||(e.idle=!0,e_(wy(e),(e=>{e.done=!0})),Q_(e,{type:"idle",parent:e}))}Yv.assign({createStringInterpolator:hy,to:(e,t)=>new Nx(e,t)});f_.advance;const zx=window.ReactDOM;var Vx=/^--/;function Fx(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Vx.test(e)||Ux.hasOwnProperty(e)&&Ux[e]?(""+t).trim():t+"px"}var Hx={};var Ux={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Gx=["Webkit","Ms","Moz","O"];Ux=Object.keys(Ux).reduce(((e,t)=>(Gx.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Ux);var $x=/^(matrix|translate|scale|rotate|skew)/,Wx=/^(translate)/,Kx=/^(rotate|skew)/,Zx=(e,t)=>Qv.num(e)&&0!==e?e+t:e,qx=(e,t)=>Qv.arr(e)?e.every((e=>qx(e,t))):Qv.num(e)?e===t:parseFloat(e)===t,Yx=class extends Ey{constructor({x:e,y:t,z:n,...o}){let r=[],i=[];(e||t||n)&&(r.push([e||0,t||0,n||0]),i.push((e=>[`translate3d(${e.map((e=>Zx(e,"px"))).join(",")})`,qx(e,0)]))),t_(o,((e,t)=>{if("transform"===t)r.push([e||""]),i.push((e=>[e,""===e]));else if($x.test(t)){if(delete o[t],Qv.und(e))return;let n=Wx.test(t)?"px":Kx.test(t)?"deg":"";r.push(n_(e)),i.push("rotate3d"===t?([e,t,o,r])=>[`rotate3d(${e},${t},${o},${Zx(r,n)})`,qx(r,0)]:e=>[`${t}(${e.map((e=>Zx(e,n))).join(",")})`,qx(e,t.startsWith("scale")?1:0)])}})),r.length&&(o.transform=new Xx(r,i)),super(o)}},Xx=class extends J_{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return e_(this.inputs,((n,o)=>{let r=Y_(n[0]),[i,s]=this.transforms[o](Qv.arr(r)?r:n.map(Y_));e+=" "+i,t=t&&s})),t?"none":e}observerAdded(e){1==e&&e_(this.inputs,(e=>e_(e,(e=>q_(e)&&ty(e,this)))))}observerRemoved(e){0==e&&e_(this.inputs,(e=>e_(e,(e=>q_(e)&&ny(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Q_(this,e)}};Yv.assign({batchedUpdates:zx.unstable_batchedUpdates,createStringInterpolator:hy,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Qx=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ey(e),getComponentProps:o=e=>e}={})=>{let r={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:o},i=e=>{let t=Ly(e)||"Anonymous";return(e=Qv.str(e)?i[e]||(i[e]=Ry(e,r)):e[Ny]||(e[Ny]=Ry(e,r))).displayName=`Animated(${t})`,e};return t_(e,((t,n)=>{Qv.arr(e)&&(n=Ly(t)),i[n]=i(t)})),{animated:i}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:o,children:r,scrollTop:i,scrollLeft:s,viewBox:l,...a}=t,c=Object.values(a),u=Object.keys(a).map((t=>n||e.hasAttribute(t)?t:Hx[t]||(Hx[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==r&&(e.textContent=r);for(let t in o)if(o.hasOwnProperty(t)){let n=Fx(t,o[t]);Vx.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==i&&(e.scrollTop=i),void 0!==s&&(e.scrollLeft=s),void 0!==l&&e.setAttribute("viewBox",l)},createAnimatedStyle:e=>new Yx(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Jx=Qx.animated;function eS(e){return{top:e.offsetTop,left:e.offsetLeft}}var tS=function({triggerAnimationOnChange:e,clientId:t}){const n=(0,h.useRef)(),{isTyping:o,getGlobalBlockCount:r,isBlockSelected:i,isFirstMultiSelectedBlock:s,isBlockMultiSelected:l,isAncestorMultiSelected:a,isDraggingBlocks:c}=(0,g.useSelect)(ji),{previous:u,prevRect:d}=(0,h.useMemo)((()=>({previous:n.current&&eS(n.current),prevRect:n.current&&n.current.getBoundingClientRect()})),[e]);return(0,h.useLayoutEffect)((()=>{if(!u||!n.current)return;const e=(0,Ga.getScrollContainer)(n.current),p=i(t),h=p||s(t),g=c();function m(){if(!g&&h&&d){const t=n.current.getBoundingClientRect().top-d.top;t&&(e.scrollTop+=t)}}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches||o()||r()>200)return void m();const f=p||l(t)||a(t);if(f&&g)return;const b=f?"1":"",k=new Ix({x:0,y:0,config:{mass:5,tension:2e3,friction:200},onChange({value:e}){if(!n.current)return;let{x:t,y:o}=e;t=Math.round(t),o=Math.round(o);const r=0===t&&0===o;n.current.style.transformOrigin="center center",n.current.style.transform=r?null:`translate3d(${t}px,${o}px,0)`,n.current.style.zIndex=b,m()}});n.current.style.transform=void 0;const v=eS(n.current),_=Math.round(u.left-v.left),y=Math.round(u.top-v.top);return k.start({x:0,y:0,from:{x:_,y}}),()=>{k.stop(),k.set({x:0,y:0})}}),[u,d,t,o,r,i,s,l,a,c]),n};function nS({clientId:e,initialPosition:t}){const n=(0,h.useRef)(),{isBlockSelected:o,isMultiSelecting:r,isZoomOut:i}=G((0,g.useSelect)(ji));return(0,h.useEffect)((()=>{if(!o(e)||r()||i())return;if(null==t)return;if(!n.current)return;const{ownerDocument:s}=n.current;if(Wm(n.current,s.activeElement))return;const l=Ga.focus.tabbable.find(n.current).filter((e=>(0,Ga.isTextField)(e))),a=-1===t,c=l[a?l.length-1:0]||n.current;if(Wm(n.current,c)){if(!n.current.getAttribute("contenteditable")){const e=Ga.focus.tabbable.findNext(n.current);if(e&&Wm(n.current,e)&&(0,Ga.isFormElement)(e))return void e.focus()}(0,Ga.placeCaretAtHorizontalEdge)(c,a)}else n.current.focus()}),[t,e]),n}function oS(e){e.defaultPrevented||(e.preventDefault(),e.currentTarget.classList.toggle("is-hovered","mouseover"===e.type))}function rS(e){const{isBlockSelected:t}=(0,g.useSelect)(ji),{selectBlock:n,selectionChange:o}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((r=>{function i(i){r.parentElement.closest('[contenteditable="true"]')||(t(e)?i.target.isContentEditable||o(e):Wm(r,i.target)&&n(e))}return r.addEventListener("focusin",i),()=>{r.removeEventListener("focusin",i)}}),[t,n])}function iS(e){return!e||"transparent"===e||"rgba(0, 0, 0, 0)"===e}function sS({clientId:e,isSelected:t}){const{getBlockRootClientId:n,isZoomOut:o,hasMultiSelection:r}=G((0,g.useSelect)(ji)),{insertAfterBlock:i,removeBlock:s,resetZoomLevel:l,startDraggingBlocks:a,stopDraggingBlocks:c}=G((0,g.useDispatch)(ji));return(0,m.useRefEffect)((u=>{if(t)return u.addEventListener("keydown",d),u.addEventListener("dragstart",p),()=>{u.removeEventListener("keydown",d),u.removeEventListener("dragstart",p)};function d(t){const{keyCode:n,target:r}=t;n!==Wa.ENTER&&n!==Wa.BACKSPACE&&n!==Wa.DELETE||r!==u||(0,Ga.isTextField)(r)||(t.preventDefault(),n===Wa.ENTER&&o()?l():n===Wa.ENTER?i(e):s(e))}function p(t){if(u!==t.target||u.isContentEditable||u.ownerDocument.activeElement!==u||r())return void t.preventDefault();const o=JSON.stringify({type:"block",srcClientIds:[e],srcRootClientId:n(e)});t.dataTransfer.effectAllowed="move",t.dataTransfer.clearData(),t.dataTransfer.setData("wp-blocks",o);const{ownerDocument:i}=u,{defaultView:s}=i;s.getSelection().removeAllRanges();const l=i.createElement("div");l.style.width="1px",l.style.height="1px",l.style.position="fixed",l.style.visibility="hidden",i.body.appendChild(l),t.dataTransfer.setDragImage(l,0,0);const d=u.getBoundingClientRect(),p=u.cloneNode(!0);p.style.visibility="hidden",p.style.display="none";const h=u.id;u.id=null;let g=1;{let e=u;for(;e=e.parentElement;){const{scale:t}=s.getComputedStyle(e);if(t&&"none"!==t){g=parseFloat(t);break}}}const m=1/g;u.after(p);const f={};for(const e of["transform","transformOrigin","transition","zIndex","position","top","left","pointerEvents","opacity","backgroundColor"])f[e]=u.style[e];const b=s.scrollY,k=s.scrollX,v=t.clientX,_=t.clientY;u.style.position="relative",u.style.top="0px",u.style.left="0px";const y=t.clientX-d.left,x=t.clientY-d.top,S=d.height>200?200/d.height:1;if(u.style.zIndex="1000",u.style.transformOrigin=`${y*m}px ${x*m}px`,u.style.transition="transform 0.2s ease-out",u.style.transform=`scale(${S})`,u.style.opacity="0.9",iS(s.getComputedStyle(u).backgroundColor)){let e="transparent",t=u;for(;t=t.parentElement;){const{backgroundColor:n}=s.getComputedStyle(t);if(!iS(n)){e=n;break}}u.style.backgroundColor=e}let w=!1;function C(e){w||(w=!0,u.style.pointerEvents="none");const t=s.scrollY,n=s.scrollX;u.style.top=(e.clientY-_+t-b)*m+"px",u.style.left=(e.clientX-v+n-k)*m+"px"}function B(){i.removeEventListener("dragover",C),i.removeEventListener("dragend",B),i.removeEventListener("drop",B),i.removeEventListener("scroll",C);for(const[e,t]of Object.entries(f))u.style[e]=t;p.remove(),u.id=h,l.remove(),c(),document.body.classList.remove("is-dragging-components-draggable"),i.documentElement.classList.remove("is-dragging")}i.addEventListener("dragover",C),i.addEventListener("dragend",B),i.addEventListener("drop",B),i.addEventListener("scroll",C),a([e]),document.body.classList.add("is-dragging-components-draggable"),i.documentElement.classList.add("is-dragging")}}),[e,t,n,i,s,o,l,r,a,c])}function lS(){const e=(0,h.useContext)(sw);return(0,m.useRefEffect)((t=>{if(e)return e.observe(t),()=>{e.unobserve(t)}}),[e])}function aS({isSelected:e}){const t=(0,m.useReducedMotion)();return(0,m.useRefEffect)((n=>{if(e){const{ownerDocument:e}=n,{defaultView:o}=e;if(!o.IntersectionObserver)return;const r=new o.IntersectionObserver((e=>{e[0].isIntersecting||n.scrollIntoView({behavior:t?"instant":"smooth"}),r.disconnect()}));return r.observe(n),()=>{r.disconnect()}}}),[e])}function cS({clientId:e="",isEnabled:t=!0}={}){const{getEnabledClientIdsTree:n}=G((0,g.useSelect)(ji));return(0,m.useRefEffect)((o=>{if(!t)return;const r=t=>{(t.target===o||t.target.classList.contains("is-root-container"))&&(t.defaultPrevented||(t.preventDefault(),n(e).forEach((({clientId:e})=>{const t=o.querySelector(`[data-block="${e}"]`);t&&(t.classList.remove("has-editable-outline"),t.offsetWidth,t.classList.add("has-editable-outline"))}))))};return o.addEventListener("click",r),()=>o.removeEventListener("click",r)}),[t])}const uS=new Map;function dS(e){const t=e.getAttribute("data-draggable");t&&(e.removeAttribute("data-draggable"),"true"!==t||e.getAttribute("draggable")||e.setAttribute("draggable","true"))}function pS(e){const{target:t}=e,{ownerDocument:n,isContentEditable:o,tagName:r}=t,i=["INPUT","TEXTAREA"].includes(r),s=uS.get(n);if(o||i)for(const e of s)"true"===e.getAttribute("draggable")&&e.contains(t)&&(e.removeAttribute("draggable"),e.setAttribute("data-draggable","true"));else for(const e of s)dS(e)}function hS(){return(0,m.useRefEffect)((e=>(function(e,t){let n=uS.get(e);n||(n=new Set,uS.set(e,n),e.addEventListener("pointerdown",pS)),n.add(t)}(e.ownerDocument,e),()=>{!function(e,t){const n=uS.get(e);n&&(n.delete(t),dS(t),0===n.size&&(uS.delete(e),e.removeEventListener("pointerdown",pS)))}(e.ownerDocument,e)})),[])}function gS(e={},{__unstableIsHtml:t}={}){const{clientId:n,className:o,wrapperProps:r={},isAligned:i,index:s,mode:l,name:a,blockApiVersion:c,blockTitle:u,isSelected:d,isSubtreeDisabled:p,hasOverlay:g,initialPosition:f,blockEditingMode:b,isHighlighted:k,isMultiSelected:v,isPartiallySelected:y,isReusable:x,isDragging:S,hasChildSelected:w,isEditingDisabled:B,hasEditableOutline:I,isTemporarilyEditingAsBlocks:j,defaultClassName:E,isSectionBlock:M,canMove:P,isBlockHidden:R}=(0,h.useContext)(pv),A=(0,T.sprintf)((0,T.__)("Block: %s"),u),N="html"!==l||t?"":"-visual",L=hS(),D=(0,m.useMergeRefs)([e.ref,nS({clientId:n,initialPosition:f}),gh(n),rS(n),sS({clientId:n,isSelected:d}),(0,m.useRefEffect)((e=>(e.addEventListener("mouseout",oS),e.addEventListener("mouseover",oS),()=>{e.removeEventListener("mouseout",oS),e.removeEventListener("mouseover",oS),e.classList.remove("is-hovered")})),[]),lS(),tS({triggerAnimationOnChange:s,clientId:n}),(0,m.useDisabled)({isDisabled:!g}),cS({clientId:n,isEnabled:M}),aS({isSelected:d}),P?L:void 0]),O=C(),z=!!O[_]?{"--wp-admin-theme-color":"var(--wp-block-synced-color)","--wp-admin-theme-color--rgb":"var(--wp-block-synced-color--rgb)"}:{};c<2&&n===O.clientId&&js()(`Block type "${a}" must support API version 2 or higher to work correctly with "useBlockProps" method.`);let V=!1;return"-"!==r?.style?.marginTop?.charAt(0)&&"-"!==r?.style?.marginBottom?.charAt(0)&&"-"!==r?.style?.marginLeft?.charAt(0)&&"-"!==r?.style?.marginRight?.charAt(0)||(V=!0),{tabIndex:"disabled"===b?-1:0,draggable:!(!P||w)||void 0,...r,...e,ref:D,id:`block-${n}${N}`,role:"document","aria-label":A,"data-block":n,"data-type":a,"data-title":u,inert:p?"true":void 0,className:ms("block-editor-block-list__block",{"wp-block":!i,"has-block-overlay":g,"is-selected":d,"is-highlighted":k,"is-multi-selected":v,"is-partially-selected":y,"is-reusable":x,"is-dragging":S,"has-child-selected":w,"is-editing-disabled":B,"has-editable-outline":I,"has-negative-margin":V,"is-content-locked-temporarily-editing-as-blocks":j,"is-block-hidden":R},o,e.className,r.className,E),style:{...r.style,...e.style,...z}}}function mS({children:e,isHtml:t,...n}){return(0,d.jsx)("div",{...gS(n,{__unstableIsHtml:t}),children:e})}function fS({block:{__unstableBlockSource:e},mode:t,isLocked:n,canRemove:o,clientId:r,isSelected:i,isSelectionEnabled:s,className:l,__unstableLayoutClassNames:a,name:c,isValid:u,attributes:g,wrapperProps:m,setAttributes:f,onReplace:b,onRemove:k,onInsertBlocksAfter:v,onMerge:_,toggleSelection:y}){const{mayDisplayControls:x,mayDisplayParentControls:S,themeSupportsLayout:w,...C}=(0,h.useContext)(pv),B=ta()||{};let I=(0,d.jsx)(vv,{name:c,isSelected:i,attributes:g,setAttributes:f,insertBlocksAfter:n?void 0:v,onReplace:o?b:void 0,onRemove:o?k:void 0,mergeBlocks:o?_:void 0,clientId:r,isSelectionEnabled:s,toggleSelection:y,__unstableLayoutClassNames:a,__unstableParentLayout:Object.keys(B).length?B:void 0,mayDisplayControls:x,mayDisplayParentControls:S,blockEditingMode:C.blockEditingMode,isPreviewMode:C.isPreviewMode});const j=(0,p.getBlockType)(c);j?.getEditWrapperProps&&(m=function(e,t){const n={...e,...t};return e?.hasOwnProperty("className")&&t?.hasOwnProperty("className")&&(n.className=ms(e.className,t.className)),e?.hasOwnProperty("style")&&t?.hasOwnProperty("style")&&(n.style={...e.style,...t.style}),n}(m,j.getEditWrapperProps(g)));const E=m&&!!m["data-align"]&&!w,T=l?.includes("is-position-sticky");let M;if(E&&(I=(0,d.jsx)("div",{className:ms("wp-block",T&&l),"data-align":m["data-align"],children:I})),u)M="html"===t?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{display:"none"},children:I}),(0,d.jsx)(mS,{isHtml:!0,children:(0,d.jsx)(Tv,{clientId:r})})]}):j?.apiVersion>1?I:(0,d.jsx)(mS,{children:I});else{const t=e?(0,p.serializeRawBlock)(e):(0,p.getSaveContent)(j,g);M=(0,d.jsxs)(mS,{className:"has-warning",children:[(0,d.jsx)(wv,{clientId:r}),(0,d.jsx)(h.RawHTML,{children:(0,Ga.safeHTML)(t)})]})}const{"data-align":P,...R}=m??{},A={...R,className:ms(R.className,P&&w&&`align${P}`,!(P&&T)&&l)};return(0,d.jsx)(pv.Provider,{value:{wrapperProps:A,isAligned:E,...C},children:(0,d.jsx)(jv,{fallback:(0,d.jsx)(mS,{className:"has-warning",children:(0,d.jsx)(Bv,{})}),children:M})})}gS.save=p.__unstableGetBlockProps;const bS=(0,g.withDispatch)(((e,t,n)=>{const{updateBlockAttributes:o,insertBlocks:r,mergeBlocks:i,replaceBlocks:s,toggleSelection:l,__unstableMarkLastChangeAsPersistent:a,moveBlocksToPosition:c,removeBlock:u,selectBlock:d}=e(ji);return{setAttributes(e){const{getMultiSelectedBlockClientIds:r}=n.select(ji),i=r(),{clientId:s,attributes:l}=t,a=i.length?i:[s],c="function"==typeof e?e(l):e;o(a,c)},onInsertBlocks(e,n){const{rootClientId:o}=t;r(e,n,o)},onInsertBlocksAfter(e){const{clientId:o,rootClientId:i}=t,{getBlockIndex:s}=n.select(ji),l=s(o);r(e,l+1,i)},onMerge(e){const{clientId:o,rootClientId:l}=t,{getPreviousBlockClientId:a,getNextBlockClientId:h,getBlock:g,getBlockAttributes:m,getBlockName:f,getBlockOrder:b,getBlockIndex:k,getBlockRootClientId:v,canInsertBlockType:_}=n.select(ji);function y(){const e=g(o),t=(0,p.getDefaultBlockName)(),r=(0,p.getBlockType)(t);if(f(o)!==t){const n=(0,p.switchToBlockType)(e,t);n&&n.length&&s(o,n)}else if((0,p.isUnmodifiedDefaultBlock)(e)){const e=h(o);e&&n.batch((()=>{u(o),d(e)}))}else if(r.merge){const n=r.merge({},e.attributes);s([o],[(0,p.createBlock)(t,n)])}}function x(e,t=!0){const o=f(e),i="text"===(0,p.getBlockType)(o).category,s=v(e),l=b(e),[a]=l;1===l.length&&(0,p.isUnmodifiedBlock)(g(a))?u(e):i?n.batch((()=>{if(_(f(a),s))c([a],e,s,k(e));else{const n=(0,p.switchToBlockType)(g(a),(0,p.getDefaultBlockName)());n&&n.length&&n.every((e=>_(e.name,s)))?(r(n,k(e),s,t),u(a,!1)):y()}!b(e).length&&(0,p.isUnmodifiedBlock)(g(e))&&u(e,!1)})):y()}if(e){if(l){const e=h(l);if(e){if(f(l)!==f(e))return void i(l,e);{const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(e),e,l),u(e,!1)}))}}}const e=h(o);if(!e)return;b(e).length?x(e,!1):i(o,e)}else{const e=a(o);if(e)i(e,o);else if(l){const e=a(l);if(e&&f(l)===f(e)){const t=m(l),o=m(e);if(Object.keys(t).every((e=>t[e]===o[e])))return void n.batch((()=>{c(b(l),l,e),u(l,!1)}))}x(l)}else y()}},onReplace(e,n,o){e.length&&!(0,p.isUnmodifiedDefaultBlock)(e[e.length-1])&&a();const r=1===e?.length&&Array.isArray(e[0])?e[0]:e;s([t.clientId],r,n,o)},onRemove(){u(t.clientId)},toggleSelection(e){l(e)}}}));fS=(0,m.compose)(bS,(0,ws.withFilters)("editor.BlockListBlock"))(fS);var kS=(0,h.memo)((function(e){const{clientId:t,rootClientId:n}=e,o=(0,g.useSelect)((e=>{const{isBlockSelected:o,getBlockMode:r,isSelectionEnabled:i,getTemplateLock:s,isSectionBlock:l,getBlockWithoutAttributes:a,getBlockAttributes:c,canRemoveBlock:u,canMoveBlock:d,getSettings:h,getTemporarilyEditingAsBlocks:g,getBlockEditingMode:m,getBlockName:f,isFirstMultiSelectedBlock:b,getMultiSelectedBlockClientIds:k,hasSelectedInnerBlock:v,getBlocksByName:_,getBlockIndex:y,isBlockMultiSelected:x,isBlockSubtreeDisabled:S,isBlockHighlighted:w,__unstableIsFullySelected:C,__unstableSelectionHasUnmergeableBlock:B,isBlockBeingDragged:I,isDragging:j,__unstableHasActiveBlockOverlayActive:E,getSelectedBlocksInitialCaretPosition:T}=G(e(ji)),M=a(t);if(!M)return;const{hasBlockSupport:P,getActiveBlockVariation:R}=e(p.store),A=c(t),{name:N,isValid:L}=M,D=(0,p.getBlockType)(N),{supportsLayout:O,isPreviewMode:z,__experimentalBlockBindingsSupportedAttributes:V}=h(),F=V?.[N],H=D?.apiVersion>1,U={isPreviewMode:z,blockWithoutAttributes:M,name:N,attributes:A,isValid:L,themeSupportsLayout:O,index:y(t),isReusable:(0,p.isReusableBlock)(D),className:H?A.className:void 0,defaultClassName:H?(0,p.getBlockDefaultClassName)(N):void 0,blockTitle:D?.title,isBlockHidden:!1===A?.metadata?.blockVisibility,bindableAttributes:F};if(z)return U;const{isBlockHidden:$}=G(e(ji)),W=o(t),K=u(t),Z=d(t),q=R(N,A),Y=x(t),X=v(t,!0),Q=m(t),J=(0,p.hasBlockSupport)(N,"multiple",!0)?[]:_(N),ee=J.length&&J[0]!==t;return{...U,mode:r(t),isSelectionEnabled:i(),isLocked:!!s(n),isSectionBlock:l(t),canRemove:K,canMove:Z,isSelected:W,isTemporarilyEditingAsBlocks:g()===t,blockEditingMode:Q,mayDisplayControls:W||b(t)&&k().every((e=>f(e)===N)),mayDisplayParentControls:P(f(t),"__experimentalExposeControlsToChildren",!1)&&v(t),blockApiVersion:D?.apiVersion||1,blockTitle:q?.title||D?.title,isSubtreeDisabled:"disabled"===Q&&S(t),hasOverlay:E(t)&&!j(),initialPosition:W?T():void 0,isHighlighted:w(t),isMultiSelected:Y,isPartiallySelected:Y&&!C()&&!B(),isDragging:I(t),hasChildSelected:X,isEditingDisabled:"disabled"===Q,hasEditableOutline:"disabled"!==Q&&"disabled"===m(n),originalBlockClientId:!!ee&&J[0],isBlockHidden:$(t)}}),[t,n]),{isPreviewMode:r,mode:i="visual",isSelectionEnabled:s=!1,isLocked:l=!1,canRemove:a=!1,canMove:c=!1,blockWithoutAttributes:u,name:m,attributes:f,isValid:b,isSelected:k=!1,themeSupportsLayout:v,isTemporarilyEditingAsBlocks:_,blockEditingMode:y,mayDisplayControls:x,mayDisplayParentControls:S,index:w,blockApiVersion:C,blockTitle:B,isSubtreeDisabled:I,hasOverlay:j,initialPosition:E,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:A,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:D,hasEditableOutline:O,className:z,defaultClassName:V,originalBlockClientId:F,isBlockHidden:H,bindableAttributes:U}=o,$=(0,h.useMemo)((()=>({...u,attributes:f})),[u,f]);if(!o)return null;const W={isPreviewMode:r,clientId:t,className:z,index:w,mode:i,name:m,blockApiVersion:C,blockTitle:B,isSelected:k,isSubtreeDisabled:I,hasOverlay:j,initialPosition:E,blockEditingMode:y,isHighlighted:T,isMultiSelected:M,isPartiallySelected:P,isReusable:R,isDragging:A,hasChildSelected:N,isSectionBlock:L,isEditingDisabled:D,hasEditableOutline:O,isTemporarilyEditingAsBlocks:_,defaultClassName:V,mayDisplayControls:x,mayDisplayParentControls:S,originalBlockClientId:F,themeSupportsLayout:v,canMove:c,isBlockHidden:H,bindableAttributes:U};return!H||k||M||N?(0,d.jsx)(pv.Provider,{value:W,children:(0,d.jsx)(fS,{...e,mode:i,isSelectionEnabled:s,isLocked:l,canRemove:a,canMove:c,block:$,name:m,attributes:f,isValid:b,isSelected:k})}):null}));const vS=window.wp.htmlEntities,_S="\ufeff";function yS({rootClientId:e}){const{showPrompt:t,isLocked:n,placeholder:o,isManualGrid:r}=(0,g.useSelect)((t=>{const{getBlockCount:n,getSettings:o,getTemplateLock:r,getBlockAttributes:i}=t(ji),s=!n(e),{bodyPlaceholder:l}=o();return{showPrompt:s,isLocked:!!r(e),placeholder:l,isManualGrid:i(e)?.layout?.isManualPlacement}}),[e]),{insertDefaultBlock:i,startTyping:s}=(0,g.useDispatch)(ji);if(n||r)return null;const l=(0,vS.decodeEntities)(o)||(0,T.__)("Type / to choose a block"),a=()=>{i(void 0,e),s()};return(0,d.jsxs)("div",{"data-root-client-id":e||"",className:ms("block-editor-default-block-appender",{"has-visible-prompt":t}),children:[(0,d.jsx)("p",{tabIndex:"0",role:"button","aria-label":(0,T.__)("Add default block"),className:"block-editor-default-block-appender__content",onKeyDown:e=>{Wa.ENTER!==e.keyCode&&Wa.SPACE!==e.keyCode||a()},onClick:()=>a(),onFocus:()=>{t&&a()},children:t?l:_S}),(0,d.jsx)(lI,{rootClientId:e,position:"bottom right",isAppender:!0,__experimentalIsQuick:!0})]})}function xS({rootClientId:e}){return(0,g.useSelect)((t=>t(ji).canInsertBlockType((0,p.getDefaultBlockName)(),e)))?(0,d.jsx)(yS,{rootClientId:e}):(0,d.jsx)(uI,{rootClientId:e,className:"block-list-appender__toggle"})}function SS({rootClientId:e,CustomAppender:t,className:n,tagName:o="div"}){const r=(0,g.useSelect)((t=>{const{getBlockInsertionPoint:n,isBlockInsertionPointVisible:o,getBlockCount:r}=t(ji),i=n();return o()&&e===i?.rootClientId&&0===r(e)}),[e]);return(0,d.jsx)(o,{tabIndex:-1,className:ms("block-list-appender wp-block",n,{"is-drag-over":r}),contentEditable:!1,"data-block":!0,children:t?(0,d.jsx)(t,{}):(0,d.jsx)(xS,{rootClientId:e})})}const wS=Number.MAX_SAFE_INTEGER;var CS=function({previousClientId:e,nextClientId:t,children:n,__unstablePopoverSlot:o,__unstableContentRef:r,operation:i="insert",nearestSide:s="right",...l}){const[a,c]=(0,h.useReducer)((e=>(e+1)%wS),0),{orientation:u,rootClientId:p,isVisible:m}=(0,g.useSelect)((n=>{const{getBlockListSettings:o,getBlockRootClientId:r,isBlockVisible:i}=n(ji),s=r(e??t);return{orientation:o(s)?.orientation||"vertical",rootClientId:s,isVisible:i(e)&&i(t)}}),[e,t]),f=bh(e),b=bh(t),k="vertical"===u,v=(0,h.useMemo)((()=>{if(a<0||!f&&!b||!m)return;return{contextElement:"group"===i?b||f:f||b,getBoundingClientRect(){const e=f?f.getBoundingClientRect():null,t=b?b.getBoundingClientRect():null;let n=0,o=0,r=0,l=0;if("group"===i){const i=t||e;o=i.top,r=0,l=i.bottom-i.top,n="left"===s?i.left-2:i.right-2}else k?(o=e?e.bottom:t.top,r=e?e.width:t.width,l=t&&e?t.top-e.bottom:0,n=e?e.left:t.left):(o=e?e.top:t.top,l=e?e.height:t.height,(0,T.isRTL)()?(n=t?t.right:e.left,r=e&&t?e.left-t.right:0):(n=e?e.right:t.left,r=e&&t?t.left-e.right:0),r=Math.max(r,0));return new window.DOMRect(n,o,r,l)}}}),[f,b,a,k,m,i,s]),_=Fm(r);return(0,h.useLayoutEffect)((()=>{if(!f)return;const e=new window.MutationObserver(c);return e.observe(f,{attributes:!0}),()=>{e.disconnect()}}),[f]),(0,h.useLayoutEffect)((()=>{if(!b)return;const e=new window.MutationObserver(c);return e.observe(b,{attributes:!0}),()=>{e.disconnect()}}),[b]),(0,h.useLayoutEffect)((()=>{if(f)return f.ownerDocument.defaultView.addEventListener("resize",c),()=>{f.ownerDocument.defaultView?.removeEventListener("resize",c)}}),[f]),(f||b)&&m?(0,d.jsx)(ws.Popover,{ref:_,animate:!1,anchor:v,focusOnMount:!1,__unstableSlotName:o,inline:!o,...l,className:ms("block-editor-block-popover","block-editor-block-popover__inbetween",l.className),resize:!1,flip:!1,placement:"overlay",variant:"unstyled",children:(0,d.jsx)("div",{className:"block-editor-block-popover__inbetween-container",children:n})},t+"--"+p):null};const BS={hide:{opacity:0,scaleY:.75},show:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.9}};var IS=function({__unstablePopoverSlot:e,__unstableContentRef:t}){const{clientId:n}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockInsertionPoint:n}=e(ji),o=n(),r=t(o.rootClientId);return r.length?{clientId:r[o.index]}:{}}),[]),o=(0,m.useReducedMotion)();return(0,d.jsx)(of,{clientId:n,__unstablePopoverSlot:e,__unstableContentRef:t,className:"block-editor-block-popover__drop-zone",children:(0,d.jsx)(ws.__unstableMotion.div,{"data-testid":"block-popover-drop-zone",initial:o?BS.show:BS.hide,animate:BS.show,exit:o?BS.show:BS.exit,className:"block-editor-block-popover__drop-zone-foreground"})})};const jS=(0,h.createContext)();function ES({__unstablePopoverSlot:e,__unstableContentRef:t,operation:n="insert",nearestSide:o="right"}){const{selectBlock:r,hideInsertionPoint:i}=(0,g.useDispatch)(ji),s=(0,h.useContext)(jS),l=(0,h.useRef)(),{orientation:a,previousClientId:c,nextClientId:u,rootClientId:p,isInserterShown:f,isDistractionFree:b,isZoomOutMode:k}=(0,g.useSelect)((e=>{const{getBlockOrder:t,getBlockListSettings:n,getBlockInsertionPoint:o,isBlockBeingDragged:r,getPreviousBlockClientId:i,getNextBlockClientId:s,getSettings:l,isZoomOut:a}=G(e(ji)),c=o(),u=t(c.rootClientId);if(!u.length)return{};let d=u[c.index-1],p=u[c.index];for(;r(d);)d=i(d);for(;r(p);)p=s(p);const h=l();return{previousClientId:d,nextClientId:p,orientation:n(c.rootClientId)?.orientation||"vertical",rootClientId:c.rootClientId,isDistractionFree:h.isDistractionFree,isInserterShown:c?.__unstableWithInserter,isZoomOutMode:a()}}),[]),{getBlockEditingMode:v}=(0,g.useSelect)(ji),_=(0,m.useReducedMotion)();const y=(0,h.useCallback)((e=>{!e&&s.current&&(s.current=!1)}),[s]),x={start:{opacity:0,scale:0},rest:{opacity:1,scale:1,transition:{delay:f?.5:0,type:"tween"}},hover:{opacity:1,scale:1,transition:{delay:.5,type:"tween"}}},S={start:{scale:_?1:0},rest:{scale:1,transition:{delay:.4,type:"tween"}}};if(b)return null;if(k&&"insert"!==n)return null;const w=ms("block-editor-block-list__insertion-point","horizontal"===a||"group"===n?"is-horizontal":"is-vertical");return(0,d.jsx)(CS,{previousClientId:c,nextClientId:u,__unstablePopoverSlot:e,__unstableContentRef:t,operation:n,nearestSide:o,children:(0,d.jsxs)(ws.__unstableMotion.div,{layout:!_,initial:_?"rest":"start",animate:"rest",whileHover:"hover",whileTap:"pressed",exit:"start",ref:l,tabIndex:-1,onClick:function(e){e.target===l.current&&u&&"disabled"!==v(u)&&r(u,-1)},onFocus:function(e){e.target!==l.current&&(s.current=!0)},className:ms(w,{"is-with-inserter":f}),onHoverEnd:function(e){e.target!==l.current||s.current||i()},children:[(0,d.jsx)(ws.__unstableMotion.div,{variants:x,className:"block-editor-block-list__insertion-point-indicator","data-testid":"block-list-insertion-point-indicator"}),f&&(0,d.jsx)(ws.__unstableMotion.div,{variants:S,className:ms("block-editor-block-list__insertion-point-inserter"),children:(0,d.jsx)(lI,{ref:y,position:"bottom center",clientId:u,rootClientId:p,__experimentalIsQuick:!0,onToggle:e=>{s.current=e},onSelectOrClose:()=>{s.current=!1}})})]})})}function TS(e){const{insertionPoint:t,isVisible:n,isBlockListEmpty:o}=(0,g.useSelect)((e=>{const{getBlockInsertionPoint:t,isBlockInsertionPointVisible:n,getBlockCount:o}=e(ji),r=t();return{insertionPoint:r,isVisible:n(),isBlockListEmpty:0===o(r?.rootClientId)}}),[]);return!n||o?null:"replace"===t.operation?(0,d.jsx)(IS,{...e},`${t.rootClientId}-${t.index}`):(0,d.jsx)(ES,{operation:t.operation,nearestSide:t.nearestSide,...e})}function MS(){const e=(0,h.useContext)(jS),t=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree||G(e(ji)).isZoomOut()),[]),{getBlockListSettings:n,getBlockIndex:o,isMultiSelecting:r,getSelectedBlockClientIds:i,getSettings:s,getTemplateLock:l,__unstableIsWithinBlockOverlay:a,getBlockEditingMode:c,getBlockName:u,getBlockAttributes:d,getParentSectionBlock:p}=G((0,g.useSelect)(ji)),{showInsertionPoint:f,hideInsertionPoint:b}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((h=>{if(!t)return h.addEventListener("mousemove",g),()=>{h.removeEventListener("mousemove",g)};function g(t){if(void 0===e||e.current)return;if(t.target.nodeType===t.target.TEXT_NODE)return;if(r())return;if(!t.target.classList.contains("block-editor-block-list__layout"))return void b();let h;if(!t.target.classList.contains("is-root-container")){h=(t.target.getAttribute("data-block")?t.target:t.target.closest("[data-block]")).getAttribute("data-block")}if(l(h)||"disabled"===c(h)||"core/block"===u(h)||h&&d(h).layout?.isManualPlacement)return;const g=n(h),m=g?.orientation||"vertical",k=!!g?.__experimentalCaptureToolbars,v=t.clientY,_=t.clientX;let y=Array.from(t.target.children).find((e=>{const t=e.getBoundingClientRect();return e.classList.contains("wp-block")&&"vertical"===m&&t.top>v||e.classList.contains("wp-block")&&"horizontal"===m&&((0,T.isRTL)()?t.right<_:t.left>_)}));if(!y)return void b();if(!y.id&&(y=y.firstElementChild,!y))return void b();const x=y.id.slice(6);if(!x||a(x)||p(x))return;if(i().includes(x)&&"vertical"===m&&!k&&!s().hasFixedToolbar)return;const S=y.getBoundingClientRect();if("horizontal"===m&&(t.clientY>S.bottom||t.clientY<S.top)||"vertical"===m&&(t.clientX>S.right||t.clientX<S.left))return void b();const w=o(x);0!==w?f(h,w,{__unstableWithInserter:!0}):b()}}),[e,n,o,r,f,b,i,t])}function PS(){const{getSettings:e,hasSelectedBlock:t,hasMultiSelection:n}=(0,g.useSelect)(ji),{clearSelectedBlock:o}=(0,g.useDispatch)(ji),{clearBlockSelection:r}=e();return(0,m.useRefEffect)((e=>{if(r)return e.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",i)};function i(r){(t()||n())&&r.target===e&&o()}}),[t,n,o,r])}function RS(e){return(0,d.jsx)("div",{ref:PS(),...e})}jS.displayName="InsertionPointOpenRefContext";const AS=new WeakMap;function NS(){let e;return t=>(void 0!==e&&Ja()(e,t)||(e=t),e)}function LS(e){const[t]=(0,h.useState)(NS);return t(e)}function DS(e){let t={srcRootClientId:null,srcClientIds:null,srcIndex:null,type:null,blocks:null};if(!e.dataTransfer)return t;try{t=Object.assign(t,JSON.parse(e.dataTransfer.getData("wp-blocks")))}catch(e){return t}return t}function OS(e,t,n={}){const{operation:o="insert",nearestSide:r="right"}=n,{canInsertBlockType:i,getBlockIndex:s,getClientIdsOfDescendants:l,getBlockOrder:a,getBlocksByClientId:c,getSettings:u,getBlock:d}=(0,g.useSelect)(ji),{getGroupingBlockName:m}=(0,g.useSelect)(p.store),{insertBlocks:f,moveBlocksToPosition:b,updateBlockAttributes:k,clearSelectedBlock:v,replaceBlocks:_,removeBlocks:y}=(0,g.useDispatch)(ji),x=(0,g.useRegistry)(),S=(0,h.useCallback)(((n,s=!0,l=0,c=[])=>{Array.isArray(n)||(n=[n]);const u=a(e)[t];if("replace"===o)_(u,n,void 0,l);else if("group"===o){const t=d(u);"left"===r?n.push(t):n.unshift(t);const o=n.map((e=>(0,p.createBlock)(e.name,e.attributes,e.innerBlocks))),s=n.every((e=>"core/image"===e.name)),a=i("core/gallery",e),h=(0,p.createBlock)(s&&a?"core/gallery":m(),{layout:{type:"flex",flexWrap:s&&a?null:"nowrap"}},o);_([u,...c],h,void 0,l)}else f(n,t,e,s,l)}),[a,e,t,o,_,d,r,i,m,f]),w=(0,h.useCallback)(((n,r,i)=>{if("replace"===o){const o=c(n),r=a(e)[t];x.batch((()=>{y(n,!1),_(r,o,void 0,0)}))}else b(n,r,e,i)}),[o,a,c,b,x,y,_,t,e]),C=function(e,t,n,o,r,i,s,l,a){return c=>{const{srcRootClientId:u,srcClientIds:d,type:h,blocks:g}=DS(c);if("inserter"===h){s();const e=g.map((e=>(0,p.cloneBlock)(e)));i(e,!0,null)}if("block"===h){const s=n(d[0]);if(u===e&&s===t)return;if(d.includes(e)||o(d).some((t=>t===e)))return;if("group"===l){const e=d.map((e=>a(e)));return void i(e,!0,null,d)}const c=u===e,p=d.length;r(d,u,c&&s<t?t-p:t)}}}(e,t,s,l,w,S,v,o,d),B=function(e,t,n,o,r){return i=>{if(!t().mediaUpload)return;const s=(0,p.findTransform)((0,p.getBlockTransforms)("from"),(t=>"files"===t.type&&o(t.blockName,e)&&t.isMatch(i)));if(s){const e=s.transform(i,n);r(e)}}}(e,u,k,i,S),I=function(e){return t=>{const n=(0,p.pasteHandler)({HTML:t,mode:"BLOCKS"});n.length&&e(n)}}(S);return e=>{const t=(0,Ga.getFilesFromDataTransfer)(e.dataTransfer),n=e.dataTransfer.getData("text/html");n?I(n):t.length?B(t):C(e)}}function zS(e,t,n=["top","bottom","left","right"]){let o,r;return n.forEach((n=>{const i=function(e,t,n){const o="top"===n||"bottom"===n,{x:r,y:i}=e,s=o?r:i,l=o?i:r,a=o?t.left:t.top,c=o?t.right:t.bottom,u=t[n];let d;return d=s>=a&&s<=c?s:s<c?a:c,Math.sqrt((s-d)**2+(l-u)**2)}(e,t,n);(void 0===o||i<o)&&(o=i,r=n)})),[o,r]}function VS(e,t){return t.left<=e.x&&t.right>=e.x&&t.top<=e.y&&t.bottom>=e.y}const FS=30,HS=120,US=120;function GS(e,t,n,o){let r=!0;if(t){const e=t?.map((({name:e})=>e));r=n.every((t=>e?.includes(t)))}const i=n.map((t=>e(t))).every((e=>{const[t]=e?.parent||[];return!t||t===o}));return r&&i}function $S(e,t){const{defaultView:n}=t;return!!(n&&e instanceof n.HTMLElement&&e.closest("[data-is-insertion-point]"))}function WS({dropZoneElement:e,rootClientId:t="",parentClientId:n="",isDisabled:o=!1}={}){const r=(0,g.useRegistry)(),[i,s]=(0,h.useState)({index:null,operation:"insert"}),{getBlockType:l,getBlockVariations:a,getGroupingBlockName:c}=(0,g.useSelect)(p.store),{canInsertBlockType:u,getBlockListSettings:d,getBlocks:f,getBlockIndex:b,getDraggedBlockClientIds:k,getBlockNamesByClientId:v,getAllowedBlocks:_,isDragging:y,isGroupable:x,isZoomOut:S,getSectionRootClientId:w,getBlockParents:C}=G((0,g.useSelect)(ji)),{showInsertionPoint:B,hideInsertionPoint:I,startDragging:j,stopDragging:E}=G((0,g.useDispatch)(ji)),M=OS("before"===i.operation||"after"===i.operation?n:t,i.index,{operation:i.operation,nearestSide:i.nearestSide}),P=(0,m.useThrottle)((0,h.useCallback)(((o,i)=>{y()||j();const h=k(),g=[t,...C(t,!0)];if(h.some((e=>g.includes(e))))return;const m=_(t),I=v([t])[0],E=v(h);if(!GS(l,m,E,I))return;const M=w();if(S()&&M!==t)return;const P=f(t).filter((e=>!((0,p.hasBlockSupport)(e.name,"blockVisibility",!0)&&!1===e.attributes?.metadata?.blockVisibility)));if(0===P.length)return void r.batch((()=>{s({index:0,operation:"insert"}),B(t,0,{operation:"insert"})}));const R=P.map((e=>{const t=e.clientId;return{isUnmodifiedDefaultBlock:(0,p.isUnmodifiedDefaultBlock)(e),getBoundingClientRect:()=>{const e=i.getElementById(`block-${t}`);return e?e.getBoundingClientRect():null},blockIndex:b(t),blockOrientation:d(t)?.orientation}})),A=function(e,t,n="vertical",o={}){const r="horizontal"===n?["left","right"]:["top","bottom"];let i=0,s="before",l=1/0,a=null,c="right";const{dropZoneElement:u,parentBlockOrientation:d,rootBlockIndex:p=0}=o;if(u&&"horizontal"!==d){const e=u.getBoundingClientRect(),[n,o]=zS(t,e,["top","bottom"]);if(e.height>HS&&n<FS){if("top"===o)return[p,"before"];if("bottom"===o)return[p+1,"after"]}}const h=(0,T.isRTL)();if(u&&"horizontal"===d){const e=u.getBoundingClientRect(),[n,o]=zS(t,e,["left","right"]);if(e.width>US&&n<FS){if(h&&"right"===o||!h&&"left"===o)return[p,"before"];if(h&&"left"===o||!h&&"right"===o)return[p+1,"after"]}}e.forEach((({isUnmodifiedDefaultBlock:e,getBoundingClientRect:o,blockIndex:u,blockOrientation:d})=>{const p=o();if(!p)return;let[g,m]=zS(t,p,r);const[f,b]=zS(t,p,["left","right"]),k=VS(t,p);e&&k?g=0:"vertical"===n&&"horizontal"!==d&&(k&&f<FS||!k&&function(e,t){return t.top<=e.y&&t.bottom>=e.y}(t,p))&&(a=u,c=b),g<l&&(s="bottom"===m||!h&&"right"===m||h&&"left"===m?"after":"before",l=g,i=u)}));const g=i+("after"===s?1:-1),m=!!e[i]?.isUnmodifiedDefaultBlock,f=!!e[g]?.isUnmodifiedDefaultBlock;if(null!==a)return[a,"group",c];if(!m&&!f)return["after"===s?i+1:i,"insert"];return[m?i:g,"replace"]}(R,{x:o.clientX,y:o.clientY},d(t)?.orientation,{dropZoneElement:e,parentBlockClientId:n,parentBlockOrientation:n?d(n)?.orientation:void 0,rootBlockIndex:b(t)}),[N,L,D]=A,O=R[N]?.isUnmodifiedDefaultBlock;if(!S()||O||"insert"===L){if("group"===L){const e=P[N],n=[e.name,...E].every((e=>"core/image"===e)),o=u("core/gallery",t),r=x([e.clientId,k()]),i=a(c(),"block"),s=i&&i.find((({name:e})=>"group-row"===e));if(n&&!o&&(!r||!s))return;if(!(n||r&&s))return}r.batch((()=>{s({index:N,operation:L,nearestSide:D});const e=["before","after"].includes(L)?n:t;B(e,N,{operation:L,nearestSide:D})}))}}),[y,_,t,v,k,l,w,S,f,d,e,n,b,r,j,B,u,x,a,c]),200);return(0,m.__experimentalUseDropZone)({dropZoneElement:e,isDisabled:o,onDrop:M,onDragOver(e){P(e,e.currentTarget.ownerDocument)},onDragLeave(e){const{ownerDocument:t}=e.currentTarget;$S(e.relatedTarget,t)||$S(e.target,t)||(P.cancel(),I())},onDragEnd(){P.cancel(),E(),I()}})}const KS={};function ZS({children:e,clientId:t}){const n=function(e){return(0,g.useSelect)((t=>{const n=t(ji).getBlock(e);if(!n)return;const o=t(p.store).getBlockType(n.name);return o&&0!==Object.keys(o.providesContext).length?Object.fromEntries(Object.entries(o.providesContext).map((([e,t])=>[e,n.attributes[t]]))):void 0}),[e])}(t);return(0,d.jsx)(iv,{value:n,children:e})}const qS=(0,h.memo)(mw);function YS(e){const{clientId:t,allowedBlocks:n,prioritizedInserterBlocks:o,defaultBlock:r,directInsert:i,__experimentalDefaultBlock:s,__experimentalDirectInsert:l,template:a,templateLock:c,wrapperRef:u,templateInsertUpdatesSelection:m,__experimentalCaptureToolbars:f,__experimentalAppenderTagName:b,renderAppender:k,orientation:v,placeholder:_,layout:y,name:x,blockType:S,parentLock:w,defaultLayout:C}=e;!function(e,t,n,o,r,i,s,l,a,c,u,d){const p=(0,g.useRegistry)(),m=LS(n),f=LS(o),b=void 0===a||"contentOnly"===t?t:a;(0,h.useLayoutEffect)((()=>{const t={allowedBlocks:m,prioritizedInserterBlocks:f,templateLock:b};if(void 0!==c&&(t.__experimentalCaptureToolbars=c),void 0!==u)t.orientation=u;else{const e=Xl(d?.type);t.orientation=e.getOrientation(d)}void 0!==s&&(I()("__experimentalDefaultBlock",{alternative:"defaultBlock",since:"6.3",version:"6.4"}),t.defaultBlock=s),void 0!==r&&(t.defaultBlock=r),void 0!==l&&(I()("__experimentalDirectInsert",{alternative:"directInsert",since:"6.3",version:"6.4"}),t.directInsert=l),void 0!==i&&(t.directInsert=i),void 0!==t.directInsert&&"boolean"!=typeof t.directInsert&&I()("Using `Function` as a `directInsert` argument",{alternative:"`boolean` values",since:"6.5"}),AS.get(p)||AS.set(p,{}),AS.get(p)[e]=t,window.queueMicrotask((()=>{const e=AS.get(p);if(Object.keys(e).length){const{updateBlockListSettings:t}=p.dispatch(ji);t(e),AS.set(p,{})}}))}),[e,m,f,b,r,i,s,l,c,u,d,p])}(t,w,n,o,r,i,s,l,c,f,v,y),function(e,t,n,o){const r=(0,g.useRegistry)(),i=(0,h.useRef)(null);(0,h.useLayoutEffect)((()=>{let s=!1;const{getBlocks:l,getSelectedBlocksInitialCaretPosition:a,isBlockSelected:c}=r.select(ji),{replaceInnerBlocks:u,__unstableMarkNextChangeAsNotPersistent:d}=r.dispatch(ji);return window.queueMicrotask((()=>{if(s)return;const r=l(e),h=0===r.length||"all"===n||"contentOnly"===n,g=!E()(t,i.current);if(!h||!g)return;i.current=t;const m=(0,p.synchronizeBlocksWithTemplate)(r,t);E()(m,r)||(d(),u(e,m,0===r.length&&o&&0!==m.length&&c(e),a()))})),()=>{s=!0}}),[t,n,e,r,o])}(t,a,c,m);const B=(0,p.getBlockSupport)(x,"layout")||(0,p.getBlockSupport)(x,"__experimentalLayout")||KS,{allowSizingOnChildren:j=!1}=B,T=y||B,M=(0,h.useMemo)((()=>({...C,...T,...j&&{allowSizingOnChildren:!0}})),[C,T,j]),P=(0,d.jsx)(qS,{rootClientId:t,renderAppender:k,__experimentalAppenderTagName:b,layout:M,wrapperRef:u,placeholder:_});return S?.providesContext&&0!==Object.keys(S.providesContext).length?(0,d.jsx)(ZS,{clientId:t,children:P}):P}function XS(e){return qk(e),(0,d.jsx)(YS,{...e})}const QS=(0,h.forwardRef)(((e,t)=>{const n=JS({ref:t},e);return(0,d.jsx)("div",{className:"block-editor-inner-blocks",children:(0,d.jsx)("div",{...n})})}));function JS(e={},t={}){const{__unstableDisableLayoutClassNames:n,__unstableDisableDropZone:o,dropZoneElement:r}=t,{clientId:i,layout:s=null,__unstableLayoutClassNames:l=""}=C(),a=(0,g.useSelect)((e=>{const{getBlockName:t,isZoomOut:n,getTemplateLock:o,getBlockRootClientId:r,getBlockEditingMode:s,getBlockSettings:l,getSectionRootClientId:a}=G(e(ji));if(!i){const e=a();return{isDropZoneDisabled:n()&&""!==e}}const{hasBlockSupport:c,getBlockType:u}=e(p.store),d=t(i),h=s(i),g=r(i),[m]=l(i,"layout");let f="disabled"===h;if(n()){const e=a();f=i!==e}return{__experimentalCaptureToolbars:c(d,"__experimentalExposeControlsToChildren",!1),name:d,blockType:u(d),parentLock:o(g),parentClientId:g,isDropZoneDisabled:f,defaultLayout:m}}),[i]),{__experimentalCaptureToolbars:c,name:u,blockType:h,parentLock:f,parentClientId:b,isDropZoneDisabled:k,defaultLayout:v}=a,_=WS({dropZoneElement:r,rootClientId:i,parentClientId:b}),y=(0,m.useMergeRefs)([e.ref,o||k||s?.isManualPlacement&&window.__experimentalEnableGridInteractivity?null:_]),x={__experimentalCaptureToolbars:c,layout:s,name:u,blockType:h,parentLock:f,defaultLayout:v,...t},S=x.value&&x.onChange?XS:YS;return{...e,ref:y,className:ms(e.className,"block-editor-block-list__layout",n?"":l),children:i?(0,d.jsx)(S,{...x,clientId:i}):(0,d.jsx)(mw,{...t})}}JS.save=p.__unstableGetInnerBlocksProps,QS.DefaultBlockAppender=function(){const{clientId:e}=C();return(0,d.jsx)(yS,{rootClientId:e})},QS.ButtonBlockAppender=function({showSeparator:e,isFloating:t,onAddBlock:n,isToggle:o}){const{clientId:r}=C();return(0,d.jsx)(uI,{className:ms({"block-list-appender__toggle":o}),rootClientId:r,showSeparator:e,isFloating:t,onAddBlock:n})},QS.Content=()=>JS.save().children;var ew=QS;const tw=new Set([Wa.UP,Wa.RIGHT,Wa.DOWN,Wa.LEFT,Wa.ENTER,Wa.BACKSPACE]);function nw(){const e=(0,g.useSelect)((e=>e(ji).isTyping()),[]),{stopTyping:t}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((n=>{if(!e)return;const{ownerDocument:o}=n;let r,i;function s(e){const{clientX:n,clientY:o}=e;r&&i&&(r!==n||i!==o)&&t(),r=n,i=o}return o.addEventListener("mousemove",s),()=>{o.removeEventListener("mousemove",s)}}),[e,t])}function ow(){const{isTyping:e}=(0,g.useSelect)((e=>{const{isTyping:t}=e(ji);return{isTyping:t()}}),[]),{startTyping:t,stopTyping:n}=(0,g.useDispatch)(ji),o=nw(),r=(0,m.useRefEffect)((o=>{const{ownerDocument:r}=o,{defaultView:i}=r,s=i.getSelection();if(e){let e=function(e){const{target:t}=e;a=i.setTimeout((()=>{(0,Ga.isTextField)(t)||n()}))},t=function(e){const{keyCode:t}=e;t!==Wa.ESCAPE&&t!==Wa.TAB||n()},l=function(){s.isCollapsed||n()};let a;return o.addEventListener("focus",e),o.addEventListener("keydown",t),r.addEventListener("selectionchange",l),()=>{i.clearTimeout(a),o.removeEventListener("focus",e),o.removeEventListener("keydown",t),r.removeEventListener("selectionchange",l)}}function l(e){const{type:n,target:r}=e;(0,Ga.isTextField)(r)&&o.contains(r)&&("keydown"!==n||function(e){const{keyCode:t,shiftKey:n}=e;return!n&&tw.has(t)}(e))&&t()}return o.addEventListener("keypress",l),o.addEventListener("keydown",l),()=>{o.removeEventListener("keypress",l),o.removeEventListener("keydown",l)}}),[e,t,n]);return(0,m.useMergeRefs)([o,r])}var rw=function({children:e}){return(0,d.jsx)("div",{ref:ow(),children:e})};function iw({clientId:e,rootClientId:t="",position:n="top"}){const[o,r]=(0,h.useState)(!1),{sectionRootClientId:i,sectionClientIds:s,insertionPoint:l,blockInsertionPointVisible:a,blockInsertionPoint:c,blocksBeingDragged:u}=(0,g.useSelect)((e=>{const{getInsertionPoint:t,getBlockOrder:n,getSectionRootClientId:o,isBlockInsertionPointVisible:r,getBlockInsertionPoint:i,getDraggedBlockClientIds:s}=G(e(ji)),l=o();return{sectionRootClientId:l,sectionClientIds:n(l),insertionPoint:t(),blockInsertionPoint:i(),blockInsertionPointVisible:r(),blocksBeingDragged:s()}}),[]),p=(0,m.useReducedMotion)();if(!e)return;let f=!1;if(!(t===i&&s&&s.includes(e)))return null;const b=0===l?.index&&e===s[l.index],k=l&&l.hasOwnProperty("index")&&e===s[l.index-1];"top"===n&&(f=b||a&&0===c.index&&e===s[c.index]),"bottom"===n&&(f=k||a&&e===s[c.index-1]);const v=u[0],_=u.includes(e),y=s.indexOf(v),x=y>0?s[y-1]:null;return(_||x===e)&&(f=!1),(0,d.jsx)(ws.__unstableAnimatePresence,{children:f&&(0,d.jsx)(ws.__unstableMotion.div,{initial:{height:0},animate:{height:"calc(1 * var(--wp-block-editor-iframe-zoom-out-frame-size) / var(--wp-block-editor-iframe-zoom-out-scale)"},exit:{height:0},transition:{type:"tween",duration:p?0:.2,ease:[.6,0,.4,1]},className:ms("block-editor-block-list__zoom-out-separator",{"is-dragged-over":o}),"data-is-insertion-point":"true",onDragOver:()=>r(!0),onDragLeave:()=>r(!1),children:(0,d.jsx)(ws.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{delay:-.125}},transition:{ease:"linear",duration:.1,delay:.125},children:(0,T.__)("Drop pattern.")})})})}const sw=(0,h.createContext)();sw.displayName="IntersectionObserverContext";const lw=new WeakMap,aw={trailing:!0};function cw({className:e,...t}){const{isOutlineMode:n,isFocusMode:o,temporarilyEditingAsBlocks:r}=(0,g.useSelect)((e=>{const{getSettings:t,getTemporarilyEditingAsBlocks:n,isTyping:o,hasBlockSpotlight:r}=G(e(ji)),{outlineMode:i,focusMode:s}=t();return{isOutlineMode:i&&!o(),isFocusMode:s||r(),temporarilyEditingAsBlocks:n()}}),[]),i=(0,g.useRegistry)(),{setBlockVisibility:s}=(0,g.useDispatch)(ji),l=(0,m.useDebounce)((0,h.useCallback)((()=>{const e={};lw.get(i).forEach((([t,n])=>{e[t]=n})),s(e)}),[i]),300,aw),a=(0,h.useMemo)((()=>{const{IntersectionObserver:e}=window;if(e)return new e((e=>{lw.get(i)||lw.set(i,[]);for(const t of e){const e=t.target.getAttribute("data-block");lw.get(i).push([e,t.isIntersecting])}l()}))}),[]),c=JS({ref:(0,m.useMergeRefs)([PS(),MS(),ow()]),className:ms("is-root-container",e,{"is-outline-mode":n,"is-focus-mode":o})},t);return(0,d.jsxs)(sw.Provider,{value:a,children:[(0,d.jsx)("div",{...c}),!!r&&(0,d.jsx)(uw,{clientId:r})]})}function uw({clientId:e}){const{stopEditingAsBlocks:t}=G((0,g.useDispatch)(ji)),n=(0,g.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(ji);return n(e)||o(e,!0)}),[e]);return(0,h.useEffect)((()=>{n||t(e)}),[n,e,t]),null}function dw(e){return(0,d.jsx)(w,{value:x,children:(0,d.jsx)(cw,{...e})})}const pw=[],hw=new Set;function gw({placeholder:e,rootClientId:t,renderAppender:n,__experimentalAppenderTagName:o,layout:r=Ql}){const i=!1!==n,s=!!n,{order:l,isZoomOut:a,selectedBlocks:c,visibleBlocks:u,shouldRenderAppender:h}=(0,g.useSelect)((e=>{const{getSettings:n,getBlockOrder:o,getSelectedBlockClientIds:r,__unstableGetVisibleBlocks:l,getTemplateLock:a,getBlockEditingMode:c,isSectionBlock:u,isContainerInsertableToInContentOnlyMode:d,getBlockName:h,isZoomOut:g,canInsertBlockType:m}=G(e(ji)),f=o(t);if(n().isPreviewMode)return{order:f,selectedBlocks:pw,visibleBlocks:hw};const b=r(),k=b[0],v=!(t||k||f.length&&m((0,p.getDefaultBlockName)(),t)),_=!(!t||!k||t!==k);return{order:f,selectedBlocks:b,visibleBlocks:l(),isZoomOut:g(),shouldRenderAppender:(!u(t)||d(h(k),t))&&"disabled"!==c(t)&&!a(t)&&i&&!g()&&(s||_||v)}}),[t,i,s]);return(0,d.jsxs)(ea,{value:r,children:[l.map((e=>(0,d.jsxs)(g.AsyncModeProvider,{value:!u.has(e)&&!c.includes(e),children:[a&&(0,d.jsx)(iw,{clientId:e,rootClientId:t,position:"top"}),(0,d.jsx)(kS,{rootClientId:t,clientId:e}),a&&(0,d.jsx)(iw,{clientId:e,rootClientId:t,position:"bottom"})]},e))),l.length<1&&e,h&&(0,d.jsx)(SS,{tagName:o,rootClientId:t,CustomAppender:n})]})}function mw(e){return(0,d.jsx)(g.AsyncModeProvider,{value:!1,children:(0,d.jsx)(gw,{...e})})}function fw(e){const{isMultiSelecting:t,getMultiSelectedBlockClientIds:n,hasMultiSelection:o,getSelectedBlockClientId:r,getSelectedBlocksInitialCaretPosition:i,__unstableIsFullySelected:s}=e(ji);return{isMultiSelecting:t(),multiSelectedBlockClientIds:n(),hasMultiSelection:o(),selectedBlockClientId:r(),initialPosition:i(),isFullSelection:s()}}function bw(){const{initialPosition:e,isMultiSelecting:t,multiSelectedBlockClientIds:n,hasMultiSelection:o,selectedBlockClientId:r,isFullSelection:i}=(0,g.useSelect)(fw,[]);return(0,m.useRefEffect)((r=>{const{ownerDocument:s}=r,{defaultView:l}=s;if(null==e)return;if(!o||t)return;const{length:a}=n;a<2||i&&(r.contentEditable=!0,r.focus(),l.getSelection().removeAllRanges())}),[o,t,n,r,e,i])}function kw(e,t,n,o){let r,i=Ga.focus.focusable.find(n);return t&&i.reverse(),i=i.slice(i.indexOf(e)+1),o&&(r=e.getBoundingClientRect()),i.find((function(e){if(!(e.closest("[inert]")||1===e.children.length&&$m(e,e.firstElementChild)&&"true"===e.firstElementChild.getAttribute("contenteditable"))){if(!Ga.focus.tabbable.isTabbableIndex(e))return!1;if(e.isContentEditable&&"true"!==e.contentEditable)return!1;if(o){const t=e.getBoundingClientRect();if(t.left>=r.right||t.right<=r.left)return!1}return!0}}))}function vw(){const{getMultiSelectedBlocksStartClientId:e,getMultiSelectedBlocksEndClientId:t,getSettings:n,hasMultiSelection:o,__unstableIsFullySelected:r}=(0,g.useSelect)(ji),{selectBlock:i}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((s=>{let l;function a(){l=null}function c(a){if(a.defaultPrevented)return;const{keyCode:c,target:u,shiftKey:d,ctrlKey:p,altKey:h,metaKey:g}=a,m=c===Wa.UP,f=c===Wa.DOWN,b=c===Wa.LEFT,k=c===Wa.RIGHT,v=m||b,_=b||k,y=m||f,x=_||y,S=d||p||h||g,w=y?Ga.isVerticalEdge:Ga.isHorizontalEdge,{ownerDocument:C}=s,{defaultView:B}=C;if(!x)return;if(o()){if(d)return;if(!r())return;return a.preventDefault(),void(v?i(e()):i(t(),-1))}if(!function(e,t,n){const o=t===Wa.UP||t===Wa.DOWN,{tagName:r}=e,i=e.getAttribute("type");if(o&&!n)return"INPUT"!==r||!["date","datetime-local","month","number","range","time","week"].includes(i);if("INPUT"===r)return["button","checkbox","number","color","file","image","radio","reset","submit"].includes(i);return"TEXTAREA"!==r}(u,c,S))return;y?l||(l=(0,Ga.computeCaretRect)(B)):l=null;const I=(0,Ga.isRTL)(u)?!v:v,{keepCaretInsideBlock:j}=n();if(d)(function(e,t){const n=kw(e,t,s);return n&&Km(n)})(u,v)&&w(u,v)&&(s.contentEditable=!0,s.focus());else if(!y||!(0,Ga.isVerticalEdge)(u,v)||h&&!(0,Ga.isHorizontalEdge)(u,I)||j){if(_&&B.getSelection().isCollapsed&&(0,Ga.isHorizontalEdge)(u,I)&&!j){const e=kw(u,I,s);(0,Ga.placeCaretAtHorizontalEdge)(e,v),a.preventDefault()}}else{const e=kw(u,v,s,!0);e&&((0,Ga.placeCaretAtVerticalEdge)(e,h?!v:v,h?void 0:l),a.preventDefault())}}return s.addEventListener("mousedown",a),s.addEventListener("keydown",c),()=>{s.removeEventListener("mousedown",a),s.removeEventListener("keydown",c)}}),[])}function _w(){const{getBlockOrder:e,getSelectedBlockClientIds:t,getBlockRootClientId:n}=(0,g.useSelect)(ji),{multiSelect:o,selectBlock:r}=(0,g.useDispatch)(ji),i=(0,Yk.__unstableUseShortcutEventMatch)();return(0,m.useRefEffect)((s=>{function l(l){if(!i("core/block-editor/select-all",l))return;const a=t();if(a.length<2&&!(0,Ga.isEntirelySelected)(l.target))return;l.preventDefault();const[c]=a,u=n(c),d=e(u);a.length!==d.length?o(d[0],d[d.length-1]):u&&(s.ownerDocument.defaultView.getSelection().removeAllRanges(),r(u))}return s.addEventListener("keydown",l),()=>{s.removeEventListener("keydown",l)}}),[])}function yw(e,t){e.contentEditable=t,t&&e.focus()}function xw(){const{startMultiSelect:e,stopMultiSelect:t}=(0,g.useDispatch)(ji),{isSelectionEnabled:n,hasSelectedBlock:o,isDraggingBlocks:r,isMultiSelecting:i}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;let c,u,d;function p(){t(),a.removeEventListener("mouseup",p),u=a.requestAnimationFrame((()=>{if(!o())return;yw(s,!1);const e=a.getSelection();if(e.rangeCount){const t=e.getRangeAt(0),{commonAncestorContainer:n}=t,o=t.cloneRange();c.contains(n)&&(c.focus(),e.removeAllRanges(),e.addRange(o))}}))}function h({buttons:t,target:o,relatedTarget:l}){o.contains(d)&&(o.contains(l)||r()||1===t&&(i()||s!==o&&"true"===o.getAttribute("contenteditable")&&n()&&(c=o,e(),a.addEventListener("mouseup",p),yw(s,!0))))}return s.addEventListener("mouseout",h),s.addEventListener("mousedown",(function({target:e}){d=e})),()=>{s.removeEventListener("mouseout",h),a.removeEventListener("mouseup",p),a.cancelAnimationFrame(u)}}),[e,t,n,o])}function Sw(e,t){e.contentEditable!==String(t)&&(e.contentEditable=t,t&&e.focus())}function ww(e){const t=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;return t?.closest("[data-wp-block-attribute-key]")}function Cw(){const{multiSelect:e,selectBlock:t,selectionChange:n}=(0,g.useDispatch)(ji),{getBlockParents:o,getBlockSelectionStart:r,isMultiSelecting:i}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((s=>{const{ownerDocument:l}=s,{defaultView:a}=l;function c(l){const c=a.getSelection();if(!c.rangeCount)return;const u=function(e){const{anchorNode:t,anchorOffset:n}=e;return t.nodeType===t.TEXT_NODE||0===n?t:t.childNodes[n-1]}(c),d=function(e){const{focusNode:t,focusOffset:n}=e;return t.nodeType===t.TEXT_NODE||n===t.childNodes.length?t:0===n&&(0,Ga.isSelectionForward)(e)?t.previousSibling??t.parentElement:t.childNodes[n]}(c);if(!s.contains(u)||!s.contains(d))return;const p=l.shiftKey&&"mouseup"===l.type;if(c.isCollapsed&&!p){if("true"===s.contentEditable&&!i()){Sw(s,!1);let e=u.nodeType===u.ELEMENT_NODE?u:u.parentElement;e=e?.closest("[contenteditable]"),e?.focus()}return}let h=Km(u),g=Km(d);if(p){const e=r(),t=Km(l.target),n=t!==g;(h===g&&c.isCollapsed||!g||n)&&(g=t),h!==e&&(h=e)}if(void 0===h&&void 0===g)return void Sw(s,!1);if(h===g)i()?e(h,h):t(h);else{const t=[...o(h),h],r=[...o(g),g],i=function(e,t){let n=0;for(;e[n]===t[n];)n++;return n}(t,r);if(t[i]!==h||r[i]!==g)return void e(t[i],r[i]);const s=ww(u),l=ww(d);if(s&&l){const e=c.getRangeAt(0),t=(0,pe.create)({element:s,range:e,__unstableIsEditableTree:!0}),o=(0,pe.create)({element:l,range:e,__unstableIsEditableTree:!0}),r=t.start??t.end,i=o.start??o.end;n({start:{clientId:h,attributeKey:s.dataset.wpBlockAttributeKey,offset:r},end:{clientId:g,attributeKey:l.dataset.wpBlockAttributeKey,offset:i}})}else e(h,g)}}return l.addEventListener("selectionchange",c),a.addEventListener("mouseup",c),()=>{l.removeEventListener("selectionchange",c),a.removeEventListener("mouseup",c)}}),[e,t,n,o])}function Bw(){const{selectBlock:e}=(0,g.useDispatch)(ji),{isSelectionEnabled:t,getBlockSelectionStart:n,hasMultiSelection:o}=(0,g.useSelect)(ji);return(0,m.useRefEffect)((r=>{function i(i){if(!t()||0!==i.button)return;const s=n(),l=Km(i.target);i.shiftKey?s&&s!==l&&(r.contentEditable=!0,r.focus()):o()&&e(l)}return r.addEventListener("mousedown",i),()=>{r.removeEventListener("mousedown",i)}}),[e,t,n,o])}function Iw(){const{__unstableIsFullySelected:e,getSelectedBlockClientIds:t,getSelectedBlockClientId:n,__unstableIsSelectionMergeable:o,hasMultiSelection:r,getBlockName:i,canInsertBlockType:s,getBlockRootClientId:l,getSelectionStart:a,getSelectionEnd:c,getBlockAttributes:u}=(0,g.useSelect)(ji),{replaceBlocks:d,__unstableSplitSelection:h,removeBlocks:f,__unstableDeleteSelection:b,__unstableExpandSelection:k,__unstableMarkAutomaticChange:v}=(0,g.useDispatch)(ji);return(0,m.useRefEffect)((g=>{function m(e){"true"===g.contentEditable&&e.preventDefault()}function _(m){if(!m.defaultPrevented)if(r())m.keyCode===Wa.ENTER?(g.contentEditable=!1,m.preventDefault(),e()?d(t(),(0,p.createBlock)((0,p.getDefaultBlockName)())):h()):m.keyCode===Wa.BACKSPACE||m.keyCode===Wa.DELETE?(g.contentEditable=!1,m.preventDefault(),e()?f(t()):o()?b(m.keyCode===Wa.DELETE):k()):1!==m.key.length||m.metaKey||m.ctrlKey||(g.contentEditable=!1,o()?b(m.keyCode===Wa.DELETE):(m.preventDefault(),g.ownerDocument.defaultView.getSelection().removeAllRanges()));else if(m.keyCode===Wa.ENTER){if(m.shiftKey||e())return;const t=n(),o=i(t),r=a(),g=c();if(r.attributeKey===g.attributeKey){const e=u(t)[r.attributeKey],n=(0,p.getBlockTransforms)("from").filter((({type:e})=>"enter"===e)),o=(0,p.findTransform)(n,(t=>t.regExp.test(e)));if(o)return d(t,o.transform({content:e})),void v()}if(!(0,p.hasBlockSupport)(o,"splitting",!1)&&!m.__deprecatedOnSplit)return;s(o,l(t))&&(h(),m.preventDefault())}}function y(e){r()&&(g.contentEditable=!1,o()?b():(e.preventDefault(),g.ownerDocument.defaultView.getSelection().removeAllRanges()))}return g.addEventListener("beforeinput",m),g.addEventListener("keydown",_),g.addEventListener("compositionstart",y),()=>{g.removeEventListener("beforeinput",m),g.removeEventListener("keydown",_),g.removeEventListener("compositionstart",y)}}),[])}function jw(){const{getBlockName:e}=(0,g.useSelect)(ji),{getBlockType:t}=(0,g.useSelect)(p.store),{createSuccessNotice:n}=(0,g.useDispatch)(pr.store);return(0,h.useCallback)(((o,r)=>{let i="";if("copyStyles"===o)i=(0,T.__)("Styles copied to clipboard.");else if(1===r.length){const n=r[0],s=t(e(n))?.title;i="copy"===o?(0,T.sprintf)((0,T.__)('Copied "%s" to clipboard.'),s):(0,T.sprintf)((0,T.__)('Moved "%s" to clipboard.'),s)}else i="copy"===o?(0,T.sprintf)((0,T._n)("Copied %d block to clipboard.","Copied %d blocks to clipboard.",r.length),r.length):(0,T.sprintf)((0,T._n)("Moved %d block to clipboard.","Moved %d blocks to clipboard.",r.length),r.length);n(i,{type:"snackbar"})}),[n,e,t])}function Ew({clipboardData:e}){let t="",n="";try{t=e.getData("text/plain"),n=e.getData("text/html")}catch(e){return}n=function(e){const t="\x3c!--StartFragment--\x3e",n=e.indexOf(t);if(!(n>-1))return e;const o=(e=e.substring(n+20)).indexOf("\x3c!--EndFragment--\x3e");return o>-1&&(e=e.substring(0,o)),e}(n),n=function(e){const t="<meta charset='utf-8'>";return e.startsWith(t)?e.slice(22):e}(n);const o=(0,Ga.getFilesFromDataTransfer)(e);return o.length&&!function(e,t){if(t&&1===e?.length&&0===e[0].type.indexOf("image/")){const e=/<\s*img\b/gi;if(1!==t.match(e)?.length)return!0;const n=/<\s*img\b[^>]*\bsrc="file:\/\//i;if(t.match(n))return!0}return!1}(o,n)?{files:o}:{html:n,plainText:t,files:[]}}const Tw=Symbol("requiresWrapperOnCopy");function Mw(e,t,n){let o=t;const[r]=t;if(r){if(n.select(p.store).getBlockType(r.name)[Tw]){const{getBlockRootClientId:e,getBlockName:t,getBlockAttributes:i}=n.select(ji),s=e(r.clientId),l=t(s);l&&(o=(0,p.createBlock)(l,i(s),o))}}const i=(0,p.serialize)(o);e.clipboardData.setData("text/plain",function(e){e=e.replace(/<br>/g,"\n");return(0,Ga.__unstableStripHTML)(e).trim().replace(/\n\n+/g,"\n\n")}(i)),e.clipboardData.setData("text/html",i)}function Pw(){const e=(0,g.useRegistry)(),{getBlocksByClientId:t,getSelectedBlockClientIds:n,hasMultiSelection:o,getSettings:r,getBlockName:i,__unstableIsFullySelected:s,__unstableIsSelectionCollapsed:l,__unstableIsSelectionMergeable:a,__unstableGetSelectedBlocksWithPartialSelection:c,canInsertBlockType:u,getBlockRootClientId:d}=(0,g.useSelect)(ji),{flashBlock:h,removeBlocks:f,replaceBlocks:b,__unstableDeleteSelection:k,__unstableExpandSelection:v,__unstableSplitSelection:_}=(0,g.useDispatch)(ji),y=jw();return(0,m.useRefEffect)((g=>{function m(m){if(m.defaultPrevented)return;const x=n();if(0===x.length)return;if(!o()){const{target:e}=m,{ownerDocument:t}=e;if("copy"===m.type||"cut"===m.type?(0,Ga.documentHasUncollapsedSelection)(t):(0,Ga.documentHasSelection)(t)&&!t.activeElement.isContentEditable)return}const{activeElement:S}=m.target.ownerDocument;if(!g.contains(S))return;const w=a(),C=l()||s(),B=!C&&!w;if("copy"===m.type||"cut"===m.type)if(m.preventDefault(),1===x.length&&h(x[0]),B)v();else{let n;if(y(m.type,x),C)n=t(x);else{const[e,o]=c();n=[e,...t(x.slice(1,x.length-1)),o]}Mw(m,n,e)}if("cut"===m.type)C&&!B?f(x):(m.target.ownerDocument.activeElement.contentEditable=!1,k());else if("paste"===m.type){const{__experimentalCanUserUseUnfilteredHTML:e,mediaUpload:t}=r();if("true"===m.clipboardData.getData("rich-text"))return;const{plainText:n,html:l,files:a}=Ew(m),c=s();let h=[];if(a.length){if(!t)return void m.preventDefault();const e=(0,p.getBlockTransforms)("from");h=a.reduce(((t,n)=>{const o=(0,p.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else h=(0,p.pasteHandler)({HTML:l,plainText:n,mode:c?"BLOCKS":"AUTO",canUserUseUnfilteredHTML:e});if("string"==typeof h)return;if(c)return b(x,h,h.length-1,-1),void m.preventDefault();if(!o()&&!(0,p.hasBlockSupport)(i(x[0]),"splitting",!1)&&!m.__deprecatedOnSplit)return;const[g]=x,f=d(g),k=[];for(const e of h)if(u(e.name,f))k.push(e);else{const t=i(f),n=e.name!==t?(0,p.switchToBlockType)(e,t):[e];if(!n)return;for(const e of n)for(const t of e.innerBlocks)k.push(t)}_(k),m.preventDefault()}}return g.ownerDocument.addEventListener("copy",m),g.ownerDocument.addEventListener("cut",m),g.ownerDocument.addEventListener("paste",m),()=>{g.ownerDocument.removeEventListener("copy",m),g.ownerDocument.removeEventListener("cut",m),g.ownerDocument.removeEventListener("paste",m)}}),[])}function Rw(){const[e,t,n]=function(){const e=(0,h.useRef)(),t=(0,h.useRef)(),n=(0,h.useRef)(),{hasMultiSelection:o,getSelectedBlockClientId:r,getBlockCount:i,getBlockOrder:s,getLastFocus:l,getSectionRootClientId:a,isZoomOut:c}=G((0,g.useSelect)(ji)),{setLastFocus:u}=G((0,g.useDispatch)(ji)),p=(0,h.useRef)();function f(t){const n=e.current.ownerDocument===t.target.ownerDocument?e.current:e.current.ownerDocument.defaultView.frameElement;if(p.current)p.current=null;else if(o())e.current.focus();else if(r())l()?.current?l().current.focus():e.current.querySelector(`[data-block="${r()}"]`).focus();else if(c()){const t=a(),o=s(t);o.length?e.current.querySelector(`[data-block="${o[0]}"]`).focus():t?e.current.querySelector(`[data-block="${t}"]`).focus():n.focus()}else{const o=t.target.compareDocumentPosition(n)&t.target.DOCUMENT_POSITION_FOLLOWING,r=Ga.focus.tabbable.find(e.current);r.length&&(o?r[0]:r[r.length-1]).focus()}}const b=(0,d.jsx)("div",{ref:t,tabIndex:"0",onFocus:f}),k=(0,d.jsx)("div",{ref:n,tabIndex:"0",onFocus:f}),v=(0,m.useRefEffect)((o=>{function r(e){if(e.defaultPrevented)return;if(e.keyCode!==Wa.TAB)return;if(!n.current||!t.current)return;const{target:o,shiftKey:r}=e,i=r?"findPrevious":"findNext",s=Ga.focus.tabbable[i](o),l=o.closest("[data-block]"),a=l&&s&&($m(l,s)||Wm(l,s));if((0,Ga.isFormElement)(s)&&a)return;const c=r?t:n;p.current=!0,c.current.focus({preventScroll:!0})}function s(e){u({...l(),current:e.target});const{ownerDocument:t}=o;!e.relatedTarget&&e.target.hasAttribute("data-block")&&t.activeElement===t.body&&0===i()&&o.focus()}function a(o){if(o.keyCode!==Wa.TAB)return;if("region"===o.target?.getAttribute("role"))return;if(e.current===o.target)return;const r=o.shiftKey?"findPrevious":"findNext",i=Ga.focus.tabbable[r](o.target);i!==t.current&&i!==n.current||(o.preventDefault(),i.focus({preventScroll:!0}))}const{ownerDocument:c}=o,{defaultView:d}=c;return d.addEventListener("keydown",a),o.addEventListener("keydown",r),o.addEventListener("focusout",s),()=>{d.removeEventListener("keydown",a),o.removeEventListener("keydown",r),o.removeEventListener("focusout",s)}}),[]);return[b,(0,m.useMergeRefs)([e,v]),k]}(),o=(0,g.useSelect)((e=>e(ji).hasMultiSelection()),[]);return[e,(0,m.useMergeRefs)([t,Pw(),Iw(),xw(),Cw(),Bw(),bw(),_w(),vw(),(0,m.useRefEffect)((e=>(e.tabIndex=0,e.dataset.hasMultiSelection=o,o?(e.setAttribute("aria-label",(0,T.__)("Multiple selected blocks")),()=>{delete e.dataset.hasMultiSelection,e.removeAttribute("aria-label")}):()=>{delete e.dataset.hasMultiSelection})),[o])]),n]}var Aw=(0,h.forwardRef)((function({children:e,...t},n){const[o,r,i]=Rw();return(0,d.jsxs)(d.Fragment,{children:[o,(0,d.jsx)("div",{...t,ref:(0,m.useMergeRefs)([r,n]),className:ms(t.className,"block-editor-writing-flow"),children:e}),i]})}));let Nw=null;function Lw({frameSize:e,containerWidth:t,maxContainerWidth:n,scaleContainerWidth:o}){return(Math.min(t,n)-2*e)/o}function Dw({frameSize:e,iframeDocument:t,maxContainerWidth:n=750,scale:o}){const[r,{height:i}]=(0,m.useResizeObserver)(),[s,{width:l,height:a}]=(0,m.useResizeObserver)(),c=(0,h.useRef)(0),u=1!==o,d=(0,m.useReducedMotion)(),p="auto-scaled"===o,g=(0,h.useRef)(!1),f=(0,h.useRef)(null);(0,h.useEffect)((()=>{u||(c.current=l)}),[l,u]);const b=Math.max(c.current,l),k=p?Lw({frameSize:e,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:b}):o,v=(0,h.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),_=(0,h.useRef)({scaleValue:k,frameSize:e,containerHeight:0,scrollTop:0,scrollHeight:0}),y=(0,h.useCallback)((()=>{const{scrollTop:e}=v.current,{scrollTop:n}=_.current;return t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top",`${e}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next",`${n}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior",v.current.scrollHeight===v.current.containerHeight?"auto":"scroll"),t.documentElement.classList.add("zoom-out-animation"),t.documentElement.animate(function(e,t){const{scaleValue:n,frameSize:o,scrollTop:r}=e,{scaleValue:i,frameSize:s,scrollTop:l}=t;return[{translate:"0 0",scale:n,paddingTop:o/n+"px",paddingBottom:o/n+"px"},{translate:`0 ${r-l}px`,scale:i,paddingTop:s/i+"px",paddingBottom:s/i+"px"}]}(v.current,_.current),{easing:"cubic-bezier(0.46, 0.03, 0.52, 0.96)",duration:400})}),[t]),x=(0,h.useCallback)((()=>{g.current=!1,f.current=null,t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",_.current.scaleValue),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${_.current.frameSize}px`),t.documentElement.classList.remove("zoom-out-animation"),t.documentElement.scrollTop=_.current.scrollTop,t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-scroll-top-next"),t.documentElement.style.removeProperty("--wp-block-editor-iframe-zoom-out-overflow-behavior"),v.current=_.current}),[t]),S=(0,h.useRef)(!1);return(0,h.useEffect)((()=>{const e=t&&S.current!==u;if(S.current=u,e&&(g.current=!0,u))return t.documentElement.classList.add("is-zoomed-out"),()=>{t.documentElement.classList.remove("is-zoomed-out")}}),[t,u]),(0,h.useEffect)((()=>{if(t&&(p&&1!==v.current.scaleValue&&(v.current.scaleValue=Lw({frameSize:v.current.frameSize,containerWidth:l,maxContainerWidth:n,scaleContainerWidth:l})),k<1&&(g.current||(t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale",k),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-frame-size",`${e}px`)),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-content-height",`${i}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-inner-height",`${a}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-container-width",`${l}px`),t.documentElement.style.setProperty("--wp-block-editor-iframe-zoom-out-scale-container-width",`${b}px`)),g.current))if(g.current=!1,f.current){f.current.reverse();const e=v.current,t=_.current;v.current=t,_.current=e}else v.current.scrollTop=t.documentElement.scrollTop,v.current.scrollHeight=t.documentElement.scrollHeight,v.current.containerHeight=a,_.current={scaleValue:k,frameSize:e,containerHeight:t.documentElement.clientHeight},_.current.scrollHeight=function(e,t){const{scaleValue:n,scrollHeight:o}=e,{frameSize:r,scaleValue:i}=t;return o*(i/n)+2*r}(v.current,_.current),_.current.scrollTop=function(e,t){const{containerHeight:n,frameSize:o,scaleValue:r,scrollTop:i}=e,{containerHeight:s,frameSize:l,scaleValue:a,scrollHeight:c}=t;let u=i;u=(u+n/2-o)/r-n/2,u=(u+s/2)*a+l-s/2,u=i<=o?0:u;const d=c-s;return Math.round(Math.min(Math.max(0,u),Math.max(0,d)))}(v.current,_.current),f.current=y(),d?x():f.current.onfinish=x}),[y,x,d,p,k,e,t,i,l,a,n,b]),{isZoomedOut:u,scaleContainerWidth:b,contentResizeListener:r,containerResizeListener:s}}function Ow(e,t,n){const o={};for(const t in e)o[t]=e[t];if(e instanceof n.contentDocument.defaultView.MouseEvent){const e=n.getBoundingClientRect();o.clientX+=e.left,o.clientY+=e.top}const r=new t(e.type,o);o.defaultPrevented&&r.preventDefault();!n.dispatchEvent(r)&&e.preventDefault()}function zw(e){return(0,m.useRefEffect)((()=>{const{defaultView:t}=e;if(!t)return;const{frameElement:n}=t,o=e.documentElement,r=["dragover","mousemove"],i={};for(const e of r)i[e]=e=>{const t=Object.getPrototypeOf(e).constructor.name;Ow(e,window[t],n)},o.addEventListener(e,i[e]);return()=>{for(const e of r)o.removeEventListener(e,i[e])}}))}function Vw({contentRef:e,children:t,tabIndex:n=0,scale:o=1,frameSize:r=0,readonly:i,forwardedRef:s,title:l=(0,T.__)("Editor canvas"),...a}){const{resolvedAssets:c,isPreviewMode:u}=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji),n=t();return{resolvedAssets:n.__unstableResolvedAssets,isPreviewMode:n.isPreviewMode}}),[]),{styles:p="",scripts:f=""}=c,[b,k]=(0,h.useState)(),[v,_]=(0,h.useState)([]),y=PS(),[x,S,w]=Rw(),C=(0,m.useRefEffect)((e=>{let t;function n(e){e.preventDefault()}function o(e){"A"===e.target.tagName&&e.target.getAttribute("href")?.startsWith("#")&&(e.preventDefault(),t.defaultView.location.hash=e.target.getAttribute("href").slice(1))}e._load=()=>{k(e.contentDocument)};const{ownerDocument:r}=e;function i(){const{contentDocument:i}=e,{documentElement:s}=i;t=i,s.classList.add("block-editor-iframe__html"),y(s),i.dir=r.dir;for(const e of Nw||(Nw=Array.from(document.styleSheets).reduce(((e,t)=>{try{t.cssRules}catch(t){return e}const{ownerNode:n,cssRules:o}=t;if(null===n)return e;if(!o)return e;if(n.id.startsWith("wp-"))return e;if(!n.id)return e;if(function e(t){return Array.from(t).find((({selectorText:t,conditionText:n,cssRules:o})=>n?e(o):t&&(t.includes(".editor-styles-wrapper")||t.includes(".wp-block"))))}(o)){const t="STYLE"===n.tagName;if(t){const t=n.id.replace("-inline-css","-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}if(e.push(n.cloneNode(!0)),!t){const t=n.id.replace("-css","-inline-css"),o=document.getElementById(t);o&&e.push(o.cloneNode(!0))}}return e}),[]),Nw))i.getElementById(e.id)||(i.head.appendChild(e.cloneNode(!0)),u||console.warn(`${e.id} was added to the iframe incorrectly. Please use block.json or enqueue_block_assets to add styles to the iframe.`,e));t.addEventListener("dragover",n,!1),t.addEventListener("drop",n,!1),t.addEventListener("click",o)}return _(Array.from(r.body.classList).filter((e=>e.startsWith("admin-color-")||e.startsWith("post-type-")||"wp-embed-responsive"===e))),e.addEventListener("load",i),()=>{delete e._load,e.removeEventListener("load",i),t?.removeEventListener("dragover",n),t?.removeEventListener("drop",n),t?.removeEventListener("click",o)}}),[]),{contentResizeListener:B,containerResizeListener:I,isZoomedOut:j,scaleContainerWidth:E}=Dw({scale:o,frameSize:parseInt(r),iframeDocument:b}),M=(0,m.useDisabled)({isDisabled:!i}),P=(0,m.useMergeRefs)([zw(b),e,y,S,M]),R=`<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset="utf-8">\n\t\t<base href="${window.location.origin}">\n\t\t<script>window.frameElement._load()<\/script>\n\t\t<style>\n\t\t\thtml{\n\t\t\t\theight: auto !important;\n\t\t\t\tmin-height: 100%;\n\t\t\t}\n\t\t\t/* Lowest specificity to not override global styles */\n\t\t\t:where(body) {\n\t\t\t\tmargin: 0;\n\t\t\t\t/* Default background color in case zoom out mode background\n\t\t\t\tcolors the html element */\n\t\t\t\tbackground-color: white;\n\t\t\t}\n\t\t</style>\n\t\t${p}\n\t\t${f}\n\t</head>\n\t<body>\n\t\t<script>document.currentScript.parentElement.remove()<\/script>\n\t</body>\n</html>`,[A,N]=(0,h.useMemo)((()=>{const e=URL.createObjectURL(new window.Blob([R],{type:"text/html"}));return[e,()=>URL.revokeObjectURL(e)]}),[R]);(0,h.useEffect)((()=>N),[N]);const L=n>=0&&!u,D=(0,d.jsxs)(d.Fragment,{children:[L&&x,(0,d.jsx)("iframe",{...a,style:{...a.style,height:a.style?.height,border:0},ref:(0,m.useMergeRefs)([s,C]),tabIndex:n,src:A,title:l,onKeyDown:e=>{if(a.onKeyDown&&a.onKeyDown(e),e.currentTarget.ownerDocument!==e.target.ownerDocument){const{stopPropagation:t}=e.nativeEvent;e.nativeEvent.stopPropagation=()=>{},e.stopPropagation(),e.nativeEvent.stopPropagation=t,Ow(e,window.KeyboardEvent,e.currentTarget)}},children:b&&(0,h.createPortal)((0,d.jsxs)("body",{ref:P,className:ms("block-editor-iframe__body","editor-styles-wrapper",...v),children:[B,(0,d.jsx)(ws.__experimentalStyleProvider,{document:b,children:t})]}),b.documentElement)}),L&&w]});return(0,d.jsxs)("div",{className:"block-editor-iframe__container",children:[I,(0,d.jsx)("div",{className:ms("block-editor-iframe__scale-container",j&&"is-zoomed-out"),style:{"--wp-block-editor-iframe-zoom-out-scale-container-width":j&&`${E}px`},children:D})]})}var Fw=(0,h.forwardRef)((function(e,t){return(0,g.useSelect)((e=>e(ji).getSettings().__internalIsInitialized),[])?(0,d.jsx)(Vw,{...e,forwardedRef:t}):null}));const Hw={attribute:/\[\s*(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)\s*(?:(?<operator>\W?=)\s*(?<value>.+?)\s*(\s(?<caseSensitive>[iIsS]))?\s*)?\]/gu,id:/#(?<name>[-\w\P{ASCII}]+)/gu,class:/\.(?<name>[-\w\P{ASCII}]+)/gu,comma:/\s*,\s*/g,combinator:/\s*[\s>+~]\s*/g,"pseudo-element":/::(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,"pseudo-class":/:(?<name>[-\w\P{ASCII}]+)(?:\((?<argument>¶*)\))?/gu,universal:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?\*/gu,type:/(?:(?<namespace>\*|[-\w\P{ASCII}]*)\|)?(?<name>[-\w\P{ASCII}]+)/gu},Uw=new Set(["combinator","comma"]),Gw=(new Set(["not","is","where","has","matches","-moz-any","-webkit-any","nth-child","nth-last-child"]),e=>{switch(e){case"pseudo-element":case"pseudo-class":return new RegExp(Hw[e].source.replace("(?<argument>¶*)","(?<argument>.*)"),"gu");default:return Hw[e]}});function $w(e,t){let n=0,o="";for(;t<e.length;t++){const r=e[t];switch(r){case"(":++n;break;case")":--n}if(o+=r,0===n)return o}return o}const Ww=/(['"])([^\\\n]+?)\1/g,Kw=/\\./g;function Zw(e,t=Hw){if(""===(e=e.trim()))return[];const n=[];e=(e=e.replace(Kw,((e,t)=>(n.push({value:e,offset:t}),"".repeat(e.length))))).replace(Ww,((e,t,o,r)=>(n.push({value:e,offset:r}),`${t}${"".repeat(o.length)}${t}`)));{let t,o=0;for(;(t=e.indexOf("(",o))>-1;){const r=$w(e,t);n.push({value:r,offset:t}),e=`${e.substring(0,t)}(${"¶".repeat(r.length-2)})${e.substring(t+r.length)}`,o=t+r.length}}const o=function(e,t=Hw){if(!e)return[];const n=[e];for(const[e,o]of Object.entries(t))for(let t=0;t<n.length;t++){const r=n[t];if("string"!=typeof r)continue;o.lastIndex=0;const i=o.exec(r);if(!i)continue;const s=i.index-1,l=[],a=i[0],c=r.slice(0,s+1);c&&l.push(c),l.push({...i.groups,type:e,content:a});const u=r.slice(s+a.length+1);u&&l.push(u),n.splice(t,1,...l)}let o=0;for(const e of n)switch(typeof e){case"string":throw new Error(`Unexpected sequence ${e} found at index ${o}`);case"object":o+=e.content.length,e.pos=[o-e.content.length,o],Uw.has(e.type)&&(e.content=e.content.trim()||" ")}return n}(e,t),r=new Set;for(const e of n.reverse())for(const t of o){const{offset:n,value:o}=e;if(!(t.pos[0]<=n&&n+o.length<=t.pos[1]))continue;const{content:i}=t,s=n-t.pos[0];t.content=i.slice(0,s)+o+i.slice(s+o.length),t.content!==i&&r.add(t)}for(const e of r){const t=Gw(e.type);if(!t)throw new Error(`Unknown token type: ${e.type}`);t.lastIndex=0;const n=t.exec(e.content);if(!n)throw new Error(`Unable to parse content for ${e.type}: ${e.content}`);Object.assign(e,n.groups)}return o}function*qw(e,t){switch(e.type){case"list":for(let t of e.list)yield*qw(t,e);break;case"complex":yield*qw(e.left,e),yield*qw(e.right,e);break;case"compound":yield*e.list.map((t=>[t,e]));break;default:yield[e,t]}}var Yw=n(9656),Xw=n.n(Yw),Qw=n(356),Jw=n.n(Qw),eC=n(1443),tC=n.n(eC),nC=n(5404),oC=n.n(nC);const rC=new Map,iC=[{type:"type",content:"body"},{type:"type",content:"html"},{type:"pseudo-class",content:":root"},{type:"pseudo-class",content:":where(body)"},{type:"pseudo-class",content:":where(:root)"},{type:"pseudo-class",content:":where(html)"}];function sC(e,t){const n=Zw(t);let o=-1;for(let e=n.findLastIndex((({content:e,type:t})=>iC.some((n=>e===n.content&&t===n.type))))+1;e<n.length;e++)if("combinator"===n[e].type){o=e;break}const r=Zw(e);return n.splice(-1===o?n.length:o,0,{type:"combinator",content:" "},...r),function(e){let t;return t=Array.isArray(e)?e:[...qw(e)].map((([e])=>e)),t.map((e=>e.content)).join("")}(n)}var lC=(e,t="",n)=>{let o=rC.get(t);return o||(o=new WeakMap,rC.set(t,o)),e.map((e=>{let r=o.get(e);return r||(r=function({css:e,ignoredSelectors:t=[],baseURL:n},o="",r){if(!o&&!n)return e;try{const i=[...t,...r?.ignoredSelectors??[],o];return new(Xw())([o&&tC()({prefix:o,transform:(e,t,n)=>i.some((e=>e instanceof RegExp?t.match(e):t.includes(e)))?t:iC.some((e=>t.startsWith(e.content)))?sC(e,t):n}),n&&oC()({rootUrl:n})].filter(Boolean)).process(e,{}).css}catch(e){return e instanceof Jw()?console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e.message+"\n"+e.showSourceCode(!1)):console.warn("wp.blockEditor.transformStyles Failed to transform CSS.",e),null}}(e,t,n),o.set(e,r)),r}))};function aC(e,t){return(0,h.useCallback)((e=>{if(!e)return;const{ownerDocument:n}=e,{defaultView:o,body:r}=n,i=t?n.querySelector(t):r;let s;if(i)s=o?.getComputedStyle(i,null).getPropertyValue("background-color");else{const e=n.createElement("div");e.classList.add("editor-styles-wrapper"),r.appendChild(e),s=o?.getComputedStyle(e,null).getPropertyValue("background-color"),r.removeChild(e)}const l=wd(s);l.luminance()>.5||0===l.alpha()?r.classList.remove("is-dark-theme"):r.classList.add("is-dark-theme")}),[e,t])}Bd([Id,Td]);var cC=(0,h.memo)((function({styles:e,scope:t,transformOptions:n}){const o=(0,g.useSelect)((e=>G(e(ji)).getStyleOverrides()),[]),[r,i]=(0,h.useMemo)((()=>{const r=Object.values(e??[]);for(const[e,t]of o){const n=r.findIndex((({id:t})=>e===t)),o={...t,id:e};-1===n?r.push(o):r[n]=o}return[lC(r.filter((e=>e?.css)),t,n),r.filter((e=>"svgs"===e.__unstableType)).map((e=>e.assets)).join("")]}),[e,o,t,n]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{ref:aC(r,t)}),r.map(((e,t)=>(0,d.jsx)("style",{children:e},t))),(0,d.jsx)(ws.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 0 0",width:"0",height:"0",role:"none",style:{visibility:"hidden",position:"absolute",left:"-9999px",overflow:"hidden"},dangerouslySetInnerHTML:{__html:i}})]})}));const uC=(0,h.memo)(dw),dC=2e3,pC=[];function hC({viewportWidth:e,containerWidth:t,minHeight:n,additionalStyles:o=pC}){e||(e=t);const[r,{height:i}]=(0,m.useResizeObserver)(),{styles:s}=(0,g.useSelect)((e=>({styles:e(ji).getSettings().styles})),[]),l=(0,h.useMemo)((()=>s?[...s,{css:"body{height:auto;overflow:hidden;border:none;padding:0;}",__unstableType:"presets"},...o]:s),[s,o]),a=t/e,c=i?t/(i*a):0;return(0,d.jsx)(ws.Disabled,{className:"block-editor-block-preview__content",style:{transform:`scale(${a})`,aspectRatio:c,maxHeight:i>dC?dC*a:void 0,minHeight:n},children:(0,d.jsxs)(Fw,{contentRef:(0,m.useRefEffect)((e=>{const{ownerDocument:{documentElement:t}}=e;t.classList.add("block-editor-block-preview__content-iframe"),t.style.position="absolute",t.style.width="100%",e.style.boxSizing="border-box",e.style.position="absolute",e.style.width="100%"}),[]),"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:e,height:i,pointerEvents:"none",maxHeight:dC,minHeight:0!==a&&a<1&&n?n/a:n},children:[(0,d.jsx)(cC,{styles:l}),r,(0,d.jsx)(uC,{renderAppender:!1})]})})}function gC(e){const[t,{width:n}]=(0,m.useResizeObserver)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{position:"relative",width:"100%",height:0},children:t}),(0,d.jsx)("div",{className:"block-editor-block-preview__container",children:!!n&&(0,d.jsx)(hC,{...e,containerWidth:n})})]})}const mC=(0,window.wp.priorityQueue.createQueue)();const fC=[];const bC=(0,h.memo)((function({blocks:e,viewportWidth:t=1200,minHeight:n,additionalStyles:o=fC,__experimentalMinHeight:r,__experimentalPadding:i}){r&&(n=r,I()("The __experimentalMinHeight prop",{since:"6.2",version:"6.4",alternative:"minHeight"})),i&&(o=[...o,{css:`body { padding: ${i}px; }`}],I()("The __experimentalPadding prop of BlockPreview",{since:"6.2",version:"6.4",alternative:"additionalStyles"}));const s=(0,g.useSelect)((e=>e(ji).getSettings()),[]),l=(0,h.useMemo)((()=>({...s,focusMode:!1,isPreviewMode:!0})),[s]),a=(0,h.useMemo)((()=>Array.isArray(e)?e:[e]),[e]);return e&&0!==e.length?(0,d.jsx)(nv,{value:a,settings:l,children:(0,d.jsx)(gC,{viewportWidth:t,minHeight:n,additionalStyles:o})}):null}));bC.Async=function({children:e,placeholder:t}){const[n,o]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{const e={};return mC.add(e,(()=>{(0,h.flushSync)((()=>{o(!0)}))})),()=>{mC.cancel(e)}}),[]),n?e:t};var kC=bC;function vC({blocks:e,props:t={},layout:n}){const o=(0,g.useSelect)((e=>e(ji).getSettings()),[]),r=(0,h.useMemo)((()=>({...o,styles:void 0,focusMode:!1,isPreviewMode:!0})),[o]),i=(0,m.useDisabled)(),s=(0,m.useMergeRefs)([t.ref,i]),l=(0,h.useMemo)((()=>Array.isArray(e)?e:[e]),[e]),a=(0,d.jsxs)(nv,{value:l,settings:r,children:[(0,d.jsx)(cC,{}),(0,d.jsx)(mw,{renderAppender:!1,layout:n})]});return{...t,ref:s,className:ms(t.className,"block-editor-block-preview__live-content","components-disabled"),children:e?.length?a:null}}var _C=function({item:e}){const{name:t,title:n,icon:o,description:r,initialAttributes:i,example:s}=e,l=(0,p.isReusableBlock)(e),a=(0,h.useMemo)((()=>s?(0,p.getBlockFromExample)(t,{attributes:{...s.attributes,...i},innerBlocks:s.innerBlocks}):(0,p.createBlock)(t,i)),[t,s,i]),c=144,u=s?.viewportWidth??500,g=280/u,m=0!==g&&g<1?c/g:c;return(0,d.jsxs)("div",{className:"block-editor-inserter__preview-container",children:[(0,d.jsx)("div",{className:"block-editor-inserter__preview",children:l||s?(0,d.jsx)("div",{className:"block-editor-inserter__preview-content",children:(0,d.jsx)(kC,{blocks:a,viewportWidth:u,minHeight:c,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\t\t\tbody { \n\t\t\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\t\t\tmin-height:${Math.round(m)}px;\n\t\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t\t\t`}]})}):(0,d.jsx)("div",{className:"block-editor-inserter__preview-content-missing",children:(0,T.__)("No preview available.")})}),!l&&(0,d.jsx)(Xb,{title:n,icon:o,description:r})]})};var yC=(0,h.forwardRef)((function({isFirst:e,as:t,children:n,...o},r){return(0,d.jsx)(ws.Composite.Item,{ref:r,role:"option",accessibleWhenDisabled:!0,...o,render:o=>{const r={...o,tabIndex:e?0:o.tabIndex};return t?(0,d.jsx)(t,{...r,children:n}):"function"==typeof n?n(r):(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...r,children:n})}})})),xC=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"})});function SC({count:e,icon:t,isPattern:n,fadeWhenDisabled:o}){const r=n&&(0,T.__)("Pattern");return(0,d.jsx)("div",{className:"block-editor-block-draggable-chip-wrapper",children:(0,d.jsx)("div",{className:"block-editor-block-draggable-chip","data-testid":"block-draggable-chip",children:(0,d.jsxs)(ws.Flex,{justify:"center",className:"block-editor-block-draggable-chip__content",children:[(0,d.jsx)(ws.FlexItem,{children:t?(0,d.jsx)(Vu,{icon:t}):r||(0,T.sprintf)((0,T._n)("%d block","%d blocks",e),e)}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Vu,{icon:xC})}),o&&(0,d.jsx)(ws.FlexItem,{className:"block-editor-block-draggable-chip__disabled",children:(0,d.jsx)("span",{className:"block-editor-block-draggable-chip__disabled-icon"})})]})})})}var wC=({isEnabled:e,blocks:t,icon:n,children:o,pattern:r})=>{const i=(0,g.useSelect)((e=>{const{getBlockType:n}=e(p.store);return 1===t.length&&n(t[0].name)?.icon}),[t]),{startDragging:s,stopDragging:l}=G((0,g.useDispatch)(ji)),a=(0,h.useMemo)((()=>r?.type===it.user&&"unsynced"!==r?.syncStatus?[(0,p.createBlock)("core/block",{ref:r.id})]:void 0),[r?.type,r?.syncStatus,r?.id]);if(!e)return o({draggable:!1,onDragStart:void 0,onDragEnd:void 0});const c=a??t;return(0,d.jsx)(ws.Draggable,{__experimentalTransferDataType:"wp-blocks",transferData:{type:"inserter",blocks:c},onDragStart:e=>{s();for(const t of c){const n=`wp-block:${t.name}`;e.dataTransfer.items.add("",n)}},onDragEnd:()=>{l()},__experimentalDragComponent:(0,d.jsx)(SC,{count:t.length,icon:n||!r&&i,isPattern:!!r}),children:({onDraggableStart:e,onDraggableEnd:t})=>o({draggable:!0,onDragStart:e,onDragEnd:t})})};var CC=(0,h.memo)((function({className:e,isFirst:t,item:n,onSelect:o,onHover:r,isDraggable:i,...s}){const l=(0,h.useRef)(!1),a=n.icon?{backgroundColor:n.icon.background,color:n.icon.foreground}:{},c=(0,h.useMemo)((()=>[(0,p.createBlock)(n.name,n.initialAttributes,(0,p.createBlocksFromInnerBlocksTemplate)(n.innerBlocks))]),[n.name,n.initialAttributes,n.innerBlocks]),u=(0,p.isReusableBlock)(n)&&"unsynced"!==n.syncStatus||(0,p.isTemplatePart)(n);return(0,d.jsx)(wC,{isEnabled:i&&!n.isDisabled,blocks:c,icon:n.icon,children:({draggable:i,onDragStart:c,onDragEnd:p})=>(0,d.jsx)("div",{className:ms("block-editor-block-types-list__list-item",{"is-synced":u}),draggable:i,onDragStart:e=>{l.current=!0,c&&(r(null),c(e))},onDragEnd:e=>{l.current=!1,p&&p(e)},children:(0,d.jsxs)(yC,{isFirst:t,className:ms("block-editor-block-types-list__item",e),disabled:n.isDisabled,onClick:e=>{e.preventDefault(),o(n,(0,Wa.isAppleOS)()?e.metaKey:e.ctrlKey),r(null)},onKeyDown:e=>{const{keyCode:t}=e;t===Wa.ENTER&&(e.preventDefault(),o(n,(0,Wa.isAppleOS)()?e.metaKey:e.ctrlKey),r(null))},onMouseEnter:()=>{l.current||r(n)},onMouseLeave:()=>r(null),...s,children:[(0,d.jsx)("span",{className:"block-editor-block-types-list__item-icon",style:a,children:(0,d.jsx)(Vu,{icon:n.icon,showColors:!0})}),(0,d.jsx)("span",{className:"block-editor-block-types-list__item-title",children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:3,children:n.title})})]})})})}));var BC=(0,h.forwardRef)((function(e,t){const[n,o]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{n&&(0,Uo.speak)((0,T.__)("Use left and right arrow keys to move through blocks"))}),[n]),(0,d.jsx)("div",{ref:t,role:"listbox","aria-orientation":"horizontal",onFocus:()=>{o(!0)},onBlur:e=>{!e.currentTarget.contains(e.relatedTarget)&&o(!1)},...e})}));var IC=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(ws.Composite.Group,{role:"presentation",ref:t,...e})}));function jC(e,t){const n=[];for(let o=0,r=e.length;o<r;o+=t)n.push(e.slice(o,o+t));return n}var EC=function e({items:t=[],onSelect:n,onHover:o=()=>{},children:r,label:i,isDraggable:s=!0}){const l="block-editor-block-types-list",a=(0,m.useInstanceId)(e,l);return(0,d.jsxs)(BC,{className:l,"aria-label":i,children:[jC(t,3).map(((e,t)=>(0,d.jsx)(IC,{children:e.map(((e,r)=>(0,d.jsx)(CC,{item:e,className:(0,p.getBlockMenuDefaultClassName)(e.id),onSelect:n,onHover:o,isDraggable:s&&!e.isDisabled,isFirst:0===t&&0===r,rowId:`${a}-${t}`},e.id)))},t))),r]})};var TC=function({title:e,icon:t,children:n}){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"block-editor-inserter__panel-header",children:[(0,d.jsx)("h2",{className:"block-editor-inserter__panel-title",children:e}),(0,d.jsx)(ws.Icon,{icon:t})]}),(0,d.jsx)("div",{className:"block-editor-inserter__panel-content",children:n})]})};var MC=(e,t,n)=>{const o=(0,h.useMemo)((()=>({[pt]:!!n})),[n]),[r]=(0,g.useSelect)((t=>[t(ji).getInserterItems(e,o)]),[e,o]),{getClosestAllowedInsertionPoint:i}=G((0,g.useSelect)(ji)),{createErrorNotice:s}=(0,g.useDispatch)(pr.store),[l,a]=(0,g.useSelect)((e=>{const{getCategories:t,getCollections:n}=e(p.store);return[t(),n()]}),[]);return[r,l,a,(0,h.useCallback)((({name:n,initialAttributes:o,innerBlocks:r,syncStatus:l,content:a},c)=>{const u=i(n,e);if(null===u){const e=(0,p.getBlockType)(n)?.title??n;return void s((0,T.sprintf)((0,T.__)('Block "%s" can\'t be inserted.'),e),{type:"snackbar",id:"inserter-notice"})}const d="unsynced"===l?(0,p.parse)(a,{__unstableSkipMigrationLogs:!0}):(0,p.createBlock)(n,o,(0,p.createBlocksFromInnerBlocksTemplate)(r));t(d,void 0,c,u)}),[i,e,t,s])]};function PC({key:e,children:t}){return(0,d.jsx)(h.Fragment,{children:t},e)}var RC=function({children:e}){return(0,d.jsx)(ws.Composite,{focusShift:!0,focusWrap:"horizontal",render:PC,children:e})};var AC=function(){return(0,d.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,d.jsx)("p",{children:(0,T.__)("No results found.")})})};const NC=[];function LC({items:e,collections:t,categories:n,onSelectItem:o,onHover:r,showMostUsedBlocks:i,className:s}){const l=(0,h.useMemo)((()=>xt(e,"frecency","desc").slice(0,6)),[e]),a=(0,h.useMemo)((()=>e.filter((e=>!e.category))),[e]),c=(0,h.useMemo)((()=>{const n={...t};return Object.keys(t).forEach((t=>{n[t]=e.filter((e=>(e=>e.name.split("/")[0])(e)===t)),0===n[t].length&&delete n[t]})),n}),[e,t]);(0,h.useEffect)((()=>()=>r(null)),[]);const u=(0,m.useAsyncList)(n),p=n.length===u.length,g=(0,h.useMemo)((()=>Object.entries(t)),[t]),f=(0,m.useAsyncList)(p?g:NC);return(0,d.jsxs)("div",{className:s,children:[i&&e.length>3&&!!l.length&&(0,d.jsx)(TC,{title:(0,T._x)("Most used","blocks"),children:(0,d.jsx)(EC,{items:l,onSelect:o,onHover:r,label:(0,T._x)("Most used","blocks")})}),u.map((t=>{const n=e.filter((e=>e.category===t.slug));return n&&n.length?(0,d.jsx)(TC,{title:t.title,icon:t.icon,children:(0,d.jsx)(EC,{items:n,onSelect:o,onHover:r,label:t.title})},t.slug):null})),p&&a.length>0&&(0,d.jsx)(TC,{className:"block-editor-inserter__uncategorized-blocks-panel",title:(0,T.__)("Uncategorized"),children:(0,d.jsx)(EC,{items:a,onSelect:o,onHover:r,label:(0,T.__)("Uncategorized")})}),f.map((([e,t])=>{const n=c[e];return n&&n.length?(0,d.jsx)(TC,{title:t.title,icon:t.icon,children:(0,d.jsx)(EC,{items:n,onSelect:o,onHover:r,label:t.title})},e):null}))]})}var DC=(0,h.forwardRef)((function({rootClientId:e,onInsert:t,onHover:n,showMostUsedBlocks:o},r){const[i,s,l,a]=MC(e,t);if(!i.length)return(0,d.jsx)(AC,{});const c=[],u=[];for(const e of i)"reusable"!==e.category&&(e.isAllowedInCurrentRoot?c.push(e):u.push(e));return(0,d.jsx)(RC,{children:(0,d.jsxs)("div",{ref:r,children:[!!c.length&&(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(LC,{items:c,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__insertable-blocks-at-selection"})}),(0,d.jsx)(LC,{items:u,categories:s,collections:l,onSelectItem:a,onHover:n,showMostUsedBlocks:o,className:"block-editor-inserter__all-blocks"})]})})}));function OC({selectedCategory:e,patternCategories:t,onClickCategory:n}){const o="block-editor-block-patterns-explorer__sidebar";return(0,d.jsx)("div",{className:`${o}__categories-list`,children:t.map((({name:t,label:r})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:r,className:`${o}__categories-list__item`,isPressed:e===t,onClick:()=>{n(t)},children:r},t)))})}function zC({searchValue:e,setSearchValue:t}){return(0,d.jsx)("div",{className:"block-editor-block-patterns-explorer__search",children:(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,onChange:t,value:e,label:(0,T.__)("Search"),placeholder:(0,T.__)("Search")})})}var VC=function({selectedCategory:e,patternCategories:t,onClickCategory:n,searchValue:o,setSearchValue:r}){return(0,d.jsxs)("div",{className:"block-editor-block-patterns-explorer__sidebar",children:[(0,d.jsx)(zC,{searchValue:o,setSearchValue:r}),!o&&(0,d.jsx)(OC,{selectedCategory:e,patternCategories:t,onClickCategory:n})]})};function FC({currentPage:e,numPages:t,changePage:n,totalItems:o}){return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-patterns__grid-pagination-wrapper",children:[(0,d.jsx)(ws.__experimentalText,{variant:"muted",children:(0,T.sprintf)((0,T._n)("%s item","%s items",o),o)}),t>1&&(0,d.jsxs)(ws.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",className:"block-editor-patterns__grid-pagination",children:[(0,d.jsxs)(ws.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-previous",children:[(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(1),disabled:1===e,"aria-label":(0,T.__)("First page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"«"})}),(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(e-1),disabled:1===e,"aria-label":(0,T.__)("Previous page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"‹"})})]}),(0,d.jsx)(ws.__experimentalText,{variant:"muted",children:(0,T.sprintf)((0,T._x)("%1$s of %2$s","paging"),e,t)}),(0,d.jsxs)(ws.__experimentalHStack,{expanded:!1,spacing:1,className:"block-editor-patterns__grid-pagination-next",children:[(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(e+1),disabled:e===t,"aria-label":(0,T.__)("Next page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"›"})}),(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:()=>n(t),disabled:e===t,"aria-label":(0,T.__)("Last page"),size:"compact",accessibleWhenDisabled:!0,className:"block-editor-patterns__grid-pagination-button",children:(0,d.jsx)("span",{children:"»"})})]})]})]})}const HC=({showTooltip:e,title:t,children:n})=>e?(0,d.jsx)(ws.Tooltip,{text:t,children:n}):(0,d.jsx)(d.Fragment,{children:n});function UC({id:e,isDraggable:t,pattern:n,onClick:o,onHover:r,showTitlesAsTooltip:i,category:s,isSelected:l}){const[a,c]=(0,h.useState)(!1),{blocks:u,viewportWidth:g}=n,f=`block-editor-block-patterns-list__item-description-${(0,m.useInstanceId)(UC)}`,b=n.type===it.user,k=(0,h.useMemo)((()=>s&&t?(u??[]).map((e=>{const t=(0,p.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(s)&&(t.attributes.metadata.categories=[s]),t})):u),[u,t,s]);return(0,d.jsx)(wC,{isEnabled:t,blocks:k,pattern:n,children:({draggable:t,onDragStart:s,onDragEnd:p})=>(0,d.jsx)("div",{className:"block-editor-block-patterns-list__list-item",draggable:t,onDragStart:e=>{c(!0),s&&(r?.(null),s(e))},onDragEnd:e=>{c(!1),p&&p(e)},children:(0,d.jsx)(HC,{showTooltip:i&&!b,title:n.title,children:(0,d.jsxs)(ws.Composite.Item,{render:(0,d.jsx)("div",{role:"option","aria-label":n.title,"aria-describedby":n.description?f:void 0,className:ms("block-editor-block-patterns-list__item",{"block-editor-block-patterns-list__list-item-synced":n.type===it.user&&!n.syncStatus,"is-selected":l})}),id:e,onClick:()=>{o(n,u),r?.(null)},onMouseEnter:()=>{a||r?.(n)},onMouseLeave:()=>r?.(null),children:[(0,d.jsx)(kC.Async,{placeholder:(0,d.jsx)(GC,{}),children:(0,d.jsx)(kC,{blocks:u,viewportWidth:g})}),(!i||b)&&(0,d.jsxs)(ws.__experimentalHStack,{className:"block-editor-patterns__pattern-details",spacing:2,children:[b&&!n.syncStatus&&(0,d.jsx)("div",{className:"block-editor-patterns__pattern-icon-wrapper",children:(0,d.jsx)(Ol,{className:"block-editor-patterns__pattern-icon",icon:de})}),(0,d.jsx)("div",{className:"block-editor-block-patterns-list__item-title",children:n.title})]}),!!n.description&&(0,d.jsx)(ws.VisuallyHidden,{id:f,children:n.description})]})})})})}function GC(){return(0,d.jsx)("div",{className:"block-editor-block-patterns-list__item is-placeholder"})}var $C=(0,h.forwardRef)((function({isDraggable:e,blockPatterns:t,onHover:n,onClickPattern:o,orientation:r,label:i=(0,T.__)("Block patterns"),category:s,showTitlesAsTooltip:l,pagingProps:a},c){const[u,p]=(0,h.useState)(void 0),[g,m]=(0,h.useState)(null);(0,h.useEffect)((()=>{const e=t[0]?.name;p(e)}),[t]);const f=(e,t)=>{m(e.name),o(e,t)};return(0,d.jsxs)(ws.Composite,{orientation:r,activeId:u,setActiveId:p,role:"listbox",className:"block-editor-block-patterns-list","aria-label":i,ref:c,children:[t.map((t=>(0,d.jsx)(UC,{id:t.name,pattern:t,onClick:f,onHover:n,isDraggable:e,showTitlesAsTooltip:l,category:s,isSelected:!!g&&g===t.name},t.name))),a&&(0,d.jsx)(FC,{...a})]})}));function WC({destinationRootClientId:e,destinationIndex:t,rootClientId:n,registry:o}){if(n===e)return t;const r=["",...o.select(ji).getBlockParents(e),e],i=r.indexOf(n);return-1!==i?o.select(ji).getBlockIndex(r[i+1])+1:o.select(ji).getBlockOrder(n).length}var KC=function({rootClientId:e="",insertionIndex:t,clientId:n,isAppender:o,onSelect:r,shouldFocusBlock:i=!0,selectBlockOnInsert:s=!0}){const l=(0,g.useRegistry)(),{getSelectedBlock:a,getClosestAllowedInsertionPoint:c,isBlockInsertionPointVisible:u}=G((0,g.useSelect)(ji)),{destinationRootClientId:d,destinationIndex:m}=(0,g.useSelect)((r=>{const{getSelectedBlockClientId:i,getBlockRootClientId:s,getBlockIndex:l,getBlockOrder:a,getInsertionPoint:c}=G(r(ji)),u=i();let d,p=e;const h=c();return void 0!==t?d=t:h&&h.hasOwnProperty("index")?(p=h?.rootClientId?h.rootClientId:e,d=h.index):n?d=l(n):!o&&u?(p=s(u),d=l(u)+1):d=a(p).length,{destinationRootClientId:p,destinationIndex:d}}),[e,t,n,o]),{replaceBlocks:f,insertBlocks:b,showInsertionPoint:k,hideInsertionPoint:v,setLastFocus:_}=G((0,g.useDispatch)(ji)),y=(0,h.useCallback)(((e,t,n=!1,c)=>{(n||i||s)&&_(null);const u=a();!o&&u&&(0,p.isUnmodifiedDefaultBlock)(u,"content")?f(u.clientId,e,null,i||n?0:null,t):b(e,o||void 0===c?m:WC({destinationRootClientId:d,destinationIndex:m,rootClientId:c,registry:l}),o||void 0===c?d:c,s,i||n?0:null,t);const h=Array.isArray(e)?e.length:1,g=(0,T.sprintf)((0,T._n)("%d block added.","%d blocks added.",h),h);(0,Uo.speak)(g),r&&r(e)}),[o,a,f,b,d,m,r,i,s]),x=(0,h.useCallback)((e=>{if(e&&!u()){const t=c(e.name,d);null!==t&&k(t,WC({destinationRootClientId:d,destinationIndex:m,rootClientId:t,registry:l}))}else v()}),[c,u,k,v,d,m]);return[d,y,x]};var ZC=(e,t,n,o)=>{const r=(0,h.useMemo)((()=>({[pt]:!!o})),[o]),{patternCategories:i,patterns:s,userPatternCategories:l}=(0,g.useSelect)((e=>{const{getSettings:n,__experimentalGetAllowedPatterns:o}=G(e(ji)),{__experimentalUserPatternCategories:i,__experimentalBlockPatternCategories:s}=n();return{patterns:o(t,r),userPatternCategories:i,patternCategories:s}}),[t,r]),{getClosestAllowedInsertionPointForPattern:a}=G((0,g.useSelect)(ji)),c=(0,h.useMemo)((()=>{const e=[...i];return l?.forEach((t=>{e.find((e=>e.name===t.name))||e.push(t)})),e}),[i,l]),{createSuccessNotice:u}=(0,g.useDispatch)(pr.store),d=(0,h.useCallback)(((r,i)=>{const s=o?t:a(r,t);if(null===s)return;const l=r.type===it.user&&"unsynced"!==r.syncStatus?[(0,p.createBlock)("core/block",{ref:r.id})]:i;e((l??[]).map((e=>{const t=(0,p.cloneBlock)(e);return t.attributes.metadata?.categories?.includes(n)&&(t.attributes.metadata.categories=[n]),t})),r.name,!1,s),u((0,T.sprintf)((0,T.__)('Block pattern "%s" inserted.'),r.title),{type:"snackbar",id:"inserter-notice"})}),[u,e,n,t,a,o]);return[s,c,d]},qC=n(9681),YC=n.n(qC);function XC(e){return e.toLowerCase()}var QC=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],JC=/[^A-Z0-9]+/gi;function eB(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}const tB=e=>e.name||"",nB=e=>e.title,oB=e=>e.description||"",rB=e=>e.keywords||[],iB=e=>e.category,sB=()=>null,lB=[/([\p{Ll}\p{Lo}\p{N}])([\p{Lu}\p{Lt}])/gu,/([\p{Lu}\p{Lt}])([\p{Lu}\p{Lt}][\p{Ll}\p{Lo}])/gu],aB=new RegExp("(\\p{C}|\\p{P}|\\p{S})+","giu"),cB=new Map,uB=new Map;function dB(e=""){if(cB.has(e))return cB.get(e);const t=function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,o=void 0===n?QC:n,r=t.stripRegexp,i=void 0===r?JC:r,s=t.transform,l=void 0===s?XC:s,a=t.delimiter,c=void 0===a?" ":a,u=eB(eB(e,o,"$1\0$2"),i,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(l).join(c)}(e,{splitRegexp:lB,stripRegexp:aB}).split(" ").filter(Boolean);return cB.set(e,t),t}function pB(e=""){if(uB.has(e))return uB.get(e);let t=YC()(e);return t=t.replace(/^\//,""),t=t.toLowerCase(),uB.set(e,t),t}const hB=(e="")=>dB(pB(e)),gB=(e,t,n,o)=>{if(0===hB(o).length)return e;return mB(e,o,{getCategory:e=>t.find((({slug:t})=>t===e.category))?.title,getCollection:e=>n[e.name.split("/")[0]]?.title})},mB=(e=[],t="",n={})=>{if(0===hB(t).length)return e;const o=e.map((e=>[e,fB(e,t,n)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function fB(e,t,n={}){const{getName:o=tB,getTitle:r=nB,getDescription:i=oB,getKeywords:s=rB,getCategory:l=iB,getCollection:a=sB}=n,c=o(e),u=r(e),d=i(e),p=s(e),h=l(e),g=a(e),m=pB(t),f=pB(u);let b=0;if(m===f)b+=30;else if(f.startsWith(m))b+=20;else{const e=[c,u,d,...p,h,g].join(" ");0===((e,t)=>e.filter((e=>!hB(t).some((t=>t.includes(e))))))(dB(m),e).length&&(b+=10)}if(0!==b&&c.startsWith("core/")){b+=c!==e.id?1:2}return b}function bB(e,t,n,o=""){const[r,i]=(0,h.useState)(1),s=(0,m.usePrevious)(t),l=(0,m.usePrevious)(o);s===t&&l===o||1===r||i(1);const a=e.length,c=r-1,u=(0,h.useMemo)((()=>e.slice(20*c,20*c+20)),[c,e]),d=Math.ceil(e.length/20);return(0,h.useEffect)((function(){const e=(0,Ga.getScrollContainer)(n?.current);e?.scrollTo(0,0)}),[t,n]),{totalItems:a,categoryPatterns:u,numPages:d,changePage:e=>{const t=(0,Ga.getScrollContainer)(n?.current);t?.scrollTo(0,0),i(e)},currentPage:r}}function kB({filterValue:e,filteredBlockPatternsLength:t}){return e?(0,d.jsx)(ws.__experimentalHeading,{level:2,lineHeight:"48px",className:"block-editor-block-patterns-explorer__search-results-count",children:(0,T.sprintf)((0,T._n)("%d pattern found","%d patterns found",t),t)}):null}var vB=function({searchValue:e,selectedCategory:t,patternCategories:n,rootClientId:o,onModalClose:r}){const i=(0,h.useRef)(),s=(0,m.useDebounce)(Uo.speak,500),[l,a]=KC({rootClientId:o,shouldFocusBlock:!0}),[c,,u]=ZC(a,l,t),p=(0,h.useMemo)((()=>n.map((e=>e.name))),[n]),g=(0,h.useMemo)((()=>{const n=c.filter((e=>{if(t===at.name)return!0;if(t===ct.name&&e.type===it.user)return!0;if(t===ut.name&&e.blockTypes?.includes("core/post-content"))return!0;if("uncategorized"===t){const t=e.categories?.some((e=>p.includes(e)))??!1;return!e.categories?.length||!t}return e.categories?.includes(t)}));return e?mB(n,e):n}),[e,c,t,p]);(0,h.useEffect)((()=>{if(!e)return;const t=g.length,n=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",t),t);s(n)}),[e,s,g.length]);const f=bB(g,t,i),[b,k]=(0,h.useState)(e);e!==b&&(k(e),f.changePage(1));const v=!!g?.length;return(0,d.jsxs)("div",{className:"block-editor-block-patterns-explorer__list",ref:i,children:[(0,d.jsx)(kB,{filterValue:e,filteredBlockPatternsLength:g.length}),(0,d.jsx)(RC,{children:v&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)($C,{blockPatterns:f.categoryPatterns,onClickPattern:(e,t)=>{u(e,t),r()},isDraggable:!1}),(0,d.jsx)(FC,{...f})]})})]})};function _B(e,t="all"){const[n,o]=ZC(void 0,e),r=(0,h.useMemo)((()=>"all"===t?n:n.filter((e=>!dt(e,t)))),[t,n]),i=(0,h.useMemo)((()=>{const e=o.filter((e=>r.some((t=>t.categories?.includes(e.name))))).sort(((e,t)=>e.label.localeCompare(t.label)));return r.some((e=>!function(e,t){return!(!e.categories||!e.categories.length)&&e.categories.some((e=>t.some((t=>t.name===e))))}(e,o)))&&!e.find((e=>"uncategorized"===e.name))&&e.push({name:"uncategorized",label:(0,T._x)("Uncategorized")}),r.some((e=>e.blockTypes?.includes("core/post-content")))&&e.unshift(ut),r.some((e=>e.type===it.user))&&e.unshift(ct),r.length>0&&e.unshift({name:at.name,label:at.label}),(0,Uo.speak)((0,T.sprintf)((0,T._n)("%d category button displayed.","%d category buttons displayed.",e.length),e.length)),e}),[o,r]);return i}function yB({initialCategory:e,rootClientId:t,onModalClose:n}){const[o,r]=(0,h.useState)(""),[i,s]=(0,h.useState)(e?.name),l=_B(t);return(0,d.jsxs)("div",{className:"block-editor-block-patterns-explorer",children:[(0,d.jsx)(VC,{selectedCategory:i,patternCategories:l,onClickCategory:s,searchValue:o,setSearchValue:r}),(0,d.jsx)(vB,{searchValue:o,selectedCategory:i,patternCategories:l,rootClientId:t,onModalClose:n})]})}var xB=function({onModalClose:e,...t}){return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Patterns"),onRequestClose:e,isFullScreen:!0,children:(0,d.jsx)(yB,{onModalClose:e,...t})})};function SB({title:e}){return(0,d.jsx)(ws.__experimentalVStack,{spacing:0,children:(0,d.jsx)(ws.__experimentalView,{children:(0,d.jsx)(ws.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,d.jsxs)(ws.__experimentalHStack,{spacing:2,children:[(0,d.jsx)(ws.Navigator.BackButton,{style:{minWidth:24,padding:0},icon:(0,T.isRTL)()?Zb:qb,size:"small",label:(0,T.__)("Back")}),(0,d.jsx)(ws.__experimentalSpacer,{children:(0,d.jsx)(ws.__experimentalHeading,{level:5,children:e})})]})})})})}function wB({categories:e,children:t}){return(0,d.jsxs)(ws.Navigator,{initialPath:"/",className:"block-editor-inserter__mobile-tab-navigation",children:[(0,d.jsx)(ws.Navigator.Screen,{path:"/",children:(0,d.jsx)(ws.__experimentalItemGroup,{children:e.map((e=>(0,d.jsx)(ws.Navigator.Button,{path:`/category/${e.name}`,as:ws.__experimentalItem,isAction:!0,children:(0,d.jsxs)(ws.__experimentalHStack,{children:[(0,d.jsx)(ws.FlexBlock,{children:e.label}),(0,d.jsx)(Ol,{icon:(0,T.isRTL)()?qb:Zb})]})},e.name)))})}),e.map((e=>(0,d.jsxs)(ws.Navigator.Screen,{path:`/category/${e.name}`,children:[(0,d.jsx)(SB,{title:(0,T.__)("Back")}),t(e)]},e.name)))]})}const CB=e=>"all"!==e&&"user"!==e,BB=[{value:"all",label:(0,T._x)("All","patterns")},{value:it.directory,label:(0,T.__)("Pattern Directory")},{value:it.theme,label:(0,T.__)("Theme & Plugins")},{value:it.user,label:(0,T.__)("User")}];function IB({setPatternSyncFilter:e,setPatternSourceFilter:t,patternSyncFilter:n,patternSourceFilter:o,scrollContainerRef:r,category:i}){const s=i.name===ct.name?it.user:o,l=CB(s),a=(e=>e.name===ct.name)(i),c=(0,h.useMemo)((()=>[{value:"all",label:(0,T._x)("All","patterns")},{value:st,label:(0,T._x)("Synced","patterns"),disabled:l},{value:lt,label:(0,T._x)("Not synced","patterns"),disabled:l}]),[l]);return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.DropdownMenu,{popoverProps:{placement:"right-end"},label:(0,T.__)("Filter patterns"),toggleProps:{size:"compact"},icon:(0,d.jsx)(Ol,{icon:(0,d.jsx)(ws.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ws.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z",fill:"currentColor"})})}),children:()=>(0,d.jsxs)(d.Fragment,{children:[!a&&(0,d.jsx)(ws.MenuGroup,{label:(0,T.__)("Source"),children:(0,d.jsx)(ws.MenuItemsChoice,{choices:BB,onSelect:n=>{var o;t(o=n),CB(o)&&e("all"),r.current?.scrollTo(0,0)},value:s})}),(0,d.jsx)(ws.MenuGroup,{label:(0,T.__)("Type"),children:(0,d.jsx)(ws.MenuItemsChoice,{choices:c,onSelect:t=>{e(t),r.current?.scrollTo(0,0)},value:n})}),(0,d.jsx)("div",{className:"block-editor-inserter__patterns-filter-help",children:(0,h.createInterpolateElement)((0,T.__)("Patterns are available from the <Link>WordPress.org Pattern Directory</Link>, bundled in the active theme, or created by users on this site. Only patterns created on this site can be synced."),{Link:(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/patterns/")})})})]})})})}const jB=()=>{};function EB({rootClientId:e,onInsert:t,onHover:n=jB,category:o,showTitlesAsTooltip:r}){const[i,,s]=ZC(t,e,o?.name),[l,a]=(0,h.useState)("all"),[c,u]=(0,h.useState)("all"),p=_B(e,c),g=(0,h.useRef)(),m=(0,h.useMemo)((()=>i.filter((e=>!dt(e,c,l)&&(o.name===at.name||(o.name===ct.name&&e.type===it.user||(!(o.name!==ut.name||!e.blockTypes?.includes("core/post-content"))||("uncategorized"===o.name?!e.categories||!e.categories.some((e=>p.some((t=>t.name===e)))):e.categories?.includes(o.name)))))))),[i,p,o.name,c,l]),f=bB(m,o,g),{changePage:b}=f;(0,h.useEffect)((()=>()=>n(null)),[]);const k=(0,h.useCallback)((e=>{a(e),b(1)}),[a,b]),v=(0,h.useCallback)((e=>{u(e),b(1)}),[u,b]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.__experimentalVStack,{spacing:2,className:"block-editor-inserter__patterns-category-panel-header",children:[(0,d.jsxs)(ws.__experimentalHStack,{children:[(0,d.jsx)(ws.FlexBlock,{children:(0,d.jsx)(ws.__experimentalHeading,{className:"block-editor-inserter__patterns-category-panel-title",size:13,level:4,as:"div",children:o.label})}),(0,d.jsx)(IB,{patternSyncFilter:l,patternSourceFilter:c,setPatternSyncFilter:k,setPatternSourceFilter:v,scrollContainerRef:g,category:o})]}),!m.length&&(0,d.jsx)(ws.__experimentalText,{variant:"muted",className:"block-editor-inserter__patterns-category-no-results",children:(0,T.__)("No results found")})]}),m.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalText,{size:"12",as:"p",className:"block-editor-inserter__help-text",children:(0,T.__)("Drag and drop patterns into the canvas.")}),(0,d.jsx)($C,{ref:g,blockPatterns:f.categoryPatterns,onClickPattern:s,onHover:n,label:o.label,orientation:"vertical",category:o.name,isDraggable:!0,showTitlesAsTooltip:r,patternFilter:c,pagingProps:f})]})]})}const{Tabs:TB}=G(ws.privateApis);var MB=function({categories:e,selectedCategory:t,onSelectCategory:n,children:o}){const r={type:"tween",duration:(0,m.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]},i=(0,m.usePrevious)(t),s=t?t.name:null,[l,a]=(0,h.useState)(),c=e?.[0]?.name;return null===s&&!l&&c&&a(c),(0,d.jsxs)(TB,{selectOnMove:!1,selectedTabId:s,orientation:"vertical",onSelect:t=>{n(e.find((e=>e.name===t)))},activeTabId:l,onActiveTabIdChange:a,children:[(0,d.jsx)(TB.TabList,{className:"block-editor-inserter__category-tablist",children:e.map((e=>(0,d.jsx)(TB.Tab,{tabId:e.name,"aria-current":e===t?"true":void 0,children:e.label},e.name)))}),e.map((e=>(0,d.jsx)(TB.TabPanel,{tabId:e.name,focusable:!1,children:(0,d.jsx)(ws.__unstableMotion.div,{className:"block-editor-inserter__category-panel",initial:i?"open":"closed",animate:"open",variants:{open:{transform:"translateX( 0 )",transitionEnd:{zIndex:"1"}},closed:{transform:"translateX( -100% )",zIndex:"-1"}},transition:r,children:o})},e.name)))]})};var PB=function({onSelectCategory:e,selectedCategory:t,onInsert:n,rootClientId:o,children:r}){const[i,s]=(0,h.useState)(!1),l=_B(o),a=(0,m.useViewportMatch)("medium","<");return l.length?(0,d.jsxs)(d.Fragment,{children:[!a&&(0,d.jsxs)("div",{className:"block-editor-inserter__block-patterns-tabs-container",children:[(0,d.jsx)(MB,{categories:l,selectedCategory:t,onSelectCategory:e,children:r}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__patterns-explore-button",onClick:()=>s(!0),variant:"secondary",children:(0,T.__)("Explore all patterns")})]}),a&&(0,d.jsx)(wB,{categories:l,children:e=>(0,d.jsx)("div",{className:"block-editor-inserter__category-panel",children:(0,d.jsx)(EB,{onInsert:n,rootClientId:o,category:e},e.name)})}),i&&(0,d.jsx)(xB,{initialCategory:t||l[0],patternCategories:l,onModalClose:()=>s(!1),rootClientId:o})]}):(0,d.jsx)(AC,{})},RB=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const AB={image:"img",video:"video",audio:"audio"};function NB(e,t){const n={id:e.id||void 0,caption:e.caption||void 0},o=e.url,r=e.alt||void 0;"image"===t?(n.url=o,n.alt=r):["video","audio"].includes(t)&&(n.src=o);const i=AB[t],s=(0,d.jsx)(i,{src:e.previewUrl||o,alt:r,controls:"audio"===t||void 0,inert:"true",onError:({currentTarget:t})=>{t.src===e.previewUrl&&(t.src=o)}});return[(0,p.createBlock)(`core/${t}`,n),s]}const LB=["image"],DB={placement:"bottom-end",className:"block-editor-inserter__media-list__item-preview-options__popover"};function OB({category:e,media:t}){if(!e.getReportUrl)return null;const n=e.getReportUrl(t);return(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-inserter__media-list__item-preview-options",label:(0,T.__)("Options"),popoverProps:DB,icon:fv,children:()=>(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.MenuItem,{onClick:()=>window.open(n,"_blank").focus(),icon:RB,children:(0,T.sprintf)((0,T.__)("Report %s"),e.mediaType)})})})}function zB({onClose:e,onSubmit:t}){return(0,d.jsxs)(ws.Modal,{title:(0,T.__)("Insert external image"),onRequestClose:e,className:"block-editor-inserter-media-tab-media-preview-inserter-external-image-modal",children:[(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,children:[(0,d.jsx)("p",{children:(0,T.__)("This image cannot be uploaded to your Media Library, but it can still be inserted as an external image.")}),(0,d.jsx)("p",{children:(0,T.__)("External images can be removed by the external provider without warning and could even have legal compliance issues related to privacy legislation.")})]}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:e,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:t,children:(0,T.__)("Insert")})})]})]})}function VB({media:e,onClick:t,category:n}){const[o,r]=(0,h.useState)(!1),[i,s]=(0,h.useState)(!1),[l,a]=(0,h.useState)(!1),[c,u]=(0,h.useMemo)((()=>NB(e,n.mediaType)),[e,n.mediaType]),{createErrorNotice:m,createSuccessNotice:f}=(0,g.useDispatch)(pr.store),{getSettings:b,getBlock:k}=(0,g.useSelect)(ji),{updateBlockAttributes:v}=(0,g.useDispatch)(ji),_=(0,h.useCallback)((e=>{if(l)return;const n=b(),o=(0,p.cloneBlock)(e),{id:i,url:s,caption:c}=o.attributes;i||n.mediaUpload?i?t(o):(a(!0),window.fetch(s).then((e=>e.blob())).then((e=>{const r=(0,Ua.getFilename)(s)||"image.jpg",i=new File([e],r,{type:e.type});n.mediaUpload({filesList:[i],additionalData:{caption:c},onFileChange([e]){(0,$a.isBlobURL)(e.url)||(k(o.clientId)?v(o.clientId,{...o.attributes,id:e.id,url:e.url}):(t({...o,attributes:{...o.attributes,id:e.id,url:e.url}}),f((0,T.__)("Image uploaded and inserted."),{type:"snackbar",id:"inserter-notice"})),a(!1))},allowedTypes:LB,onError(e){m(e,{type:"snackbar",id:"inserter-notice"}),a(!1)}})})).catch((()=>{r(!0),a(!1)}))):r(!0)}),[l,b,t,f,v,m,k]),y="string"==typeof e.title?e.title:e.title?.rendered||(0,T.__)("no title"),x=(0,h.useCallback)((()=>s(!0)),[]),S=(0,h.useCallback)((()=>s(!1)),[]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(wC,{isEnabled:!0,blocks:[c],children:({draggable:t,onDragStart:o,onDragEnd:r})=>(0,d.jsx)("div",{className:ms("block-editor-inserter__media-list__list-item",{"is-hovered":i}),draggable:t,onDragStart:o,onDragEnd:r,children:(0,d.jsxs)("div",{onMouseEnter:x,onMouseLeave:S,children:[(0,d.jsx)(ws.Tooltip,{text:y,children:(0,d.jsx)(ws.Composite.Item,{render:(0,d.jsx)("div",{"aria-label":y,role:"option",className:"block-editor-inserter__media-list__item"}),onClick:()=>_(c),children:(0,d.jsxs)("div",{className:"block-editor-inserter__media-list__item-preview",children:[u,l&&(0,d.jsx)("div",{className:"block-editor-inserter__media-list__item-preview-spinner",children:(0,d.jsx)(ws.Spinner,{})})]})})}),!l&&(0,d.jsx)(OB,{category:n,media:e})]})})}),o&&(0,d.jsx)(zB,{onClose:()=>r(!1),onSubmit:()=>{t((0,p.cloneBlock)(c)),f((0,T.__)("Image inserted."),{type:"snackbar",id:"inserter-notice"}),r(!1)}})]})}var FB=function({mediaList:e,category:t,onClick:n,label:o=(0,T.__)("Media List")}){return(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-inserter__media-list","aria-label":o,children:e.map(((e,o)=>(0,d.jsx)(VB,{media:e,category:t,onClick:n},e.id||e.sourceId||o)))})};function HB({rootClientId:e,onInsert:t,category:n}){const[o,r,i]=(0,m.useDebouncedInput)(),{mediaList:s,isLoading:l}=function(e,t={}){const[n,o]=(0,h.useState)(),[r,i]=(0,h.useState)(!1),s=(0,h.useRef)();return(0,h.useEffect)((()=>{(async()=>{const n=JSON.stringify({category:e.name,...t});s.current=n,i(!0),o([]);const r=await(e.fetch?.(t));n===s.current&&(o(r),i(!1))})()}),[e.name,...Object.values(t)]),{mediaList:n,isLoading:r}}(n,{per_page:i?20:10,search:i}),a="block-editor-inserter__media-panel",c=n.labels.search_items||(0,T.__)("Search");return(0,d.jsxs)("div",{className:a,children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,className:`${a}-search`,onChange:r,value:o,label:c,placeholder:c}),l&&(0,d.jsx)("div",{className:`${a}-spinner`,children:(0,d.jsx)(ws.Spinner,{})}),!l&&!s?.length&&(0,d.jsx)(AC,{}),!l&&!!s?.length&&(0,d.jsx)(FB,{rootClientId:e,onClick:t,mediaList:s,category:n})]})}const UB=["image","video","audio"];var GB=function({rootClientId:e,selectedCategory:t,onSelectCategory:n,onInsert:o,children:r}){const i=function(e){const[t,n]=(0,h.useState)([]),o=(0,g.useSelect)((e=>G(e(ji)).getInserterMediaCategories()),[]),{canInsertImage:r,canInsertVideo:i,canInsertAudio:s}=(0,g.useSelect)((t=>{const{canInsertBlockType:n}=t(ji);return{canInsertImage:n("core/image",e),canInsertVideo:n("core/video",e),canInsertAudio:n("core/audio",e)}}),[e]);return(0,h.useEffect)((()=>{(async()=>{const e=[];if(!o)return;const t=new Map(await Promise.all(o.map((async e=>{if(e.isExternalResource)return[e.name,!0];let t=[];try{t=await e.fetch({per_page:1})}catch(e){}return[e.name,!!t.length]})))),l={image:r,video:i,audio:s};o.forEach((n=>{l[n.mediaType]&&t.get(n.name)&&e.push(n)})),e.length&&n(e)})()}),[r,i,s,o]),t}(e),s=(0,m.useViewportMatch)("medium","<"),l=(0,h.useCallback)((e=>{if(!e?.url)return;const[t]=NB(e,e.type);o(t)}),[o]),a=(0,h.useMemo)((()=>i.map((e=>({...e,label:e.labels.name})))),[i]);return a.length?(0,d.jsxs)(d.Fragment,{children:[!s&&(0,d.jsxs)("div",{className:"block-editor-inserter__media-tabs-container",children:[(0,d.jsx)(MB,{categories:a,selectedCategory:t,onSelectCategory:n,children:r}),(0,d.jsx)(Xa,{children:(0,d.jsx)(Ya,{multiple:!1,onSelect:l,allowedTypes:UB,render:({open:e})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:t=>{t.target.focus(),e()},className:"block-editor-inserter__media-library-button",variant:"secondary","data-unstable-ignore-focus-outside-for-relatedtarget":".media-modal",children:(0,T.__)("Open Media Library")})})})]}),s&&(0,d.jsx)(wB,{categories:a,children:t=>(0,d.jsx)(HB,{onInsert:o,rootClientId:e,category:t})})]}):(0,d.jsx)(AC,{})};const{Fill:$B,Slot:WB}=(0,ws.createSlotFill)("__unstableInserterMenuExtension");$B.Slot=WB;var KB=$B;const ZB=(e,t)=>t?(e.sort((({id:e},{id:n})=>{let o=t.indexOf(e),r=t.indexOf(n);return o<0&&(o=t.length),r<0&&(r=t.length),o-r})),e):e,qB=[];var YB=function({filterValue:e,onSelect:t,onHover:n,onHoverPattern:o,rootClientId:r,clientId:i,isAppender:s,__experimentalInsertionIndex:l,maxBlockPatterns:a,maxBlockTypes:c,showBlockDirectory:u=!1,isDraggable:p=!0,shouldFocusBlock:f=!0,prioritizePatterns:b,selectBlockOnInsert:k,isQuick:v}){const _=(0,m.useDebounce)(Uo.speak,500),{prioritizedBlocks:y}=(0,g.useSelect)((e=>{const t=e(ji).getBlockListSettings(r);return{prioritizedBlocks:t?.prioritizedInserterBlocks||qB}}),[r]),[x,S]=KC({onSelect:t,rootClientId:r,clientId:i,isAppender:s,insertionIndex:l,shouldFocusBlock:f,selectBlockOnInsert:k}),[w,C,B,I]=MC(x,S,v),[j,,E]=ZC(S,x,void 0,v),M=(0,h.useMemo)((()=>{if(0===a)return[];const t=mB(j,e);return void 0!==a?t.slice(0,a):t}),[e,j,a]);let P=c;b&&M.length>2&&(P=0);const R=(0,h.useMemo)((()=>{if(0===P)return[];let t=xt(w.filter((e=>"core/block"!==e.name)),"frecency","desc");!e&&y.length&&(t=ZB(t,y));const n=gB(t,C,B,e);return void 0!==P?n.slice(0,P):n}),[e,w,C,B,P,y]);(0,h.useEffect)((()=>{if(!e)return;const t=R.length+M.length,n=(0,T.sprintf)((0,T._n)("%d result found.","%d results found.",t),t);_(n)}),[e,_,R,M]);const A=(0,m.useAsyncList)(R,{step:9}),N=R.length>0||M.length>0,L=!!R.length&&(0,d.jsx)(TC,{title:(0,d.jsx)(ws.VisuallyHidden,{children:(0,T.__)("Blocks")}),children:(0,d.jsx)(EC,{items:A,onSelect:I,onHover:n,label:(0,T.__)("Blocks"),isDraggable:p})}),D=!!M.length&&(0,d.jsx)(TC,{title:(0,d.jsx)(ws.VisuallyHidden,{children:(0,T.__)("Block patterns")}),children:(0,d.jsx)("div",{className:"block-editor-inserter__quick-inserter-patterns",children:(0,d.jsx)($C,{blockPatterns:M,onClickPattern:E,onHover:o,isDraggable:p})})});return(0,d.jsxs)(RC,{children:[!u&&!N&&(0,d.jsx)(AC,{}),b?D:L,!!R.length&&!!M.length&&(0,d.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),b?L:D,u&&(0,d.jsx)(KB.Slot,{fillProps:{onSelect:I,onHover:n,filterValue:e,hasItems:N,rootClientId:x},children:e=>e.length?e:N?null:(0,d.jsx)(AC,{})})]})},XB=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const{Tabs:QB}=G(ws.privateApis);var JB=(0,h.forwardRef)((function({defaultTabId:e,onClose:t,onSelect:n,selectedTab:o,tabs:r,closeButtonLabel:i},s){return(0,d.jsx)("div",{className:"block-editor-tabbed-sidebar",children:(0,d.jsxs)(QB,{selectOnMove:!1,defaultTabId:e,onSelect:n,selectedTabId:o,children:[(0,d.jsxs)("div",{className:"block-editor-tabbed-sidebar__tablist-and-close-button",children:[(0,d.jsx)(ws.Button,{className:"block-editor-tabbed-sidebar__close-button",icon:XB,label:i,onClick:()=>t(),size:"compact"}),(0,d.jsx)(QB.TabList,{className:"block-editor-tabbed-sidebar__tablist",ref:s,children:r.map((e=>(0,d.jsx)(QB.Tab,{tabId:e.name,className:"block-editor-tabbed-sidebar__tab",children:e.title},e.name)))})]}),r.map((e=>(0,d.jsx)(QB.TabPanel,{tabId:e.name,focusable:!1,className:"block-editor-tabbed-sidebar__tabpanel",ref:e.panelRef,children:e.panel},e.name)))]})})}));function eI(e=!0){const{setZoomLevel:t,resetZoomLevel:n}=G((0,g.useDispatch)(ji)),{isZoomedOut:o,isZoomOut:r}=(0,g.useSelect)((e=>{const{isZoomOut:t}=G(e(ji));return{isZoomedOut:t(),isZoomOut:t}}),[]),i=(0,h.useRef)(!1),s=(0,h.useRef)(e);(0,h.useEffect)((()=>{o!==s.current&&(i.current=!1)}),[o]),(0,h.useEffect)((()=>(s.current=e,e!==r()&&(i.current=!0,e?t("auto-scaled"):n()),()=>{i.current&&r()&&n()})),[e,r,n,t])}const tI=()=>{};const nI=(0,h.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,onSelect:r,showInserterHelpPanel:i,showMostUsedBlocks:s,__experimentalFilterValue:l="",shouldFocusBlock:a=!0,onPatternCategorySelection:c,onClose:u,__experimentalInitialTab:p,__experimentalInitialCategory:f},b){const{isZoomOutMode:k,hasSectionRootClientId:v}=(0,g.useSelect)((e=>{const{isZoomOut:t,getSectionRootClientId:n}=G(e(ji));return{isZoomOutMode:t(),hasSectionRootClientId:!!n()}}),[]),[_,y,x]=(0,m.useDebouncedInput)(l),[S,w]=(0,h.useState)(null),[C,B]=(0,h.useState)(f),[I,j]=(0,h.useState)("all"),[E,M]=(0,h.useState)(null),P=(0,m.useViewportMatch)("large"),[R,A]=(0,h.useState)(p||(k?"patterns":"blocks"));eI(v&&("patterns"===R||"media"===R)&&P);const[N,L,D]=KC({rootClientId:e,clientId:t,isAppender:n,insertionIndex:o,shouldFocusBlock:a}),O=(0,h.useRef)(),z=(0,h.useCallback)(((e,t,n,o)=>{L(e,t,n,o),r(e),window.requestAnimationFrame((()=>{a||O.current?.contains(b.current.ownerDocument.activeElement)||O.current?.querySelector("button").focus()}))}),[L,r,a]),V=(0,h.useCallback)(((e,t,...n)=>{D(!1),L(e,{patternName:t},...n),r()}),[L,r]),F=(0,h.useCallback)((e=>{D(e),w(e)}),[D,w]),H=(0,h.useCallback)(((e,t)=>{B(e),j(t),c?.()}),[B,c]),U="patterns"===R&&!x&&!!C,$="media"===R&&!!E,W=(0,h.useMemo)((()=>"media"===R?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",onChange:e=>{S&&w(null),y(e)},value:_,label:(0,T.__)("Search"),placeholder:(0,T.__)("Search")}),!!x&&(0,d.jsx)(YB,{filterValue:x,onSelect:r,onHover:F,rootClientId:e,clientId:t,isAppender:n,__experimentalInsertionIndex:o,showBlockDirectory:!0,shouldFocusBlock:a,prioritizePatterns:"patterns"===R})]})),[R,S,w,y,_,x,r,F,a,t,e,o,n]),K=(0,h.useMemo)((()=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"block-editor-inserter__block-list",children:(0,d.jsx)(DC,{ref:O,rootClientId:N,onInsert:z,onHover:F,showMostUsedBlocks:s})}),i&&(0,d.jsxs)("div",{className:"block-editor-inserter__tips",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"h2",children:(0,T.__)("A tip for using the block editor")}),(0,d.jsx)(Kb,{})]})]})),[N,z,F,s,i]),Z=(0,h.useMemo)((()=>(0,d.jsx)(PB,{rootClientId:N,onInsert:V,onSelectCategory:H,selectedCategory:C,children:U&&(0,d.jsx)(EB,{rootClientId:N,onInsert:V,category:C,patternFilter:I,showTitlesAsTooltip:!0})})),[N,V,H,I,C,U]),q=(0,h.useMemo)((()=>(0,d.jsx)(GB,{rootClientId:N,selectedCategory:E,onSelectCategory:M,onInsert:z,children:$&&(0,d.jsx)(HB,{rootClientId:N,onInsert:z,category:E})})),[N,z,E,M,$]),Y=(0,h.useRef)();return(0,h.useLayoutEffect)((()=>{Y.current&&window.requestAnimationFrame((()=>{Y.current.querySelector('[role="tab"][aria-selected="true"]')?.focus()}))}),[]),(0,d.jsxs)("div",{className:ms("block-editor-inserter__menu",{"show-panel":U||$,"is-zoom-out":k}),ref:b,children:[(0,d.jsx)("div",{className:"block-editor-inserter__main-area",children:(0,d.jsx)(JB,{ref:Y,onSelect:e=>{"patterns"!==e&&B(null),A(e)},onClose:u,selectedTab:R,closeButtonLabel:(0,T.__)("Close Block Inserter"),tabs:[{name:"blocks",title:(0,T.__)("Blocks"),panel:(0,d.jsxs)(d.Fragment,{children:[W,"blocks"===R&&!x&&K]})},{name:"patterns",title:(0,T.__)("Patterns"),panel:(0,d.jsxs)(d.Fragment,{children:[W,"patterns"===R&&!x&&Z]})},{name:"media",title:(0,T.__)("Media"),panel:(0,d.jsxs)(d.Fragment,{children:[W,q]})}]})}),i&&S&&(0,d.jsx)(ws.Popover,{className:"block-editor-inserter__preview-container__popover",placement:"right-start",offset:16,focusOnMount:!1,animate:!1,children:(0,d.jsx)(_C,{item:S})})]})}));var oI=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(nI,{...e,onPatternCategorySelection:tI,ref:t})}));function rI({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:r,hasSearch:i=!0}){const[s,l]=(0,h.useState)(""),[a,c]=KC({onSelect:e,rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:r}),[u]=MC(a,c,!0),{setInserterIsOpened:p,insertionIndex:m}=(0,g.useSelect)((e=>{const{getSettings:t,getBlockIndex:o,getBlockCount:r}=e(ji),i=t(),s=o(n),l=r();return{setInserterIsOpened:i.__experimentalSetIsInserterOpened,insertionIndex:-1===s?l:s}}),[n]),f=i&&u.length>6;(0,h.useEffect)((()=>{p&&p(!1)}),[p]);return(0,d.jsxs)("div",{className:ms("block-editor-inserter__quick-inserter",{"has-search":f,"has-expand":p}),children:[f&&(0,d.jsx)(ws.SearchControl,{__nextHasNoMarginBottom:!0,className:"block-editor-inserter__search",value:s,onChange:e=>{l(e)},label:(0,T.__)("Search"),placeholder:(0,T.__)("Search")}),(0,d.jsx)("div",{className:"block-editor-inserter__quick-inserter-results",children:(0,d.jsx)(YB,{filterValue:s,onSelect:e,rootClientId:t,clientId:n,isAppender:o,maxBlockPatterns:s?2:0,maxBlockTypes:6,isDraggable:!1,selectBlockOnInsert:r,isQuick:!0})}),p&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-inserter__quick-inserter-expand",onClick:()=>{p({filterValue:s,onSelect:e,rootClientId:t,insertionIndex:m})},"aria-label":(0,T.__)("Browse all. This will open the main inserter panel in the editor toolbar."),children:(0,T.__)("Browse all")})]})}const iI=({onToggle:e,disabled:t,isOpen:n,blockTitle:o,hasSingleBlockType:r,toggleProps:i={}})=>{const{as:s=ws.Button,label:l,onClick:a,...c}=i;let u=l;return!u&&r?u=(0,T.sprintf)((0,T._x)("Add %s","directly add the only allowed block"),o):u||(u=(0,T._x)("Add block","Generic label for block inserter button")),(0,d.jsx)(s,{__next40pxDefaultSize:!i.as||void 0,icon:cc,label:u,tooltipPosition:"bottom",onClick:function(t){e&&e(t),a&&a(t)},className:"block-editor-inserter__toggle","aria-haspopup":!r&&"true","aria-expanded":!r&&n,disabled:t,...c})};class sI extends h.Component{constructor(){super(...arguments),this.onToggle=this.onToggle.bind(this),this.renderToggle=this.renderToggle.bind(this),this.renderContent=this.renderContent.bind(this)}onToggle(e){const{onToggle:t}=this.props;t&&t(e)}renderToggle({onToggle:e,isOpen:t}){const{disabled:n,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s,hasItems:l,renderToggle:a=iI}=this.props;return a({onToggle:e,isOpen:t,disabled:n||!l,blockTitle:o,hasSingleBlockType:r,directInsertBlock:i,toggleProps:s})}renderContent({onClose:e}){const{rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r,__experimentalIsQuick:i,onSelectOrClose:s,selectBlockOnInsert:l}=this.props;return i?(0,d.jsx)(rI,{onSelect:t=>{const n=Array.isArray(t)&&t?.length?t[0]:t;s&&"function"==typeof s&&s(n),e()},rootClientId:t,clientId:n,isAppender:o,selectBlockOnInsert:l}):(0,d.jsx)(oI,{onSelect:()=>{e()},rootClientId:t,clientId:n,isAppender:o,showInserterHelpPanel:r})}render(){const{position:e,hasSingleBlockType:t,directInsertBlock:n,insertOnlyAllowedBlock:o,__experimentalIsQuick:r,onSelectOrClose:i}=this.props;return t||n?this.renderToggle({onToggle:o}):(0,d.jsx)(ws.Dropdown,{className:"block-editor-inserter",contentClassName:ms("block-editor-inserter__popover",{"is-quick":r}),popoverProps:{position:e,shift:!0},onToggle:this.onToggle,expandOnMobile:!0,headerTitle:(0,T.__)("Add a block"),renderToggle:this.renderToggle,renderContent:this.renderContent,onClose:i})}}var lI=(0,m.compose)([(0,g.withSelect)(((e,{clientId:t,rootClientId:n,shouldDirectInsert:o=!0})=>{const{getBlockRootClientId:r,hasInserterItems:i,getAllowedBlocks:s,getDirectInsertBlock:l}=e(ji),{getBlockVariations:a}=e(p.store),c=s(n=n||r(t)||void 0),u=o&&l(n),d=1===c?.length&&0===a(c[0].name,"inserter")?.length;let h=!1;return d&&(h=c[0]),{hasItems:i(n),hasSingleBlockType:d,blockTitle:h?h.title:"",allowedBlockType:h,directInsertBlock:u,rootClientId:n}})),(0,g.withDispatch)(((e,t,{select:n})=>({insertOnlyAllowedBlock(){const{rootClientId:o,clientId:r,isAppender:i,hasSingleBlockType:s,allowedBlockType:l,directInsertBlock:a,onSelectOrClose:c,selectBlockOnInsert:u}=t;if(!s&&!a)return;const{insertBlock:d}=e(ji);let h;if(a){const e=function(e){const{getBlock:t,getPreviousBlockClientId:i}=n(ji);if(!e||!r&&!o)return{};const s={};let l={};if(r){const e=t(r),n=t(i(r));e?.name===n?.name&&(l=n?.attributes||{})}else{const e=t(o);if(e?.innerBlocks?.length){const t=e.innerBlocks[e.innerBlocks.length-1];a&&a?.name===t.name&&(l=t.attributes)}}return e.forEach((e=>{l.hasOwnProperty(e)&&(s[e]=l[e])})),s}(a.attributesToCopy);h=(0,p.createBlock)(a.name,{...a.attributes||{},...e})}else h=(0,p.createBlock)(l.name);d(h,function(){const{getBlockIndex:e,getBlockSelectionEnd:t,getBlockOrder:s,getBlockRootClientId:l}=n(ji);if(r)return e(r);const a=t();return!i&&a&&l(a)===o?e(a)+1:s(o).length}(),o,u),c&&c(h);const g=(0,T.sprintf)((0,T.__)("%s block added"),l.title);(0,Uo.speak)(g)}}))),(0,m.ifCondition)((({hasItems:e,isAppender:t,rootClientId:n,clientId:o})=>e||!t&&!n&&!o))])(sI);function aI({rootClientId:e,className:t,onFocus:n,tabIndex:o,onSelect:r},i){return(0,d.jsx)(lI,{position:"bottom center",rootClientId:e,__experimentalIsQuick:!0,onSelectOrClose:(...e)=>{r&&"function"==typeof r&&r(...e)},renderToggle:({onToggle:e,disabled:r,isOpen:s,blockTitle:l,hasSingleBlockType:a})=>{const c=!a,u=a?(0,T.sprintf)((0,T._x)("Add %s","directly add the only allowed block"),l):(0,T._x)("Add block","Generic label for block inserter button");return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,ref:i,onFocus:n,tabIndex:o,className:ms(t,"block-editor-button-block-appender"),onClick:e,"aria-haspopup":c?"true":void 0,"aria-expanded":c?s:void 0,disabled:r,label:u,showTooltip:!0,children:(0,d.jsx)(Ol,{icon:cc})})},isAppender:!0})}const cI=(0,h.forwardRef)(((e,t)=>(I()("wp.blockEditor.ButtonBlockerAppender",{alternative:"wp.blockEditor.ButtonBlockAppender",since:"5.9"}),aI(e,t))));var uI=(0,h.forwardRef)(aI);function dI({clientId:e,contentRef:t,parentLayout:n}){const o=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree),[]),r=bh(e);if(o||!r)return null;const i=n?.isManualPlacement&&window.__experimentalEnableGridInteractivity;return(0,d.jsx)(pI,{gridClientId:e,gridElement:r,isManualGrid:i,ref:t})}const pI=(0,h.forwardRef)((({gridClientId:e,gridElement:t,isManualGrid:n},o)=>{const[r,i]=(0,h.useState)((()=>$b(t))),[s,l]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{const e=()=>i($b(t)),n=new window.ResizeObserver(e);n.observe(t,{box:"border-box"});const o=new window.ResizeObserver(e);return o.observe(t),()=>{n.disconnect(),o.disconnect()}}),[t]),(0,h.useEffect)((()=>{function e(){l(!0)}function t(){l(!1)}return document.addEventListener("drag",e),document.addEventListener("dragend",t),()=>{document.removeEventListener("drag",e),document.removeEventListener("dragend",t)}}),[]),(0,d.jsx)(of,{className:ms("block-editor-grid-visualizer",{"is-dropping-allowed":s}),clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",children:(0,d.jsx)("div",{ref:o,className:"block-editor-grid-visualizer__grid",style:r.style,children:n?(0,d.jsx)(hI,{gridClientId:e,gridInfo:r}):Array.from({length:r.numItems},((e,t)=>(0,d.jsx)(gI,{color:r.currentColor},t)))})})}));function hI({gridClientId:e,gridInfo:t}){const[n,o]=(0,h.useState)(null),r=(0,g.useSelect)((t=>{const{getBlockOrder:n,getBlockStyles:o}=G(t(ji));return o(n(e))}),[e]),i=(0,h.useMemo)((()=>{const e=[];for(const t of Object.values(r)){const{columnStart:n,rowStart:o,columnSpan:r=1,rowSpan:i=1}=t?.layout??{};n&&o&&e.push(new Fb({columnStart:n,rowStart:o,columnSpan:r,rowSpan:i}))}return e}),[r]);return Vb(1,t.numRows).map((r=>Vb(1,t.numColumns).map((s=>{const l=i.some((e=>e.contains(s,r))),a=n?.contains(s,r)??!1;return(0,d.jsx)(gI,{color:t.currentColor,className:a&&"is-highlighted",children:l?(0,d.jsx)(fI,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o}):(0,d.jsx)(bI,{column:s,row:r,gridClientId:e,gridInfo:t,setHighlightedRect:o})},`${r}-${s}`)}))))}function gI({color:e,children:t,className:n}){return(0,d.jsx)("div",{className:ms("block-editor-grid-visualizer__cell",n),style:{boxShadow:`inset 0 0 0 1px color-mix(in srgb, ${e} 20%, #0000)`,color:e},children:t})}function mI(e,t,n,o,r){const{getBlockAttributes:i,getBlockRootClientId:s,canInsertBlockType:l,getBlockName:a}=(0,g.useSelect)(ji),{updateBlockAttributes:c,moveBlocksToPosition:u,__unstableMarkNextChangeAsNotPersistent:d}=(0,g.useDispatch)(ji),p=km(n,o.numColumns);return function({validateDrag:e,onDragEnter:t,onDragLeave:n,onDrop:o}){const{getDraggedBlockClientIds:r}=(0,g.useSelect)(ji);return(0,m.__experimentalUseDropZone)({onDragEnter(){const[n]=r();n&&e(n)&&t(n)},onDragLeave(){n()},onDrop(){const[t]=r();t&&e(t)&&o(t)}})}({validateDrag(r){const s=a(r);if(!l(s,n))return!1;const c=i(r),u=new Fb({columnStart:e,rowStart:t,columnSpan:c.style?.layout?.columnSpan,rowSpan:c.style?.layout?.rowSpan});return new Fb({columnSpan:o.numColumns,rowSpan:o.numRows}).containsRect(u)},onDragEnter(n){const o=i(n);r(new Fb({columnStart:e,rowStart:t,columnSpan:o.style?.layout?.columnSpan,rowSpan:o.style?.layout?.rowSpan}))},onDragLeave(){r((n=>n?.columnStart===e&&n?.rowStart===t?null:n))},onDrop(o){r(null);const l=i(o);c(o,{style:{...l.style,layout:{...l.style?.layout,columnStart:e,rowStart:t}}}),d(),u([o],s(o),n,p(e,t))}})}function fI({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){return(0,d.jsx)("div",{className:"block-editor-grid-visualizer__drop-zone",ref:mI(e,t,n,o,r)})}function bI({column:e,row:t,gridClientId:n,gridInfo:o,setHighlightedRect:r}){const{updateBlockAttributes:i,moveBlocksToPosition:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,g.useDispatch)(ji),a=km(n,o.numColumns);return(0,d.jsx)(uI,{rootClientId:n,className:"block-editor-grid-visualizer__appender",ref:mI(e,t,n,o,r),style:{color:o.currentColor},onSelect:o=>{o&&(i(o.clientId,{style:{layout:{columnStart:e,rowStart:t}}}),l(),s([o.clientId],n,n,a(e,t)))}})}function kI({clientId:e,bounds:t,onChange:n,parentLayout:o}){const r=bh(e),i=r?.parentElement,{isManualPlacement:s}=o;return r&&i?(0,d.jsx)(vI,{clientId:e,bounds:t,blockElement:r,rootBlockElement:i,onChange:n,isManualGrid:s&&window.__experimentalEnableGridInteractivity}):null}function vI({clientId:e,bounds:t,blockElement:n,rootBlockElement:o,onChange:r,isManualGrid:i}){const[s,l]=(0,h.useState)(null),[a,c]=(0,h.useState)({top:!1,bottom:!1,left:!1,right:!1});(0,h.useEffect)((()=>{const e=new window.ResizeObserver((()=>{const e=n.getBoundingClientRect(),t=o.getBoundingClientRect();c({top:e.top>t.top,bottom:e.bottom<t.bottom,left:e.left>t.left,right:e.right<t.right})}));return e.observe(n),()=>e.disconnect()}),[n,o]);const u={right:"left",left:"right"},p={top:"flex-end",bottom:"flex-start"},g={display:"flex",justifyContent:"center",alignItems:"center",...u[s]&&{justifyContent:u[s]},...p[s]&&{alignItems:p[s]}};return(0,d.jsx)(of,{className:"block-editor-grid-item-resizer",clientId:e,__unstablePopoverSlot:"__unstable-block-tools-after",additionalStyles:g,children:(0,d.jsx)(ws.ResizableBox,{className:"block-editor-grid-item-resizer__box",size:{width:"100%",height:"100%"},enable:{bottom:a.bottom,bottomLeft:!1,bottomRight:!1,left:a.left,right:a.right,top:a.top,topLeft:!1,topRight:!1},bounds:t,boundsByDirection:!0,onPointerDown:({target:e,pointerId:t})=>{e.setPointerCapture(t)},onResizeStart:(e,t)=>{l(t)},onResizeStop:(e,t,s)=>{const l=parseFloat(Hb(o,"column-gap")),a=parseFloat(Hb(o,"row-gap")),c=Ub(Hb(o,"grid-template-columns"),l),u=Ub(Hb(o,"grid-template-rows"),a),d=new window.DOMRect(n.offsetLeft+s.offsetLeft,n.offsetTop+s.offsetTop,s.offsetWidth,s.offsetHeight),p=Gb(c,d.left)+1,h=Gb(u,d.top)+1,g=Gb(c,d.right,"end")+1,m=Gb(u,d.bottom,"end")+1;r({columnSpan:g-p+1,rowSpan:m-h+1,columnStart:i?p:void 0,rowStart:i?h:void 0})}})})}var _I=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),yI=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});function xI({layout:e,parentLayout:t,onChange:n,gridClientId:o,blockClientId:r}){const{moveBlocksToPosition:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,g.useDispatch)(ji),l=e?.columnStart??1,a=e?.rowStart??1,c=l+(e?.columnSpan??1)-1,u=a+(e?.rowSpan??1)-1,p=t?.columnCount,h=t?.rowCount,m=km(o,p);return(0,d.jsx)(Rs,{group:"parent",children:(0,d.jsxs)(ws.ToolbarGroup,{className:"block-editor-grid-item-mover__move-button-container",children:[(0,d.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-left",children:(0,d.jsx)(SI,{icon:(0,T.isRTL)()?Zb:qb,label:(0,T.__)("Move left"),description:(0,T.__)("Move left"),isDisabled:l<=1,onClick:()=>{n({columnStart:l-1}),s(),i([r],o,o,m(l-1,a))}})}),(0,d.jsxs)("div",{className:"block-editor-grid-item-mover__move-vertical-button-container",children:[(0,d.jsx)(SI,{className:"is-up-button",icon:_I,label:(0,T.__)("Move up"),description:(0,T.__)("Move up"),isDisabled:a<=1,onClick:()=>{n({rowStart:a-1}),s(),i([r],o,o,m(l,a-1))}}),(0,d.jsx)(SI,{className:"is-down-button",icon:yI,label:(0,T.__)("Move down"),description:(0,T.__)("Move down"),isDisabled:h&&u>=h,onClick:()=>{n({rowStart:a+1}),s(),i([r],o,o,m(l,a+1))}})]}),(0,d.jsx)("div",{className:"block-editor-grid-item-mover__move-horizontal-button-container is-right",children:(0,d.jsx)(SI,{icon:(0,T.isRTL)()?qb:Zb,label:(0,T.__)("Move right"),description:(0,T.__)("Move right"),isDisabled:p&&c>=p,onClick:()=>{n({columnStart:l+1}),s(),i([r],o,o,m(l+1,a))}})})]})})}function SI({className:e,icon:t,label:n,isDisabled:o,onClick:r,description:i}){const s=`block-editor-grid-item-mover-button__description-${(0,m.useInstanceId)(SI)}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarButton,{className:ms("block-editor-grid-item-mover-button",e),icon:t,label:n,"aria-describedby":s,onClick:o?null:r,disabled:o,accessibleWhenDisabled:!0}),(0,d.jsx)(ws.VisuallyHidden,{id:s,children:i})]})}const wI={};function CI({clientId:e,style:t,setAttributes:n,allowSizingOnChildren:o,isManualPlacement:r,parentLayout:i}){const{rootClientId:s,isVisible:l}=(0,g.useSelect)((t=>{const{getBlockRootClientId:n,getBlockEditingMode:o,getTemplateLock:r}=t(ji),i=n(e);return r(i)||"default"!==o(i)?{rootClientId:i,isVisible:!1}:{rootClientId:i,isVisible:!0}}),[e]),[a,c]=(0,h.useState)();if(!l)return null;function u(e){n({style:{...t,layout:{...t?.layout,...e}}})}return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(dI,{clientId:s,contentRef:c,parentLayout:i}),o&&(0,d.jsx)(kI,{clientId:e,bounds:a,onChange:u,parentLayout:i}),r&&window.__experimentalEnableGridInteractivity&&(0,d.jsx)(xI,{layout:t?.layout,parentLayout:i,onChange:u,gridClientId:s,blockClientId:e})]})}var BI={useBlockProps:function({style:e}){const t=(0,g.useSelect)((e=>!e(ji).getSettings().disableLayoutStyles)),n=e?.layout??{},{selfStretch:o,flexSize:r,columnStart:i,rowStart:s,columnSpan:l,rowSpan:a}=n,c=ta()||{},{columnCount:u,minimumColumnWidth:d}=c,p=(0,m.useInstanceId)(wI),h=`.wp-container-content-${p}`;let f="";if(t&&("fixed"===o&&r?f=`${h} {\n\t\t\t\tflex-basis: ${r};\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}`:"fill"===o?f=`${h} {\n\t\t\t\tflex-grow: 1;\n\t\t\t}`:i&&l?f=`${h} {\n\t\t\t\tgrid-column: ${i} / span ${l};\n\t\t\t}`:i?f=`${h} {\n\t\t\t\tgrid-column: ${i};\n\t\t\t}`:l&&(f=`${h} {\n\t\t\t\tgrid-column: span ${l};\n\t\t\t}`),s&&a?f+=`${h} {\n\t\t\t\tgrid-row: ${s} / span ${a};\n\t\t\t}`:s?f+=`${h} {\n\t\t\t\tgrid-row: ${s};\n\t\t\t}`:a&&(f+=`${h} {\n\t\t\t\tgrid-row: span ${a};\n\t\t\t}`),(l||i)&&(d||!u))){let e=parseFloat(d);isNaN(e)&&(e=12);let t=d?.replace(e,"");["px","rem","em"].includes(t)||(t="rem");let n=2;n=l&&i?l+i-1:l||i;const o="px"===t?24:1.5,r=n*e+(n-1)*o,s=2*e+o-1,a=l&&l>1?"1/-1":"auto";f+=`@container (max-width: ${Math.max(r,s)}${t}) {\n\t\t\t\t${h} {\n\t\t\t\t\tgrid-column: ${a};\n\t\t\t\t\tgrid-row: auto;\n\t\t\t\t}\n\t\t\t}`}if(_s({css:f}),f)return{className:`wp-container-content-${p}`}},edit:function({clientId:e,style:t,setAttributes:n}){const o=ta()||{},{type:r="default",allowSizingOnChildren:i=!1,isManualPlacement:s}=o;return"grid"!==r?null:(0,d.jsx)(CI,{clientId:e,style:t,setAttributes:n,allowSizingOnChildren:i,isManualPlacement:s,parentLayout:o})},attributeKeys:["style"],hasSupport:()=>!0};var II={edit:function({clientId:e}){const{templateLock:t,isLockedByParent:n,isEditingAsBlocks:o}=(0,g.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=G(t(ji));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),{stopEditingAsBlocks:r}=G((0,g.useDispatch)(ji)),i=!n&&"contentOnly"===t,s=(0,h.useCallback)((()=>{r(e)}),[e,r]);return i||o?o&&!i&&(0,d.jsx)(Rs,{group:"other",children:(0,d.jsx)(ws.ToolbarButton,{onClick:s,children:(0,T.__)("Done")})}):null},hasSupport:()=>!0};const jI="metadata";(0,f.addFilter)("blocks.registerBlockType","core/metadata/addMetaAttribute",(function(e){return e?.attributes?.[jI]?.type||(e.attributes={...e.attributes,[jI]:{type:"object"}}),e})),(0,f.addFilter)("blocks.switchToBlockType.transformedBlock","core/metadata/addTransforms",(function(e,t,n,o){if(1===o.length&&e.innerBlocks.length===t.length)return e;if(1===o.length&&t.length>1||o.length>1&&1===t.length)return e;if(o.length>1&&t.length>1&&o.length!==t.length)return e;const r=t[n]?.attributes?.metadata;if(!r)return e;const i={};return r.noteId&&!e.attributes?.metadata?.noteId&&(i.noteId=r.noteId),r.name&&!e.attributes?.metadata?.name&&(0,p.hasBlockSupport)(e.name,"renaming",!0)&&(i.name=r.name),void 0!==r.blockVisibility&&!e.attributes?.metadata?.blockVisibility&&(0,p.hasBlockSupport)(e.name,"blockVisibility",!0)&&(i.blockVisibility=r.blockVisibility),Object.keys(i).length>0?{...e,attributes:{...e.attributes,metadata:{...e.attributes.metadata,...i}}}:e}));const EI={};var TI={edit:function({name:e,clientId:t,metadata:{ignoredHookedBlocks:n=[]}={}}){const o=(0,g.useSelect)((e=>e(p.store).getBlockTypes()),[]),r=(0,h.useMemo)((()=>o?.filter((({name:t,blockHooks:o})=>o&&e in o||n.includes(t)))),[o,e,n]),i=(0,g.useSelect)((n=>{const{getBlocks:o,getBlockRootClientId:i,getGlobalBlockCount:s}=n(ji),l=i(t),a=r.reduce(((n,r)=>{if(0===s(r.name))return n;const i=r?.blockHooks?.[e];let a;switch(i){case"before":case"after":a=o(l);break;case"first_child":case"last_child":a=o(t);break;case void 0:a=[...o(l),...o(t)]}const c=a?.find((e=>e.name===r.name));return c?{...n,[r.name]:c.clientId}:n}),{});return Object.values(a).length>0?a:EI}),[r,e,t]),{getBlockIndex:s,getBlockCount:l,getBlockRootClientId:a}=(0,g.useSelect)(ji),{insertBlock:c,removeBlock:u}=(0,g.useDispatch)(ji);if(!r.length)return null;const m=r.reduce(((e,t)=>{const[n]=t.name.split("/");return e[n]||(e[n]=[]),e[n].push(t),e}),{});return(0,d.jsx)(Fa,{children:(0,d.jsxs)(ws.PanelBody,{className:"block-editor-hooks__block-hooks",title:(0,T.__)("Plugins"),initialOpen:!0,children:[(0,d.jsx)("p",{className:"block-editor-hooks__block-hooks-helptext",children:(0,T.__)("Manage the inclusion of blocks added automatically by plugins.")}),Object.keys(m).map((n=>(0,d.jsxs)(h.Fragment,{children:[(0,d.jsx)("h3",{children:n}),m[n].map((n=>{const o=n.name in i;return(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,checked:o,label:n.title,onChange:()=>{if(o)u(i[n.name],!1);else{const o=n.blockHooks[e];((e,n)=>{const o=s(t),r=l(t),i=a(t);switch(n){case"before":case"after":c(e,"after"===n?o+1:o,i,!1);break;case"first_child":case"last_child":c(e,"first_child"===n?0:r,t,!1);break;case void 0:c(e,o+1,i,!1)}})((0,p.createBlock)(n.name),o)}}},n.title)}))]},n)))]})})},attributeKeys:["metadata"],hasSupport:()=>!0};const{Menu:MI}=G(ws.privateApis),PI={},RI=(e,t)=>{const n=(0,p.getBlockType)(e).attributes?.[t]?.type;return"rich-text"===n?"string":n};function AI({attribute:e,binding:t,sources:n}){const{clientId:o}=C(),{updateBlockBindings:r}=dv(),i=(0,m.useViewportMatch)("medium","<"),s=(0,h.useContext)(sv),{attributeType:l,select:a}=(0,g.useSelect)((t=>{const{name:n}=t(ji).getBlock(o);return{attributeType:RI(n,e),select:t}}),[o,e]);return(0,d.jsx)(MI,{placement:i?"bottom-start":"left-start",children:Object.entries(n).map((([n,o])=>{const c=o.data?.filter((e=>e?.type===l));return!c||0===c.length?null:(0,d.jsxs)(MI,{placement:i?"bottom-start":"left-start",children:[(0,d.jsx)(MI.SubmenuTriggerItem,{children:(0,d.jsx)(MI.ItemLabel,{children:o.label})}),(0,d.jsx)(MI.Popover,{gutter:8,children:(0,d.jsx)(MI.Group,{children:c.map((i=>{const l={source:n,args:i?.args||{key:i.key}},c=o.getValues({select:a,context:s,bindings:{[e]:l}});return(0,d.jsxs)(MI.CheckboxItem,{onChange:()=>{const n=E()(t?.args,i.args)??i.key===t?.args?.key;r(n?{[e]:void 0}:{[e]:l})},name:e+"-binding",value:c[e],checked:E()(t?.args,i.args)??i.key===t?.args?.key,children:[(0,d.jsx)(MI.ItemLabel,{children:i?.label}),(0,d.jsx)(MI.ItemHelpText,{children:c[e]})]},n+JSON.stringify(i.args)||i.key)}))})})]},n)}))})}function NI({attribute:e,binding:t,sources:n,blockName:o}){const{source:r,args:i}=t||{},s=n?.[r];let l,a=!0;if(void 0===t){const t=RI(o,e);l=Object.values(n).some((e=>e.data?.some((e=>e?.type===t))))?(0,T.__)("Not connected"):(0,T.__)("No sources available"),a=!0}else s?l=s.data?.find((e=>E()(e.args,i)))?.label||s.label||r:(a=!1,l=(0,T.__)("Source not registered"),0===Object.keys(n).length&&(l=(0,T.__)("No sources available")));return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-bindings__item",spacing:0,children:[(0,d.jsx)(ws.__experimentalText,{truncate:!0,children:e}),(0,d.jsx)(ws.__experimentalText,{truncate:!0,variant:a?"muted":void 0,isDestructive:!a,children:l})]})}function LI({attribute:e,binding:t,sources:n,blockName:o}){const r=(0,m.useViewportMatch)("medium","<");return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,children:(0,d.jsx)(MI,{placement:r?"bottom-start":"left-start",children:(0,d.jsx)(MI.TriggerButton,{render:(0,d.jsx)(ws.__experimentalItem,{}),disabled:!0,children:(0,d.jsx)(NI,{attribute:e,binding:t,sources:n,blockName:o})})})})}function DI({attribute:e,binding:t,sources:n,blockName:o}){const{updateBlockBindings:r}=dv(),i=(0,m.useViewportMatch)("medium","<");return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:e,onDeselect:()=>{r({[e]:void 0})},children:(0,d.jsxs)(MI,{placement:i?"bottom-start":"left-start",children:[(0,d.jsx)(MI.TriggerButton,{render:(0,d.jsx)(ws.__experimentalItem,{}),children:(0,d.jsx)(NI,{attribute:e,binding:t,sources:n,blockName:o})}),(0,d.jsx)(MI.Popover,{gutter:i?8:36,children:(0,d.jsx)(AI,{attribute:e,binding:t,sources:n})})]})})}var OI={edit:({name:e,metadata:t})=>{const n=(0,h.useContext)(sv),{removeAllBlockBindings:o}=dv(),r=(0,m.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}},i={},{sources:s,canUpdateBlockBindings:l,bindableAttributes:a}=(0,g.useSelect)((t=>{const{__experimentalBlockBindingsSupportedAttributes:o}=t(ji).getSettings(),r=o?.[e];if(!r||0===r.length)return PI;const s=(0,p.getBlockBindingsSources)();return Object.entries(s).forEach((([e,{getFieldsList:o,usesContext:r,label:s,getValues:l}])=>{const a={};if(r?.length)for(const e of r)a[e]=n[e];if(o){const n=o({select:t,context:a});i[e]={data:n||[],label:s,getValues:l}}else i[e]={data:[],label:s,getValues:l}})),{sources:Object.values(i).length>0?i:PI,canUpdateBlockBindings:t(ji).getSettings().canUpdateBlockBindings,bindableAttributes:r}}),[n,e]);if(!a||0===a.length)return null;const{bindings:c}=t||{},u=Object.values(s).some((e=>e.data&&e.data.length>0)),f=!l||!u;return void 0!==c||u?(0,d.jsx)(Fa,{group:"bindings",children:(0,d.jsxs)(ws.__experimentalToolsPanel,{label:(0,T.__)("Attributes"),resetAll:()=>{o()},dropdownMenuProps:r,className:"block-editor-bindings__panel",children:[(0,d.jsx)(ws.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:a.map((t=>{const n=c?.[t],o=RI(e,t),r=Object.values(s).some((e=>e.data?.some((e=>e?.type===o))));return f||!r?(0,d.jsx)(LI,{attribute:t,binding:n,sources:s,blockName:e},t):(0,d.jsx)(DI,{attribute:t,binding:n,sources:s,blockName:e},t)}))}),(0,d.jsx)(ws.__experimentalText,{as:"div",variant:"muted",children:(0,d.jsx)("p",{children:(0,T.__)("Attributes connected to custom fields or other dynamic data.")})})]})}):null},attributeKeys:["metadata"],hasSupport:e=>!["core/post-date","core/navigation-link","core/navigation-submenu"].includes(e)};function zI(e,t,n,o,r=1,i=1){for(let s=i;;s++)for(let l=s===i?r:1;l<=t;l++){const t=new Fb({columnStart:l,rowStart:s,columnSpan:n,rowSpan:o});if(!e.some((e=>e.intersectsRect(t))))return[l,s]}}function VI(e){!function({clientId:e}){const{gridLayout:t,blockOrder:n,selectedBlockLayout:o}=(0,g.useSelect)((t=>{const{getBlockAttributes:n,getBlockOrder:o}=t(ji),r=t(ji).getSelectedBlock();return{gridLayout:n(e).layout??{},blockOrder:o(e),selectedBlockLayout:r?.attributes.style?.layout}}),[e]),{getBlockAttributes:r,getBlockRootClientId:i}=(0,g.useSelect)(ji),{updateBlockAttributes:s,__unstableMarkNextChangeAsNotPersistent:l}=(0,g.useDispatch)(ji),a=(0,h.useMemo)((()=>o?new Fb(o):null),[o]),c=(0,m.usePrevious)(a),u=(0,m.usePrevious)(t.isManualPlacement),d=(0,m.usePrevious)(n);(0,h.useEffect)((()=>{const o={};if(t.isManualPlacement){const s=[];for(const e of n){const{columnStart:t,rowStart:n,columnSpan:o=1,rowSpan:i=1}=r(e).style?.layout??{};t&&n&&s.push(new Fb({columnStart:t,rowStart:n,columnSpan:o,rowSpan:i}))}for(const e of n){const n=r(e),{columnStart:i,rowStart:l,columnSpan:a=1,rowSpan:u=1}=n.style?.layout??{};if(i&&l)continue;const[d,p]=zI(s,t.columnCount,a,u,c?.columnEnd,c?.rowEnd);s.push(new Fb({columnStart:d,rowStart:p,columnSpan:a,rowSpan:u})),o[e]={style:{...n.style,layout:{...n.style?.layout,columnStart:d,rowStart:p}}}}const l=Math.max(...s.map((e=>e.rowEnd)));(!t.rowCount||t.rowCount<l)&&(o[e]={layout:{...t,rowCount:l}});for(const e of d??[])if(!n.includes(e)){const t=i(e);if(null===t)continue;const n=r(t);if("grid"===n?.layout?.type)continue;const s=r(e),{columnStart:l,rowStart:a,columnSpan:c,rowSpan:u,...d}=s.style?.layout??{};if(l||a||c||u){const t=0===Object.keys(d).length;o[e]=me(s,["style","layout"],t?void 0:d)}}}else{if(!0===u)for(const e of n){const t=r(e),{columnStart:n,rowStart:i,...s}=t.style?.layout??{};if(n||i){const n=0===Object.keys(s).length;o[e]=me(t,["style","layout"],n?void 0:s)}}t.rowCount&&(o[e]={layout:{...t,rowCount:void 0}})}Object.keys(o).length&&(l(),s(Object.keys(o),o,!0))}),[e,t,d,n,c,u,l,r,i,s])}(e)}function FI({clientId:e,layout:t}){const n=(0,g.useSelect)((t=>{const{isBlockSelected:n,isDraggingBlocks:o,getTemplateLock:r,getBlockEditingMode:i}=t(ji);return!(!o()&&!n(e)||r(e)||"default"!==i(e))}),[e]);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(VI,{clientId:e}),n&&(0,d.jsx)(dI,{clientId:e,parentLayout:t})]})}(0,f.addFilter)("blocks.registerBlockType","core/metadata/addLabelCallback",(function(e){return e.__experimentalLabel||(0,p.hasBlockSupport)(e,"renaming",!0)&&(e.__experimentalLabel=(e,{context:t})=>{const{metadata:n}=e;if("list-view"===t&&n?.name)return n.name}),e}));const HI=(0,m.createHigherOrderComponent)((e=>t=>"grid"!==t.attributes.layout?.type?(0,d.jsx)(e,{...t},"edit"):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(FI,{clientId:t.clientId,layout:t.attributes.layout}),(0,d.jsx)(e,{...t},"edit")]})),"addGridVisualizerToBlockEdit");function UI(e){const t=e.style?.border||{};return{className:Lp(e)||void 0,style:kf({border:t})}}function GI(e){const{colors:t}=Nd(),n=UI(e),{borderColor:o}=e;if(o){const e=Ip({colors:t,namedColor:o});n.style.borderColor=e.color}return n}function $I(e){return{style:kf({shadow:e.style?.shadow||""})}}function WI(e){const{backgroundColor:t,textColor:n,gradient:o,style:r}=e,i=Ad("background-color",t),s=Ad("color",n),l=Op(o),a=l||r?.color?.gradient;return{className:ms(s,l,{[i]:!a&&!!i,"has-text-color":n||r?.color?.text,"has-background":t||r?.color?.background||o||r?.color?.gradient,"has-link-color":r?.elements?.link?.color})||void 0,style:kf({color:r?.color||{}})}}function KI(e){const{backgroundColor:t,textColor:n,gradient:o}=e,[r,i,s,l,a,c]=Ti("color.palette.custom","color.palette.theme","color.palette.default","color.gradients.custom","color.gradients.theme","color.gradients.default"),u=(0,h.useMemo)((()=>[...r||[],...i||[],...s||[]]),[r,i,s]),d=(0,h.useMemo)((()=>[...l||[],...a||[],...c||[]]),[l,a,c]),p=WI(e);if(t){const e=Pd(u,t);p.style.backgroundColor=e.color}if(o&&(p.style.background=zp(d,o)),n){const e=Pd(u,n);p.style.color=e.color}return p}function ZI(e){const{style:t}=e;return{style:kf({spacing:t?.spacing||{}})}}(0,f.addFilter)("editor.BlockEdit","core/editor/grid-visualizer",HI);const{kebabCase:qI}=G(ws.privateApis);function YI(e,t){let n=e?.style?.typography||{};n={...n,fontSize:Wi({size:e?.style?.typography?.fontSize},t)};const o=kf({typography:n}),r=e?.fontFamily?`has-${qI(e.fontFamily)}-font-family`:"";return{className:ms(r,e?.style?.typography?.textAlign?`has-text-align-${e?.style?.typography?.textAlign}`:"",Pg(e?.fontSize)),style:o}}function XI(e){const[t,n]=(0,h.useState)(e);return(0,h.useEffect)((()=>{e&&n(e)}),[e]),t}var QI;!function(e){e=e.map((e=>({...e,Edit:(0,h.memo)(e.edit)})));const t=(0,m.createHigherOrderComponent)((t=>n=>{const o=C();return[...e.map(((e,t)=>{const{Edit:r,hasSupport:i,attributeKeys:s=[],shareWithChildBlocks:l}=e;if(!(o[b]||o[k]&&l)||!i(n.name))return null;const a={};for(const e of s)n.attributes[e]&&(a[e]=n.attributes[e]);return(0,d.jsx)(r,{name:n.name,isSelected:n.isSelected,clientId:n.clientId,setAttributes:n.setAttributes,__unstableParentLayout:n.__unstableParentLayout,...a},t)})),(0,d.jsx)(t,{...n},"edit")]}),"withBlockEditHooks");(0,f.addFilter)("editor.BlockEdit","core/editor/hooks",t)}([ka,Kg,qu,Xu,Cf,Zf,Xg,lb,Lb,II,TI,OI,BI,Wu].filter(Boolean)),function(e){const t=(0,m.createHigherOrderComponent)((t=>n=>{const[o,r]=(0,h.useState)(Array(e.length).fill(void 0));return[...e.map(((e,t)=>{const{hasSupport:o,attributeKeys:i=[],useBlockProps:s,isMatch:l}=e,a={};for(const e of i)n.attributes[e]&&(a[e]=n.attributes[e]);return!Object.keys(a).length||!o(n.name)||l&&!l(a)?null:(0,d.jsx)(Ss,{index:t,useBlockProps:s,setAllWrapperProps:r,name:n.name,clientId:n.clientId,...a},t)})),(0,d.jsx)(t,{...n,wrapperProps:o.filter(Boolean).reduce(((e,t)=>({...e,...t,className:ms(e.className,t.className),style:{...e.style,...t.style}})),n.wrapperProps||{})},"edit")]}),"withBlockListBlockHooks");(0,f.addFilter)("editor.BlockListBlock","core/editor/hooks",t)}([ka,Kg,Ou,Cf,Ph,gf,Zf,jg,Ng,Xg,Dp,lb,Mb,BI]),QI=[ka,Kg,qu,Yu,Xu,Dp,Xg,Ph,Cf,jg,Ng],(0,f.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(function(e,t,n){return QI.reduce(((e,o)=>{const{hasSupport:r,attributeKeys:i=[],addSaveProps:s}=o,l={};for(const e of i)n[e]&&(l[e]=n[e]);return Object.keys(l).length&&r(t)?s(e,t,l):e}),e)}),0),(0,f.addFilter)("blocks.getSaveContent.extraProps","core/editor/hooks",(e=>(e.hasOwnProperty("className")&&!e.className&&delete e.className,e)));const{kebabCase:JI}=G(ws.privateApis),ej=([e,...t])=>e.toUpperCase()+t.join(""),tj=e=>(0,m.createHigherOrderComponent)((t=>n=>(0,d.jsx)(t,{...n,colors:e})),"withCustomColorPalette"),nj=()=>(0,m.createHigherOrderComponent)((e=>t=>{const[n,o,r]=Ti("color.palette.custom","color.palette.theme","color.palette.default"),i=(0,h.useMemo)((()=>[...n||[],...o||[],...r||[]]),[n,o,r]);return(0,d.jsx)(e,{...t,colors:i})}),"withEditorColorPalette");function oj(e,t){const n=e.reduce(((e,t)=>({...e,..."string"==typeof t?{[t]:JI(t)}:t})),{});return(0,m.compose)([t,e=>class extends h.Component{constructor(e){super(e),this.setters=this.createSetters(),this.colorUtils={getMostReadableColor:this.getMostReadableColor.bind(this)},this.state={}}getMostReadableColor(e){const{colors:t}=this.props;return function(e,t){const n=wd(t),o=({color:e})=>n.contrast(e),r=Math.max(...e.map(o));return e.find((e=>o(e)===r)).color}(t,e)}createSetters(){return Object.keys(n).reduce(((e,t)=>{const n=ej(t),o=`custom${n}`;return e[`set${n}`]=this.createSetColor(t,o),e}),{})}createSetColor(e,t){return n=>{const o=Rd(this.props.colors,n);this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,colors:t},o){return Object.entries(n).reduce(((n,[r,i])=>{const s=Pd(t,e[r],e[`custom${ej(r)}`]),l=o[r],a=l?.color;return a===s.color&&l?n[r]=l:n[r]={...s,class:Ad(i,s.slug)},n}),{})}render(){return(0,d.jsx)(e,{...{...this.props,colors:void 0,...this.state,...this.setters,colorUtils:this.colorUtils}})}}])}function rj(e){return(...t)=>{const n=tj(e);return(0,m.createHigherOrderComponent)(oj(t,n),"withCustomColors")}}function ij(...e){const t=nj();return(0,m.createHigherOrderComponent)(oj(e,t),"withColors")}var sj=function(e){const[t,n]=Ti("typography.fontSizes","typography.customFontSize");return(0,d.jsx)(ws.FontSizePicker,{...e,fontSizes:t,disableCustomFontSizes:!n})};const lj=[],aj=([e,...t])=>e.toUpperCase()+t.join("");var cj=(...e)=>{const t=e.reduce(((e,t)=>(e[t]=`custom${aj(t)}`,e)),{});return(0,m.createHigherOrderComponent)((0,m.compose)([(0,m.createHigherOrderComponent)((e=>t=>{const[n]=Ti("typography.fontSizes");return(0,d.jsx)(e,{...t,fontSizes:n||lj})}),"withFontSizes"),e=>class extends h.Component{constructor(e){super(e),this.setters=this.createSetters(),this.state={}}createSetters(){return Object.entries(t).reduce(((e,[t,n])=>(e[`set${aj(t)}`]=this.createSetFontSize(t,n),e)),{})}createSetFontSize(e,t){return n=>{const o=this.props.fontSizes?.find((({size:e})=>e===Number(n)));this.props.setAttributes({[e]:o&&o.slug?o.slug:void 0,[t]:o&&o.slug?void 0:n})}}static getDerivedStateFromProps({attributes:e,fontSizes:n},o){const r=(t,n)=>!o[n]||(e[n]?e[n]!==o[n].slug:o[n].size!==e[t]);if(!Object.values(t).some(r))return null;const i=Object.entries(t).filter((([e,t])=>r(t,e))).reduce(((t,[o,r])=>{const i=e[o],s=Tg(n,i,e[r]);return t[o]={...s,class:Pg(i)},t}),{});return{...o,...i}}render(){return(0,d.jsx)(e,{...{...this.props,fontSizes:void 0,...this.state,...this.setters}})}}]),"withFontSizes")};const uj=()=>{};var dj={name:"blocks",className:"block-editor-autocompleters__block",triggerPrefix:"/",useItems(e){const{rootClientId:t,selectedBlockId:n,prioritizedBlocks:o}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlock:n,getBlockListSettings:o,getBlockRootClientId:r}=e(ji),{getActiveBlockVariation:i}=e(p.store),s=t(),{name:l,attributes:a}=n(s),c=i(l,a),u=r(s);return{selectedBlockId:c?`${l}/${c.name}`:l,rootClientId:u,prioritizedBlocks:o(u)?.prioritizedInserterBlocks}}),[]),[r,i,s]=MC(t,uj,!0),l=(0,h.useMemo)((()=>(e.trim()?gB(r,i,s,e):ZB(xt(r,"frecency","desc"),o)).filter((e=>e.id!==n)).slice(0,9)),[e,n,r,i,s,o]);return[(0,h.useMemo)((()=>l.map((e=>{const{title:t,icon:n,isDisabled:o}=e;return{key:`block-${e.id}`,value:e,label:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Vu,{icon:n,showColors:!0},"icon"),t]}),isDisabled:o}}))),[l])]},allowContext:(e,t)=>!(/\S/.test(e)||/\S/.test(t)),getOptionCompletion(e){const{name:t,initialAttributes:n,innerBlocks:o,syncStatus:r,blocks:i}=e;return{action:"replace",value:"unsynced"===r?(i??[]).map((e=>(0,p.cloneBlock)(e))):(0,p.createBlock)(t,n,(0,p.createBlocksFromInnerBlocksTemplate)(o))}}};const pj=window.wp.apiFetch;var hj=n.n(pj),gj=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});var mj={name:"links",className:"block-editor-autocompleters__link",triggerPrefix:"[[",options:async e=>{let t=await hj()({path:(0,Ua.addQueryArgs)("/wp/v2/search",{per_page:10,search:e,type:"post",order_by:"menu_order"})});return t=t.filter((e=>""!==e.title)),t},getOptionKeywords:e=>[...e.title.split(/\s+/)],getOptionLabel:e=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Ol,{icon:"page"===e.subtype?pc:gj},"icon"),(0,vS.decodeEntities)(e.title)]}),getOptionCompletion:e=>(0,d.jsx)("a",{href:e.url,children:e.title})};const fj=[];function bj({completers:e=fj}){const{name:t}=C();return(0,h.useMemo)((()=>{let n=[...e,mj];return(t===(0,p.getDefaultBlockName)()||(0,p.getBlockSupport)(t,"__experimentalSlashInserter",!1))&&(n=[...n,dj]),(0,f.hasFilter)("editor.Autocomplete.completers")&&(n===e&&(n=n.map((e=>({...e})))),n=(0,f.applyFilters)("editor.Autocomplete.completers",n,t)),n}),[e,t])}var kj=function(e){return(0,d.jsx)(ws.Autocomplete,{...e,completers:bj(e)})},vj=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});var _j=function({isActive:e,label:t=(0,T.__)("Full height"),onToggle:n,isDisabled:o}){return(0,d.jsx)(ws.ToolbarButton,{isActive:e,icon:vj,label:t,onClick:()=>n(!e),disabled:o})};const yj=()=>{};var xj=function(e){const{label:t=(0,T.__)("Change matrix alignment"),onChange:n=yj,value:o="center",isDisabled:r}=e,i=(0,d.jsx)(ws.AlignmentMatrixControl.Icon,{value:o});return(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e,isOpen:n})=>(0,d.jsx)(ws.ToolbarButton,{onClick:e,"aria-haspopup":"true","aria-expanded":n,onKeyDown:t=>{n||t.keyCode!==Wa.DOWN||(t.preventDefault(),e())},label:t,icon:i,showTooltip:!0,disabled:r}),renderContent:()=>(0,d.jsx)(ws.AlignmentMatrixControl,{hasFocusBorder:!1,onChange:n,value:o})})};function Sj({clientId:e,maximumLength:t,context:n}){const o=(0,g.useSelect)((t=>{if(!e)return null;const{getBlockName:o,getBlockAttributes:r}=t(ji),{getBlockType:i,getActiveBlockVariation:s}=t(p.store),l=o(e),a=i(l);if(!a)return null;const c=r(e),u=(0,p.__experimentalGetBlockLabel)(a,c,n);if(u!==a.title)return u;const d=s(l,c);return d?.title||a.title}),[e,n]);if(!o)return null;if(t&&t>0&&o.length>t){const e="...";return o.slice(0,t-e.length)+e}return o}function wj({clientId:e,maximumLength:t,context:n}){return Sj({clientId:e,maximumLength:t,context:n})}var Cj=function({rootLabelText:e}){const{selectBlock:t,clearSelectedBlock:n}=(0,g.useDispatch)(ji),{clientId:o,parents:r,hasSelection:i}=(0,g.useSelect)((e=>{const{getSelectionStart:t,getSelectedBlockClientId:n,getEnabledBlockParents:o}=G(e(ji)),r=n();return{parents:o(r),clientId:r,hasSelection:!!t().clientId}}),[]),s=e||(0,T.__)("Document"),l=(0,h.useRef)();return fh(o,l),(0,d.jsxs)("ul",{className:"block-editor-block-breadcrumb",role:"list","aria-label":(0,T.__)("Block breadcrumb"),children:[(0,d.jsxs)("li",{className:i?void 0:"block-editor-block-breadcrumb__current","aria-current":i?void 0:"true",children:[i&&(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>{const e=l.current?.closest(".editor-styles-wrapper");n(),function(e){if(!e)return null;const t=Array.from(document.querySelectorAll('iframe[name="editor-canvas"]').values()).find((t=>(t.contentDocument||t.contentWindow.document)===e.ownerDocument))??e;return t?.closest('[role="region"]')??t}(e)?.focus()},children:s}),!i&&(0,d.jsx)("span",{children:s}),!!o&&(0,d.jsx)(Ol,{icon:oc,className:"block-editor-block-breadcrumb__separator"})]}),r.map((e=>(0,d.jsxs)("li",{children:[(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-block-breadcrumb__button",onClick:()=>t(e),children:(0,d.jsx)(wj,{clientId:e,maximumLength:35})}),(0,d.jsx)(Ol,{icon:oc,className:"block-editor-block-breadcrumb__separator"})]},e))),!!o&&(0,d.jsx)("li",{className:"block-editor-block-breadcrumb__current","aria-current":"true",children:(0,d.jsx)(wj,{clientId:o,maximumLength:35})})]})};function Bj(e){return(0,g.useSelect)((t=>{const{__unstableHasActiveBlockOverlayActive:n}=t(ji);return n(e)}),[e])}const Ij={placement:"top-start"},jj={...Ij,flip:!1,shift:!0},Ej={...Ij,flip:!0,shift:!1};function Tj(e,t,n,o,r){if(!e||!t)return jj;const i=n?.scrollTop||0,s=Qm(t),l=i+e.getBoundingClientRect().top,a=e.ownerDocument.documentElement.clientHeight,c=l+o,u=s.top>c,d=s.height>a-o;return r||!u&&!d?Ej:jj}function Mj({contentElement:e,clientId:t}){const n=bh(t),[o,r]=(0,h.useState)(0),{blockIndex:i,isSticky:s}=(0,g.useSelect)((e=>{const{getBlockIndex:n,getBlockAttributes:o}=e(ji);return{blockIndex:n(t),isSticky:rb(o(t))}}),[t]),l=(0,h.useMemo)((()=>{if(e)return(0,Ga.getScrollContainer)(e)}),[e]),[a,c]=(0,h.useState)((()=>Tj(e,n,l,o,s))),u=(0,m.useRefEffect)((e=>{r(e.offsetHeight)}),[]),d=(0,h.useCallback)((()=>c(Tj(e,n,l,o,s))),[e,n,l,o]);return(0,h.useLayoutEffect)(d,[i,d]),(0,h.useLayoutEffect)((()=>{if(!e||!n)return;const t=e?.ownerDocument?.defaultView;let o;t?.addEventHandler?.("resize",d);const r=n?.ownerDocument?.defaultView;return r.ResizeObserver&&(o=new r.ResizeObserver(d),o.observe(n)),()=>{t?.removeEventHandler?.("resize",d),o&&o.disconnect()}}),[d,e,n]),{...a,ref:u}}function Pj(e){const t=(0,g.useSelect)((t=>{const{getBlockRootClientId:n,getBlockParents:o,__experimentalGetBlockListSettingsForBlocks:r,isBlockInsertionPointVisible:i,getBlockInsertionPoint:s,getBlockOrder:l,hasMultiSelection:a,getLastMultiSelectedBlockClientId:c}=t(ji),u=o(e),d=r(u),p=u.find((e=>d[e]?.__experimentalCaptureToolbars));let h=!1;if(i()){const t=s();h=l(t.rootClientId)[t.index]===e}return{capturingClientId:p,isInsertionPointVisible:h,lastClientId:a()?c():null,rootClientId:n(e)}}),[e]);return t}function Rj({clientId:e,__unstableContentRef:t}){const{capturingClientId:n,isInsertionPointVisible:o,lastClientId:r,rootClientId:i}=Pj(e),s=Mj({contentElement:t?.current,clientId:e});return(0,d.jsx)(of,{clientId:n||e,bottomClientId:r,className:ms("block-editor-block-list__block-side-inserter-popover",{"is-insertion-point-visible":o}),__unstableContentRef:t,...s,children:(0,d.jsx)("div",{className:"block-editor-block-list__empty-block-inserter",children:(0,d.jsx)(lI,{position:"bottom right",rootClientId:i,clientId:e,__experimentalIsQuick:!0})})})}var Aj=({appendToOwnerDocument:e,children:t,clientIds:n,cloneClassname:o,elementId:r,onDragStart:i,onDragEnd:s,fadeWhenDisabled:l=!1,dragComponent:a})=>{const{srcRootClientId:c,isDraggable:u,icon:f,visibleInserter:b,getBlockType:k}=(0,g.useSelect)((e=>{const{canMoveBlocks:t,getBlockRootClientId:o,getBlockName:r,getBlockAttributes:i,isBlockInsertionPointVisible:s}=e(ji),{getBlockType:l,getActiveBlockVariation:a}=e(p.store),c=o(n[0]),u=r(n[0]),d=a(u,i(n[0]));return{srcRootClientId:c,isDraggable:t(n),icon:d?.icon||l(u)?.icon,visibleInserter:s(),getBlockType:l}}),[n]),v=(0,h.useRef)(!1),[_,y,x]=function(){const e=(0,h.useRef)(null),t=(0,h.useRef)(null),n=(0,h.useRef)(null),o=(0,h.useRef)(null);return(0,h.useEffect)((()=>()=>{o.current&&(clearInterval(o.current),o.current=null)}),[]),[(0,h.useCallback)((r=>{e.current=r.clientY,n.current=(0,Ga.getScrollContainer)(r.target),o.current=setInterval((()=>{if(n.current&&t.current){const e=n.current.scrollTop+t.current;n.current.scroll({top:e})}}),25)}),[]),(0,h.useCallback)((o=>{if(!n.current)return;const r=n.current.offsetHeight,i=e.current-n.current.offsetTop,s=o.clientY-n.current.offsetTop;if(o.clientY>i){const e=Math.max(r-i-50,0),n=Math.max(s-i-50,0),o=0===e||0===n?0:n/e;t.current=25*o}else if(o.clientY<i){const e=Math.max(i-50,0),n=Math.max(i-s-50,0),o=0===e||0===n?0:n/e;t.current=-25*o}else t.current=0}),[]),()=>{e.current=null,n.current=null,o.current&&(clearInterval(o.current),o.current=null)}]}(),{getAllowedBlocks:S,getBlockNamesByClientId:w,getBlockRootClientId:C}=(0,g.useSelect)(ji),{startDraggingBlocks:B,stopDraggingBlocks:I}=(0,g.useDispatch)(ji);(0,h.useEffect)((()=>()=>{v.current&&I()}),[]);const j=bh(n[0]),E=j?.closest("body");if((0,h.useEffect)((()=>{if(!E||!l)return;const e=(0,m.throttle)((e=>{if(!e.target.closest("[data-block]"))return;const t=w(n),o=e.target.closest("[data-block]").getAttribute("data-block"),r=S(o),i=w([o])[0];let s;if(0===r?.length){const e=C(o),n=w([e])[0],r=S(e);s=GS(k,r,t,n)}else s=GS(k,r,t,i);s||b?window?.document?.body?.classList?.remove("block-draggable-invalid-drag-token"):window?.document?.body?.classList?.add("block-draggable-invalid-drag-token")}),200);return E.addEventListener("dragover",e),()=>{E.removeEventListener("dragover",e)}}),[n,E,l,S,w,C,k,b]),!u)return t({draggable:!1});const T={type:"block",srcClientIds:n,srcRootClientId:c};return(0,d.jsx)(ws.Draggable,{appendToOwnerDocument:e,cloneClassname:o,__experimentalTransferDataType:"wp-blocks",transferData:T,onDragStart:e=>{window.requestAnimationFrame((()=>{B(n),v.current=!0,_(e),i&&i()}))},onDragOver:y,onDragEnd:()=>{I(),v.current=!1,x(),s&&s()},__experimentalDragComponent:void 0!==a?a:(0,d.jsx)(SC,{count:n.length,icon:f,fadeWhenDisabled:!0}),elementId:r,children:({onDraggableStart:e,onDraggableEnd:n})=>t({draggable:!0,onDragStart:e,onDragEnd:n})})};const Nj=(e,t)=>"up"===e?"horizontal"===t?(0,T.isRTL)()?"right":"left":"up":"down"===e?"horizontal"===t?(0,T.isRTL)()?"left":"right":"down":null;function Lj(e,t,n,o,r,i,s){const l=n+1;if(e>1)return function(e,t,n,o,r,i){const s=t+1;if(n&&o)return(0,T.__)("All blocks are selected, and cannot be moved");if(r>0&&!o){const t=Nj("down",i);if("down"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d down by one place"),e,s);if("left"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r>0&&o){const e=Nj("down",i);if("down"===e)return(0,T.__)("Blocks cannot be moved down as they are already at the bottom");if("left"===e)return(0,T.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,T.__)("Blocks cannot be moved right as they are already are at the rightmost position")}if(r<0&&!n){const t=Nj("up",i);if("up"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d up by one place"),e,s);if("left"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d left by one place"),e,s);if("right"===t)return(0,T.sprintf)((0,T.__)("Move %1$d blocks from position %2$d right by one place"),e,s)}if(r<0&&n){const e=Nj("up",i);if("up"===e)return(0,T.__)("Blocks cannot be moved up as they are already at the top");if("left"===e)return(0,T.__)("Blocks cannot be moved left as they are already are at the leftmost position");if("right"===e)return(0,T.__)("Blocks cannot be moved right as they are already are at the rightmost position")}}(e,n,o,r,i,s);if(o&&r)return(0,T.sprintf)((0,T.__)("Block %s is the only block, and cannot be moved"),t);if(i>0&&!r){const e=Nj("down",s);if("down"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d down to position %3$d"),t,l,l+1);if("left"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l+1);if("right"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l+1)}if(i>0&&r){const e=Nj("down",s);if("down"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the end of the content and can’t be moved down"),t);if("left"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the end of the content and can’t be moved left"),t);if("right"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the end of the content and can’t be moved right"),t)}if(i<0&&!o){const e=Nj("up",s);if("up"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d up to position %3$d"),t,l,l-1);if("left"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d left to position %3$d"),t,l,l-1);if("right"===e)return(0,T.sprintf)((0,T.__)("Move %1$s block from position %2$d right to position %3$d"),t,l,l-1)}if(i<0&&o){const e=Nj("up",s);if("up"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the beginning of the content and can’t be moved up"),t);if("left"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the beginning of the content and can’t be moved left"),t);if("right"===e)return(0,T.sprintf)((0,T.__)("Block %1$s is at the beginning of the content and can’t be moved right"),t)}}const Dj=(e,t)=>"up"===e?"horizontal"===t?(0,T.isRTL)()?Zb:qb:_I:"down"===e?"horizontal"===t?(0,T.isRTL)()?qb:Zb:yI:null,Oj=(e,t)=>"up"===e?"horizontal"===t?(0,T.isRTL)()?(0,T.__)("Move right"):(0,T.__)("Move left"):(0,T.__)("Move up"):"down"===e?"horizontal"===t?(0,T.isRTL)()?(0,T.__)("Move left"):(0,T.__)("Move right"):(0,T.__)("Move down"):null,zj=(0,h.forwardRef)((({clientIds:e,direction:t,orientation:n,...o},r)=>{const i=(0,m.useInstanceId)(zj),s=Array.isArray(e)?e:[e],l=s.length,{disabled:a}=o,{blockType:c,isDisabled:u,rootClientId:h,isFirst:f,isLast:b,firstIndex:k,orientation:v="vertical"}=(0,g.useSelect)((e=>{const{getBlockIndex:o,getBlockRootClientId:r,getBlockOrder:i,getBlock:l,getBlockListSettings:c}=e(ji),u=s[0],d=r(u),h=o(u),g=o(s[s.length-1]),m=i(d),f=l(u),b=0===h,k=g===m.length-1,{orientation:v}=c(d)||{};return{blockType:f?(0,p.getBlockType)(f.name):null,isDisabled:a||("up"===t?b:k),rootClientId:d,firstIndex:h,isFirst:b,isLast:k,orientation:n||v}}),[e,t]),{moveBlocksDown:_,moveBlocksUp:y}=(0,g.useDispatch)(ji),x="up"===t?y:_,S=`block-editor-block-mover-button__description-${i}`;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,ref:r,className:ms("block-editor-block-mover-button",`is-${t}-button`),icon:Dj(t,v),label:Oj(t,v),"aria-describedby":S,...o,onClick:u?null:t=>{x(e,h),o.onClick&&o.onClick(t)},disabled:u,accessibleWhenDisabled:!0}),(0,d.jsx)(ws.VisuallyHidden,{id:S,children:Lj(l,c&&c.title,k,f,b,"up"===t?-1:1,v)})]})})),Vj=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(zj,{direction:"up",ref:t,...e}))),Fj=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(zj,{direction:"down",ref:t,...e})));var Hj=function({clientIds:e,hideDragHandle:t,isBlockMoverUpButtonDisabled:n,isBlockMoverDownButtonDisabled:o}){const{canMove:r,rootClientId:i,isFirst:s,isLast:l,orientation:a,isManualGrid:c}=(0,g.useSelect)((t=>{const{getBlockIndex:n,getBlockListSettings:o,canMoveBlocks:r,getBlockOrder:i,getBlockRootClientId:s,getBlockAttributes:l}=t(ji),a=Array.isArray(e)?e:[e],c=a[0],u=s(c),d=n(c),p=n(a[a.length-1]),h=i(u),{layout:g={}}=l(u)??{};return{canMove:r(e),rootClientId:u,isFirst:0===d,isLast:p===h.length-1,orientation:o(u)?.orientation,isManualGrid:"grid"===g.type&&g.isManualPlacement&&window.__experimentalEnableGridInteractivity}}),[e]);return!r||s&&l&&!i||t&&c?null:(0,d.jsxs)(ws.ToolbarGroup,{className:ms("block-editor-block-mover",{"is-horizontal":"horizontal"===a}),children:[!t&&(0,d.jsx)(Aj,{clientIds:e,fadeWhenDisabled:!0,children:e=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,icon:xC,className:"block-editor-block-mover__drag-handle",label:(0,T.__)("Drag"),tabIndex:"-1",...e})}),!c&&(0,d.jsxs)("div",{className:"block-editor-block-mover__move-button-container",children:[(0,d.jsx)(ws.ToolbarItem,{children:t=>(0,d.jsx)(Vj,{disabled:n,clientIds:e,...t})}),(0,d.jsx)(ws.ToolbarItem,{children:t=>(0,d.jsx)(Fj,{disabled:o,clientIds:e,...t})})]})]})};const{clearTimeout:Uj,setTimeout:Gj}=window,$j=200;function Wj({ref:e,isFocused:t,highlightParent:n,debounceTimeout:o=$j}){const{getSelectedBlockClientId:r,getBlockRootClientId:i}=(0,g.useSelect)(ji),{toggleBlockHighlight:s}=(0,g.useDispatch)(ji),l=(0,h.useRef)(),a=(0,g.useSelect)((e=>e(ji).getSettings().isDistractionFree),[]),c=e=>{if(e&&a)return;const t=r(),o=n?i(t):t;s(o,e)},u=()=>{const n=e?.current&&e.current.matches(":hover");return!t&&!n},d=()=>{const e=l.current;e&&Uj&&Uj(e)};return(0,h.useEffect)((()=>()=>{c(!1),d()}),[]),{debouncedShowGestures:e=>{e&&e.stopPropagation(),d(),c(!0)},debouncedHideGestures:e=>{e&&e.stopPropagation(),d(),l.current=Gj((()=>{u()&&c(!1)}),o)}}}function Kj({ref:e,highlightParent:t=!1,debounceTimeout:n=$j}){const[o,r]=(0,h.useState)(!1),{debouncedShowGestures:i,debouncedHideGestures:s}=Wj({ref:e,debounceTimeout:n,isFocused:o,highlightParent:t}),l=(0,h.useRef)(!1),a=()=>e?.current&&e.current.contains(e.current.ownerDocument.activeElement);return(0,h.useEffect)((()=>{const t=e.current,n=()=>{a()&&(r(!0),i())},o=()=>{a()||(r(!1),s())};return t&&!l.current&&(t.addEventListener("focus",n,!0),t.addEventListener("blur",o,!0),l.current=!0),()=>{t&&(t.removeEventListener("focus",n),t.removeEventListener("blur",o))}}),[e,l,r,i,s]),{onMouseMove:i,onMouseLeave:s}}function Zj(){const{selectBlock:e}=(0,g.useDispatch)(ji),{parentClientId:t}=(0,g.useSelect)((e=>{const{getBlockParents:t,getSelectedBlockClientId:n,getParentSectionBlock:o}=G(e(ji)),r=n(),i=o(r),s=t(r);return{parentClientId:i??s[s.length-1]}}),[]),n=Xf(t),o=(0,h.useRef)(),r=Kj({ref:o,highlightParent:!0});return(0,d.jsx)("div",{className:"block-editor-block-parent-selector",ref:o,...r,children:(0,d.jsx)(ws.ToolbarButton,{className:"block-editor-block-parent-selector__button",onClick:()=>e(t),label:(0,T.sprintf)((0,T.__)("Select parent block: %s"),n?.title),showTooltip:!0,icon:(0,d.jsx)(Vu,{icon:n?.icon})})},t)}var qj=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 4.5h11a.5.5 0 0 1 .5.5v11a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V5a.5.5 0 0 1 .5-.5ZM3 5a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm17 3v10.75c0 .69-.56 1.25-1.25 1.25H6v1.5h12.75a2.75 2.75 0 0 0 2.75-2.75V8H20Z"})});function Yj({blocks:e}){return(0,m.useViewportMatch)("medium","<")?null:(0,d.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,d.jsx)(ws.Popover,{className:"block-editor-block-switcher__popover-preview",placement:"right-start",focusOnMount:!1,offset:16,children:(0,d.jsxs)("div",{className:"block-editor-block-switcher__preview",children:[(0,d.jsx)("div",{className:"block-editor-block-switcher__preview-title",children:(0,T.__)("Preview")}),(0,d.jsx)(kC,{viewportWidth:601,blocks:e})]})})})}const Xj={};function Qj({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i}=e;return(0,d.jsxs)(ws.MenuItem,{className:(0,p.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,d.jsx)(Vu,{icon:r,showColors:!0}),i]})}var Jj=({transformations:e,onSelect:t,blocks:n})=>{const[o,r]=(0,h.useState)();return(0,d.jsxs)(d.Fragment,{children:[o&&(0,d.jsx)(Yj,{blocks:(0,p.cloneBlock)(n[0],e.find((({name:e})=>e===o)).attributes)}),e?.map((e=>(0,d.jsx)(Qj,{item:e,onSelect:t,setHoveredTransformItemName:r},e.name)))]})};function eE({restTransformations:e,onSelect:t,setHoveredTransformItemName:n}){return e.map((e=>(0,d.jsx)(tE,{item:e,onSelect:t,setHoveredTransformItemName:n},e.name)))}function tE({item:e,onSelect:t,setHoveredTransformItemName:n}){const{name:o,icon:r,title:i,isDisabled:s}=e;return(0,d.jsxs)(ws.MenuItem,{className:(0,p.getBlockMenuDefaultClassName)(o),onClick:e=>{e.preventDefault(),t(o)},disabled:s,onMouseLeave:()=>n(null),onMouseEnter:()=>n(o),children:[(0,d.jsx)(Vu,{icon:r,showColors:!0}),i]})}var nE=({className:e,possibleBlockTransformations:t,possibleBlockVariationTransformations:n,onSelect:o,onSelectVariation:r,blocks:i})=>{const[s,l]=(0,h.useState)(),{priorityTextTransformations:a,restTransformations:c}=function(e){const t={"core/paragraph":1,"core/heading":2,"core/list":3,"core/quote":4},n=(0,h.useMemo)((()=>{const n=Object.keys(t),o=e.reduce(((e,t)=>{const{name:o}=t;return n.includes(o)?e.priorityTextTransformations.push(t):e.restTransformations.push(t),e}),{priorityTextTransformations:[],restTransformations:[]});if(1===o.priorityTextTransformations.length&&"core/quote"===o.priorityTextTransformations[0].name){const e=o.priorityTextTransformations.pop();o.restTransformations.push(e)}return o}),[e]);return n.priorityTextTransformations.sort((({name:e},{name:n})=>t[e]<t[n]?-1:1)),n}(t),u=a.length&&c.length,g=!!c.length&&(0,d.jsx)(eE,{restTransformations:c,onSelect:o,setHoveredTransformItemName:l});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.MenuGroup,{label:(0,T.__)("Transform to"),className:e,children:[s&&(0,d.jsx)(Yj,{blocks:(0,p.switchToBlockType)(i,s)}),!!n?.length&&(0,d.jsx)(Jj,{transformations:n,blocks:i,onSelect:r}),a.map((e=>(0,d.jsx)(tE,{item:e,onSelect:o,setHoveredTransformItemName:l},e.name))),!u&&g]}),!!u&&(0,d.jsx)(ws.MenuGroup,{className:e,children:g})]})};function oE(e,t,n){const o=new(wg())(e);return t&&o.remove("is-style-"+t.name),o.add("is-style-"+n.name),o.value}function rE(e){return e?.find((e=>e.isDefault))}function iE({clientId:e,onSwitch:t}){const{styles:n,block:o,blockType:r,className:i}=(0,g.useSelect)((t=>{const{getBlock:n}=t(ji),o=n(e);if(!o)return{};const r=(0,p.getBlockType)(o.name),{getBlockStyles:i}=t(p.store);return{block:o,blockType:r,styles:i(o.name),className:o.attributes.className||""}}),[e]),{updateBlockAttributes:s}=(0,g.useDispatch)(ji),l=function(e){return e&&0!==e.length?rE(e)?e:[{name:"default",label:(0,T._x)("Default","block style"),isDefault:!0},...e]:[]}(n),a=function(e,t){for(const n of new(wg())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),o=e?.find((({name:e})=>e===t));if(o)return o}return rE(e)}(l,i),c=function(e,t){return(0,h.useMemo)((()=>{const n=t?.example,o=t?.name;return n&&o?(0,p.getBlockFromExample)(o,{attributes:n.attributes,innerBlocks:n.innerBlocks}):e?(0,p.cloneBlock)(e):void 0}),[t?.example?e?.name:e,t])}(o,r);return{onSelect:n=>{const o=oE(i,a,n);s(e,{className:o}),t()},stylesToRender:l,activeStyle:a,genericPreviewBlock:c,className:i}}const sE=()=>{};function lE({clientId:e,onSwitch:t=sE}){const{onSelect:n,stylesToRender:o,activeStyle:r}=iE({clientId:e,onSwitch:t});return o&&0!==o.length?(0,d.jsx)(d.Fragment,{children:o.map((e=>{const t=e.label||e.name;return(0,d.jsx)(ws.MenuItem,{icon:r.name===e.name?ip:null,onClick:()=>n(e),children:(0,d.jsx)(ws.__experimentalText,{as:"span",limit:18,ellipsizeMode:"tail",truncate:!0,children:t})},e.name)}))}):null}function aE({hoveredBlock:e,onSwitch:t}){const{clientId:n}=e;return(0,d.jsx)(ws.MenuGroup,{label:(0,T.__)("Styles"),className:"block-editor-block-switcher__styles__menugroup",children:(0,d.jsx)(lE,{clientId:n,onSwitch:t})})}const cE=(e,t,n=new Set)=>{const{clientId:o,name:r,innerBlocks:i=[]}=e;if(!n.has(o)){if(r===t)return e;for(const e of i){const o=cE(e,t,n);if(o)return o}}},uE=(e,t)=>{const n=((e,t)=>{const n=(0,p.getBlockAttributesNamesByRole)(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 dE=(e,t)=>(0,h.useMemo)((()=>e.reduce(((e,n)=>{const o=((e,t)=>{const n=t.map((e=>(0,p.cloneBlock)(e))),o=new Set;for(const t of e){let e=!1;for(const r of n){const n=cE(r,t.name,o);if(n){e=!0,o.add(n.clientId),uE(n,t);break}}if(!e)return}return n})(t,n.blocks);return o&&e.push({...n,transformedBlocks:o}),e}),[])),[e,t]);function pE({patterns:e,onSelect:t}){const n=(0,m.useViewportMatch)("medium","<");return(0,d.jsx)("div",{className:"block-editor-block-switcher__popover-preview-container",children:(0,d.jsx)(ws.Popover,{className:"block-editor-block-switcher__popover-preview",placement:n?"bottom":"right-start",offset:16,children:(0,d.jsx)("div",{className:"block-editor-block-switcher__preview is-pattern-list-preview",children:(0,d.jsx)(hE,{patterns:e,onSelect:t})})})})}function hE({patterns:e,onSelect:t}){return(0,d.jsx)(ws.Composite,{role:"listbox",className:"block-editor-block-switcher__preview-patterns-container","aria-label":(0,T.__)("Patterns list"),children:e.map((e=>(0,d.jsx)(gE,{pattern:e,onSelect:t},e.name)))})}function gE({pattern:e,onSelect:t}){const n="block-editor-block-switcher__preview-patterns-container",o=(0,m.useInstanceId)(gE,`${n}-list__item-description`);return(0,d.jsxs)("div",{className:`${n}-list__list-item`,children:[(0,d.jsxs)(ws.Composite.Item,{render:(0,d.jsx)("div",{role:"option","aria-label":e.title,"aria-describedby":e.description?o:void 0,className:`${n}-list__item`}),onClick:()=>t(e.transformedBlocks),children:[(0,d.jsx)(kC,{blocks:e.transformedBlocks,viewportWidth:e.viewportWidth||500}),(0,d.jsx)("div",{className:`${n}-list__item-title`,children:e.title})]}),!!e.description&&(0,d.jsx)(ws.VisuallyHidden,{id:o,children:e.description})]})}var mE=function({blocks:e,patterns:t,onSelect:n}){const[o,r]=(0,h.useState)(!1),i=dE(t,e);return i.length?(0,d.jsxs)(ws.MenuGroup,{className:"block-editor-block-switcher__pattern__transforms__menugroup",children:[o&&(0,d.jsx)(pE,{patterns:i,onSelect:n}),(0,d.jsx)(ws.MenuItem,{onClick:e=>{e.preventDefault(),r(!o)},icon:Zb,children:(0,T.__)("Patterns")})]}):null};function fE({onClose:e,clientIds:t,hasBlockStyles:n,canRemove:o}){const{replaceBlocks:r,multiSelect:i,updateBlockAttributes:s}=(0,g.useDispatch)(ji),{possibleBlockTransformations:l,patterns:a,blocks:c,isUsingBindings:u}=(0,g.useSelect)((e=>{const{getBlockAttributes:n,getBlocksByClientId:o,getBlockRootClientId:r,getBlockTransformItems:i,__experimentalGetPatternTransformItems:s}=e(ji),l=r(t[0]),a=o(t);return{blocks:a,possibleBlockTransformations:i(a,l),patterns:s(a,l),isUsingBindings:t.every((e=>!!n(e)?.metadata?.bindings))}}),[t]),m=function({clientIds:e,blocks:t}){const{activeBlockVariation:n,blockVariationTransformations:o}=(0,g.useSelect)((n=>{const{getBlockAttributes:o,canRemoveBlocks:r}=n(ji),{getActiveBlockVariation:i,getBlockVariations:s}=n(p.store),l=r(e);if(1!==t.length||!l)return Xj;const[a]=t;return{blockVariationTransformations:s(a.name,"transform"),activeBlockVariation:i(a.name,o(a.clientId))}}),[e,t]);return(0,h.useMemo)((()=>o?.filter((({name:e})=>e!==n?.name))),[o,n])}({clientIds:t,blocks:c});function f(e){e.length>1&&i(e[0].clientId,e[e.length-1].clientId)}const b=1===c.length,k=b&&((0,p.isTemplatePart)(c[0])||(0,p.isReusableBlock)(c[0])),v=!!l?.length&&o&&!k,_=!!m?.length,y=!!a?.length&&o,x=v||_;if(!(n||x||y))return(0,d.jsx)("p",{className:"block-editor-block-switcher__no-transforms",children:(0,T.__)("No transforms.")});const S=b?(0,T._x)("This block is connected.","block toolbar button label and description"):(0,T._x)("These blocks are connected.","block toolbar button label and description");return(0,d.jsxs)("div",{className:"block-editor-block-switcher__container",children:[y&&(0,d.jsx)(mE,{blocks:c,patterns:a,onSelect:n=>{!function(e){r(t,e),f(e)}(n),e()}}),x&&(0,d.jsx)(nE,{className:"block-editor-block-switcher__transforms__menugroup",possibleBlockTransformations:l,possibleBlockVariationTransformations:m,blocks:c,onSelect:n=>{!function(e){const n=(0,p.switchToBlockType)(c,e);r(t,n),f(n)}(n),e()},onSelectVariation:t=>{!function(e){s(c[0].clientId,{...m.find((({name:t})=>t===e)).attributes})}(t),e()}}),n&&(0,d.jsx)(aE,{hoveredBlock:c[0],onSwitch:e}),u&&(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.__experimentalText,{className:"block-editor-block-switcher__binding-indicator",children:S})})]})}var bE=({clientIds:e})=>{const{hasContentOnlyLocking:t,canRemove:n,hasBlockStyles:o,icon:r,invalidBlocks:i,isReusable:s,isTemplate:l,isDisabled:a,isSectionInSelection:c}=(0,g.useSelect)((t=>{const{getTemplateLock:n,getBlocksByClientId:o,getBlockAttributes:r,canRemoveBlocks:i,getBlockEditingMode:s,isSectionBlock:l}=G(t(ji)),{getBlockStyles:a,getBlockType:c,getActiveBlockVariation:u}=t(p.store),d=o(e);if(!d.length||d.some((e=>!e)))return{invalidBlocks:!0};const[{name:h}]=d,g=1===d.length,m=c(h),f=s(e[0]);let b,k;if(g){const t=u(h,r(e[0]));b=t?.icon||m.icon,k="contentOnly"===n(e[0])}else{const t=1===new Set(d.map((({name:e})=>e))).size;k=e.some((e=>"contentOnly"===n(e))),b=t?m.icon:qj}const v=e.some((e=>l(e)));return{canRemove:i(e),hasBlockStyles:g&&!!a(h)?.length,icon:b,isReusable:g&&(0,p.isReusableBlock)(d[0]),isTemplate:g&&(0,p.isTemplatePart)(d[0]),hasContentOnlyLocking:k,isDisabled:"default"!==f,isSectionInSelection:v}}),[e]),u=Sj({clientId:e?.[0],maximumLength:35}),h=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]);if(i)return null;const m=1===e.length,f=m?u:(0,T.__)("Multiple blocks selected"),b=(s||l)&&!h&&u?u:void 0;if(window?.__experimentalContentOnlyPatternInsertion&&c||a||!o&&!n||t)return(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{disabled:!0,className:"block-editor-block-switcher__no-switcher-icon",title:f,icon:(0,d.jsx)(Vu,{className:"block-editor-block-switcher__toggle",icon:r,showColors:!0}),text:b})});const k=m?(0,T.__)("Change block type or style"):(0,T.sprintf)((0,T._n)("Change type of %d block","Change type of %d blocks",e.length),e.length);return(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarItem,{children:t=>(0,d.jsx)(ws.DropdownMenu,{className:"block-editor-block-switcher",label:f,popoverProps:{placement:"bottom-start",className:"block-editor-block-switcher__popover"},icon:(0,d.jsx)(Vu,{className:"block-editor-block-switcher__toggle",icon:r,showColors:!0}),text:b,toggleProps:{description:k,...t},menuProps:{orientation:"both"},children:({onClose:t})=>(0,d.jsx)(fE,{onClose:t,clientIds:e,hasBlockStyles:o,canRemove:n})})})})};const{Fill:kE,Slot:vE}=(0,ws.createSlotFill)("__unstableBlockToolbarLastItem");kE.Slot=vE;var _E=kE;const yE="align",xE="__experimentalBorder",SE="color",wE="customClassName",CE="typography.__experimentalFontFamily",BE="typography.fontSize",IE="typography.textAlign",jE="layout",EE=["shadow",...["typography.lineHeight",BE,"typography.__experimentalFontStyle","typography.__experimentalFontWeight",CE,IE,"typography.textColumns","typography.__experimentalTextDecoration","typography.__experimentalTextTransform","typography.__experimentalWritingMode","typography.__experimentalLetterSpacing"],xE,SE,"spacing"];const TE={align:e=>(0,p.hasBlockSupport)(e,yE),borderColor:e=>function(e,t="any"){if("web"!==h.Platform.OS)return!1;const n=(0,p.getBlockSupport)(e,xE);return!0===n||("any"===t?!!(n?.color||n?.radius||n?.width||n?.style):!!n?.[t])}(e,"color"),backgroundColor:e=>{const t=(0,p.getBlockSupport)(e,SE);return t&&!1!==t.background},textAlign:e=>(0,p.hasBlockSupport)(e,IE),textColor:e=>{const t=(0,p.getBlockSupport)(e,SE);return t&&!1!==t.text},gradient:e=>{const t=(0,p.getBlockSupport)(e,SE);return null!==t&&"object"==typeof t&&!!t.gradients},className:e=>(0,p.hasBlockSupport)(e,wE,!0),fontFamily:e=>(0,p.hasBlockSupport)(e,CE),fontSize:e=>(0,p.hasBlockSupport)(e,BE),layout:e=>(0,p.hasBlockSupport)(e,jE),style:e=>EE.some((t=>(0,p.hasBlockSupport)(e,t)))};function ME(e,t){return Object.entries(TE).reduce(((n,[o,r])=>(r(e.name)&&r(t.name)&&(n[o]=e.attributes[o]),n)),{})}function PE(e,t,n){for(let o=0;o<Math.min(t.length,e.length);o+=1)n(e[o].clientId,ME(t[o],e[o])),PE(e[o].innerBlocks,t[o].innerBlocks,n)}function RE(){const e=(0,g.useRegistry)(),{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{createSuccessNotice:n,createWarningNotice:o,createErrorNotice:r}=(0,g.useDispatch)(pr.store);return(0,h.useCallback)((async i=>{let s="";try{if(!window.navigator.clipboard)return void r((0,T.__)("Unable to paste styles. This feature is only available on secure (https) sites in supporting browsers."),{type:"snackbar"});s=await window.navigator.clipboard.readText()}catch(e){return void r((0,T.__)("Unable to paste styles. Please allow browser clipboard permissions before continuing."),{type:"snackbar"})}if(!s||!function(e){try{const t=(0,p.parse)(e,{__unstableSkipMigrationLogs:!0,__unstableSkipAutop:!0});return 1!==t.length||"core/freeform"!==t[0].name}catch(e){return!1}}(s))return void o((0,T.__)("Unable to paste styles. Block styles couldn't be found within the copied content."),{type:"snackbar"});const l=(0,p.parse)(s);if(1===l.length?e.batch((()=>{PE(i,i.map((()=>l[0])),t)})):e.batch((()=>{PE(i,l,t)})),1===i.length){const e=(0,p.getBlockType)(i[0].name)?.title;n((0,T.sprintf)((0,T.__)("Pasted styles to %s."),e),{type:"snackbar"})}else n((0,T.sprintf)((0,T.__)("Pasted styles to %d blocks."),i.length),{type:"snackbar"})}),[e.batch,t,n,o,r])}function AE({clientIds:e,children:t,__experimentalUpdateSelection:n}){const{getDefaultBlockName:o,getGroupingBlockName:r}=(0,g.useSelect)(p.store),i=(0,g.useSelect)((t=>{const{canInsertBlockType:n,getBlockRootClientId:r,getBlocksByClientId:i,getDirectInsertBlock:s,canRemoveBlocks:l}=t(ji),a=i(e),c=r(e[0]),u=n(o(),c),d=c?s(c):null;return{canRemove:l(e),canInsertBlock:a.every((e=>(u||!!d)&&n(e.name,c))),canCopyStyles:a.every((e=>!!e&&((0,p.hasBlockSupport)(e.name,"color")||(0,p.hasBlockSupport)(e.name,"typography")))),canDuplicate:a.every((e=>!!e&&(0,p.hasBlockSupport)(e.name,"multiple",!0)&&n(e.name,c)))}}),[e,o]),{getBlocksByClientId:s,getBlocks:l}=(0,g.useSelect)(ji),{canRemove:a,canInsertBlock:c,canCopyStyles:u,canDuplicate:d}=i,{removeBlocks:h,replaceBlocks:m,duplicateBlocks:f,insertAfterBlock:b,insertBeforeBlock:k,flashBlock:v}=(0,g.useDispatch)(ji),_=RE();return t({canCopyStyles:u,canDuplicate:d,canInsertBlock:c,canRemove:a,onDuplicate:()=>f(e,n),onRemove:()=>h(e,n),onInsertBefore(){k(e[0])},onInsertAfter(){b(e[e.length-1])},onGroup(){if(!e.length)return;const t=r(),n=(0,p.switchToBlockType)(s(e),t);n&&m(e,n)},onUngroup(){if(!e.length)return;const t=l(e[0]);t.length&&m(e,t)},onCopy(){1===e.length&&v(e[0])},async onPasteStyles(){await _(s(e))}})}var NE=(0,ws.createSlotFill)(Symbol("CommentIconSlotFill"));var LE=function({clientId:e}){const t=(0,g.useSelect)((t=>t(ji).getBlock(e)),[e]),{replaceBlocks:n}=(0,g.useDispatch)(ji);return t&&"core/html"===t.name?(0,d.jsx)(ws.MenuItem,{onClick:()=>n(e,(0,p.rawHandler)({HTML:(0,p.getBlockContent)(t)})),children:(0,T.__)("Convert to Blocks")}):null};const{Fill:DE,Slot:OE}=(0,ws.createSlotFill)("__unstableBlockSettingsMenuFirstItem");DE.Slot=OE;var zE=DE;function VE(e){return(0,g.useSelect)((t=>{const{getBlocksByClientId:n,getSelectedBlockClientIds:o,isUngroupable:r,isGroupable:i}=t(ji),{getGroupingBlockName:s,getBlockType:l}=t(p.store),a=e?.length?e:o(),c=n(a),[u]=c,d=1===a.length&&r(a[0]);return{clientIds:a,isGroupable:i(a),isUngroupable:d,blocksSelection:c,groupingBlockName:s(),onUngroup:d&&l(u.name)?.transforms?.ungroup}}),[e])}function FE({clientIds:e,isGroupable:t,isUngroupable:n,onUngroup:o,blocksSelection:r,groupingBlockName:i,onClose:s=()=>{}}){const{getSelectedBlockClientIds:l}=(0,g.useSelect)(ji),{replaceBlocks:a}=(0,g.useDispatch)(ji);if(!t&&!n)return null;const c=l();return(0,d.jsxs)(d.Fragment,{children:[t&&(0,d.jsx)(ws.MenuItem,{shortcut:c.length>1?Wa.displayShortcut.primary("g"):void 0,onClick:()=>{(()=>{const t=(0,p.switchToBlockType)(r,i);t&&a(e,t)})(),s()},children:(0,T._x)("Group","verb")}),n&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{(()=>{let t=r[0].innerBlocks;t.length&&(o&&(t=o(r[0].attributes,r[0].innerBlocks)),a(e,t))})(),s()},children:(0,T._x)("Ungroup","Ungrouping blocks from within a grouping block back into individual blocks within the Editor")})]})}function HE(e){return(0,g.useSelect)((t=>{const{canEditBlock:n,canMoveBlock:o,canRemoveBlock:r,canLockBlockType:i,getBlockName:s,getTemplateLock:l}=t(ji),a=n(e),c=o(e),u=r(e);return{canEdit:a,canMove:c,canRemove:u,canLock:i(s(e)),isContentLocked:"contentOnly"===l(e),isLocked:!a||!c||!u}}),[e])}var UE=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z"})}),GE=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zM9.8 7c0-1.2 1-2.2 2.2-2.2 1.2 0 2.2 1 2.2 2.2v3H9.8V7zm6.7 11.5h-9v-7h9v7z"})}),$E=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})});const WE=["core/navigation"];function KE(e){return e.remove&&e.move?"all":!(!e.remove||e.move)&&"insert"}function ZE({clientId:e,onClose:t}){const[n,o]=(0,h.useState)({move:!1,remove:!1}),{canEdit:r,canMove:i,canRemove:s}=HE(e),{allowsEditLocking:l,templateLock:a,hasTemplateLock:c}=(0,g.useSelect)((t=>{const{getBlockName:n,getBlockAttributes:o}=t(ji),r=n(e),i=(0,p.getBlockType)(r);return{allowsEditLocking:WE.includes(r),templateLock:o(e)?.templateLock,hasTemplateLock:!!i?.attributes?.templateLock}}),[e]),[u,m]=(0,h.useState)(!!a),{updateBlockAttributes:f}=(0,g.useDispatch)(ji),b=Xf(e);(0,h.useEffect)((()=>{o({move:!i,remove:!s,...l?{edit:!r}:{}})}),[r,i,s,l]);const k=Object.values(n).every(Boolean),v=Object.values(n).some(Boolean)&&!k;return(0,d.jsx)(ws.Modal,{title:(0,T.sprintf)((0,T.__)("Lock %s"),b.title),overlayClassName:"block-editor-block-lock-modal",onRequestClose:t,size:"small",children:(0,d.jsxs)("form",{onSubmit:o=>{o.preventDefault(),f([e],{lock:n,templateLock:u?KE(n):void 0}),t()},children:[(0,d.jsxs)("fieldset",{className:"block-editor-block-lock-modal__options",children:[(0,d.jsx)("legend",{children:(0,T.__)("Select the features you want to lock")}),(0,d.jsx)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:(0,d.jsxs)("li",{children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__options-all",label:(0,T.__)("Lock all"),checked:k,indeterminate:v,onChange:e=>o({move:e,remove:e,...l?{edit:e}:{}})}),(0,d.jsxs)("ul",{role:"list",className:"block-editor-block-lock-modal__checklist",children:[l&&(0,d.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Lock editing"),checked:!!n.edit,onChange:e=>o((t=>({...t,edit:e})))}),(0,d.jsx)(ws.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.edit?$E:UE})]}),(0,d.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Lock movement"),checked:n.move,onChange:e=>o((t=>({...t,move:e})))}),(0,d.jsx)(ws.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.move?$E:UE})]}),(0,d.jsxs)("li",{className:"block-editor-block-lock-modal__checklist-item",children:[(0,d.jsx)(ws.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Lock removal"),checked:n.remove,onChange:e=>o((t=>({...t,remove:e})))}),(0,d.jsx)(ws.Icon,{className:"block-editor-block-lock-modal__lock-icon",icon:n.remove?$E:UE})]})]})]})}),c&&(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-block-lock-modal__template-lock",label:(0,T.__)("Apply to all blocks inside"),checked:u,disabled:n.move&&!n.remove,onChange:()=>m(!u)})]}),(0,d.jsxs)(ws.Flex,{className:"block-editor-block-lock-modal__actions",justify:"flex-end",expanded:!1,children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,T.__)("Cancel")})}),(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(ws.Button,{variant:"primary",type:"submit",__next40pxDefaultSize:!0,children:(0,T.__)("Apply")})})]})]})})}function qE({clientId:e}){const{canLock:t,isLocked:n}=HE(e),[o,r]=(0,h.useReducer)((e=>!e),!1);if(!t)return null;const i=n?(0,T.__)("Unlock"):(0,T.__)("Lock");return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.MenuItem,{icon:n?UE:GE,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog",children:i}),o&&(0,d.jsx)(ZE,{clientId:e,onClose:r})]})}const YE=()=>{};function XE({clientId:e,onToggle:t=YE}){const{blockType:n,mode:o,enabled:r}=(0,g.useSelect)((t=>{const{getBlock:n,getBlockMode:o,getSettings:r}=t(ji),i=n(e);return{mode:o(e),blockType:i?(0,p.getBlockType)(i.name):null,enabled:r().codeEditingEnabled&&!!i?.isValid}}),[e]),{toggleBlockMode:i}=(0,g.useDispatch)(ji);if(!n||!(0,p.hasBlockSupport)(n,"html",!0)||!r)return null;const s="visual"===o?(0,T.__)("Edit as HTML"):(0,T.__)("Edit visually");return(0,d.jsx)(ws.MenuItem,{onClick:()=>{i(e),t()},children:s})}function QE({clientId:e,onClose:t}){const{templateLock:n,isLockedByParent:o,isEditingAsBlocks:r}=(0,g.useSelect)((t=>{const{getContentLockingParent:n,getTemplateLock:o,getTemporarilyEditingAsBlocks:r}=G(t(ji));return{templateLock:o(e),isLockedByParent:!!n(e),isEditingAsBlocks:r()===e}}),[e]),i=(0,g.useDispatch)(ji),s=!o&&"contentOnly"===n;if(!s&&!r)return null;const{modifyContentLockBlock:l}=G(i);return!r&&s&&(0,d.jsx)(ws.MenuItem,{onClick:()=>{l(e),t()},children:(0,T._x)("Modify","Unlock content locked blocks")})}function JE({clientId:e,onClose:t}){const[n,o]=(0,h.useState)(),r=Xf(e),{metadata:i}=(0,g.useSelect)((t=>{const{getBlockAttributes:n}=t(ji);return{metadata:n(e)?.metadata}}),[e]),{updateBlockAttributes:s}=(0,g.useDispatch)(ji),l=i?.name||"",a=r?.title,c=!!l&&!!i?.bindings&&Object.values(i.bindings).some((e=>"core/pattern-overrides"===e.source)),u=void 0!==n&&n!==l,p=n===a,m=(f=n,0===f?.trim()?.length);var f;const b=u||p;return(0,d.jsx)(ws.Modal,{title:(0,T.__)("Rename"),onRequestClose:t,overlayClassName:"block-editor-block-rename-modal",focusOnMount:"firstContentElement",size:"small",children:(0,d.jsx)("form",{onSubmit:o=>{o.preventDefault(),b&&(()=>{const o=p||m?void 0:n,r=p||m?(0,T.sprintf)((0,T.__)('Block name reset to: "%s".'),n):(0,T.sprintf)((0,T.__)('Block name changed to: "%s".'),n);(0,Uo.speak)(r,"assertive"),s([e],{metadata:fs({...i,name:o})}),t()})()},children:(0,d.jsxs)(ws.__experimentalVStack,{spacing:"3",children:[(0,d.jsx)(ws.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:n??l,label:(0,T.__)("Name"),help:c?(0,T.__)("This block allows overrides. Changing the name can cause problems with content entered into instances of this pattern."):void 0,placeholder:a,onChange:o,onFocus:e=>e.target.select()}),(0,d.jsxs)(ws.__experimentalHStack,{justify:"right",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,T.__)("Cancel")}),(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!b,variant:"primary",type:"submit",children:(0,T.__)("Save")})]})]})})})}function eT({clientId:e}){const[t,n]=(0,h.useState)(!1);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.MenuItem,{onClick:()=>{n(!0)},"aria-expanded":t,"aria-haspopup":"dialog",children:(0,T.__)("Rename")}),t&&(0,d.jsx)(JE,{clientId:e,onClose:()=>n(!1)})]})}var tT=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),nT=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});function oT({clientIds:e}){const{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{createSuccessNotice:n}=(0,g.useDispatch)(pr.store),o=(0,g.useSelect)((t=>t(ji).getBlocksByClientId(e)),[e]),r=(0,g.useSelect)((e=>e(Yk.store).getShortcutRepresentation("core/editor/toggle-list-view")),[]),i=o.some((e=>!1===e.attributes.metadata?.blockVisibility));return(0,d.jsx)(ws.MenuItem,{icon:i?tT:nT,onClick:()=>{const s=!i,l=Object.fromEntries(o?.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!s&&void 0})}])));t(e,l,{uniqueByBlock:!0}),s&&(o.length>1?n((0,T.sprintf)((0,T.__)("Blocks hidden. You can access them via the List View (%s)."),r),{id:"block-visibility-hidden",type:"snackbar"}):n((0,T.sprintf)((0,T.__)("Block hidden. You can access it via the List View (%s)."),r),{id:"block-visibility-hidden",type:"snackbar"}))},children:i?(0,T.__)("Show"):(0,T.__)("Hide")})}const{Fill:rT,Slot:iT}=(0,ws.createSlotFill)("BlockSettingsMenuControls");function sT({...e}){return(0,d.jsx)(ws.__experimentalStyleProvider,{document,children:(0,d.jsx)(rT,{...e})})}sT.Slot=({fillProps:e,clientIds:t=null})=>{const{selectedBlocks:n,selectedClientIds:o,isContentOnly:r,canToggleSelectedBlocksVisibility:i}=(0,g.useSelect)((e=>{const{getBlocksByClientId:n,getBlockNamesByClientId:o,getSelectedBlockClientIds:r,getBlockEditingMode:i}=e(ji),s=null!==t?t:r();return{selectedBlocks:o(s),selectedClientIds:s,isContentOnly:"contentOnly"===i(s[0]),canToggleSelectedBlocksVisibility:n(s).every((e=>(0,p.hasBlockSupport)(e.name,"blockVisibility",!0)))}}),[t]),{canLock:s}=HE(o[0]),{canRename:l}=(a=n[0],{canRename:(0,p.getBlockSupport)(a,"renaming",!0)});var a;const c=1===o.length&&s&&!r,u=1===o.length&&l&&!r,h=i&&!r,m=VE(o),{isGroupable:f,isUngroupable:b}=m,k=(f||b)&&!r;return(0,d.jsx)(iT,{fillProps:{...e,selectedBlocks:n,selectedClientIds:o},children:t=>!t?.length>0&&!k&&!c?null:(0,d.jsxs)(ws.MenuGroup,{children:[k&&(0,d.jsx)(FE,{...m,onClose:e?.onClose}),c&&(0,d.jsx)(qE,{clientId:o[0]}),u&&(0,d.jsx)(eT,{clientId:o[0]}),h&&(0,d.jsx)(oT,{clientIds:o}),t,1===o.length&&(0,d.jsx)(QE,{clientId:o[0],onClose:e?.onClose}),1===e?.count&&!r&&(0,d.jsx)(XE,{clientId:e?.firstBlockClientId,onToggle:e?.onClose})]})})};var lT=sT;function aT({parentClientId:e,parentBlockType:t}){const n=(0,m.useViewportMatch)("medium","<"),{selectBlock:o}=(0,g.useDispatch)(ji),r=(0,h.useRef)(),i=Kj({ref:r,highlightParent:!0});return n?(0,d.jsx)(ws.MenuItem,{...i,ref:r,icon:(0,d.jsx)(Vu,{icon:t.icon}),onClick:()=>o(e),children:(0,T.sprintf)((0,T.__)("Select parent block (%s)"),t.title)}):null}const cT={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"};function uT({clientIds:e,onCopy:t,label:n,shortcut:o,eventType:r="copy",__experimentalUpdateSelection:i=!1}){const{getBlocksByClientId:s}=(0,g.useSelect)(ji),{removeBlocks:l}=(0,g.useDispatch)(ji),a=jw(),c=(0,m.useCopyToClipboard)((()=>(0,p.serialize)(s(e))),(()=>{switch(r){case"copy":case"copyStyles":t(),a(r,e);break;case"cut":a(r,e),l(e,i)}})),u=n||(0,T.__)("Copy");return(0,d.jsx)(ws.MenuItem,{ref:c,shortcut:o,children:u})}function dT({block:e,clientIds:t,children:n,__experimentalSelectBlock:o,...r}){const i=e?.clientId,s=t.length,l=t[0],{firstParentClientId:a,parentBlockType:c,previousBlockClientId:u,selectedBlockClientIds:f,openedBlockSettingsMenu:b,isContentOnly:k,isZoomOut:v}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockRootClientId:n,getPreviousBlockClientId:o,getSelectedBlockClientIds:r,getBlockAttributes:i,getOpenedBlockSettingsMenu:s,getBlockEditingMode:a,isZoomOut:c}=G(e(ji)),{getActiveBlockVariation:u}=e(p.store),d=n(l),h=d&&t(d);return{firstParentClientId:d,parentBlockType:d&&(u(h,i(d))||(0,p.getBlockType)(h)),previousBlockClientId:o(l),selectedBlockClientIds:r(),openedBlockSettingsMenu:s(),isContentOnly:"contentOnly"===a(l),isZoomOut:c()}}),[l]),{getBlockOrder:_,getSelectedBlockClientIds:y}=(0,g.useSelect)(ji),{setOpenedBlockSettingsMenu:x}=G((0,g.useDispatch)(ji)),S=(0,g.useSelect)((e=>{const{getShortcutRepresentation:t}=e(Yk.store);return{copy:t("core/block-editor/copy"),cut:t("core/block-editor/cut"),duplicate:t("core/block-editor/duplicate"),remove:t("core/block-editor/remove"),insertAfter:t("core/block-editor/insert-after"),insertBefore:t("core/block-editor/insert-before")}}),[]),w=f.length>0;async function C(e){if(!o)return;const t=await e;t&&t[0]&&o(t[0],!1)}function B(){if(!o)return;let e=u||a;e||(e=_()[0]);const t=w&&0===y().length;o(e,t)}const I=f?.includes(a),j=i?b===i||!1:void 0;function E(e){e&&b!==i?x(i):!e&&b&&b===i&&x(void 0)}const M=!I&&!!a;return(0,d.jsx)(AE,{clientIds:t,__experimentalUpdateSelection:!o,children:({canCopyStyles:e,canDuplicate:i,canInsertBlock:u,canRemove:p,onDuplicate:g,onInsertAfter:f,onInsertBefore:b,onRemove:_,onCopy:y,onPasteStyles:x})=>!p&&!i&&!u&&k?null:(0,d.jsx)(ws.DropdownMenu,{icon:fv,label:(0,T.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:cT,open:j,onToggle:E,noIcons:!0,...r,children:({onClose:r})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.MenuGroup,{children:[(0,d.jsx)(zE.Slot,{fillProps:{onClose:r}}),M&&(0,d.jsx)(aT,{parentClientId:a,parentBlockType:c}),1===s&&(0,d.jsx)(LE,{clientId:l}),!k&&(0,d.jsx)(uT,{clientIds:t,onCopy:y,shortcut:S.copy}),!k&&(0,d.jsx)(uT,{clientIds:t,label:(0,T.__)("Cut"),eventType:"cut",shortcut:S.cut,__experimentalUpdateSelection:!o}),i&&(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,g,C),shortcut:S.duplicate,children:(0,T.__)("Duplicate")}),u&&!v&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,b),shortcut:S.insertBefore,children:(0,T.__)("Add before")}),(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,f),shortcut:S.insertAfter,children:(0,T.__)("Add after")})]}),1===s&&(0,d.jsx)(NE.Slot,{fillProps:{clientId:l,onClose:r}})]}),e&&!k&&(0,d.jsxs)(ws.MenuGroup,{children:[(0,d.jsx)(uT,{clientIds:t,onCopy:y,label:(0,T.__)("Copy styles"),eventType:"copyStyles"}),(0,d.jsx)(ws.MenuItem,{onClick:x,children:(0,T.__)("Paste styles")})]}),!k&&(0,d.jsx)(lT.Slot,{fillProps:{onClose:r,count:s,firstBlockClientId:l},clientIds:t}),"function"==typeof n?n({onClose:r}):h.Children.map((e=>(0,h.cloneElement)(e,{onClose:r}))),p&&(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.MenuItem,{onClick:(0,m.pipe)(r,_,B),shortcut:S.remove,children:(0,T.__)("Delete")})})]})})})}var pT=dT;var hT=(0,ws.createSlotFill)(Symbol("CommentIconToolbarSlotFill"));var gT=function({clientIds:e,...t}){return(0,d.jsxs)(ws.ToolbarGroup,{children:[(0,d.jsx)(hT.Slot,{}),(0,d.jsx)(ws.ToolbarItem,{children:n=>(0,d.jsx)(pT,{clientIds:e,toggleProps:n,...t})})]})};function mT({clientId:e}){const{canLock:t,isLocked:n}=HE(e),[o,r]=(0,h.useReducer)((e=>!e),!1),i=(0,h.useRef)(!1);if((0,h.useEffect)((()=>{n&&(i.current=!0)}),[n]),!n&&!i.current)return null;let s=n?(0,T.__)("Unlock"):(0,T.__)("Lock");return!t&&n&&(s=(0,T.__)("Locked")),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,d.jsx)(ws.ToolbarButton,{disabled:!t,icon:n?$E:UE,label:s,onClick:r,"aria-expanded":o,"aria-haspopup":"dialog"})}),o&&(0,d.jsx)(ZE,{clientId:e,onClose:r})]})}function fT({clientIds:e}){const{blocks:t,canToggleBlockVisibility:n}=(0,g.useSelect)((t=>{const{getBlockName:n,getBlocksByClientId:o}=t(ji),r=o(e);return{blocks:r,canToggleBlockVisibility:r.every((({clientId:e})=>(0,p.hasBlockSupport)(n(e),"blockVisibility",!0)))}}),[e]),o=t.some((e=>!1===e.attributes.metadata?.blockVisibility)),r=(0,h.useRef)(!1),{updateBlockAttributes:i}=(0,g.useDispatch)(ji);if((0,h.useEffect)((()=>{o&&(r.current=!0)}),[o]),!o&&!r.current)return null;return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.ToolbarGroup,{className:"block-editor-block-lock-toolbar",children:(0,d.jsx)(ws.ToolbarButton,{disabled:!n,icon:o?nT:tT,label:o?(0,T.__)("Hidden"):(0,T.__)("Visible"),onClick:()=>{const n=Object.fromEntries(t?.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!!o&&void 0})}])));i(e,n,{uniqueByBlock:!0})}})})})}var bT=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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"})}),kT=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),vT=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),_T=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})});const yT={group:{type:"constrained"},row:{type:"flex",flexWrap:"nowrap"},stack:{type:"flex",orientation:"vertical"},grid:{type:"grid"}};var xT=function(){const{blocksSelection:e,clientIds:t,groupingBlockName:n,isGroupable:o}=VE(),{replaceBlocks:r}=(0,g.useDispatch)(ji),{canRemove:i,variations:s}=(0,g.useSelect)((e=>{const{canRemoveBlocks:o}=e(ji),{getBlockVariations:r}=e(p.store);return{canRemove:o(t),variations:r(n,"transform")}}),[t,n]),l=o=>{const i=(0,p.switchToBlockType)(e,n);"string"!=typeof o&&(o="group"),i&&i.length>0&&(i[0].attributes.layout=yT[o],r(t,i))};if(!o||!i)return null;const a=!!s.find((({name:e})=>"group-row"===e)),c=!!s.find((({name:e})=>"group-stack"===e)),u=!!s.find((({name:e})=>"group-grid"===e));return(0,d.jsxs)(ws.ToolbarGroup,{children:[(0,d.jsx)(ws.ToolbarButton,{icon:bT,label:(0,T._x)("Group","action: convert blocks to group"),onClick:l}),a&&(0,d.jsx)(ws.ToolbarButton,{icon:kT,label:(0,T._x)("Row","action: convert blocks to row"),onClick:()=>l("row")}),c&&(0,d.jsx)(ws.ToolbarButton,{icon:vT,label:(0,T._x)("Stack","action: convert blocks to stack"),onClick:()=>l("stack")}),u&&(0,d.jsx)(ws.ToolbarButton,{icon:_T,label:(0,T._x)("Grid","action: convert blocks to grid"),onClick:()=>l("grid")})]})};function ST({clientIds:e}){const t=1===e.length?e[0]:void 0,n=(0,g.useSelect)((e=>!!t&&"html"===e(ji).getBlockMode(t)),[t]),{toggleBlockMode:o}=(0,g.useDispatch)(ji);return n?(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{onClick:()=>{o(t)},children:(0,T.__)("Edit visually")})}):null}const wT=(0,h.createContext)("");wT.displayName="__unstableBlockNameContext";var CT=wT;function BT(e){return Array.from(e.querySelectorAll("[data-toolbar-item]:not([disabled])"))}function IT(e){return e.contains(e.ownerDocument.activeElement)}function jT({toolbarRef:e,focusOnMount:t,isAccessibleToolbar:n,defaultIndex:o,onIndexChange:r,shouldUseKeyboardFocusShortcut:i,focusEditorOnEscape:s}){const[l]=(0,h.useState)(t),[a]=(0,h.useState)(o),c=(0,h.useCallback)((()=>{!function(e){const[t]=Ga.focus.tabbable.find(e);t&&t.focus({preventScroll:!0})}(e.current)}),[e]);(0,Yk.useShortcut)("core/block-editor/focus-toolbar",(()=>{i&&c()})),(0,h.useEffect)((()=>{l&&c()}),[n,l,c]),(0,h.useEffect)((()=>{const t=e.current;let n=0;return l||IT(t)||(n=window.requestAnimationFrame((()=>{const e=BT(t),n=a||0;e[n]&&IT(t)&&e[n].focus({preventScroll:!0})}))),()=>{if(window.cancelAnimationFrame(n),!r||!t)return;const e=BT(t).findIndex((e=>0===e.tabIndex));r(e)}}),[a,l,r,e]);const{getLastFocus:u}=G((0,g.useSelect)(ji));(0,h.useEffect)((()=>{const t=e.current;if(s){const e=e=>{const t=u();e.keyCode===Wa.ESCAPE&&t?.current&&(e.preventDefault(),t.current.focus())};return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}}),[s,u,e])}function ET({children:e,focusOnMount:t,focusEditorOnEscape:n=!1,shouldUseKeyboardFocusShortcut:o=!0,__experimentalInitialIndex:r,__experimentalOnIndexChange:i,orientation:s="horizontal",...l}){const a=(0,h.useRef)(),c=function(e){const[t,n]=(0,h.useState)(!0),o=(0,h.useCallback)((()=>{const t=!Ga.focus.tabbable.find(e.current).some((e=>!("toolbarItem"in e.dataset)));t||I()("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)}),[e]);return(0,h.useLayoutEffect)((()=>{const t=new window.MutationObserver(o);return t.observe(e.current,{childList:!0,subtree:!0}),()=>t.disconnect()}),[o,t,e]),t}(a);return jT({toolbarRef:a,focusOnMount:t,defaultIndex:r,onIndexChange:i,isAccessibleToolbar:c,shouldUseKeyboardFocusShortcut:o,focusEditorOnEscape:n}),c?(0,d.jsx)(ws.Toolbar,{label:l["aria-label"],ref:a,orientation:s,...l,children:e}):(0,d.jsx)(ws.NavigableMenu,{orientation:s,role:"toolbar",ref:a,...l,children:e})}function TT(){const e=(0,g.useSelect)((e=>{const{getBlockEditingMode:t,getBlockName:n,getBlockSelectionStart:o}=e(ji),r=o(),i=r&&(0,p.getBlockType)(n(r));return i&&(0,p.hasBlockSupport)(i,"__experimentalToolbar",!0)&&"disabled"!==t(r)}),[]);return e}const MT=[],PT=6,RT={placement:"bottom-start"};function AT({clientId:e}){const{categories:t,currentPatternName:n,patterns:o}=(0,g.useSelect)((t=>{const{getBlockAttributes:n,getBlockRootClientId:o,__experimentalGetAllowedPatterns:r}=t(ji),i=n(e),s=i?.metadata?.categories||MT,l=o(e),a=s.length>0?r(l):MT;return{categories:s,currentPatternName:i?.metadata?.patternName,patterns:a}}),[e]),{replaceBlocks:r}=(0,g.useDispatch)(ji),i=(0,h.useMemo)((()=>0!==t.length&&o&&0!==o.length?o.filter((e=>{const o="core"===e.source||e.source?.startsWith("pattern-directory")&&"pattern-directory/theme"!==e.source;return 1===e.blocks.length&&!o&&n!==e.name&&e.categories?.some((e=>t.includes(e)))&&("unsynced"===e.syncStatus||!e.id)})).slice(0,PT):MT),[t,n,o]);if(i.length<2)return null;const s=n=>{const o=(n.blocks??[]).map((e=>(0,p.cloneBlock)(e)));o[0].attributes.metadata={...o[0].attributes.metadata,categories:t},r(e,o)};return(0,d.jsx)(ws.Dropdown,{popoverProps:RT,renderToggle:({onToggle:e,isOpen:t})=>(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{onClick:()=>e(!t),"aria-expanded":t,children:(0,T.__)("Change design")})}),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{className:"block-editor-block-toolbar-change-design-content-wrapper",paddingSize:"none",children:(0,d.jsx)($C,{blockPatterns:i,onClickPattern:s,showTitlesAsTooltip:!0})})})}const NT=(0,d.jsxs)(ws.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,d.jsx)(ws.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"}),(0,d.jsx)(ws.Path,{stroke:"currentColor",strokeWidth:"1.5",d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3z"})]});var LT=function({clientId:e}){const{stylesToRender:t,activeStyle:n,className:o}=iE({clientId:e}),{updateBlockAttributes:r}=(0,g.useDispatch)(ji),{merged:i}=(0,h.useContext)(is),{globalSettings:s,globalStyles:l,blockName:a}=(0,g.useSelect)((t=>{const n=t(ji).getSettings();return{globalSettings:n.__experimentalFeatures,globalStyles:n[N],blockName:t(ji).getBlockName(e)}}),[e]),c=n?.name?Tb({settings:i?.settings??s,styles:i?.styles??l},a,n.name)?.color?.background:void 0;return t&&0!==t.length?(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{onClick:()=>{const i=(t.findIndex((e=>e.name===n.name))+1)%t.length,s=t[i],l=oE(o,n,s);r(e,{className:l})},label:(0,T.__)("Shuffle styles"),children:(0,d.jsx)(ws.Icon,{icon:NT,style:{fill:c||"transparent"}})})}):null};function DT({hideDragHandle:e,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,variant:r="unstyled"}){const{blockClientId:i,blockClientIds:s,isDefaultEditingMode:l,blockType:a,toolbarKey:c,shouldShowVisualToolbar:u,showParentSelector:f,isUsingBindings:b,hasParentPattern:k,hasContentOnlyLocking:v,showShuffleButton:_,showSlots:y,showGroupButtons:x,showLockButtons:S,showBlockVisibilityButton:w,showSwitchSectionStyleButton:C}=(0,g.useSelect)((e=>{const{getBlockName:t,getBlockMode:n,getBlockParents:o,getSelectedBlockClientIds:r,isBlockValid:i,getBlockEditingMode:s,getBlockAttributes:l,getBlockParentsByBlockName:a,getTemplateLock:c,getParentSectionBlock:u,isZoomOut:d,isSectionBlock:h}=G(e(ji)),g=r(),m=g[0],f=o(m),b=u(m)??f[f.length-1],k=t(b),v=(0,p.getBlockType)(k),_=s(m),y="default"===_,x=t(m),S=g.every((e=>i(e))),w=g.every((e=>"visual"===n(e))),C=g.every((e=>!!l(e)?.metadata?.bindings)),B=g.every((e=>a(e,"core/block",!0).length>0)),I=g.some((e=>"contentOnly"===c(e))),j=d(),E=window?.__experimentalContentOnlyPatternInsertion&&(j||h(m));return{blockClientId:m,blockClientIds:g,isDefaultEditingMode:y,blockType:m&&(0,p.getBlockType)(x),shouldShowVisualToolbar:S&&w,toolbarKey:`${m}${b}`,showParentSelector:!j&&v&&"contentOnly"!==_&&"disabled"!==s(b)&&(0,p.hasBlockSupport)(v,"__experimentalParentSelector",!0)&&1===g.length,isUsingBindings:C,hasParentPattern:B,hasContentOnlyLocking:I,showShuffleButton:j,showSlots:!j,showGroupButtons:!j,showLockButtons:!j,showBlockVisibilityButton:!j,showSwitchSectionStyleButton:E}}),[]),B=(0,h.useRef)(null),I=(0,h.useRef)(),j=Kj({ref:I}),E=!(0,m.useViewportMatch)("medium","<");if(!TT())return null;const M=s.length>1,P=(0,p.isReusableBlock)(a)||(0,p.isTemplatePart)(a),R=ms("block-editor-block-contextual-toolbar",{"has-parent":f}),A=ms("block-editor-block-toolbar",{"is-synced":P,"is-connected":b});return(0,d.jsx)(ET,{focusEditorOnEscape:!0,className:R,"aria-label":(0,T.__)("Block tools"),variant:"toolbar"===r?void 0:r,focusOnMount:t,__experimentalInitialIndex:n,__experimentalOnIndexChange:o,children:(0,d.jsxs)("div",{ref:B,className:A,children:[f&&!M&&E&&(0,d.jsx)(Zj,{}),(u||M)&&!k&&(0,d.jsx)("div",{ref:I,...j,children:(0,d.jsxs)(ws.ToolbarGroup,{className:"block-editor-block-toolbar__block-controls",children:[(0,d.jsx)(bE,{clientIds:s}),l&&w&&(0,d.jsx)(fT,{clientIds:s}),!M&&l&&S&&(0,d.jsx)(mT,{clientId:i}),(0,d.jsx)(Hj,{clientIds:s,hideDragHandle:e})]})}),!v&&u&&M&&x&&(0,d.jsx)(xT,{}),_&&(0,d.jsx)(AT,{clientId:s[0]}),C&&(0,d.jsx)(LT,{clientId:s[0]}),u&&y&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Rs.Slot,{group:"parent",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{group:"block",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{group:"inline",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(Rs.Slot,{group:"other",className:"block-editor-block-toolbar__slot"}),(0,d.jsx)(CT.Provider,{value:a?.name,children:(0,d.jsx)(_E.Slot,{})})]}),(0,d.jsx)(ST,{clientIds:s}),(0,d.jsx)(gT,{clientIds:s})]})},c)}function OT({hideDragHandle:e,variant:t}){return(0,d.jsx)(DT,{hideDragHandle:e,variant:t,focusOnMount:void 0,__experimentalInitialIndex:void 0,__experimentalOnIndexChange:void 0})}function zT({clientId:e,isTyping:t,__unstableContentRef:n}){const{capturingClientId:o,isInsertionPointVisible:r,lastClientId:i}=Pj(e),s=(0,h.useRef)();(0,h.useEffect)((()=>{s.current=void 0}),[e]);const{stopTyping:l}=(0,g.useDispatch)(ji),a=(0,h.useRef)(!1);(0,Yk.useShortcut)("core/block-editor/focus-toolbar",(()=>{a.current=!0,l(!0)})),(0,h.useEffect)((()=>{a.current=!1}));const c=o||e,u=Mj({contentElement:n?.current,clientId:c});return!t&&(0,d.jsx)(ef,{clientId:c,bottomClientId:i,className:ms("block-editor-block-list__block-popover",{"is-insertion-point-visible":r}),resize:!1,...u,__unstableContentRef:n,children:(0,d.jsx)(DT,{focusOnMount:a.current,__experimentalInitialIndex:s.current,__experimentalOnIndexChange:e=>{s.current=e},variant:"toolbar"})})}var VT=function({onClick:e}){return(0,d.jsx)(ws.Button,{variant:"primary",icon:cc,size:"compact",className:ms("block-editor-button-pattern-inserter__button","block-editor-block-tools__zoom-out-mode-inserter-button"),onClick:e,label:(0,T._x)("Add pattern","Generic label for pattern inserter button")})};var FT=function(){const[e,t]=(0,h.useState)(!1),{hasSelection:n,blockOrder:o,setInserterIsOpened:r,sectionRootClientId:i,selectedBlockClientId:s,blockInsertionPoint:l,insertionPointVisible:a}=(0,g.useSelect)((e=>{const{getSettings:t,getBlockOrder:n,getSelectionStart:o,getSelectedBlockClientId:r,getSectionRootClientId:i,getBlockInsertionPoint:s,isBlockInsertionPointVisible:l}=G(e(ji)),a=i();return{hasSelection:!!o().clientId,blockOrder:n(a),sectionRootClientId:a,setInserterIsOpened:t().__experimentalSetIsInserterOpened,selectedBlockClientId:r(),blockInsertionPoint:s(),insertionPointVisible:l()}}),[]),{showInsertionPoint:c}=G((0,g.useDispatch)(ji));if((0,h.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),500);return()=>{clearTimeout(e)}}),[]),!e||!n)return null;const u=s,p=o.findIndex((e=>s===e))+1,m=o[p];return a&&l?.index===p?null:(0,d.jsx)(CS,{previousClientId:u,nextClientId:m,children:(0,d.jsx)(VT,{onClick:()=>{r({rootClientId:i,insertionIndex:p,tab:"patterns",category:"all"}),c(i,p,{operation:"insert"})}})})};function HT(e){const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getSettings:o,isTyping:r,isDragging:i,isZoomOut:s}=G(e(ji));return{clientId:t()||n(),hasFixedToolbar:o().hasFixedToolbar,isTyping:r(),isZoomOutMode:s(),isDragging:i()}}function UT({children:e,__unstableContentRef:t,...n}){const{clientId:o,hasFixedToolbar:r,isTyping:i,isZoomOutMode:s,isDragging:l}=(0,g.useSelect)(HT,[]),a=(0,Yk.__unstableUseShortcutEventMatch)(),{getBlocksByClientId:c,getSelectedBlockClientIds:u,getBlockRootClientId:m,isGroupable:f,getBlockName:b}=(0,g.useSelect)(ji),{getGroupingBlockName:k}=(0,g.useSelect)(p.store),{showEmptyBlockSideInserter:v,showBlockToolbarPopover:_}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getFirstMultiSelectedBlockClientId:n,getBlock:o,getBlockMode:r,getSettings:i,isTyping:s,isBlockInterfaceHidden:l}=G(e(ji)),a=t()||n(),c=o(a),u=!!a&&!!c,d=u&&(0,p.isUnmodifiedDefaultBlock)(c,"content")&&"html"!==r(a),h=a&&!s()&&d;return{showEmptyBlockSideInserter:h,showBlockToolbarPopover:!l()&&!i().hasFixedToolbar&&!h&&u&&!d}}),[]),y=RE(),{duplicateBlocks:x,removeBlocks:S,replaceBlocks:w,insertAfterBlock:C,insertBeforeBlock:B,selectBlock:I,moveBlocksUp:j,moveBlocksDown:E,expandBlock:M,updateBlockAttributes:P}=G((0,g.useDispatch)(ji));const R=Fm(t),A=Fm(t);return(0,d.jsx)("div",{...n,onKeyDown:function(e){if(!e.defaultPrevented)if(a("core/block-editor/move-up",e)||a("core/block-editor/move-down",e)){const t=u();if(t.length){e.preventDefault();const n=m(t[0]);"up"===(a("core/block-editor/move-up",e)?"up":"down")?j(t,n):E(t,n);const o=Array.isArray(t)?t.length:1,r=(0,T.sprintf)((0,T._n)("%d block moved.","%d blocks moved.",t.length),o);(0,Uo.speak)(r)}}else if(a("core/block-editor/duplicate",e)){const t=u();t.length&&(e.preventDefault(),x(t))}else if(a("core/block-editor/remove",e)){const t=u();t.length&&(e.preventDefault(),S(t))}else if(a("core/block-editor/paste-styles",e)){const t=u();if(t.length){e.preventDefault();const n=c(t);y(n)}}else if(a("core/block-editor/insert-after",e)){const t=u();t.length&&(e.preventDefault(),C(t[t.length-1]))}else if(a("core/block-editor/insert-before",e)){const t=u();t.length&&(e.preventDefault(),B(t[0]))}else if(a("core/block-editor/unselect",e)){if(e.target.closest("[role=toolbar]"))return;const t=u();t.length>1&&(e.preventDefault(),I(t[0]))}else if(a("core/block-editor/collapse-list-view",e)){if((0,Ga.isTextField)(e.target)||(0,Ga.isTextField)(e.target?.contentWindow?.document?.activeElement))return;e.preventDefault(),M(o)}else if(a("core/block-editor/group",e)){const t=u();if(t.length>1&&f(t)){e.preventDefault();const n=c(t),o=k(),r=(0,p.switchToBlockType)(n,o);w(t,r),(0,Uo.speak)((0,T.__)("Selected blocks are grouped."))}}else if(a("core/block-editor/toggle-block-visibility",e)){const t=u();if(t.length){e.preventDefault();const n=c(t);if(!n.every((e=>(0,p.hasBlockSupport)(b(e.clientId),"blockVisibility",!0))))return;const o=n.some((e=>!1===e.attributes.metadata?.blockVisibility)),r=Object.fromEntries(n.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!!o&&void 0})}])));P(t,r,{uniqueByBlock:!0})}}},children:(0,d.jsxs)(jS.Provider,{value:(0,h.useRef)(!1),children:[!i&&!s&&(0,d.jsx)(TS,{__unstableContentRef:t}),v&&(0,d.jsx)(Rj,{__unstableContentRef:t,clientId:o}),_&&(0,d.jsx)(zT,{__unstableContentRef:t,clientId:o,isTyping:i}),!s&&!r&&(0,d.jsx)(ws.Popover.Slot,{name:"block-toolbar",ref:R}),e,(0,d.jsx)(ws.Popover.Slot,{name:"__unstable-block-tools-after",ref:A}),s&&!l&&(0,d.jsx)(FT,{__unstableContentRef:t})]})})}const GT=window.wp.commands;var $T=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),WT=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});const KT=()=>function(){const{replaceBlocks:e,multiSelect:t}=(0,g.useDispatch)(ji),{blocks:n,clientIds:o,canRemove:r,possibleBlockTransformations:i,invalidSelection:s}=(0,g.useSelect)((e=>{const{getBlockRootClientId:t,getBlockTransformItems:n,getSelectedBlockClientIds:o,getBlocksByClientId:r,canRemoveBlocks:i}=e(ji),s=o(),l=r(s);if(l.filter((e=>!e)).length>0)return{invalidSelection:!0};return{blocks:l,clientIds:s,possibleBlockTransformations:n(l,t(s[0])),canRemove:i(s),invalidSelection:!1}}),[]);if(s)return{isLoading:!1,commands:[]};const l=1===n.length&&(0,p.isTemplatePart)(n[0]);function a(r){const i=(0,p.switchToBlockType)(n,r);var s;e(o,i),(s=i).length>1&&t(s[0].clientId,s[s.length-1].clientId)}const c=!!i.length&&r&&!l;if(!o||o.length<1||!c)return{isLoading:!1,commands:[]};return{isLoading:!1,commands:i.map((e=>{const{name:t,title:n,icon:o}=e;return{name:"core/block-editor/transform-to-"+t.replace("/","-"),label:(0,T.sprintf)((0,T.__)("Transform to %s"),n),icon:(0,d.jsx)(Vu,{icon:o}),callback:({close:e})=>{a(t),e()}}}))}},ZT=()=>{(0,GT.useCommandLoader)({name:"core/block-editor/blockTransforms",hook:KT()}),(0,GT.useCommandLoader)({name:"core/block-editor/blockQuickActions",hook:function(){const{clientIds:e,isUngroupable:t,isGroupable:n}=(0,g.useSelect)((e=>{const{getSelectedBlockClientIds:t,isUngroupable:n,isGroupable:o}=e(ji);return{clientIds:t(),isUngroupable:n(),isGroupable:o()}}),[]),{canInsertBlockType:o,getBlockRootClientId:r,getBlocksByClientId:i,canRemoveBlocks:s,getBlockName:l}=(0,g.useSelect)(ji),{getDefaultBlockName:a,getGroupingBlockName:c}=(0,g.useSelect)(p.store),u=i(e),{removeBlocks:d,replaceBlocks:h,duplicateBlocks:m,insertAfterBlock:f,insertBeforeBlock:b,updateBlockAttributes:k}=(0,g.useDispatch)(ji),v=()=>{if(!u.length)return;const t=c(),n=(0,p.switchToBlockType)(u,t);n&&h(e,n)},_=()=>{if(!u.length)return;const t=u[0].innerBlocks;t.length&&h(e,t)};if(!e||e.length<1)return{isLoading:!1,commands:[]};const y=r(e[0]),x=o(a(),y),S=u.every((e=>!!e&&(0,p.hasBlockSupport)(e.name,"multiple",!0)&&o(e.name,y))),w=s(e),C=u.every((({clientId:e})=>(0,p.hasBlockSupport)(l(e),"blockVisibility",!0))),B=[];if(S&&B.push({name:"duplicate",label:(0,T.__)("Duplicate"),callback:()=>m(e,!0),icon:qj}),x&&B.push({name:"add-before",label:(0,T.__)("Add before"),callback:()=>{const t=Array.isArray(e)?e[0]:t;b(t)},icon:cc},{name:"add-after",label:(0,T.__)("Add after"),callback:()=>{const t=Array.isArray(e)?e[e.length-1]:t;f(t)},icon:cc}),n&&B.push({name:"Group",label:(0,T.__)("Group"),callback:v,icon:bT}),t&&B.push({name:"ungroup",label:(0,T.__)("Ungroup"),callback:_,icon:$T}),w&&B.push({name:"remove",label:(0,T.__)("Delete"),callback:()=>d(e,!0),icon:WT}),C){const t=u.some((e=>!1===e.attributes.metadata?.blockVisibility));B.push({name:"core/toggle-block-visibility",label:t?(0,T.__)("Show"):(0,T.__)("Hide"),callback:()=>{const n=Object.fromEntries(u?.map((({clientId:e,attributes:n})=>[e,{metadata:fs({...n?.metadata,blockVisibility:!!t&&void 0})}])));k(e,n,{uniqueByBlock:!0})},icon:t?tT:nT})}return{isLoading:!1,commands:B.map((e=>({...e,name:"core/block-editor/action-"+e.name,callback:({close:t})=>{e.callback(),t()}})))}},context:"block-selection-edit"})},qT={ignoredSelectors:[/\.editor-styles-wrapper/gi]};function YT({shouldIframe:e=!0,height:t="300px",children:n=(0,d.jsx)(dw,{}),styles:o,contentRef:r,iframeProps:i}){ZT();const s=(0,m.useViewportMatch)("medium","<"),l=nw(),a=PS(),c=(0,h.useRef)(),u=(0,m.useMergeRefs)([r,a,c]),p=(0,g.useSelect)((e=>G(e(ji)).getZoomLevel()),[]),f=100===p||s?{}:{scale:p,frameSize:"40px"};return e?(0,d.jsx)(UT,{__unstableContentRef:c,style:{height:t,display:"flex"},children:(0,d.jsxs)(Fw,{...i,...f,ref:l,contentRef:u,style:{...i?.style},name:"editor-canvas",children:[(0,d.jsx)(cC,{styles:o}),n]})}):(0,d.jsxs)(UT,{__unstableContentRef:c,style:{height:t,display:"flex"},children:[(0,d.jsx)(cC,{styles:o,scope:":where(.editor-styles-wrapper)",transformOptions:qT}),(0,d.jsx)(Aw,{ref:u,className:"editor-styles-wrapper",tabIndex:-1,style:{height:"100%",width:"100%"},children:n})]})}var XT=function({children:e,height:t,styles:n}){return(0,d.jsx)(YT,{height:t,styles:n,children:e})};const QT=()=>(0,d.jsx)(ws.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:(0,d.jsx)(ws.Path,{d:"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z"})}),JT=({style:e,className:t})=>(0,d.jsx)("div",{className:"block-library-colors-selector__icon-container",children:(0,d.jsx)("div",{className:`${t} block-library-colors-selector__state-selection`,style:e,children:(0,d.jsx)(QT,{})})}),eM=({TextColor:e,BackgroundColor:t})=>({onToggle:n,isOpen:o})=>(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(ws.ToolbarButton,{className:"components-toolbar__control block-library-colors-selector__toggle",label:(0,T.__)("Open Colors Selector"),onClick:n,onKeyDown:e=>{o||e.keyCode!==Wa.DOWN||(e.preventDefault(),n())},icon:(0,d.jsx)(t,{children:(0,d.jsx)(e,{children:(0,d.jsx)(JT,{})})})})});var tM=({children:e,...t})=>(I()("wp.blockEditor.BlockColorsStyleSelector",{alternative:"block supports API",since:"6.1",version:"6.3"}),(0,d.jsx)(ws.Dropdown,{popoverProps:{placement:"bottom-start"},className:"block-library-colors-selector",contentClassName:"block-library-colors-selector__popover",renderToggle:eM(t),renderContent:()=>e})),nM=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})});const oM=(0,h.createContext)({});oM.displayName="ListViewContext";const rM=()=>(0,h.useContext)(oM);function iM({children:e,...t}){const n=(0,h.useRef)();return(0,h.useEffect)((()=>{n.current&&(n.current.textContent=n.current.textContent)}),[e]),(0,d.jsx)("div",{hidden:!0,...t,ref:n,children:e})}const sM=(0,h.forwardRef)((({nestingLevel:e,blockCount:t,clientId:n,...o},r)=>{const{insertedBlock:i,setInsertedBlock:s}=rM(),l=(0,m.useInstanceId)(sM),{directInsert:a,hideInserter:c}=(0,g.useSelect)((e=>{const{getBlockListSettings:t,getTemplateLock:o,isZoomOut:r}=G(e(ji)),i=t(n);return{directInsert:i?.directInsert||!1,hideInserter:!!o(n)||r()}}),[n]),u=Sj({clientId:n,context:"list-view"}),p=Sj({clientId:i?.clientId,context:"list-view"});if((0,h.useEffect)((()=>{p?.length&&(0,Uo.speak)((0,T.sprintf)((0,T.__)("%s block inserted"),p),"assertive")}),[p]),c)return null;const f=`list-view-appender__${l}`,b=(0,T.sprintf)((0,T.__)("Append to %1$s block at position %2$d, Level %3$d"),u,t+1,e);return(0,d.jsxs)("div",{className:"list-view-appender",children:[(0,d.jsx)(lI,{ref:r,rootClientId:n,position:"bottom right",isAppender:!0,selectBlockOnInsert:!1,shouldDirectInsert:a,__experimentalIsQuick:!0,...o,toggleProps:{"aria-describedby":f},onSelectOrClose:e=>{e?.clientId&&s(e)}}),(0,d.jsx)(iM,{id:f,children:b})]})})),lM=Jx(ws.__experimentalTreeGridRow),aM=(0,h.forwardRef)((({isDragged:e,isSelected:t,position:n,level:o,rowCount:r,children:i,className:s,path:l,...a},c)=>{const u=tS({clientId:a["data-block"],enableAnimation:!0,triggerAnimationOnChange:l}),p=(0,m.useMergeRefs)([c,u]);return(0,d.jsx)(lM,{ref:p,className:ms("block-editor-list-view-leaf",s),level:o,positionInSet:n,setSize:r,isExpanded:void 0,...a,children:i})}));var cM=aM;var uM=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{d:"M10.97 10.159a3.382 3.382 0 0 0-2.857.955l1.724 1.723-2.836 2.913L7 17h1.25l2.913-2.837 1.723 1.723a3.38 3.38 0 0 0 .606-.825c.33-.63.446-1.343.35-2.032L17 10.695 13.305 7l-2.334 3.159Z"})}),dM=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});function pM({onClick:e}){return(0,d.jsx)("span",{className:"block-editor-list-view__expander",onClick:t=>e(t,{forceToggle:!0}),"aria-hidden":"true","data-testid":"list-view-expander",children:(0,d.jsx)(Ol,{icon:(0,T.isRTL)()?nc:oc})})}const hM={"core/image":({clientId:e,attributes:t})=>{if(t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/cover":({clientId:e,attributes:t})=>{if("image"===t.backgroundType&&t.url)return{url:t.url,alt:t.alt||"",clientId:e}},"core/media-text":({clientId:e,attributes:t})=>{if("image"===t.mediaType&&t.mediaUrl)return{url:t.mediaUrl,alt:t.mediaAlt||"",clientId:e}},"core/gallery":({innerBlocks:e})=>{const t=[],n=e?.length?hM[e[0].name]:void 0;if(!n)return t;for(const o of e){const e=n(o);if(e&&t.push(e),t.length>=3)return t}return t}};function gM({clientId:e,isExpanded:t}){const{block:n}=(0,g.useSelect)((t=>({block:t(ji).getBlock(e)})),[e]);return(0,h.useMemo)((()=>function(e,t){const n=hM[e.name],o=n?n(e):void 0;return o?Array.isArray(o)?t?[]:o:[o]:[]}(n,t)),[n,t])}const{Badge:mM}=G(ws.privateApis);var fM=(0,h.forwardRef)((function({className:e,block:{clientId:t},onClick:n,onContextMenu:o,onMouseDown:r,onToggleExpanded:i,tabIndex:s,onFocus:l,onDragStart:a,onDragEnd:c,draggable:u,isExpanded:h,ariaDescribedBy:m},f){const b=Xf(t),k=Sj({clientId:t,context:"list-view"}),{isLocked:v}=HE(t),{canToggleBlockVisibility:_,isBlockHidden:y,isContentOnly:x}=(0,g.useSelect)((e=>{const{getBlockName:n}=e(ji),{isBlockHidden:o}=G(e(ji));return{canToggleBlockVisibility:(0,p.hasBlockSupport)(n(t),"blockVisibility",!0),isBlockHidden:o(t),isContentOnly:"contentOnly"===e(ji).getBlockEditingMode(t)}}),[t]),S=v&&!x,w=_&&y,C="sticky"===b?.positionType,B=gM({clientId:t,isExpanded:h});return(0,d.jsxs)("a",{className:ms("block-editor-list-view-block-select-button",e),onClick:n,onContextMenu:o,onKeyDown:function(e){e.keyCode!==Wa.ENTER&&e.keyCode!==Wa.SPACE||n(e)},onMouseDown:r,ref:f,tabIndex:s,onFocus:l,onDragStart:e=>{e.dataTransfer.clearData(),a?.(e)},onDragEnd:c,draggable:u,href:`#block-${t}`,"aria-describedby":m,"aria-expanded":h,children:[(0,d.jsx)(pM,{onClick:i}),(0,d.jsx)(Vu,{icon:b?.icon,showColors:!0,context:"list-view"}),(0,d.jsxs)(ws.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:[(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,d.jsx)(ws.__experimentalTruncate,{ellipsizeMode:"auto",children:k})}),b?.anchor&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__anchor-wrapper",children:(0,d.jsx)(mM,{className:"block-editor-list-view-block-select-button__anchor",children:b.anchor})}),C&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__sticky",children:(0,d.jsx)(Ol,{icon:uM})}),B.length?(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__images","aria-hidden":!0,children:B.map(((e,t)=>(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__image",style:{backgroundImage:`url(${e.url})`,zIndex:B.length-t}},e.clientId)))}):null,w&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__block-visibility",children:(0,d.jsx)(Ol,{icon:nT})}),S&&(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__lock",children:(0,d.jsx)(Ol,{icon:dM})})]})]})}));const bM=(0,h.forwardRef)((({onClick:e,onToggleExpanded:t,block:n,isSelected:o,position:r,siblingBlockCount:i,level:s,isExpanded:l,selectedClientIds:a,...c},u)=>{const{clientId:p}=n,{AdditionalBlockContent:h,insertedBlock:g,setInsertedBlock:m}=rM(),f=a.includes(p)?a:[p];return(0,d.jsxs)(d.Fragment,{children:[h&&(0,d.jsx)(h,{block:n,insertedBlock:g,setInsertedBlock:m}),(0,d.jsx)(Aj,{appendToOwnerDocument:!0,clientIds:f,cloneClassname:"block-editor-list-view-draggable-chip",children:({draggable:a,onDragStart:p,onDragEnd:h})=>(0,d.jsx)(fM,{ref:u,className:"block-editor-list-view-block-contents",block:n,onClick:e,onToggleExpanded:t,isSelected:o,position:r,siblingBlockCount:i,level:s,draggable:a,onDragStart:p,onDragEnd:h,isExpanded:l,...c})})]})}));var kM=bM;function vM(e,t){const n=()=>{const n=t?.querySelector(`[role=row][data-block="${e}"]`);return n?Ga.focus.focusable.find(n)[0]:null};let o=n();o?o.focus():window.requestAnimationFrame((()=>{o=n(),o&&o.focus()}))}var _M=(0,h.memo)((function e({block:{clientId:t},displacement:n,isAfterDraggedBlocks:o,isDragged:r,isNesting:i,isSelected:s,isBranchSelected:l,selectBlock:a,position:c,level:u,rowCount:f,siblingBlockCount:b,showBlockMovers:k,path:v,isExpanded:_,selectedClientIds:y,isSyncedBranch:x}){const S=(0,h.useRef)(null),w=(0,h.useRef)(null),C=(0,h.useRef)(null),[B,I]=(0,h.useState)(!1),[j,E]=(0,h.useState)(),{isLocked:M,canEdit:P,canMove:R}=HE(t),A=s&&y[0]===t,N=s&&y[y.length-1]===t,{toggleBlockHighlight:L,duplicateBlocks:D,multiSelect:O,replaceBlocks:z,removeBlocks:V,insertAfterBlock:F,insertBeforeBlock:H,setOpenedBlockSettingsMenu:U,updateBlockAttributes:$}=G((0,g.useDispatch)(ji)),W=(0,m.useDebounce)(L,50),{canInsertBlockType:K,getSelectedBlockClientIds:Z,getPreviousBlockClientId:q,getBlockRootClientId:Y,getBlockOrder:X,getBlockParents:Q,getBlocksByClientId:J,canRemoveBlocks:ee,isGroupable:te}=(0,g.useSelect)(ji),{getGroupingBlockName:ne}=(0,g.useSelect)(p.store),oe=Xf(t),re=RE(),{block:ie,blockName:se,allowRightClickOverrides:le,isBlockHidden:ae}=(0,g.useSelect)((e=>{const{getBlock:n,getBlockName:o,getSettings:r}=e(ji),{isBlockHidden:i}=G(e(ji));return{block:n(t),blockName:o(t),allowRightClickOverrides:r().allowRightClickOverrides,isBlockHidden:i(t)}}),[t]),ce=(0,p.hasBlockSupport)(se,"__experimentalToolbar",!0),ue=`list-view-block-select-button__description-${(0,m.useInstanceId)(e)}`,{expand:de,collapse:pe,collapseAll:he,BlockSettingsMenu:ge,listViewInstanceId:me,expandedState:fe,setInsertedBlock:be,treeGridElementRef:ke,rootClientId:ve}=rM(),_e=(0,Yk.__unstableUseShortcutEventMatch)();function ye(){const e=Z(),n=e.includes(t),o=n?e[0]:t,r=Y(o);return{blocksToUpdate:n?e:[t],firstBlockClientId:o,firstBlockRootClientId:r,selectedBlockClientIds:e}}const xe=(0,h.useCallback)((()=>{I(!0),W(t,!0)}),[t,I,W]),Se=(0,h.useCallback)((()=>{I(!1),W(t,!1)}),[t,I,W]),we=(0,h.useCallback)((e=>{a(e,t),e.preventDefault()}),[t,a]),Ce=(0,h.useCallback)(((e,t)=>{t&&a(void 0,e,null,null),vM(e,ke?.current)}),[a,ke]),Be=(0,h.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),!0===_?pe(t):!1===_&&de(t)}),[t,de,pe,_]),Ie=(0,h.useCallback)((e=>{ce&&le&&(C.current?.click(),E(new window.DOMRect(e.clientX,e.clientY,0,0)),e.preventDefault())}),[le,C,ce]),je=(0,h.useCallback)((e=>{le&&2===e.button&&e.preventDefault()}),[le]),Ee=(0,h.useMemo)((()=>{const{ownerDocument:e}=w?.current||{};if(j&&e)return{ownerDocument:e,getBoundingClientRect:()=>j}}),[j]),Te=(0,h.useCallback)((()=>{E(void 0)}),[E]);if(function({isSelected:e,selectedClientIds:t,rowItemRef:n}){const o=1===t.length;(0,h.useLayoutEffect)((()=>{if(!e||!o||!n.current)return;const t=(0,Ga.getScrollContainer)(n.current),{ownerDocument:r}=n.current;if(t===r.body||t===r.documentElement||!t)return;const i=n.current.getBoundingClientRect(),s=t.getBoundingClientRect();(i.top<s.top||i.bottom>s.bottom)&&n.current.scrollIntoView()}),[e,o,n])}({isSelected:s,rowItemRef:w,selectedClientIds:y}),!ie)return null;const Me=((e,t,n)=>(0,T.sprintf)((0,T.__)("Block %1$d of %2$d, Level %3$d."),e,t,n))(c,b,u),Pe=((e,t)=>[e?.positionLabel?`${(0,T.sprintf)((0,T.__)("Position: %s"),e.positionLabel)}.`:void 0,t?(0,T.__)("This block is locked."):void 0].filter(Boolean).join(" "))(oe,M),Re=ae?(0,T.__)("Block is hidden."):null,Ae=k&&b>0,Ne=ms("block-editor-list-view-block__mover-cell",{"is-visible":B||s}),Le=ms("block-editor-list-view-block__menu-cell",{"is-visible":B||A});let De;Ae?De=2:ce||(De=3);const Oe=ms({"is-selected":s,"is-first-selected":A,"is-last-selected":N,"is-branch-selected":l,"is-synced-branch":x,"is-dragging":r,"has-single-cell":!ce,"is-synced":oe?.isSynced,"is-draggable":R,"is-displacement-normal":"normal"===n,"is-displacement-up":"up"===n,"is-displacement-down":"down"===n,"is-after-dragged-blocks":o,"is-nesting":i}),ze=y.includes(t)?y:[t],Ve=s&&1===y.length;return(0,d.jsxs)(cM,{className:Oe,isDragged:r,onKeyDown:async function(e){if(e.defaultPrevented)return;if(e.target.closest("[role=dialog]"))return;const t=[Wa.BACKSPACE,Wa.DELETE].includes(e.keyCode);if(_e("core/block-editor/unselect",e)&&y.length>0)e.stopPropagation(),e.preventDefault(),a(e,void 0);else if(t||_e("core/block-editor/remove",e)){const{blocksToUpdate:e,firstBlockClientId:t,firstBlockRootClientId:n,selectedBlockClientIds:o}=ye();if(!ee(e))return;let r=q(t)??n;V(e,!1);const i=o.length>0&&0===Z().length;r||(r=X()[0]),Ce(r,i)}else if(_e("core/block-editor/paste-styles",e)){e.preventDefault();const{blocksToUpdate:t}=ye(),n=J(t);re(n)}else if(_e("core/block-editor/duplicate",e)){e.preventDefault();const{blocksToUpdate:t,firstBlockRootClientId:n}=ye();if(J(t).every((e=>!!e&&(0,p.hasBlockSupport)(e.name,"multiple",!0)&&K(e.name,n)))){const e=await D(t,!1);e?.length&&Ce(e[0],!1)}}else if(_e("core/block-editor/insert-before",e)){e.preventDefault();const{blocksToUpdate:t}=ye();await H(t[0]);const n=Z();U(void 0),Ce(n[0],!1)}else if(_e("core/block-editor/insert-after",e)){e.preventDefault();const{blocksToUpdate:t}=ye();await F(t.at(-1));const n=Z();U(void 0),Ce(n[0],!1)}else if(_e("core/block-editor/select-all",e)){e.preventDefault();const{firstBlockRootClientId:t,selectedBlockClientIds:n}=ye(),o=X(t);if(!o.length)return;if(Ja()(n,o)&&t&&t!==ve)return void Ce(t,!0);O(o[0],o[o.length-1],null)}else if(_e("core/block-editor/collapse-list-view",e)){e.preventDefault();const{firstBlockClientId:t}=ye(),n=Q(t,!1);he(),de(n)}else if(_e("core/block-editor/group",e)){const{blocksToUpdate:t}=ye();if(t.length>1&&te(t)){e.preventDefault();const n=J(t),o=ne(),r=(0,p.switchToBlockType)(n,o);z(t,r),(0,Uo.speak)((0,T.__)("Selected blocks are grouped."));const i=Z();U(void 0),Ce(i[0],!1)}}else if(_e("core/block-editor/toggle-block-visibility",e)){e.preventDefault();const{blocksToUpdate:t}=ye(),n=J(t);if(!n.every((e=>(0,p.hasBlockSupport)(e.name,"blockVisibility",!0))))return;const o=n.some((e=>!1===e.attributes.metadata?.blockVisibility)),r=Object.fromEntries(n.map((({clientId:e,attributes:t})=>[e,{metadata:fs({...t?.metadata,blockVisibility:!!o&&void 0})}])));$(t,r,{uniqueByBlock:!0})}},onMouseEnter:xe,onMouseLeave:Se,onFocus:xe,onBlur:Se,level:u,position:c,rowCount:f,path:v,id:`list-view-${me}-block-${t}`,"data-block":t,"data-expanded":P?_:void 0,ref:w,children:[(0,d.jsx)(ws.__experimentalTreeGridCell,{className:"block-editor-list-view-block__contents-cell",colSpan:De,ref:S,"aria-selected":!!s,children:({ref:e,tabIndex:t,onFocus:n})=>(0,d.jsxs)("div",{className:"block-editor-list-view-block__contents-container",children:[(0,d.jsx)(kM,{block:ie,onClick:we,onContextMenu:Ie,onMouseDown:je,onToggleExpanded:Be,isSelected:s,position:c,siblingBlockCount:b,level:u,ref:e,tabIndex:Ve?0:t,onFocus:n,isExpanded:P?_:void 0,selectedClientIds:y,ariaDescribedBy:ue}),(0,d.jsx)(iM,{id:ue,children:[Me,Pe,Re].filter(Boolean).join(" ")})]})}),Ae&&(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(ws.__experimentalTreeGridCell,{className:Ne,withoutGridItem:!0,children:[(0,d.jsx)(ws.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,d.jsx)(Vj,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})}),(0,d.jsx)(ws.__experimentalTreeGridItem,{children:({ref:e,tabIndex:n,onFocus:o})=>(0,d.jsx)(Fj,{orientation:"vertical",clientIds:[t],ref:e,tabIndex:n,onFocus:o})})]})}),ce&&ge&&(0,d.jsx)(ws.__experimentalTreeGridCell,{className:Le,"aria-selected":!!s,ref:C,children:({ref:e,tabIndex:t,onFocus:n})=>(0,d.jsx)(ge,{clientIds:ze,block:ie,icon:fv,label:(0,T.__)("Options"),popoverProps:{anchor:Ee},toggleProps:{ref:e,className:"block-editor-list-view-block__menu",tabIndex:t,onClick:Te,onFocus:n,size:"small"},disableOpenOnArrowDown:!0,expand:de,expandedState:fe,setInsertedBlock:be,__experimentalSelectBlock:Ce})})]})}));function yM(e,t,n,o){const r=n?.includes(e.clientId);if(r)return 0;return t[e.clientId]??o?1+e.innerBlocks.reduce(xM(t,n,o),0):1}const xM=(e,t,n)=>(o,r)=>{const i=t?.includes(r.clientId);if(i)return o;return(e[r.clientId]??n)&&r.innerBlocks.length>0?o+yM(r,e,t,n):o+1},SM=()=>{};var wM=(0,h.memo)((function e(t){const{blocks:n,selectBlock:o=SM,showBlockMovers:r,selectedClientIds:i,level:s=1,path:l="",isBranchSelected:a=!1,listPosition:c=0,fixedListWindow:u,isExpanded:p,parentId:m,shouldShowInnerBlocks:f=!0,isSyncedBranch:b=!1,showAppender:k=!0}=t,v=Xf(m),_=b||!!v?.isSynced,y=(0,g.useSelect)((e=>!m||e(ji).canEditBlock(m)),[m]),{blockDropPosition:x,blockDropTargetIndex:S,firstDraggedBlockIndex:w,blockIndexes:C,expandedState:B,draggedClientIds:I}=rM(),j=(0,h.useRef)();if(!y)return null;const E=k&&1===s,T=n.filter(Boolean),M=T.length,P=E?M+1:M;return j.current=c,(0,d.jsxs)(d.Fragment,{children:[T.map(((t,n)=>{const{clientId:c,innerBlocks:h}=t;n>0&&(j.current+=yM(T[n-1],B,I,p));const m=!!I?.includes(c),{displacement:b,isAfterDraggedBlocks:k,isNesting:v}=function({blockIndexes:e,blockDropTargetIndex:t,blockDropPosition:n,clientId:o,firstDraggedBlockIndex:r,isDragged:i}){let s,l,a;if(!i){l=!1;const i=e[o];a=i>r,null!=t&&void 0!==r?void 0!==i&&(s=i>=r&&i<t?"up":i<r&&i>=t?"down":"normal",l="number"==typeof t&&t-1===i&&"inside"===n):null===t&&void 0!==r?s=void 0!==i&&i>=r?"up":"normal":null!=t&&void 0===r?void 0!==i&&(s=i<t?"normal":"down"):null===t&&(s="normal")}return{displacement:s,isNesting:l,isAfterDraggedBlocks:a}}({blockIndexes:C,blockDropTargetIndex:S,blockDropPosition:x,clientId:c,firstDraggedBlockIndex:w,isDragged:m}),{itemInView:y}=u,E=y(j.current),R=n+1,A=l.length>0?`${l}_${R}`:`${R}`,N=!!h?.length,L=N&&f?B[c]??p:void 0,D=((e,t)=>Array.isArray(t)&&t.length?-1!==t.indexOf(e):t===e)(c,i),O=a||D&&N,z=m||E||D&&c===i[0]||0===n||n===M-1;return(0,d.jsxs)(g.AsyncModeProvider,{value:!D,children:[z&&(0,d.jsx)(_M,{block:t,selectBlock:o,isSelected:D,isBranchSelected:O,isDragged:m,level:s,position:R,rowCount:P,siblingBlockCount:M,showBlockMovers:r,path:A,isExpanded:!m&&L,listPosition:j.current,selectedClientIds:i,isSyncedBranch:_,displacement:b,isAfterDraggedBlocks:k,isNesting:v}),!z&&(0,d.jsx)("tr",{children:(0,d.jsx)("td",{className:"block-editor-list-view-placeholder"})}),N&&L&&!m&&(0,d.jsx)(e,{parentId:c,blocks:h,selectBlock:o,showBlockMovers:r,level:s+1,path:A,listPosition:j.current+1,fixedListWindow:u,isBranchSelected:O,selectedClientIds:i,isExpanded:p,isSyncedBranch:_})]},c)})),E&&(0,d.jsx)(ws.__experimentalTreeGridRow,{level:s,setSize:P,positionInSet:P,isExpanded:!0,children:(0,d.jsx)(ws.__experimentalTreeGridCell,{children:e=>(0,d.jsx)(sM,{clientId:m,nestingLevel:s,blockCount:M,...e})})})]})}));function CM({draggedBlockClientId:e,listViewRef:t,blockDropTarget:n}){const o=Xf(e),r=Sj({clientId:e,context:"list-view"}),{rootClientId:i,clientId:s,dropPosition:l}=n||{},[a,c]=(0,h.useMemo)((()=>{if(!t.current)return[];return[i?t.current.querySelector(`[data-block="${i}"]`):void 0,s?t.current.querySelector(`[data-block="${s}"]`):void 0]}),[t,i,s]),u=c||a,p=(0,T.isRTL)(),g=(0,h.useCallback)(((e,t)=>{if(!u)return 0;let n=u.offsetWidth;const o=(0,Ga.getScrollContainer)(u,"horizontal"),r=u.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const r=o.getBoundingClientRect(),i=(0,T.isRTL)()?r.right-e.right:e.left-r.left,s=o.clientWidth;if(s<n+i&&(n=s-i),!p&&e.left+t<r.left)return n-=r.left-e.left,n;if(p&&e.right-t>r.right)return n-=e.right-r.right,n}return n-t}),[p,u]),m=(0,h.useMemo)((()=>{if(!u)return{};const e=u.getBoundingClientRect();return{width:g(e,0)}}),[g,u]),f=(0,h.useMemo)((()=>{if(!u)return{};const e=(0,Ga.getScrollContainer)(u),t=u.ownerDocument,n=e===t.body||e===t.documentElement;if(e&&!n){const t=e.getBoundingClientRect(),n=u.getBoundingClientRect(),o=p?t.right-n.right:n.left-t.left;if(!p&&t.left>n.left)return{transform:`translateX( ${o}px )`};if(p&&t.right<n.right)return{transform:`translateX( ${-1*o}px )`}}return{}}),[p,u]),b=(0,h.useMemo)((()=>{if(!a)return 1;const e=parseInt(a.getAttribute("aria-level"),10);return e?e+1:1}),[a]),k=(0,h.useMemo)((()=>!!u&&u.classList.contains("is-branch-selected")),[u]),v=(0,h.useMemo)((()=>{if(u&&("top"===l||"bottom"===l||"inside"===l))return{contextElement:u,getBoundingClientRect(){const e=u.getBoundingClientRect();let t=e.left,n=0;const o=(0,Ga.getScrollContainer)(u,"horizontal"),r=u.ownerDocument,i=o===r.body||o===r.documentElement;if(o&&!i){const e=o.getBoundingClientRect(),n=p?o.offsetWidth-o.clientWidth:0;t<e.left+n&&(t=e.left+n)}n="top"===l?e.top-2*e.height:e.top;const s=g(e,0),a=e.height;return new window.DOMRect(t,n,s,a)}}}),[u,l,g,p]);return u?(0,d.jsx)(ws.Popover,{animate:!1,anchor:v,focusOnMount:!1,className:"block-editor-list-view-drop-indicator--preview",variant:"unstyled",flip:!1,resize:!0,children:(0,d.jsx)("div",{style:m,className:ms("block-editor-list-view-drop-indicator__line",{"block-editor-list-view-drop-indicator__line--darker":k}),children:(0,d.jsxs)("div",{className:"block-editor-list-view-leaf","aria-level":b,children:[(0,d.jsxs)("div",{className:ms("block-editor-list-view-block-select-button","block-editor-list-view-block-contents"),style:f,children:[(0,d.jsx)(pM,{onClick:()=>{}}),(0,d.jsx)(Vu,{icon:o?.icon,showColors:!0,context:"list-view"}),(0,d.jsx)(ws.__experimentalHStack,{alignment:"center",className:"block-editor-list-view-block-select-button__label-wrapper",justify:"flex-start",spacing:1,children:(0,d.jsx)("span",{className:"block-editor-list-view-block-select-button__title",children:(0,d.jsx)(ws.__experimentalTruncate,{ellipsizeMode:"auto",children:r})})})]}),(0,d.jsx)("div",{className:"block-editor-list-view-block__menu-cell"})]})})}):null}function BM(){const{clearSelectedBlock:e,multiSelect:t,selectBlock:n}=(0,g.useDispatch)(ji),{getBlockName:o,getBlockParents:r,getBlockSelectionStart:i,getSelectedBlockClientIds:s,hasMultiSelection:l,hasSelectedBlock:a}=(0,g.useSelect)(ji),{getBlockType:c}=(0,g.useSelect)(p.store);return{updateBlockSelection:(0,h.useCallback)((async(u,d,p,h)=>{if(!u?.shiftKey&&u?.keyCode!==Wa.ESCAPE)return void n(d,h);u.preventDefault();const g="keydown"===u.type&&u.keyCode===Wa.ESCAPE,m="keydown"===u.type&&(u.keyCode===Wa.UP||u.keyCode===Wa.DOWN||u.keyCode===Wa.HOME||u.keyCode===Wa.END);if(!m&&!a()&&!l())return void n(d,null);const f=s(),b=[...r(d),d];if((g||m&&!f.some((e=>b.includes(e))))&&await e(),!g){let e=i(),n=d;m&&(a()||l()||(e=d),p&&(n=p));const o=r(e),s=r(n),{start:c,end:u}=function(e,t,n,o){const r=[...n,e],i=[...o,t],s=Math.min(r.length,i.length)-1;return{start:r[s],end:i[s]}}(e,n,o,s);await t(c,u,null)}const k=s();if((u.keyCode===Wa.HOME||u.keyCode===Wa.END)&&k.length>1)return;const v=f.filter((e=>!k.includes(e)));let _;if(1===v.length){const e=c(o(v[0]))?.title;e&&(_=(0,T.sprintf)((0,T.__)("%s deselected."),e))}else v.length>1&&(_=(0,T.sprintf)((0,T.__)("%s blocks deselected."),v.length));_&&(0,Uo.speak)(_,"assertive")}),[e,o,c,r,i,s,l,a,t,n])}}const IM=24;function jM(e,t){const n=e[t+1];return n&&n.isDraggedBlock?jM(e,t+1):n}const EM=["top","bottom"];function TM(e,t,n=!1){let o,r,i,s,l;for(let n=0;n<e.length;n++){const a=e[n];if(a.isDraggedBlock)continue;const c=a.element.getBoundingClientRect(),[u,d]=zS(t,c,EM),p=VS(t,c);if(void 0===i||u<i||p){i=u;const t=e.indexOf(a),n=e[t-1];if("top"===d&&n&&n.rootClientId===a.rootClientId&&!n.isDraggedBlock?(r=n,o="bottom",s=n.element.getBoundingClientRect(),l=t-1):(r=a,o=d,s=c,l=t),p)break}}if(!r)return;const a=function(e,t){const n=[];let o=e;for(;o;)n.push({...o}),o=t.find((e=>e.clientId===o.rootClientId));return n}(r,e),c="bottom"===o;if(c&&r.canInsertDraggedBlocksAsChild&&(r.innerBlockCount>0&&r.isExpanded||function(e,t,n=1,o=!1){const r=o?t.right-n*IM:t.left+n*IM;return(o?e.x<r-IM:e.x>r+IM)&&e.y<t.bottom}(t,s,a.length,n))){const e=r.isExpanded?0:r.innerBlockCount||0;return{rootClientId:r.clientId,clientId:r.clientId,blockIndex:e,dropPosition:"inside"}}if(c&&r.rootClientId&&function(e,t,n=1,o=!1){const r=o?t.right-n*IM:t.left+n*IM;return o?e.x>r:e.x<r}(t,s,a.length,n)){const i=jM(e,l),c=r.nestingLevel,u=i?i.nestingLevel:1;if(c&&u){const d=function(e,t,n=1,o=!1){const r=o?t.right-n*IM:t.left+n*IM,i=o?r-e.x:e.x-r,s=Math.round(i/IM);return Math.abs(s)}(t,s,a.length,n),p=Math.max(Math.min(d,c-u),0);if(a[p]){let t=r.blockIndex;if(a[p].nestingLevel===i?.nestingLevel)t=i?.blockIndex;else for(let n=l;n>=0;n--){const o=e[n];if(o.rootClientId===a[p].rootClientId){t=o.blockIndex+1;break}}return{rootClientId:a[p].rootClientId,clientId:r.clientId,blockIndex:t,dropPosition:o}}}}if(!r.canInsertDraggedBlocksAsSibling)return;const u=c?1:0;return{rootClientId:r.rootClientId,clientId:r.clientId,blockIndex:r.blockIndex+u,dropPosition:o}}const MM={leading:!1,trailing:!0};function PM({selectBlock:e}){const t=(0,g.useRegistry)(),{getBlockOrder:n,getBlockRootClientId:o,getBlocksByClientId:r,getPreviousBlockClientId:i,getSelectedBlockClientIds:s,getSettings:l,canInsertBlockType:a,canRemoveBlocks:c}=(0,g.useSelect)(ji),{flashBlock:u,removeBlocks:d,replaceBlocks:h,insertBlocks:f}=(0,g.useDispatch)(ji),b=jw();return(0,m.useRefEffect)((g=>{function m(t,n){n&&e(void 0,t,null,null),vM(t,g)}function k(e){if(e.defaultPrevented)return;if(!g.contains(e.target.ownerDocument.activeElement))return;const k=e.target.ownerDocument.activeElement?.closest("[role=row]"),v=k?.dataset?.block;if(!v)return;const{blocksToUpdate:_,firstBlockClientId:y,firstBlockRootClientId:x,originallySelectedBlockClientIds:S}=function(e){const t=s(),n=t.includes(e),r=n?t[0]:e;return{blocksToUpdate:n?t:[e],firstBlockClientId:r,firstBlockRootClientId:o(r),originallySelectedBlockClientIds:t}}(v);if(0!==_.length){if(e.preventDefault(),"copy"===e.type||"cut"===e.type){1===_.length&&u(_[0]),b(e.type,_);Mw(e,r(_),t)}if("cut"===e.type){if(!c(_))return;let e=i(y)??x;d(_,!1);const t=S.length>0&&0===s().length;e||(e=n()[0]),m(e,t)}else if("paste"===e.type){const{__experimentalCanUserUseUnfilteredHTML:t}=l(),n=function(e,t){const{plainText:n,html:o,files:r}=Ew(e);let i=[];if(r.length){const e=(0,p.getBlockTransforms)("from");i=r.reduce(((t,n)=>{const o=(0,p.findTransform)(e,(e=>"files"===e.type&&e.isMatch([n])));return o&&t.push(o.transform([n])),t}),[]).flat()}else i=(0,p.pasteHandler)({HTML:o,plainText:n,mode:"BLOCKS",canUserUseUnfilteredHTML:t});return i}(e,t);if(1===_.length){const[e]=_;if(n.every((t=>a(t.name,e))))return f(n,void 0,e),void m(n[0]?.clientId,!1)}h(_,n,n.length-1,-1),m(n[0]?.clientId,!1)}}}return g.ownerDocument.addEventListener("copy",k),g.ownerDocument.addEventListener("cut",k),g.ownerDocument.addEventListener("paste",k),()=>{g.ownerDocument.removeEventListener("copy",k),g.ownerDocument.removeEventListener("cut",k),g.ownerDocument.removeEventListener("paste",k)}}),[])}const RM=(e,t)=>"clear"===t.type?{}:Array.isArray(t.clientIds)?{...e,...t.clientIds.reduce(((e,n)=>({...e,[n]:"expand"===t.type})),{})}:e;const AM=(0,h.forwardRef)((function e({id:t,blocks:n,dropZoneElement:o,showBlockMovers:r=!1,isExpanded:i=!1,showAppender:s=!1,blockSettingsMenu:l=dT,rootClientId:a,description:c,onSelect:u,additionalBlockContent:p},f){n&&I()("`blocks` property in `wp.blockEditor.__experimentalListView`",{since:"6.3",alternative:"`rootClientId` property"});const b=(0,m.useInstanceId)(e),{clientIdsTree:k,draggedClientIds:v,selectedClientIds:_}=function({blocks:e,rootClientId:t}){return(0,g.useSelect)((n=>{const{getDraggedBlockClientIds:o,getSelectedBlockClientIds:r,getEnabledClientIdsTree:i}=G(n(ji));return{selectedClientIds:r(),draggedClientIds:o(),clientIdsTree:e??i(t)}}),[e,t])}({blocks:n,rootClientId:a}),y=function(e){return(0,h.useMemo)((()=>{const t={};let n=0;const o=e=>{e.forEach((e=>{t[e.clientId]=n,n++,e.innerBlocks.length>0&&o(e.innerBlocks)}))};return o(e),t}),[e])}(k),{getBlock:x}=(0,g.useSelect)(ji),{visibleBlockCount:S}=(0,g.useSelect)((e=>{const{getGlobalBlockCount:t,getClientIdsOfDescendants:n}=e(ji),o=v?.length>0?n(v).length+1:0;return{visibleBlockCount:t()-o}}),[v]),{updateBlockSelection:w}=BM(),[C,B]=(0,h.useReducer)(RM,{}),[j,E]=(0,h.useState)(null),{setSelectedTreeId:M}=function({firstSelectedBlockClientId:e,setExpandedState:t}){const[n,o]=(0,h.useState)(null),{selectedBlockParentClientIds:r}=(0,g.useSelect)((t=>{const{getBlockParents:n}=t(ji);return{selectedBlockParentClientIds:n(e,!1)}}),[e]);return(0,h.useEffect)((()=>{n!==e&&r?.length&&t({type:"expand",clientIds:r})}),[e,r,n,t]),{setSelectedTreeId:o}}({firstSelectedBlockClientId:_[0],setExpandedState:B}),P=(0,h.useCallback)(((e,t,n)=>{w(e,t,null,n),M(t),u&&u(x(t))}),[M,w,u,x]),{ref:R,target:A}=function({dropZoneElement:e,expandedState:t,setExpandedState:n}){const{getBlockRootClientId:o,getBlockIndex:r,getBlockCount:i,getDraggedBlockClientIds:s,canInsertBlocks:l}=(0,g.useSelect)(ji),[a,c]=(0,h.useState)(),{rootClientId:u,blockIndex:d}=a||{},p=OS(u,d),f=(0,T.isRTL)(),b=(0,m.usePrevious)(u),k=(0,h.useCallback)(((e,t)=>{const{rootClientId:o}=t||{};o&&("inside"!==t?.dropPosition||e[o]||n({type:"expand",clientIds:[o]}))}),[n]),v=(0,m.useThrottle)(k,500,MM);(0,h.useEffect)((()=>{"inside"===a?.dropPosition&&b===a?.rootClientId?v(t,a):v.cancel()}),[t,b,a,v]);const _=s(),y=(0,m.useThrottle)((0,h.useCallback)(((e,t)=>{const n={x:e.clientX,y:e.clientY},s=!!_?.length,a=TM(Array.from(t.querySelectorAll("[data-block]")).map((e=>{const t=e.dataset.block,n="true"===e.dataset.expanded,a=e.classList.contains("is-dragging"),c=parseInt(e.getAttribute("aria-level"),10),u=o(t);return{clientId:t,isExpanded:n,rootClientId:u,blockIndex:r(t),element:e,nestingLevel:c||void 0,isDraggedBlock:!!s&&a,innerBlockCount:i(t),canInsertDraggedBlocksAsSibling:!s||l(_,u),canInsertDraggedBlocksAsChild:!s||l(_,t)}})),n,f);a&&c(a)}),[l,_,i,r,o,f]),50);return{ref:(0,m.__experimentalUseDropZone)({dropZoneElement:e,onDrop(e){y.cancel(),a&&p(e),c(void 0)},onDragLeave(){y.cancel(),c(null)},onDragOver(e){y(e,e.currentTarget)},onDragEnd(){y.cancel(),c(void 0)}}),target:a}}({dropZoneElement:o,expandedState:C,setExpandedState:B}),N=(0,h.useRef)(),L=PM({selectBlock:P}),D=(0,m.useMergeRefs)([L,N,R,f]);(0,h.useEffect)((()=>{_?.length&&vM(_[0],N?.current)}),[]);const O=(0,h.useCallback)((e=>{if(!e)return;const t=Array.isArray(e)?e:[e];B({type:"expand",clientIds:t})}),[B]),z=(0,h.useCallback)((e=>{e&&B({type:"collapse",clientIds:[e]})}),[B]),V=(0,h.useCallback)((()=>{B({type:"clear"})}),[B]),F=(0,h.useCallback)((e=>{O(e?.dataset?.block)}),[O]),H=(0,h.useCallback)((e=>{z(e?.dataset?.block)}),[z]),U=(0,h.useCallback)(((e,t,n)=>{e.shiftKey&&w(e,t?.dataset?.block,n?.dataset?.block)}),[w]);!function({collapseAll:e,expand:t}){const{expandedBlock:n,getBlockParents:o}=(0,g.useSelect)((e=>{const{getBlockParents:t,getExpandedBlock:n}=G(e(ji));return{expandedBlock:n(),getBlockParents:t}}),[]);(0,h.useEffect)((()=>{if(n){const r=o(n,!1);e(),t(r)}}),[e,t,n,o])}({collapseAll:V,expand:O});const $=v?.[0],{blockDropTargetIndex:W,blockDropPosition:K,firstDraggedBlockIndex:Z}=(0,h.useMemo)((()=>{let e,t;if(A?.clientId){const t=y[A.clientId];e=void 0===t||"top"===A?.dropPosition?t:t+1}else null===A&&(e=null);if($){const e=y[$];t=void 0===e||"top"===A?.dropPosition?e:e+1}return{blockDropTargetIndex:e,blockDropPosition:A?.dropPosition,firstDraggedBlockIndex:t}}),[A,y,$]),q=(0,h.useMemo)((()=>({blockDropPosition:K,blockDropTargetIndex:W,blockIndexes:y,draggedClientIds:v,expandedState:C,expand:O,firstDraggedBlockIndex:Z,collapse:z,collapseAll:V,BlockSettingsMenu:l,listViewInstanceId:b,AdditionalBlockContent:p,insertedBlock:j,setInsertedBlock:E,treeGridElementRef:N,rootClientId:a})),[K,W,y,v,C,O,Z,z,V,l,b,p,j,E,a]),[Y]=(0,m.__experimentalUseFixedWindowList)(N,32,S,{expandedState:C,useWindowing:!0,windowOverscan:40});if(!k.length&&!s)return null;const X=c&&`block-editor-list-view-description-${b}`;return(0,d.jsxs)(g.AsyncModeProvider,{value:!0,children:[(0,d.jsx)(CM,{draggedBlockClientId:$,listViewRef:N,blockDropTarget:A}),c&&(0,d.jsx)(ws.VisuallyHidden,{id:X,children:c}),(0,d.jsx)(ws.__experimentalTreeGrid,{id:t,className:ms("block-editor-list-view-tree",{"is-dragging":v?.length>0&&void 0!==W}),"aria-label":(0,T.__)("Block navigation structure"),ref:D,onCollapseRow:H,onExpandRow:F,onFocusRow:U,applicationAriaLabel:(0,T.__)("Block navigation structure"),"aria-describedby":X,style:{"--wp-admin--list-view-dragged-items-height":v?.length?32*(v.length-1)+"px":null},children:(0,d.jsx)(oM.Provider,{value:q,children:(0,d.jsx)(wM,{blocks:k,parentId:a,selectBlock:P,showBlockMovers:r,fixedListWindow:Y,selectedClientIds:_,isExpanded:i,showAppender:s})})})]})}));var NM=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(AM,{ref:t,...e,showAppender:!1,rootClientId:null,onSelect:null,additionalBlockContent:null,blockSettingsMenu:void 0})));function LM({isEnabled:e,onToggle:t,isOpen:n,innerRef:o,...r}){return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...r,ref:o,icon:nM,"aria-expanded":n,"aria-haspopup":"true",onClick:e?t:void 0,label:(0,T.__)("List view"),className:"block-editor-block-navigation","aria-disabled":!e})}var DM=(0,h.forwardRef)((function({isDisabled:e,...t},n){I()("wp.blockEditor.BlockNavigationDropdown",{since:"6.1",alternative:"wp.components.Dropdown and wp.blockEditor.ListView"});const o=(0,g.useSelect)((e=>!!e(ji).getBlockCount()),[])&&!e;return(0,d.jsx)(ws.Dropdown,{contentClassName:"block-editor-block-navigation__popover",popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:r})=>(0,d.jsx)(LM,{...t,innerRef:n,isOpen:e,onToggle:r,isEnabled:o}),renderContent:()=>(0,d.jsxs)("div",{className:"block-editor-block-navigation__container",children:[(0,d.jsx)("p",{className:"block-editor-block-navigation__label",children:(0,T.__)("List view")}),(0,d.jsx)(NM,{})]})})}));function OM({genericPreviewBlock:e,style:t,className:n,activeStyle:o}){const r=(0,p.getBlockType)(e.name)?.example,i=oE(n,o,t),s=(0,h.useMemo)((()=>({...e,title:t.label||t.name,description:t.description,initialAttributes:{...e.attributes,className:i+" block-editor-block-styles__block-preview-container"},example:r})),[e,i]);return(0,d.jsx)(_C,{item:s})}const zM=()=>{};var VM=function({clientId:e,onSwitch:t=zM,onHoverClassName:n=zM}){const{onSelect:o,stylesToRender:r,activeStyle:i,genericPreviewBlock:s,className:l}=iE({clientId:e,onSwitch:t}),[a,c]=(0,h.useState)(null),u=(0,m.useViewportMatch)("medium","<");if(!r||0===r.length)return null;const p=(0,m.debounce)(c,250),g=e=>{a!==e?(p(e),n(e?.name??null)):p.cancel()};return(0,d.jsxs)("div",{className:"block-editor-block-styles",children:[(0,d.jsx)("div",{className:"block-editor-block-styles__variants",children:r.map((e=>{const t=e.label||e.name;return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:ms("block-editor-block-styles__item",{"is-active":i.name===e.name}),variant:"secondary",label:t,onMouseEnter:()=>g(e),onFocus:()=>g(e),onMouseLeave:()=>g(null),onBlur:()=>g(null),onClick:()=>(e=>{o(e),n(null),c(null),p.cancel()})(e),"aria-current":i.name===e.name,children:(0,d.jsx)(ws.__experimentalTruncate,{numberOfLines:1,className:"block-editor-block-styles__item-text",children:t})},e.name)}))}),a&&!u&&(0,d.jsx)(ws.Popover,{placement:"left-start",offset:34,focusOnMount:!1,children:(0,d.jsx)("div",{className:"block-editor-block-styles__preview-panel",onMouseLeave:()=>g(null),children:(0,d.jsx)(OM,{activeStyle:i,className:l,genericPreviewBlock:s,style:a})})})]})};const FM={0:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})}),1:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M17.6 7c-.6.9-1.5 1.7-2.6 2v1h2v7h2V7h-1.4zM11 11H7V7H5v10h2v-4h4v4h2V7h-2v4z"})}),2:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 11.1H5v-4H3v10h2v-4h4v4h2v-10H9v4zm8 4c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6v1.5h8v-2H17z"})}),3:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.3 1.7c-.4-.4-1-.7-1.6-.8v-.1c.6-.2 1.1-.5 1.5-.9.3-.4.5-.8.5-1.3 0-.4-.1-.8-.3-1.1-.2-.3-.5-.6-.8-.8-.4-.2-.8-.4-1.2-.5-.6-.1-1.1-.2-1.6-.2-.6 0-1.3.1-1.8.3s-1.1.5-1.6.9l1.2 1.4c.4-.2.7-.4 1.1-.6.3-.2.7-.3 1.1-.3.4 0 .8.1 1.1.3.3.2.4.5.4.8 0 .4-.2.7-.6.9-.7.3-1.5.5-2.2.4v1.6c.5 0 1 0 1.5.1.3.1.7.2 1 .3.2.1.4.2.5.4s.1.4.1.6c0 .3-.2.7-.5.8-.4.2-.9.3-1.4.3s-1-.1-1.4-.3c-.4-.2-.8-.4-1.2-.7L13 15.6c.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.6 0 1.1-.1 1.6-.2.4-.1.9-.2 1.3-.5.4-.2.7-.5.9-.9.2-.4.3-.8.3-1.2 0-.6-.3-1.1-.7-1.5z"})}),4:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 13V7h-3l-4 6v2h5v2h2v-2h1v-2h-1zm-2 0h-2.8L18 9v4zm-9-2H5V7H3v10h2v-4h4v4h2V7H9v4z"})}),5:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M9 11H5V7H3v10h2v-4h4v4h2V7H9v4zm11.7 1.2c-.2-.3-.5-.7-.8-.9-.3-.3-.7-.5-1.1-.6-.5-.1-.9-.2-1.4-.2-.2 0-.5.1-.7.1-.2.1-.5.1-.7.2l.1-1.9h4.3V7H14l-.3 5 1 .6.5-.2.4-.1c.1-.1.3-.1.4-.1h.5c.5 0 1 .1 1.4.4.4.2.6.7.6 1.1 0 .4-.2.8-.6 1.1-.4.3-.9.4-1.4.4-.4 0-.9-.1-1.3-.3-.4-.2-.7-.4-1.1-.7 0 0-1.1 1.4-1 1.5.5.4 1 .8 1.6 1 .7.3 1.5.4 2.3.4.5 0 1-.1 1.5-.3s.9-.4 1.3-.7c.4-.3.7-.7.9-1.1s.3-.9.3-1.4-.1-1-.3-1.4z"})}),6:(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20.7 12.4c-.2-.3-.4-.6-.7-.9s-.6-.5-1-.6c-.4-.2-.8-.2-1.2-.2-.5 0-.9.1-1.3.3s-.8.5-1.2.8c0-.5 0-.9.2-1.4l.6-.9c.2-.2.5-.4.8-.5.6-.2 1.3-.2 1.9 0 .3.1.6.3.8.5 0 0 1.3-1.3 1.3-1.4-.4-.3-.9-.6-1.4-.8-.6-.2-1.3-.3-2-.3-.6 0-1.1.1-1.7.4-.5.2-1 .5-1.4.9-.4.4-.8 1-1 1.6-.3.7-.4 1.5-.4 2.3s.1 1.5.3 2.1c.2.6.6 1.1 1 1.5.4.4.9.7 1.4.9 1 .3 2 .3 3 0 .4-.1.8-.3 1.2-.6.3-.3.6-.6.8-1 .2-.5.3-.9.3-1.4s-.1-.9-.3-1.3zm-2 2.1c-.1.2-.3.4-.4.5-.1.1-.3.2-.5.2-.2.1-.4.1-.6.1-.2.1-.5 0-.7-.1-.2 0-.3-.2-.5-.3-.1-.2-.3-.4-.4-.6-.2-.3-.3-.7-.3-1 .3-.3.6-.5 1-.7.3-.1.7-.2 1-.2.4 0 .8.1 1.1.3.3.3.4.7.4 1.1 0 .2 0 .5-.1.7zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})})};function HM({level:e}){return FM[e]?(0,d.jsx)(ws.Icon,{icon:FM[e]}):null}const UM=[1,2,3,4,5,6],GM={className:"block-library-heading-level-dropdown"};function $M({options:e=UM,value:t,onChange:n}){const o=e.filter((e=>0===e||UM.includes(e))).sort(((e,t)=>e-t));return(0,d.jsx)(ws.ToolbarDropdownMenu,{popoverProps:GM,icon:(0,d.jsx)(HM,{level:t}),label:(0,T.__)("Change level"),controls:o.map((e=>{const o=e===t;return{icon:(0,d.jsx)(HM,{level:e}),title:0===e?(0,T.__)("Paragraph"):(0,T.sprintf)((0,T.__)("Heading %d"),e),isActive:o,onClick(){n(e)},role:"menuitemradio"}}))})}var WM=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var KM=function({icon:e=WM,label:t=(0,T.__)("Choose variation"),instructions:n=(0,T.__)("Select a variation to start with:"),variations:o,onSelect:r,allowSkip:i}){const s=ms("block-editor-block-variation-picker",{"has-many-variations":o.length>4});return(0,d.jsxs)(ws.Placeholder,{icon:e,label:t,instructions:n,className:s,children:[(0,d.jsx)("ul",{className:"block-editor-block-variation-picker__variations",role:"list","aria-label":(0,T.__)("Block variations"),children:o.map((e=>(0,d.jsxs)("li",{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:e.icon&&e.icon.src?e.icon.src:e.icon,iconSize:48,onClick:()=>r(e),className:"block-editor-block-variation-picker__variation",label:e.description||e.title}),(0,d.jsx)("span",{className:"block-editor-block-variation-picker__variation-label",children:e.title})]},e.name)))}),i&&(0,d.jsx)("div",{className:"block-editor-block-variation-picker__skip",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>r(),children:(0,T.__)("Skip")})})]})};const ZM="carousel",qM="grid",YM=({onBlockPatternSelect:e})=>(0,d.jsx)("div",{className:"block-editor-block-pattern-setup__actions",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:e,children:(0,T.__)("Choose")})}),XM=({handlePrevious:e,handleNext:t,activeSlide:n,totalSlides:o})=>(0,d.jsxs)("div",{className:"block-editor-block-pattern-setup__navigation",children:[(0,d.jsx)(ws.Button,{size:"compact",icon:(0,T.isRTL)()?Zb:qb,label:(0,T.__)("Previous pattern"),onClick:e,disabled:0===n,accessibleWhenDisabled:!0}),(0,d.jsx)(ws.Button,{size:"compact",icon:(0,T.isRTL)()?qb:Zb,label:(0,T.__)("Next pattern"),onClick:t,disabled:n===o-1,accessibleWhenDisabled:!0})]});var QM=({viewMode:e,setViewMode:t,handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i,onBlockPatternSelect:s})=>{const l=e===ZM,a=(0,d.jsxs)("div",{className:"block-editor-block-pattern-setup__display-controls",children:[(0,d.jsx)(ws.Button,{size:"compact",icon:ca,label:(0,T.__)("Carousel view"),onClick:()=>t(ZM),isPressed:l}),(0,d.jsx)(ws.Button,{size:"compact",icon:_T,label:(0,T.__)("Grid view"),onClick:()=>t(qM),isPressed:e===qM})]});return(0,d.jsxs)("div",{className:"block-editor-block-pattern-setup__toolbar",children:[l&&(0,d.jsx)(XM,{handlePrevious:n,handleNext:o,activeSlide:r,totalSlides:i}),a,l&&(0,d.jsx)(YM,{onBlockPatternSelect:s})]})};var JM=function(e,t,n){return(0,g.useSelect)((o=>{const{getBlockRootClientId:r,getPatternsByBlockTypes:i,__experimentalGetAllowedPatterns:s}=o(ji),l=r(e);return n?s(l).filter(n):i(t,l)}),[e,t,n])};const eP=({viewMode:e,activeSlide:t,patterns:n,onBlockPatternSelect:o,showTitles:r})=>{const i="block-editor-block-pattern-setup__container";if(e===ZM){const e=new Map([[t,"active-slide"],[t-1,"previous-slide"],[t+1,"next-slide"]]);return(0,d.jsx)("div",{className:"block-editor-block-pattern-setup__carousel",children:(0,d.jsx)("div",{className:i,children:(0,d.jsx)("div",{className:"carousel-container",children:n.map(((n,o)=>(0,d.jsx)(nP,{active:o===t,className:e.get(o)||"",pattern:n},n.name)))})})})}return(0,d.jsx)("div",{className:"block-editor-block-pattern-setup__grid",children:(0,d.jsx)(ws.Composite,{role:"listbox",className:i,"aria-label":(0,T.__)("Patterns list"),children:n.map((e=>(0,d.jsx)(tP,{pattern:e,onSelect:o,showTitles:r},e.name)))})})};function tP({pattern:e,onSelect:t,showTitles:n}){const o="block-editor-block-pattern-setup-list",{blocks:r,description:i,viewportWidth:s=700}=e,l=(0,m.useInstanceId)(tP,`${o}__item-description`);return(0,d.jsx)("div",{className:`${o}__list-item`,children:(0,d.jsxs)(ws.Composite.Item,{render:(0,d.jsx)("div",{"aria-describedby":i?l:void 0,"aria-label":e.title,className:`${o}__item`}),id:`${o}__pattern__${e.name}`,role:"option",onClick:()=>t(r),children:[(0,d.jsx)(kC,{blocks:r,viewportWidth:s}),n&&(0,d.jsx)("div",{className:`${o}__item-title`,children:e.title}),!!i&&(0,d.jsx)(ws.VisuallyHidden,{id:l,children:i})]})})}function nP({active:e,className:t,pattern:n,minHeight:o}){const{blocks:r,title:i,description:s}=n,l=(0,m.useInstanceId)(nP,"block-editor-block-pattern-setup-list__item-description");return(0,d.jsxs)("div",{"aria-hidden":!e,role:"img",className:`pattern-slide ${t}`,"aria-label":i,"aria-describedby":s?l:void 0,children:[(0,d.jsx)(kC,{blocks:r,minHeight:o}),!!s&&(0,d.jsx)(ws.VisuallyHidden,{id:l,children:s})]})}var oP=({clientId:e,blockName:t,filterPatternsFn:n,onBlockPatternSelect:o,initialViewMode:r=ZM,showTitles:i=!1})=>{const[s,l]=(0,h.useState)(r),[a,c]=(0,h.useState)(0),{replaceBlock:u}=(0,g.useDispatch)(ji),m=JM(e,t,n);if(!m?.length)return null;const f=o||(t=>{const n=t.map((e=>(0,p.cloneBlock)(e)));u(e,n)});return(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)("div",{className:`block-editor-block-pattern-setup view-mode-${s}`,children:[(0,d.jsx)(eP,{viewMode:s,activeSlide:a,patterns:m,onBlockPatternSelect:f,showTitles:i}),(0,d.jsx)(QM,{viewMode:s,setViewMode:l,activeSlide:a,totalSlides:m.length,handleNext:()=>{c((e=>Math.min(e+1,m.length-1)))},handlePrevious:()=>{c((e=>Math.max(e-1,0)))},onBlockPatternSelect:()=>{f(m[a].blocks)}})]})})};function rP({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,d.jsxs)("fieldset",{className:e,children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Transform to variation")}),o.map((e=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,size:"compact",icon:(0,d.jsx)(Vu,{icon:e.icon,showColors:!0}),isPressed:n===e.name,label:n===e.name?e.title:(0,T.sprintf)((0,T.__)("Transform to %s"),e.title),onClick:()=>t(e.name),"aria-label":e.title,showTooltip:!0},e.name)))]})}function iP({className:e,onSelectVariation:t,selectedValue:n,variations:o}){const r=o.map((({name:e,title:t,description:n})=>({value:e,label:t,info:n})));return(0,d.jsx)(ws.DropdownMenu,{className:e,label:(0,T.__)("Transform to variation"),text:(0,T.__)("Transform to variation"),popoverProps:{position:"bottom center",className:`${e}__popover`},icon:yI,toggleProps:{iconPosition:"right"},children:()=>(0,d.jsx)(ws.MenuGroup,{children:(0,d.jsx)(ws.MenuItemsChoice,{choices:r,value:n,onSelect:t})})})}function sP({className:e,onSelectVariation:t,selectedValue:n,variations:o}){return(0,d.jsx)("div",{className:e,children:(0,d.jsx)(ws.__experimentalToggleGroupControl,{label:(0,T.__)("Transform to variation"),value:n,hideLabelFromVision:!0,onChange:t,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:o.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOptionIcon,{icon:(0,d.jsx)(Vu,{icon:e.icon,showColors:!0}),value:e.name,label:n===e.name?e.title:(0,T.sprintf)((0,T.__)("Transform to %s"),e.title)},e.name)))})})}var lP=function({blockClientId:e}){const{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{activeBlockVariation:n,variations:o,isContentOnly:r,isSection:i}=(0,g.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockVariations:o}=t(p.store),{getBlockName:r,getBlockAttributes:i,getBlockEditingMode:s,isSectionBlock:l}=G(t(ji)),a=e&&r(e),{hasContentRoleAttribute:c}=G(t(p.store)),u=c(a);return{activeBlockVariation:n(a,i(e),"transform"),variations:a&&o(a,"transform"),isContentOnly:"contentOnly"===s(e)&&!u,isSection:l(e)}}),[e]),s=n?.name,l=(0,h.useMemo)((()=>{const e=new Set;return!!o&&(o.forEach((t=>{t.icon&&e.add(t.icon?.src||t.icon)})),e.size===o.length)}),[o]),a=window?.__experimentalContentOnlyPatternInsertion&&i;if(!o?.length||r||a)return null;const c=o.length>5,u=l?c?rP:sP:iP;return(0,d.jsx)(u,{className:"block-editor-block-variation-transforms",onSelectVariation:n=>{t(e,{...o.find((({name:e})=>e===n)).attributes})},selectedValue:s,variations:o})},aP=(0,m.createHigherOrderComponent)((e=>t=>{const[n,o,r,i,s]=Ti("color.palette.default","color.palette.theme","color.palette.custom","color.custom","color.defaultPalette"),l=s?[...o||[],...n||[],...r||[]]:[...o||[],...r||[]],{colors:a=l,disableCustomColors:c=!i}=t,u=a&&a.length>0||!c;return(0,d.jsx)(e,{...{...t,colors:a,disableCustomColors:c,hasColorsToChoose:u}})}),"withColorContext"),cP=aP(ws.ColorPalette);function uP({onChange:e,value:t,...n}){return(0,d.jsx)(qp,{...n,onColorChange:e,colorValue:t,gradients:[],disableCustomGradients:!0})}const dP=window.wp.date,pP=new Date;function hP({format:e,defaultFormat:t,onChange:n}){return(0,d.jsxs)(ws.__experimentalVStack,{as:"fieldset",spacing:4,className:"block-editor-date-format-picker",children:[(0,d.jsx)(ws.VisuallyHidden,{as:"legend",children:(0,T.__)("Date format")}),(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Default format"),help:`${(0,T.__)("Example:")} ${(0,dP.dateI18n)(t,pP)}`,checked:!e,onChange:e=>n(e?null:t)}),e&&(0,d.jsx)(gP,{format:e,onChange:n})]})}function gP({format:e,onChange:t}){const n=[...[...new Set(["Y-m-d",(0,T._x)("n/j/Y","short date format"),(0,T._x)("n/j/Y g:i A","short date format with time"),(0,T._x)("M j, Y","medium date format"),(0,T._x)("M j, Y g:i A","medium date format with time"),(0,T._x)("F j, Y","long date format"),(0,T._x)("M j","short date format without the year")])].map(((e,t)=>({key:`suggested-${t}`,name:(0,dP.dateI18n)(e,pP),format:e}))),{key:"human-diff",name:(0,dP.humanTimeDiff)(pP),format:"human-diff"}],o={key:"custom",name:(0,T.__)("Custom"),className:"block-editor-date-format-picker__custom-format-select-control__custom-option",hint:(0,T.__)("Enter your own date format")},[r,i]=(0,h.useState)((()=>!!e&&!n.some((t=>t.format===e))));return(0,d.jsxs)(ws.__experimentalVStack,{children:[(0,d.jsx)(ws.CustomSelectControl,{__next40pxDefaultSize:!0,label:(0,T.__)("Choose a format"),options:[...n,o],value:r?o:n.find((t=>t.format===e))??o,onChange:({selectedItem:e})=>{e===o?i(!0):(i(!1),t(e.format))}}),r&&(0,d.jsx)(ws.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Custom format"),hideLabelFromVision:!0,help:(0,h.createInterpolateElement)((0,T.__)("Enter a date or time <Link>format string</Link>."),{Link:(0,d.jsx)(ws.ExternalLink,{href:(0,T.__)("https://wordpress.org/documentation/article/customize-date-and-time-format/")})}),value:e,onChange:e=>t(e)})]})}pP.setDate(20),pP.setMonth(pP.getMonth()-3),4===pP.getMonth()&&pP.setMonth(3);const mP=({setting:e,children:t,panelId:n,...o})=>(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!e.colorValue||!!e.gradientValue,label:e.label,onDeselect:()=>{e.colorValue?e.onColorChange():e.gradientValue&&e.onGradientChange()},isShownByDefault:void 0===e.isShownByDefault||e.isShownByDefault,...o,className:"block-editor-tools-panel-color-gradient-settings__item",panelId:n,resetAllFilter:e.resetAllFilter,children:t}),fP=({colorValue:e,label:t})=>(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",children:[(0,d.jsx)(ws.ColorIndicator,{className:"block-editor-panel-color-gradient-settings__color-indicator",colorValue:e}),(0,d.jsx)(ws.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",title:t,children:t})]}),bP=e=>({onToggle:t,isOpen:n})=>{const{clearable:o,colorValue:r,gradientValue:i,onColorChange:s,onGradientChange:l,label:a}=e,c=(0,h.useRef)(void 0),u={onClick:t,className:ms("block-editor-panel-color-gradient-settings__dropdown",{"is-open":n}),"aria-expanded":n,ref:c},p=r??i;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,...u,children:(0,d.jsx)(fP,{colorValue:p,label:a})}),o&&p&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,label:(0,T.__)("Reset"),className:"block-editor-panel-color-gradient-settings__reset",size:"small",icon:Ha,onClick:()=>{r?s():i&&l(),n&&t(),c.current?.focus()}})]})};function kP({colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradients:r,settings:i,__experimentalIsRenderedInSidebar:s,...l}){let a;return s&&(a={placement:"left-start",offset:36,shift:!0}),(0,d.jsx)(d.Fragment,{children:i.map(((i,c)=>{const u={clearable:!1,colorValue:i.colorValue,colors:e,disableCustomColors:t,disableCustomGradients:n,enableAlpha:o,gradientValue:i.gradientValue,gradients:r,label:i.label,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange,showTitle:!1,__experimentalIsRenderedInSidebar:s,...i},p={clearable:i.clearable,label:i.label,colorValue:i.colorValue,gradientValue:i.gradientValue,onColorChange:i.onColorChange,onGradientChange:i.onGradientChange};return i&&(0,d.jsx)(mP,{setting:i,...l,children:(0,d.jsx)(ws.Dropdown,{popoverProps:a,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:bP(p),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,d.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,d.jsx)(qp,{...u})})})})},c)}))})}const vP=["colors","disableCustomColors","gradients","disableCustomGradients"],_P=({className:e,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,children:i,settings:s,title:l,showTitle:a=!0,__experimentalIsRenderedInSidebar:c,enableAlpha:u})=>{const p=(0,m.useInstanceId)(_P),{batch:h}=(0,g.useRegistry)();return t&&0!==t.length||n&&0!==n.length||!o||!r||!s?.every((e=>(!e.colors||0===e.colors.length)&&(!e.gradients||0===e.gradients.length)&&(void 0===e.disableCustomColors||e.disableCustomColors)&&(void 0===e.disableCustomGradients||e.disableCustomGradients)))?(0,d.jsxs)(ws.__experimentalToolsPanel,{className:ms("block-editor-panel-color-gradient-settings",e),label:a?l:void 0,resetAll:()=>{h((()=>{s.forEach((({colorValue:e,gradientValue:t,onColorChange:n,onGradientChange:o})=>{e?n():t&&o()}))}))},panelId:p,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,d.jsx)(kP,{settings:s,panelId:p,colors:t,gradients:n,disableCustomColors:o,disableCustomGradients:r,__experimentalIsRenderedInSidebar:c,enableAlpha:u}),!!i&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.__experimentalSpacer,{marginY:4})," ",i]})]}):null},yP=e=>{const t=Nd();return(0,d.jsx)(_P,{...{...t,...e}})};var xP=e=>vP.every((t=>e.hasOwnProperty(t)))?(0,d.jsx)(_P,{...e}):(0,d.jsx)(yP,{...e}),SP=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})});const wP=100,CP=300,BP={placement:"bottom-start"},IP={crop:(0,T.__)("Image cropped."),rotate:(0,T.__)("Image rotated."),cropAndRotate:(0,T.__)("Image cropped and rotated.")};const jP=(0,h.createContext)({});jP.displayName="ImageEditingContext";const EP=()=>(0,h.useContext)(jP);function TP({id:e,url:t,naturalWidth:n,naturalHeight:o,onFinishEditing:r,onSaveImage:i,children:s}){const l=function({url:e,naturalWidth:t,naturalHeight:n}){const[o,r]=(0,h.useState)(),[i,s]=(0,h.useState)(),[l,a]=(0,h.useState)({x:0,y:0}),[c,u]=(0,h.useState)(100),[d,p]=(0,h.useState)(0),g=t/n,[m,b]=(0,h.useState)(g),k=(0,h.useCallback)((()=>{const t=(d+90)%360;let n=g;if(d%180==90&&(n=1/g),0===t)return r(),p(t),b(g),void a((e=>({x:-e.y*n,y:e.x*n})));const o=new window.Image;o.src=e,o.onload=function(e){const o=document.createElement("canvas");let i=0,s=0;t%180?(o.width=e.target.height,o.height=e.target.width):(o.width=e.target.width,o.height=e.target.height),90!==t&&180!==t||(i=o.width),270!==t&&180!==t||(s=o.height);const l=o.getContext("2d");l.translate(i,s),l.rotate(t*Math.PI/180),l.drawImage(e.target,0,0),o.toBlob((e=>{r(URL.createObjectURL(e)),p(t),b(o.width/o.height),a((e=>({x:-e.y*n,y:e.x*n})))}))};const i=(0,f.applyFilters)("media.crossOrigin",void 0,e);"string"==typeof i&&(o.crossOrigin=i)}),[d,g,e]);return(0,h.useMemo)((()=>({editedUrl:o,setEditedUrl:r,crop:i,setCrop:s,position:l,setPosition:a,zoom:c,setZoom:u,rotation:d,setRotation:p,rotateClockwise:k,aspect:m,setAspect:b,defaultAspect:g})),[o,i,l,c,d,k,m,g])}({url:t,naturalWidth:n,naturalHeight:o}),a=function({crop:e,rotation:t,url:n,id:o,onSaveImage:r,onFinishEditing:i}){const{createErrorNotice:s,createSuccessNotice:l}=(0,g.useDispatch)(pr.store),[a,c]=(0,h.useState)(!1),{editMediaEntity:u}=(0,g.useSelect)((e=>{const t=e(ji).getSettings();return{editMediaEntity:t?.[V]}}),[]),d=(0,h.useCallback)((()=>{c(!1),i()}),[i]),p=(0,h.useCallback)((async()=>{if(!u)return i(),void s((0,T.__)("Sorry, you are not allowed to edit images on this site."),{id:"image-editing-error",type:"snackbar"});c(!0);const a=[];if(t>0&&a.push({type:"rotate",args:{angle:t}}),(e.width<99.9||e.height<99.9)&&a.push({type:"crop",args:{left:e.x,top:e.y,width:e.width,height:e.height}}),0===a.length)return c(!1),void i();const d=1===a.length?a[0].type:"cropAndRotate";try{const e=await u(o,{src:n,modifiers:a},{throwOnError:!0});e&&(r({id:e.id,url:e.source_url}),l(IP[d],{type:"snackbar",actions:[{label:(0,T.__)("Undo"),onClick:()=>{r({id:o,url:n})}}]}))}catch(e){s((0,T.sprintf)((0,T.__)("Could not edit image. %s"),(0,Ga.__unstableStripHTML)(e.message)),{id:"image-editing-error",type:"snackbar"})}finally{c(!1),i()}}),[e,t,o,n,r,s,l,i,u]);return(0,h.useMemo)((()=>({isInProgress:a,apply:p,cancel:d})),[a,p,d])}({id:e,url:t,onSaveImage:i,onFinishEditing:r,...l}),c=(0,h.useMemo)((()=>({...l,...a})),[l,a]);return(0,d.jsx)(jP.Provider,{value:c,children:s})}function MP({aspectRatios:e,isDisabled:t,label:n,onClick:o,value:r}){return(0,d.jsx)(ws.MenuGroup,{label:n,children:e.map((({name:e,slug:n,ratio:i})=>(0,d.jsx)(ws.MenuItem,{disabled:t,onClick:()=>{o(i)},role:"menuitemradio",isSelected:i===r,icon:i===r?ip:void 0,children:e},n)))})}function PP(e){const[t,n,...o]=e.split("/").map(Number);return t<=0||n<=0||Number.isNaN(t)||Number.isNaN(n)||o.length?NaN:n?t/n:t}function RP({ratio:e,...t}){return{ratio:PP(e),...t}}function AP({toggleProps:e}){const{isInProgress:t,aspect:n,setAspect:o,defaultAspect:r}=EP(),[i,s,l]=Ti("dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios");return(0,d.jsx)(ws.DropdownMenu,{icon:SP,label:(0,T.__)("Aspect Ratio"),popoverProps:BP,toggleProps:e,children:({onClose:e})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(MP,{isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:[{slug:"original",name:(0,T.__)("Original"),ratio:r},...l?i.map(RP).filter((({ratio:e})=>1===e)):[]]}),s?.length>0&&(0,d.jsx)(MP,{label:(0,T.__)("Theme"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:s}),l&&(0,d.jsx)(MP,{label:(0,T.__)("Landscape"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(RP).filter((({ratio:e})=>e>1))}),l&&(0,d.jsx)(MP,{label:(0,T.__)("Portrait"),isDisabled:t,onClick:t=>{o(t),e()},value:n,aspectRatios:i.map(RP).filter((({ratio:e})=>e<1))})]})})}var NP=function(e,t){return NP=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])},NP(e,t)};function LP(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}NP(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var DP=function(){return DP=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},DP.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var OP=n(7520),zP=n.n(OP);function VP(e,t,n,o,r){void 0===r&&(r=0);var i=KP(t.width,t.height,r),s=i.width,l=i.height;return{x:FP(e.x,s,n.width,o),y:FP(e.y,l,n.height,o)}}function FP(e,t,n,o){var r=t*o/2-n/2;return ZP(e,-r,r)}function HP(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function UP(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function GP(e,t){return Math.min(e,Math.max(0,t))}function $P(e,t){return t}function WP(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function KP(e,t,n){var o=n*Math.PI/180;return{width:Math.abs(Math.cos(o)*e)+Math.abs(Math.sin(o)*t),height:Math.abs(Math.sin(o)*e)+Math.abs(Math.cos(o)*t)}}function ZP(e,t,n){return Math.min(Math.max(e,t),n)}function qP(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var YP=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=ic.createRef(),n.videoRef=ic.createRef(),n.containerPosition={x:0,y:0},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,mediaObjectFit:void 0},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.currentDoc.removeEventListener("scroll",n.onScroll))},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,i){var s=KP(t.width,t.height,n),l=ZP(o.width/s.width*(100/e.width),r,i);return{crop:{x:l*s.width/2-o.width/2-s.width*l*(e.x/100),y:l*s.height/2-o.height/2-s.height*l*(e.y/100)},zoom:l}}(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 i=function(e,t,n,o,r,i){void 0===n&&(n=0);var s=KP(t.naturalWidth,t.naturalHeight,n),l=ZP(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,i),a=o.height>o.width?o.height/e.height:o.width/e.width;return{crop:{x:((s.width-e.width)/2-e.x)*a,y:((s.height-e.height)/2-e.y)*a},zoom:l}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);o=i.crop,r=i.zoom;n.props.onCropChange(o),n.props.onZoomChange&&n.props.onZoomChange(r)}},n.computeSizes=function(){var e,t,o,r,i,s,l=n.imageRef.current||n.videoRef.current;if(l&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var a=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(l.offsetWidth<c||l.offsetHeight<u)switch(n.state.mediaObjectFit){default:case"contain":p=a>d?{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}}else p={width:l.offsetWidth,height:l.offsetHeight};n.mediaSize=DP(DP({},p),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:function(e,t,n,o,r,i){void 0===i&&(i=0);var s=KP(e,t,i),l=s.width,a=s.height,c=Math.min(l,n),u=Math.min(a,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===(i=n.state.cropSize)||void 0===i?void 0:i.height)===h.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},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),n.saveContainerPosition(),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 i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,r=e.x,i=e.y;n.dragStartPosition={x:r,y:i},n.dragStartCrop=DP({},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,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+r},s=n.props.restrictPosition?VP(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(s)}})))},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=zP()(e).pixelY,i=n.props.zoom-r*n.props.zoomSpeed/200;n.setNewZoom(i,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,t){var o=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(o-t.x),y:n.containerRect.height/2-(r-t.y)}},n.getPointOnMedia=function(e){var t=e.x,o=e.y,r=n.props,i=r.crop,s=r.zoom;return{x:(t+i.x)/s,y:(o+i.y)/s}},n.setNewZoom=function(e,t,o){var r=(void 0===o?{}:o).shouldUpdatePosition,i=void 0===r||r;if(n.state.cropSize&&n.props.onZoomChange){var s=ZP(e,n.props.minZoom,n.props.maxZoom);if(i){var l=n.getPointOnContainer(t,n.containerPosition),a=n.getPointOnMedia(l),c={x:a.x*s-l.x,y:a.y*s-l.y},u=n.props.restrictPosition?VP(c,n.mediaSize,n.state.cropSize,s,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(s)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,o,r,i,s){void 0===i&&(i=0),void 0===s&&(s=!0);var l=s?GP:$P,a=KP(t.width,t.height,i),c=KP(t.naturalWidth,t.naturalHeight,i),u={x:l(100,((a.width-n.width/r)/2-e.x/r)/a.width*100),y:l(100,((a.height-n.height/r)/2-e.y/r)/a.height*100),width:l(100,n.width/a.width*100/r),height:l(100,n.height/a.height*100/r)},d=Math.round(l(c.width,u.width*c.width/100)),p=Math.round(l(c.height,u.height*c.height/100)),h=c.width>=c.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:u,croppedAreaPixels:DP(DP({},h),{x:Math.round(l(c.width-h.width,u.x*c.width/100)),y:Math.round(l(c.height-h.height,u.y*c.height/100))})}}(n.props.restrictPosition?VP(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?VP(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 LP(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.currentDoc.addEventListener("scroll",this.onScroll),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,i,s,l,a,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?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===(i=e.crop)||void 0===i?void 0:i.x)===(null===(s=this.props.crop)||void 0===s?void 0:s.x)&&(null===(l=e.crop)||void 0===l?void 0:l.y)===(null===(a=this.props.crop)||void 0===a?void 0:a.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());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,o;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var r=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(o=this.videoRef.current)||void 0===o?void 0:o.videoHeight)||0)<r?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=HP(n,o),this.lastPinchRotation=UP(n,o),this.onDragStart(WP(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]),i=WP(o,r);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=HP(o,r),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var s=UP(o,r),l=n.props.rotation+(s-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(l),n.lastPinchRotation=s}))}},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,r=t.mediaProps,i=t.transform,s=t.crop,l=s.x,a=s.y,c=t.rotation,u=t.zoom,d=t.cropShape,p=t.showGrid,h=t.style,g=h.containerStyle,m=h.cropAreaStyle,f=h.mediaStyle,b=t.classes,k=b.containerClassName,v=b.cropAreaClassName,_=b.mediaClassName,y=this.state.mediaObjectFit;return ic.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:qP("reactEasyCrop_Container",k)},n?ic.createElement("img",DP({alt:"",className:qP("reactEasyCrop_Image","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",_)},r,{src:n,ref:this.imageRef,style:DP(DP({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),onLoad:this.onMediaLoad})):o&&ic.createElement("video",DP({autoPlay:!0,loop:!0,muted:!0,className:qP("reactEasyCrop_Video","contain"===y&&"reactEasyCrop_Contain","horizontal-cover"===y&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===y&&"reactEasyCrop_Cover_Vertical",_)},r,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:DP(DP({},f),{transform:i||"translate(".concat(l,"px, ").concat(a,"px) rotate(").concat(c,"deg) scale(").concat(u,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return ic.createElement("source",DP({key:e.src},e))}))),this.state.cropSize&&ic.createElement("div",{style:DP(DP({},m),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:qP("reactEasyCrop_CropArea","round"===d&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",v)}))},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}(ic.Component);function XP({url:e,width:t,height:n,naturalHeight:o,naturalWidth:r,borderProps:i}){const{isInProgress:s,editedUrl:l,position:a,zoom:c,aspect:u,setPosition:p,setCrop:h,setZoom:g,rotation:f}=EP(),[b,{width:k}]=(0,m.useResizeObserver)();let v=n||k*o/r;f%180==90&&(v=k*r/o);const _=(0,d.jsxs)("div",{className:ms("wp-block-image__crop-area",i?.className,{"is-applying":s}),style:{...i?.style,width:t||k,height:v},children:[(0,d.jsx)(YP,{image:l||e,disabled:s,minZoom:wP/100,maxZoom:CP/100,crop:a,zoom:c/100,aspect:u,onCropChange:e=>{p(e)},onCropComplete:e=>{h(e)},onZoomChange:e=>{g(100*e)}}),s&&(0,d.jsx)(ws.Spinner,{})]});return(0,d.jsxs)(d.Fragment,{children:[b,_]})}var QP=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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 JP(){const{isInProgress:e,zoom:t,setZoom:n}=EP();return(0,d.jsx)(ws.Dropdown,{contentClassName:"wp-block-image__zoom",popoverProps:BP,renderToggle:({isOpen:t,onToggle:n})=>(0,d.jsx)(ws.ToolbarButton,{icon:QP,label:(0,T.__)("Zoom"),onClick:n,"aria-expanded":t,disabled:e}),renderContent:()=>(0,d.jsx)(ws.__experimentalDropdownContentWrapper,{paddingSize:"medium",children:(0,d.jsx)(ws.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Zoom"),min:wP,max:CP,value:Math.round(t),onChange:n})})})}var eR=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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 tR(){const{isInProgress:e,rotateClockwise:t}=EP();return(0,d.jsx)(ws.ToolbarButton,{icon:eR,label:(0,T.__)("Rotate"),onClick:t,disabled:e})}function nR(){const{isInProgress:e,apply:t,cancel:n}=EP();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarButton,{onClick:t,disabled:e,children:(0,T.__)("Apply")}),(0,d.jsx)(ws.ToolbarButton,{onClick:n,children:(0,T.__)("Cancel")})]})}function oR({id:e,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i,onSaveImage:s,onFinishEditing:l,borderProps:a}){return(0,d.jsxs)(TP,{id:e,url:t,naturalWidth:i,naturalHeight:r,onSaveImage:s,onFinishEditing:l,children:[(0,d.jsx)(XP,{borderProps:a,url:t,width:n,height:o,naturalHeight:r,naturalWidth:i}),(0,d.jsxs)(Rs,{children:[(0,d.jsxs)(ws.ToolbarGroup,{children:[(0,d.jsx)(JP,{}),(0,d.jsx)(ws.ToolbarItem,{children:e=>(0,d.jsx)(AP,{toggleProps:e})}),(0,d.jsx)(tR,{})]}),(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(nR,{})})]})]})}const rR=[25,50,75,100],iR=()=>{};function sR(e,t,n){return{scaledWidth:Math.round(t*(e/100)),scaledHeight:Math.round(n*(e/100))}}function lR({imageSizeHelp:e,imageWidth:t,imageHeight:n,imageSizeOptions:o=[],isResizable:r=!0,slug:i,width:s,height:l,onChange:a,onChangeImage:c=iR}){const{currentHeight:u,currentWidth:p,updateDimension:g,updateDimensions:m}=function(e,t,n,o,r){const[i,s]=(0,h.useState)(t??o??""),[l,a]=(0,h.useState)(e??n??"");return(0,h.useEffect)((()=>{void 0===t&&void 0!==o&&s(o),void 0===e&&void 0!==n&&a(n)}),[o,n]),(0,h.useEffect)((()=>{void 0!==t&&Number.parseInt(t)!==Number.parseInt(i)&&s(t),void 0!==e&&Number.parseInt(e)!==Number.parseInt(l)&&a(e)}),[t,e]),{currentHeight:l,currentWidth:i,updateDimension:(e,t)=>{const n=""===t?void 0:parseInt(t,10);"width"===e?s(n):a(n),r({[e]:n})},updateDimensions:(e,t)=>{a(e??n),s(t??o),r({height:e,width:t})}}}(l,s,n,t,a),f=rR.find((e=>{const{scaledWidth:o,scaledHeight:r}=sR(e,t,n);return p===o&&u===r}));return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-image-size-control",spacing:"4",children:[o&&o.length>0&&(0,d.jsx)(ws.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Resolution"),value:i,options:o,onChange:c,help:e,size:"__unstable-large"}),r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(ws.__experimentalHStack,{align:"baseline",spacing:"4",children:[(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Width"),value:p,min:1,onChange:e=>g("width",e),size:"__unstable-large"}),(0,d.jsx)(ws.__experimentalNumberControl,{label:(0,T.__)("Height"),value:u,min:1,onChange:e=>g("height",e),size:"__unstable-large"})]}),(0,d.jsx)(ws.__experimentalToggleGroupControl,{label:(0,T.__)("Image size presets"),hideLabelFromVision:!0,onChange:e=>{if(void 0===e)return void m();const{scaledWidth:o,scaledHeight:r}=sR(e,t,n);m(r,o)},value:f,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:rR.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{value:e,label:(0,T.sprintf)((0,T.__)("%d%%"),e)},e)))})]})]})}function aR({url:e,urlLabel:t,className:n}){const o=ms(n,"block-editor-url-popover__link-viewer-url");return e?(0,d.jsx)(ws.ExternalLink,{className:o,href:e,children:t||(0,Ua.filterURLForDisplay)((0,Ua.safeDecodeURI)(e))}):(0,d.jsx)("span",{className:o})}const{__experimentalPopoverLegacyPositionToPlacement:cR}=G(ws.privateApis),uR=(0,h.forwardRef)((({additionalControls:e,children:t,renderSettings:n,placement:o,focusOnMount:r="firstElement",position:i,...s},l)=>{let a;void 0!==i&&I()("`position` prop in wp.blockEditor.URLPopover",{since:"6.2",alternative:"`placement` prop"}),void 0!==o?a=o:void 0!==i&&(a=cR(i)),a=a||"bottom";const[c,u]=(0,h.useState)(!1),p=!!n&&c;return(0,d.jsxs)(ws.Popover,{ref:l,role:"dialog","aria-modal":"true","aria-label":(0,T.__)("Edit URL"),className:"block-editor-url-popover",focusOnMount:r,placement:a,shift:!0,variant:"toolbar",...s,children:[(0,d.jsx)("div",{className:"block-editor-url-popover__input-container",children:(0,d.jsxs)("div",{className:"block-editor-url-popover__row",children:[t,!!n&&(0,d.jsx)(ws.Button,{className:"block-editor-url-popover__settings-toggle",icon:yI,label:(0,T.__)("Link settings"),onClick:()=>{u(!c)},"aria-expanded":c,size:"compact"})]})}),p&&(0,d.jsx)("div",{className:"block-editor-url-popover__settings",children:n()}),e&&!p&&(0,d.jsx)("div",{className:"block-editor-url-popover__additional-controls",children:e})]})}));uR.LinkEditor=function({autocompleteRef:e,className:t,onChangeInputValue:n,value:o,...r}){return(0,d.jsxs)("form",{className:ms("block-editor-url-popover__link-editor",t),...r,children:[(0,d.jsx)(ac,{value:o,onChange:n,autocompleteRef:e}),(0,d.jsx)(ws.Button,{icon:tc,label:(0,T.__)("Apply"),type:"submit",size:"compact"})]})},uR.LinkViewer=function({className:e,linkClassName:t,onEditLinkClick:n,url:o,urlLabel:r,...i}){return(0,d.jsxs)("div",{className:ms("block-editor-url-popover__link-viewer",e),...i,children:[(0,d.jsx)(aR,{url:o,urlLabel:r,className:t}),n&&(0,d.jsx)(ws.Button,{icon:Wc,label:(0,T.__)("Edit"),onClick:n,size:"compact"})]})};var dR=uR;const pR=()=>{},hR=({src:e,onChange:t,onSubmit:n,onClose:o,popoverAnchor:r})=>(0,d.jsx)(dR,{anchor:r,onClose:o,children:(0,d.jsx)("form",{className:"block-editor-media-placeholder__url-input-form",onSubmit:n,children:(0,d.jsx)(ws.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,T.__)("URL"),type:"text",hideLabelFromVision:!0,placeholder:(0,T.__)("Paste or type URL"),onChange:t,value:e,suffix:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{size:"small",icon:tc,label:(0,T.__)("Apply"),type:"submit"})})})})}),gR=({src:e,onChangeSrc:t,onSelectURL:n})=>{const[o,r]=(0,h.useState)(null),[i,s]=(0,h.useState)(!1),l=()=>{s(!1),o?.focus()};return(0,d.jsxs)("div",{className:"block-editor-media-placeholder__url-input-container",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:()=>{s(!0)},isPressed:i,variant:"secondary","aria-haspopup":"dialog",ref:r,children:(0,T.__)("Insert from URL")}),i&&(0,d.jsx)(hR,{src:e,onChange:t,onSubmit:t=>{t.preventDefault(),e&&n&&(n(e),l())},onClose:l,popoverAnchor:o})]})};var mR=(0,ws.withFilters)("editor.MediaPlaceholder")((function({value:e={},allowedTypes:t,className:n,icon:o,labels:r={},mediaPreview:i,notices:s,isAppender:l,accept:a,addToGallery:c,multiple:u=!1,handleUpload:p=!0,disableDropZone:m,disableMediaButtons:f,onError:b,onSelect:k,onCancel:v,onSelectURL:_,onToggleFeaturedImage:y,onDoubleClick:x,onFilesPreUpload:S=pR,onHTMLDrop:w,children:C,mediaLibraryButton:B,placeholder:j,style:E}){w&&I()("wp.blockEditor.MediaPlaceholder onHTMLDrop prop",{since:"6.2",version:"6.4"});const M=(0,g.useSelect)((e=>{const{getSettings:t}=e(ji);return t().mediaUpload}),[]),[P,R]=(0,h.useState)("");(0,h.useEffect)((()=>{R(e?.src??"")}),[e?.src]);const A=n=>{if(!p||"function"==typeof p&&!p(n))return k(n);let o;if(S(n),u)if(c){let t=[];o=n=>{const o=(e??[]).filter((e=>e.id?!t.some((({id:t})=>Number(t)===Number(e.id))):!t.some((({urlSlug:t})=>e.url.includes(t)))));k(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=k;else o=([e])=>k(e);M({allowedTypes:t,filesList:n,onFileChange:o,onError:b,multiple:u})};async function N(e){const{blocks:n}=DS(e);if(!n?.length)return;const o=await Promise.all(n.map((e=>{const n=e.name.split("/")[1];return e.attributes.id?(e.attributes.type=n,e.attributes):new Promise(((o,r)=>{window.fetch(e.attributes.url).then((e=>e.blob())).then((i=>M({filesList:[i],additionalData:{title:e.attributes.title,alt_text:e.attributes.alt,caption:e.attributes.caption,type:n},onFileChange:([e])=>{e.id&&o(e)},allowedTypes:t,onError:r}))).catch((()=>o(e.attributes.url)))}))}))).catch((e=>b(e)));o?.length&&k(u?o:o[0])}const L=e=>{A(e.target.files)},D=j??(e=>{let{instructions:a,title:c}=r;if(M||_||(a=(0,T.__)("To edit this block, you need permission to upload media.")),void 0===a||void 0===c){const e=t??[],[n]=e,o=1===e.length,r=o&&"audio"===n,i=o&&"image"===n,s=o&&"video"===n;void 0===a&&M&&(a=(0,T.__)("Drag and drop an image or video, upload, or choose from your library."),r?a=(0,T.__)("Drag and drop an audio file, upload, or choose from your library."):i?a=(0,T.__)("Drag and drop an image, upload, or choose from your library."):s&&(a=(0,T.__)("Drag and drop a video, upload, or choose from your library."))),void 0===c&&(c=(0,T.__)("Media"),r?c=(0,T.__)("Audio"):i?c=(0,T.__)("Image"):s&&(c=(0,T.__)("Video")))}const u=ms("block-editor-media-placeholder",n,{"is-appender":l});return(0,d.jsxs)(ws.Placeholder,{icon:o,label:c,instructions:a,className:u,notices:s,onDoubleClick:x,preview:i,style:E,children:[e,C]})}),O=()=>m?null:(0,d.jsx)(ws.DropZone,{onFilesDrop:A,onDrop:N,isEligible:e=>{const n="wp-block:core/",o=[];for(const t of e.types)t.startsWith(n)&&o.push(t.slice(14));return o.every((e=>t.includes(e)))&&(!!u||1===o.length)}}),z=()=>v&&(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__cancel-button",title:(0,T.__)("Cancel"),variant:"link",onClick:v,children:(0,T.__)("Cancel")}),V=()=>_&&(0,d.jsx)(gR,{src:P,onChangeSrc:R,onSelectURL:_}),F=()=>y&&(0,d.jsx)("div",{className:"block-editor-media-placeholder__url-input-container",children:(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-media-placeholder__button",onClick:y,variant:"secondary",children:(0,T.__)("Use featured image")})});return f?(0,d.jsx)(Xa,{children:O()}):(0,d.jsx)(Xa,{fallback:D(V()),children:(()=>{const n=B??(({open:e})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{e()},children:(0,T.__)("Media Library")})),o=(0,d.jsx)(Ya,{addToGallery:c,gallery:u&&!(!t||0===t.length)&&t.every((e=>"image"===e||e.startsWith("image/"))),multiple:u,onSelect:k,allowedTypes:t,mode:"browse",value:Array.isArray(e)?e.map((({id:e})=>e)):e.id,render:n});if(M&&l)return(0,d.jsxs)(d.Fragment,{children:[O(),(0,d.jsx)(ws.FormFileUpload,{onChange:L,accept:a,multiple:!!u,render:({openFileDialog:e})=>{const t=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"primary",className:ms("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),onClick:e,children:(0,T._x)("Upload","verb")}),o,V(),F(),z()]});return D(t)}})]});if(M){const e=(0,d.jsxs)(d.Fragment,{children:[O(),(0,d.jsx)(ws.FormFileUpload,{render:({openFileDialog:e})=>(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"primary",className:ms("block-editor-media-placeholder__button","block-editor-media-placeholder__upload-button"),children:(0,T._x)("Upload","verb")}),onChange:L,accept:a,multiple:!!u}),o,V(),F(),z()]});return D(e)}return D(o)})()})}));var fR=({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,d.jsx)(xP,{settings:n,gradients:[],disableCustomGradients:!0,...t})};const bR={placement:"bottom-start"};var kR=()=>(0,d.jsxs)(d.Fragment,{children:[["bold","italic","link","unknown"].map((e=>(0,d.jsx)(ws.Slot,{name:`RichText.ToolbarControls.${e}`},e))),(0,d.jsx)(ws.Slot,{name:"RichText.ToolbarControls",children:e=>{if(!e.length)return null;const t=e.map((([{props:e}])=>e)).some((({isActive:e})=>e));return(0,d.jsx)(ws.ToolbarItem,{children:n=>(0,d.jsx)(ws.DropdownMenu,{icon:yI,label:(0,T.__)("More"),toggleProps:{...n,className:ms(n.className,{"is-pressed":t}),description:(0,T.__)("Displays more block tools")},controls:xt(e.map((([{props:e}])=>e)),"title"),popoverProps:bR})})}})]});function vR({popoverAnchor:e}){return(0,d.jsx)(ws.Popover,{placement:"top",focusOnMount:!1,anchor:e,className:"block-editor-rich-text__inline-format-toolbar",__unstableSlotName:"block-toolbar",children:(0,d.jsx)(ET,{className:"block-editor-rich-text__inline-format-toolbar-group","aria-label":(0,T.__)("Format tools"),children:(0,d.jsx)(ws.ToolbarGroup,{children:(0,d.jsx)(kR,{})})})})}var _R=({inline:e,editableContentElement:t})=>e?(0,d.jsx)(vR,{popoverAnchor:t}):(0,d.jsx)(Rs,{group:"inline",children:(0,d.jsx)(kR,{})});function yR(e){return e(pe.store).getFormatTypes()}const xR=new Set(["a","audio","button","details","embed","iframe","input","label","select","textarea","video"]);function SR(e,t){return"object"!=typeof e?{[t]:e}:Object.fromEntries(Object.entries(e).map((([e,n])=>[`${t}.${e}`,n])))}function wR(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)),{})}const CR=["`",'"',"'","“”","‘’"];function BR(e){let t=e.length;for(;t--;){const n=mr(e[t].attributes);if(n)return e[t].attributes[n]=e[t].attributes[n].toString().replace(gr,""),[e[t].clientId,n,0,0];const o=BR(e[t].innerBlocks);if(o)return o}return[]}function IR(e){if(!0===e||"p"===e||"li"===e)return!0===e?"p":e}function jR({allowedFormats:e,disableFormats:t}){return t?jR.EMPTY_ARRAY:e}jR.EMPTY_ARRAY=[];const ER=[e=>t=>{function n(n){const{inputType:o,data:r}=n,{value:i,onChange:s,registry:l}=e.current;if("insertText"!==o)return;if((0,pe.isCollapsed)(i))return;const a=(0,f.applyFilters)("blockEditor.wrapSelectionSettings",CR).find((([e,t])=>e===r||t===r));if(!a)return;const[c,u=c]=a,d=i.start,p=i.end+c.length;let h=(0,pe.insert)(i,c,d,d);h=(0,pe.insert)(h,u,p,p);const{__unstableMarkLastChangeAsPersistent:g,__unstableMarkAutomaticChange:m}=l.dispatch(ji);g(),s(h),m();const b={};for(const e in n)b[e]=n[e];b.data=u;const{ownerDocument:k}=t,{defaultView:v}=k,_=new v.InputEvent("input",b);window.queueMicrotask((()=>{n.target.dispatchEvent(_)})),n.preventDefault()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},e=>t=>{function n(){const{getValue:t,onReplace:n,selectionChange:o,registry:r}=e.current;if(!n)return;const i=t(),{start:s,text:l}=i;if(" "!==l.slice(s-1,s))return;const a=l.slice(0,s).trim(),c=(0,p.getBlockTransforms)("from").filter((({type:e})=>"prefix"===e)),u=(0,p.findTransform)(c,(({prefix:e})=>a===e));if(!u)return;const d=(0,pe.toHTMLString)({value:(0,pe.insert)(i,gr,0,s)}),h=u.transform(d);return o(...BR([h])),n([h]),r.dispatch(ji).__unstableMarkAutomaticChange(),!0}function o(t){const{inputType:o,type:r}=t,{getValue:i,onChange:s,__unstableAllowPrefixTransformations:l,formatTypes:a,registry:c}=e.current;if("insertText"!==o&&"compositionend"!==r)return;if(l&&n())return;const u=i(),d=a.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,pe.insert)(e," 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️")}(u)),{__unstableMarkLastChangeAsPersistent:p,__unstableMarkAutomaticChange:h}=c.dispatch(ji);d!==u&&(p(),s({...d,activeFormats:u.activeFormats}),h())}return t.addEventListener("input",o),t.addEventListener("compositionend",o),()=>{t.removeEventListener("input",o),t.removeEventListener("compositionend",o)}},e=>t=>{function n(t){if("insertReplacementText"!==t.inputType)return;const{registry:n}=e.current;n.dispatch(ji).__unstableMarkLastChangeAsPersistent()}return t.addEventListener("beforeinput",n),()=>{t.removeEventListener("beforeinput",n)}},()=>e=>{function t(e){(Wa.isKeyboardEvent.primary(e,"z")||Wa.isKeyboardEvent.primary(e,"y")||Wa.isKeyboardEvent.primaryShift(e,"z"))&&e.preventDefault()}return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}},e=>t=>{const{keyboardShortcuts:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}},e=>t=>{const{inputEvents:n}=e.current;function o(e){for(const t of n.current)t(e)}return t.addEventListener("input",o),()=>{t.removeEventListener("input",o)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;if(n!==Wa.BACKSPACE&&n!==Wa.ESCAPE)return;const{registry:o}=e.current,{didAutomaticChange:r,getSettings:i}=o.select(ji),{__experimentalUndo:s}=i();s&&r()&&(t.preventDefault(),s())}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(n){const{disableFormats:o,onChange:r,value:i,formatTypes:s,tagName:l,onReplace:a,__unstableEmbedURLOnPaste:c,preserveWhiteSpace:u,pastePlainText:d}=e.current;if(!t.contains(n.target))return;if(n.defaultPrevented)return;const{plainText:h,html:g}=Ew(n);if(n.preventDefault(),window.console.log("Received HTML:\n\n",g),window.console.log("Received plain text:\n\n",h),o)return void r((0,pe.insert)(i,h));function m(e){const t=s.reduce(((e,{__unstablePasteRule:t})=>(t&&e===i&&(e=t(i,{html:g,plainText:h})),e)),i);if(t!==i)r(t);else{const t=(0,pe.create)({html:e});!function(e,t){if(t?.length){let n=e.formats.length;for(;n--;)e.formats[n]=[...t,...e.formats[n]||[]]}}(t,i.activeFormats),r((0,pe.insert)(i,t))}}if("true"===n.clipboardData.getData("rich-text"))return void m(g);if(d)return void r((0,pe.insert)(i,(0,pe.create)({text:h})));let f="INLINE";const b=h.trim();c&&(0,pe.isEmpty)(i)&&(0,Ua.isURL)(b)&&/^https?:/.test(b)&&(f="BLOCKS");const k=(0,p.pasteHandler)({HTML:g,plainText:h,mode:f,tagName:l,preserveWhiteSpace:u});"string"==typeof k?m(k):k.length>0&&a&&(0,pe.isEmpty)(i)&&a(k,k.length-1,-1)}const{defaultView:o}=t.ownerDocument;return o.addEventListener("paste",n),()=>{o.removeEventListener("paste",n)}},e=>t=>{function n(t){const{keyCode:n}=t;if(t.defaultPrevented)return;const{value:o,onMerge:r,onRemove:i}=e.current;if(n===Wa.DELETE||n===Wa.BACKSPACE){const{start:e,end:s,text:l}=o,a=n===Wa.BACKSPACE,c=o.activeFormats&&!!o.activeFormats.length;if(!(0,pe.isCollapsed)(o)||c||a&&0!==e||!a&&s!==l.length)return;r?r(!a):i&&(0,pe.isEmpty)(o)&&a&&i(!a),t.preventDefault()}}return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}},e=>t=>{function n(t){if(t.keyCode!==Wa.ENTER)return;const{onReplace:n,onSplit:o}=e.current;n&&o&&(t.__deprecatedOnSplit=!0)}function o(n){if(n.defaultPrevented)return;if(n.target!==t)return;if(n.keyCode!==Wa.ENTER)return;const{value:o,onChange:r,disableLineBreaks:i,onSplitAtEnd:s,onSplitAtDoubleLineEnd:l,registry:a}=e.current;n.preventDefault();const{text:c,start:u,end:d}=o;n.shiftKey?i||r((0,pe.insert)(o,"\n")):s&&u===d&&d===c.length?s():l&&u===d&&d===c.length&&"\n\n"===c.slice(-2)?a.batch((()=>{const e={...o};e.start=e.end-2,r((0,pe.remove)(e)),l()})):i||r((0,pe.insert)(o,"\n"))}const{defaultView:r}=t.ownerDocument;return r.addEventListener("keydown",o),t.addEventListener("keydown",n),()=>{r.removeEventListener("keydown",o),t.removeEventListener("keydown",n)}},e=>t=>{function n(){const{registry:n}=e.current;if(!n.select(ji).isMultiSelecting())return;const o=t.parentElement.closest('[contenteditable="true"]');o&&o.focus()}return t.addEventListener("focus",n),()=>{t.removeEventListener("focus",n)}}];function TR(e){const t=(0,h.useRef)(e);(0,h.useInsertionEffect)((()=>{t.current=e}));const n=(0,h.useMemo)((()=>ER.map((e=>e(t)))),[t]);return(0,m.useRefEffect)((t=>{if(!e.isSelected)return;const o=n.map((e=>e(t)));return()=>{o.forEach((e=>e()))}}),[n,e.isSelected])}const MR={},PR=Symbol("usesContext");function RR({onChange:e,onFocus:t,value:n,forwardedRef:o,settings:r}){const{name:i,edit:s,[PR]:l}=r,a=(0,h.useContext)(sv),c=(0,h.useMemo)((()=>l?Object.fromEntries(Object.entries(a).filter((([e])=>l.includes(e)))):MR),[l,a]);if(!s)return null;const u=(0,pe.getActiveFormat)(n,i),p=void 0!==u,g=(0,pe.getActiveObject)(n),m=void 0!==g&&g.type===i;return(0,d.jsx)(s,{isActive:p,activeAttributes:p&&u.attributes||{},isObjectActive:m,activeObjectAttributes:m&&g.attributes||{},value:n,onChange:e,onFocus:t,contentRef:o,context:c},i)}function AR({formatTypes:e,...t}){return e.map((e=>(0,ic.createElement)(RR,{settings:e,...t,key:e.name})))}function NR(e,t){if(WR.isEmpty(e)){const e=IR(t);return e?`<${e}></${e}>`:""}return Array.isArray(e)?(I()("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/"}),p.children.toHTML(e)):"string"==typeof e?e:e.toHTMLString()}function LR({value:e,tagName:t,multiline:n,format:o,...r}){return e=(0,d.jsx)(h.RawHTML,{children:NR(e,n)}),t?(0,d.jsx)(t,{...r,children:e}):e}var DR=(0,h.forwardRef)((function({children:e,identifier:t,tagName:n="div",value:o="",onChange:r,multiline:i,...s},l){I()("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:a}=C(),{getSelectionStart:c,getSelectionEnd:u}=(0,g.useSelect)(ji),{selectionChange:p}=(0,g.useDispatch)(ji),h=IR(i),m=`</${h}>${o=o||`<${h}></${h}>`}<${h}>`.split(`</${h}><${h}>`);function f(e){r(`<${h}>${e.join(`</${h}><${h}>`)}</${h}>`)}return m.shift(),m.pop(),(0,d.jsx)(n,{ref:l,children:m.map(((e,n)=>(0,d.jsx)(HR,{identifier:`${t}-${n}`,tagName:h,value:e,onChange:e=>{const t=m.slice();t[n]=e,f(t)},isSelected:void 0,onKeyDown:o=>{if(o.keyCode!==Wa.ENTER)return;o.preventDefault();const{offset:r}=c(),{offset:i}=u();if("number"!=typeof r||"number"!=typeof i)return;const s=(0,pe.create)({html:e});s.start=r,s.end=i;const l=(0,pe.split)(s).map((e=>(0,pe.toHTMLString)({value:e}))),d=m.slice();d.splice(n,1,...l),f(d),p(a,`${t}-${n+1}`,0,0)},onMerge:e=>{const o=m.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}f(o),p(a,`${t}-${n-(e?0:1)}`,r,r)},...s},n)))})}));const OR=(0,h.createContext)();OR.displayName="keyboardShortcutContext";const zR=(0,h.createContext)();zR.displayName="inputEventContext";const VR=Symbol("instanceId");function FR(e){const{__unstableMobileNoFocusOnMount:t,deleteEnter:n,placeholderTextColor:o,textAlign:r,selectionColor:i,tagsToEliminate:s,disableEditingMenu:l,fontSize:a,fontFamily:c,fontWeight:u,fontStyle:d,minWidth:p,maxWidth:h,disableSuggestions:g,disableAutocorrection:m,...f}=e;return f}function HR({children:e,tagName:t="div",value:n="",onChange:o,isSelected:r,multiline:i,inlineToolbar:s,wrapperClassName:l,autocompleters:a,onReplace:c,placeholder:u,allowedFormats:f,withoutInteractiveFormatting:b,onRemove:k,onMerge:v,onSplit:y,__unstableOnSplitAtEnd:x,__unstableOnSplitAtDoubleLineEnd:S,identifier:w,preserveWhiteSpace:B,__unstablePastePlainText:j,__unstableEmbedURLOnPaste:M,__unstableDisableFormats:P,disableLineBreaks:R,__unstableAllowPrefixTransformations:A,readOnly:N,...L},D){L=FR(L),y&&I()("wp.blockEditor.RichText onSplit prop",{since:"6.4",alternative:'block.json support key: "splitting"'});const O=(0,m.useInstanceId)(HR),z=(0,h.useRef)(),V=C(),{clientId:H,isSelected:U}=V,G=V[_],$=(0,h.useContext)(sv),{bindableAttributes:W}=(0,h.useContext)(pv),K=(0,g.useRegistry)(),{selectionStart:Z,selectionEnd:q,isSelected:Y,isContentOnly:X}=(0,g.useSelect)((e=>{if(!U)return{isSelected:!1};const{getSelectionStart:t,getSelectionEnd:n,getBlockEditingMode:o}=e(ji),i=t(),s=n();let l;return void 0===r?l=i.clientId===H&&s.clientId===H&&(w?i.attributeKey===w:i[VR]===O):r&&(l=i.clientId===H),{selectionStart:l?i.offset:void 0,selectionEnd:l?s.offset:void 0,isSelected:l,isContentOnly:"contentOnly"===o(H)}}),[H,w,O,r,U]),{disableBoundBlock:Q,bindingsPlaceholder:J,bindingsLabel:ee}=(0,g.useSelect)((e=>{if(!G?.[w]||!W)return{};const t=G[w],o=(0,p.getBlockBindingsSource)(t.source),r={};if(o?.usesContext?.length)for(const e of o.usesContext)r[e]=$[e];const i=!o?.canUserEditValue?.({select:e,context:r,args:t.args});if(n.length>0)return{disableBoundBlock:i,bindingsPlaceholder:null,bindingsLabel:null};const{getBlockAttributes:s}=e(ji),l=s(H);let a=null;if(o?.getFieldsList){const n=o.getFieldsList({select:e,context:r});a=n?.find((e=>E()(e.args,t?.args)))?.label}const c=a??o?.label,u=i?c:(0,T.sprintf)((0,T.__)("Add %s"),c),d=i?t?.args?.key||o?.label:(0,T.sprintf)((0,T.__)("Empty %s; start writing to edit its value"),t?.args?.key||o?.label);return{disableBoundBlock:i,bindingsPlaceholder:l?.placeholder||u,bindingsLabel:d}}),[G,w,W,n,H,$]),te=N||Q||!!$?.["pattern/overrides"]&&!("core/pattern-overrides"===G?.__default?.source),{getSelectionStart:ne,getSelectionEnd:oe,getBlockRootClientId:re}=(0,g.useSelect)(ji),{selectionChange:ie}=(0,g.useDispatch)(ji),se=jR({allowedFormats:f,disableFormats:P}),le=!se||se.length>0,ae=(0,h.useCallback)(((e,t)=>{const n={},o=void 0===e&&void 0===t,r={clientId:H,[w?"attributeKey":VR]:w||O};if("number"==typeof e||o){if(void 0===t&&re(H)!==re(oe().clientId))return;n.start={...r,offset:e}}if("number"==typeof t||o){if(void 0===e&&re(H)!==re(ne().clientId))return;n.end={...r,offset:t}}ie(n)}),[H,re,oe,ne,w,O,ie]),{formatTypes:ce,prepareHandlers:ue,valueHandlers:de,changeHandlers:he,dependencies:ge}=function({clientId:e,identifier:t,allowedFormats:n,withoutInteractiveFormatting:o,disableNoneEssentialFormatting:r=!1}){const i=(0,g.useSelect)(yR,[]),s=(0,h.useMemo)((()=>i.filter((({name:e,interactive:t,tagName:i,[F]:s})=>!(n&&!n.includes(e)||r&&!s||o&&(t||xR.has(i)))))),[i,n,r,o]),l=(0,g.useSelect)((n=>s.reduce(((o,r)=>r.__experimentalGetPropsForEditableTreePreparation?{...o,...SR(r.__experimentalGetPropsForEditableTreePreparation(n,{richTextIdentifier:t,blockClientId:e}),r.name)}:o),{})),[s,e,t]),a=(0,g.useDispatch)(),c=[],u=[],d=[],p=[];for(const e in l)p.push(l[e]);return s.forEach((n=>{if(n.__experimentalCreatePrepareEditableTree){const o=n.__experimentalCreatePrepareEditableTree(wR(l,n.name),{richTextIdentifier:t,blockClientId:e});n.__experimentalCreateOnChangeEditableValue?u.push(o):c.push(o)}if(n.__experimentalCreateOnChangeEditableValue){let o={};n.__experimentalGetPropsForEditableTreeChangeHandler&&(o=n.__experimentalGetPropsForEditableTreeChangeHandler(a,{richTextIdentifier:t,blockClientId:e}));const r=wR(l,n.name);d.push(n.__experimentalCreateOnChangeEditableValue({..."object"==typeof r?r:{},...o},{richTextIdentifier:t,blockClientId:e}))}})),{formatTypes:s,prepareHandlers:c,valueHandlers:u,changeHandlers:d,dependencies:p}}({clientId:H,identifier:w,allowedFormats:se,withoutInteractiveFormatting:b,disableNoneEssentialFormatting:X});function me(e){return ce.forEach((t=>{t.__experimentalCreatePrepareEditableTree&&(e=(0,pe.removeFormat)(e,t.name,0,e.text.length))})),e.formats}const{value:fe,getValue:be,onChange:ke,ref:ve}=(0,pe.__unstableUseRichText)({value:n,onChange(e,{__unstableFormats:t,__unstableText:n}){o(e),Object.values(he).forEach((e=>{e(t,n)}))},selectionStart:Z,selectionEnd:q,onSelectionChange:ae,placeholder:J||u,__unstableIsSelected:Y,__unstableDisableFormats:P,preserveWhiteSpace:B,__unstableDependencies:[...ge,t],__unstableAfterParse:function(e){return de.reduce(((t,n)=>n(t,e.text)),e.formats)},__unstableBeforeSerialize:me,__unstableAddInvisibleFormats:function(e){return ue.reduce(((t,n)=>n(t,e.text)),e.formats)}}),_e=function(e){return(0,ws.__unstableUseAutocompleteProps)({...e,completers:bj(e)})}({onReplace:c,completers:a,record:fe,onChange:ke});!function({html:e,value:t}){const n=(0,h.useRef)(),o=!!t.activeFormats?.length,{__unstableMarkLastChangeAsPersistent:r}=(0,g.useDispatch)(ji);(0,h.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:fe});const ye=(0,h.useRef)(new Set),xe=(0,h.useRef)(new Set);function Se(){z.current?.focus()}const we=t;return(0,d.jsxs)(d.Fragment,{children:[Y&&(0,d.jsx)(OR.Provider,{value:ye,children:(0,d.jsx)(zR.Provider,{value:xe,children:(0,d.jsxs)(ws.Popover.__unstableSlotNameProvider,{value:"__unstable-block-tools-after",children:[e&&e({value:fe,onChange:ke,onFocus:Se}),(0,d.jsx)(AR,{value:fe,onChange:ke,onFocus:Se,formatTypes:ce,forwardedRef:z})]})})}),Y&&le&&(0,d.jsx)(_R,{inline:s,editableContentElement:z.current}),(0,d.jsx)(we,{role:"textbox","aria-multiline":!R,"aria-readonly":te,...L,draggable:void 0,"aria-label":ee||L["aria-label"]||u,..._e,ref:(0,m.useMergeRefs)([ve,D,_e.ref,L.ref,TR({registry:K,getValue:be,onChange:ke,__unstableAllowPrefixTransformations:A,formatTypes:ce,onReplace:c,selectionChange:ie,isSelected:Y,disableFormats:P,value:fe,tagName:t,onSplit:y,__unstableEmbedURLOnPaste:M,pastePlainText:j,onMerge:v,onRemove:k,removeEditorOnlyFormats:me,disableLineBreaks:R,onSplitAtEnd:x,onSplitAtDoubleLineEnd:S,keyboardShortcuts:ye,inputEvents:xe}),z]),contentEditable:!te,suppressContentEditableWarning:!0,className:ms("block-editor-rich-text__editable",L.className,"rich-text"),tabIndex:0!==L.tabIndex||te?L.tabIndex:null,"data-wp-block-attribute-key":w})]})}const UR=(GR=(0,h.forwardRef)(HR),(0,h.forwardRef)(((e,t)=>{let n=e.value,o=e.onChange;Array.isArray(n)&&(I()("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/"}),n=p.children.toHTML(e.value),o=t=>e.onChange(p.children.fromDOM((0,pe.__unstableCreateElement)(document,t).childNodes)));const r=e.multiline?DR:GR;return(0,d.jsx)(r,{...e,value:n,onChange:o,ref:t})})));var GR;UR.Content=LR,UR.isEmpty=e=>!e||0===e.length;const $R=(0,h.forwardRef)(((e,t)=>{if(C()[y]){const{children:t,tagName:n="div",value:o,onChange:r,isSelected:i,multiline:s,inlineToolbar:l,wrapperClassName:a,autocompleters:c,onReplace:u,placeholder:p,allowedFormats:h,withoutInteractiveFormatting:g,onRemove:m,onMerge:f,onSplit:b,__unstableOnSplitAtEnd:k,__unstableOnSplitAtDoubleLineEnd:v,identifier:_,preserveWhiteSpace:y,__unstablePastePlainText:x,__unstableEmbedURLOnPaste:S,__unstableDisableFormats:w,disableLineBreaks:C,__unstableAllowPrefixTransformations:B,readOnly:I,...j}=FR(e);return(0,d.jsx)(n,{...j,dangerouslySetInnerHTML:{__html:NR(o,s)}})}return(0,d.jsx)(UR,{ref:t,...e,readOnly:!1})}));$R.Content=LR,$R.isEmpty=e=>!e||0===e.length;var WR=$R;const KR=(0,h.forwardRef)(((e,t)=>(0,d.jsx)(WR,{ref:t,...e,__unstableDisableFormats:!0})));KR.Content=({value:e="",tagName:t="div",...n})=>(0,d.jsx)(t,{...n,children:e});var ZR=KR;var qR=(0,h.forwardRef)((({__experimentalVersion:e,...t},n)=>{if(2===e)return(0,d.jsx)(ZR,{ref:n,...t});const{className:o,onChange:r,...i}=t;return(0,d.jsx)(Ev.A,{ref:n,className:ms("block-editor-plain-text",o),onChange:e=>r(e.target.value),...i})}));function YR({property:e,viewport:t,desc:n}){const o=(0,m.useInstanceId)(YR),r=n||(0,T.sprintf)((0,T._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,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{"aria-describedby":`rbc-desc-${o}`,children:t.label}),(0,d.jsx)(ws.VisuallyHidden,{as:"span",id:`rbc-desc-${o}`,children:r})]})}var XR=function(e){const{title:t,property:n,toggleLabel:o,onIsResponsiveChange:r,renderDefaultControl:i,renderResponsiveControls:s,isResponsive:l=!1,defaultLabel:a={id:"all",label:(0,T._x)("All","screen sizes")},viewports:c=[{id:"small",label:(0,T.__)("Small screens")},{id:"medium",label:(0,T.__)("Medium screens")},{id:"large",label:(0,T.__)("Large screens")}]}=e;if(!t||!n||!i)return null;const u=o||(0,T.sprintf)((0,T.__)("Use the same %s on all screen sizes."),n),p=(0,T.__)("Choose whether to use the same value for all screen sizes or a unique value for each screen size."),g=i((0,d.jsx)(YR,{property:n,viewport:a}),a);return(0,d.jsxs)("fieldset",{className:"block-editor-responsive-block-control",children:[(0,d.jsx)("legend",{className:"block-editor-responsive-block-control__title",children:t}),(0,d.jsxs)("div",{className:"block-editor-responsive-block-control__inner",children:[(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,className:"block-editor-responsive-block-control__toggle",label:u,checked:!l,onChange:r,help:p}),(0,d.jsxs)("div",{className:ms("block-editor-responsive-block-control__group",{"is-responsive":l}),children:[!l&&g,l&&(s?s(c):c.map((e=>(0,d.jsx)(h.Fragment,{children:i((0,d.jsx)(YR,{property:n,viewport:e}),e)},e.id))))]})]})]})};function QR({character:e,type:t,onUse:n}){const o=(0,h.useContext)(OR),r=(0,h.useRef)();return r.current=n,(0,h.useEffect)((()=>{function n(n){Wa.isKeyboardEvent[t](n,e)&&(r.current(),n.preventDefault())}return o.current.add(n),()=>{o.current.delete(n)}}),[e,t]),null}function JR({name:e,shortcutType:t,shortcutCharacter:n,...o}){let r,i="RichText.ToolbarControls";return e&&(i+=`.${e}`),t&&n&&(r=Wa.displayShortcut[t](n)),(0,d.jsx)(ws.Fill,{name:i,children:(0,d.jsx)(ws.ToolbarButton,{...o,shortcut:r})})}function eA({inputType:e,onInput:t}){const n=(0,h.useContext)(zR),o=(0,h.useRef)();return o.current=t,(0,h.useEffect)((()=>{function t(t){t.inputType===e&&(o.current(),t.preventDefault())}return n.current.add(t),()=>{n.current.delete(t)}}),[e]),null}function tA({units:e,...t}){const[n]=Ti("spacing.units"),o=(0,ws.__experimentalUseCustomUnits)({availableUnits:n||["%","px","em","rem","vw"],units:e});return(0,d.jsx)(ws.__experimentalUnitControl,{units:o,...t})}var nA=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})});var oA=function({url:e,onChange:t}){const[n,o]=(0,h.useReducer)((e=>!e),!1);return(0,d.jsxs)("div",{className:"block-editor-url-input__button",children:[(0,d.jsx)(ws.Button,{size:"compact",icon:Ld,label:e?(0,T.__)("Edit link"):(0,T.__)("Insert link"),onClick:o,className:"components-toolbar__control",isPressed:!!e}),n&&(0,d.jsx)("form",{className:"block-editor-url-input__button-modal",onSubmit:e=>{e.preventDefault(),o()},children:(0,d.jsxs)("div",{className:"block-editor-url-input__button-modal-line",children:[(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,className:"block-editor-url-input__back",icon:nA,label:(0,T.__)("Close"),onClick:o}),(0,d.jsx)(ac,{value:e||"",onChange:t,suffix:(0,d.jsx)(ws.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,d.jsx)(ws.Button,{size:"small",icon:tc,label:(0,T.__)("Submit"),type:"submit"})})})]})})]})},rA=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});const iA="none",sA="custom",lA="media",aA="attachment",cA=["noreferrer","noopener"],uA=({linkDestination:e,onChangeUrl:t,url:n,mediaType:o="image",mediaUrl:r,mediaLink:i,linkTarget:s,linkClass:l,rel:a,showLightboxSetting:c,lightboxEnabled:u,onSetLightbox:p,resetLightbox:g})=>{const[m,f]=(0,h.useState)(!1),[b,k]=(0,h.useState)(null),[v,_]=(0,h.useState)(!1),[y,x]=(0,h.useState)(null),S=(0,h.useRef)(null),w=(0,h.useRef)();(0,h.useEffect)((()=>{if(!w.current)return;(Ga.focus.focusable.find(w.current)[0]||w.current).focus()}),[v,n,u]);const C=()=>{e!==lA&&e!==aA||x(""),_(!0)},B=()=>{_(!1)},I=()=>{const e=[{linkDestination:lA,title:(0,T.__)("Link to image file"),url:"image"===o?r:void 0,icon:rA}];return"image"===o&&i&&e.push({linkDestination:aA,title:(0,T.__)("Link to attachment page"),url:"image"===o?i:void 0,icon:pc}),e},j=(0,d.jsxs)(ws.__experimentalVStack,{spacing:"3",children:[(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Open in new tab"),onChange:e=>{const n=(e=>{const t=e?"_blank":void 0;let n;if(t){const e=(a??"").split(" ");cA.forEach((t=>{e.includes(t)||e.push(t)})),n=e.join(" ")}else{const e=(a??"").split(" ").filter((e=>!1===cA.includes(e)));n=e.length?e.join(" "):void 0}return{linkTarget:t,rel:n}})(e);t(n)},checked:"_blank"===s}),(0,d.jsx)(ws.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Link relation"),value:a??"",onChange:e=>{t({rel:e})},help:(0,h.createInterpolateElement)((0,T.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,d.jsx)(ws.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})})}),(0,d.jsx)(ws.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,T.__)("Link CSS class"),value:l||"",onChange:e=>{t({linkClass:e})}})]}),E=null!==y?y:n,M=!u||u&&!c,P=!E&&M,R=(I().find((t=>t.linkDestination===e))||{}).title;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ws.ToolbarButton,{icon:Ld,className:"components-toolbar__control",label:(0,T.__)("Link"),"aria-expanded":m,onClick:()=>{f(!0)},ref:k,isActive:!!n||u&&c}),m&&(0,d.jsx)(dR,{ref:w,anchor:b,onFocusOutside:e=>{const t=S.current;t&&t.contains(e.target)||(f(!1),x(null),B())},onClose:()=>{x(null),B(),f(!1)},renderSettings:M?()=>j:null,additionalControls:P&&(0,d.jsxs)(ws.NavigableMenu,{children:[I().map((e=>(0,d.jsx)(ws.MenuItem,{icon:e.icon,iconPosition:"left",onClick:()=>{x(null),(e=>{const n=I();let o;o=e?(n.find((t=>t.url===e))||{linkDestination:sA}).linkDestination:iA,t({linkDestination:o,href:e})})(e.url),B()},children:e.title},e.linkDestination))),c&&(0,d.jsx)(ws.MenuItem,{className:"block-editor-url-popover__expand-on-click",icon:vj,info:(0,T.__)("Scale the image with a lightbox effect."),iconPosition:"left",onClick:()=>{x(null),t({linkDestination:iA,href:""}),p?.(!0),B()},children:(0,T.__)("Enlarge on click")},"expand-on-click")]}),offset:13,children:u&&c&&!n&&!v?(0,d.jsxs)("div",{className:"block-editor-url-popover__expand-on-click",children:[(0,d.jsx)(Ol,{icon:vj}),(0,d.jsxs)("div",{className:"text",children:[(0,d.jsx)("p",{children:(0,T.__)("Enlarge on click")}),(0,d.jsx)("p",{className:"description",children:(0,T.__)("Scales the image with a lightbox effect")})]}),(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Disable enlarge on click"),onClick:()=>{p?.(!1)},size:"compact"})]}):!n||v?(0,d.jsx)(dR.LinkEditor,{className:"block-editor-format-toolbar__link-container-content",value:E,onChangeInputValue:x,onSubmit:e=>{if(y){const e=I().find((e=>e.url===y))?.linkDestination||sA;t({href:(0,Ua.prependHTTP)(y),linkDestination:e,lightbox:{enabled:!1}})}B(),x(null),e.preventDefault()},autocompleteRef:S}):n&&!v?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(dR.LinkViewer,{className:"block-editor-format-toolbar__link-container-content",url:n,onEditLinkClick:C,urlLabel:R}),(0,d.jsx)(ws.Button,{icon:ec,label:(0,T.__)("Remove link"),onClick:()=>{t({linkDestination:iA,href:""}),g?.()},size:"compact"})]}):void 0})]})};function dA(){return I()("wp.blockEditor.PreviewOptions",{version:"6.5"}),null}function pA(e){const[t,n]=(0,h.useState)(window.innerWidth);(0,h.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<t?n:t};return(e=>{const t="Mobile"===e?"768px":"1024px",n="40px",r="auto";switch(e){case"Tablet":case"Mobile":return{width:o(e),marginTop:n,marginBottom:n,marginLeft:r,marginRight:r,height:t,overflowY:"auto"};default:return{marginLeft:r,marginRight:r}}})(e)}function hA({clientId:e}){const{updateBlockAttributes:t}=(0,g.useDispatch)(ji),{attributes:n}=(0,g.useSelect)((t=>({attributes:t(ji).getBlockAttributes(e)})),[e]);return n?.metadata?.patternName?(0,d.jsx)(ws.Button,{className:"block-editor-block-inspector-edit-contents-button",__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{const{patternName:o,...r}=n?.metadata??{};t(e,{...n,metadata:r})},children:(0,T.__)("Edit contents")}):null}function gA(){const e=(0,g.useSelect)((e=>e(ji).getBlockSelectionStart()),[]),t=(0,h.useRef)();fh(e,t);return e?(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"block-editor-skip-to-selected-block",onClick:()=>{t.current?.focus()},children:(0,T.__)("Skip to the selected block")}):null}function mA(){const e=(0,g.useSelect)((e=>e(ji).getSelectedBlockCount()),[]);return(0,d.jsxs)(ws.__experimentalHStack,{justify:"flex-start",spacing:2,className:"block-editor-multi-selection-inspector__card",children:[(0,d.jsx)(Vu,{icon:qj,showColors:!0}),(0,d.jsx)("div",{className:"block-editor-multi-selection-inspector__card-title",children:(0,T.sprintf)((0,T._n)("%d Block","%d Blocks",e),e)})]})}var fA=(0,d.jsx)(ue.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,d.jsx)(ue.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"})}),bA=(0,d.jsx)(ue.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)(ue.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})});const kA={name:"settings",title:(0,T.__)("Settings"),value:"settings",icon:fA},vA={name:"styles",title:(0,T.__)("Styles"),value:"styles",icon:bA},_A={name:"content",title:(0,T.__)("Content"),value:"content",icon:pc},yA={name:"list",title:(0,T.__)("List View"),value:"list-view",icon:nM};var xA=()=>{const e=(0,ws.__experimentalUseSlotFills)(Va.slotName),t=(0,ws.__experimentalUseSlotFills)(Pa.name),n=Boolean(e&&e.length),o=Boolean(t&&t.length);return n||o?(0,d.jsxs)(ws.PanelBody,{className:"block-editor-block-inspector__advanced",title:(0,T.__)("Advanced"),initialOpen:!1,children:[(0,d.jsx)(Fa.Slot,{group:"advanced"}),(0,d.jsx)(Pa.Slot,{})]}):null};const SA=()=>{const{selectedClientIds:e,selectedBlocks:t,hasPositionAttribute:n}=(0,g.useSelect)((e=>{const{getBlocksByClientId:t,getSelectedBlockClientIds:n}=e(ji),o=n(),r=t(o);return{selectedClientIds:o,selectedBlocks:r,hasPositionAttribute:r?.some((({attributes:e})=>!!e?.style?.position?.type))}}),[]),{updateBlockAttributes:o}=(0,g.useDispatch)(ji),r=Ji();function i(){if(!e?.length||!t?.length)return;const n=Object.fromEntries(t?.map((({clientId:e,attributes:t})=>[e,{style:fs({...t?.style,position:{...t?.style?.position,type:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0}})}])));o(e,n,!0)}return(0,d.jsx)(ws.__experimentalToolsPanel,{className:"block-editor-block-inspector__position",label:(0,T.__)("Position"),resetAll:i,dropdownMenuProps:r,children:(0,d.jsx)(ws.__experimentalToolsPanelItem,{isShownByDefault:n,label:(0,T.__)("Position"),hasValue:()=>n,onDeselect:i,children:(0,d.jsx)(Fa.Slot,{group:"position"})})})};var wA=()=>{const e=(0,ws.__experimentalUseSlotFills)(Ma.position.name);return Boolean(e&&e.length)?(0,d.jsx)(SA,{}):null};var CA=({showAdvancedControls:e=!1})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa.Slot,{}),(0,d.jsx)(wA,{}),(0,d.jsx)(Fa.Slot,{group:"bindings"}),e&&(0,d.jsx)("div",{children:(0,d.jsx)(xA,{})})]});var BA=({blockName:e,clientId:t,hasBlockStyles:n,isSectionBlock:o})=>{const r=Ap({blockName:e});return(0,d.jsxs)(d.Fragment,{children:[n&&(0,d.jsx)("div",{children:(0,d.jsx)(ws.PanelBody,{title:(0,T.__)("Styles"),children:(0,d.jsx)(VM,{clientId:t})})}),!o&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa.Slot,{group:"color",label:(0,T.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,d.jsx)(Fa.Slot,{group:"background",label:(0,T.__)("Background image")}),(0,d.jsx)(Fa.Slot,{group:"filter"}),(0,d.jsx)(Fa.Slot,{group:"typography",label:(0,T.__)("Typography")}),(0,d.jsx)(Fa.Slot,{group:"dimensions",label:(0,T.__)("Dimensions")}),(0,d.jsx)(Fa.Slot,{group:"border",label:r}),(0,d.jsx)(Fa.Slot,{group:"styles"})]})]})};function IA({clientIds:e,onSelect:t}){return e.length?(0,d.jsx)(ws.__experimentalVStack,{spacing:1,children:e.map((e=>(0,d.jsx)(jA,{onSelect:t,clientId:e},e)))}):null}function jA({clientId:e,onSelect:t}){const n=Xf(e),o=Sj({clientId:e,context:"list-view"}),{isSelected:r}=(0,g.useSelect)((t=>{const{isBlockSelected:n,hasSelectedInnerBlock:o}=t(ji);return{isSelected:n(e)||o(e,!0)}}),[e]),{selectBlock:i}=(0,g.useDispatch)(ji);return(0,d.jsx)(ws.Button,{__next40pxDefaultSize:!0,isPressed:r,onClick:async()=>{await i(e),t&&t(e)},children:(0,d.jsxs)(ws.Flex,{children:[(0,d.jsx)(ws.FlexItem,{children:(0,d.jsx)(Vu,{icon:n?.icon})}),(0,d.jsx)(ws.FlexBlock,{style:{textAlign:"left"},children:(0,d.jsx)(ws.__experimentalTruncate,{children:o})})]})})}var EA=({contentClientIds:e})=>e&&0!==e.length?(0,d.jsx)(ws.PanelBody,{title:(0,T.__)("Content"),children:(0,d.jsx)(IA,{clientIds:e})}):null;const TA=["core/navigation"];var MA=e=>!TA.includes(e);const{Tabs:PA}=G(ws.privateApis);function RA({blockName:e,clientId:t,hasBlockStyles:n,tabs:o,isSectionBlock:r,contentClientIds:i}){const s=(0,g.useSelect)((e=>e(hr.store).get("core","showIconLabels")),[]),l=MA(e)?void 0:yA.name,[a,c]=(0,h.useState)(l??o[0]?.name);return(0,h.useEffect)((()=>{if(!l&&o?.length&&a){o.find((e=>e.name===a))||c(o[0].name)}}),[o,a,l]),(0,d.jsx)("div",{className:"block-editor-block-inspector__tabs",children:(0,d.jsxs)(PA,{defaultTabId:l,selectedTabId:a,onSelect:c,children:[(0,d.jsx)(PA.TabList,{children:o.map((e=>s?(0,d.jsx)(PA.Tab,{tabId:e.name,children:e.title},e.name):(0,d.jsx)(ws.Tooltip,{text:e.title,children:(0,d.jsx)(PA.Tab,{tabId:e.name,"aria-label":e.title,children:(0,d.jsx)(ws.Icon,{icon:e.icon})})},e.name)))}),(0,d.jsx)(PA.TabPanel,{tabId:kA.name,focusable:!1,children:(0,d.jsx)(CA,{showAdvancedControls:!!e})}),(0,d.jsx)(PA.TabPanel,{tabId:vA.name,focusable:!1,children:(0,d.jsx)(BA,{blockName:e,clientId:t,hasBlockStyles:n,isSectionBlock:r})}),(0,d.jsx)(PA.TabPanel,{tabId:_A.name,focusable:!1,children:(0,d.jsx)(EA,{contentClientIds:i})}),(0,d.jsx)(PA.TabPanel,{tabId:yA.name,focusable:!1,children:(0,d.jsx)(Fa.Slot,{group:"list"})})]},t)})}const AA=[];function NA({clientId:e}){return(0,d.jsx)(ws.PanelBody,{title:(0,T.__)("Styles"),children:(0,d.jsx)(VM,{clientId:e})})}function LA({blockName:e,showAdvancedControls:t=!0,showPositionControls:n=!0,showListControls:o=!1,showBindingsControls:r=!0}){const i=Ap({blockName:e});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Fa.Slot,{}),o&&(0,d.jsx)(Fa.Slot,{group:"list"}),(0,d.jsx)(Fa.Slot,{group:"color",label:(0,T.__)("Color"),className:"color-block-support-panel__inner-wrapper"}),(0,d.jsx)(Fa.Slot,{group:"background",label:(0,T.__)("Background image")}),(0,d.jsx)(Fa.Slot,{group:"typography",label:(0,T.__)("Typography")}),(0,d.jsx)(Fa.Slot,{group:"dimensions",label:(0,T.__)("Dimensions")}),(0,d.jsx)(Fa.Slot,{group:"border",label:i}),(0,d.jsx)(Fa.Slot,{group:"styles"}),n&&(0,d.jsx)(wA,{}),r&&(0,d.jsx)(Fa.Slot,{group:"bindings"}),t&&(0,d.jsx)("div",{children:(0,d.jsx)(xA,{})})]})}const DA=({animate:e,wrapper:t,children:n})=>e?t(n):n,OA=({blockInspectorAnimationSettings:e,selectedBlockClientId:t,children:n})=>{const o=e&&"leftToRight"===e.enterDirection?-50:50;return(0,d.jsx)(ws.__unstableMotion.div,{animate:{x:0,opacity:1,transition:{ease:"easeInOut",duration:.14}},initial:{x:o,opacity:0},children:n},t)},zA=({clientId:e,blockName:t,isSectionBlock:n,availableTabs:o,contentClientIds:r,hasBlockStyles:i})=>{const s=o?.length>1,l=Xf(e),a=l.isSynced,c=!a&&s;return(0,d.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,d.jsx)(Xb,{...l,className:a&&"is-synced",allowParentNavigation:!0,children:window?.__experimentalContentOnlyPatternInsertion&&(0,d.jsx)(hA,{clientId:e})}),(0,d.jsx)(lP,{blockClientId:e}),c&&(0,d.jsx)(RA,{hasBlockStyles:i,clientId:e,blockName:t,tabs:o,isSectionBlock:n,contentClientIds:r}),!c&&(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsx)(NA,{clientId:e}),(0,d.jsx)(EA,{contentClientIds:r}),!n&&(0,d.jsx)(LA,{blockName:t,showListControls:!0})]}),(0,d.jsx)(gA,{},"back")]})};var VA=function(){const{selectedBlockCount:e,selectedBlockName:t,selectedBlockClientId:n,blockType:o,isSectionBlock:r,isSectionBlockInSelection:i,hasBlockStyles:s}=(0,g.useSelect)((e=>{const{getSelectedBlockClientId:t,getSelectedBlockClientIds:n,getSelectedBlockCount:o,getBlockName:r,getParentSectionBlock:i,isSectionBlock:s}=G(e(ji)),{getBlockStyles:l}=e(p.store),a=t(),c=i(a)||a,u=c&&r(c),d=u&&(0,p.getBlockType)(u),h=n().some((e=>s(e))),g=u&&l(u),m=g&&g.length>0;return{selectedBlockCount:o(),selectedBlockClientId:c,selectedBlockName:u,blockType:d,isSectionBlockInSelection:h,isSectionBlock:s(c),hasBlockStyles:m}}),[]),l=(0,g.useSelect)((e=>{if(!r||!n)return[];const{getClientIdsOfDescendants:t,getBlockName:o,getBlockEditingMode:i}=G(e(ji)),s=t(n),l=new Set;return s.forEach((e=>{if("core/navigation"===o(e)){t(e).forEach((e=>l.add(e)))}})),s.filter((e=>!l.has(e)&&("core/list-item"!==o(e)&&"contentOnly"===i(e))))}),[r,n]),a=function(e,t,n,o){const r=[],{bindings:i,border:s,color:l,default:a,dimensions:c,list:u,position:d,styles:p,typography:h,effects:m}=Ma,f=MA(e),b=(0,ws.__experimentalUseSlotFills)(u.name),k=!f&&!!b&&b.length,v=[...(0,ws.__experimentalUseSlotFills)(s.name)||[],...(0,ws.__experimentalUseSlotFills)(l.name)||[],...(0,ws.__experimentalUseSlotFills)(c.name)||[],...(0,ws.__experimentalUseSlotFills)(p.name)||[],...(0,ws.__experimentalUseSlotFills)(h.name)||[],...(0,ws.__experimentalUseSlotFills)(m.name)||[]].length,_=[...(0,ws.__experimentalUseSlotFills)(Va.slotName)||[],...(0,ws.__experimentalUseSlotFills)(i.name)||[]],y=[...(0,ws.__experimentalUseSlotFills)(a.name)||[],...(0,ws.__experimentalUseSlotFills)(d.name)||[],...k&&v>1?_:[]],x=!!(t&&t.length>0);k&&!n&&r.push(yA),x&&r.push(_A),y.length&&!n&&r.push(kA),(n?o:v)&&r.push(vA);return function(e,t={}){return void 0!==t[e]?t[e]:void 0===t.default||t.default}(e,(0,g.useSelect)((e=>e(ji).getSettings().blockInspectorTabs),[]))?r:AA}(o?.name,l,r,s),c=a?.length>1,u=function(e){return(0,g.useSelect)((t=>{if(e){const n=t(ji).getSettings().blockInspectorAnimation,o=n?.animationParent,{getSelectedBlockClientId:r,getBlockParentsByBlockName:i}=t(ji);return i(r(),o,!0)[0]||e.name===o?n?.[e.name]:null}return null}),[e])}(o),h=e>1;if(h&&!i)return(0,d.jsxs)("div",{className:"block-editor-block-inspector",children:[(0,d.jsx)(mA,{}),c?(0,d.jsx)(RA,{tabs:a}):(0,d.jsx)(LA,{blockName:t,showAdvancedControls:!1,showPositionControls:!1,showBindingsControls:!1})]});if(h&&i)return(0,d.jsx)("div",{className:"block-editor-block-inspector",children:(0,d.jsx)(mA,{})});const m=t===(0,p.getUnregisteredTypeHandlerName)();return!o||!n||m?(0,d.jsx)("span",{className:"block-editor-block-inspector__no-blocks",children:(0,T.__)("No block selected.")}):(0,d.jsx)(DA,{animate:u,wrapper:e=>(0,d.jsx)(OA,{blockInspectorAnimationSettings:u,selectedBlockClientId:n,children:e}),children:(0,d.jsx)(zA,{clientId:n,blockName:o.name,isSectionBlock:r,availableTabs:a,contentClientIds:l,hasBlockStyles:s})})};const FA=()=>(I()("__unstableUseClipboardHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),Pw());function HA(e){return I()("CopyHandler",{alternative:"BlockCanvas or WritingFlow",since:"6.4",version:"6.7"}),(0,d.jsx)("div",{...e,ref:Pw()})}const UA=()=>{};const GA=(0,h.forwardRef)((function({rootClientId:e,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r=!1,__experimentalInsertionIndex:i,__experimentalInitialTab:s,__experimentalInitialCategory:l,__experimentalFilterValue:a,onPatternCategorySelection:c,onSelect:u=UA,shouldFocusBlock:p=!1,onClose:h},m){const{destinationRootClientId:f}=(0,g.useSelect)((n=>{const{getBlockRootClientId:o}=n(ji);return{destinationRootClientId:e||o(t)||void 0}}),[t,e]);return(0,d.jsx)(nI,{onSelect:u,rootClientId:f,clientId:t,isAppender:n,showInserterHelpPanel:o,showMostUsedBlocks:r,__experimentalInsertionIndex:i,__experimentalFilterValue:a,onPatternCategorySelection:c,__experimentalInitialTab:s,__experimentalInitialCategory:l,shouldFocusBlock:p,ref:m,onClose:h})}));var $A=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(GA,{...e,onPatternCategorySelection:void 0,ref:t})}));function WA(){return I()("wp.blockEditor.MultiSelectScrollIntoView",{hint:"This behaviour is now built-in.",since:"5.8"}),null}const KA=-1!==window.navigator.userAgent.indexOf("Trident"),ZA=new Set([Wa.UP,Wa.DOWN,Wa.LEFT,Wa.RIGHT]),qA=.75;function YA(){const e=(0,g.useSelect)((e=>e(ji).hasSelectedBlock()),[]);return(0,m.useRefEffect)((t=>{if(!e)return;const{ownerDocument:n}=t,{defaultView:o}=n;let r,i,s;function l(){r||(r=o.requestAnimationFrame((()=>{p(),r=null})))}function a(e){i&&o.cancelAnimationFrame(i),i=o.requestAnimationFrame((()=>{c(e),i=null}))}function c({keyCode:e}){if(!h())return;const r=(0,Ga.computeCaretRect)(o);if(!r)return;if(!s)return void(s=r);if(ZA.has(e))return void(s=r);const i=r.top-s.top;if(0===i)return;const l=(0,Ga.getScrollContainer)(t);if(!l)return;const a=l===n.body||l===n.documentElement,c=a?o.scrollY:l.scrollTop,u=a?0:l.getBoundingClientRect().top,d=a?s.top/o.innerHeight:(s.top-u)/(o.innerHeight-u);if(0===c&&d<qA&&function(){const e=t.querySelectorAll('[contenteditable="true"]');return e[e.length-1]===n.activeElement}())return void(s=r);const p=a?o.innerHeight:l.clientHeight;s.top+s.height>u+p||s.top<u?s=r:a?o.scrollBy(0,i):l.scrollTop+=i}function u(){n.addEventListener("selectionchange",d)}function d(){n.removeEventListener("selectionchange",d),p()}function p(){h()&&(s=(0,Ga.computeCaretRect)(o))}function h(){return t.contains(n.activeElement)&&n.activeElement.isContentEditable}return o.addEventListener("scroll",l,!0),o.addEventListener("resize",l,!0),t.addEventListener("keydown",a),t.addEventListener("keyup",c),t.addEventListener("mousedown",u),t.addEventListener("touchstart",u),()=>{o.removeEventListener("scroll",l,!0),o.removeEventListener("resize",l,!0),t.removeEventListener("keydown",a),t.removeEventListener("keyup",c),t.removeEventListener("mousedown",u),t.removeEventListener("touchstart",u),n.removeEventListener("selectionchange",d),o.cancelAnimationFrame(r),o.cancelAnimationFrame(i)}}),[e])}var XA=KA?e=>e.children:function({children:e}){return(0,d.jsx)("div",{ref:YA(),className:"block-editor__typewriter",children:e})};const QA=(0,h.createContext)({});function JA({children:e,uniqueId:t,blockName:n=""}){const o=(0,h.useContext)(QA),{name:r}=C();n=n||r;const i=(0,h.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,d.jsx)(QA.Provider,{value:i,children:e})}function eN(e,t=""){const n=(0,h.useContext)(QA),{name:o}=C();return t=t||o,Boolean(n[t]?.has(e))}QA.displayName="RenderedRefsContext";const tN=e=>(I()("wp.blockEditor.__experimentalRecursionProvider",{since:"6.5",alternative:"wp.blockEditor.RecursionProvider"}),(0,d.jsx)(JA,{...e})),nN=(...e)=>(I()("wp.blockEditor.__experimentalUseHasRecursion",{since:"6.5",alternative:"wp.blockEditor.useHasRecursion"}),eN(...e));function oN({title:e,help:t,actions:n=[],onClose:o}){return(0,d.jsxs)(ws.__experimentalVStack,{className:"block-editor-inspector-popover-header",spacing:4,children:[(0,d.jsxs)(ws.__experimentalHStack,{alignment:"center",children:[(0,d.jsx)(ws.__experimentalHeading,{className:"block-editor-inspector-popover-header__heading",level:2,size:13,children:e}),(0,d.jsx)(ws.__experimentalSpacer,{}),n.map((({label:e,icon:t,onClick:n})=>(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:e,icon:t,variant:!t&&"tertiary",onClick:n,children:!t&&e},e))),o&&(0,d.jsx)(ws.Button,{size:"small",className:"block-editor-inspector-popover-header__action",label:(0,T.__)("Close"),icon:XB,onClick:o})]}),t&&(0,d.jsx)(ws.__experimentalText,{children:t})]})}const rN=(0,h.forwardRef)((function({onClose:e,onChange:t,showPopoverHeaderActions:n,isCompact:o,currentDate:r,title:i,...s},l){const a={startOfWeek:(0,dP.getSettings)().l10n.startOfWeek,onChange:t,currentDate:o?void 0:r,currentTime:o?r:void 0,...s},c=o?ws.TimePicker:ws.DateTimePicker;return(0,d.jsxs)("div",{ref:l,className:"block-editor-publish-date-time-picker",children:[(0,d.jsx)(oN,{title:i||(0,T.__)("Publish"),actions:n?[{label:(0,T.__)("Now"),onClick:()=>t?.(null)}]:void 0,onClose:e}),(0,d.jsx)(c,{...a})]})}));var iN=(0,h.forwardRef)((function(e,t){return(0,d.jsx)(rN,{...e,showPopoverHeaderActions:!0,isCompact:!1,ref:t})}));const sN={button:"wp-element-button",caption:"wp-element-caption"},lN=e=>sN[e]?sN[e]:"";var aN=()=>"";function cN(e,t,n){return"core/image"===e&&n?.lightbox?.allowEditing||!!t?.lightbox}function uN({onChange:e,value:t,inheritedValue:n,panelId:o}){const r=Ji(),i=()=>{e(void 0)};let s=!1;return n?.lightbox?.enabled&&(s=n.lightbox.enabled),(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(ws.__experimentalToolsPanel,{label:(0,T._x)("Settings","Image settings"),resetAll:i,panelId:o,dropdownMenuProps:r,children:(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>!!t?.lightbox,label:(0,T.__)("Enlarge on click"),onDeselect:i,isShownByDefault:!0,panelId:o,children:(0,d.jsx)(ws.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Enlarge on click"),checked:s,onChange:t=>{e({enabled:t})}})})})})}function dN({value:e,onChange:t,inheritedValue:n=e}){const[o,r]=(0,h.useState)(null),i=n?.css;return(0,d.jsxs)(ws.__experimentalVStack,{spacing:3,children:[o&&(0,d.jsx)(ws.Notice,{status:"error",onRemove:()=>r(null),children:o}),(0,d.jsx)(ws.TextareaControl,{label:(0,T.__)("Additional CSS"),__nextHasNoMarginBottom:!0,value:i,onChange:n=>function(n){if(t({...e,css:n}),o){const[e]=lC([{css:n}],".for-validation-only");e&&r(null)}}(n),onBlur:function(e){if(!e?.target?.value)return void r(null);const[t]=lC([{css:e.target.value}],".for-validation-only");r(null===t?(0,T.__)("There is an error with your CSS structure."):null)},className:"block-editor-global-styles-advanced-panel__custom-css-input",spellCheck:!1})]})}const pN=new Map,hN=[],gN={caption:(0,T.__)("Caption"),link:(0,T.__)("Link"),button:(0,T.__)("Button"),heading:(0,T.__)("Heading"),h1:(0,T.__)("H1"),h2:(0,T.__)("H2"),h3:(0,T.__)("H3"),h4:(0,T.__)("H4"),h5:(0,T.__)("H5"),h6:(0,T.__)("H6"),"settings.color":(0,T.__)("Color"),"settings.typography":(0,T.__)("Typography"),"settings.shadow":(0,T.__)("Shadow"),"settings.layout":(0,T.__)("Layout"),"styles.color":(0,T.__)("Colors"),"styles.spacing":(0,T.__)("Spacing"),"styles.background":(0,T.__)("Background"),"styles.typography":(0,T.__)("Typography")},mN=function(e,t){var n,o,r=0;function i(){var i,s,l=n,a=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(s=0;s<a;s++)if(l.args[s]!==arguments[s]){l=l.next;continue e}return l!==n&&(l===o&&(o=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return l={args:i,val:e.apply(null,i)},n?(n.prev=l,l.next=n):o=l,r===t.maxSize?(o=o.prev).next=null:r++,n=l,l.val}return t=t||{},i.clear=function(){n=null,o=null,r=0},i}((()=>(0,p.getBlockTypes)().reduce(((e,{name:t,title:n})=>(e[t]=n,e)),{}))),fN=e=>null!==e&&"object"==typeof e;function bN(e,t,n=""){if(!fN(e)&&!fN(t))return e!==t?n.split(".").slice(0,2).join("."):void 0;e=fN(e)?e:{},t=fN(t)?t:{};const o=new Set([...Object.keys(e),...Object.keys(t)]);let r=[];for(const i of o){const o=n?n+"."+i:i,s=bN(e[i],t[i],o);s&&(r=r.concat(s))}return r}function kN(e,t){const n=JSON.stringify({next:e,previous:t});if(pN.has(n))return pN.get(n);const o=bN({styles:{background:e?.styles?.background,color:e?.styles?.color,typography:e?.styles?.typography,spacing:e?.styles?.spacing},blocks:e?.styles?.blocks,elements:e?.styles?.elements,settings:e?.settings},{styles:{background:t?.styles?.background,color:t?.styles?.color,typography:t?.styles?.typography,spacing:t?.styles?.spacing},blocks:t?.styles?.blocks,elements:t?.styles?.elements,settings:t?.settings});if(!o.length)return pN.set(n,hN),hN;const r=[...new Set(o)].reduce(((e,t)=>{const n=function(e){if(gN[e])return gN[e];const t=e.split(".");if("blocks"===t?.[0]){const e=mN()?.[t[1]];return e||t[1]}return"elements"===t?.[0]?gN[t[1]]||t[1]:void 0}(t);return n&&e.push([t.split(".")[0],n]),e}),[]);return pN.set(n,r),r}function vN(e,t,n={}){let o=kN(e,t);const r=o.length,{maxResults:i}=n;return r?(i&&r>i&&(o=o.slice(0,i)),Object.entries(o.reduce(((e,t)=>{const n=e[t[0]]||[];return n.includes(t[1])||(e[t[0]]=[...n,t[1]]),e}),{})).map((([e,t])=>{const n=t.length,o=t.join((0,T.__)(", "));switch(e){case"blocks":return(0,T.sprintf)((0,T._n)("%s block.","%s blocks.",n),o);case"elements":return(0,T.sprintf)((0,T._n)("%s element.","%s elements.",n),o);case"settings":return(0,T.sprintf)((0,T.__)("%s settings."),o);case"styles":return(0,T.sprintf)((0,T.__)("%s styles."),o);default:return(0,T.sprintf)((0,T.__)("%s."),o)}}))):hN}function _N(e,t,n){if(null==e||!1===e)return;if(Array.isArray(e))return yN(e,t,n);switch(typeof e){case"string":case"number":return}const{type:o,props:r}=e;switch(o){case h.StrictMode:case h.Fragment:return yN(r.children,t,n);case h.RawHTML:return;case ew.Content:return xN(t,n);case LR:return void t.push(r.value)}switch(typeof o){case"string":return void 0!==r.children?yN(r.children,t,n):void 0;case"function":return _N(o.prototype&&"function"==typeof o.prototype.render?new o(r).render():o(r),t,n)}}function yN(e,...t){e=Array.isArray(e)?e:[e];for(let n=0;n<e.length;n++)_N(e[n],...t)}function xN(e,t){for(let n=0;n<t.length;n++){const{name:o,attributes:r,innerBlocks:i}=t[n];_N((0,p.getSaveElement)(o,r,(0,d.jsx)(ew.Content,{})),e,i)}}const SN=[{value:"fill",label:(0,T._x)("Fill","Scale option for dimensions control"),help:(0,T.__)("Fill the space by stretching the content.")},{value:"contain",label:(0,T._x)("Contain","Scale option for dimensions control"),help:(0,T.__)("Fit the content to the space without clipping.")},{value:"cover",label:(0,T._x)("Cover","Scale option for dimensions control"),help:(0,T.__)("Fill the space by clipping what doesn't fit.")},{value:"none",label:(0,T._x)("None","Scale option for dimensions control"),help:(0,T.__)("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,T._x)("Scale down","Scale option for dimensions control"),help:(0,T.__)("Scale down the content to fit the space if it is too big. Content that is too small will have additional padding.")}];function wN({panelId:e,value:t,onChange:n,options:o=SN,defaultValue:r=SN[0].value,isShownByDefault:i=!0}){const s=t??"fill",l=(0,h.useMemo)((()=>o.reduce(((e,t)=>(e[t.value]=t.help,e)),{})),[o]);return(0,d.jsx)(ws.__experimentalToolsPanelItem,{label:(0,T.__)("Scale"),isShownByDefault:i,hasValue:()=>s!==r,onDeselect:()=>n(r),panelId:e,children:(0,d.jsx)(ws.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Scale"),isBlock:!0,help:l[s],value:s,onChange:n,size:"__unstable-large",children:o.map((e=>(0,d.jsx)(ws.__experimentalToggleGroupControlOption,{...e},e.value)))})})}function CN(){return CN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},CN.apply(null,arguments)}function BN(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var IN=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,jN=BN((function(e){return IN.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}));var EN=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),TN=Math.abs,MN=String.fromCharCode,PN=Object.assign;function RN(e){return e.trim()}function AN(e,t,n){return e.replace(t,n)}function NN(e,t){return e.indexOf(t)}function LN(e,t){return 0|e.charCodeAt(t)}function DN(e,t,n){return e.slice(t,n)}function ON(e){return e.length}function zN(e){return e.length}function VN(e,t){return t.push(e),e}var FN=1,HN=1,UN=0,GN=0,$N=0,WN="";function KN(e,t,n,o,r,i,s){return{value:e,root:t,parent:n,type:o,props:r,children:i,line:FN,column:HN,length:s,return:""}}function ZN(e,t){return PN(KN("",null,null,"",null,null,0),e,{length:-e.length},t)}function qN(){return $N=GN>0?LN(WN,--GN):0,HN--,10===$N&&(HN=1,FN--),$N}function YN(){return $N=GN<UN?LN(WN,GN++):0,HN++,10===$N&&(HN=1,FN++),$N}function XN(){return LN(WN,GN)}function QN(){return GN}function JN(e,t){return DN(WN,e,t)}function eL(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function tL(e){return FN=HN=1,UN=ON(WN=e),GN=0,[]}function nL(e){return WN="",e}function oL(e){return RN(JN(GN-1,sL(91===e?e+2:40===e?e+1:e)))}function rL(e){for(;($N=XN())&&$N<33;)YN();return eL(e)>2||eL($N)>3?"":" "}function iL(e,t){for(;--t&&YN()&&!($N<48||$N>102||$N>57&&$N<65||$N>70&&$N<97););return JN(e,QN()+(t<6&&32==XN()&&32==YN()))}function sL(e){for(;YN();)switch($N){case e:return GN;case 34:case 39:34!==e&&39!==e&&sL($N);break;case 40:41===e&&sL(e);break;case 92:YN()}return GN}function lL(e,t){for(;YN()&&e+$N!==57&&(e+$N!==84||47!==XN()););return"/*"+JN(t,GN-1)+"*"+MN(47===e?e:YN())}function aL(e){for(;!eL(XN());)YN();return JN(e,GN)}var cL="-ms-",uL="-moz-",dL="-webkit-",pL="comm",hL="rule",gL="decl",mL="@keyframes";function fL(e,t){for(var n="",o=zN(e),r=0;r<o;r++)n+=t(e[r],r,e,t)||"";return n}function bL(e,t,n,o){switch(e.type){case"@import":case gL:return e.return=e.return||e.value;case pL:return"";case mL:return e.return=e.value+"{"+fL(e.children,o)+"}";case hL:e.value=e.props.join(",")}return ON(n=fL(e.children,o))?e.return=e.value+"{"+n+"}":""}function kL(e){return nL(vL("",null,null,null,[""],e=tL(e),0,[0],e))}function vL(e,t,n,o,r,i,s,l,a){for(var c=0,u=0,d=s,p=0,h=0,g=0,m=1,f=1,b=1,k=0,v="",_=r,y=i,x=o,S=v;f;)switch(g=k,k=YN()){case 40:if(108!=g&&58==LN(S,d-1)){-1!=NN(S+=AN(oL(k),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=oL(k);break;case 9:case 10:case 13:case 32:S+=rL(g);break;case 92:S+=iL(QN()-1,7);continue;case 47:switch(XN()){case 42:case 47:VN(yL(lL(YN(),QN()),t,n),a);break;default:S+="/"}break;case 123*m:l[c++]=ON(S)*b;case 125*m:case 59:case 0:switch(k){case 0:case 125:f=0;case 59+u:h>0&&ON(S)-d&&VN(h>32?xL(S+";",o,n,d-1):xL(AN(S," ","")+";",o,n,d-2),a);break;case 59:S+=";";default:if(VN(x=_L(S,t,n,c,u,r,l,v,_=[],y=[],d),i),123===k)if(0===u)vL(S,t,x,x,_,i,d,l,y);else switch(99===p&&110===LN(S,3)?100:p){case 100:case 109:case 115:vL(e,x,x,o&&VN(_L(e,x,x,0,0,r,l,v,r,_=[],d),y),r,y,d,l,o?_:y);break;default:vL(S,x,x,x,[""],y,0,l,y)}}c=u=h=0,m=b=1,v=S="",d=s;break;case 58:d=1+ON(S),h=g;default:if(m<1)if(123==k)--m;else if(125==k&&0==m++&&125==qN())continue;switch(S+=MN(k),k*m){case 38:b=u>0?1:(S+="\f",-1);break;case 44:l[c++]=(ON(S)-1)*b,b=1;break;case 64:45===XN()&&(S+=oL(YN())),p=XN(),u=d=ON(v=S+=aL(QN())),k++;break;case 45:45===g&&2==ON(S)&&(m=0)}}return i}function _L(e,t,n,o,r,i,s,l,a,c,u){for(var d=r-1,p=0===r?i:[""],h=zN(p),g=0,m=0,f=0;g<o;++g)for(var b=0,k=DN(e,d+1,d=TN(m=s[g])),v=e;b<h;++b)(v=RN(m>0?p[b]+" "+k:AN(k,/&\f/g,p[b])))&&(a[f++]=v);return KN(e,t,n,0===r?hL:l,a,c,u)}function yL(e,t,n){return KN(e,t,n,pL,MN($N),DN(e,2,-2),0)}function xL(e,t,n,o){return KN(e,t,n,gL,DN(e,0,o),DN(e,o+1,-1),o)}var SL=function(e,t,n){for(var o=0,r=0;o=r,r=XN(),38===o&&12===r&&(t[n]=1),!eL(r);)YN();return JN(e,GN)},wL=function(e,t){return nL(function(e,t){var n=-1,o=44;do{switch(eL(o)){case 0:38===o&&12===XN()&&(t[n]=1),e[n]+=SL(GN-1,t,n);break;case 2:e[n]+=oL(o);break;case 4:if(44===o){e[++n]=58===XN()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=MN(o)}}while(o=YN());return e}(tL(e),t))},CL=new WeakMap,BL=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)||CL.get(n))&&!o){CL.set(e,!0);for(var r=[],i=wL(t,r),s=n.props,l=0,a=0;l<i.length;l++)for(var c=0;c<s.length;c++,a++)e.props[a]=r[l]?i[l].replace(/&\f/g,s[c]):s[c]+" "+i[l]}}},IL=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function jL(e,t){switch(function(e,t){return 45^LN(e,0)?(((t<<2^LN(e,0))<<2^LN(e,1))<<2^LN(e,2))<<2^LN(e,3):0}(e,t)){case 5103:return dL+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return dL+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return dL+e+uL+e+cL+e+e;case 6828:case 4268:return dL+e+cL+e+e;case 6165:return dL+e+cL+"flex-"+e+e;case 5187:return dL+e+AN(e,/(\w+).+(:[^]+)/,dL+"box-$1$2"+cL+"flex-$1$2")+e;case 5443:return dL+e+cL+"flex-item-"+AN(e,/flex-|-self/,"")+e;case 4675:return dL+e+cL+"flex-line-pack"+AN(e,/align-content|flex-|-self/,"")+e;case 5548:return dL+e+cL+AN(e,"shrink","negative")+e;case 5292:return dL+e+cL+AN(e,"basis","preferred-size")+e;case 6060:return dL+"box-"+AN(e,"-grow","")+dL+e+cL+AN(e,"grow","positive")+e;case 4554:return dL+AN(e,/([^-])(transform)/g,"$1"+dL+"$2")+e;case 6187:return AN(AN(AN(e,/(zoom-|grab)/,dL+"$1"),/(image-set)/,dL+"$1"),e,"")+e;case 5495:case 3959:return AN(e,/(image-set\([^]*)/,dL+"$1$`$1");case 4968:return AN(AN(e,/(.+:)(flex-)?(.*)/,dL+"box-pack:$3"+cL+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+dL+e+e;case 4095:case 3583:case 4068:case 2532:return AN(e,/(.+)-inline(.+)/,dL+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ON(e)-1-t>6)switch(LN(e,t+1)){case 109:if(45!==LN(e,t+4))break;case 102:return AN(e,/(.+:)(.+)-([^]+)/,"$1"+dL+"$2-$3$1"+uL+(108==LN(e,t+3)?"$3":"$2-$3"))+e;case 115:return~NN(e,"stretch")?jL(AN(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==LN(e,t+1))break;case 6444:switch(LN(e,ON(e)-3-(~NN(e,"!important")&&10))){case 107:return AN(e,":",":"+dL)+e;case 101:return AN(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+dL+(45===LN(e,14)?"inline-":"")+"box$3$1"+dL+"$2$3$1"+cL+"$2box$3")+e}break;case 5936:switch(LN(e,t+11)){case 114:return dL+e+cL+AN(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return dL+e+cL+AN(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return dL+e+cL+AN(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return dL+e+cL+e+e}return e}var EL=[function(e,t,n,o){if(e.length>-1&&!e.return)switch(e.type){case gL:e.return=jL(e.value,e.length);break;case mL:return fL([ZN(e,{value:AN(e.value,"@","@"+dL)})],o);case hL: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 fL([ZN(e,{props:[AN(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return fL([ZN(e,{props:[AN(t,/:(plac\w+)/,":"+dL+"input-$1")]}),ZN(e,{props:[AN(t,/:(plac\w+)/,":-moz-$1")]}),ZN(e,{props:[AN(t,/:(plac\w+)/,cL+"input-$1")]})],o)}return""}))}}];const TL=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||EL;var r,i,s={},l=[];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<t.length;n++)s[t[n]]=!0;l.push(e)}));var a,c,u,d,p=[bL,(d=function(e){a.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[BL,IL].concat(o,p),u=zN(c),function(e,t,n,o){for(var r="",i=0;i<u;i++)r+=c[i](e,t,n,o)||"";return r});i=function(e,t,n,o){a=n,fL(kL(e?e+"{"+t.styles+"}":t.styles),h),o&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new EN({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return g.sheet.hydrate(l),g};const ML=function(e){for(var t,n=0,o=0,r=e.length;r>=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)};const PL={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};var RL=/[A-Z]|^ms/g,AL=/_EMO_([^_]+?)_([^]*?)_EMO_/g,NL=function(e){return 45===e.charCodeAt(1)},LL=function(e){return null!=e&&"boolean"!=typeof e},DL=BN((function(e){return NL(e)?e:e.replace(RL,"-$&").toLowerCase()})),OL=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(AL,(function(e,t,n){return VL={name:t,styles:n,next:VL},t}))}return 1===PL[e]||NL(e)||"number"!=typeof t||0===t?t:t+"px"};function zL(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 VL={name:n.name,styles:n.styles,next:VL},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)VL={name:o.name,styles:o.styles,next:VL},o=o.next;return n.styles+";"}return function(e,t,n){var o="";if(Array.isArray(n))for(var r=0;r<n.length;r++)o+=zL(e,t,n[r])+";";else for(var i in n){var s=n[i];if("object"!=typeof s)null!=t&&void 0!==t[s]?o+=i+"{"+t[s]+"}":LL(s)&&(o+=DL(i)+":"+OL(i,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var l=zL(e,t,s);switch(i){case"animation":case"animationName":o+=DL(i)+":"+l+";";break;default:o+=i+"{"+l+"}"}}else for(var a=0;a<s.length;a++)LL(s[a])&&(o+=DL(i)+":"+OL(i,s[a])+";")}return o}(e,t,n);case"function":if(void 0!==e){var r=VL,i=n(e);return VL=r,zL(e,t,i)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var VL,FL=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var HL=!!ic.useInsertionEffect&&ic.useInsertionEffect,UL=HL||function(e){return e()},GL=(0,ic.createContext)("undefined"!=typeof HTMLElement?TL({key:"css"}):null);GL.Provider;var $L=function(e){return(0,ic.forwardRef)((function(t,n){var o=(0,ic.useContext)(GL);return e(t,o,n)}))},WL=(0,ic.createContext)({});var KL=function(e,t,n){var o=e.key+"-"+t.name;!1===n&&void 0===e.registered[o]&&(e.registered[o]=t.styles)},ZL=jN,qL=function(e){return"theme"!==e},YL=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?ZL:qL},XL=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},QL=function(e){var t=e.cache,n=e.serialized,o=e.isStringTag;KL(t,n,o);UL((function(){return function(e,t,n){KL(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};const JL=function e(t,n){var o,r,i=t.__emotion_real===t,s=i&&t.__emotion_base||t;void 0!==n&&(o=n.label,r=n.target);var l=XL(t,n,i),a=l||YL(s),c=!a("as");return function(){var u=arguments,d=i&&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,h=1;h<p;h++)d.push(u[h],u[0][h])}var g=$L((function(e,t,n){var o=c&&e.as||s,i="",u=[],p=e;if(null==e.theme){for(var h in p={},e)p[h]=e[h];p.theme=(0,ic.useContext)(WL)}"string"==typeof e.className?i=function(e,t,n){var o="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):o+=n+" "})),o}(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var g=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var o=!0,r="";VL=void 0;var i=e[0];null==i||void 0===i.raw?(o=!1,r+=zL(n,t,i)):r+=i[0];for(var s=1;s<e.length;s++)r+=zL(n,t,e[s]),o&&(r+=i[s]);FL.lastIndex=0;for(var l,a="";null!==(l=FL.exec(r));)a+="-"+l[1];return{name:ML(r)+a,styles:r,next:VL}}(d.concat(u),t.registered,p);i+=t.key+"-"+g.name,void 0!==r&&(i+=" "+r);var m=c&&void 0===l?YL(o):a,f={};for(var b in e)c&&"as"===b||m(b)&&(f[b]=e[b]);return f.className=i,f.ref=n,(0,ic.createElement)(ic.Fragment,null,(0,ic.createElement)(QL,{cache:t,serialized:g,isStringTag:"string"==typeof o}),(0,ic.createElement)(o,f))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=d,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+r}}),g.withComponent=function(t,o){return e(t,CN({},n,o,{shouldForwardProp:XL(g,o,!0)})).apply(void 0,d)},g}};var eD=JL.bind();["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){eD[e]=eD(e)}));const tD=eD(ws.__experimentalToolsPanelItem)`
grid-column: span 1;
`;function nD({panelId:e,value:t={},onChange:n=()=>{},units:o,isShownByDefault:r=!0}){const i="auto"===t.width?"":t.width??"",s="auto"===t.height?"":t.height??"",l=e=>o=>{const r={...t};o?r[e]=o:delete r[e],n(r)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(tD,{label:(0,T.__)("Width"),isShownByDefault:r,hasValue:()=>""!==i,onDeselect:l("width"),panelId:e,children:(0,d.jsx)(ws.__experimentalUnitControl,{label:(0,T.__)("Width"),placeholder:(0,T.__)("Auto"),labelPosition:"top",units:o,min:0,value:i,onChange:l("width"),size:"__unstable-large"})}),(0,d.jsx)(tD,{label:(0,T.__)("Height"),isShownByDefault:r,hasValue:()=>""!==s,onDeselect:l("height"),panelId:e,children:(0,d.jsx)(ws.__experimentalUnitControl,{label:(0,T.__)("Height"),placeholder:(0,T.__)("Auto"),labelPosition:"top",units:o,min:0,value:s,onChange:l("height"),size:"__unstable-large"})})]})}var oD=function({panelId:e,value:t={},onChange:n=()=>{},aspectRatioOptions:o,defaultAspectRatio:r="auto",scaleOptions:i,defaultScale:s="fill",unitsOptions:l,tools:a=["aspectRatio","widthHeight","scale"]}){const c=void 0===t.width||"auto"===t.width?null:t.width,u=void 0===t.height||"auto"===t.height?null:t.height,p=void 0===t.aspectRatio||"auto"===t.aspectRatio?null:t.aspectRatio,g=void 0===t.scale||"fill"===t.scale?null:t.scale,[m,f]=(0,h.useState)(g),[b,k]=(0,h.useState)(p),v=c&&u?"custom":b,_=p||c&&u;return(0,d.jsxs)(d.Fragment,{children:[a.includes("aspectRatio")&&(0,d.jsx)(wm,{panelId:e,options:o,defaultValue:r,value:v,onChange:e=>{const o={...t};k(e="auto"===e?null:e),e?o.aspectRatio=e:delete o.aspectRatio,e?m?o.scale=m:(o.scale=s,f(s)):delete o.scale,"custom"!==e&&c&&u&&delete o.height,n(o)}}),a.includes("widthHeight")&&(0,d.jsx)(nD,{panelId:e,units:l,value:{width:c,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:b&&(r.aspectRatio=b),b||!!e==!!o?m?r.scale=m:(r.scale=s,f(s)):delete r.scale,n(r)}}),a.includes("scale")&&_&&(0,d.jsx)(wN,{panelId:e,options:i,defaultValue:s,value:m,onChange:e=>{const o={...t};f(e="fill"===e?null:e),e?o.scale=e:delete o.scale,n(o)}})]})};const rD=[{label:(0,T._x)("Thumbnail","Image size option for resolution control"),value:"thumbnail"},{label:(0,T._x)("Medium","Image size option for resolution control"),value:"medium"},{label:(0,T._x)("Large","Image size option for resolution control"),value:"large"},{label:(0,T._x)("Full Size","Image size option for resolution control"),value:"full"}];const iD={a:(0,T.__)("The <a> element should be used for links that navigate to a different page or to a different section within the same page."),article:(0,T.__)("The <article> element should represent a self-contained, syndicatable portion of the document."),aside:(0,T.__)("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content."),button:(0,T.__)("The <button> element should be used for interactive controls that perform an action on the current page, such as opening a modal or toggling content visibility."),div:(0,T.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),footer:(0,T.__)("The <footer> element should represent a footer for its nearest sectioning element (e.g.: <section>, <article>, <main> etc.)."),header:(0,T.__)("The <header> element should represent introductory content, typically a group of introductory or navigational aids."),main:(0,T.__)("The <main> element should be used for the primary content of your document only."),nav:(0,T.__)("The <nav> element should be used to identify groups of links that are intended to be used for website or page content navigation."),section:(0,T.__)("The <section> element should represent a standalone portion of the document that can't be better represented by another element.")};const sD={};U(sD,{...u,ExperimentalBlockCanvas:YT,ExperimentalBlockEditorProvider:nv,getDuotoneFilter:Pf,getRichTextValues:function(e=[]){p.__unstableGetBlockProps.skipFilters=!0;const t=[];return xN(t,e),p.__unstableGetBlockProps.skipFilters=!1,t.map((e=>e instanceof pe.RichTextData?e:pe.RichTextData.fromHTMLString(e)))},PrivateQuickInserter:rI,extractWords:dB,getNormalizedSearchTerms:hB,normalizeString:pB,PrivateListView:AM,ResizableBoxPopover:function({clientId:e,resizableBoxProps:t,...n}){return(0,d.jsx)(of,{clientId:e,__unstablePopoverSlot:"block-toolbar",...n,children:(0,d.jsx)(ws.ResizableBox,{...t})})},useHasBlockToolbar:TT,cleanEmptyObject:fs,BlockQuickNavigation:IA,LayoutStyle:function({layout:e={},css:t,...n}){const o=Xl(e.type),[r]=Ti("spacing.blockGap"),i=null!==r;if(o){if(t)return(0,d.jsx)("style",{children:t});const r=o.getLayoutStyle?.({hasBlockGapSupport:i,layout:e,...n});if(r)return(0,d.jsx)("style",{children:r})}return null},BlockManager:Uu,BlockRemovalWarningModal:function({rules:e}){const{clientIds:t,selectPrevious:n,message:o}=(0,g.useSelect)((e=>G(e(ji)).getRemovalPromptData())),{clearBlockRemovalPrompt:r,setBlockRemovalRules:i,privateRemoveBlocks:s}=G((0,g.useDispatch)(ji));if((0,h.useEffect)((()=>(i(e),()=>{i()})),[e,i]),!o)return;return(0,d.jsxs)(ws.Modal,{title:(0,T.__)("Be careful!"),onRequestClose:r,size:"medium",children:[(0,d.jsx)("p",{children:o}),(0,d.jsxs)(ws.__experimentalHStack,{justify:"right",children:[(0,d.jsx)(ws.Button,{variant:"tertiary",onClick:r,__next40pxDefaultSize:!0,children:(0,T.__)("Cancel")}),(0,d.jsx)(ws.Button,{variant:"primary",onClick:()=>{s(t,n,!0),r()},__next40pxDefaultSize:!0,children:(0,T.__)("Delete")})]})]})},useLayoutClasses:Nb,useLayoutStyles:function(e={},t,n){const{layout:o={},style:r={}}=e,i=o?.inherit||o?.contentSize||o?.wideSize?{...o,type:"constrained"}:o||{},s=Xl(i?.type||"default"),[l]=Ti("spacing.blockGap"),a=null!==l;return s?.getLayoutStyle?.({blockName:t,selector:n,layout:o,style:r,hasBlockGapSupport:a})},DimensionsTool:oD,ResolutionTool:function({panelId:e,value:t,onChange:n,options:o=rD,defaultValue:r=rD[0].value,isShownByDefault:i=!0,resetAllFilter:s}){const l=t??r;return(0,d.jsx)(ws.__experimentalToolsPanelItem,{hasValue:()=>l!==r,label:(0,T.__)("Resolution"),onDeselect:()=>n(r),isShownByDefault:i,panelId:e,resetAllFilter:s,children:(0,d.jsx)(ws.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,T.__)("Resolution"),value:l,options:o,onChange:n,help:(0,T.__)("Select the size of the source image."),size:"__unstable-large"})})},TabbedSidebar:JB,TextAlignmentControl:Wh,usesContextKey:PR,useFlashEditableBlocks:cS,HTMLElementControl:function({tagName:e,onChange:t,clientId:n,options:o=[{label:(0,T.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]}){const r=!!n&&o.some((e=>"main"===e.value)),i=(0,g.useSelect)((e=>{if(!r)return!1;const{getClientIdsWithDescendants:t,getBlockAttributes:o}=e(ji);return t().some((e=>e!==n&&"main"===o(e)?.tagName))}),[n,r]),s=o.map((t=>"main"===t.value&&i&&"main"!==e?{...t,disabled:!0,label:(0,T.sprintf)((0,T.__)("%s (Already in use)"),t.label)}:t));return(0,d.jsxs)(ws.__experimentalVStack,{spacing:2,className:"block-editor-html-element-control",children:[(0,d.jsx)(ws.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,T.__)("HTML element"),options:s,value:e,onChange:t,help:iD[e]}),"main"===e&&i&&(0,d.jsx)(ws.Notice,{status:"warning",isDismissible:!1,children:(0,T.__)("Multiple <main> elements detected. The duplicate may be in your content or template. This is not valid HTML and may cause accessibility issues. Please change this HTML element.")})]})},useZoomOut:eI,globalStylesDataKey:N,globalStylesLinksDataKey:L,selectBlockPatternsKey:D,requiresWrapperOnCopy:Tw,PrivateRichText:UR,PrivateInserterLibrary:GA,reusableBlocksSelectKey:O,PrivateBlockPopover:ef,PrivatePublishDateTimePicker:rN,useSpacingSizes:lm,useBlockDisplayTitle:Sj,__unstableBlockStyleVariationOverridesWithConfig:function({config:e}){const{getBlockStyles:t,overrides:n}=(0,g.useSelect)((e=>({getBlockStyles:e(p.store).getBlockStyles,overrides:G(e(ji)).getStyleOverrides()})),[]),{getBlockName:o}=(0,g.useSelect)(ji),r=(0,h.useMemo)((()=>{if(!n?.length)return;const r=[],i=[];for(const[,s]of n)if(s?.variation&&s?.clientId&&!i.includes(s.clientId)){const n=o(s.clientId),l=e?.styles?.blocks?.[n]?.variations?.[s.variation];if(l){const o={settings:e?.settings,styles:{blocks:{[n]:{variations:{[`${s.variation}-${s.clientId}`]:l}}}}},a=Sb((0,p.getBlockTypes)(),t,s.clientId),c=yb(o,a,!1,!0,!0,!0,{blockGap:!1,blockStyles:!0,layoutStyles:!1,marginReset:!1,presets:!1,rootPadding:!1,variationStyles:!0});r.push({id:`${s.variation}-${s.clientId}`,css:c,__unstableType:"variation",variation:s.variation,clientId:s.clientId}),i.push(s.clientId)}}return r}),[e,n,t,o]);if(r&&r.length)return(0,d.jsx)(d.Fragment,{children:r.map((e=>(0,d.jsx)(Eb,{override:e},e.id)))})},setBackgroundStyleDefaults:Au,sectionRootClientIdKey:z,CommentIconSlotFill:NE,CommentIconToolbarSlotFill:hT,mediaEditKey:V,essentialFormatKey:F,useBlockElement:bh,useBlockElementRef:fh})})(),(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 64b5a795dc..799a241ee0 100644
--- a/wp-includes/js/dist/block-library.js
+++ b/wp-includes/js/dist/block-library.js
@@ -2529,7 +2529,7 @@ function accordion_heading_save_save({ attributes }) {
;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/block.json
-const accordion_heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"blockVisibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');
+const accordion_heading_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Displays a heading that toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"blockVisibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');
;// ./node_modules/@wordpress/block-library/build-module/accordion-heading/icon.js
@@ -6319,9 +6319,6 @@ function getTransformedAttributes(attributes, newBlockName, bindingsCallback = n
return void 0;
}
const transformedAttributes = {};
- if ((0,external_wp_blocks_namespaceObject.hasBlockSupport)(newBlockType, "allowedBlocks") && attributes.allowedBlocks) {
- transformedAttributes.allowedBlocks = attributes.allowedBlocks;
- }
if ((0,external_wp_blocks_namespaceObject.hasBlockSupport)(newBlockType, "anchor") && attributes.anchor) {
transformedAttributes.anchor = attributes.anchor;
}
@@ -7390,7 +7387,7 @@ function edit_ClassicEdit({
;// ./node_modules/@wordpress/block-library/build-module/freeform/block.json
-const freeform_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$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":false,"customClassName":false,"reusable":false},"editorStyle":"wp-block-freeform-editor"}');
+const freeform_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$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":{"html":false,"className":false,"customClassName":false,"lock":false,"reusable":false,"renaming":false,"blockVisibility":false},"editorStyle":"wp-block-freeform-editor"}');
;// ./node_modules/@wordpress/block-library/build-module/freeform/save.js
@@ -26859,23 +26856,56 @@ function math_save_save({ attributes }) {
if (!latex) {
return null;
}
- return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("div", { ...external_wp_blockEditor_namespaceObject.useBlockProps.save(), children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
"math",
{
- ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
display: "block",
dangerouslySetInnerHTML: { __html: mathML }
}
- );
+ ) });
}
+;// ./node_modules/@wordpress/block-library/build-module/math/deprecated.js
+
+
+const math_deprecated_v1 = {
+ attributes: {
+ latex: {
+ type: "string",
+ role: "content"
+ },
+ mathML: {
+ type: "string",
+ source: "html",
+ selector: "math"
+ }
+ },
+ save({ attributes }) {
+ const { latex, mathML } = attributes;
+ if (!latex) {
+ return null;
+ }
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ "math",
+ {
+ ...external_wp_blockEditor_namespaceObject.useBlockProps.save(),
+ display: "block",
+ dangerouslySetInnerHTML: { __html: mathML }
+ }
+ );
+ }
+};
+var math_deprecated_deprecated_default = [math_deprecated_v1];
+
+
;// ./node_modules/@wordpress/block-library/build-module/math/index.js
+
const { name: math_name } = math_block_namespaceObject;
const math_settings = {
icon: math_default,
@@ -26887,7 +26917,8 @@ const math_settings = {
viewportWidth: 300
},
edit: MathEdit,
- save: math_save_save
+ save: math_save_save,
+ deprecated: math_deprecated_deprecated_default
};
const math_init = () => initBlock({ name: math_name, metadata: math_block_namespaceObject, settings: math_settings });
@@ -29545,7 +29576,7 @@ function MissingEdit({ attributes, clientId }) {
;// ./node_modules/@wordpress/block-library/build-module/missing/block.json
-const missing_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/missing","title":"Unsupported","category":"text","description":"Your site doesn’t include support for this block.","textdomain":"default","attributes":{"originalName":{"type":"string"},"originalUndelimitedContent":{"type":"string"},"originalContent":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"inserter":false,"html":false,"reusable":false,"interactivity":{"clientNavigation":true}}}');
+const missing_block_namespaceObject = /*#__PURE__*/JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/missing","title":"Unsupported","category":"text","description":"Your site doesn’t include support for this block.","textdomain":"default","attributes":{"originalName":{"type":"string"},"originalUndelimitedContent":{"type":"string"},"originalContent":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"inserter":false,"html":false,"lock":false,"reusable":false,"renaming":false,"blockVisibility":false,"interactivity":{"clientNavigation":true}}}');
;// ./node_modules/@wordpress/block-library/build-module/missing/save.js
diff --git a/wp-includes/js/dist/block-library.min.js b/wp-includes/js/dist/block-library.min.js
index 481a5fe50c..edbb83ff6c 100644
--- a/wp-includes/js/dist/block-library.min.js
+++ b/wp-includes/js/dist/block-library.min.js
@@ -1,4 +1,4 @@
/*! This file is auto-generated */
-(()=>{var e,t,o={3533:e=>{"use strict";e.exports=window.wp.latexToMathml},7734:e=>{"use strict";e.exports=function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var n,r,a;if(Array.isArray(t)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(!e(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(t[r]!==o[r])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(o,a[r]))return!1;for(r=n;0!=r--;){var i=a[r];if(!e(t[i],o[i]))return!1}return!0}return t!=t&&o!=o}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function a(e){return t[e]}var i=function(e){return e.replace(n,a)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(a,i),a},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";r.r(a),r.d(a,{__experimentalGetCoreBlocks:()=>ZN,__experimentalRegisterExperimentalCoreBlocks:()=>QN,privateApis:()=>WN,registerCoreBlocks:()=>JN});var e={};r.r(e),r.d(e,{init:()=>Pt,metadata:()=>Ct,name:()=>Tt,settings:()=>Nt});var t={};r.r(t),r.d(t,{init:()=>Ht,metadata:()=>Mt,name:()=>At,settings:()=>Lt});var o={};r.r(o),r.d(o,{init:()=>$t,metadata:()=>Rt,name:()=>Ot,settings:()=>Gt});var n={};r.r(n),r.d(n,{init:()=>Jt,metadata:()=>Ut,name:()=>Wt,settings:()=>Zt});var i={};r.r(i),r.d(i,{init:()=>eo,metadata:()=>Kt,name:()=>Yt,settings:()=>Xt});var s={};r.r(s),r.d(s,{init:()=>ho,metadata:()=>oo,name:()=>mo,settings:()=>go});var l={};r.r(l),r.d(l,{init:()=>Eo,metadata:()=>Ho,name:()=>Vo,settings:()=>Fo});var c={};r.r(c),r.d(c,{init:()=>Jo,metadata:()=>Go,name:()=>Wo,settings:()=>Zo});var u={};r.r(u),r.d(u,{init:()=>wn,metadata:()=>yn,name:()=>vn,settings:()=>kn});var d={};r.r(d),r.d(d,{init:()=>Hn,metadata:()=>zn,name:()=>An,settings:()=>Ln});var p={};r.r(p),r.d(p,{init:()=>$n,metadata:()=>Vn,name:()=>On,settings:()=>Gn});var m={};r.r(m),r.d(m,{init:()=>Yn,metadata:()=>qn,name:()=>Qn,settings:()=>Kn});var g={};r.r(g),r.d(g,{init:()=>ur,metadata:()=>sr,name:()=>lr,settings:()=>cr});var h={};r.r(h),r.d(h,{init:()=>fr,metadata:()=>pr,name:()=>xr,settings:()=>br});var _={};r.r(_),r.d(_,{init:()=>Tr,metadata:()=>jr,name:()=>Sr,settings:()=>Br});var x={};r.r(x),r.d(x,{init:()=>Wr,metadata:()=>Er,name:()=>Ur,settings:()=>qr});var b={};r.r(b),r.d(b,{init:()=>ia,metadata:()=>Jr,name:()=>ra,settings:()=>aa});var f={};r.r(f),r.d(f,{init:()=>ua,metadata:()=>sa,name:()=>la,settings:()=>ca});var y={};r.r(y),r.d(y,{init:()=>xa,metadata:()=>pa,name:()=>ha,settings:()=>_a});var v={};r.r(v),r.d(v,{init:()=>ka,metadata:()=>fa,name:()=>ya,settings:()=>va});var k={};r.r(k),r.d(k,{init:()=>Pa,metadata:()=>Ca,name:()=>Ta,settings:()=>Na});var w={};r.r(w),r.d(w,{init:()=>Aa,metadata:()=>Da,name:()=>Ma,settings:()=>za});var C={};r.r(C),r.d(C,{init:()=>Ea,metadata:()=>Ha,name:()=>Va,settings:()=>Fa});var j={};r.r(j),r.d(j,{init:()=>Xa,metadata:()=>Ga,name:()=>Ka,settings:()=>Ya});var S={};r.r(S),r.d(S,{init:()=>ai,metadata:()=>ti,name:()=>ni,settings:()=>ri});var B={};r.r(B),r.d(B,{init:()=>pi,metadata:()=>si,name:()=>ui,settings:()=>di});var T={};r.r(T),r.d(T,{init:()=>bi,metadata:()=>gi,name:()=>_i,settings:()=>xi});var N={};r.r(N),r.d(N,{init:()=>Ci,metadata:()=>yi,name:()=>ki,settings:()=>wi});var P={};r.r(P),r.d(P,{init:()=>Di,metadata:()=>Si,name:()=>Pi,settings:()=>Ii});var I={};r.r(I),r.d(I,{init:()=>zl,metadata:()=>Bl,name:()=>Dl,settings:()=>Ml});var D={};r.r(D),r.d(D,{init:()=>Gl,metadata:()=>Ll,name:()=>El,settings:()=>Ol});var M={};r.r(M),r.d(M,{init:()=>Pc,metadata:()=>yo,name:()=>Tc,settings:()=>Nc});var z={};r.r(z),r.d(z,{init:()=>Wc,metadata:()=>Oc,name:()=>Uc,settings:()=>qc});var A={};r.r(A),r.d(A,{init:()=>au,metadata:()=>Yc,name:()=>nu,settings:()=>ru});var L={};r.r(L),r.d(L,{init:()=>fu,metadata:()=>gu,name:()=>xu,settings:()=>bu});var H={};r.r(H),r.d(H,{init:()=>ju,metadata:()=>ku,name:()=>wu,settings:()=>Cu});var R={};r.r(R),r.d(R,{init:()=>zu,metadata:()=>Nu,name:()=>Du,settings:()=>Mu});var V={};r.r(V),r.d(V,{init:()=>Md,metadata:()=>Td,name:()=>Id,settings:()=>Dd});var F={};r.r(F),r.d(F,{init:()=>Kd,metadata:()=>Od,name:()=>Jd,settings:()=>Qd});var E={};r.r(E),r.d(E,{init:()=>yp,metadata:()=>hp,name:()=>bp,settings:()=>fp});var O={};r.r(O),r.d(O,{init:()=>Sp,metadata:()=>kp,name:()=>Cp,settings:()=>jp});var G={};r.r(G),r.d(G,{init:()=>Mp,metadata:()=>Np,name:()=>Ip,settings:()=>Dp});var $={};r.r($),r.d($,{init:()=>dm,metadata:()=>rm,name:()=>cm,settings:()=>um});var U={};r.r(U),r.d(U,{init:()=>_m,metadata:()=>mm,name:()=>gm,settings:()=>hm});var q={};r.r(q),r.d(q,{init:()=>Dm,metadata:()=>bm,name:()=>Pm,settings:()=>Im});var W={};r.r(W),r.d(W,{init:()=>sg,metadata:()=>eg,name:()=>ag,settings:()=>ig});var Z={};r.r(Z),r.d(Z,{init:()=>mg,metadata:()=>ug,name:()=>dg,settings:()=>pg});var J={};r.r(J),r.d(J,{init:()=>Sg,metadata:()=>hg,name:()=>Cg,settings:()=>jg});var Q={};r.r(Q),r.d(Q,{init:()=>Ig,metadata:()=>Tg,name:()=>Ng,settings:()=>Pg});var K={};r.r(K),r.d(K,{init:()=>kh,metadata:()=>_h,name:()=>yh,settings:()=>vh});var Y={};r.r(Y),r.d(Y,{init:()=>Sh,metadata:()=>wh,name:()=>Ch,settings:()=>jh});var X={};r.r(X),r.d(X,{init:()=>Mh,metadata:()=>Nh,name:()=>Ih,settings:()=>Dh});var ee={};r.r(ee),r.d(ee,{init:()=>kx,metadata:()=>Ah,name:()=>yx,settings:()=>vx});var te={};r.r(te),r.d(te,{init:()=>Lx,metadata:()=>wx,name:()=>zx,settings:()=>Ax});var oe={};r.r(oe),r.d(oe,{init:()=>Ux,metadata:()=>Hx,name:()=>Gx,settings:()=>$x});var ne={};r.r(ne),r.d(ne,{init:()=>Kx,metadata:()=>Wx,name:()=>Jx,settings:()=>Qx});var re={};r.r(re),r.d(re,{init:()=>sb,metadata:()=>Yx,name:()=>ab,settings:()=>ib});var ae={};r.r(ae),r.d(ae,{init:()=>fb,metadata:()=>cb,name:()=>xb,settings:()=>bb});var ie={};r.r(ie),r.d(ie,{init:()=>Cb,metadata:()=>yb,name:()=>kb,settings:()=>wb});var se={};r.r(se),r.d(se,{init:()=>$b,metadata:()=>Vb,name:()=>Ob,settings:()=>Gb});var le={};r.r(le),r.d(le,{init:()=>Yb,metadata:()=>qb,name:()=>Qb,settings:()=>Kb});var ce={};r.r(ce),r.d(ce,{init:()=>rf,metadata:()=>Xb,name:()=>of,settings:()=>nf});var ue={};r.r(ue),r.d(ue,{init:()=>uf,metadata:()=>af,name:()=>lf,settings:()=>cf});var de={};r.r(de),r.d(de,{init:()=>_f,metadata:()=>df,name:()=>gf,settings:()=>hf});var pe={};r.r(pe),r.d(pe,{init:()=>kf,metadata:()=>bf,name:()=>yf,settings:()=>vf});var me={};r.r(me),r.d(me,{init:()=>Bf,metadata:()=>Cf,name:()=>jf,settings:()=>Sf});var ge={};r.r(ge),r.d(ge,{init:()=>Mf,metadata:()=>Tf,name:()=>If,settings:()=>Df});var he={};r.r(he),r.d(he,{init:()=>Uf,metadata:()=>Af,name:()=>Gf,settings:()=>$f});var _e={};r.r(_e),r.d(_e,{init:()=>oy,metadata:()=>qf,name:()=>ey,settings:()=>ty});var xe={};r.r(xe),r.d(xe,{init:()=>ly,metadata:()=>ry,name:()=>iy,settings:()=>sy});var be={};r.r(be),r.d(be,{init:()=>wy,metadata:()=>uy,name:()=>vy,settings:()=>ky});var fe={};r.r(fe),r.d(fe,{init:()=>Iy,metadata:()=>Cy,name:()=>Ny,settings:()=>Py});var ye={};r.r(ye),r.d(ye,{init:()=>Ry,metadata:()=>Dy,name:()=>Ly,settings:()=>Hy});var ve={};r.r(ve),r.d(ve,{init:()=>Zy,metadata:()=>Fy,name:()=>qy,settings:()=>Wy});var ke={};r.r(ke),r.d(ke,{init:()=>rv,metadata:()=>Qy,name:()=>ov,settings:()=>nv});var we={};r.r(we),r.d(we,{init:()=>uv,metadata:()=>av,name:()=>lv,settings:()=>cv});var Ce={};r.r(Ce),r.d(Ce,{init:()=>xv,metadata:()=>pv,name:()=>hv,settings:()=>_v});var je={};r.r(je),r.d(je,{init:()=>Hv,metadata:()=>Dv,name:()=>Av,settings:()=>Lv});var Se={};r.r(Se),r.d(Se,{init:()=>Qk,metadata:()=>Vv,name:()=>Zk,settings:()=>Jk});var Be={};r.r(Be),r.d(Be,{init:()=>tw,metadata:()=>Kk,name:()=>Xk,settings:()=>ew});var Te={};r.r(Te),r.d(Te,{init:()=>cw,metadata:()=>ow,name:()=>sw,settings:()=>lw});var Ne={};r.r(Ne),r.d(Ne,{init:()=>gw,metadata:()=>uw,name:()=>pw,settings:()=>mw});var Pe={};r.r(Pe),r.d(Pe,{init:()=>fw,metadata:()=>hw,name:()=>xw,settings:()=>bw});var Ie={};r.r(Ie),r.d(Ie,{init:()=>Cw,metadata:()=>yw,name:()=>kw,settings:()=>ww});var De={};r.r(De),r.d(De,{init:()=>Mw,metadata:()=>jw,name:()=>Iw,settings:()=>Dw});var Me={};r.r(Me),r.d(Me,{init:()=>Fw,metadata:()=>zw,name:()=>Rw,settings:()=>Vw});var ze={};r.r(ze),r.d(ze,{init:()=>aC,metadata:()=>eC,name:()=>nC,settings:()=>rC});var Ae={};r.r(Ae),r.d(Ae,{init:()=>vC,metadata:()=>sC,name:()=>fC,settings:()=>yC});var Le={};r.r(Le),r.d(Le,{init:()=>jC,metadata:()=>kC,name:()=>wC,settings:()=>CC});var He={};r.r(He),r.d(He,{init:()=>PC,metadata:()=>BC,name:()=>TC,settings:()=>NC});var Re={};r.r(Re),r.d(Re,{init:()=>RC,metadata:()=>DC,name:()=>LC,settings:()=>HC});var Ve={};r.r(Ve),r.d(Ve,{init:()=>WC,metadata:()=>EC,name:()=>UC,settings:()=>qC});var Fe={};r.r(Fe),r.d(Fe,{init:()=>ej,metadata:()=>KC,name:()=>YC,settings:()=>XC});var Ee={};r.r(Ee),r.d(Ee,{init:()=>dj,metadata:()=>oj,name:()=>cj,settings:()=>uj});var Oe={};r.r(Oe),r.d(Oe,{init:()=>bj,metadata:()=>pj,name:()=>_j,settings:()=>xj});var Ge={};r.r(Ge),r.d(Ge,{init:()=>Sj,metadata:()=>yj,name:()=>Cj,settings:()=>jj});var $e={};r.r($e),r.d($e,{init:()=>Hj,metadata:()=>Dj,name:()=>Aj,settings:()=>Lj});var Ue={};r.r(Ue),r.d(Ue,{init:()=>Uj,metadata:()=>Oj,name:()=>Gj,settings:()=>$j});var qe={};r.r(qe),r.d(qe,{init:()=>aS,metadata:()=>tS,name:()=>nS,settings:()=>rS});var We={};r.r(We),r.d(We,{init:()=>US,metadata:()=>RS,name:()=>GS,settings:()=>$S});var Ze={};r.r(Ze),r.d(Ze,{init:()=>oB,metadata:()=>WS,name:()=>eB,settings:()=>tB});var Je={};r.r(Je),r.d(Je,{init:()=>lB,metadata:()=>rB,name:()=>iB,settings:()=>sB});var Qe={};r.r(Qe),r.d(Qe,{init:()=>EB,metadata:()=>_B,name:()=>VB,settings:()=>FB});var Ke={};r.r(Ke),r.d(Ke,{init:()=>XB,metadata:()=>GB,name:()=>KB,settings:()=>YB});var Ye={};r.r(Ye),r.d(Ye,{init:()=>aT,metadata:()=>tT,name:()=>nT,settings:()=>rT});var Xe={};r.r(Xe),r.d(Xe,{init:()=>dT,metadata:()=>sT,name:()=>cT,settings:()=>uT});var et={};r.r(et),r.d(et,{init:()=>LT,metadata:()=>pT,name:()=>zT,settings:()=>AT});var tt={};r.r(tt),r.d(tt,{init:()=>GT,metadata:()=>HT,name:()=>ET,settings:()=>OT});var ot={};r.r(ot),r.d(ot,{init:()=>ZT,metadata:()=>$T,name:()=>qT,settings:()=>WT});var nt={};r.r(nt),r.d(nt,{init:()=>nN,metadata:()=>YT,name:()=>tN,settings:()=>oN});var rt={};r.r(rt),r.d(rt,{init:()=>jN,metadata:()=>aN,name:()=>wN,settings:()=>CN});var at={};r.r(at),r.d(at,{init:()=>FN,metadata:()=>SN,name:()=>RN,settings:()=>VN});const it=window.ReactJSXRuntime,st=window.wp.blocks,lt=window.wp.data,ct=window.wp.blockEditor,ut=window.wp.serverSideRender;var dt=r.n(ut);const pt=window.wp.i18n,mt=window.wp.components,gt=window.wp.element,ht=window.wp.blob,_t=window.wp.coreData,xt=window.wp.compose;function bt(e,t,o){return(0,lt.useSelect)((n=>n(_t.store).canUser("update",{kind:e,name:t,id:o})),[e,t,o])}function ft(e={}){const t=(0,gt.useRef)(e),o=(0,gt.useRef)(!1),{getSettings:n}=(0,lt.useSelect)(ct.store);(0,gt.useLayoutEffect)((()=>{t.current=e})),(0,gt.useEffect)((()=>{if(o.current)return;if(!t.current.url||!(0,ht.isBlobURL)(t.current.url))return;const e=(0,ht.getBlobByURL)(t.current.url);if(!e)return;const{url:r,allowedTypes:a,onChange:i,onError:s}=t.current,{mediaUpload:l}=n();l&&(o.current=!0,l({filesList:[e],allowedTypes:a,onFileChange:([e])=>{(0,ht.isBlobURL)(e?.url)||((0,ht.revokeBlobURL)(r),i(e),o.current=!1)},onError:e=>{(0,ht.revokeBlobURL)(r),s(e),o.current=!1}}))}),[n])}function yt(){const{avatarURL:e}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o}));return e}function vt(){return(0,xt.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const kt="core/accordion-item",wt={name:kt};const Ct=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion","title":"Accordion","category":"design","description":"Displays a foldable layout that groups content in collapsible sections.","example":{},"supports":{"anchor":true,"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradients":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"ariaLabel":true,"interactivity":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"showIcon":{"type":"boolean","default":true},"autoclose":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3},"levelOptions":{"type":"array"}},"providesContext":{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},"allowedBlocks":["core/accordion-item"],"textdomain":"default","viewScriptModule":"@wordpress/block-library/accordion/view"}');function jt(e){if(!e)return;const{metadata:t,settings:o,name:n}=e;return(0,st.registerBlockType)({name:n,...t},o)}const St=window.wp.primitives;var Bt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 6L8.5 8.5L4.5 11L4.5 6Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 13L8.5 15.5L4.5 18L4.5 13Z",fill:"currentColor"})]});const{name:Tt}=Ct,Nt={icon:Bt,example:{innerBlocks:[{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,pt.__)("Lorem ipsum dolor sit amet, consectetur.")}}]},{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,pt.__)("Suspendisse commodo lacus, interdum et.")}}]}]},edit:function({attributes:{autoclose:e,iconPosition:t,showIcon:o,headingLevel:n,levelOptions:r},clientId:a,setAttributes:i,isSelected:s}){const l=(0,lt.useRegistry)(),{getBlockOrder:c}=(0,lt.useSelect)(ct.store),u=(0,ct.useBlockProps)({role:"group"}),d=vt(),{updateBlockAttributes:p,insertBlock:m}=(0,lt.useDispatch)(ct.store),g="contentOnly"===(0,ct.useBlockEditingMode)(),h=(0,ct.useInnerBlocksProps)(u,{template:[[kt]],defaultBlock:wt,directInsert:!0,templateInsertUpdatesSelection:!0});return(0,it.jsxs)(it.Fragment,{children:[s&&!g&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>{const t=c(a),o=[];t.forEach((e=>{const t=c(e);o.push(...t)})),l.batch((()=>{i({headingLevel:e}),p(o,{level:e})}))}})})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>{const e=(0,st.createBlock)(kt,{},[(0,st.createBlock)("core/accordion-heading",{level:n}),(0,st.createBlock)("core/accordion-panel",{})]);m(e,void 0,a)},children:(0,pt.__)("Add")})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({autoclose:!1,showIcon:!0,iconPosition:"right"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Auto-close"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>i({autoclose:!1}),children:(0,it.jsx)(mt.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Auto-close"),onChange:e=>{i({autoclose:e})},checked:e,help:(0,pt.__)("Automatically close accordions when a new one is opened.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show icon"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>i({showIcon:!0}),children:(0,it.jsx)(mt.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show icon"),onChange:e=>{i({showIcon:e,iconPosition:e?t:"right"})},checked:o,help:(0,pt.__)("Display a plus icon next to the accordion header.")})}),o&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Icon Position"),isShownByDefault:!0,hasValue:()=>"right"!==t,onDeselect:()=>i({iconPosition:"right"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,pt.__)("Icon Position"),value:t,onChange:e=>{i({iconPosition:e})},children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{label:(0,pt.__)("Left"),value:"left"}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{label:(0,pt.__)("Right"),value:"right"})]})})]})},"setting"),(0,it.jsx)("div",{...h})]})},save:function(){const e=ct.useBlockProps.save({role:"group"});return(0,it.jsx)("div",{...ct.useInnerBlocksProps.save(e)})}},Pt=()=>jt({name:Tt,metadata:Ct,settings:Nt});function It(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=It(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}const Dt=function(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=It(e))&&(n&&(n+=" "),n+=t);return n};const Mt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-item","title":"Accordion Item","category":"design","description":"Wraps the heading and panel in one unit.","parent":["core/accordion"],"allowedBlocks":["core/accordion-heading","core/accordion-panel"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"margin":["top","bottom"],"blockGap":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"shadow":true,"layout":{"allowEditing":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"openByDefault":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-item"}');var zt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z",fill:"currentColor"})]});const{name:At}=Mt,Lt={icon:zt,edit:function({attributes:e,clientId:t,setAttributes:o,context:n}){const{openByDefault:r}=e,a=vt(),{isSelected:i,getBlockOrder:s}=(0,lt.useSelect)((e=>{const{isBlockSelected:o,hasSelectedInnerBlock:n,getBlockOrder:r}=e(ct.store);return{isSelected:o(t)||n(t,!0),getBlockOrder:r}}),[t]),l=s(t)[1],{updateBlockAttributes:c,__unstableMarkNextChangeAsNotPersistent:u}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{l&&(u(),c(l,{isSelected:i}))}),[i,l,u,c]);const d=(0,ct.useBlockProps)({className:Dt({"is-open":r||i})}),p=n&&n["core/accordion-heading-level"],m=(0,ct.useInnerBlocksProps)(d,{template:[["core/accordion-heading",p?{level:p}:{}],["core/accordion-panel",{openByDefault:r}]],templateLock:"all",directInsert:!0,templateInsertUpdatesSelection:!0});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({openByDefault:!1}),l&&c(l,{openByDefault:!1})},dropdownMenuProps:a,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open by default"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>{o({openByDefault:!1}),l&&c(l,{openByDefault:!1})},children:(0,it.jsx)(mt.ToggleControl,{label:(0,pt.__)("Open by default"),__nextHasNoMarginBottom:!0,onChange:e=>{o({openByDefault:e}),l&&c(l,{openByDefault:e})},checked:r,help:(0,pt.__)("Accordion content will be displayed by default.")})})})},"setting"),(0,it.jsx)("div",{...m})]})},save:function({attributes:e}){const{openByDefault:t}=e,o=ct.useBlockProps.save({className:Dt({"is-open":t})}),n=ct.useInnerBlocksProps.save(o);return(0,it.jsx)("div",{...n})}},Ht=()=>jt({name:At,metadata:Mt,settings:Lt});const Rt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"blockVisibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');var Vt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z",fill:"currentColor"})]});const Ft={attributes:{openByDefault:{type:"boolean",default:!1},title:{type:"rich-text",source:"rich-text",selector:".wp-block-accordion-heading__toggle-title",role:"content"},level:{type:"number"},iconPosition:{type:"string",enum:["left","right"],default:"right"},showIcon:{type:"boolean",default:!0}},supports:{anchor:!0,color:{background:!0,gradients:!0},align:!1,interactivity:!0,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0},__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-accordion-heading__toggle"},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontFamily:!0}},shadow:!0,blockVisibility:!1},save({attributes:e}){const{level:t,title:o,iconPosition:n,showIcon:r}=e,a="h"+(t||3),i=ct.useBlockProps.save(),s=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(a,{...i,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:s.style,children:[r&&"left"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:o}),r&&"right"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}};var Et=[Ft];const{name:Ot}=Rt,Gt={icon:Vt,edit:function({attributes:e,setAttributes:t,context:o}){const{title:n}=e,{"core/accordion-icon-position":r,"core/accordion-show-icon":a,"core/accordion-heading-level":i}=o,s="h"+i;(0,gt.useEffect)((()=>{void 0!==r&&void 0!==a&&t({iconPosition:r,showIcon:a})}),[r,a,t]);const[l,c]=(0,ct.useSettings)("typography.fluid","layout"),u=(0,ct.getTypographyClassesAndStyles)(e,{typography:{fluid:l},layout:{wideSize:c?.wideSize}}),d=(0,ct.useBlockProps)(),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(s,{...d,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:p.style,tabIndex:"-1",children:[a&&"left"===r&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText,{withoutInteractiveFormatting:!0,disableLineBreaks:!0,tagName:"span",value:n,onChange:e=>t({title:e}),placeholder:(0,pt.__)("Accordion title"),className:"wp-block-accordion-heading__toggle-title",style:{letterSpacing:u.style.letterSpacing,textDecoration:u.style.textDecoration}}),a&&"right"===r&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})},save:function({attributes:e}){const{level:t,title:o,iconPosition:n,showIcon:r}=e,a="h"+(t||3),i=(0,ct.getTypographyClassesAndStyles)(e),s=ct.useBlockProps.save(),l=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(a,{...s,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:l.style,children:[r&&"left"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:o,style:{letterSpacing:i.style.letterSpacing,textDecoration:i.style.textDecoration}}),r&&"right"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})},deprecated:Et},$t=()=>jt({name:Ot,metadata:Rt,settings:Gt});const Ut=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-panel","title":"Accordion Panel","category":"design","description":"Contains the hidden or revealed content beneath the heading.","parent":["core/accordion-item"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":{"allowEditing":false},"blockVisibility":false,"contentRole":true,"allowedBlocks":true,"lock":false},"attributes":{"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-panel"}');var qt=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",fill:"currentColor"})});const{name:Wt}=Ut,Zt={icon:qt,edit:function({attributes:e}){const{allowedBlocks:t,templateLock:o,openByDefault:n,isSelected:r}=e,a=(0,ct.useBlockProps)({"aria-hidden":!r&&!n,role:"region"}),i=(0,ct.useInnerBlocksProps)(a,{allowedBlocks:t,template:[["core/paragraph",{}]],templateLock:o});return(0,it.jsx)("div",{...i})},save:function(){const e=ct.useBlockProps.save({role:"region"}),t=ct.useInnerBlocksProps.save(e);return(0,it.jsx)("div",{...t})}},Jt=()=>jt({name:Wt,metadata:Ut,settings:Zt});var Qt=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})});const Kt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/archives","title":"Archives","category":"widgets","description":"Display a date archive of your posts.","textdomain":"default","attributes":{"displayAsDropdown":{"type":"boolean","default":false},"showLabel":{"type":"boolean","default":true},"showPostCounts":{"type":"boolean","default":false},"type":{"type":"string","default":"monthly"}},"supports":{"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-archives-editor"}');const{name:Yt}=Kt,Xt={icon:Qt,example:{},edit:function({attributes:e,setAttributes:t}){const{showLabel:o,showPostCounts:n,displayAsDropdown:r,type:a}=e,i=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsDropdown:!1,showLabel:!0,showPostCounts:!1,type:"monthly"})},dropdownMenuProps:i,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display as dropdown"),isShownByDefault:!0,hasValue:()=>r,onDeselect:()=>t({displayAsDropdown:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as dropdown"),checked:r,onChange:()=>t({displayAsDropdown:!r})})}),r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show label"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>t({showLabel:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show label"),checked:o,onChange:()=>t({showLabel:!o})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show post counts"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>t({showPostCounts:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post counts"),checked:n,onChange:()=>t({showPostCounts:!n})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Group by"),isShownByDefault:!0,hasValue:()=>"monthly"!==a,onDeselect:()=>t({type:"monthly"}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Group by"),options:[{label:(0,pt.__)("Year"),value:"yearly"},{label:(0,pt.__)("Month"),value:"monthly"},{label:(0,pt.__)("Week"),value:"weekly"},{label:(0,pt.__)("Day"),value:"daily"}],value:a,onChange:e=>t({type:e})})})]})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e})})})]})}},eo=()=>jt({name:Yt,metadata:Kt,settings:Xt});var to=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const oo=JSON.parse('{"$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":false},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postType","postId","commentId"],"supports":{"html":false,"align":true,"alignWide":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"radius":true,"width":true,"color":true,"style":true,"__experimentalDefaultControls":{"radius":true}},"color":{"text":false,"background":false},"filter":{"duotone":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-avatar img","filter":{"duotone":".wp-block-avatar img"}},"editorStyle":"wp-block-avatar-editor","style":"wp-block-avatar"}'),no=window.wp.url;function ro(e){const t=e?e[0]:24,o=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*o)}}const ao=window.wp.htmlEntities,io={who:"authors",per_page:100,_fields:"id,name",context:"view"};function so({value:e,onChange:t}){const[o,n]=(0,gt.useState)(""),{authors:r,isLoading:a}=(0,lt.useSelect)((e=>{const{getUsers:t,isResolving:n}=e(_t.store),r={...io};return o&&(r.search=o,r.search_columns=["name"]),{authors:t(r),isLoading:n("getUsers",[r])}}),[o]),i=(0,gt.useMemo)((()=>(r??[]).map((e=>({value:e.id,label:(0,ao.decodeEntities)(e.name)})))),[r]);return(0,it.jsx)(mt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("User"),help:(0,pt.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:i,onFilterValueChange:(0,xt.debounce)(n,300),isLoading:a})}const lo=({setAttributes:e,avatar:t,attributes:o,selectUser:n})=>{const r=vt();return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({size:96,isLink:!1,linkTarget:"_self",userId:void 0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Image size"),isShownByDefault:!0,hasValue:()=>96!==o?.size,onDeselect:()=>e({size:96}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:o?.size,value:o?.size})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to user profile"),isShownByDefault:!0,hasValue:()=>o?.isLink,onDeselect:()=>e({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to user profile"),onChange:()=>e({isLink:!o.isLink}),checked:o.isLink})}),o.isLink&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==o?.linkTarget,onDeselect:()=>e({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===o.linkTarget})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("User"),isShownByDefault:!0,hasValue:()=>!!o?.userId,onDeselect:()=>e({userId:void 0}),children:(0,it.jsx)(so,{value:o?.userId,onChange:t=>{e({userId:t})}})})]})})},co=({setAttributes:e,attributes:t,avatar:o,blockProps:n,isSelected:r})=>{const a=(0,ct.__experimentalUseBorderProps)(t),i=(0,no.addQueryArgs)((0,no.removeQueryArgs)(o?.src,["s"]),{s:2*t?.size});return(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.ResizableBox,{size:{width:t.size,height:t.size},showHandle:r,onResizeStop:(o,n,r,a)=>{e({size:parseInt(t.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,pt.isRTL)(),bottom:!0,left:(0,pt.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize,children:(0,it.jsx)("img",{src:i,alt:o.alt,className:Dt("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",a.className),style:a.style})})})},uo=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{commentId:r}=t,a=(0,ct.useBlockProps)(),i=function({commentId:e}){const[t]=(0,_t.useEntityProp)("root","comment","author_avatar_urls",e),[o]=(0,_t.useEntityProp)("root","comment","author_name",e),n=t?Object.values(t):null,r=t?Object.keys(t):null,{minSize:a,maxSize:i}=ro(r),s=yt();return{src:n?n[n.length-1]:s,minSize:a,maxSize:i,alt:o?(0,pt.sprintf)((0,pt.__)("%s Avatar"),o):(0,pt.__)("Default Avatar")}}({commentId:r});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lo,{avatar:i,setAttributes:o,attributes:e,selectUser:!1}),e.isLink?(0,it.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:a,isSelected:n,setAttributes:o})}):(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:a,isSelected:n,setAttributes:o})]})},po=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{postId:r,postType:a}=t,i=function({userId:e,postId:t,postType:o}){const{authorDetails:n}=(0,lt.useSelect)((n=>{const{getEditedEntityRecord:r,getUser:a}=n(_t.store);if(e)return{authorDetails:a(e)};const i=r("postType",o,t)?.author;return{authorDetails:i?a(i):null}}),[o,t,e]),r=n?.avatar_urls?Object.values(n.avatar_urls):null,a=n?.avatar_urls?Object.keys(n.avatar_urls):null,{minSize:i,maxSize:s}=ro(a),l=yt();return{src:r?r[r.length-1]:l,minSize:i,maxSize:s,alt:n?(0,pt.sprintf)((0,pt.__)("%s Avatar"),n?.name):(0,pt.__)("Default Avatar")}}({userId:e?.userId,postId:r,postType:a}),s=(0,ct.useBlockProps)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lo,{selectUser:!0,attributes:e,avatar:i,setAttributes:o}),e.isLink?(0,it.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})}):(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})]})};const{name:mo}=oo,go={icon:to,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,it.jsx)(uo,{...e}):(0,it.jsx)(po,{...e})},example:{}},ho=()=>jt({name:mo,metadata:oo,settings:go});var _o=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})}),xo=[{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:o,loop:n,preload:r,src:a}=e;return(0,it.jsxs)("figure",{children:[(0,it.jsx)("audio",{controls:"controls",src:a,autoPlay:t,loop:n,preload:r}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}}];const bo=window.wp.notices;function fo(e,t){var o,n,r=0;function a(){var a,i,s=o,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<l;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==o&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=o,s.prev=null,o.prev=s,o=s),s.val}s=s.next}for(a=new Array(l),i=0;i<l;i++)a[i]=arguments[i];return s={args:a,val:e.apply(null,a)},o?(o.prev=s,s.next=o):n=s,r===t.maxSize?(n=n.prev).next=null:r++,o=s,s.val}return t=t||{},a.clear=function(){o=null,n=null,r=0},a}const yo=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/embed","title":"Embed","category":"embed","description":"Add a block that displays content pulled from other sites, like Twitter or YouTube.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"type":{"type":"string","role":"content"},"providerNameSlug":{"type":"string","role":"content"},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false,"role":"content"},"previewable":{"type":"boolean","default":true,"role":"content"}},"supports":{"align":true,"spacing":{"margin":true},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-embed-editor","style":"wp-block-embed"}'),vo=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],ko="wp-embed",wo=window.wp.privateApis,{lock:Co,unlock:jo}=(0,wo.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-library"),{name:So}=yo,{kebabCase:Bo}=jo(mt.privateApis),To=e=>e&&e.includes('class="wp-embedded-content"'),No=(e,t={})=>{const{preview:o,attributes:n={}}=e,{url:r,providerNameSlug:a,type:i,...s}=n;if(!r||!(0,st.getBlockType)(So))return;const l=(e=>(0,st.getBlockVariations)(So)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(r),c="wordpress"===a||i===ko;if(!c&&l&&(l.attributes.providerNameSlug!==a||!a))return(0,st.createBlock)(So,{url:r,...s,...l.attributes});const u=(0,st.getBlockVariations)(So)?.find((({name:e})=>"wordpress"===e));return u&&o&&To(o.html)&&!c?(0,st.createBlock)(So,{url:r,...u.attributes,...t}):void 0},Po=e=>{if(!e)return e;const t=vo.reduce(((e,{className:t})=>(e.push(t),e)),["wp-has-aspect-ratio"]);let o=e;for(const e of t)o=o.replace(e,"");return o.trim()};function Io(e,t,o=!0){if(!o)return Po(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=n.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let o=0;o<vo.length;o++){const n=vo[o];if(e>=n.ratio){return e-n.ratio>.1?Po(t):Dt(Po(t),n.className,"wp-has-aspect-ratio")}}}return t}const Do=fo(((e,t,o,n,r=!0)=>{if(!e)return{};const a={};let{type:i="rich"}=e;const{html:s,provider_name:l}=e,c=Bo((l||t).toLowerCase());return To(s)&&(i=ko),(s||"photo"===i)&&(a.type=i,a.providerNameSlug=c),(u=o)&&vo.some((({className:e})=>u.includes(e)))||(a.className=Io(s,o,n&&r)),a;var u}));var Mo=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});function zo({attributeKey:e="caption",attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:r,placeholder:a=(0,pt.__)("Add caption"),label:i=(0,pt.__)("Caption text"),showToolbarButton:s=!0,excludeElementClassName:l,className:c,readOnly:u,tagName:d="figcaption",addLabel:p=(0,pt.__)("Add caption"),removeLabel:m=(0,pt.__)("Remove caption"),icon:g=Mo,...h}){const _=t[e],x=(0,xt.usePrevious)(_),{PrivateRichText:b}=jo(ct.privateApis),f=b.isEmpty(_),y=b.isEmpty(x),[v,k]=(0,gt.useState)(!f);(0,gt.useEffect)((()=>{!f&&y&&k(!0)}),[f,y]),(0,gt.useEffect)((()=>{!n&&f&&k(!1)}),[n,f]);const w=(0,gt.useCallback)((e=>{e&&f&&e.focus()}),[f]);return(0,it.jsxs)(it.Fragment,{children:[s&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>{k(!v),v&&_&&o({[e]:void 0})},icon:g,isPressed:v,label:v?m:p})}),v&&(!b.isEmpty(_)||n)&&(0,it.jsx)(b,{identifier:e,tagName:d,className:Dt(c,l?"":(0,ct.__experimentalGetElementClassName)("caption")),ref:w,"aria-label":i,placeholder:a,value:_,onChange:t=>o({[e]:t}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)())),readOnly:u,...h})]})}const Ao=["audio"];var Lo=function({attributes:e,className:t,setAttributes:o,onReplace:n,isSelected:r,insertBlocksAfter:a}){const{id:i,autoplay:s,loop:l,preload:c,src:u}=e,[d,p]=(0,gt.useState)(e.blob),m="default"===(0,ct.useBlockEditingMode)();function g(e){return t=>{o({[e]:t})}}function h(e){if(e!==u){const t=No({attributes:{url:e}});if(void 0!==t&&n)return void n(t);o({src:e,id:void 0,blob:void 0}),p()}}ft({url:d,allowedTypes:Ao,onChange:b,onError:x});const{createErrorNotice:_}=(0,lt.useDispatch)(bo.store);function x(e){_(e,{type:"snackbar"})}function b(e){if(!e||!e.url)return o({src:void 0,id:void 0,caption:void 0,blob:void 0}),void p();(0,ht.isBlobURL)(e.url)?p(e.url):(o({blob:void 0,src:e.url,id:e.id,caption:e.caption}),p())}const f=Dt(t,{"is-transient":!!d}),y=(0,ct.useBlockProps)({className:f}),v=vt();return u||d?(0,it.jsxs)(it.Fragment,{children:[r&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:i,mediaURL:u,allowedTypes:Ao,accept:"audio/*",onSelect:b,onSelectURL:h,onError:x,onReset:()=>b(void 0)})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({autoplay:!1,loop:!1,preload:void 0})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({autoplay:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Autoplay"),onChange:g("autoplay"),checked:!!s,help:function(e){return e?(0,pt.__)("Autoplay may cause usability issues for some users."):null}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!l,onDeselect:()=>o({loop:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Loop"),onChange:g("loop"),checked:!!l})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Preload"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>o({preload:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt._x)("Preload","noun; Audio block parameter"),value:c||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,pt.__)("Browser default")},{value:"auto",label:(0,pt.__)("Auto")},{value:"metadata",label:(0,pt.__)("Metadata")},{value:"none",label:(0,pt._x)("None","Preload value")}]})})]})}),(0,it.jsxs)("figure",{...y,children:[(0,it.jsx)(mt.Disabled,{isDisabled:!r,children:(0,it.jsx)("audio",{controls:"controls",src:u??d})}),!!d&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(zo,{attributes:e,setAttributes:o,isSelected:r,insertBlocksAfter:a,label:(0,pt.__)("Audio caption text"),showToolbarButton:r&&m})]})]}):(0,it.jsx)("div",{...y,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:_o}),onSelect:b,onSelectURL:h,accept:"audio/*",allowedTypes:Ao,value:e,onError:x})})};const Ho=JSON.parse('{"$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":{"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"audio","attribute":"src","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"id":{"type":"number","role":"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":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-audio-editor","style":"wp-block-audio"}');var Ro={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,st.createBlock)("core/audio",{blob:(0,ht.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:o,ogg:n,wav:r,wma:a}})=>e||t||o||n||r||a},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]};const{name:Vo}=Ho,Fo={icon:_o,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:Ro,deprecated:xo,edit:Lo,save:function({attributes:e}){const{autoplay:t,caption:o,loop:n,preload:r,src:a}=e;return a&&(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsx)("audio",{controls:"controls",src:a,autoPlay:t,loop:n,preload:r}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o,className:(0,ct.__experimentalGetElementClassName)("caption")})]})}},Eo=()=>jt({name:Vo,metadata:Ho,settings:Fo});var Oo=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z"})});const Go=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/breadcrumbs","title":"Breadcrumbs","__experimental":true,"category":"theme","description":"Display a breadcrumb trail for hierarchical post types or based on taxonomy terms.","textdomain":"default","attributes":{"type":{"type":"string","default":"auto","enum":["auto","postWithTerms","postWithAncestors"]},"separator":{"type":"string","default":"/"},"showHomeLink":{"type":"boolean","default":true}},"usesContext":["postId","postType","templateSlug"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":true,"width":true,"style":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-breadcrumbs"}'),$o="/",Uo="auto",qo={auto:{help:(0,pt.__)("Try to automatically determine the best type of breadcrumb for the template.")},postWithAncestors:{help:(0,pt.__)("Shows breadcrumbs based on post hierarchy. Only works for hierarchical post types."),placeholderItems:[(0,pt.__)("Ancestor"),(0,pt.__)("Parent")]},postWithTerms:{help:(0,pt.__)("Shows breadcrumbs based on taxonomy terms. Chooses the first taxonomy with assigned terms and includes ancestors if the taxonomy is hierarchical."),placeholderItems:[(0,pt.__)("Category")]}};const{name:Wo}=Go,Zo={icon:Oo,edit:function({attributes:e,setAttributes:t,context:{postId:o,postType:n,templateSlug:r}}){const{separator:a,showHomeLink:i,type:s}=e,{post:l,isPostTypeHierarchical:c,hasTermsAssigned:u,isLoading:d}=(0,lt.useSelect)((e=>{if(!n)return{};const t=e(_t.store).getEntityRecord("postType",n,o),r=e(_t.store).getPostType(n),a=r&&r.taxonomies.length;let i;return a&&(i=e(_t.store).getTaxonomies({type:n,per_page:-1})),{post:t,isPostTypeHierarchical:r?.hierarchical,hasTermsAssigned:t&&(i||[]).filter((({visibility:e})=>e?.publicly_queryable)).some((e=>!!t[e.rest_base]?.length)),isLoading:!t||!r||a&&!i}}),[n,o]),[p,m]=(0,gt.useState)(0);(0,gt.useEffect)((()=>{m((e=>e+1))}),[l]);const g=(0,ct.useBlockProps)(),h=vt(),{content:_}=(0,ut.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:"core/breadcrumbs",urlQueryArgs:{post_id:o,invalidationKey:p}});if(d)return(0,it.jsx)("div",{...g,children:(0,it.jsx)(mt.Spinner,{})});let x;const b=["postWithAncestors","postWithTerms"].includes(s);x=b?s:c?"postWithAncestors":"postWithTerms";let f=null;const y=!o||!n||r&&!n||"postWithAncestors"===x&&!c||"postWithTerms"===x&&!u;if(y){const e=[i&&(0,pt.__)("Home"),...r&&!b?[(0,pt.__)("Page")]:qo[x].placeholderItems].filter(Boolean);f=(0,it.jsx)("nav",{style:{"--separator":`'${a}'`},inert:"true",children:(0,it.jsxs)("ol",{children:[e.map(((e,t)=>(0,it.jsx)("li",{children:(0,it.jsx)("a",{href:`#breadcrumbs-pseudo-link-${t}`,children:e})},t))),(0,it.jsx)("li",{children:(0,it.jsx)("span",{"aria-current":"page",children:(0,pt.__)("Current")})})]})})}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({separator:$o,showHomeLink:!0,type:Uo})},dropdownMenuProps:h,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Type"),isShownByDefault:!0,hasValue:()=>s!==Uo,onDeselect:()=>t({type:Uo}),children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Type"),value:s,onChange:e=>t({type:e}),options:[{label:(0,pt.__)("Auto"),value:"auto"},{label:(0,pt.__)("Post with ancestors"),value:"postWithAncestors"},{label:(0,pt.__)("Post with terms"),value:"postWithTerms"}],help:qo[s].help})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show home link"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>t({showHomeLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show home link"),onChange:e=>t({showHomeLink:e}),checked:i})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Separator"),isShownByDefault:!0,hasValue:()=>a!==$o,onDeselect:()=>t({separator:$o}),children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:a,onChange:e=>t({separator:e}),onBlur:()=>{a||t({separator:$o})}})})]})}),(0,it.jsx)("div",{...g,children:y?f:(0,it.jsx)(gt.RawHTML,{inert:"true",children:_})})]})}},Jo=()=>jt({name:Wo,metadata:Go,settings:Zo});var Qo=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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:Ko}=jo(ct.privateApis);function Yo(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...o}=e.style.typography;return{...e,style:Ko({...e.style,typography:o}),fontFamily:t.split("|").pop()}}const Xo=e=>{const{borderRadius:t,...o}=e,n=[t,o.style?.border?.radius].find((e=>"number"==typeof e&&0!==e));return n?{...o,style:{...o.style,border:{...o.style?.border,radius:`${n}px`}}}:o};const en=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:o,customBackgroundColor:n,customGradient:r,...a}=e;return{...a,style:t}},tn=e=>{const{color:t,textColor:o,...n}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return en(n)},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"}},nn={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"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},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,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!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__link",interactivity:{clientNavigation:!0}},save({attributes:e,className:t}){const{tagName:o,type:n,textAlign:r,fontSize:a,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",_=(0,ct.__experimentalGetBorderClassesAndStyles)(e),x=(0,ct.__experimentalGetColorClassesAndStyles)(e),b=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=Dt("wp-block-button__link",x.className,_.className,{[`has-text-align-${r}`]:r,"no-border-radius":0===l?.border?.radius},(0,ct.__experimentalGetElementClassName)("button")),v={..._.style,...x.style,...b.style,...f.style},k=Dt(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":a||l?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:k}),children:(0,it.jsx)(ct.RichText.Content,{tagName:m,type:g?h:null,className:y,href:g?null:d,title:u,style:v,value:c,target:g?null:i,rel:g?null:s})})}},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:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,ct.__experimentalGetBorderClassesAndStyles)(e),d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),m=Dt("wp-block-button__link",d.className,u.className,{"no-border-radius":0===a?.border?.radius}),g={...u.style,...d.style,...p.style},h=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:h}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:r})})}},an={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:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,ct.__experimentalGetBorderClassesAndStyles)(e),d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),m=Dt("wp-block-button__link",d.className,u.className,{"no-border-radius":0===a?.border?.radius}),g={...u.style,...d.style,...p.style},h=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:h}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:r})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily},sn=[nn,rn,an,{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})=>"number"==typeof e?.border?.radius,save({attributes:e,className:t}){const{fontSize:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=a?.border?.radius,d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=Dt("wp-block-button__link",d.className,{"no-border-radius":0===a?.border?.radius}),m={borderRadius:u||void 0,...d.style},g=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:g}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:p,href:l,title:s,style:m,value:i,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{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:o,linkTarget:n,rel:r,text:a,title:i,url:s,width:l}=e,c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u=Dt("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=Dt(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:p}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{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:o,linkTarget:n,rel:r,text:a,title:i,url:s,width:l}=e,c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u=Dt("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=Dt(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:p}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{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:o,rel:n,text:r,title:a,url:i}=e,s=Dt("wp-block-button__link",{"no-border-radius":0===t}),l={borderRadius:t?t+"px":void 0};return(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:s,href:i,title:a,style:l,value:r,target:o,rel:n})},migrate:Xo},{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,xt.compose)(Xo,en,(function(e){if(!e.align)return e;const{align:t,...o}=e;return{...o,className:Dt(o.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:o,customBackgroundColor:n,customTextColor:r,customGradient:a,linkTarget:i,gradient:s,rel:l,text:c,textColor:u,title:d,url:p}=e,m=(0,ct.getColorClassName)("color",u),g=!a&&(0,ct.getColorClassName)("background-color",t),h=(0,ct.__experimentalGetGradientClass)(s),_=Dt("wp-block-button__link",{"has-text-color":u||r,[m]:m,"has-background":t||n||a||s,[g]:g,"no-border-radius":0===o,[h]:h}),x={background:a||void 0,backgroundColor:g||a||s?void 0:n,color:m?void 0:r,borderRadius:o?o+"px":void 0};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:_,href:p,title:d,style:x,value:c,target:i,rel:l})})}},{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=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Xo(en({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,customTextColor:n,linkTarget:r,rel:a,text:i,textColor:s,title:l,url:c}=e,u=(0,ct.getColorClassName)("color",s),d=(0,ct.getColorClassName)("background-color",t),p=Dt("wp-block-button__link",{"has-text-color":s||n,[u]:u,"has-background":t||o,[d]:d}),m={backgroundColor:d?void 0:o,color:u?void 0:n};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:p,href:c,title:l,style:m,value:i,target:r,rel:a})})}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:tn,save({attributes:e}){const{url:t,text:o,title:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s}=e,l=(0,ct.getColorClassName)("color",a),c=(0,ct.getColorClassName)("background-color",r),u=Dt("wp-block-button__link",{"has-text-color":a||s,[l]:l,"has-background":r||i,[c]:c}),d={backgroundColor:c?void 0:i,color:l?void 0:s};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:t,title:n,style:d,value:o})})}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:r,color:a,textColor:i}=e,s={backgroundColor:a,color:i};return(0,it.jsx)("div",{className:`align${r}`,children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:n,style:s,value:o})})},migrate:tn},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:r,color:a,textColor:i}=e;return(0,it.jsx)("div",{className:`align${r}`,style:{backgroundColor:a},children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",href:t,title:n,style:{color:i},value:o})})},migrate:tn}];var ln=sn;const cn="noreferrer noopener",un="_blank",dn="nofollow";function pn(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}const mn=window.wp.keycodes;var gn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),hn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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{HTMLElementControl:_n}=jo(ct.privateApis),xn=[...ct.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,pt.__)("Mark as nofollow")}];function bn({selectedWidth:e,setAttributes:t}){const o=vt();return(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>t({width:void 0}),dropdownMenuProps:o,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Width"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t({width:void 0}),__nextHasNoMarginBottom:!0,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{label:(0,pt.__)("Width"),value:e,onChange:e=>t({width:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[25,50,75,100].map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e,label:(0,pt.sprintf)((0,pt.__)("%d%%"),e)},e)))})})})}var fn=function(e){const{attributes:t,setAttributes:o,className:n,isSelected:r,onReplace:a,mergeBlocks:i,clientId:s,context:l}=e,{tagName:c,textAlign:u,linkTarget:d,placeholder:p,rel:m,style:g,text:h,url:_,width:x,metadata:b}=t,f=c||"a",[y,v]=(0,gt.useState)(null),k=(0,ct.__experimentalUseBorderProps)(t),w=(0,ct.__experimentalUseColorProps)(t),C=(0,ct.__experimentalGetSpacingClassesAndStyles)(t),j=(0,ct.__experimentalGetShadowClassesAndStyles)(t),S=(0,gt.useRef)(),B=(0,gt.useRef)(),T=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([v,S]),onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")?V(e):mn.isKeyboardEvent.primaryShift(e,"k")&&(F(),B.current?.focus())}}),N=(0,ct.useBlockEditingMode)(),[P,I]=(0,gt.useState)(!1),D=!!_,M=d===un,z=!!m?.includes(dn),A="a"===f,{createPageEntity:L,userCanCreatePages:H,lockUrlControls:R=!1}=(0,lt.useSelect)((e=>{if(!r)return{};const t=e(ct.store).getSettings(),o=(0,st.getBlockBindingsSource)(b?.bindings?.url?.source);return{createPageEntity:t.__experimentalCreatePageEntity,userCanCreatePages:t.__experimentalUserCanCreatePages,lockUrlControls:!!b?.bindings?.url&&!o?.canUserEditValue?.({select:e,context:l,args:b?.bindings?.url?.args})}}),[l,r,b?.bindings?.url]);function V(e){e.preventDefault(),I(!0)}function F(){o({url:void 0,linkTarget:void 0,rel:void 0}),I(!1)}(0,gt.useEffect)((()=>{r||I(!1)}),[r]);const E=(0,gt.useMemo)((()=>({url:_,opensInNewTab:M,nofollow:z})),[_,M,z]),O=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlock:n,getBlockRootClientId:r,getBlockIndex:a}=(0,lt.useSelect)(ct.store),i=(0,gt.useRef)(e);return i.current=e,(0,xt.useRefEffect)((e=>{function s(e){if(e.defaultPrevented||e.keyCode!==mn.ENTER)return;const{content:s,clientId:l}=i.current;if(s.length)return;e.preventDefault();const c=n(r(l)),u=a(l),d=(0,st.cloneBlock)({...c,innerBlocks:c.innerBlocks.slice(0,u)}),p=(0,st.createBlock)((0,st.getDefaultBlockName)()),m=c.innerBlocks.slice(u+1),g=m.length?[(0,st.cloneBlock)({...c,innerBlocks:m})]:[];t(c.clientId,[d,p,...g],1),o(p.clientId)}return e.addEventListener("keydown",s),()=>{e.removeEventListener("keydown",s)}}),[])}({content:h,clientId:s}),G=(0,xt.useMergeRefs)([O,B]),[$,U]=(0,ct.useSettings)("typography.fluid","layout"),q=(0,ct.getTypographyClassesAndStyles)(t,{typography:{fluid:$},layout:{wideSize:U?.wideSize}}),W="default"===N,Z=W||A&&!R;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{...T,className:Dt(T.className,{[`has-custom-width wp-block-button__width-${x}`]:x}),children:(0,it.jsx)(ct.RichText,{ref:G,"aria-label":(0,pt.__)("Button text"),placeholder:p||(0,pt.__)("Add text…"),value:h,onChange:e=>o({text:pn(e)}),withoutInteractiveFormatting:!0,className:Dt(n,"wp-block-button__link",w.className,k.className,q.className,{[`has-text-align-${u}`]:u,"no-border-radius":0===g?.border?.radius,"has-custom-font-size":T.style.fontSize},(0,ct.__experimentalGetElementClassName)("button")),style:{...k.style,...w.style,...C.style,...j.style,...q.style,writingMode:void 0},onReplace:a,onMerge:i,identifier:"text"})}),Z&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[W&&(0,it.jsx)(ct.AlignmentControl,{value:u,onChange:e=>{o({textAlign:e})}}),A&&!R&&(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:D?hn:gn,title:D?(0,pt.__)("Unlink"):(0,pt.__)("Link"),shortcut:D?mn.displayShortcut.primaryShift("k"):mn.displayShortcut.primary("k"),onClick:D?F:V,isActive:D})]}),A&&r&&(P||D)&&!R&&(0,it.jsx)(mt.Popover,{placement:"bottom",onClose:()=>{I(!1),B.current?.focus()},anchor:y,focusOnMount:!!P&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0,children:(0,it.jsx)(ct.LinkControl,{value:E,onChange:({url:e,opensInNewTab:t,nofollow:n})=>o(function({rel:e="",url:t="",opensInNewTab:o,nofollow:n}){let r,a=e;if(o)r=un,a=a?.includes(cn)?a:a+` ${cn}`;else{const e=new RegExp(`\\b${cn}\\s*`,"g");a=a?.replace(e,"").trim()}if(n)a=a?.includes(dn)?a:(a+` ${dn}`).trim();else{const e=new RegExp(`\\b${dn}\\s*`,"g");a=a?.replace(e,"").trim()}return{url:(0,no.prependHTTP)(t),linkTarget:r,rel:a||void 0}}({rel:m,url:e,opensInNewTab:t,nofollow:n})),onRemove:()=>{F(),B.current?.focus()},forceIsEditingLink:P,settings:xn,createSuggestion:L&&async function(e){const t=await L({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:H,createSuggestionButtonText:function(e){return(0,gt.createInterpolateElement)((0,pt.sprintf)((0,pt.__)("Create page: <mark>%s</mark>"),e),{mark:(0,it.jsx)("mark",{})})}})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(bn,{selectedWidth:x,setAttributes:o})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(_n,{tagName:c,onChange:e=>o({tagName:e}),options:[{label:(0,pt.__)("Default (<a>)"),value:"a"},{label:"<button>",value:"button"}]}),A&&(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m||"",onChange:e=>o({rel:e})})]})]})};const yn=JSON.parse('{"$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","role":"content"},"title":{"type":"string","source":"attribute","selector":"a,button","attribute":"title","role":"content"},"text":{"type":"rich-text","source":"rich-text","selector":"a,button","role":"content"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target","role":"content"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel","role":"content"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"splitting":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"__experimentalSkipSerialization":["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"shadow":{"__experimentalSkipSerialization":true},"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"wp-block-button-editor","style":"wp-block-button","selectors":{"root":".wp-block-button .wp-block-button__link","typography":{"writingMode":".wp-block-button"}}}');const{name:vn}=yn,kn={icon:Qo,example:{attributes:{className:"is-style-fill",text:(0,pt.__)("Call to action")}},edit:fn,save:function({attributes:e,className:t}){const{tagName:o,type:n,textAlign:r,fontSize:a,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",_=(0,ct.__experimentalGetBorderClassesAndStyles)(e),x=(0,ct.__experimentalGetColorClassesAndStyles)(e),b=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=(0,ct.getTypographyClassesAndStyles)(e),v=Dt("wp-block-button__link",x.className,_.className,y.className,{[`has-text-align-${r}`]:r,"no-border-radius":0===l?.border?.radius,"has-custom-font-size":a||l?.typography?.fontSize},(0,ct.__experimentalGetElementClassName)("button")),k={..._.style,...x.style,...b.style,...f.style,...y.style,writingMode:void 0},w=Dt(t,{[`has-custom-width wp-block-button__width-${p}`]:p});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:w}),children:(0,it.jsx)(ct.RichText.Content,{tagName:m,type:g?h:null,className:v,href:g?null:d,title:u,style:k,value:c,target:g?null:i,rel:g?null:s})})},deprecated:ln,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},wn=()=>jt({name:vn,metadata:yn,settings:kn});var Cn=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 jn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:o,...n}=e;return(t||o)&&Object.assign(n,{layout:{type:"flex",...t&&{justifyContent:t},...o&&{orientation:o}}}),n},Sn=[{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:jn,save:({attributes:{contentJustification:e,orientation:t}})=>(0,it.jsx)("div",{...ct.useBlockProps.save({className:Dt({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,it.jsx)("div",{children:(0,it.jsx)(ct.InnerBlocks.Content,{})}),isEligible:({align:e})=>e&&["center","left","right"].includes(e),migrate:e=>jn({...e,align:void 0,contentJustification:e.align})}];var Bn=Sn;const Tn=window.wp.richText;function Nn(e,t,o=null){if(!e)return;const n=(0,st.getBlockType)(t);if(!n)return;const r={};if((0,st.hasBlockSupport)(n,"allowedBlocks")&&e.allowedBlocks&&(r.allowedBlocks=e.allowedBlocks),(0,st.hasBlockSupport)(n,"anchor")&&e.anchor&&(r.anchor=e.anchor),(0,st.hasBlockSupport)(n,"ariaLabel")&&e.ariaLabel&&(r.ariaLabel=e.ariaLabel),e.metadata){const t=[];if(o&&t.push("id","bindings"),t.length>0){const n=Object.entries(e.metadata).reduce(((e,[n,r])=>t.includes(n)?(e[n]="bindings"===n?o(r):r,e):e),{});Object.keys(n).length>0&&(r.metadata=n)}}return 0!==Object.keys(r).length?r:void 0}const Pn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,st.createBlock)("core/buttons",{},e.map((e=>(0,st.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/buttons",{},e.map((e=>{const{content:t}=e,o=(0,Tn.__unstableCreateElement)(document,t),n=o.innerText||"",r=o.querySelector("a"),a=r?.getAttribute("href");return(0,st.createBlock)("core/button",{...e,...Nn(e,"core/button",(({content:e})=>({text:e}))),text:n,url:a})}))),isMatch:e=>e.every((e=>{const t=(0,Tn.__unstableCreateElement)(document,e.content),o=t.innerText||"",n=t.querySelectorAll("a");return o.length<=30&&n.length<=1}))}]};var In=Pn;const Dn={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Mn=function({attributes:e,className:t}){const{fontSize:o,layout:n,style:r}=e,a=(0,ct.useBlockProps)({className:Dt(t,{"has-custom-font-size":o||r?.typography?.fontSize})}),{hasButtonVariations:i}=(0,lt.useSelect)((e=>({hasButtonVariations:e(st.store).getBlockVariations("core/button","inserter").length>0})),[]),s=(0,ct.useInnerBlocksProps)(a,{defaultBlock:Dn,directInsert:!i,template:[["core/button"]],templateInsertUpdatesSelection:!0,orientation:n?.orientation??"horizontal"});return(0,it.jsx)("div",{...s})};const zn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/buttons","title":"Buttons","category":"design","allowedBlocks":["core/button"],"description":"Prompt visitors to take action with a group of button-style links.","keywords":["link"],"textdomain":"default","supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalExposeControlsToChildren":true,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"blockGap":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true},"contentRole":true},"editorStyle":"wp-block-buttons-editor","style":"wp-block-buttons"}');const{name:An}=zn,Ln={icon:Cn,example:{attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[{name:"core/button",attributes:{text:(0,pt.__)("Find out more")}},{name:"core/button",attributes:{text:(0,pt.__)("Contact us")}}]},deprecated:Bn,transforms:In,edit:Mn,save:function({attributes:e,className:t}){const{fontSize:o,style:n}=e,r=ct.useBlockProps.save({className:Dt(t,{"has-custom-font-size":o||n?.typography?.fontSize})}),a=ct.useInnerBlocksProps.save(r);return(0,it.jsx)("div",{...a})}},Hn=()=>jt({name:An,metadata:zn,settings:Ln});var Rn=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 Vn=JSON.parse('{"$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":true,"html":false,"color":{"link":true,"__experimentalSkipSerialization":["text","background"],"__experimentalDefaultControls":{"background":true,"text":true},"__experimentalSelector":"table, th"},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-calendar"}'),Fn=fo((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var En={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,st.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,st.createBlock)("core/archives")}]};const{name:On}=Vn,Gn={icon:Rn,example:{},edit:function({attributes:e}){const t=(0,ct.useBlockProps)(),{date:o,hasPosts:n,hasPostsResolved:r}=(0,lt.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:o}=e(_t.store),n={status:"publish",per_page:1},r=t("postType","post",n),a=o("getEntityRecords",["postType","post",n]);let i;const s=e("core/editor");if(s){"post"===s.getEditedPostAttribute("type")&&(i=s.getEditedPostAttribute("date"))}return{date:i,hasPostsResolved:a,hasPosts:a&&1===r?.length}}),[]);return n?(0,it.jsx)("div",{...t,children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/calendar",attributes:{...e,...Fn(o)}})})}):(0,it.jsx)("div",{...t,children:(0,it.jsx)(mt.Placeholder,{icon:Rn,label:(0,pt.__)("Calendar"),children:r?(0,pt.__)("No published posts found."):(0,it.jsx)(mt.Spinner,{})})})},transforms:En},$n=()=>jt({name:On,metadata:Vn,settings:Gn});var Un=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const qn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/categories","title":"Terms List","category":"widgets","description":"Display a list of all terms of a given taxonomy.","keywords":["categories"],"textdomain":"default","attributes":{"taxonomy":{"type":"string","default":"category"},"displayAsDropdown":{"type":"boolean","default":false},"showHierarchy":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false},"showOnlyTopLevel":{"type":"boolean","default":false},"showEmpty":{"type":"boolean","default":false},"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true}},"usesContext":["enhancedPagination"],"supports":{"align":true,"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-categories-editor","style":"wp-block-categories"}');var Wn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 Zn=[{name:"terms",title:(0,pt.__)("Terms List"),icon:Un,attributes:{taxonomy:"post_tag"},isActive:e=>"category"!==e.taxonomy},{name:"categories",title:(0,pt.__)("Categories List"),description:(0,pt.__)("Display a list of all categories."),icon:Un,attributes:{taxonomy:"category"},isActive:["taxonomy"],isDefault:!0}];var Jn=Zn;const{name:Qn}=qn,Kn={icon:Un,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:o,showPostCounts:n,showOnlyTopLevel:r,showEmpty:a,label:i,showLabel:s,taxonomy:l},setAttributes:c,className:u,clientId:d}){const p=(0,xt.useInstanceId)(e,"blocks-category-select"),{records:m,isResolvingTaxonomies:g}=(0,_t.useEntityRecords)("root","taxonomy",{per_page:-1}),h=m?.filter((e=>e.visibility.public)),_=h?.find((e=>e.slug===l)),x=!g&&_?.hierarchical,b={per_page:-1,hide_empty:!a,context:"view"};x&&r&&(b.parent=0);const{records:f,isResolving:y}=(0,_t.useEntityRecords)("taxonomy",l,b),{createWarningNotice:v}=(0,lt.useDispatch)(bo.store),k=e=>{e.preventDefault(),v((0,pt.__)("Links are disabled in the editor."),{id:`block-library/core/categories/redirection-prevented/${d}`,type:"snackbar"})},w=e=>f?.length?null===e?f:f.filter((({parent:t})=>t===e)):[],C=e=>t=>c({[e]:t}),j=e=>e?(0,ao.decodeEntities)(e).trim():(0,pt.__)("(Untitled)"),S=e=>{const t=w(e.id),{id:r,link:a,count:i,name:s}=e;return(0,it.jsxs)("li",{className:`cat-item cat-item-${r}`,children:[(0,it.jsx)("a",{href:a,onClick:k,children:j(s)}),n&&` (${i})`,x&&o&&!!t.length&&(0,it.jsx)("ul",{className:"children",children:t.map((e=>S(e)))})]},r)},B=(e,t)=>{const{id:r,count:a,name:i}=e,s=w(r);return[(0,it.jsxs)("option",{className:`level-${t}`,children:[Array.from({length:3*t}).map((()=>" ")),j(i),n&&` (${a})`]},r),x&&o&&!!s.length&&s.map((e=>B(e,t+1)))]},T=!f?.length||t||y?"div":"ul",N=Dt(u,{"wp-block-categories-list":!!f?.length&&!t&&!y,"wp-block-categories-dropdown":!!f?.length&&t&&!y}),P=(0,ct.useBlockProps)({className:N}),I=vt();return(0,it.jsxs)(T,{...P,children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{c({taxonomy:"category",displayAsDropdown:!1,showHierarchy:!1,showPostCounts:!1,showOnlyTopLevel:!1,showEmpty:!1,showLabel:!0})},dropdownMenuProps:I,children:[Array.isArray(h)&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"category"!==l,label:(0,pt.__)("Taxonomy"),onDeselect:()=>{c({taxonomy:"category"})},isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Taxonomy"),options:h.map((e=>({label:e.name,value:e.slug}))),value:l,onChange:e=>c({taxonomy:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,pt.__)("Display as dropdown"),onDeselect:()=>c({displayAsDropdown:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as dropdown"),checked:t,onChange:C("displayAsDropdown")})}),t&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!s,label:(0,pt.__)("Show label"),onDeselect:()=>c({showLabel:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,className:"wp-block-categories__indentation",label:(0,pt.__)("Show label"),checked:s,onChange:C("showLabel")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Show post counts"),onDeselect:()=>c({showPostCounts:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post counts"),checked:n,onChange:C("showPostCounts")})}),x&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,pt.__)("Show only top level terms"),onDeselect:()=>c({showOnlyTopLevel:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show only top level terms"),checked:r,onChange:C("showOnlyTopLevel")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,pt.__)("Show empty terms"),onDeselect:()=>c({showEmpty:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show empty terms"),checked:a,onChange:C("showEmpty")})}),x&&!r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,pt.__)("Show hierarchy"),onDeselect:()=>c({showHierarchy:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show hierarchy"),checked:o,onChange:C("showHierarchy")})})]})}),y&&(0,it.jsx)(mt.Placeholder,{icon:Wn,label:(0,pt.__)("Terms"),children:(0,it.jsx)(mt.Spinner,{})}),!y&&0===f?.length&&(0,it.jsx)("p",{children:_.labels.no_terms}),!y&&f?.length>0&&(t?(()=>{const e=w(x&&o?0:null);return(0,it.jsxs)(it.Fragment,{children:[s?(0,it.jsx)(ct.RichText,{className:"wp-block-categories__label","aria-label":(0,pt.__)("Label text"),placeholder:_?.name,withoutInteractiveFormatting:!0,value:i,onChange:e=>c({label:e})}):(0,it.jsx)(mt.VisuallyHidden,{as:"label",htmlFor:p,children:i||_?.name}),(0,it.jsxs)("select",{id:p,children:[(0,it.jsx)("option",{children:(0,pt.sprintf)((0,pt.__)("Select %s"),_?.labels?.singular_name)}),e.map((e=>B(e,0)))]})]})})():w(x&&o?0:null).map((e=>S(e))))]})},variations:Jn},Yn=()=>jt({name:Qn,metadata:qn,settings:Kn});var Xn=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 er=({clientId:e})=>{const{replaceBlocks:t}=(0,lt.useDispatch)(ct.store),o=(0,lt.useSelect)((t=>t(ct.store).getBlock(e)),[e]);return(0,it.jsx)(mt.ToolbarButton,{onClick:()=>t(o.clientId,(0,st.rawHandler)({HTML:(0,st.serialize)(o)})),children:(0,pt.__)("Convert to blocks")})},tr=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 or({onClick:e,isModalFullScreen:t}){return(0,xt.useViewportMatch)("small","<")?null:(0,it.jsx)(mt.Button,{size:"compact",onClick:e,icon:tr,isPressed:t,label:t?(0,pt.__)("Exit fullscreen"):(0,pt.__)("Enter fullscreen")})}function nr(e){const t=(0,lt.useSelect)((e=>e(ct.store).getSettings().styles));return(0,gt.useEffect)((()=>{const{baseURL:o,suffix:n,settings:r}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:o,suffix:n}),window.wp.oldEditor.initialize(e.id,{tinymce:{...r,setup(e){e.on("init",(()=>{const o=e.getDoc();t.forEach((({css:e})=>{const t=o.createElement("style");t.innerHTML=e,o.head.appendChild(t)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,it.jsx)("textarea",{...e})}function rr(e){const{clientId:t,attributes:{content:o},setAttributes:n,onReplace:r}=e,[a,i]=(0,gt.useState)(!1),[s,l]=(0,gt.useState)(!1),c=`editor-${t}`,u=()=>o?i(!1):r([]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>i(!0),children:(0,pt.__)("Edit")})})}),o&&(0,it.jsx)(gt.RawHTML,{children:o}),(a||!o)&&(0,it.jsxs)(mt.Modal,{title:(0,pt.__)("Classic Editor"),onRequestClose:u,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:s,className:"block-editor-freeform-modal__content",headerActions:(0,it.jsx)(or,{onClick:()=>l(!s),isModalFullScreen:s}),children:[(0,it.jsx)(nr,{id:c,defaultValue:o}),(0,it.jsxs)(mt.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1,children:[(0,it.jsx)(mt.FlexItem,{children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:u,children:(0,pt.__)("Cancel")})}),(0,it.jsx)(mt.FlexItem,{children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{n({content:window.wp.oldEditor.getContent(c)}),i(!1)},children:(0,pt.__)("Save")})})]})]})]})}const{wp:ar}=window;function ir({clientId:e,attributes:{content:t},setAttributes:o,onReplace:n}){const{getMultiSelectedBlockClientIds:r}=(0,lt.useSelect)(ct.store),a=(0,gt.useRef)(!1);return(0,gt.useEffect)((()=>{if(!a.current)return;const o=window.tinymce.get(`editor-${e}`);if(!o)return;o.getContent()!==t&&o.setContent(t||"")}),[e,t]),(0,gt.useEffect)((()=>{const{baseURL:i,suffix:s}=window.wpEditorL10n.tinymce;function l(e){let a;t&&e.on("loadContent",(()=>e.setContent(t))),e.on("blur",(()=>{a=e.selection.getBookmark(2,!0);const t=document.querySelector(".interface-interface-skeleton__content"),n=t.scrollTop;return r()?.length||o({content:e.getContent()}),e.once("focus",(()=>{a&&(e.selection.moveToBookmark(a),t.scrollTop!==n&&(t.scrollTop=n))})),!1})),e.on("mousedown touchstart",(()=>{a=null}));const i=(0,xt.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",i),e.on("remove",i.cancel),e.on("keydown",(t=>{mn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==mn.BACKSPACE&&t.keyCode!==mn.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)||(n([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:o}=t;o&&t.keyCode===mn.F10&&t.stopPropagation()})),e.on("paste",(e=>{e.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:t}=window.wpEditorL10n.tinymce;ar.oldEditor.initialize(`editor-${e}`,{tinymce:{...t,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${e}`,setup:l}})}function u(){"complete"===document.readyState&&c()}return a.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:i,suffix:s}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),ar.oldEditor.remove(`editor-${e}`),a.current=!1}}),[]),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{id:`toolbar-${e}`,className:"block-library-classic__toolbar",onClick:function(){const t=window.tinymce.get(`editor-${e}`);t&&t.focus()},"data-placeholder":(0,pt.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},"toolbar"),(0,it.jsx)("div",{id:`editor-${e}`,className:"wp-block-freeform block-library-rich-text__tinymce"},"editor")]})}const sr=JSON.parse('{"$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":false,"customClassName":false,"reusable":false},"editorStyle":"wp-block-freeform-editor"}');const{name:lr}=sr,cr={icon:Xn,edit:function(e){const{clientId:t}=e,o=(0,lt.useSelect)((e=>e(ct.store).canRemoveBlock(t)),[t]),[n,r]=(0,gt.useState)(!1),a=(0,xt.useRefEffect)((e=>{r(e.ownerDocument!==document)}),[]);return(0,it.jsxs)(it.Fragment,{children:[o&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(er,{clientId:t})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)({ref:a}),children:n?(0,it.jsx)(rr,{...e}):(0,it.jsx)(ir,{...e})})]})},save:function({attributes:e}){const{content:t}=e;return(0,it.jsx)(gt.RawHTML,{children:t})}},ur=()=>jt({name:lr,metadata:sr,settings:cr});var dr=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const pr=JSON.parse('{"$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":"rich-text","source":"rich-text","selector":"code","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"align":["wide"],"anchor":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"color":{"text":true,"background":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-code"}');function mr(e){return e.replace(/\[/g,"[")}function gr(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}const hr={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,st.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:e=>{const{content:t}=e;return(0,st.createBlock)("core/code",{...e,...Nn(e,"core/code"),content:t})}},{type:"block",blocks:["core/html"],transform:e=>{const{content:t}=e;return(0,st.createBlock)("core/code",{...e,...Nn(e,"core/code"),content:(0,Tn.toHTMLString)({value:(0,Tn.create)({text:t})})})}},{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:e=>{const{content:t}=e;return(0,st.createBlock)("core/paragraph",{...Nn(e,"core/paragraph"),content:t})}}]};var _r=hr;const{name:xr}=pr,br={icon:dr,example:{attributes:{content:(0,pt.__)("// 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)=>({content:e.content+"\n\n"+t.content}),transforms:_r,edit:function({attributes:e,setAttributes:t,onRemove:o,insertBlocksAfter:n,mergeBlocks:r}){const a=(0,ct.useBlockProps)();return(0,it.jsx)("pre",{...a,children:(0,it.jsx)(ct.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:e=>t({content:e}),onRemove:o,onMerge:r,placeholder:(0,pt.__)("Write code…"),"aria-label":(0,pt.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)()))})})},save:function({attributes:e}){return(0,it.jsx)("pre",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.RichText.Content,{tagName:"code",value:(t="string"==typeof e.content?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}),(0,xt.pipe)(mr,gr)(t||""))})});var t}},fr=()=>jt({name:xr,metadata:pr,settings:br});var yr=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 vr=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:o}=e,n=Dt({[`is-vertically-aligned-${t}`]:t}),r={flexBasis:o+"%"};return(0,it.jsx)("div",{className:n,style:r,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];var kr=vr;function wr({width:e,setAttributes:t}){const[o]=(0,ct.useSettings)("spacing.units"),n=(0,mt.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"]}),r=vt();return(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({width:void 0})},dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==e,label:(0,pt.__)("Width"),onDeselect:()=>t({width:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalUnitControl,{label:(0,pt.__)("Width"),__unstableInputWidth:"calc(50% - 8px)",__next40pxDefaultSize:!0,value:e||"",onChange:e=>{e=0>parseFloat(e)?"0":e,t({width:e})},units:n})})})}var Cr=function({attributes:{verticalAlignment:e,width:t,templateLock:o,allowedBlocks:n},setAttributes:r,clientId:a}){const i=Dt("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),{columnsIds:s,hasChildBlocks:l,rootClientId:c}=(0,lt.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:o}=e(ct.store),n=o(a);return{hasChildBlocks:t(a).length>0,rootClientId:n,columnsIds:t(n)}}),[a]),{updateBlockAttributes:u}=(0,lt.useDispatch)(ct.store),d=Number.isFinite(t)?t+"%":t,p=(0,ct.useBlockProps)({className:i,style:d?{flexBasis:d}:void 0}),m=s.length,g=s.indexOf(a)+1,h=(0,pt.sprintf)((0,pt.__)("%1$s (%2$d of %3$d)"),p["aria-label"],g,m),_=(0,ct.useInnerBlocksProps)({...p,"aria-label":h},{templateLock:o,allowedBlocks:n,renderAppender:l?void 0:ct.InnerBlocks.ButtonBlockAppender});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.BlockVerticalAlignmentToolbar,{onChange:e=>{r({verticalAlignment:e}),u(c,{verticalAlignment:null})},value:e,controls:["top","center","bottom","stretch"]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(wr,{width:t,setAttributes:r})}),(0,it.jsx)("div",{..._})]})};const jr=JSON.parse('{"$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"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"anchor":true,"reusable":false,"html":false,"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"blockGap":true,"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":true,"interactivity":{"clientNavigation":true},"allowedBlocks":true}}');const{name:Sr}=jr,Br={icon:yr,edit:Cr,save:function({attributes:e}){const{verticalAlignment:t,width:o}=e,n=Dt({[`is-vertically-aligned-${t}`]:t});let r;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&o?.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}r={flexBasis:e}}const a=ct.useBlockProps.save({className:n,style:r}),i=ct.useInnerBlocksProps.save(a);return(0,it.jsx)("div",{...i})},deprecated:kr},Tr=()=>jt({name:Sr,metadata:jr,settings:Br});var Nr=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"})});function Pr(e){let t,{doc:o}=Pr;o||(o=document.implementation.createHTMLDocument(""),Pr.doc=o),o.body.innerHTML=e;for(const e of o.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var Ir=[{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:o,customBackgroundColor:n,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:o,customBackgroundColor:n,textColor:r,customTextColor:a}=e,i=(0,ct.getColorClassName)("background-color",o),s=(0,ct.getColorClassName)("color",r),l=Dt({"has-background":o||n,"has-text-color":r||a,[i]:i,[s]:s,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:i?void 0:n,color:s?void 0:a};return(0,it.jsx)("div",{className:l||void 0,style:c,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==Pr(e.originalContent))),migrate(e,t){const o=t.reduce(((e,t)=>{const{originalContent:o}=t;let n=Pr(o);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e}),[]).map((e=>(0,st.createBlock)("core/column",{},e))),{columns:n,...r}=e;return[{...r,isStackedOnMobile:!0},o]},save({attributes:e}){const{columns:t}=e;return(0,it.jsx)("div",{className:`has-${t}-columns`,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:o,...n}=e;return[e={...n,isStackedOnMobile:!0},t]},save({attributes:e}){const{verticalAlignment:t,columns:o}=e,n=Dt(`has-${o}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,it.jsx)("div",{className:n,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];const Dr=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Mr(e,t){const{width:o=100/t}=e.attributes;return Dr(o)}function zr(e,t,o=e.length){const n=function(e,t=e.length){return e.reduce(((e,o)=>e+Mr(o,t)),0)}(e,o);return Object.fromEntries(Object.entries(function(e,t=e.length){return e.reduce(((e,o)=>{const n=Mr(o,t);return Object.assign(e,{[o.clientId]:n})}),{})}(e,o)).map((([e,o])=>[e,Dr(t*o/n)])))}function Ar(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}const Lr={name:"core/column"};function Hr({clientId:e,setAttributes:t,isStackedOnMobile:o}){const{count:n,canInsertColumnBlock:r,minCount:a}=(0,lt.useSelect)((t=>{const{canInsertBlockType:o,canRemoveBlock:n,getBlockOrder:r}=t(ct.store),a=r(e),i=a.reduce(((e,t,o)=>(n(t)||e.push(o),e)),[]);return{count:a.length,canInsertColumnBlock:o("core/column",e),minCount:Math.max(...i)+1}}),[e]),{getBlocks:i}=(0,lt.useSelect)(ct.store),{replaceInnerBlocks:s}=(0,lt.useDispatch)(ct.store);function l(t,o){let n=i(e);const r=n.every((e=>{const t=e.attributes.width;return Number.isFinite(t?.endsWith?.("%")?parseFloat(t):t)}));const a=o>t;if(a&&r){const e=Dr(100/o),r=o-t;n=[...Ar(n,zr(n,100-e*r)),...Array.from({length:r}).map((()=>(0,st.createBlock)("core/column",{width:`${e}%`})))]}else if(a)n=[...n,...Array.from({length:o-t}).map((()=>(0,st.createBlock)("core/column")))];else if(o<t&&(n=n.slice(0,-(t-o)),r)){n=Ar(n,zr(n,100))}s(e,n)}const c=vt();return(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({isStackedOnMobile:!0})},dropdownMenuProps:c,children:[r&&(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,style:{gridColumn:"1 / -1"},children:[(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:n,onChange:e=>l(n,Math.max(a,e)),min:Math.max(1,a),max:Math.max(6,n)}),n>6&&(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("This column count exceeds the recommended amount and may cause visual breakage.")})]}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!0!==o,onDeselect:()=>t({isStackedOnMobile:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Stack on mobile"),checked:o,onChange:()=>t({isStackedOnMobile:!o})})})]})}function Rr({attributes:e,setAttributes:t,clientId:o}){const{isStackedOnMobile:n,verticalAlignment:r,templateLock:a}=e,i=(0,lt.useRegistry)(),{getBlockOrder:s}=(0,lt.useSelect)(ct.store),{updateBlockAttributes:l}=(0,lt.useDispatch)(ct.store),c=Dt({[`are-vertically-aligned-${r}`]:r,"is-not-stacked-on-mobile":!n}),u=(0,ct.useBlockProps)({className:c}),d=(0,ct.useInnerBlocksProps)(u,{defaultBlock:Lr,directInsert:!0,orientation:"horizontal",renderAppender:!1,templateLock:a});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.BlockVerticalAlignmentToolbar,{onChange:function(e){const n=s(o);i.batch((()=>{t({verticalAlignment:e}),l(n,{verticalAlignment:e})}))},value:r})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Hr,{clientId:o,setAttributes:t,isStackedOnMobile:n})}),(0,it.jsx)("div",{...d})]})}function Vr({clientId:e,name:t,setAttributes:o}){const{blockType:n,defaultVariation:r,variations:a}=(0,lt.useSelect)((e=>{const{getBlockVariations:o,getBlockType:n,getDefaultBlockVariation:r}=e(st.store);return{blockType:n(t),defaultVariation:r(t,"block"),variations:o(t,"block")}}),[t]),{replaceInnerBlocks:i}=(0,lt.useDispatch)(ct.store),s=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...s,children:(0,it.jsx)(ct.__experimentalBlockVariationPicker,{icon:n?.icon?.src,label:n?.title,variations:a,instructions:(0,pt.__)("Divide into columns. Select a layout:"),onSelect:(t=r)=>{t.attributes&&o(t.attributes),t.innerBlocks&&i(e,(0,st.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)},allowSkip:!0})})}var Fr=e=>{const{clientId:t}=e,o=(0,lt.useSelect)((e=>e(ct.store).getBlocks(t).length>0),[t])?Rr:Vr;return(0,it.jsx)(o,{...e})};const Er=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/columns","title":"Columns","category":"design","allowedBlocks":["core/column"],"description":"Display content in multiple columns, with blocks added to each column.","textdomain":"default","attributes":{"verticalAlignment":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"anchor":true,"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"heading":true,"button":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"blockGap":{"__experimentalDefault":"2em","sides":["horizontal","vertical"]},"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex","flexWrap":"nowrap"}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"shadow":true},"editorStyle":"wp-block-columns-editor","style":"wp-block-columns"}');var Or=[{name:"one-column-full",title:(0,pt.__)("100"),description:(0,pt.__)("One column"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,pt.__)("50 / 50"),description:(0,pt.__)("Two columns; equal split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,pt.__)("33 / 66"),description:(0,pt.__)("Two columns; one-third, two-thirds split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,pt.__)("66 / 33"),description:(0,pt.__)("Two columns; two-thirds, one-third split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,pt.__)("33 / 33 / 33"),description:(0,pt.__)("Three columns; equal split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,pt.__)("25 / 50 / 25"),description:(0,pt.__)("Three columns; wide center column"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];const Gr={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),o=e.map((({name:e,attributes:o,innerBlocks:n})=>["core/column",{width:`${t}%`},[[e,{...o},n]]]));return(0,st.createBlock)("core/columns",{},(0,st.createBlocksFromInnerBlocksTemplate)(o))},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:o,backgroundColor:n,textColor:r,style:a,mediaAlt:i,mediaId:s,mediaPosition:l,mediaSizeSlug:c,mediaType:u,mediaUrl:d,mediaWidth:p,verticalAlignment:m}=e;let g;if("image"!==u&&u)g=["core/video",{id:s,src:d}];else{g=["core/image",{...{id:s,alt:i,url:d,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"===l&&h.reverse(),(0,st.createBlock)("core/columns",{align:o,backgroundColor:n,textColor:r,style:a,verticalAlignment:m},(0,st.createBlocksFromInnerBlocksTemplate)(h))}}],ungroup:(e,t)=>t.flatMap((e=>e.innerBlocks))};var $r=Gr;const{name:Ur}=Er,qr={icon:Nr,variations:Or,example:{viewportWidth:782,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("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,pt.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("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,pt.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:Ir,edit:Fr,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:o}=e,n=Dt({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!t}),r=ct.useBlockProps.save({className:n}),a=ct.useInnerBlocksProps.save(r);return(0,it.jsx)("div",{...a})},transforms:$r},Wr=()=>jt({name:Ur,metadata:Er,settings:qr});var Zr=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const Jr=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments","title":"Comments","category":"theme","description":"An advanced block that allows displaying post comments using different visual configurations.","textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"legacy":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-comments-editor","usesContext":["postId","postType"]}');var Qr=[{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=ct.useBlockProps.save(),{className:o}=t,n=o?.split(" ")||[],r=n?.filter((e=>"wp-block-comments"!==e)),a={...t,className:r.join(" ")};return(0,it.jsx)(e,{...a,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];const{HTMLElementControl:Kr}=jo(ct.privateApis);function Yr({attributes:{tagName:e},setAttributes:t}){return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Kr,{tagName:e,onChange:e=>t({tagName:e}),options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]})})})}const Xr=()=>{const e=(0,xt.useInstanceId)(Xr);return(0,it.jsxs)("div",{className:"comment-respond",children:[(0,it.jsx)("h3",{className:"comment-reply-title",children:(0,pt.__)("Leave a Reply")}),(0,it.jsxs)("form",{noValidate:!0,className:"comment-form",onSubmit:e=>e.preventDefault(),children:[(0,it.jsxs)("p",{children:[(0,it.jsx)("label",{htmlFor:`comment-${e}`,children:(0,pt.__)("Comment")}),(0,it.jsx)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})]}),(0,it.jsx)("p",{className:"form-submit wp-block-button",children:(0,it.jsx)("input",{name:"submit",type:"submit",className:Dt("wp-block-button__link",(0,ct.__experimentalGetElementClassName)("button")),label:(0,pt.__)("Post Comment"),value:(0,pt.__)("Post Comment"),"aria-disabled":"true"})})]})]})};var ea=({postId:e,postType:t})=>{const[o,n]=(0,_t.useEntityProp)("postType",t,"comment_status",e),r=void 0===t||void 0===e,{defaultCommentStatus:a}=(0,lt.useSelect)((e=>e(ct.store).getSettings().__experimentalDiscussionSettings)),i=(0,lt.useSelect)((e=>!!t&&!!e(_t.store).getPostType(t)?.supports.comments));if(!r&&"open"!==o){if("closed"===o){const e=[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>n("open"),variant:"primary",children:(0,pt._x)("Enable comments","action that affects the current post")},"enableComments")];return(0,it.jsx)(ct.Warning,{actions:e,children:(0,pt.__)("Post Comments Form block: Comments are not enabled for this item.")})}if(!i)return(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t)});if("open"!==a)return(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Form block: Comments are not enabled.")})}return(0,it.jsx)(Xr,{})};function ta({postType:e,postId:t}){let[o]=(0,_t.useEntityProp)("postType",e,"title",t);o=o||(0,pt.__)("Post Title");const{avatarURL:n}=(0,lt.useSelect)((e=>e(ct.store).getSettings().__experimentalDiscussionSettings));return(0,it.jsxs)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true",children:[(0,it.jsx)("h3",{children:(0,pt.sprintf)((0,pt.__)("One response to %s"),o)}),(0,it.jsxs)("div",{className:"navigation",children:[(0,it.jsx)("div",{className:"alignleft",children:(0,it.jsxs)("a",{href:"#top",children:["« ",(0,pt.__)("Older Comments")]})}),(0,it.jsx)("div",{className:"alignright",children:(0,it.jsxs)("a",{href:"#top",children:[(0,pt.__)("Newer Comments")," »"]})})]}),(0,it.jsx)("ol",{className:"commentlist",children:(0,it.jsx)("li",{className:"comment even thread-even depth-1",children:(0,it.jsxs)("article",{className:"comment-body",children:[(0,it.jsxs)("footer",{className:"comment-meta",children:[(0,it.jsxs)("div",{className:"comment-author vcard",children:[(0,it.jsx)("img",{alt:(0,pt.__)("Commenter Avatar"),src:n,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,it.jsx)("b",{className:"fn",children:(0,it.jsx)("a",{href:"#top",className:"url",children:(0,pt.__)("A WordPress Commenter")})})," ",(0,it.jsxs)("span",{className:"says",children:[(0,pt.__)("says"),":"]})]}),(0,it.jsxs)("div",{className:"comment-metadata",children:[(0,it.jsx)("a",{href:"#top",children:(0,it.jsx)("time",{dateTime:"2000-01-01T00:00:00+00:00",children:(0,pt.__)("January 1, 2000 at 00:00 am")})})," ",(0,it.jsx)("span",{className:"edit-link",children:(0,it.jsx)("a",{className:"comment-edit-link",href:"#top",children:(0,pt.__)("Edit")})})]})]}),(0,it.jsx)("div",{className:"comment-content",children:(0,it.jsxs)("p",{children:[(0,pt.__)("Hi, this is a comment."),(0,it.jsx)("br",{}),(0,pt.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,it.jsx)("br",{}),(0,gt.createInterpolateElement)((0,pt.__)("Commenter avatars come from <a>Gravatar</a>."),{a:(0,it.jsx)("a",{href:"https://gravatar.com/"})})]})}),(0,it.jsx)("div",{className:"reply",children:(0,it.jsx)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,pt.__)("Reply to A WordPress Commenter"),children:(0,pt.__)("Reply")})})]})})}),(0,it.jsxs)("div",{className:"navigation",children:[(0,it.jsx)("div",{className:"alignleft",children:(0,it.jsxs)("a",{href:"#top",children:["« ",(0,pt.__)("Older Comments")]})}),(0,it.jsx)("div",{className:"alignright",children:(0,it.jsxs)("a",{href:"#top",children:[(0,pt.__)("Newer Comments")," »"]})})]}),(0,it.jsx)(ea,{postId:t,postType:e})]})}function oa({attributes:e,setAttributes:t,context:{postType:o,postId:n}}){const{textAlign:r}=e,a=[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{t({legacy:!1})},variant:"primary",children:(0,pt.__)("Switch to editable mode")},"convert")],i=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,it.jsxs)("div",{...i,children:[(0,it.jsx)(ct.Warning,{actions:a,children:(0,pt.__)("Comments block: You’re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")}),(0,it.jsx)(ta,{postId:n,postType:o})]})]})}var na=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]];const{name:ra}=Jr,aa={icon:Zr,example:{},edit:function(e){const{attributes:t,setAttributes:o,clientId:n}=e,{tagName:r,legacy:a}=t,i=(0,ct.useBlockProps)(),s=(0,ct.useInnerBlocksProps)(i,{template:na});return a?(0,it.jsx)(oa,{...e}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Yr,{attributes:t,setAttributes:o,clientId:n}),(0,it.jsx)(r,{...s})]})},save:function({attributes:{tagName:e,legacy:t}}){const o=ct.useBlockProps.save(),n=ct.useInnerBlocksProps.save(o);return t?null:(0,it.jsx)(e,{...n})},deprecated:Qr},ia=()=>jt({name:ra,metadata:Jr,settings:aa}),sa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/comment-author-avatar","title":"Comment Author Avatar (deprecated)","category":"theme","ancestor":["core/comment-template"],"description":"This block is deprecated. Please use the Avatar block instead.","textdomain":"default","attributes":{"width":{"type":"number","default":96},"height":{"type":"number","default":96}},"usesContext":["commentId"],"supports":{"html":false,"inserter":false,"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"color":{"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"__experimentalSkipSerialization":true,"margin":true,"padding":true},"interactivity":{"clientNavigation":true}}}');const{name:la}=sa,ca={icon:to,edit:function({attributes:e,context:{commentId:t},setAttributes:o,isSelected:n}){const{height:r,width:a}=e,[i]=(0,_t.useEntityProp)("root","comment","author_avatar_urls",t),[s]=(0,_t.useEntityProp)("root","comment","author_name",t),l=i?Object.values(i):null,c=i?Object.keys(i):null,u=c?c[0]:24,d=c?c[c.length-1]:96,p=(0,ct.useBlockProps)(),m=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),g=Math.floor(2.5*d),{avatarURL:h}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o})),_=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.PanelBody,{title:(0,pt.__)("Settings"),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image size"),onChange:e=>o({width:e,height:e}),min:u,max:g,initialPosition:a,value:a})})}),x=(0,it.jsx)(mt.ResizableBox,{size:{width:a,height:r},showHandle:n,onResizeStop:(e,t,n,i)=>{o({height:parseInt(r+i.height,10),width:parseInt(a+i.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,pt.isRTL)(),bottom:!0,left:(0,pt.isRTL)()},minWidth:u,maxWidth:g,children:(0,it.jsx)("img",{src:l?l[l.length-1]:h,alt:`${s} ${(0,pt.__)("Avatar")}`,...p})});return(0,it.jsxs)(it.Fragment,{children:[_,(0,it.jsx)("div",{...m,children:x})]})}},ua=()=>jt({name:la,metadata:sa,settings:ca});var da=(0,it.jsxs)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,it.jsx)(St.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,it.jsx)(St.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})]});const pa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-author-name","title":"Comment Author Name","category":"theme","ancestor":["core/comment-template"],"description":"Displays the name of the author of the comment.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"usesContext":["commentId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-author-name"}');const ma={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var ga=[ma];const{name:ha}=pa,_a={icon:da,edit:function({attributes:{isLink:e,linkTarget:t,textAlign:o},context:{commentId:n},setAttributes:r}){const a=vt(),i=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})});let s=(0,lt.useSelect)((e=>{const{getEntityRecord:t}=e(_t.store),o=t("root","comment",n),r=o?.author_name;if(o&&!r){const e=t("root","user",o.author);return e?.name??(0,pt.__)("Anonymous")}return r??""}),[n]);const l=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>r({textAlign:e})})}),c=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{r({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:a,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to authors URL"),isShownByDefault:!0,hasValue:()=>!e,onDeselect:()=>r({isLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to authors URL"),onChange:()=>r({isLink:!e}),checked:e})}),e&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==t,onDeselect:()=>r({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})})]})});n&&s||(s=(0,pt._x)("Comment Author","block title"));const u=e?(0,it.jsx)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault(),children:s}):s;return(0,it.jsxs)(it.Fragment,{children:[c,l,(0,it.jsx)("div",{...i,children:u})]})},deprecated:ga,example:{}},xa=()=>jt({name:ha,metadata:pa,settings:_a});var ba=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})});const fa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-content","title":"Comment Content","category":"theme","ancestor":["core/comment-template"],"description":"Displays the contents of a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"spacing":{"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"html":false},"style":"wp-block-comment-content"}');const{name:ya}=fa,va={icon:ba,edit:function({setAttributes:e,attributes:{textAlign:t},context:{commentId:o}}){const n=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${t}`]:t})}),[r]=(0,_t.useEntityProp)("root","comment","content",o),a=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})})});return o&&r?(0,it.jsxs)(it.Fragment,{children:[a,(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(gt.RawHTML,{children:r.rendered},"html")})})]}):(0,it.jsxs)(it.Fragment,{children:[a,(0,it.jsx)("div",{...n,children:(0,it.jsx)("p",{children:(0,pt._x)("Comment Content","block title")})})]})},example:{}},ka=()=>jt({name:ya,metadata:fa,settings:va});var wa=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,it.jsx)(St.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})]});const Ca=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-date","title":"Comment Date","category":"theme","ancestor":["core/comment-template"],"description":"Displays the date on which the comment was posted.","textdomain":"default","attributes":{"format":{"type":"string"},"isLink":{"type":"boolean","default":true}},"usesContext":["commentId"],"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-date"}'),ja=window.wp.date;const Sa={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Ba=[Sa];const{name:Ta}=Ca,Na={icon:wa,edit:function({attributes:{format:e,isLink:t},context:{commentId:o},setAttributes:n}){const r=(0,ct.useBlockProps)(),a=vt();let[i]=(0,_t.useEntityProp)("root","comment","date",o);const[s=(0,ja.getSettings)().formats.date]=(0,_t.useEntityProp)("root","site","date_format"),l=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({format:void 0,isLink:!0})},dropdownMenuProps:a,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Date format"),hasValue:()=>void 0!==e,onDeselect:()=>n({format:void 0}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalDateFormatPicker,{format:e,defaultFormat:s,onChange:e=>n({format:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to comment"),hasValue:()=>!t,onDeselect:()=>n({isLink:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to comment"),onChange:()=>n({isLink:!t}),checked:t})})]})});o&&i||(i=(0,pt._x)("Comment Date","block title"));let c=i instanceof Date?(0,it.jsx)("time",{dateTime:(0,ja.dateI18n)("c",i),children:"human-diff"===e?(0,ja.humanTimeDiff)(i):(0,ja.dateI18n)(e||s,i)}):(0,it.jsx)("time",{children:i});return t&&(c=(0,it.jsx)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault(),children:c})),(0,it.jsxs)(it.Fragment,{children:[l,(0,it.jsx)("div",{...r,children:c})]})},deprecated:Ba,example:{}},Pa=()=>jt({name:Ta,metadata:Ca,settings:Na});var Ia=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"})});const Da=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-edit-link","title":"Comment Edit Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.","textdomain":"default","usesContext":["commentId"],"attributes":{"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"link":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-comment-edit-link"}');const{name:Ma}=Da,za={icon:Ia,edit:function({attributes:{linkTarget:e,textAlign:t},setAttributes:o}){const n=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${t}`]:t})}),r=vt(),a=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:t,onChange:e=>o({textAlign:e})})}),i=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({linkTarget:"_self"})},dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_blank"===e,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===e})})})});return(0,it.jsxs)(it.Fragment,{children:[a,i,(0,it.jsx)("div",{...n,children:(0,it.jsx)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("Edit")})})]})},example:{}},Aa=()=>jt({name:Ma,metadata:Da,settings:za});var La=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"})});const Ha=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-reply-link","title":"Comment Reply Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to reply to a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false},"style":"wp-block-comment-reply-link"}');var Ra=function({setAttributes:e,attributes:{textAlign:t}}){const o=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${t}`]:t})}),n=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})})});return(0,it.jsxs)(it.Fragment,{children:[n,(0,it.jsx)("div",{...o,children:(0,it.jsx)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("Reply")})})]})};const{name:Va}=Ha,Fa={edit:Ra,icon:La,example:{}},Ea=()=>jt({name:Va,metadata:Ha,settings:Fa});var Oa=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});const Ga=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-template","title":"Comment Template","category":"design","parent":["core/comments"],"description":"Contains the block elements used to display a comment, like the title, date, author, avatar and more.","textdomain":"default","usesContext":["postId"],"supports":{"align":true,"html":false,"reusable":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-template"}'),$a=window.wp.apiFetch;var Ua=r.n($a);const qa=({defaultPage:e,postId:t,perPage:o,queryArgs:n})=>{const[r,a]=(0,gt.useState)({}),i=`${t}_${o}`,s=r[i]||0;return(0,gt.useEffect)((()=>{s||"newest"!==e||Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{...n,post:t,per_page:o,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));a({...r,[i]:t<=1?1:t})})).catch((()=>{a({...r,[i]:1})}))}),[e,t,o,a]),"newest"===e?s:1},Wa=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Za({comment:e,activeCommentId:t,setActiveCommentId:o,firstCommentId:n,blocks:r}){const{children:a,...i}=(0,ct.useInnerBlocksProps)({},{template:Wa});return(0,it.jsxs)("li",{...i,children:[e.commentId===(t||n)?a:null,(0,it.jsx)(Ja,{blocks:r,commentId:e.commentId,setActiveCommentId:o,isHidden:e.commentId===(t||n)}),e?.children?.length>0?(0,it.jsx)(Qa,{comments:e.children,activeCommentId:t,setActiveCommentId:o,blocks:r,firstCommentId:n}):null]})}const Ja=(0,gt.memo)((({blocks:e,commentId:t,setActiveCommentId:o,isHidden:n})=>{const r=(0,ct.__experimentalUseBlockPreview)({blocks:e}),a=()=>{o(t)},i={display:n?"none":void 0};return(0,it.jsx)("div",{...r,tabIndex:0,role:"button",style:i,onClick:a,onKeyPress:a})})),Qa=({comments:e,blockProps:t,activeCommentId:o,setActiveCommentId:n,blocks:r,firstCommentId:a})=>(0,it.jsx)("ol",{...t,children:e&&e.map((({commentId:e,...t},i)=>(0,it.jsx)(ct.BlockContextProvider,{value:{commentId:e<0?null:e},children:(0,it.jsx)(Za,{comment:{commentId:e,...t},activeCommentId:o,setActiveCommentId:n,blocks:r,firstCommentId:a})},t.commentId||i)))});const{name:Ka}=Ga,Ya={icon:Oa,edit:function({clientId:e,context:{postId:t}}){const o=(0,ct.useBlockProps)(),[n,r]=(0,gt.useState)(),{commentOrder:a,threadCommentsDepth:i,threadComments:s,commentsPerPage:l,pageComments:c}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return t().__experimentalDiscussionSettings})),u=(({postId:e})=>{const t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:o,commentsPerPage:n,defaultCommentsPage:r}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o})),a=o?Math.min(n,100):100,i=qa({defaultPage:r,postId:e,perPage:a,queryArgs:t});return(0,gt.useMemo)((()=>i?{...t,post:e,per_page:a,page:i}:null),[e,a,i])})({postId:t}),{topLevelComments:d,blocks:p}=(0,lt.useSelect)((t=>{const{getEntityRecords:o}=t(_t.store),{getBlocks:n}=t(ct.store);return{topLevelComments:u?o("root","comment",u):null,blocks:n(e)}}),[e,u]);let m=(e=>(0,gt.useMemo)((()=>e?.map((({id:e,_embedded:t})=>{const[o]=t?.children||[[]];return{commentId:e,children:o.map((e=>({commentId:e.id})))}}))),[e]))("desc"===a&&d?[...d].reverse():d);return d?(t||(m=(({perPage:e,pageComments:t,threadComments:o,threadCommentsDepth:n})=>{const r=o?Math.min(n,3):1,a=e=>e<r?[{commentId:-(e+3),children:a(e+1)}]:[],i=[{commentId:-1,children:a(1)}];return(!t||e>=2)&&r<3&&i.push({commentId:-2,children:[]}),(!t||e>=3)&&r<2&&i.push({commentId:-3,children:[]}),i})({perPage:l,pageComments:c,threadComments:s,threadCommentsDepth:i})),m.length?(0,it.jsx)(Qa,{comments:m,blockProps:o,blocks:p,activeCommentId:n,setActiveCommentId:r,firstCommentId:m[0]?.commentId}):(0,it.jsx)("p",{...o,children:(0,pt.__)("No results found.")})):(0,it.jsx)("p",{...o,children:(0,it.jsx)(mt.Spinner,{})})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},Xa=()=>jt({name:Ka,metadata:Ga,settings:Ya});var ei=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})});const ti=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-previous","title":"Comments Previous Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the previous comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),oi={none:"",arrow:"←",chevron:"«"};const{name:ni}=ti,ri={icon:ei,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":o}}){const n=oi[o];return(0,it.jsxs)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[n&&(0,it.jsx)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${o}`,children:n}),(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Older comments page link"),placeholder:(0,pt.__)("Older Comments"),value:e,onChange:e=>t({label:e})})]})},example:{attributes:{label:(0,pt.__)("Older Comments")}}},ai=()=>jt({name:ni,metadata:ti,settings:ri});var ii=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})});const si=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination","title":"Comments Pagination","category":"theme","parent":["core/comments"],"allowedBlocks":["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],"description":"Displays a paginated navigation to next/previous set of comments, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"}},"example":{"attributes":{"paginationArrow":"none"}},"providesContext":{"comments/paginationArrow":"paginationArrow"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-comments-pagination-editor","style":"wp-block-comments-pagination"}');function li({value:e,onChange:t}){return(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:e,onChange:t,help:(0,pt.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")})]})}const ci=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];const{name:ui}=si,di={icon:ii,edit:function({attributes:{paginationArrow:e},setAttributes:t,clientId:o}){const n=(0,lt.useSelect)((e=>{const{getBlocks:t}=e(ct.store),n=t(o);return n?.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),r=(0,ct.useBlockProps)(),a=vt(),i=(0,ct.useInnerBlocksProps)(r,{template:ci});return(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o?.pageComments}),[])?(0,it.jsxs)(it.Fragment,{children:[n&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),dropdownMenuProps:a,resetAll:()=>t({paginationArrow:"none"}),children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Arrow"),hasValue:()=>"none"!==e,onDeselect:()=>t({paginationArrow:"none"}),isShownByDefault:!0,children:(0,it.jsx)(li,{value:e,onChange:e=>{t({paginationArrow:e})}})})})}),(0,it.jsx)("div",{...i})]}):(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings")})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},pi=()=>jt({name:ui,metadata:si,settings:di});var mi=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})});const gi=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-next","title":"Comments Next Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the next comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),hi={none:"",arrow:"→",chevron:"»"};const{name:_i}=gi,xi={icon:mi,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":o}}){const n=hi[o];return(0,it.jsxs)("a",{href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Newer comments page link"),placeholder:(0,pt.__)("Newer Comments"),value:e,onChange:e=>t({label:e})}),n&&(0,it.jsx)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${o}`,children:n})]})},example:{attributes:{label:(0,pt.__)("Newer Comments")}}},bi=()=>jt({name:_i,metadata:gi,settings:xi});var fi=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})});const yi=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-numbers","title":"Comments Page Numbers","category":"theme","parent":["core/comments-pagination"],"description":"Displays a list of page numbers for comments pagination.","textdomain":"default","usesContext":["postId"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),vi=({content:e,tag:t="a",extraClass:o=""})=>"a"===t?(0,it.jsx)(t,{className:`page-numbers ${o}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault(),children:e}):(0,it.jsx)(t,{className:`page-numbers ${o}`,children:e});const{name:ki}=yi,wi={icon:fi,edit:function(){return(0,it.jsxs)("div",{...(0,ct.useBlockProps)(),children:[(0,it.jsx)(vi,{content:"1"}),(0,it.jsx)(vi,{content:"2"}),(0,it.jsx)(vi,{content:"3",tag:"span",extraClass:"current"}),(0,it.jsx)(vi,{content:"4"}),(0,it.jsx)(vi,{content:"5"}),(0,it.jsx)(vi,{content:"...",tag:"span",extraClass:"dots"}),(0,it.jsx)(vi,{content:"8"})]})},example:{}},Ci=()=>jt({name:ki,metadata:yi,settings:wi});var ji=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})});const Si=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-title","title":"Comments Title","category":"theme","ancestor":["core/comments"],"description":"Displays a title with the number of comments.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"showPostTitle":{"type":"boolean","default":true},"showCommentsCount":{"type":"boolean","default":true},"level":{"type":"number","default":2},"levelOptions":{"type":"array"}},"supports":{"anchor":false,"align":true,"html":false,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true}},"interactivity":{"clientNavigation":true}}}');const{attributes:Bi,supports:Ti}=Si;var Ni=[{attributes:{...Bi,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:Ti,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:o,...n}=e;return n},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null}];const{name:Pi}=Si,Ii={icon:ji,edit:function({attributes:{textAlign:e,showPostTitle:t,showCommentsCount:o,level:n,levelOptions:r},setAttributes:a,context:{postType:i,postId:s}}){const l="h"+n,[c,u]=(0,gt.useState)(),[d]=(0,_t.useEntityProp)("postType",i,"title",s),p=void 0===s,m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${e}`]:e})}),{threadCommentsDepth:g,threadComments:h,commentsPerPage:_,pageComments:x}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return t().__experimentalDiscussionSettings})),b=vt();(0,gt.useEffect)((()=>{if(p){const e=h?Math.min(g,3)-1:0,t=x?_:3,o=parseInt(e)+parseInt(t);return void u(Math.min(o,3))}const e=s;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:s,_fields:"id"}),method:"HEAD",parse:!1}).then((t=>{e===s&&u(parseInt(t.headers.get("X-WP-Total")))})).catch((()=>{u(0)}))}),[s]);const f=(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:e,onChange:e=>a({textAlign:e})}),(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>a({level:e})})]}),y=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({showPostTitle:!0,showCommentsCount:!0})},dropdownMenuProps:b,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show post title"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>a({showPostTitle:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post title"),checked:t,onChange:e=>a({showPostTitle:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show comments count"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>a({showCommentsCount:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show comments count"),checked:o,onChange:e=>a({showCommentsCount:e})})})]})}),v=p?(0,pt.__)("“Post Title”"):`"${d}"`;let k;return k=o&&void 0!==c?t?1===c?(0,pt.sprintf)((0,pt.__)("One response to %s"),v):(0,pt.sprintf)((0,pt._n)("%1$s response to %2$s","%1$s responses to %2$s",c),c,v):1===c?(0,pt.__)("One response"):(0,pt.sprintf)((0,pt._n)("%s response","%s responses",c),c):t?1===c?(0,pt.sprintf)((0,pt.__)("Response to %s"),v):(0,pt.sprintf)((0,pt.__)("Responses to %s"),v):1===c?(0,pt.__)("Response"):(0,pt.__)("Responses"),(0,it.jsxs)(it.Fragment,{children:[f,y,(0,it.jsx)(l,{...m,children:k})]})},deprecated:Ni,example:{}},Di=()=>jt({name:Pi,metadata:Si,settings:Ii});var Mi=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})});const zi={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},Ai="image",Li="video",Hi={x:.5,y:.5},Ri=["image","video"];function Vi({x:e,y:t}=Hi){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Fi(e){return 50===e||void 0===e?null:"has-background-dim-"+10*Math.round(e/10)}function Ei(e){return!e||"center center"===e||"center"===e}function Oi(e){return Ei(e)?"":zi[e]}function Gi(e){return e?{backgroundImage:`url(${e})`}:{}}function $i(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Ui(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function qi(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}const Wi={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Zi={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},Ji={...Zi,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},Qi={...Ji,isUserOverlayColor:{type:"boolean"},sizeSlug:{type:"string"},alt:{type:"string",default:""}},Ki={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},Yi={...Ki,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},Xi={attributes:Qi,supports:{...Yi,shadow:!0,dimensions:{aspectRatio:!0},interactivity:{clientNavigation:!0}},save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b,sizeSlug:f}=e,y=(0,ct.getColorClassName)("background-color",p),v=(0,ct.__experimentalGetGradientClass)(o),k=Ai===t,w=Li===t,C=!(c||d),j={minHeight:(_&&x?`${_}${x}`:_)||void 0},S={backgroundColor:y?void 0:a,background:r||void 0},B=s&&C?Vi(s):void 0,T=m?`url(${m})`:void 0,N=Vi(s),P=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),I=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{[`size-${f}`]:f,"has-parallax":c,"is-repeated":d}),D=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:P,style:j}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",y,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&D&&0!==i,"has-background-gradient":D,[v]:v}),style:S}),!l&&k&&m&&(C?(0,it.jsx)("img",{className:I,alt:g,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}):(0,it.jsx)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:I,style:{backgroundPosition:N,backgroundImage:T}})),w&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},es={attributes:Ji,supports:Yi,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b}=e,f=(0,ct.getColorClassName)("background-color",p),y=(0,ct.__experimentalGetGradientClass)(o),v=Ai===t,k=Li===t,w=!(c||d),C={minHeight:(_&&x?`${_}${x}`:_)||void 0},j={backgroundColor:f?void 0:a,background:r||void 0},S=s&&w?Vi(s):void 0,B=m?`url(${m})`:void 0,T=Vi(s),N=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),P=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),I=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:N,style:C}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",f,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&I&&0!==i,"has-background-gradient":I,[y]:y}),style:j}),!l&&v&&m&&(w?(0,it.jsx)("img",{className:P,alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,it.jsx)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),k&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},ts={attributes:Ji,supports:Yi,isEligible:e=>(void 0!==e.customOverlayColor||void 0!==e.overlayColor)&&void 0===e.isUserOverlayColor,migrate:e=>({...e,isUserOverlayColor:!0}),save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b}=e,f=(0,ct.getColorClassName)("background-color",p),y=(0,ct.__experimentalGetGradientClass)(o),v=Ai===t,k=Li===t,w=!(c||d),C={minHeight:(_&&x?`${_}${x}`:_)||void 0},j={backgroundColor:f?void 0:a,background:r||void 0},S=s&&w?Vi(s):void 0,B=m?`url(${m})`:void 0,T=Vi(s),N=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),P=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),I=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:N,style:C}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",f,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&I&&0!==i,"has-background-gradient":I,[y]:y}),style:j}),!l&&v&&m&&(w?(0,it.jsx)("img",{className:P,alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,it.jsx)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),k&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},os={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x}=e,b=(0,ct.getColorClassName)("background-color",p),f=(0,ct.__experimentalGetGradientClass)(o),y=Ai===t,v=Li===t,k=!(c||d),w={minHeight:(_&&x?`${_}${x}`:_)||void 0},C={backgroundColor:b?void 0:a,background:r||void 0},j=s&&k?Vi(s):void 0,S=m?`url(${m})`:void 0,B=Vi(s),T=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),N=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),P=o||r;return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:T,style:w}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",b,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&P&&0!==i,"has-background-gradient":P,[f]:f}),style:C}),!l&&y&&m&&(k?(0,it.jsx)("img",{className:N,alt:g,src:m,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}):(0,it.jsx)("div",{role:"img",className:N,style:{backgroundPosition:B,backgroundImage:S}})),v&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},ns={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x}=e,b=(0,ct.getColorClassName)("background-color",p),f=(0,ct.__experimentalGetGradientClass)(o),y=_&&x?`${_}${x}`:_,v=Ai===t,k=Li===t,w=!(c||d),C={...!v||w||l?{}:Gi(m),minHeight:y||void 0},j={backgroundColor:b?void 0:a,background:r||void 0},S=s&&w?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,B=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),T=o||r;return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:B,style:C}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",b,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&T&&0!==i,"has-background-gradient":T,[f]:f}),style:j}),!l&&v&&w&&m&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),k&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},rs={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isDark:c,isRepeated:u,overlayColor:d,url:p,alt:m,id:g,minHeight:h,minHeightUnit:_}=e,x=(0,ct.getColorClassName)("background-color",d),b=(0,ct.__experimentalGetGradientClass)(o),f=_?`${h}${_}`:h,y=Ai===t,v=Li===t,k=!(l||u),w={...y&&!k?Gi(p):{},minHeight:f||void 0},C={backgroundColor:x?void 0:a,background:r||void 0},j=s&&k?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,S=Dt({"is-light":!c,"has-parallax":l,"is-repeated":u,"has-custom-content-position":!Ei(n)},Oi(n)),B=o||r;return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:S,style:w}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",x,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":p&&B&&0!==i,"has-background-gradient":B,[b]:b}),style:C}),y&&k&&p&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:m,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),v&&p&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},as={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isDark:c,isRepeated:u,overlayColor:d,url:p,alt:m,id:g,minHeight:h,minHeightUnit:_}=e,x=(0,ct.getColorClassName)("background-color",d),b=(0,ct.__experimentalGetGradientClass)(o),f=_?`${h}${_}`:h,y=Ai===t,v=Li===t,k=!(l||u),w={...y&&!k?Gi(p):{},minHeight:f||void 0},C={backgroundColor:x?void 0:a,background:r||void 0},j=s&&k?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,S=Dt({"is-light":!c,"has-parallax":l,"is-repeated":u,"has-custom-content-position":!Ei(n)},Oi(n));return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:S,style:w}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt(x,Fi(i),"wp-block-cover__gradient-background",b,{"has-background-dim":void 0!==i,"has-background-gradient":o||r,[b]:!p&&b}),style:C}),y&&k&&p&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:m,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),v&&p&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},is={attributes:{...Wi,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,alt:p,id:m,minHeight:g,minHeightUnit:h}=e,_=(0,ct.getColorClassName)("background-color",u),x=(0,ct.__experimentalGetGradientClass)(o),b=h?`${g}${h}`:g,f=Ai===t,y=Li===t,v=!(l||c),k={...f&&!v?Gi(d):{},backgroundColor:_?void 0:a,background:r&&!d?r:void 0,minHeight:b||void 0},w=s&&v?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,C=Dt($i(i),_,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":o||r,[x]:!d&&x,"has-custom-content-position":!Ei(n)},Oi(n));return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:C,style:k}),children:[d&&(o||r)&&0!==i&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",x),style:r?{background:r}:void 0}),f&&v&&d&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",m?`wp-image-${m}`:null),alt:p,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),y&&d&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},ss={attributes:{...Wi,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,minHeight:p,minHeightUnit:m}=e,g=(0,ct.getColorClassName)("background-color",u),h=(0,ct.__experimentalGetGradientClass)(o),_=m?`${p}${m}`:p,x=Ai===t,b=Li===t,f=x?Gi(d):{},y={};let v;g||(f.backgroundColor=a),r&&!d&&(f.background=r),f.minHeight=_||void 0,s&&(v=`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`,x&&!l&&(f.backgroundPosition=v),b&&(y.objectPosition=v));const k=Dt($i(i),g,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":o||r,[h]:!d&&h,"has-custom-content-position":!Ei(n)},Oi(n));return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:k,style:f}),children:[d&&(o||r)&&0!==i&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",h),style:r?{background:r}:void 0}),b&&d&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:y}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},ls={attributes:{...Wi,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,customGradient:n,customOverlayColor:r,dimRatio:a,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=(0,ct.getColorClassName)("background-color",l),p=(0,ct.__experimentalGetGradientClass)(o),m=t===Ai?Gi(c):{};d||(m.backgroundColor=r),i&&!s&&(m.backgroundPosition=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`),n&&!c&&(m.background=n),m.minHeight=u||void 0;const g=Dt($i(a),d,{"has-background-dim":0!==a,"has-parallax":s,"has-background-gradient":n,[p]:!c&&p});return(0,it.jsxs)("div",{className:g,style:m,children:[c&&(o||n)&&0!==a&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",p),style:n?{background:n}:void 0}),Li===t&&c&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},cs={attributes:{...Wi,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,customGradient:n,customOverlayColor:r,dimRatio:a,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=(0,ct.getColorClassName)("background-color",l),p=(0,ct.__experimentalGetGradientClass)(o),m=t===Ai?Gi(c):{};d||(m.backgroundColor=r),i&&!s&&(m.backgroundPosition=`${100*i.x}% ${100*i.y}%`),n&&!c&&(m.background=n),m.minHeight=u||void 0;const g=Dt($i(a),d,{"has-background-dim":0!==a,"has-parallax":s,"has-background-gradient":n,[p]:!c&&p});return(0,it.jsxs)("div",{className:g,style:m,children:[c&&(o||n)&&0!==a&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",p),style:n?{background:n}:void 0}),Li===t&&c&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},us={attributes:{...Wi,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,contentAlign:o,customOverlayColor:n,dimRatio:r,focalPoint:a,hasParallax:i,overlayColor:s,title:l,url:c}=e,u=(0,ct.getColorClassName)("background-color",s),d=t===Ai?Gi(c):{};u||(d.backgroundColor=n),a&&!i&&(d.backgroundPosition=`${100*a.x}% ${100*a.y}%`);const p=Dt($i(r),u,{"has-background-dim":0!==r,"has-parallax":i,[`has-${o}-content`]:"center"!==o});return(0,it.jsxs)("div",{className:p,style:d,children:[Li===t&&c&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),!ct.RichText.isEmpty(l)&&(0,it.jsx)(ct.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:l})]})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,...r}=t;return[r,[(0,st.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,pt.__)("Write title…")})]]}},ds={attributes:{...Wi,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){const{url:t,title:o,hasParallax:n,dimRatio:r,align:a,contentAlign:i,overlayColor:s,customOverlayColor:l}=e,c=(0,ct.getColorClassName)("background-color",s),u=Gi(t);c||(u.backgroundColor=l);const d=Dt("wp-block-cover-image",$i(r),c,{"has-background-dim":0!==r,"has-parallax":n,[`has-${i}-content`]:"center"!==i},a?`align${a}`:null);return(0,it.jsx)("div",{className:d,style:u,children:!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:o})})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,align:r,...a}=t;return[a,[(0,st.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,pt.__)("Write title…")})]]}},ps={attributes:{...Wi,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){const{url:t,title:o,hasParallax:n,dimRatio:r,align:a}=e,i=Gi(t),s=Dt("wp-block-cover-image",$i(r),{"has-background-dim":0!==r,"has-parallax":n},a?`align${a}`:null);return(0,it.jsx)("section",{className:s,style:i,children:(0,it.jsx)(ct.RichText.Content,{tagName:"h2",value:o})})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,align:r,...a}=t;return[a,[(0,st.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,pt.__)("Write title…")})]]}};var ms=[Xi,es,ts,os,ns,rs,as,is,ss,ls,cs,us,ds,ps];const gs="full",hs=["image"];var _s=function e({poster:t,onChange:o}){const n=(0,gt.useRef)(),[r,a]=(0,gt.useState)(!1),i=(0,xt.useInstanceId)(e,"block-library-poster-image-description"),{getSettings:s}=(0,lt.useSelect)(ct.store),{createErrorNotice:l}=(0,lt.useDispatch)(bo.store),c=e=>{s().mediaUpload({allowedTypes:hs,filesList:e,onFileChange:([e])=>{(0,ht.isBlobURL)(e?.url)?a(!0):(e&&o(e),a(!1))},onError:e=>{l(e,{id:"poster-image-upload-notice",type:"snackbar"}),a(!1)},multiple:!1})};return(0,it.jsx)(ct.MediaUploadCheck,{children:(0,it.jsxs)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Poster image"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>o(void 0),children:[(0,it.jsx)(mt.BaseControl.VisualLabel,{children:(0,pt.__)("Poster image")}),(0,it.jsx)(ct.MediaUpload,{title:(0,pt.__)("Select poster image"),onSelect:o,allowedTypes:hs,render:({open:e})=>(0,it.jsxs)("div",{className:"block-library-poster-image__container",children:[t&&(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,onClick:e,"aria-haspopup":"dialog","aria-label":(0,pt.__)("Edit or replace the poster image."),className:"block-library-poster-image__preview",disabled:r,accessibleWhenDisabled:!0,children:[(0,it.jsx)("img",{src:t,alt:(0,pt.__)("Poster image preview"),className:"block-library-poster-image__preview-image"}),r&&(0,it.jsx)(mt.Spinner,{})]}),(0,it.jsxs)(mt.__experimentalHStack,{className:Dt("block-library-poster-image__actions",{"block-library-poster-image__actions-select":!t}),children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:e,ref:n,className:"block-library-poster-image__action","aria-describedby":i,"aria-haspopup":"dialog",variant:t?void 0:"secondary",disabled:r,accessibleWhenDisabled:!0,children:!t&&r?(0,it.jsx)(mt.Spinner,{}):t?(0,pt.__)("Replace"):(0,pt.__)("Set poster image")}),(0,it.jsx)("p",{id:i,hidden:!0,children:t?(0,pt.sprintf)((0,pt.__)("The current poster image url is %s."),t):(0,pt.__)("There is no poster image currently selected.")}),!!t&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{o(void 0),n.current.focus()},className:"block-library-poster-image__action",disabled:r,accessibleWhenDisabled:!0,children:(0,pt.__)("Remove")})]}),(0,it.jsx)(mt.DropZone,{onFilesDrop:c})]})})]})})};const{cleanEmptyObject:xs,ResolutionTool:bs,HTMLElementControl:fs}=jo(ct.privateApis);function ys({onChange:e,onUnitChange:t,unit:o="px",value:n=""}){const r=`block-cover-height-input-${(0,xt.useInstanceId)(mt.__experimentalUnitControl)}`,a="px"===o,[i]=(0,ct.useSettings)("spacing.units"),s=(0,mt.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),l=(0,gt.useMemo)((()=>{const[e]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(n);return[e,o].join("")}),[o,n]),c=a?50:0;return(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Minimum height"),id:r,isResetValueOnUnitChange:!0,min:c,onChange:t=>{const o=""!==t?parseFloat(t):void 0;isNaN(o)&&void 0!==o||e(o)},onUnitChange:t,units:s,value:l})}function vs({attributes:e,setAttributes:t,clientId:o,setOverlayColor:n,coverRef:r,currentSettings:a,updateDimRatio:i,featuredImage:s}){const{useFeaturedImage:l,id:c,dimRatio:u,focalPoint:d,hasParallax:p,isRepeated:m,minHeight:g,minHeightUnit:h,alt:_,tagName:x,poster:b}=e,{isVideoBackground:f,isImageBackground:y,mediaElement:v,url:k,overlayColor:w}=a,C=e.sizeSlug||gs,{gradientValue:j,setGradient:S}=(0,ct.__experimentalUseGradient)(),{getSettings:B}=(0,lt.useSelect)(ct.store),T=B()?.imageSizes,N=(0,lt.useSelect)((e=>c&&y?e(_t.store).getEntityRecord("postType","attachment",c,{context:"view"}):null),[c,y]),P=l?s:N;function I(e){const o=P?.media_details?.sizes?.[e]?.source_url;if(!o)return null;t({url:o,sizeSlug:e})}const D=T?.filter((({slug:e})=>P?.media_details?.sizes?.[e]?.source_url))?.map((({name:e,slug:t})=>({value:t,label:e}))),M=f||y&&(!p||m),z=e=>{const[t,o]=v.current?[v.current.style,"objectPosition"]:[r.current.style,"backgroundPosition"];t[o]=Vi(e)},A=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)(),L=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:!!k&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({hasParallax:!1,focalPoint:void 0,isRepeated:!1,alt:"",poster:void 0}),I(gs)},dropdownMenuProps:L,children:[y&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Fixed background"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>t({hasParallax:!1,focalPoint:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Fixed background"),checked:!!p,onChange:()=>{t({hasParallax:!p,...p?{}:{focalPoint:void 0}})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Repeated background"),isShownByDefault:!0,hasValue:()=>m,onDeselect:()=>t({isRepeated:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Repeated background"),checked:m,onChange:()=>{t({isRepeated:!m})}})})]}),M&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>t({focalPoint:void 0}),children:(0,it.jsx)(mt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Focal point"),url:k,value:d,onDragStart:z,onDrag:z,onChange:e=>t({focalPoint:e})})}),f&&(0,it.jsx)(_s,{poster:b,onChange:e=>t({poster:e?.url})}),!l&&k&&!f&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!_,onDeselect:()=>t({alt:""}),children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Alternative text"),value:_,onChange:e=>t({alt:e}),help:(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]})})}),!!D?.length&&(0,it.jsx)(bs,{value:C,onChange:I,options:D,defaultValue:gs})]})}),A.hasColorsOrGradients&&(0,it.jsxs)(ct.InspectorControls,{group:"color",children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:w.color,gradientValue:j,label:(0,pt.__)("Overlay"),onColorChange:n,onGradientChange:S,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:o,...A}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==u&&u!==(k?50:100),label:(0,pt.__)("Overlay opacity"),onDeselect:()=>i(k?50:100),resetAllFilter:()=>({dimRatio:k?50:100}),isShownByDefault:!0,panelId:o,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay opacity"),value:u,onChange:e=>i(e),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}),(0,it.jsx)(ct.InspectorControls,{group:"dimensions",children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!g,label:(0,pt.__)("Minimum height"),onDeselect:()=>t({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:o,children:(0,it.jsx)(ys,{value:e?.style?.dimensions?.aspectRatio?"":g,unit:h,onChange:o=>t({minHeight:o,style:xs({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}),onUnitChange:e=>t({minHeightUnit:e})})})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(fs,{tagName:x,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]})})]})}const{cleanEmptyObject:ks}=jo(ct.privateApis);function ws({attributes:e,setAttributes:t,onSelectMedia:o,currentSettings:n,toggleUseFeaturedImage:r,onClearMedia:a,blockEditingMode:i}){const{contentPosition:s,id:l,useFeaturedImage:c,minHeight:u,minHeightUnit:d}=e,{hasInnerBlocks:p,url:m}=n,[g,h]=(0,gt.useState)(u),[_,x]=(0,gt.useState)(d),b="vh"===d&&100===u&&!e?.style?.dimensions?.aspectRatio,f="contentOnly"===i;return(0,it.jsxs)(it.Fragment,{children:[!f&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.__experimentalBlockAlignmentMatrixControl,{label:(0,pt.__)("Change content position"),value:s,onChange:e=>t({contentPosition:e}),isDisabled:!p}),(0,it.jsx)(ct.__experimentalBlockFullHeightAligmentControl,{isActive:b,onToggle:()=>b?t("vh"===_&&100===g?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:g,minHeightUnit:_}):(h(u),x(d),t({minHeight:100,minHeightUnit:"vh",style:ks({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})})),isDisabled:!p})]}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:l,mediaURL:m,allowedTypes:Ri,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:r,useFeaturedImage:c,name:m?(0,pt.__)("Replace"):(0,pt.__)("Add media"),onReset:a})})]})}function Cs({disableMediaButtons:e=!1,children:t,onSelectMedia:o,onError:n,style:r,toggleUseFeaturedImage:a}){return(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Mi}),labels:{title:(0,pt.__)("Cover")},onSelect:o,accept:"image/*,video/*",allowedTypes:Ri,disableMediaButtons:e,onToggleFeaturedImage:a,onError:n,style:r,children:t})}const js={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:Ss}=jo(ct.privateApis);function Bs({className:e,height:t,minHeight:o,onResize:n,onResizeStart:r,onResizeStop:a,showHandle:i,size:s,width:l,...c}){const[u,d]=(0,gt.useState)(!1),p={className:Dt(e,{"is-resizing":u}),enable:js,onResizeStart:(e,t,o)=>{r(o.clientHeight),n(o.clientHeight)},onResize:(e,t,o)=>{n(o.clientHeight),u||d(!0)},onResizeStop:(e,t,o)=>{a(o.clientHeight),d(!1)},showHandle:i,size:s,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:u}};return(0,it.jsx)(Ss,{className:"block-library-cover__resizable-box-popover",resizableBoxProps:p,...c})}var Ts={grad:.9,turn:360,rad:360/(2*Math.PI)},Ns=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Ps=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Is=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),e>o?o:e>t?e:t},Ds=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ms=function(e){return{r:Is(e.r,0,255),g:Is(e.g,0,255),b:Is(e.b,0,255),a:Is(e.a)}},zs=function(e){return{r:Ps(e.r),g:Ps(e.g),b:Ps(e.b),a:Ps(e.a,3)}},As=/^#([0-9a-f]{3,8})$/i,Ls=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Hs=function(e){var t=e.r,o=e.g,n=e.b,r=e.a,a=Math.max(t,o,n),i=a-Math.min(t,o,n),s=i?a===t?(o-n)/i:a===o?2+(n-t)/i:4+(t-o)/i:0;return{h:60*(s<0?s+6:s),s:a?i/a*100:0,v:a/255*100,a:r}},Rs=function(e){var t=e.h,o=e.s,n=e.v,r=e.a;t=t/360*6,o/=100,n/=100;var a=Math.floor(t),i=n*(1-o),s=n*(1-(t-a)*o),l=n*(1-(1-t+a)*o),c=a%6;return{r:255*[n,s,i,i,l,n][c],g:255*[l,n,n,s,i,i][c],b:255*[i,i,l,n,n,s][c],a:r}},Vs=function(e){return{h:Ds(e.h),s:Is(e.s,0,100),l:Is(e.l,0,100),a:Is(e.a)}},Fs=function(e){return{h:Ps(e.h),s:Ps(e.s),l:Ps(e.l),a:Ps(e.a,3)}},Es=function(e){return Rs((o=(t=e).s,{h:t.h,s:(o*=((n=t.l)<50?n:100-n)/100)>0?2*o/(n+o)*100:0,v:n+o,a:t.a}));var t,o,n},Os=function(e){return{h:(t=Hs(e)).h,s:(r=(200-(o=t.s))*(n=t.v)/100)>0&&r<200?o*n/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,o,n,r},Gs=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$s=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Us=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qs=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ws={string:[[function(e){var t=As.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Ps(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Ps(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Us.exec(e)||qs.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ms({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Gs.exec(e)||$s.exec(e);if(!t)return null;var o,n,r=Vs({h:(o=t[1],n=t[2],void 0===n&&(n="deg"),Number(o)*(Ts[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Es(r)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,n=e.b,r=e.a,a=void 0===r?1:r;return Ns(t)&&Ns(o)&&Ns(n)?Ms({r:Number(t),g:Number(o),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,o=e.s,n=e.l,r=e.a,a=void 0===r?1:r;if(!Ns(t)||!Ns(o)||!Ns(n))return null;var i=Vs({h:Number(t),s:Number(o),l:Number(n),a:Number(a)});return Es(i)},"hsl"],[function(e){var t=e.h,o=e.s,n=e.v,r=e.a,a=void 0===r?1:r;if(!Ns(t)||!Ns(o)||!Ns(n))return null;var i=function(e){return{h:Ds(e.h),s:Is(e.s,0,100),v:Is(e.v,0,100),a:Is(e.a)}}({h:Number(t),s:Number(o),v:Number(n),a:Number(a)});return Rs(i)},"hsv"]]},Zs=function(e,t){for(var o=0;o<t.length;o++){var n=t[o][0](e);if(n)return[n,t[o][1]]}return[null,void 0]},Js=function(e){return"string"==typeof e?Zs(e.trim(),Ws.string):"object"==typeof e&&null!==e?Zs(e,Ws.object):[null,void 0]},Qs=function(e,t){var o=Os(e);return{h:o.h,s:Is(o.s+100*t,0,100),l:o.l,a:o.a}},Ks=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ys=function(e,t){var o=Os(e);return{h:o.h,s:o.s,l:Is(o.l+100*t,0,100),a:o.a}},Xs=function(){function e(e){this.parsed=Js(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Ps(Ks(this.rgba),2)},e.prototype.isDark=function(){return Ks(this.rgba)<.5},e.prototype.isLight=function(){return Ks(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=zs(this.rgba)).r,o=e.g,n=e.b,a=(r=e.a)<1?Ls(Ps(255*r)):"","#"+Ls(t)+Ls(o)+Ls(n)+a;var e,t,o,n,r,a},e.prototype.toRgb=function(){return zs(this.rgba)},e.prototype.toRgbString=function(){return t=(e=zs(this.rgba)).r,o=e.g,n=e.b,(r=e.a)<1?"rgba("+t+", "+o+", "+n+", "+r+")":"rgb("+t+", "+o+", "+n+")";var e,t,o,n,r},e.prototype.toHsl=function(){return Fs(Os(this.rgba))},e.prototype.toHslString=function(){return t=(e=Fs(Os(this.rgba))).h,o=e.s,n=e.l,(r=e.a)<1?"hsla("+t+", "+o+"%, "+n+"%, "+r+")":"hsl("+t+", "+o+"%, "+n+"%)";var e,t,o,n,r},e.prototype.toHsv=function(){return e=Hs(this.rgba),{h:Ps(e.h),s:Ps(e.s),v:Ps(e.v),a:Ps(e.a,3)};var e},e.prototype.invert=function(){return el({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),el(Qs(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),el(Qs(this.rgba,-e))},e.prototype.grayscale=function(){return el(Qs(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),el(Ys(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),el(Ys(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?el({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Ps(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Os(this.rgba);return"number"==typeof e?el({h:e,s:t.s,l:t.l,a:t.a}):Ps(t.h)},e.prototype.isEqual=function(e){return this.toHex()===el(e).toHex()},e}(),el=function(e){return e instanceof Xs?e:new Xs(e)},tl=[];
+(()=>{var e,t,o={3533:e=>{"use strict";e.exports=window.wp.latexToMathml},7734:e=>{"use strict";e.exports=function e(t,o){if(t===o)return!0;if(t&&o&&"object"==typeof t&&"object"==typeof o){if(t.constructor!==o.constructor)return!1;var n,r,a;if(Array.isArray(t)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(!e(t[r],o[r]))return!1;return!0}if(t instanceof Map&&o instanceof Map){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;for(r of t.entries())if(!e(r[1],o.get(r[0])))return!1;return!0}if(t instanceof Set&&o instanceof Set){if(t.size!==o.size)return!1;for(r of t.entries())if(!o.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(o)){if((n=t.length)!=o.length)return!1;for(r=n;0!=r--;)if(t[r]!==o[r])return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(o).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(o,a[r]))return!1;for(r=n;0!=r--;){var i=a[r];if(!e(t[i],o[i]))return!1}return!0}return t!=t&&o!=o}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},o=Object.keys(t).join("|"),n=new RegExp(o,"g"),r=new RegExp(o,"");function a(e){return t[e]}var i=function(e){return e.replace(n,a)};e.exports=i,e.exports.has=function(e){return!!e.match(r)},e.exports.remove=i}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return o[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&n&&o;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>o[e]));return i.default=()=>o,r.d(a,i),a},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";r.r(a),r.d(a,{__experimentalGetCoreBlocks:()=>QN,__experimentalRegisterExperimentalCoreBlocks:()=>YN,privateApis:()=>JN,registerCoreBlocks:()=>KN});var e={};r.r(e),r.d(e,{init:()=>Pt,metadata:()=>Ct,name:()=>Tt,settings:()=>Nt});var t={};r.r(t),r.d(t,{init:()=>Ht,metadata:()=>Mt,name:()=>At,settings:()=>Lt});var o={};r.r(o),r.d(o,{init:()=>$t,metadata:()=>Rt,name:()=>Ot,settings:()=>Gt});var n={};r.r(n),r.d(n,{init:()=>Jt,metadata:()=>Ut,name:()=>Wt,settings:()=>Zt});var i={};r.r(i),r.d(i,{init:()=>eo,metadata:()=>Kt,name:()=>Yt,settings:()=>Xt});var s={};r.r(s),r.d(s,{init:()=>ho,metadata:()=>oo,name:()=>mo,settings:()=>go});var l={};r.r(l),r.d(l,{init:()=>Eo,metadata:()=>Ho,name:()=>Vo,settings:()=>Fo});var c={};r.r(c),r.d(c,{init:()=>Jo,metadata:()=>Go,name:()=>Wo,settings:()=>Zo});var u={};r.r(u),r.d(u,{init:()=>wn,metadata:()=>yn,name:()=>vn,settings:()=>kn});var d={};r.r(d),r.d(d,{init:()=>Hn,metadata:()=>zn,name:()=>An,settings:()=>Ln});var p={};r.r(p),r.d(p,{init:()=>$n,metadata:()=>Vn,name:()=>On,settings:()=>Gn});var m={};r.r(m),r.d(m,{init:()=>Yn,metadata:()=>qn,name:()=>Qn,settings:()=>Kn});var g={};r.r(g),r.d(g,{init:()=>ur,metadata:()=>sr,name:()=>lr,settings:()=>cr});var h={};r.r(h),r.d(h,{init:()=>fr,metadata:()=>pr,name:()=>xr,settings:()=>br});var _={};r.r(_),r.d(_,{init:()=>Tr,metadata:()=>jr,name:()=>Sr,settings:()=>Br});var x={};r.r(x),r.d(x,{init:()=>Wr,metadata:()=>Er,name:()=>Ur,settings:()=>qr});var b={};r.r(b),r.d(b,{init:()=>ia,metadata:()=>Jr,name:()=>ra,settings:()=>aa});var f={};r.r(f),r.d(f,{init:()=>ua,metadata:()=>sa,name:()=>la,settings:()=>ca});var y={};r.r(y),r.d(y,{init:()=>xa,metadata:()=>pa,name:()=>ha,settings:()=>_a});var v={};r.r(v),r.d(v,{init:()=>ka,metadata:()=>fa,name:()=>ya,settings:()=>va});var k={};r.r(k),r.d(k,{init:()=>Pa,metadata:()=>Ca,name:()=>Ta,settings:()=>Na});var w={};r.r(w),r.d(w,{init:()=>Aa,metadata:()=>Da,name:()=>Ma,settings:()=>za});var C={};r.r(C),r.d(C,{init:()=>Ea,metadata:()=>Ha,name:()=>Va,settings:()=>Fa});var j={};r.r(j),r.d(j,{init:()=>Xa,metadata:()=>Ga,name:()=>Ka,settings:()=>Ya});var S={};r.r(S),r.d(S,{init:()=>ai,metadata:()=>ti,name:()=>ni,settings:()=>ri});var B={};r.r(B),r.d(B,{init:()=>pi,metadata:()=>si,name:()=>ui,settings:()=>di});var T={};r.r(T),r.d(T,{init:()=>bi,metadata:()=>gi,name:()=>_i,settings:()=>xi});var N={};r.r(N),r.d(N,{init:()=>Ci,metadata:()=>yi,name:()=>ki,settings:()=>wi});var P={};r.r(P),r.d(P,{init:()=>Di,metadata:()=>Si,name:()=>Pi,settings:()=>Ii});var I={};r.r(I),r.d(I,{init:()=>zl,metadata:()=>Bl,name:()=>Dl,settings:()=>Ml});var D={};r.r(D),r.d(D,{init:()=>Gl,metadata:()=>Ll,name:()=>El,settings:()=>Ol});var M={};r.r(M),r.d(M,{init:()=>Pc,metadata:()=>yo,name:()=>Tc,settings:()=>Nc});var z={};r.r(z),r.d(z,{init:()=>Wc,metadata:()=>Oc,name:()=>Uc,settings:()=>qc});var A={};r.r(A),r.d(A,{init:()=>au,metadata:()=>Yc,name:()=>nu,settings:()=>ru});var L={};r.r(L),r.d(L,{init:()=>fu,metadata:()=>gu,name:()=>xu,settings:()=>bu});var H={};r.r(H),r.d(H,{init:()=>ju,metadata:()=>ku,name:()=>wu,settings:()=>Cu});var R={};r.r(R),r.d(R,{init:()=>zu,metadata:()=>Nu,name:()=>Du,settings:()=>Mu});var V={};r.r(V),r.d(V,{init:()=>Md,metadata:()=>Td,name:()=>Id,settings:()=>Dd});var F={};r.r(F),r.d(F,{init:()=>Kd,metadata:()=>Od,name:()=>Jd,settings:()=>Qd});var E={};r.r(E),r.d(E,{init:()=>yp,metadata:()=>hp,name:()=>bp,settings:()=>fp});var O={};r.r(O),r.d(O,{init:()=>Sp,metadata:()=>kp,name:()=>Cp,settings:()=>jp});var G={};r.r(G),r.d(G,{init:()=>Mp,metadata:()=>Np,name:()=>Ip,settings:()=>Dp});var $={};r.r($),r.d($,{init:()=>dm,metadata:()=>rm,name:()=>cm,settings:()=>um});var U={};r.r(U),r.d(U,{init:()=>_m,metadata:()=>mm,name:()=>gm,settings:()=>hm});var q={};r.r(q),r.d(q,{init:()=>Dm,metadata:()=>bm,name:()=>Pm,settings:()=>Im});var W={};r.r(W),r.d(W,{init:()=>sg,metadata:()=>eg,name:()=>ag,settings:()=>ig});var Z={};r.r(Z),r.d(Z,{init:()=>hg,metadata:()=>ug,name:()=>mg,settings:()=>gg});var J={};r.r(J),r.d(J,{init:()=>Tg,metadata:()=>xg,name:()=>Sg,settings:()=>Bg});var Q={};r.r(Q),r.d(Q,{init:()=>Mg,metadata:()=>Pg,name:()=>Ig,settings:()=>Dg});var K={};r.r(K),r.d(K,{init:()=>Ch,metadata:()=>bh,name:()=>kh,settings:()=>wh});var Y={};r.r(Y),r.d(Y,{init:()=>Th,metadata:()=>jh,name:()=>Sh,settings:()=>Bh});var X={};r.r(X),r.d(X,{init:()=>Ah,metadata:()=>Ih,name:()=>Mh,settings:()=>zh});var ee={};r.r(ee),r.d(ee,{init:()=>Cx,metadata:()=>Hh,name:()=>kx,settings:()=>wx});var te={};r.r(te),r.d(te,{init:()=>Rx,metadata:()=>jx,name:()=>Lx,settings:()=>Hx});var oe={};r.r(oe),r.d(oe,{init:()=>Wx,metadata:()=>Vx,name:()=>Ux,settings:()=>qx});var ne={};r.r(ne),r.d(ne,{init:()=>Xx,metadata:()=>Jx,name:()=>Kx,settings:()=>Yx});var re={};r.r(re),r.d(re,{init:()=>cb,metadata:()=>eb,name:()=>sb,settings:()=>lb});var ae={};r.r(ae),r.d(ae,{init:()=>vb,metadata:()=>db,name:()=>fb,settings:()=>yb});var ie={};r.r(ie),r.d(ie,{init:()=>Sb,metadata:()=>kb,name:()=>Cb,settings:()=>jb});var se={};r.r(se),r.d(se,{init:()=>qb,metadata:()=>Eb,name:()=>$b,settings:()=>Ub});var le={};r.r(le),r.d(le,{init:()=>ef,metadata:()=>Zb,name:()=>Yb,settings:()=>Xb});var ce={};r.r(ce),r.d(ce,{init:()=>sf,metadata:()=>tf,name:()=>rf,settings:()=>af});var ue={};r.r(ue),r.d(ue,{init:()=>pf,metadata:()=>lf,name:()=>uf,settings:()=>df});var de={};r.r(de),r.d(de,{init:()=>bf,metadata:()=>mf,name:()=>_f,settings:()=>xf});var pe={};r.r(pe),r.d(pe,{init:()=>Cf,metadata:()=>yf,name:()=>kf,settings:()=>wf});var me={};r.r(me),r.d(me,{init:()=>Nf,metadata:()=>Sf,name:()=>Bf,settings:()=>Tf});var ge={};r.r(ge),r.d(ge,{init:()=>Af,metadata:()=>Pf,name:()=>Mf,settings:()=>zf});var he={};r.r(he),r.d(he,{init:()=>Wf,metadata:()=>Hf,name:()=>Uf,settings:()=>qf});var _e={};r.r(_e),r.d(_e,{init:()=>ry,metadata:()=>Zf,name:()=>oy,settings:()=>ny});var xe={};r.r(xe),r.d(xe,{init:()=>uy,metadata:()=>iy,name:()=>ly,settings:()=>cy});var be={};r.r(be),r.d(be,{init:()=>jy,metadata:()=>py,name:()=>wy,settings:()=>Cy});var fe={};r.r(fe),r.d(fe,{init:()=>My,metadata:()=>Sy,name:()=>Iy,settings:()=>Dy});var ye={};r.r(ye),r.d(ye,{init:()=>Fy,metadata:()=>zy,name:()=>Ry,settings:()=>Vy});var ve={};r.r(ve),r.d(ve,{init:()=>Qy,metadata:()=>Oy,name:()=>Zy,settings:()=>Jy});var ke={};r.r(ke),r.d(ke,{init:()=>iv,metadata:()=>Yy,name:()=>rv,settings:()=>av});var we={};r.r(we),r.d(we,{init:()=>pv,metadata:()=>sv,name:()=>uv,settings:()=>dv});var Ce={};r.r(Ce),r.d(Ce,{init:()=>fv,metadata:()=>gv,name:()=>xv,settings:()=>bv});var je={};r.r(je),r.d(je,{init:()=>Vv,metadata:()=>zv,name:()=>Hv,settings:()=>Rv});var Se={};r.r(Se),r.d(Se,{init:()=>Yk,metadata:()=>Ev,name:()=>Qk,settings:()=>Kk});var Be={};r.r(Be),r.d(Be,{init:()=>nw,metadata:()=>Xk,name:()=>tw,settings:()=>ow});var Te={};r.r(Te),r.d(Te,{init:()=>dw,metadata:()=>rw,name:()=>cw,settings:()=>uw});var Ne={};r.r(Ne),r.d(Ne,{init:()=>_w,metadata:()=>pw,name:()=>gw,settings:()=>hw});var Pe={};r.r(Pe),r.d(Pe,{init:()=>vw,metadata:()=>xw,name:()=>fw,settings:()=>yw});var Ie={};r.r(Ie),r.d(Ie,{init:()=>Sw,metadata:()=>kw,name:()=>Cw,settings:()=>jw});var De={};r.r(De),r.d(De,{init:()=>Aw,metadata:()=>Bw,name:()=>Mw,settings:()=>zw});var Me={};r.r(Me),r.d(Me,{init:()=>Ow,metadata:()=>Lw,name:()=>Fw,settings:()=>Ew});var ze={};r.r(ze),r.d(ze,{init:()=>sC,metadata:()=>oC,name:()=>aC,settings:()=>iC});var Ae={};r.r(Ae),r.d(Ae,{init:()=>wC,metadata:()=>cC,name:()=>vC,settings:()=>kC});var Le={};r.r(Le),r.d(Le,{init:()=>BC,metadata:()=>CC,name:()=>jC,settings:()=>SC});var He={};r.r(He),r.d(He,{init:()=>DC,metadata:()=>NC,name:()=>PC,settings:()=>IC});var Re={};r.r(Re),r.d(Re,{init:()=>FC,metadata:()=>zC,name:()=>RC,settings:()=>VC});var Ve={};r.r(Ve),r.d(Ve,{init:()=>JC,metadata:()=>GC,name:()=>WC,settings:()=>ZC});var Fe={};r.r(Fe),r.d(Fe,{init:()=>oj,metadata:()=>XC,name:()=>ej,settings:()=>tj});var Ee={};r.r(Ee),r.d(Ee,{init:()=>mj,metadata:()=>rj,name:()=>dj,settings:()=>pj});var Oe={};r.r(Oe),r.d(Oe,{init:()=>yj,metadata:()=>gj,name:()=>bj,settings:()=>fj});var Ge={};r.r(Ge),r.d(Ge,{init:()=>Tj,metadata:()=>kj,name:()=>Sj,settings:()=>Bj});var $e={};r.r($e),r.d($e,{init:()=>Vj,metadata:()=>zj,name:()=>Hj,settings:()=>Rj});var Ue={};r.r(Ue),r.d(Ue,{init:()=>Wj,metadata:()=>$j,name:()=>Uj,settings:()=>qj});var qe={};r.r(qe),r.d(qe,{init:()=>sS,metadata:()=>nS,name:()=>aS,settings:()=>iS});var We={};r.r(We),r.d(We,{init:()=>WS,metadata:()=>FS,name:()=>US,settings:()=>qS});var Ze={};r.r(Ze),r.d(Ze,{init:()=>rB,metadata:()=>JS,name:()=>oB,settings:()=>nB});var Je={};r.r(Je),r.d(Je,{init:()=>uB,metadata:()=>iB,name:()=>lB,settings:()=>cB});var Qe={};r.r(Qe),r.d(Qe,{init:()=>GB,metadata:()=>bB,name:()=>EB,settings:()=>OB});var Ke={};r.r(Ke),r.d(Ke,{init:()=>tT,metadata:()=>UB,name:()=>XB,settings:()=>eT});var Ye={};r.r(Ye),r.d(Ye,{init:()=>sT,metadata:()=>nT,name:()=>aT,settings:()=>iT});var Xe={};r.r(Xe),r.d(Xe,{init:()=>mT,metadata:()=>cT,name:()=>dT,settings:()=>pT});var et={};r.r(et),r.d(et,{init:()=>RT,metadata:()=>gT,name:()=>LT,settings:()=>HT});var tt={};r.r(tt),r.d(tt,{init:()=>UT,metadata:()=>VT,name:()=>GT,settings:()=>$T});var ot={};r.r(ot),r.d(ot,{init:()=>QT,metadata:()=>qT,name:()=>ZT,settings:()=>JT});var nt={};r.r(nt),r.d(nt,{init:()=>aN,metadata:()=>eN,name:()=>nN,settings:()=>rN});var rt={};r.r(rt),r.d(rt,{init:()=>BN,metadata:()=>sN,name:()=>jN,settings:()=>SN});var at={};r.r(at),r.d(at,{init:()=>ON,metadata:()=>TN,name:()=>FN,settings:()=>EN});const it=window.ReactJSXRuntime,st=window.wp.blocks,lt=window.wp.data,ct=window.wp.blockEditor,ut=window.wp.serverSideRender;var dt=r.n(ut);const pt=window.wp.i18n,mt=window.wp.components,gt=window.wp.element,ht=window.wp.blob,_t=window.wp.coreData,xt=window.wp.compose;function bt(e,t,o){return(0,lt.useSelect)((n=>n(_t.store).canUser("update",{kind:e,name:t,id:o})),[e,t,o])}function ft(e={}){const t=(0,gt.useRef)(e),o=(0,gt.useRef)(!1),{getSettings:n}=(0,lt.useSelect)(ct.store);(0,gt.useLayoutEffect)((()=>{t.current=e})),(0,gt.useEffect)((()=>{if(o.current)return;if(!t.current.url||!(0,ht.isBlobURL)(t.current.url))return;const e=(0,ht.getBlobByURL)(t.current.url);if(!e)return;const{url:r,allowedTypes:a,onChange:i,onError:s}=t.current,{mediaUpload:l}=n();l&&(o.current=!0,l({filesList:[e],allowedTypes:a,onFileChange:([e])=>{(0,ht.isBlobURL)(e?.url)||((0,ht.revokeBlobURL)(r),i(e),o.current=!1)},onError:e=>{(0,ht.revokeBlobURL)(r),s(e),o.current=!1}}))}),[n])}function yt(){const{avatarURL:e}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o}));return e}function vt(){return(0,xt.useViewportMatch)("medium","<")?{}:{popoverProps:{placement:"left-start",offset:259}}}const kt="core/accordion-item",wt={name:kt};const Ct=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion","title":"Accordion","category":"design","description":"Displays a foldable layout that groups content in collapsible sections.","example":{},"supports":{"anchor":true,"html":false,"align":["wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"background":true,"gradients":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true},"shadow":true,"layout":true,"ariaLabel":true,"interactivity":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"iconPosition":{"type":"string","default":"right"},"showIcon":{"type":"boolean","default":true},"autoclose":{"type":"boolean","default":false},"headingLevel":{"type":"number","default":3},"levelOptions":{"type":"array"}},"providesContext":{"core/accordion-icon-position":"iconPosition","core/accordion-show-icon":"showIcon","core/accordion-heading-level":"headingLevel"},"allowedBlocks":["core/accordion-item"],"textdomain":"default","viewScriptModule":"@wordpress/block-library/accordion/view"}');function jt(e){if(!e)return;const{metadata:t,settings:o,name:n}=e;return(0,st.registerBlockType)({name:n,...t},o)}const St=window.wp.primitives;var Bt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.25L9.5 9.25L9.5 7.75L19.5 7.75L19.5 9.25Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 6L8.5 8.5L4.5 11L4.5 6Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.25L9.5 16.25L9.5 14.75L19.5 14.75L19.5 16.25Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 13L8.5 15.5L4.5 18L4.5 13Z",fill:"currentColor"})]});const{name:Tt}=Ct,Nt={icon:Bt,example:{innerBlocks:[{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,pt.__)("Lorem ipsum dolor sit amet, consectetur.")}}]},{name:"core/accordion-item",innerBlocks:[{name:"core/accordion-heading",attributes:{title:(0,pt.__)("Suspendisse commodo lacus, interdum et.")}}]}]},edit:function({attributes:{autoclose:e,iconPosition:t,showIcon:o,headingLevel:n,levelOptions:r},clientId:a,setAttributes:i,isSelected:s}){const l=(0,lt.useRegistry)(),{getBlockOrder:c}=(0,lt.useSelect)(ct.store),u=(0,ct.useBlockProps)({role:"group"}),d=vt(),{updateBlockAttributes:p,insertBlock:m}=(0,lt.useDispatch)(ct.store),g="contentOnly"===(0,ct.useBlockEditingMode)(),h=(0,ct.useInnerBlocksProps)(u,{template:[[kt]],defaultBlock:wt,directInsert:!0,templateInsertUpdatesSelection:!0});return(0,it.jsxs)(it.Fragment,{children:[s&&!g&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>{const t=c(a),o=[];t.forEach((e=>{const t=c(e);o.push(...t)})),l.batch((()=>{i({headingLevel:e}),p(o,{level:e})}))}})})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>{const e=(0,st.createBlock)(kt,{},[(0,st.createBlock)("core/accordion-heading",{level:n}),(0,st.createBlock)("core/accordion-panel",{})]);m(e,void 0,a)},children:(0,pt.__)("Add")})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({autoclose:!1,showIcon:!0,iconPosition:"right"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Auto-close"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>i({autoclose:!1}),children:(0,it.jsx)(mt.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Auto-close"),onChange:e=>{i({autoclose:e})},checked:e,help:(0,pt.__)("Automatically close accordions when a new one is opened.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show icon"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>i({showIcon:!0}),children:(0,it.jsx)(mt.ToggleControl,{isBlock:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show icon"),onChange:e=>{i({showIcon:e,iconPosition:e?t:"right"})},checked:o,help:(0,pt.__)("Display a plus icon next to the accordion header.")})}),o&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Icon Position"),isShownByDefault:!0,hasValue:()=>"right"!==t,onDeselect:()=>i({iconPosition:"right"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,pt.__)("Icon Position"),value:t,onChange:e=>{i({iconPosition:e})},children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{label:(0,pt.__)("Left"),value:"left"}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{label:(0,pt.__)("Right"),value:"right"})]})})]})},"setting"),(0,it.jsx)("div",{...h})]})},save:function(){const e=ct.useBlockProps.save({role:"group"});return(0,it.jsx)("div",{...ct.useInnerBlocksProps.save(e)})}},Pt=()=>jt({name:Tt,metadata:Ct,settings:Nt});function It(e){var t,o,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(o=It(e[t]))&&(n&&(n+=" "),n+=o)}else for(o in e)e[o]&&(n&&(n+=" "),n+=o);return n}const Dt=function(){for(var e,t,o=0,n="",r=arguments.length;o<r;o++)(e=arguments[o])&&(t=It(e))&&(n&&(n+=" "),n+=t);return n};const Mt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-item","title":"Accordion Item","category":"design","description":"Wraps the heading and panel in one unit.","parent":["core/accordion"],"allowedBlocks":["core/accordion-heading","core/accordion-panel"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"margin":["top","bottom"],"blockGap":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"shadow":true,"layout":{"allowEditing":false},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"contentRole":true},"attributes":{"openByDefault":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-item"}');var zt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 9.5L9.5 9.5L9.5 8L19.5 8L19.5 9.5Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 13L9.5 13L9.5 11.5L19.5 11.5L19.5 13Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 16.3999L9.5 16.3999L9.5 14.8999L19.5 14.8999L19.5 16.3999Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 6.25L8.5 8.75L4.5 11.25L4.5 6.25Z",fill:"currentColor"})]});const{name:At}=Mt,Lt={icon:zt,edit:function({attributes:e,clientId:t,setAttributes:o,context:n}){const{openByDefault:r}=e,a=vt(),{isSelected:i,getBlockOrder:s}=(0,lt.useSelect)((e=>{const{isBlockSelected:o,hasSelectedInnerBlock:n,getBlockOrder:r}=e(ct.store);return{isSelected:o(t)||n(t,!0),getBlockOrder:r}}),[t]),l=s(t)[1],{updateBlockAttributes:c,__unstableMarkNextChangeAsNotPersistent:u}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{l&&(u(),c(l,{isSelected:i}))}),[i,l,u,c]);const d=(0,ct.useBlockProps)({className:Dt({"is-open":r||i})}),p=n&&n["core/accordion-heading-level"],m=(0,ct.useInnerBlocksProps)(d,{template:[["core/accordion-heading",p?{level:p}:{}],["core/accordion-panel",{openByDefault:r}]],templateLock:"all",directInsert:!0,templateInsertUpdatesSelection:!0});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({openByDefault:!1}),l&&c(l,{openByDefault:!1})},dropdownMenuProps:a,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open by default"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>{o({openByDefault:!1}),l&&c(l,{openByDefault:!1})},children:(0,it.jsx)(mt.ToggleControl,{label:(0,pt.__)("Open by default"),__nextHasNoMarginBottom:!0,onChange:e=>{o({openByDefault:e}),l&&c(l,{openByDefault:e})},checked:r,help:(0,pt.__)("Accordion content will be displayed by default.")})})})},"setting"),(0,it.jsx)("div",{...m})]})},save:function({attributes:e}){const{openByDefault:t}=e,o=ct.useBlockProps.save({className:Dt({"is-open":t})}),n=ct.useInnerBlocksProps.save(o);return(0,it.jsx)("div",{...n})}},Ht=()=>jt({name:At,metadata:Mt,settings:Lt});const Rt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-heading","title":"Accordion Heading","category":"design","description":"Displays a heading that toggles the accordion panel.","parent":["core/accordion-item"],"usesContext":["core/accordion-icon-position","core/accordion-show-icon","core/accordion-heading-level"],"supports":{"anchor":true,"color":{"background":true,"gradients":true},"align":false,"interactivity":true,"spacing":{"padding":true,"__experimentalDefaultControls":{"padding":true},"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-accordion-heading__toggle"},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"__experimentalSkipSerialization":["textDecoration","letterSpacing"],"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"fontFamily":true}},"shadow":true,"blockVisibility":false,"lock":false},"selectors":{"typography":{"letterSpacing":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title","textDecoration":".wp-block-accordion-heading .wp-block-accordion-heading__toggle-title"}},"attributes":{"openByDefault":{"type":"boolean","default":false},"title":{"type":"rich-text","source":"rich-text","selector":".wp-block-accordion-heading__toggle-title","role":"content"},"level":{"type":"number"},"iconPosition":{"type":"string","enum":["left","right"],"default":"right"},"showIcon":{"type":"boolean","default":true}},"textdomain":"default"}');var Vt=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.5 12.75L9.5 12.75L9.5 11.25L19.5 11.25L19.5 12.75Z",fill:"currentColor"}),(0,it.jsx)(St.Path,{d:"M4.5 9.5L8.5 12L4.5 14.5L4.5 9.5Z",fill:"currentColor"})]});const Ft={attributes:{openByDefault:{type:"boolean",default:!1},title:{type:"rich-text",source:"rich-text",selector:".wp-block-accordion-heading__toggle-title",role:"content"},level:{type:"number"},iconPosition:{type:"string",enum:["left","right"],default:"right"},showIcon:{type:"boolean",default:!0}},supports:{anchor:!0,color:{background:!0,gradients:!0},align:!1,interactivity:!0,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0},__experimentalSkipSerialization:!0,__experimentalSelector:".wp-block-accordion-heading__toggle"},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontFamily:!0}},shadow:!0,blockVisibility:!1},save({attributes:e}){const{level:t,title:o,iconPosition:n,showIcon:r}=e,a="h"+(t||3),i=ct.useBlockProps.save(),s=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(a,{...i,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:s.style,children:[r&&"left"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:o}),r&&"right"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})}};var Et=[Ft];const{name:Ot}=Rt,Gt={icon:Vt,edit:function({attributes:e,setAttributes:t,context:o}){const{title:n}=e,{"core/accordion-icon-position":r,"core/accordion-show-icon":a,"core/accordion-heading-level":i}=o,s="h"+i;(0,gt.useEffect)((()=>{void 0!==r&&void 0!==a&&t({iconPosition:r,showIcon:a})}),[r,a,t]);const[l,c]=(0,ct.useSettings)("typography.fluid","layout"),u=(0,ct.getTypographyClassesAndStyles)(e,{typography:{fluid:l},layout:{wideSize:c?.wideSize}}),d=(0,ct.useBlockProps)(),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(s,{...d,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:p.style,tabIndex:"-1",children:[a&&"left"===r&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText,{withoutInteractiveFormatting:!0,disableLineBreaks:!0,tagName:"span",value:n,onChange:e=>t({title:e}),placeholder:(0,pt.__)("Accordion title"),className:"wp-block-accordion-heading__toggle-title",style:{letterSpacing:u.style.letterSpacing,textDecoration:u.style.textDecoration}}),a&&"right"===r&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})},save:function({attributes:e}){const{level:t,title:o,iconPosition:n,showIcon:r}=e,a="h"+(t||3),i=(0,ct.getTypographyClassesAndStyles)(e),s=ct.useBlockProps.save(),l=(0,ct.__experimentalGetSpacingClassesAndStyles)(e);return(0,it.jsx)(a,{...s,children:(0,it.jsxs)("button",{className:"wp-block-accordion-heading__toggle",style:l.style,children:[r&&"left"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"}),(0,it.jsx)(ct.RichText.Content,{className:"wp-block-accordion-heading__toggle-title",tagName:"span",value:o,style:{letterSpacing:i.style.letterSpacing,textDecoration:i.style.textDecoration}}),r&&"right"===n&&(0,it.jsx)("span",{className:"wp-block-accordion-heading__toggle-icon","aria-hidden":"true",children:"+"})]})})},deprecated:Et},$t=()=>jt({name:Ot,metadata:Rt,settings:Gt});const Ut=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/accordion-panel","title":"Accordion Panel","category":"design","description":"Contains the hidden or revealed content beneath the heading.","parent":["core/accordion-item"],"supports":{"html":false,"color":{"background":true,"gradients":true},"interactivity":true,"spacing":{"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"shadow":true,"layout":{"allowEditing":false},"blockVisibility":false,"contentRole":true,"allowedBlocks":true,"lock":false},"attributes":{"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false],"default":false},"openByDefault":{"type":"boolean","default":false},"isSelected":{"type":"boolean","default":false}},"textdomain":"default","style":"wp-block-accordion-panel"}');var qt=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.10417 6.00024H6.5C5.39543 6.00024 4.5 6.89567 4.5 8.00024V10.3336H6V8.00024C6 7.7241 6.22386 7.50024 6.5 7.50024H8.10417V6.00024ZM4.5 13.6669V16.0002C4.5 17.1048 5.39543 18.0002 6.5 18.0002H8.10417V16.5002H6.5C6.22386 16.5002 6 16.2764 6 16.0002V13.6669H4.5ZM10.3958 6.00024V7.50024H13.6042V6.00024H10.3958ZM15.8958 6.00024V7.50024H17.5C17.7761 7.50024 18 7.7241 18 8.00024V10.3336H19.5V8.00024C19.5 6.89567 18.6046 6.00024 17.5 6.00024H15.8958ZM19.5 13.6669H18V16.0002C18 16.2764 17.7761 16.5002 17.5 16.5002H15.8958V18.0002H17.5C18.6046 18.0002 19.5 17.1048 19.5 16.0002V13.6669ZM13.6042 18.0002V16.5002H10.3958V18.0002H13.6042Z",fill:"currentColor"})});const{name:Wt}=Ut,Zt={icon:qt,edit:function({attributes:e}){const{allowedBlocks:t,templateLock:o,openByDefault:n,isSelected:r}=e,a=(0,ct.useBlockProps)({"aria-hidden":!r&&!n,role:"region"}),i=(0,ct.useInnerBlocksProps)(a,{allowedBlocks:t,template:[["core/paragraph",{}]],templateLock:o});return(0,it.jsx)("div",{...i})},save:function(){const e=ct.useBlockProps.save({role:"region"}),t=ct.useInnerBlocksProps.save(e);return(0,it.jsx)("div",{...t})}},Jt=()=>jt({name:Wt,metadata:Ut,settings:Zt});var Qt=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})});const Kt=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/archives","title":"Archives","category":"widgets","description":"Display a date archive of your posts.","textdomain":"default","attributes":{"displayAsDropdown":{"type":"boolean","default":false},"showLabel":{"type":"boolean","default":true},"showPostCounts":{"type":"boolean","default":false},"type":{"type":"string","default":"monthly"}},"supports":{"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-archives-editor"}');const{name:Yt}=Kt,Xt={icon:Qt,example:{},edit:function({attributes:e,setAttributes:t}){const{showLabel:o,showPostCounts:n,displayAsDropdown:r,type:a}=e,i=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsDropdown:!1,showLabel:!0,showPostCounts:!1,type:"monthly"})},dropdownMenuProps:i,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display as dropdown"),isShownByDefault:!0,hasValue:()=>r,onDeselect:()=>t({displayAsDropdown:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as dropdown"),checked:r,onChange:()=>t({displayAsDropdown:!r})})}),r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show label"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>t({showLabel:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show label"),checked:o,onChange:()=>t({showLabel:!o})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show post counts"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>t({showPostCounts:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post counts"),checked:n,onChange:()=>t({showPostCounts:!n})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Group by"),isShownByDefault:!0,hasValue:()=>"monthly"!==a,onDeselect:()=>t({type:"monthly"}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Group by"),options:[{label:(0,pt.__)("Year"),value:"yearly"},{label:(0,pt.__)("Month"),value:"monthly"},{label:(0,pt.__)("Week"),value:"weekly"},{label:(0,pt.__)("Day"),value:"daily"}],value:a,onChange:e=>t({type:e})})})]})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/archives",skipBlockSupportAttributes:!0,attributes:e})})})]})}},eo=()=>jt({name:Yt,metadata:Kt,settings:Xt});var to=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const oo=JSON.parse('{"$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":false},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postType","postId","commentId"],"supports":{"html":false,"align":true,"alignWide":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"radius":true,"width":true,"color":true,"style":true,"__experimentalDefaultControls":{"radius":true}},"color":{"text":false,"background":false},"filter":{"duotone":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-avatar img","filter":{"duotone":".wp-block-avatar img"}},"editorStyle":"wp-block-avatar-editor","style":"wp-block-avatar"}'),no=window.wp.url;function ro(e){const t=e?e[0]:24,o=e?e[e.length-1]:96;return{minSize:t,maxSize:Math.floor(2.5*o)}}const ao=window.wp.htmlEntities,io={who:"authors",per_page:100,_fields:"id,name",context:"view"};function so({value:e,onChange:t}){const[o,n]=(0,gt.useState)(""),{authors:r,isLoading:a}=(0,lt.useSelect)((e=>{const{getUsers:t,isResolving:n}=e(_t.store),r={...io};return o&&(r.search=o,r.search_columns=["name"]),{authors:t(r),isLoading:n("getUsers",[r])}}),[o]),i=(0,gt.useMemo)((()=>(r??[]).map((e=>({value:e.id,label:(0,ao.decodeEntities)(e.name)})))),[r]);return(0,it.jsx)(mt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("User"),help:(0,pt.__)("Select the avatar user to display, if it is blank it will use the post/page author."),value:e,onChange:t,options:i,onFilterValueChange:(0,xt.debounce)(n,300),isLoading:a})}const lo=({setAttributes:e,avatar:t,attributes:o,selectUser:n})=>{const r=vt();return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({size:96,isLink:!1,linkTarget:"_self",userId:void 0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Image size"),isShownByDefault:!0,hasValue:()=>96!==o?.size,onDeselect:()=>e({size:96}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image size"),onChange:t=>e({size:t}),min:t.minSize,max:t.maxSize,initialPosition:o?.size,value:o?.size})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to user profile"),isShownByDefault:!0,hasValue:()=>o?.isLink,onDeselect:()=>e({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to user profile"),onChange:()=>e({isLink:!o.isLink}),checked:o.isLink})}),o.isLink&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==o?.linkTarget,onDeselect:()=>e({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:t=>e({linkTarget:t?"_blank":"_self"}),checked:"_blank"===o.linkTarget})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("User"),isShownByDefault:!0,hasValue:()=>!!o?.userId,onDeselect:()=>e({userId:void 0}),children:(0,it.jsx)(so,{value:o?.userId,onChange:t=>{e({userId:t})}})})]})})},co=({setAttributes:e,attributes:t,avatar:o,blockProps:n,isSelected:r})=>{const a=(0,ct.__experimentalUseBorderProps)(t),i=(0,no.addQueryArgs)((0,no.removeQueryArgs)(o?.src,["s"]),{s:2*t?.size});return(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.ResizableBox,{size:{width:t.size,height:t.size},showHandle:r,onResizeStop:(o,n,r,a)=>{e({size:parseInt(t.size+(a.height||a.width),10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,pt.isRTL)(),bottom:!0,left:(0,pt.isRTL)()},minWidth:o.minSize,maxWidth:o.maxSize,children:(0,it.jsx)("img",{src:i,alt:o.alt,className:Dt("avatar","avatar-"+t.size,"photo","wp-block-avatar__image",a.className),style:a.style})})})},uo=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{commentId:r}=t,a=(0,ct.useBlockProps)(),i=function({commentId:e}){const[t]=(0,_t.useEntityProp)("root","comment","author_avatar_urls",e),[o]=(0,_t.useEntityProp)("root","comment","author_name",e),n=t?Object.values(t):null,r=t?Object.keys(t):null,{minSize:a,maxSize:i}=ro(r),s=yt();return{src:n?n[n.length-1]:s,minSize:a,maxSize:i,alt:o?(0,pt.sprintf)((0,pt.__)("%s Avatar"),o):(0,pt.__)("Default Avatar")}}({commentId:r});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lo,{avatar:i,setAttributes:o,attributes:e,selectUser:!1}),e.isLink?(0,it.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:a,isSelected:n,setAttributes:o})}):(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:a,isSelected:n,setAttributes:o})]})},po=({attributes:e,context:t,setAttributes:o,isSelected:n})=>{const{postId:r,postType:a}=t,i=function({userId:e,postId:t,postType:o}){const{authorDetails:n}=(0,lt.useSelect)((n=>{const{getEditedEntityRecord:r,getUser:a}=n(_t.store);if(e)return{authorDetails:a(e)};const i=r("postType",o,t)?.author;return{authorDetails:i?a(i):null}}),[o,t,e]),r=n?.avatar_urls?Object.values(n.avatar_urls):null,a=n?.avatar_urls?Object.keys(n.avatar_urls):null,{minSize:i,maxSize:s}=ro(a),l=yt();return{src:r?r[r.length-1]:l,minSize:i,maxSize:s,alt:n?(0,pt.sprintf)((0,pt.__)("%s Avatar"),n?.name):(0,pt.__)("Default Avatar")}}({userId:e?.userId,postId:r,postType:a}),s=(0,ct.useBlockProps)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lo,{selectUser:!0,attributes:e,avatar:i,setAttributes:o}),e.isLink?(0,it.jsx)("a",{href:"#avatar-pseudo-link",className:"wp-block-avatar__link",onClick:e=>e.preventDefault(),children:(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})}):(0,it.jsx)(co,{attributes:e,avatar:i,blockProps:s,isSelected:n,setAttributes:o})]})};const{name:mo}=oo,go={icon:to,edit:function(e){return e?.context?.commentId||null===e?.context?.commentId?(0,it.jsx)(uo,{...e}):(0,it.jsx)(po,{...e})},example:{}},ho=()=>jt({name:mo,metadata:oo,settings:go});var _o=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})}),xo=[{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:o,loop:n,preload:r,src:a}=e;return(0,it.jsxs)("figure",{children:[(0,it.jsx)("audio",{controls:"controls",src:a,autoPlay:t,loop:n,preload:r}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}}];const bo=window.wp.notices;function fo(e,t){var o,n,r=0;function a(){var a,i,s=o,l=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<l;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==o&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=o,s.prev=null,o.prev=s,o=s),s.val}s=s.next}for(a=new Array(l),i=0;i<l;i++)a[i]=arguments[i];return s={args:a,val:e.apply(null,a)},o?(o.prev=s,s.next=o):n=s,r===t.maxSize?(n=n.prev).next=null:r++,o=s,s.val}return t=t||{},a.clear=function(){o=null,n=null,r=0},a}const yo=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/embed","title":"Embed","category":"embed","description":"Add a block that displays content pulled from other sites, like Twitter or YouTube.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"type":{"type":"string","role":"content"},"providerNameSlug":{"type":"string","role":"content"},"allowResponsive":{"type":"boolean","default":true},"responsive":{"type":"boolean","default":false,"role":"content"},"previewable":{"type":"boolean","default":true,"role":"content"}},"supports":{"align":true,"spacing":{"margin":true},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-embed-editor","style":"wp-block-embed"}'),vo=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.78",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],ko="wp-embed",wo=window.wp.privateApis,{lock:Co,unlock:jo}=(0,wo.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/block-library"),{name:So}=yo,{kebabCase:Bo}=jo(mt.privateApis),To=e=>e&&e.includes('class="wp-embedded-content"'),No=(e,t={})=>{const{preview:o,attributes:n={}}=e,{url:r,providerNameSlug:a,type:i,...s}=n;if(!r||!(0,st.getBlockType)(So))return;const l=(e=>(0,st.getBlockVariations)(So)?.find((({patterns:t})=>((e,t=[])=>t.some((t=>e.match(t))))(e,t))))(r),c="wordpress"===a||i===ko;if(!c&&l&&(l.attributes.providerNameSlug!==a||!a))return(0,st.createBlock)(So,{url:r,...s,...l.attributes});const u=(0,st.getBlockVariations)(So)?.find((({name:e})=>"wordpress"===e));return u&&o&&To(o.html)&&!c?(0,st.createBlock)(So,{url:r,...u.attributes,...t}):void 0},Po=e=>{if(!e)return e;const t=vo.reduce(((e,{className:t})=>(e.push(t),e)),["wp-has-aspect-ratio"]);let o=e;for(const e of t)o=o.replace(e,"");return o.trim()};function Io(e,t,o=!0){if(!o)return Po(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=n.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let o=0;o<vo.length;o++){const n=vo[o];if(e>=n.ratio){return e-n.ratio>.1?Po(t):Dt(Po(t),n.className,"wp-has-aspect-ratio")}}}return t}const Do=fo(((e,t,o,n,r=!0)=>{if(!e)return{};const a={};let{type:i="rich"}=e;const{html:s,provider_name:l}=e,c=Bo((l||t).toLowerCase());return To(s)&&(i=ko),(s||"photo"===i)&&(a.type=i,a.providerNameSlug=c),(u=o)&&vo.some((({className:e})=>u.includes(e)))||(a.className=Io(s,o,n&&r)),a;var u}));var Mo=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});function zo({attributeKey:e="caption",attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:r,placeholder:a=(0,pt.__)("Add caption"),label:i=(0,pt.__)("Caption text"),showToolbarButton:s=!0,excludeElementClassName:l,className:c,readOnly:u,tagName:d="figcaption",addLabel:p=(0,pt.__)("Add caption"),removeLabel:m=(0,pt.__)("Remove caption"),icon:g=Mo,...h}){const _=t[e],x=(0,xt.usePrevious)(_),{PrivateRichText:b}=jo(ct.privateApis),f=b.isEmpty(_),y=b.isEmpty(x),[v,k]=(0,gt.useState)(!f);(0,gt.useEffect)((()=>{!f&&y&&k(!0)}),[f,y]),(0,gt.useEffect)((()=>{!n&&f&&k(!1)}),[n,f]);const w=(0,gt.useCallback)((e=>{e&&f&&e.focus()}),[f]);return(0,it.jsxs)(it.Fragment,{children:[s&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>{k(!v),v&&_&&o({[e]:void 0})},icon:g,isPressed:v,label:v?m:p})}),v&&(!b.isEmpty(_)||n)&&(0,it.jsx)(b,{identifier:e,tagName:d,className:Dt(c,l?"":(0,ct.__experimentalGetElementClassName)("caption")),ref:w,"aria-label":i,placeholder:a,value:_,onChange:t=>o({[e]:t}),inlineToolbar:!0,__unstableOnSplitAtEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)())),readOnly:u,...h})]})}const Ao=["audio"];var Lo=function({attributes:e,className:t,setAttributes:o,onReplace:n,isSelected:r,insertBlocksAfter:a}){const{id:i,autoplay:s,loop:l,preload:c,src:u}=e,[d,p]=(0,gt.useState)(e.blob),m="default"===(0,ct.useBlockEditingMode)();function g(e){return t=>{o({[e]:t})}}function h(e){if(e!==u){const t=No({attributes:{url:e}});if(void 0!==t&&n)return void n(t);o({src:e,id:void 0,blob:void 0}),p()}}ft({url:d,allowedTypes:Ao,onChange:b,onError:x});const{createErrorNotice:_}=(0,lt.useDispatch)(bo.store);function x(e){_(e,{type:"snackbar"})}function b(e){if(!e||!e.url)return o({src:void 0,id:void 0,caption:void 0,blob:void 0}),void p();(0,ht.isBlobURL)(e.url)?p(e.url):(o({blob:void 0,src:e.url,id:e.id,caption:e.caption}),p())}const f=Dt(t,{"is-transient":!!d}),y=(0,ct.useBlockProps)({className:f}),v=vt();return u||d?(0,it.jsxs)(it.Fragment,{children:[r&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:i,mediaURL:u,allowedTypes:Ao,accept:"audio/*",onSelect:b,onSelectURL:h,onError:x,onReset:()=>b(void 0)})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({autoplay:!1,loop:!1,preload:void 0})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({autoplay:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Autoplay"),onChange:g("autoplay"),checked:!!s,help:function(e){return e?(0,pt.__)("Autoplay may cause usability issues for some users."):null}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!l,onDeselect:()=>o({loop:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Loop"),onChange:g("loop"),checked:!!l})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Preload"),isShownByDefault:!0,hasValue:()=>!!c,onDeselect:()=>o({preload:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt._x)("Preload","noun; Audio block parameter"),value:c||"",onChange:e=>o({preload:e||void 0}),options:[{value:"",label:(0,pt.__)("Browser default")},{value:"auto",label:(0,pt.__)("Auto")},{value:"metadata",label:(0,pt.__)("Metadata")},{value:"none",label:(0,pt._x)("None","Preload value")}]})})]})}),(0,it.jsxs)("figure",{...y,children:[(0,it.jsx)(mt.Disabled,{isDisabled:!r,children:(0,it.jsx)("audio",{controls:"controls",src:u??d})}),!!d&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(zo,{attributes:e,setAttributes:o,isSelected:r,insertBlocksAfter:a,label:(0,pt.__)("Audio caption text"),showToolbarButton:r&&m})]})]}):(0,it.jsx)("div",{...y,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:_o}),onSelect:b,onSelectURL:h,accept:"audio/*",allowedTypes:Ao,value:e,onError:x})})};const Ho=JSON.parse('{"$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":{"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"audio","attribute":"src","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"id":{"type":"number","role":"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":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-audio-editor","style":"wp-block-audio"}');var Ro={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("audio/"),transform(e){const t=e[0];return(0,st.createBlock)("core/audio",{blob:(0,ht.createBlobURL)(t)})}},{type:"shortcode",tag:"audio",attributes:{src:{type:"string",shortcode:({named:{src:e,mp3:t,m4a:o,ogg:n,wav:r,wma:a}})=>e||t||o||n||r||a},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}}]};const{name:Vo}=Ho,Fo={icon:_o,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg"},viewportWidth:350},transforms:Ro,deprecated:xo,edit:Lo,save:function({attributes:e}){const{autoplay:t,caption:o,loop:n,preload:r,src:a}=e;return a&&(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsx)("audio",{controls:"controls",src:a,autoPlay:t,loop:n,preload:r}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o,className:(0,ct.__experimentalGetElementClassName)("caption")})]})}},Eo=()=>jt({name:Vo,metadata:Ho,settings:Fo});var Oo=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h3v-3H4v3Zm6-3.5 2 2-2 2 1 1 3-3-3-3-1 1Zm7 .5v3h3v-3h-3Z"})});const Go=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/breadcrumbs","title":"Breadcrumbs","__experimental":true,"category":"theme","description":"Display a breadcrumb trail for hierarchical post types or based on taxonomy terms.","textdomain":"default","attributes":{"type":{"type":"string","default":"auto","enum":["auto","postWithTerms","postWithAncestors"]},"separator":{"type":"string","default":"/"},"showHomeLink":{"type":"boolean","default":true}},"usesContext":["postId","postType","templateSlug"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":true,"width":true,"style":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-breadcrumbs"}'),$o="/",Uo="auto",qo={auto:{help:(0,pt.__)("Try to automatically determine the best type of breadcrumb for the template.")},postWithAncestors:{help:(0,pt.__)("Shows breadcrumbs based on post hierarchy. Only works for hierarchical post types."),placeholderItems:[(0,pt.__)("Ancestor"),(0,pt.__)("Parent")]},postWithTerms:{help:(0,pt.__)("Shows breadcrumbs based on taxonomy terms. Chooses the first taxonomy with assigned terms and includes ancestors if the taxonomy is hierarchical."),placeholderItems:[(0,pt.__)("Category")]}};const{name:Wo}=Go,Zo={icon:Oo,edit:function({attributes:e,setAttributes:t,context:{postId:o,postType:n,templateSlug:r}}){const{separator:a,showHomeLink:i,type:s}=e,{post:l,isPostTypeHierarchical:c,hasTermsAssigned:u,isLoading:d}=(0,lt.useSelect)((e=>{if(!n)return{};const t=e(_t.store).getEntityRecord("postType",n,o),r=e(_t.store).getPostType(n),a=r&&r.taxonomies.length;let i;return a&&(i=e(_t.store).getTaxonomies({type:n,per_page:-1})),{post:t,isPostTypeHierarchical:r?.hierarchical,hasTermsAssigned:t&&(i||[]).filter((({visibility:e})=>e?.publicly_queryable)).some((e=>!!t[e.rest_base]?.length)),isLoading:!t||!r||a&&!i}}),[n,o]),[p,m]=(0,gt.useState)(0);(0,gt.useEffect)((()=>{m((e=>e+1))}),[l]);const g=(0,ct.useBlockProps)(),h=vt(),{content:_}=(0,ut.useServerSideRender)({attributes:e,skipBlockSupportAttributes:!0,block:"core/breadcrumbs",urlQueryArgs:{post_id:o,invalidationKey:p}});if(d)return(0,it.jsx)("div",{...g,children:(0,it.jsx)(mt.Spinner,{})});let x;const b=["postWithAncestors","postWithTerms"].includes(s);x=b?s:c?"postWithAncestors":"postWithTerms";let f=null;const y=!o||!n||r&&!n||"postWithAncestors"===x&&!c||"postWithTerms"===x&&!u;if(y){const e=[i&&(0,pt.__)("Home"),...r&&!b?[(0,pt.__)("Page")]:qo[x].placeholderItems].filter(Boolean);f=(0,it.jsx)("nav",{style:{"--separator":`'${a}'`},inert:"true",children:(0,it.jsxs)("ol",{children:[e.map(((e,t)=>(0,it.jsx)("li",{children:(0,it.jsx)("a",{href:`#breadcrumbs-pseudo-link-${t}`,children:e})},t))),(0,it.jsx)("li",{children:(0,it.jsx)("span",{"aria-current":"page",children:(0,pt.__)("Current")})})]})})}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({separator:$o,showHomeLink:!0,type:Uo})},dropdownMenuProps:h,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Type"),isShownByDefault:!0,hasValue:()=>s!==Uo,onDeselect:()=>t({type:Uo}),children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Type"),value:s,onChange:e=>t({type:e}),options:[{label:(0,pt.__)("Auto"),value:"auto"},{label:(0,pt.__)("Post with ancestors"),value:"postWithAncestors"},{label:(0,pt.__)("Post with terms"),value:"postWithTerms"}],help:qo[s].help})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show home link"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>t({showHomeLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show home link"),onChange:e=>t({showHomeLink:e}),checked:i})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Separator"),isShownByDefault:!0,hasValue:()=>a!==$o,onDeselect:()=>t({separator:$o}),children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:a,onChange:e=>t({separator:e}),onBlur:()=>{a||t({separator:$o})}})})]})}),(0,it.jsx)("div",{...g,children:y?f:(0,it.jsx)(gt.RawHTML,{inert:"true",children:_})})]})}},Jo=()=>jt({name:Wo,metadata:Go,settings:Zo});var Qo=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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:Ko}=jo(ct.privateApis);function Yo(e){if(!e?.style?.typography?.fontFamily)return e;const{fontFamily:t,...o}=e.style.typography;return{...e,style:Ko({...e.style,typography:o}),fontFamily:t.split("|").pop()}}const Xo=e=>{const{borderRadius:t,...o}=e,n=[t,o.style?.border?.radius].find((e=>"number"==typeof e&&0!==e));return n?{...o,style:{...o.style,border:{...o.style?.border,radius:`${n}px`}}}:o};const en=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:o,customBackgroundColor:n,customGradient:r,...a}=e;return{...a,style:t}},tn=e=>{const{color:t,textColor:o,...n}={...e,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.color&&"#"===e.color[0]?e.color:void 0};return en(n)},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"}},nn={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"},title:{type:"string",source:"attribute",selector:"a,button",attribute:"title",role:"content"},text:{type:"rich-text",source:"rich-text",selector:"a,button",role:"content"},linkTarget:{type:"string",source:"attribute",selector:"a",attribute:"target",role:"content"},rel:{type:"string",source:"attribute",selector:"a",attribute:"rel",role:"content"},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,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalWritingMode:!0,__experimentalDefaultControls:{fontSize:!0}},reusable:!1,shadow:{__experimentalSkipSerialization:!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__link",interactivity:{clientNavigation:!0}},save({attributes:e,className:t}){const{tagName:o,type:n,textAlign:r,fontSize:a,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",_=(0,ct.__experimentalGetBorderClassesAndStyles)(e),x=(0,ct.__experimentalGetColorClassesAndStyles)(e),b=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=Dt("wp-block-button__link",x.className,_.className,{[`has-text-align-${r}`]:r,"no-border-radius":0===l?.border?.radius},(0,ct.__experimentalGetElementClassName)("button")),v={..._.style,...x.style,...b.style,...f.style},k=Dt(t,{[`has-custom-width wp-block-button__width-${p}`]:p,"has-custom-font-size":a||l?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:k}),children:(0,it.jsx)(ct.RichText.Content,{tagName:m,type:g?h:null,className:y,href:g?null:d,title:u,style:v,value:c,target:g?null:i,rel:g?null:s})})}},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:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,ct.__experimentalGetBorderClassesAndStyles)(e),d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),m=Dt("wp-block-button__link",d.className,u.className,{"no-border-radius":0===a?.border?.radius}),g={...u.style,...d.style,...p.style},h=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:h}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:r})})}},an={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:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=(0,ct.__experimentalGetBorderClassesAndStyles)(e),d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),m=Dt("wp-block-button__link",d.className,u.className,{"no-border-radius":0===a?.border?.radius}),g={...u.style,...d.style,...p.style},h=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:h}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:m,href:l,title:s,style:g,value:i,target:n,rel:r})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily},sn=[nn,rn,an,{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})=>"number"==typeof e?.border?.radius,save({attributes:e,className:t}){const{fontSize:o,linkTarget:n,rel:r,style:a,text:i,title:s,url:l,width:c}=e;if(!i)return null;const u=a?.border?.radius,d=(0,ct.__experimentalGetColorClassesAndStyles)(e),p=Dt("wp-block-button__link",d.className,{"no-border-radius":0===a?.border?.radius}),m={borderRadius:u||void 0,...d.style},g=Dt(t,{[`has-custom-width wp-block-button__width-${c}`]:c,"has-custom-font-size":o||a?.typography?.fontSize});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:g}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:p,href:l,title:s,style:m,value:i,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{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:o,linkTarget:n,rel:r,text:a,title:i,url:s,width:l}=e,c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u=Dt("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=Dt(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:p}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{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:o,linkTarget:n,rel:r,text:a,title:i,url:s,width:l}=e,c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u=Dt("wp-block-button__link",c.className,{"no-border-radius":0===o}),d={borderRadius:o?o+"px":void 0,...c.style},p=Dt(t,{[`has-custom-width wp-block-button__width-${l}`]:l});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:p}),children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:s,title:i,style:d,value:a,target:n,rel:r})})},migrate:(0,xt.compose)(Yo,Xo)},{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:o,rel:n,text:r,title:a,url:i}=e,s=Dt("wp-block-button__link",{"no-border-radius":0===t}),l={borderRadius:t?t+"px":void 0};return(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:s,href:i,title:a,style:l,value:r,target:o,rel:n})},migrate:Xo},{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,xt.compose)(Xo,en,(function(e){if(!e.align)return e;const{align:t,...o}=e;return{...o,className:Dt(o.className,`align${e.align}`)}})),save({attributes:e}){const{backgroundColor:t,borderRadius:o,customBackgroundColor:n,customTextColor:r,customGradient:a,linkTarget:i,gradient:s,rel:l,text:c,textColor:u,title:d,url:p}=e,m=(0,ct.getColorClassName)("color",u),g=!a&&(0,ct.getColorClassName)("background-color",t),h=(0,ct.__experimentalGetGradientClass)(s),_=Dt("wp-block-button__link",{"has-text-color":u||r,[m]:m,"has-background":t||n||a||s,[g]:g,"no-border-radius":0===o,[h]:h}),x={background:a||void 0,backgroundColor:g||a||s?void 0:n,color:m?void 0:r,borderRadius:o?o+"px":void 0};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:_,href:p,title:d,style:x,value:c,target:i,rel:l})})}},{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=>e.className&&e.className.includes("is-style-squared"),migrate(e){let t=e.className;return t&&(t=t.replace(/is-style-squared[\s]?/,"").trim()),Xo(en({...e,className:t||void 0,borderRadius:0}))},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,customTextColor:n,linkTarget:r,rel:a,text:i,textColor:s,title:l,url:c}=e,u=(0,ct.getColorClassName)("color",s),d=(0,ct.getColorClassName)("background-color",t),p=Dt("wp-block-button__link",{"has-text-color":s||n,[u]:u,"has-background":t||o,[d]:d}),m={backgroundColor:d?void 0:o,color:u?void 0:n};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:p,href:c,title:l,style:m,value:i,target:r,rel:a})})}},{attributes:{...on,align:{type:"string",default:"none"},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"}},migrate:tn,save({attributes:e}){const{url:t,text:o,title:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s}=e,l=(0,ct.getColorClassName)("color",a),c=(0,ct.getColorClassName)("background-color",r),u=Dt("wp-block-button__link",{"has-text-color":a||s,[l]:l,"has-background":r||i,[c]:c}),d={backgroundColor:c?void 0:i,color:l?void 0:s};return(0,it.jsx)("div",{children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:u,href:t,title:n,style:d,value:o})})}},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:r,color:a,textColor:i}=e,s={backgroundColor:a,color:i};return(0,it.jsx)("div",{className:`align${r}`,children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",className:"wp-block-button__link",href:t,title:n,style:s,value:o})})},migrate:tn},{attributes:{...on,color:{type:"string"},textColor:{type:"string"},align:{type:"string",default:"none"}},save({attributes:e}){const{url:t,text:o,title:n,align:r,color:a,textColor:i}=e;return(0,it.jsx)("div",{className:`align${r}`,style:{backgroundColor:a},children:(0,it.jsx)(ct.RichText.Content,{tagName:"a",href:t,title:n,style:{color:i},value:o})})},migrate:tn}];var ln=sn;const cn="noreferrer noopener",un="_blank",dn="nofollow";function pn(e){return e.toString().replace(/<\/?a[^>]*>/g,"")}const mn=window.wp.keycodes;var gn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),hn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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{HTMLElementControl:_n}=jo(ct.privateApis),xn=[...ct.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,pt.__)("Mark as nofollow")}];function bn({selectedWidth:e,setAttributes:t}){const o=vt();return(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>t({width:void 0}),dropdownMenuProps:o,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Width"),isShownByDefault:!0,hasValue:()=>!!e,onDeselect:()=>t({width:void 0}),__nextHasNoMarginBottom:!0,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{label:(0,pt.__)("Width"),value:e,onChange:e=>t({width:e}),isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[25,50,75,100].map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e,label:(0,pt.sprintf)((0,pt.__)("%d%%"),e)},e)))})})})}var fn=function(e){const{attributes:t,setAttributes:o,className:n,isSelected:r,onReplace:a,mergeBlocks:i,clientId:s,context:l}=e,{tagName:c,textAlign:u,linkTarget:d,placeholder:p,rel:m,style:g,text:h,url:_,width:x,metadata:b}=t,f=c||"a",[y,v]=(0,gt.useState)(null),k=(0,ct.__experimentalUseBorderProps)(t),w=(0,ct.__experimentalUseColorProps)(t),C=(0,ct.__experimentalGetSpacingClassesAndStyles)(t),j=(0,ct.__experimentalGetShadowClassesAndStyles)(t),S=(0,gt.useRef)(),B=(0,gt.useRef)(),T=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([v,S]),onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")?V(e):mn.isKeyboardEvent.primaryShift(e,"k")&&(F(),B.current?.focus())}}),N=(0,ct.useBlockEditingMode)(),[P,I]=(0,gt.useState)(!1),D=!!_,M=d===un,z=!!m?.includes(dn),A="a"===f,{createPageEntity:L,userCanCreatePages:H,lockUrlControls:R=!1}=(0,lt.useSelect)((e=>{if(!r)return{};const t=e(ct.store).getSettings(),o=(0,st.getBlockBindingsSource)(b?.bindings?.url?.source);return{createPageEntity:t.__experimentalCreatePageEntity,userCanCreatePages:t.__experimentalUserCanCreatePages,lockUrlControls:!!b?.bindings?.url&&!o?.canUserEditValue?.({select:e,context:l,args:b?.bindings?.url?.args})}}),[l,r,b?.bindings?.url]);function V(e){e.preventDefault(),I(!0)}function F(){o({url:void 0,linkTarget:void 0,rel:void 0}),I(!1)}(0,gt.useEffect)((()=>{r||I(!1)}),[r]);const E=(0,gt.useMemo)((()=>({url:_,opensInNewTab:M,nofollow:z})),[_,M,z]),O=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlock:n,getBlockRootClientId:r,getBlockIndex:a}=(0,lt.useSelect)(ct.store),i=(0,gt.useRef)(e);return i.current=e,(0,xt.useRefEffect)((e=>{function s(e){if(e.defaultPrevented||e.keyCode!==mn.ENTER)return;const{content:s,clientId:l}=i.current;if(s.length)return;e.preventDefault();const c=n(r(l)),u=a(l),d=(0,st.cloneBlock)({...c,innerBlocks:c.innerBlocks.slice(0,u)}),p=(0,st.createBlock)((0,st.getDefaultBlockName)()),m=c.innerBlocks.slice(u+1),g=m.length?[(0,st.cloneBlock)({...c,innerBlocks:m})]:[];t(c.clientId,[d,p,...g],1),o(p.clientId)}return e.addEventListener("keydown",s),()=>{e.removeEventListener("keydown",s)}}),[])}({content:h,clientId:s}),G=(0,xt.useMergeRefs)([O,B]),[$,U]=(0,ct.useSettings)("typography.fluid","layout"),q=(0,ct.getTypographyClassesAndStyles)(t,{typography:{fluid:$},layout:{wideSize:U?.wideSize}}),W="default"===N,Z=W||A&&!R;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{...T,className:Dt(T.className,{[`has-custom-width wp-block-button__width-${x}`]:x}),children:(0,it.jsx)(ct.RichText,{ref:G,"aria-label":(0,pt.__)("Button text"),placeholder:p||(0,pt.__)("Add text…"),value:h,onChange:e=>o({text:pn(e)}),withoutInteractiveFormatting:!0,className:Dt(n,"wp-block-button__link",w.className,k.className,q.className,{[`has-text-align-${u}`]:u,"no-border-radius":0===g?.border?.radius,"has-custom-font-size":T.style.fontSize},(0,ct.__experimentalGetElementClassName)("button")),style:{...k.style,...w.style,...C.style,...j.style,...q.style,writingMode:void 0},onReplace:a,onMerge:i,identifier:"text"})}),Z&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[W&&(0,it.jsx)(ct.AlignmentControl,{value:u,onChange:e=>{o({textAlign:e})}}),A&&!R&&(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:D?hn:gn,title:D?(0,pt.__)("Unlink"):(0,pt.__)("Link"),shortcut:D?mn.displayShortcut.primaryShift("k"):mn.displayShortcut.primary("k"),onClick:D?F:V,isActive:D})]}),A&&r&&(P||D)&&!R&&(0,it.jsx)(mt.Popover,{placement:"bottom",onClose:()=>{I(!1),B.current?.focus()},anchor:y,focusOnMount:!!P&&"firstElement",__unstableSlotName:"__unstable-block-tools-after",shift:!0,children:(0,it.jsx)(ct.LinkControl,{value:E,onChange:({url:e,opensInNewTab:t,nofollow:n})=>o(function({rel:e="",url:t="",opensInNewTab:o,nofollow:n}){let r,a=e;if(o)r=un,a=a?.includes(cn)?a:a+` ${cn}`;else{const e=new RegExp(`\\b${cn}\\s*`,"g");a=a?.replace(e,"").trim()}if(n)a=a?.includes(dn)?a:(a+` ${dn}`).trim();else{const e=new RegExp(`\\b${dn}\\s*`,"g");a=a?.replace(e,"").trim()}return{url:(0,no.prependHTTP)(t),linkTarget:r,rel:a||void 0}}({rel:m,url:e,opensInNewTab:t,nofollow:n})),onRemove:()=>{F(),B.current?.focus()},forceIsEditingLink:P,settings:xn,createSuggestion:L&&async function(e){const t=await L({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:H,createSuggestionButtonText:function(e){return(0,gt.createInterpolateElement)((0,pt.sprintf)((0,pt.__)("Create page: <mark>%s</mark>"),e),{mark:(0,it.jsx)("mark",{})})}})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(bn,{selectedWidth:x,setAttributes:o})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(_n,{tagName:c,onChange:e=>o({tagName:e}),options:[{label:(0,pt.__)("Default (<a>)"),value:"a"},{label:"<button>",value:"button"}]}),A&&(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m||"",onChange:e=>o({rel:e})})]})]})};const yn=JSON.parse('{"$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","role":"content"},"title":{"type":"string","source":"attribute","selector":"a,button","attribute":"title","role":"content"},"text":{"type":"rich-text","source":"rich-text","selector":"a,button","role":"content"},"linkTarget":{"type":"string","source":"attribute","selector":"a","attribute":"target","role":"content"},"rel":{"type":"string","source":"attribute","selector":"a","attribute":"rel","role":"content"},"placeholder":{"type":"string"},"backgroundColor":{"type":"string"},"textColor":{"type":"string"},"gradient":{"type":"string"},"width":{"type":"number"}},"supports":{"anchor":true,"splitting":true,"align":false,"alignWide":false,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"__experimentalSkipSerialization":["fontSize","lineHeight","fontFamily","fontWeight","fontStyle","textTransform","textDecoration","letterSpacing"],"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"reusable":false,"shadow":{"__experimentalSkipSerialization":true},"spacing":{"__experimentalSkipSerialization":true,"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"styles":[{"name":"fill","label":"Fill","isDefault":true},{"name":"outline","label":"Outline"}],"editorStyle":"wp-block-button-editor","style":"wp-block-button","selectors":{"root":".wp-block-button .wp-block-button__link","typography":{"writingMode":".wp-block-button"}}}');const{name:vn}=yn,kn={icon:Qo,example:{attributes:{className:"is-style-fill",text:(0,pt.__)("Call to action")}},edit:fn,save:function({attributes:e,className:t}){const{tagName:o,type:n,textAlign:r,fontSize:a,linkTarget:i,rel:s,style:l,text:c,title:u,url:d,width:p}=e,m=o||"a",g="button"===m,h=n||"button",_=(0,ct.__experimentalGetBorderClassesAndStyles)(e),x=(0,ct.__experimentalGetColorClassesAndStyles)(e),b=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=(0,ct.getTypographyClassesAndStyles)(e),v=Dt("wp-block-button__link",x.className,_.className,y.className,{[`has-text-align-${r}`]:r,"no-border-radius":0===l?.border?.radius,"has-custom-font-size":a||l?.typography?.fontSize},(0,ct.__experimentalGetElementClassName)("button")),k={..._.style,...x.style,...b.style,...f.style,...y.style,writingMode:void 0},w=Dt(t,{[`has-custom-width wp-block-button__width-${p}`]:p});return(0,it.jsx)("div",{...ct.useBlockProps.save({className:w}),children:(0,it.jsx)(ct.RichText.Content,{tagName:m,type:g?h:null,className:v,href:g?null:d,title:u,style:k,value:c,target:g?null:i,rel:g?null:s})})},deprecated:ln,merge:(e,{text:t=""})=>({...e,text:(e.text||"")+t})},wn=()=>jt({name:vn,metadata:yn,settings:kn});var Cn=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 jn=e=>{if(e.layout)return e;const{contentJustification:t,orientation:o,...n}=e;return(t||o)&&Object.assign(n,{layout:{type:"flex",...t&&{justifyContent:t},...o&&{orientation:o}}}),n},Sn=[{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:jn,save:({attributes:{contentJustification:e,orientation:t}})=>(0,it.jsx)("div",{...ct.useBlockProps.save({className:Dt({[`is-content-justification-${e}`]:e,"is-vertical":"vertical"===t})}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},{supports:{align:["center","left","right"],anchor:!0},save:()=>(0,it.jsx)("div",{children:(0,it.jsx)(ct.InnerBlocks.Content,{})}),isEligible:({align:e})=>e&&["center","left","right"].includes(e),migrate:e=>jn({...e,align:void 0,contentJustification:e.align})}];var Bn=Sn;const Tn=window.wp.richText;function Nn(e,t,o=null){if(!e)return;const n=(0,st.getBlockType)(t);if(!n)return;const r={};if((0,st.hasBlockSupport)(n,"anchor")&&e.anchor&&(r.anchor=e.anchor),(0,st.hasBlockSupport)(n,"ariaLabel")&&e.ariaLabel&&(r.ariaLabel=e.ariaLabel),e.metadata){const t=[];if(o&&t.push("id","bindings"),t.length>0){const n=Object.entries(e.metadata).reduce(((e,[n,r])=>t.includes(n)?(e[n]="bindings"===n?o(r):r,e):e),{});Object.keys(n).length>0&&(r.metadata=n)}}return 0!==Object.keys(r).length?r:void 0}const Pn={from:[{type:"block",isMultiBlock:!0,blocks:["core/button"],transform:e=>(0,st.createBlock)("core/buttons",{},e.map((e=>(0,st.createBlock)("core/button",e))))},{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/buttons",{},e.map((e=>{const{content:t}=e,o=(0,Tn.__unstableCreateElement)(document,t),n=o.innerText||"",r=o.querySelector("a"),a=r?.getAttribute("href");return(0,st.createBlock)("core/button",{...e,...Nn(e,"core/button",(({content:e})=>({text:e}))),text:n,url:a})}))),isMatch:e=>e.every((e=>{const t=(0,Tn.__unstableCreateElement)(document,e.content),o=t.innerText||"",n=t.querySelectorAll("a");return o.length<=30&&n.length<=1}))}]};var In=Pn;const Dn={name:"core/button",attributesToCopy:["backgroundColor","border","className","fontFamily","fontSize","gradient","style","textColor","width"]};var Mn=function({attributes:e,className:t}){const{fontSize:o,layout:n,style:r}=e,a=(0,ct.useBlockProps)({className:Dt(t,{"has-custom-font-size":o||r?.typography?.fontSize})}),{hasButtonVariations:i}=(0,lt.useSelect)((e=>({hasButtonVariations:e(st.store).getBlockVariations("core/button","inserter").length>0})),[]),s=(0,ct.useInnerBlocksProps)(a,{defaultBlock:Dn,directInsert:!i,template:[["core/button"]],templateInsertUpdatesSelection:!0,orientation:n?.orientation??"horizontal"});return(0,it.jsx)("div",{...s})};const zn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/buttons","title":"Buttons","category":"design","allowedBlocks":["core/button"],"description":"Prompt visitors to take action with a group of button-style links.","keywords":["link"],"textdomain":"default","supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalExposeControlsToChildren":true,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"blockGap":["horizontal","vertical"],"padding":true,"margin":["top","bottom"],"__experimentalDefaultControls":{"blockGap":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true},"contentRole":true},"editorStyle":"wp-block-buttons-editor","style":"wp-block-buttons"}');const{name:An}=zn,Ln={icon:Cn,example:{attributes:{layout:{type:"flex",justifyContent:"center"}},innerBlocks:[{name:"core/button",attributes:{text:(0,pt.__)("Find out more")}},{name:"core/button",attributes:{text:(0,pt.__)("Contact us")}}]},deprecated:Bn,transforms:In,edit:Mn,save:function({attributes:e,className:t}){const{fontSize:o,style:n}=e,r=ct.useBlockProps.save({className:Dt(t,{"has-custom-font-size":o||n?.typography?.fontSize})}),a=ct.useInnerBlocksProps.save(r);return(0,it.jsx)("div",{...a})}},Hn=()=>jt({name:An,metadata:zn,settings:Ln});var Rn=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 Vn=JSON.parse('{"$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":true,"html":false,"color":{"link":true,"__experimentalSkipSerialization":["text","background"],"__experimentalDefaultControls":{"background":true,"text":true},"__experimentalSelector":"table, th"},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-calendar"}'),Fn=fo((e=>{if(!e)return{};const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()+1}}));var En={from:[{type:"block",blocks:["core/archives"],transform:()=>(0,st.createBlock)("core/calendar")}],to:[{type:"block",blocks:["core/archives"],transform:()=>(0,st.createBlock)("core/archives")}]};const{name:On}=Vn,Gn={icon:Rn,example:{},edit:function({attributes:e}){const t=(0,ct.useBlockProps)(),{date:o,hasPosts:n,hasPostsResolved:r}=(0,lt.useSelect)((e=>{const{getEntityRecords:t,hasFinishedResolution:o}=e(_t.store),n={status:"publish",per_page:1},r=t("postType","post",n),a=o("getEntityRecords",["postType","post",n]);let i;const s=e("core/editor");if(s){"post"===s.getEditedPostAttribute("type")&&(i=s.getEditedPostAttribute("date"))}return{date:i,hasPostsResolved:a,hasPosts:a&&1===r?.length}}),[]);return n?(0,it.jsx)("div",{...t,children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/calendar",attributes:{...e,...Fn(o)}})})}):(0,it.jsx)("div",{...t,children:(0,it.jsx)(mt.Placeholder,{icon:Rn,label:(0,pt.__)("Calendar"),children:r?(0,pt.__)("No published posts found."):(0,it.jsx)(mt.Spinner,{})})})},transforms:En},$n=()=>jt({name:On,metadata:Vn,settings:Gn});var Un=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const qn=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/categories","title":"Terms List","category":"widgets","description":"Display a list of all terms of a given taxonomy.","keywords":["categories"],"textdomain":"default","attributes":{"taxonomy":{"type":"string","default":"category"},"displayAsDropdown":{"type":"boolean","default":false},"showHierarchy":{"type":"boolean","default":false},"showPostCounts":{"type":"boolean","default":false},"showOnlyTopLevel":{"type":"boolean","default":false},"showEmpty":{"type":"boolean","default":false},"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true}},"usesContext":["enhancedPagination"],"supports":{"align":true,"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-categories-editor","style":"wp-block-categories"}');var Wn=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 Zn=[{name:"terms",title:(0,pt.__)("Terms List"),icon:Un,attributes:{taxonomy:"post_tag"},isActive:e=>"category"!==e.taxonomy},{name:"categories",title:(0,pt.__)("Categories List"),description:(0,pt.__)("Display a list of all categories."),icon:Un,attributes:{taxonomy:"category"},isActive:["taxonomy"],isDefault:!0}];var Jn=Zn;const{name:Qn}=qn,Kn={icon:Un,example:{},edit:function e({attributes:{displayAsDropdown:t,showHierarchy:o,showPostCounts:n,showOnlyTopLevel:r,showEmpty:a,label:i,showLabel:s,taxonomy:l},setAttributes:c,className:u,clientId:d}){const p=(0,xt.useInstanceId)(e,"blocks-category-select"),{records:m,isResolvingTaxonomies:g}=(0,_t.useEntityRecords)("root","taxonomy",{per_page:-1}),h=m?.filter((e=>e.visibility.public)),_=h?.find((e=>e.slug===l)),x=!g&&_?.hierarchical,b={per_page:-1,hide_empty:!a,context:"view"};x&&r&&(b.parent=0);const{records:f,isResolving:y}=(0,_t.useEntityRecords)("taxonomy",l,b),{createWarningNotice:v}=(0,lt.useDispatch)(bo.store),k=e=>{e.preventDefault(),v((0,pt.__)("Links are disabled in the editor."),{id:`block-library/core/categories/redirection-prevented/${d}`,type:"snackbar"})},w=e=>f?.length?null===e?f:f.filter((({parent:t})=>t===e)):[],C=e=>t=>c({[e]:t}),j=e=>e?(0,ao.decodeEntities)(e).trim():(0,pt.__)("(Untitled)"),S=e=>{const t=w(e.id),{id:r,link:a,count:i,name:s}=e;return(0,it.jsxs)("li",{className:`cat-item cat-item-${r}`,children:[(0,it.jsx)("a",{href:a,onClick:k,children:j(s)}),n&&` (${i})`,x&&o&&!!t.length&&(0,it.jsx)("ul",{className:"children",children:t.map((e=>S(e)))})]},r)},B=(e,t)=>{const{id:r,count:a,name:i}=e,s=w(r);return[(0,it.jsxs)("option",{className:`level-${t}`,children:[Array.from({length:3*t}).map((()=>" ")),j(i),n&&` (${a})`]},r),x&&o&&!!s.length&&s.map((e=>B(e,t+1)))]},T=!f?.length||t||y?"div":"ul",N=Dt(u,{"wp-block-categories-list":!!f?.length&&!t&&!y,"wp-block-categories-dropdown":!!f?.length&&t&&!y}),P=(0,ct.useBlockProps)({className:N}),I=vt();return(0,it.jsxs)(T,{...P,children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{c({taxonomy:"category",displayAsDropdown:!1,showHierarchy:!1,showPostCounts:!1,showOnlyTopLevel:!1,showEmpty:!1,showLabel:!0})},dropdownMenuProps:I,children:[Array.isArray(h)&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"category"!==l,label:(0,pt.__)("Taxonomy"),onDeselect:()=>{c({taxonomy:"category"})},isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Taxonomy"),options:h.map((e=>({label:e.name,value:e.slug}))),value:l,onChange:e=>c({taxonomy:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,pt.__)("Display as dropdown"),onDeselect:()=>c({displayAsDropdown:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as dropdown"),checked:t,onChange:C("displayAsDropdown")})}),t&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!s,label:(0,pt.__)("Show label"),onDeselect:()=>c({showLabel:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,className:"wp-block-categories__indentation",label:(0,pt.__)("Show label"),checked:s,onChange:C("showLabel")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Show post counts"),onDeselect:()=>c({showPostCounts:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post counts"),checked:n,onChange:C("showPostCounts")})}),x&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,pt.__)("Show only top level terms"),onDeselect:()=>c({showOnlyTopLevel:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show only top level terms"),checked:r,onChange:C("showOnlyTopLevel")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,pt.__)("Show empty terms"),onDeselect:()=>c({showEmpty:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show empty terms"),checked:a,onChange:C("showEmpty")})}),x&&!r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,pt.__)("Show hierarchy"),onDeselect:()=>c({showHierarchy:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show hierarchy"),checked:o,onChange:C("showHierarchy")})})]})}),y&&(0,it.jsx)(mt.Placeholder,{icon:Wn,label:(0,pt.__)("Terms"),children:(0,it.jsx)(mt.Spinner,{})}),!y&&0===f?.length&&(0,it.jsx)("p",{children:_.labels.no_terms}),!y&&f?.length>0&&(t?(()=>{const e=w(x&&o?0:null);return(0,it.jsxs)(it.Fragment,{children:[s?(0,it.jsx)(ct.RichText,{className:"wp-block-categories__label","aria-label":(0,pt.__)("Label text"),placeholder:_?.name,withoutInteractiveFormatting:!0,value:i,onChange:e=>c({label:e})}):(0,it.jsx)(mt.VisuallyHidden,{as:"label",htmlFor:p,children:i||_?.name}),(0,it.jsxs)("select",{id:p,children:[(0,it.jsx)("option",{children:(0,pt.sprintf)((0,pt.__)("Select %s"),_?.labels?.singular_name)}),e.map((e=>B(e,0)))]})]})})():w(x&&o?0:null).map((e=>S(e))))]})},variations:Jn},Yn=()=>jt({name:Qn,metadata:qn,settings:Kn});var Xn=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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 er=({clientId:e})=>{const{replaceBlocks:t}=(0,lt.useDispatch)(ct.store),o=(0,lt.useSelect)((t=>t(ct.store).getBlock(e)),[e]);return(0,it.jsx)(mt.ToolbarButton,{onClick:()=>t(o.clientId,(0,st.rawHandler)({HTML:(0,st.serialize)(o)})),children:(0,pt.__)("Convert to blocks")})},tr=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 or({onClick:e,isModalFullScreen:t}){return(0,xt.useViewportMatch)("small","<")?null:(0,it.jsx)(mt.Button,{size:"compact",onClick:e,icon:tr,isPressed:t,label:t?(0,pt.__)("Exit fullscreen"):(0,pt.__)("Enter fullscreen")})}function nr(e){const t=(0,lt.useSelect)((e=>e(ct.store).getSettings().styles));return(0,gt.useEffect)((()=>{const{baseURL:o,suffix:n,settings:r}=window.wpEditorL10n.tinymce;return window.tinymce.EditorManager.overrideDefaults({base_url:o,suffix:n}),window.wp.oldEditor.initialize(e.id,{tinymce:{...r,setup(e){e.on("init",(()=>{const o=e.getDoc();t.forEach((({css:e})=>{const t=o.createElement("style");t.innerHTML=e,o.head.appendChild(t)}))}))}}}),()=>{window.wp.oldEditor.remove(e.id)}}),[]),(0,it.jsx)("textarea",{...e})}function rr(e){const{clientId:t,attributes:{content:o},setAttributes:n,onReplace:r}=e,[a,i]=(0,gt.useState)(!1),[s,l]=(0,gt.useState)(!1),c=`editor-${t}`,u=()=>o?i(!1):r([]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>i(!0),children:(0,pt.__)("Edit")})})}),o&&(0,it.jsx)(gt.RawHTML,{children:o}),(a||!o)&&(0,it.jsxs)(mt.Modal,{title:(0,pt.__)("Classic Editor"),onRequestClose:u,shouldCloseOnClickOutside:!1,overlayClassName:"block-editor-freeform-modal",isFullScreen:s,className:"block-editor-freeform-modal__content",headerActions:(0,it.jsx)(or,{onClick:()=>l(!s),isModalFullScreen:s}),children:[(0,it.jsx)(nr,{id:c,defaultValue:o}),(0,it.jsxs)(mt.Flex,{className:"block-editor-freeform-modal__actions",justify:"flex-end",expanded:!1,children:[(0,it.jsx)(mt.FlexItem,{children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:u,children:(0,pt.__)("Cancel")})}),(0,it.jsx)(mt.FlexItem,{children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{n({content:window.wp.oldEditor.getContent(c)}),i(!1)},children:(0,pt.__)("Save")})})]})]})]})}const{wp:ar}=window;function ir({clientId:e,attributes:{content:t},setAttributes:o,onReplace:n}){const{getMultiSelectedBlockClientIds:r}=(0,lt.useSelect)(ct.store),a=(0,gt.useRef)(!1);return(0,gt.useEffect)((()=>{if(!a.current)return;const o=window.tinymce.get(`editor-${e}`);if(!o)return;o.getContent()!==t&&o.setContent(t||"")}),[e,t]),(0,gt.useEffect)((()=>{const{baseURL:i,suffix:s}=window.wpEditorL10n.tinymce;function l(e){let a;t&&e.on("loadContent",(()=>e.setContent(t))),e.on("blur",(()=>{a=e.selection.getBookmark(2,!0);const t=document.querySelector(".interface-interface-skeleton__content"),n=t.scrollTop;return r()?.length||o({content:e.getContent()}),e.once("focus",(()=>{a&&(e.selection.moveToBookmark(a),t.scrollTop!==n&&(t.scrollTop=n))})),!1})),e.on("mousedown touchstart",(()=>{a=null}));const i=(0,xt.debounce)((()=>{const t=e.getContent();t!==e._lastChange&&(e._lastChange=t,o({content:t}))}),250);e.on("Paste Change input Undo Redo",i),e.on("remove",i.cancel),e.on("keydown",(t=>{mn.isKeyboardEvent.primary(t,"z")&&t.stopPropagation(),t.keyCode!==mn.BACKSPACE&&t.keyCode!==mn.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)||(n([]),t.preventDefault(),t.stopImmediatePropagation());const{altKey:o}=t;o&&t.keyCode===mn.F10&&t.stopPropagation()})),e.on("paste",(e=>{e.stopPropagation()})),e.on("init",(()=>{const t=e.getBody();t.ownerDocument.activeElement===t&&(t.blur(),e.focus())}))}function c(){const{settings:t}=window.wpEditorL10n.tinymce;ar.oldEditor.initialize(`editor-${e}`,{tinymce:{...t,inline:!0,content_css:!1,fixed_toolbar_container:`#toolbar-${e}`,setup:l}})}function u(){"complete"===document.readyState&&c()}return a.current=!0,window.tinymce.EditorManager.overrideDefaults({base_url:i,suffix:s}),"complete"===document.readyState?c():document.addEventListener("readystatechange",u),()=>{document.removeEventListener("readystatechange",u),ar.oldEditor.remove(`editor-${e}`),a.current=!1}}),[]),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{id:`toolbar-${e}`,className:"block-library-classic__toolbar",onClick:function(){const t=window.tinymce.get(`editor-${e}`);t&&t.focus()},"data-placeholder":(0,pt.__)("Classic"),onKeyDown:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}},"toolbar"),(0,it.jsx)("div",{id:`editor-${e}`,className:"wp-block-freeform block-library-rich-text__tinymce"},"editor")]})}const sr=JSON.parse('{"$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":{"html":false,"className":false,"customClassName":false,"lock":false,"reusable":false,"renaming":false,"blockVisibility":false},"editorStyle":"wp-block-freeform-editor"}');const{name:lr}=sr,cr={icon:Xn,edit:function(e){const{clientId:t}=e,o=(0,lt.useSelect)((e=>e(ct.store).canRemoveBlock(t)),[t]),[n,r]=(0,gt.useState)(!1),a=(0,xt.useRefEffect)((e=>{r(e.ownerDocument!==document)}),[]);return(0,it.jsxs)(it.Fragment,{children:[o&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(er,{clientId:t})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)({ref:a}),children:n?(0,it.jsx)(rr,{...e}):(0,it.jsx)(ir,{...e})})]})},save:function({attributes:e}){const{content:t}=e;return(0,it.jsx)(gt.RawHTML,{children:t})}},ur=()=>jt({name:lr,metadata:sr,settings:cr});var dr=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const pr=JSON.parse('{"$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":"rich-text","source":"rich-text","selector":"code","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"align":["wide"],"anchor":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"width":true,"color":true}},"color":{"text":true,"background":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-code"}');function mr(e){return e.replace(/\[/g,"[")}function gr(e){return e.replace(/^(\s*https?:)\/\/([^\s<>"]+\s*)$/m,"$1//$2")}const hr={from:[{type:"enter",regExp:/^```$/,transform:()=>(0,st.createBlock)("core/code")},{type:"block",blocks:["core/paragraph"],transform:e=>{const{content:t}=e;return(0,st.createBlock)("core/code",{...e,...Nn(e,"core/code"),content:t})}},{type:"block",blocks:["core/html"],transform:e=>{const{content:t}=e;return(0,st.createBlock)("core/code",{...e,...Nn(e,"core/code"),content:(0,Tn.toHTMLString)({value:(0,Tn.create)({text:t})})})}},{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:e=>{const{content:t}=e;return(0,st.createBlock)("core/paragraph",{...Nn(e,"core/paragraph"),content:t})}}]};var _r=hr;const{name:xr}=pr,br={icon:dr,example:{attributes:{content:(0,pt.__)("// 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)=>({content:e.content+"\n\n"+t.content}),transforms:_r,edit:function({attributes:e,setAttributes:t,onRemove:o,insertBlocksAfter:n,mergeBlocks:r}){const a=(0,ct.useBlockProps)();return(0,it.jsx)("pre",{...a,children:(0,it.jsx)(ct.RichText,{tagName:"code",identifier:"content",value:e.content,onChange:e=>t({content:e}),onRemove:o,onMerge:r,placeholder:(0,pt.__)("Write code…"),"aria-label":(0,pt.__)("Code"),preserveWhiteSpace:!0,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)()))})})},save:function({attributes:e}){return(0,it.jsx)("pre",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.RichText.Content,{tagName:"code",value:(t="string"==typeof e.content?e.content:e.content.toHTMLString({preserveWhiteSpace:!0}),(0,xt.pipe)(mr,gr)(t||""))})});var t}},fr=()=>jt({name:xr,metadata:pr,settings:br});var yr=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 vr=[{attributes:{verticalAlignment:{type:"string"},width:{type:"number",min:0,max:100}},isEligible:({width:e})=>isFinite(e),migrate:e=>({...e,width:`${e.width}%`}),save({attributes:e}){const{verticalAlignment:t,width:o}=e,n=Dt({[`is-vertically-aligned-${t}`]:t}),r={flexBasis:o+"%"};return(0,it.jsx)("div",{className:n,style:r,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];var kr=vr;function wr({width:e,setAttributes:t}){const[o]=(0,ct.useSettings)("spacing.units"),n=(0,mt.__experimentalUseCustomUnits)({availableUnits:o||["%","px","em","rem","vw"]}),r=vt();return(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({width:void 0})},dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==e,label:(0,pt.__)("Width"),onDeselect:()=>t({width:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalUnitControl,{label:(0,pt.__)("Width"),__unstableInputWidth:"calc(50% - 8px)",__next40pxDefaultSize:!0,value:e||"",onChange:e=>{e=0>parseFloat(e)?"0":e,t({width:e})},units:n})})})}var Cr=function({attributes:{verticalAlignment:e,width:t,templateLock:o,allowedBlocks:n},setAttributes:r,clientId:a}){const i=Dt("block-core-columns",{[`is-vertically-aligned-${e}`]:e}),{columnsIds:s,hasChildBlocks:l,rootClientId:c}=(0,lt.useSelect)((e=>{const{getBlockOrder:t,getBlockRootClientId:o}=e(ct.store),n=o(a);return{hasChildBlocks:t(a).length>0,rootClientId:n,columnsIds:t(n)}}),[a]),{updateBlockAttributes:u}=(0,lt.useDispatch)(ct.store),d=Number.isFinite(t)?t+"%":t,p=(0,ct.useBlockProps)({className:i,style:d?{flexBasis:d}:void 0}),m=s.length,g=s.indexOf(a)+1,h=(0,pt.sprintf)((0,pt.__)("%1$s (%2$d of %3$d)"),p["aria-label"],g,m),_=(0,ct.useInnerBlocksProps)({...p,"aria-label":h},{templateLock:o,allowedBlocks:n,renderAppender:l?void 0:ct.InnerBlocks.ButtonBlockAppender});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.BlockVerticalAlignmentToolbar,{onChange:e=>{r({verticalAlignment:e}),u(c,{verticalAlignment:null})},value:e,controls:["top","center","bottom","stretch"]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(wr,{width:t,setAttributes:r})}),(0,it.jsx)("div",{..._})]})};const jr=JSON.parse('{"$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"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"anchor":true,"reusable":false,"html":false,"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"blockGap":true,"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":true,"interactivity":{"clientNavigation":true},"allowedBlocks":true}}');const{name:Sr}=jr,Br={icon:yr,edit:Cr,save:function({attributes:e}){const{verticalAlignment:t,width:o}=e,n=Dt({[`is-vertically-aligned-${t}`]:t});let r;if(o&&/\d/.test(o)){let e=Number.isFinite(o)?o+"%":o;if(!Number.isFinite(o)&&o?.endsWith("%")){const t=1e12;e=Math.round(Number.parseFloat(o)*t)/t+"%"}r={flexBasis:e}}const a=ct.useBlockProps.save({className:n,style:r}),i=ct.useInnerBlocksProps.save(a);return(0,it.jsx)("div",{...i})},deprecated:kr},Tr=()=>jt({name:Sr,metadata:jr,settings:Br});var Nr=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 7.5h-5v10h5v-10Zm1.5 0v10H19a.5.5 0 0 0 .5-.5V8a.5.5 0 0 0-.5-.5h-2.5ZM6 7.5h2.5v10H6a.5.5 0 0 1-.5-.5V8a.5.5 0 0 1 .5-.5ZM6 6h13a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z"})});function Pr(e){let t,{doc:o}=Pr;o||(o=document.implementation.createHTMLDocument(""),Pr.doc=o),o.body.innerHTML=e;for(const e of o.body.firstChild.classList)if(t=e.match(/^layout-column-(\d+)$/))return Number(t[1])-1}var Ir=[{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:o,customBackgroundColor:n,...r}=e;return{...r,style:t,isStackedOnMobile:!0}},save({attributes:e}){const{verticalAlignment:t,backgroundColor:o,customBackgroundColor:n,textColor:r,customTextColor:a}=e,i=(0,ct.getColorClassName)("background-color",o),s=(0,ct.getColorClassName)("color",r),l=Dt({"has-background":o||n,"has-text-color":r||a,[i]:i,[s]:s,[`are-vertically-aligned-${t}`]:t}),c={backgroundColor:i?void 0:n,color:s?void 0:a};return(0,it.jsx)("div",{className:l||void 0,style:c,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},isEligible:(e,t)=>!!t.some((e=>/layout-column-\d+/.test(e.originalContent)))&&t.some((e=>void 0!==Pr(e.originalContent))),migrate(e,t){const o=t.reduce(((e,t)=>{const{originalContent:o}=t;let n=Pr(o);return void 0===n&&(n=0),e[n]||(e[n]=[]),e[n].push(t),e}),[]).map((e=>(0,st.createBlock)("core/column",{},e))),{columns:n,...r}=e;return[{...r,isStackedOnMobile:!0},o]},save({attributes:e}){const{columns:t}=e;return(0,it.jsx)("div",{className:`has-${t}-columns`,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}},{attributes:{columns:{type:"number",default:2}},migrate(e,t){const{columns:o,...n}=e;return[e={...n,isStackedOnMobile:!0},t]},save({attributes:e}){const{verticalAlignment:t,columns:o}=e,n=Dt(`has-${o}-columns`,{[`are-vertically-aligned-${t}`]:t});return(0,it.jsx)("div",{className:n,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];const Dr=e=>{const t=parseFloat(e);return Number.isFinite(t)?parseFloat(t.toFixed(2)):void 0};function Mr(e,t){const{width:o=100/t}=e.attributes;return Dr(o)}function zr(e,t,o=e.length){const n=function(e,t=e.length){return e.reduce(((e,o)=>e+Mr(o,t)),0)}(e,o);return Object.fromEntries(Object.entries(function(e,t=e.length){return e.reduce(((e,o)=>{const n=Mr(o,t);return Object.assign(e,{[o.clientId]:n})}),{})}(e,o)).map((([e,o])=>[e,Dr(t*o/n)])))}function Ar(e,t){return e.map((e=>({...e,attributes:{...e.attributes,width:`${t[e.clientId]}%`}})))}const Lr={name:"core/column"};function Hr({clientId:e,setAttributes:t,isStackedOnMobile:o}){const{count:n,canInsertColumnBlock:r,minCount:a}=(0,lt.useSelect)((t=>{const{canInsertBlockType:o,canRemoveBlock:n,getBlockOrder:r}=t(ct.store),a=r(e),i=a.reduce(((e,t,o)=>(n(t)||e.push(o),e)),[]);return{count:a.length,canInsertColumnBlock:o("core/column",e),minCount:Math.max(...i)+1}}),[e]),{getBlocks:i}=(0,lt.useSelect)(ct.store),{replaceInnerBlocks:s}=(0,lt.useDispatch)(ct.store);function l(t,o){let n=i(e);const r=n.every((e=>{const t=e.attributes.width;return Number.isFinite(t?.endsWith?.("%")?parseFloat(t):t)}));const a=o>t;if(a&&r){const e=Dr(100/o),r=o-t;n=[...Ar(n,zr(n,100-e*r)),...Array.from({length:r}).map((()=>(0,st.createBlock)("core/column",{width:`${e}%`})))]}else if(a)n=[...n,...Array.from({length:o-t}).map((()=>(0,st.createBlock)("core/column")))];else if(o<t&&(n=n.slice(0,-(t-o)),r)){n=Ar(n,zr(n,100))}s(e,n)}const c=vt();return(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({isStackedOnMobile:!0})},dropdownMenuProps:c,children:[r&&(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,style:{gridColumn:"1 / -1"},children:[(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:n,onChange:e=>l(n,Math.max(a,e)),min:Math.max(1,a),max:Math.max(6,n)}),n>6&&(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("This column count exceeds the recommended amount and may cause visual breakage.")})]}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!0!==o,onDeselect:()=>t({isStackedOnMobile:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Stack on mobile"),checked:o,onChange:()=>t({isStackedOnMobile:!o})})})]})}function Rr({attributes:e,setAttributes:t,clientId:o}){const{isStackedOnMobile:n,verticalAlignment:r,templateLock:a}=e,i=(0,lt.useRegistry)(),{getBlockOrder:s}=(0,lt.useSelect)(ct.store),{updateBlockAttributes:l}=(0,lt.useDispatch)(ct.store),c=Dt({[`are-vertically-aligned-${r}`]:r,"is-not-stacked-on-mobile":!n}),u=(0,ct.useBlockProps)({className:c}),d=(0,ct.useInnerBlocksProps)(u,{defaultBlock:Lr,directInsert:!0,orientation:"horizontal",renderAppender:!1,templateLock:a});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.BlockVerticalAlignmentToolbar,{onChange:function(e){const n=s(o);i.batch((()=>{t({verticalAlignment:e}),l(n,{verticalAlignment:e})}))},value:r})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Hr,{clientId:o,setAttributes:t,isStackedOnMobile:n})}),(0,it.jsx)("div",{...d})]})}function Vr({clientId:e,name:t,setAttributes:o}){const{blockType:n,defaultVariation:r,variations:a}=(0,lt.useSelect)((e=>{const{getBlockVariations:o,getBlockType:n,getDefaultBlockVariation:r}=e(st.store);return{blockType:n(t),defaultVariation:r(t,"block"),variations:o(t,"block")}}),[t]),{replaceInnerBlocks:i}=(0,lt.useDispatch)(ct.store),s=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...s,children:(0,it.jsx)(ct.__experimentalBlockVariationPicker,{icon:n?.icon?.src,label:n?.title,variations:a,instructions:(0,pt.__)("Divide into columns. Select a layout:"),onSelect:(t=r)=>{t.attributes&&o(t.attributes),t.innerBlocks&&i(e,(0,st.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!0)},allowSkip:!0})})}var Fr=e=>{const{clientId:t}=e,o=(0,lt.useSelect)((e=>e(ct.store).getBlocks(t).length>0),[t])?Rr:Vr;return(0,it.jsx)(o,{...e})};const Er=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/columns","title":"Columns","category":"design","allowedBlocks":["core/column"],"description":"Display content in multiple columns, with blocks added to each column.","textdomain":"default","attributes":{"verticalAlignment":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"anchor":true,"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"heading":true,"button":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"blockGap":{"__experimentalDefault":"2em","sides":["horizontal","vertical"]},"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex","flexWrap":"nowrap"}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"shadow":true},"editorStyle":"wp-block-columns-editor","style":"wp-block-columns"}');var Or=[{name:"one-column-full",title:(0,pt.__)("100"),description:(0,pt.__)("One column"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column"]],scope:["block"]},{name:"two-columns-equal",title:(0,pt.__)("50 / 50"),description:(0,pt.__)("Two columns; equal split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),isDefault:!0,innerBlocks:[["core/column"],["core/column"]],scope:["block"]},{name:"two-columns-one-third-two-thirds",title:(0,pt.__)("33 / 66"),description:(0,pt.__)("Two columns; one-third, two-thirds split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm17 0a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H19a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"33.33%"}],["core/column",{width:"66.66%"}]],scope:["block"]},{name:"two-columns-two-thirds-one-third",title:(0,pt.__)("66 / 33"),description:(0,pt.__)("Two columns; two-thirds, one-third split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h27a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm33 0a2 2 0 0 1 2-2h11a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35a2 2 0 0 1-2-2V10Z"})}),innerBlocks:[["core/column",{width:"66.66%"}],["core/column",{width:"33.33%"}]],scope:["block"]},{name:"three-columns-equal",title:(0,pt.__)("33 / 33 / 33"),description:(0,pt.__)("Three columns; equal split"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h10.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm16.5 0c0-1.105.864-2 1.969-2H29.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H18.47c-1.105 0-1.969-.895-1.969-2V10Zm17 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H35.469c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column"],["core/column"],["core/column"]],scope:["block"]},{name:"three-columns-wider-center",title:(0,pt.__)("25 / 50 / 25"),description:(0,pt.__)("Three columns; wide center column"),icon:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h7.531c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H2a2 2 0 0 1-2-2V10Zm13.5 0c0-1.105.864-2 1.969-2H32.53c1.105 0 1.969.895 1.969 2v28c0 1.105-.864 2-1.969 2H15.47c-1.105 0-1.969-.895-1.969-2V10Zm23 0c0-1.105.864-2 1.969-2H46a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2h-7.531c-1.105 0-1.969-.895-1.969-2V10Z"})}),innerBlocks:[["core/column",{width:"25%"}],["core/column",{width:"50%"}],["core/column",{width:"25%"}]],scope:["block"]}];const Gr={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert:e=>{const t=+(100/e.length).toFixed(2),o=e.map((({name:e,attributes:o,innerBlocks:n})=>["core/column",{width:`${t}%`},[[e,{...o},n]]]));return(0,st.createBlock)("core/columns",{},(0,st.createBlocksFromInnerBlocksTemplate)(o))},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:o,backgroundColor:n,textColor:r,style:a,mediaAlt:i,mediaId:s,mediaPosition:l,mediaSizeSlug:c,mediaType:u,mediaUrl:d,mediaWidth:p,verticalAlignment:m}=e;let g;if("image"!==u&&u)g=["core/video",{id:s,src:d}];else{g=["core/image",{...{id:s,alt:i,url:d,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"===l&&h.reverse(),(0,st.createBlock)("core/columns",{align:o,backgroundColor:n,textColor:r,style:a,verticalAlignment:m},(0,st.createBlocksFromInnerBlocksTemplate)(h))}}],ungroup:(e,t)=>t.flatMap((e=>e.innerBlocks))};var $r=Gr;const{name:Ur}=Er,qr={icon:Nr,variations:Or,example:{viewportWidth:782,innerBlocks:[{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("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,pt.__)("Suspendisse commodo neque lacus, a dictum orci interdum et.")}}]},{name:"core/column",innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("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,pt.__)("Nam risus massa, ullamcorper consectetur eros fermentum, porta aliquet ligula. Sed vel mauris nec enim.")}}]}]},deprecated:Ir,edit:Fr,save:function({attributes:e}){const{isStackedOnMobile:t,verticalAlignment:o}=e,n=Dt({[`are-vertically-aligned-${o}`]:o,"is-not-stacked-on-mobile":!t}),r=ct.useBlockProps.save({className:n}),a=ct.useInnerBlocksProps.save(r);return(0,it.jsx)("div",{...a})},transforms:$r},Wr=()=>jt({name:Ur,metadata:Er,settings:qr});var Zr=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const Jr=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments","title":"Comments","category":"theme","description":"An advanced block that allows displaying post comments using different visual configurations.","textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"legacy":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-comments-editor","usesContext":["postId","postType"]}');var Qr=[{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=ct.useBlockProps.save(),{className:o}=t,n=o?.split(" ")||[],r=n?.filter((e=>"wp-block-comments"!==e)),a={...t,className:r.join(" ")};return(0,it.jsx)(e,{...a,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];const{HTMLElementControl:Kr}=jo(ct.privateApis);function Yr({attributes:{tagName:e},setAttributes:t}){return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Kr,{tagName:e,onChange:e=>t({tagName:e}),options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]})})})}const Xr=()=>{const e=(0,xt.useInstanceId)(Xr);return(0,it.jsxs)("div",{className:"comment-respond",children:[(0,it.jsx)("h3",{className:"comment-reply-title",children:(0,pt.__)("Leave a Reply")}),(0,it.jsxs)("form",{noValidate:!0,className:"comment-form",onSubmit:e=>e.preventDefault(),children:[(0,it.jsxs)("p",{children:[(0,it.jsx)("label",{htmlFor:`comment-${e}`,children:(0,pt.__)("Comment")}),(0,it.jsx)("textarea",{id:`comment-${e}`,name:"comment",cols:"45",rows:"8",readOnly:!0})]}),(0,it.jsx)("p",{className:"form-submit wp-block-button",children:(0,it.jsx)("input",{name:"submit",type:"submit",className:Dt("wp-block-button__link",(0,ct.__experimentalGetElementClassName)("button")),label:(0,pt.__)("Post Comment"),value:(0,pt.__)("Post Comment"),"aria-disabled":"true"})})]})]})};var ea=({postId:e,postType:t})=>{const[o,n]=(0,_t.useEntityProp)("postType",t,"comment_status",e),r=void 0===t||void 0===e,{defaultCommentStatus:a}=(0,lt.useSelect)((e=>e(ct.store).getSettings().__experimentalDiscussionSettings)),i=(0,lt.useSelect)((e=>!!t&&!!e(_t.store).getPostType(t)?.supports.comments));if(!r&&"open"!==o){if("closed"===o){const e=[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>n("open"),variant:"primary",children:(0,pt._x)("Enable comments","action that affects the current post")},"enableComments")];return(0,it.jsx)(ct.Warning,{actions:e,children:(0,pt.__)("Post Comments Form block: Comments are not enabled for this item.")})}if(!i)return(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)("Post Comments Form block: Comments are not enabled for this post type (%s)."),t)});if("open"!==a)return(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Form block: Comments are not enabled.")})}return(0,it.jsx)(Xr,{})};function ta({postType:e,postId:t}){let[o]=(0,_t.useEntityProp)("postType",e,"title",t);o=o||(0,pt.__)("Post Title");const{avatarURL:n}=(0,lt.useSelect)((e=>e(ct.store).getSettings().__experimentalDiscussionSettings));return(0,it.jsxs)("div",{className:"wp-block-comments__legacy-placeholder",inert:"true",children:[(0,it.jsx)("h3",{children:(0,pt.sprintf)((0,pt.__)("One response to %s"),o)}),(0,it.jsxs)("div",{className:"navigation",children:[(0,it.jsx)("div",{className:"alignleft",children:(0,it.jsxs)("a",{href:"#top",children:["« ",(0,pt.__)("Older Comments")]})}),(0,it.jsx)("div",{className:"alignright",children:(0,it.jsxs)("a",{href:"#top",children:[(0,pt.__)("Newer Comments")," »"]})})]}),(0,it.jsx)("ol",{className:"commentlist",children:(0,it.jsx)("li",{className:"comment even thread-even depth-1",children:(0,it.jsxs)("article",{className:"comment-body",children:[(0,it.jsxs)("footer",{className:"comment-meta",children:[(0,it.jsxs)("div",{className:"comment-author vcard",children:[(0,it.jsx)("img",{alt:(0,pt.__)("Commenter Avatar"),src:n,className:"avatar avatar-32 photo",height:"32",width:"32",loading:"lazy"}),(0,it.jsx)("b",{className:"fn",children:(0,it.jsx)("a",{href:"#top",className:"url",children:(0,pt.__)("A WordPress Commenter")})})," ",(0,it.jsxs)("span",{className:"says",children:[(0,pt.__)("says"),":"]})]}),(0,it.jsxs)("div",{className:"comment-metadata",children:[(0,it.jsx)("a",{href:"#top",children:(0,it.jsx)("time",{dateTime:"2000-01-01T00:00:00+00:00",children:(0,pt.__)("January 1, 2000 at 00:00 am")})})," ",(0,it.jsx)("span",{className:"edit-link",children:(0,it.jsx)("a",{className:"comment-edit-link",href:"#top",children:(0,pt.__)("Edit")})})]})]}),(0,it.jsx)("div",{className:"comment-content",children:(0,it.jsxs)("p",{children:[(0,pt.__)("Hi, this is a comment."),(0,it.jsx)("br",{}),(0,pt.__)("To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard."),(0,it.jsx)("br",{}),(0,gt.createInterpolateElement)((0,pt.__)("Commenter avatars come from <a>Gravatar</a>."),{a:(0,it.jsx)("a",{href:"https://gravatar.com/"})})]})}),(0,it.jsx)("div",{className:"reply",children:(0,it.jsx)("a",{className:"comment-reply-link",href:"#top","aria-label":(0,pt.__)("Reply to A WordPress Commenter"),children:(0,pt.__)("Reply")})})]})})}),(0,it.jsxs)("div",{className:"navigation",children:[(0,it.jsx)("div",{className:"alignleft",children:(0,it.jsxs)("a",{href:"#top",children:["« ",(0,pt.__)("Older Comments")]})}),(0,it.jsx)("div",{className:"alignright",children:(0,it.jsxs)("a",{href:"#top",children:[(0,pt.__)("Newer Comments")," »"]})})]}),(0,it.jsx)(ea,{postId:t,postType:e})]})}function oa({attributes:e,setAttributes:t,context:{postType:o,postId:n}}){const{textAlign:r}=e,a=[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{t({legacy:!1})},variant:"primary",children:(0,pt.__)("Switch to editable mode")},"convert")],i=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,it.jsxs)("div",{...i,children:[(0,it.jsx)(ct.Warning,{actions:a,children:(0,pt.__)("Comments block: You’re currently using the legacy version of the block. The following is just a placeholder - the final styling will likely look different. For a better representation and more customization options, switch the block to its editable mode.")}),(0,it.jsx)(ta,{postId:n,postType:o})]})]})}var na=[["core/comments-title"],["core/comment-template",{},[["core/columns",{},[["core/column",{width:"40px"},[["core/avatar",{size:40,style:{border:{radius:"20px"}}}]]],["core/column",{},[["core/comment-author-name",{fontSize:"small"}],["core/group",{layout:{type:"flex"},style:{spacing:{margin:{top:"0px",bottom:"0px"}}}},[["core/comment-date",{fontSize:"small"}],["core/comment-edit-link",{fontSize:"small"}]]],["core/comment-content"],["core/comment-reply-link",{fontSize:"small"}]]]]]]],["core/comments-pagination"],["core/post-comments-form"]];const{name:ra}=Jr,aa={icon:Zr,example:{},edit:function(e){const{attributes:t,setAttributes:o,clientId:n}=e,{tagName:r,legacy:a}=t,i=(0,ct.useBlockProps)(),s=(0,ct.useInnerBlocksProps)(i,{template:na});return a?(0,it.jsx)(oa,{...e}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Yr,{attributes:t,setAttributes:o,clientId:n}),(0,it.jsx)(r,{...s})]})},save:function({attributes:{tagName:e,legacy:t}}){const o=ct.useBlockProps.save(),n=ct.useInnerBlocksProps.save(o);return t?null:(0,it.jsx)(e,{...n})},deprecated:Qr},ia=()=>jt({name:ra,metadata:Jr,settings:aa}),sa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/comment-author-avatar","title":"Comment Author Avatar (deprecated)","category":"theme","ancestor":["core/comment-template"],"description":"This block is deprecated. Please use the Avatar block instead.","textdomain":"default","attributes":{"width":{"type":"number","default":96},"height":{"type":"number","default":96}},"usesContext":["commentId"],"supports":{"html":false,"inserter":false,"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"color":{"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"__experimentalSkipSerialization":true,"margin":true,"padding":true},"interactivity":{"clientNavigation":true}}}');const{name:la}=sa,ca={icon:to,edit:function({attributes:e,context:{commentId:t},setAttributes:o,isSelected:n}){const{height:r,width:a}=e,[i]=(0,_t.useEntityProp)("root","comment","author_avatar_urls",t),[s]=(0,_t.useEntityProp)("root","comment","author_name",t),l=i?Object.values(i):null,c=i?Object.keys(i):null,u=c?c[0]:24,d=c?c[c.length-1]:96,p=(0,ct.useBlockProps)(),m=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),g=Math.floor(2.5*d),{avatarURL:h}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o})),_=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.PanelBody,{title:(0,pt.__)("Settings"),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image size"),onChange:e=>o({width:e,height:e}),min:u,max:g,initialPosition:a,value:a})})}),x=(0,it.jsx)(mt.ResizableBox,{size:{width:a,height:r},showHandle:n,onResizeStop:(e,t,n,i)=>{o({height:parseInt(r+i.height,10),width:parseInt(a+i.width,10)})},lockAspectRatio:!0,enable:{top:!1,right:!(0,pt.isRTL)(),bottom:!0,left:(0,pt.isRTL)()},minWidth:u,maxWidth:g,children:(0,it.jsx)("img",{src:l?l[l.length-1]:h,alt:`${s} ${(0,pt.__)("Avatar")}`,...p})});return(0,it.jsxs)(it.Fragment,{children:[_,(0,it.jsx)("div",{...m,children:x})]})}},ua=()=>jt({name:la,metadata:sa,settings:ca});var da=(0,it.jsxs)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z",fillRule:"evenodd",clipRule:"evenodd"}),(0,it.jsx)(St.Path,{d:"M15 15V15C15 13.8954 14.1046 13 13 13L11 13C9.89543 13 9 13.8954 9 15V15",fillRule:"evenodd",clipRule:"evenodd"}),(0,it.jsx)(St.Circle,{cx:"12",cy:"9",r:"2",fillRule:"evenodd",clipRule:"evenodd"})]});const pa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-author-name","title":"Comment Author Name","category":"theme","ancestor":["core/comment-template"],"description":"Displays the name of the author of the comment.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":true},"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"usesContext":["commentId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-author-name"}');const ma={attributes:{isLink:{type:"boolean",default:!1},linkTarget:{type:"string",default:"_self"}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var ga=[ma];const{name:ha}=pa,_a={icon:da,edit:function({attributes:{isLink:e,linkTarget:t,textAlign:o},context:{commentId:n},setAttributes:r}){const a=vt(),i=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})});let s=(0,lt.useSelect)((e=>{const{getEntityRecord:t}=e(_t.store),o=t("root","comment",n),r=o?.author_name;if(o&&!r){const e=t("root","user",o.author);return e?.name??(0,pt.__)("Anonymous")}return r??""}),[n]);const l=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>r({textAlign:e})})}),c=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{r({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:a,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to authors URL"),isShownByDefault:!0,hasValue:()=>!e,onDeselect:()=>r({isLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to authors URL"),onChange:()=>r({isLink:!e}),checked:e})}),e&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==t,onDeselect:()=>r({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>r({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})})]})});n&&s||(s=(0,pt._x)("Comment Author","block title"));const u=e?(0,it.jsx)("a",{href:"#comment-author-pseudo-link",onClick:e=>e.preventDefault(),children:s}):s;return(0,it.jsxs)(it.Fragment,{children:[c,l,(0,it.jsx)("div",{...i,children:u})]})},deprecated:ga,example:{}},xa=()=>jt({name:ha,metadata:pa,settings:_a});var ba=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.68822 16.625L5.5 17.8145L5.5 5.5L18.5 5.5L18.5 16.625L6.68822 16.625ZM7.31 18.125L19 18.125C19.5523 18.125 20 17.6773 20 17.125L20 5C20 4.44772 19.5523 4 19 4H5C4.44772 4 4 4.44772 4 5V19.5247C4 19.8173 4.16123 20.086 4.41935 20.2237C4.72711 20.3878 5.10601 20.3313 5.35252 20.0845L7.31 18.125ZM16 9.99997H8V8.49997H16V9.99997ZM8 14H13V12.5H8V14Z"})});const fa=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-content","title":"Comment Content","category":"theme","ancestor":["core/comment-template"],"description":"Displays the contents of a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"spacing":{"padding":["horizontal","vertical"],"__experimentalDefaultControls":{"padding":true}},"html":false},"style":"wp-block-comment-content"}');const{name:ya}=fa,va={icon:ba,edit:function({setAttributes:e,attributes:{textAlign:t},context:{commentId:o}}){const n=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${t}`]:t})}),[r]=(0,_t.useEntityProp)("root","comment","content",o),a=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})})});return o&&r?(0,it.jsxs)(it.Fragment,{children:[a,(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(gt.RawHTML,{children:r.rendered},"html")})})]}):(0,it.jsxs)(it.Fragment,{children:[a,(0,it.jsx)("div",{...n,children:(0,it.jsx)("p",{children:(0,pt._x)("Comment Content","block title")})})]})},example:{}},ka=()=>jt({name:ya,metadata:fa,settings:va});var wa=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M11.696 13.972c.356-.546.599-.958.728-1.235a1.79 1.79 0 00.203-.783c0-.264-.077-.47-.23-.618-.148-.153-.354-.23-.618-.23-.295 0-.569.07-.82.212a3.413 3.413 0 00-.738.571l-.147-1.188c.289-.234.59-.41.903-.526.313-.117.66-.175 1.041-.175.375 0 .695.08.959.24.264.153.46.362.59.626.135.265.203.556.203.876 0 .362-.08.734-.24 1.115-.154.381-.427.87-.82 1.466l-.756 1.152H14v1.106h-4l1.696-2.609z"}),(0,it.jsx)(St.Path,{d:"M19.5 7h-15v12a.5.5 0 00.5.5h14a.5.5 0 00.5-.5V7zM3 7V5a2 2 0 012-2h14a2 2 0 012 2v14a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"})]});const Ca=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-date","title":"Comment Date","category":"theme","ancestor":["core/comment-template"],"description":"Displays the date on which the comment was posted.","textdomain":"default","attributes":{"format":{"type":"string"},"isLink":{"type":"boolean","default":true}},"usesContext":["commentId"],"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-date"}'),ja=window.wp.date;const Sa={attributes:{format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Ba=[Sa];const{name:Ta}=Ca,Na={icon:wa,edit:function({attributes:{format:e,isLink:t},context:{commentId:o},setAttributes:n}){const r=(0,ct.useBlockProps)(),a=vt();let[i]=(0,_t.useEntityProp)("root","comment","date",o);const[s=(0,ja.getSettings)().formats.date]=(0,_t.useEntityProp)("root","site","date_format"),l=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({format:void 0,isLink:!0})},dropdownMenuProps:a,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Date format"),hasValue:()=>void 0!==e,onDeselect:()=>n({format:void 0}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalDateFormatPicker,{format:e,defaultFormat:s,onChange:e=>n({format:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to comment"),hasValue:()=>!t,onDeselect:()=>n({isLink:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to comment"),onChange:()=>n({isLink:!t}),checked:t})})]})});o&&i||(i=(0,pt._x)("Comment Date","block title"));let c=i instanceof Date?(0,it.jsx)("time",{dateTime:(0,ja.dateI18n)("c",i),children:"human-diff"===e?(0,ja.humanTimeDiff)(i):(0,ja.dateI18n)(e||s,i)}):(0,it.jsx)("time",{children:i});return t&&(c=(0,it.jsx)("a",{href:"#comment-date-pseudo-link",onClick:e=>e.preventDefault(),children:c})),(0,it.jsxs)(it.Fragment,{children:[l,(0,it.jsx)("div",{...r,children:c})]})},deprecated:Ba,example:{}},Pa=()=>jt({name:Ta,metadata:Ca,settings:Na});var Ia=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"m6.249 11.065.44-.44h3.186l-1.5 1.5H7.31l-1.957 1.96A.792.792 0 0 1 4 13.524V5a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v1.5L12.5 8V5.5h-7v6.315l.749-.75ZM20 19.75H7v-1.5h13v1.5Zm0-12.653-8.967 9.064L8 17l.867-2.935L17.833 5 20 7.097Z"})});const Da=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-edit-link","title":"Comment Edit Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.","textdomain":"default","usesContext":["commentId"],"attributes":{"linkTarget":{"type":"string","default":"_self"},"textAlign":{"type":"string"}},"supports":{"html":false,"color":{"link":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-comment-edit-link"}');const{name:Ma}=Da,za={icon:Ia,edit:function({attributes:{linkTarget:e,textAlign:t},setAttributes:o}){const n=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${t}`]:t})}),r=vt(),a=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:t,onChange:e=>o({textAlign:e})})}),i=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({linkTarget:"_self"})},dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_blank"===e,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===e})})})});return(0,it.jsxs)(it.Fragment,{children:[a,i,(0,it.jsx)("div",{...n,children:(0,it.jsx)("a",{href:"#edit-comment-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("Edit")})})]})},example:{}},Aa=()=>jt({name:Ma,metadata:Da,settings:za});var La=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M6.68822 10.625L6.24878 11.0649L5.5 11.8145L5.5 5.5L12.5 5.5V8L14 6.5V5C14 4.44772 13.5523 4 13 4H5C4.44772 4 4 4.44771 4 5V13.5247C4 13.8173 4.16123 14.086 4.41935 14.2237C4.72711 14.3878 5.10601 14.3313 5.35252 14.0845L7.31 12.125H8.375L9.875 10.625H7.31H6.68822ZM14.5605 10.4983L11.6701 13.75H16.9975C17.9963 13.75 18.7796 14.1104 19.3553 14.7048C19.9095 15.2771 20.2299 16.0224 20.4224 16.7443C20.7645 18.0276 20.7543 19.4618 20.7487 20.2544C20.7481 20.345 20.7475 20.4272 20.7475 20.4999L19.2475 20.5001C19.2475 20.4191 19.248 20.3319 19.2484 20.2394V20.2394C19.2526 19.4274 19.259 18.2035 18.973 17.1307C18.8156 16.5401 18.586 16.0666 18.2778 15.7483C17.9909 15.4521 17.5991 15.25 16.9975 15.25H11.8106L14.5303 17.9697L13.4696 19.0303L8.96956 14.5303L13.4394 9.50171L14.5605 10.4983Z"})});const Ha=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-reply-link","title":"Comment Reply Link","category":"theme","ancestor":["core/comment-template"],"description":"Displays a link to reply to a comment.","textdomain":"default","usesContext":["commentId"],"attributes":{"textAlign":{"type":"string"}},"supports":{"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"html":false},"style":"wp-block-comment-reply-link"}');var Ra=function({setAttributes:e,attributes:{textAlign:t}}){const o=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${t}`]:t})}),n=(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:t,onChange:t=>e({textAlign:t})})});return(0,it.jsxs)(it.Fragment,{children:[n,(0,it.jsx)("div",{...o,children:(0,it.jsx)("a",{href:"#comment-reply-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("Reply")})})]})};const{name:Va}=Ha,Fa={edit:Ra,icon:La,example:{}},Ea=()=>jt({name:Va,metadata:Ha,settings:Fa});var Oa=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});const Ga=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comment-template","title":"Comment Template","category":"design","parent":["core/comments"],"description":"Contains the block elements used to display a comment, like the title, date, author, avatar and more.","textdomain":"default","usesContext":["postId"],"supports":{"align":true,"html":false,"reusable":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-comment-template"}'),$a=window.wp.apiFetch;var Ua=r.n($a);const qa=({defaultPage:e,postId:t,perPage:o,queryArgs:n})=>{const[r,a]=(0,gt.useState)({}),i=`${t}_${o}`,s=r[i]||0;return(0,gt.useEffect)((()=>{s||"newest"!==e||Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{...n,post:t,per_page:o,_fields:"id"}),method:"HEAD",parse:!1}).then((e=>{const t=parseInt(e.headers.get("X-WP-TotalPages"));a({...r,[i]:t<=1?1:t})})).catch((()=>{a({...r,[i]:1})}))}),[e,t,o,a]),"newest"===e?s:1},Wa=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];function Za({comment:e,activeCommentId:t,setActiveCommentId:o,firstCommentId:n,blocks:r}){const{children:a,...i}=(0,ct.useInnerBlocksProps)({},{template:Wa});return(0,it.jsxs)("li",{...i,children:[e.commentId===(t||n)?a:null,(0,it.jsx)(Ja,{blocks:r,commentId:e.commentId,setActiveCommentId:o,isHidden:e.commentId===(t||n)}),e?.children?.length>0?(0,it.jsx)(Qa,{comments:e.children,activeCommentId:t,setActiveCommentId:o,blocks:r,firstCommentId:n}):null]})}const Ja=(0,gt.memo)((({blocks:e,commentId:t,setActiveCommentId:o,isHidden:n})=>{const r=(0,ct.__experimentalUseBlockPreview)({blocks:e}),a=()=>{o(t)},i={display:n?"none":void 0};return(0,it.jsx)("div",{...r,tabIndex:0,role:"button",style:i,onClick:a,onKeyPress:a})})),Qa=({comments:e,blockProps:t,activeCommentId:o,setActiveCommentId:n,blocks:r,firstCommentId:a})=>(0,it.jsx)("ol",{...t,children:e&&e.map((({commentId:e,...t},i)=>(0,it.jsx)(ct.BlockContextProvider,{value:{commentId:e<0?null:e},children:(0,it.jsx)(Za,{comment:{commentId:e,...t},activeCommentId:o,setActiveCommentId:n,blocks:r,firstCommentId:a})},t.commentId||i)))});const{name:Ka}=Ga,Ya={icon:Oa,edit:function({clientId:e,context:{postId:t}}){const o=(0,ct.useBlockProps)(),[n,r]=(0,gt.useState)(),{commentOrder:a,threadCommentsDepth:i,threadComments:s,commentsPerPage:l,pageComments:c}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return t().__experimentalDiscussionSettings})),u=(({postId:e})=>{const t={status:"approve",order:"asc",context:"embed",parent:0,_embed:"children"},{pageComments:o,commentsPerPage:n,defaultCommentsPage:r}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o})),a=o?Math.min(n,100):100,i=qa({defaultPage:r,postId:e,perPage:a,queryArgs:t});return(0,gt.useMemo)((()=>i?{...t,post:e,per_page:a,page:i}:null),[e,a,i])})({postId:t}),{topLevelComments:d,blocks:p}=(0,lt.useSelect)((t=>{const{getEntityRecords:o}=t(_t.store),{getBlocks:n}=t(ct.store);return{topLevelComments:u?o("root","comment",u):null,blocks:n(e)}}),[e,u]);let m=(e=>(0,gt.useMemo)((()=>e?.map((({id:e,_embedded:t})=>{const[o]=t?.children||[[]];return{commentId:e,children:o.map((e=>({commentId:e.id})))}}))),[e]))("desc"===a&&d?[...d].reverse():d);return d?(t||(m=(({perPage:e,pageComments:t,threadComments:o,threadCommentsDepth:n})=>{const r=o?Math.min(n,3):1,a=e=>e<r?[{commentId:-(e+3),children:a(e+1)}]:[],i=[{commentId:-1,children:a(1)}];return(!t||e>=2)&&r<3&&i.push({commentId:-2,children:[]}),(!t||e>=3)&&r<2&&i.push({commentId:-3,children:[]}),i})({perPage:l,pageComments:c,threadComments:s,threadCommentsDepth:i})),m.length?(0,it.jsx)(Qa,{comments:m,blockProps:o,blocks:p,activeCommentId:n,setActiveCommentId:r,firstCommentId:m[0]?.commentId}):(0,it.jsx)("p",{...o,children:(0,pt.__)("No results found.")})):(0,it.jsx)("p",{...o,children:(0,it.jsx)(mt.Spinner,{})})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},Xa=()=>jt({name:Ka,metadata:Ga,settings:Ya});var ei=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M16 10.5v3h3v-3h-3zm-5 3h3v-3h-3v3zM7 9l-3 3 3 3 1-1-2-2 2-2-1-1z"})});const ti=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-previous","title":"Comments Previous Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the previous comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),oi={none:"",arrow:"←",chevron:"«"};const{name:ni}=ti,ri={icon:ei,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":o}}){const n=oi[o];return(0,it.jsxs)("a",{href:"#comments-pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[n&&(0,it.jsx)("span",{className:`wp-block-comments-pagination-previous-arrow is-arrow-${o}`,children:n}),(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Older comments page link"),placeholder:(0,pt.__)("Older Comments"),value:e,onChange:e=>t({label:e})})]})},example:{attributes:{label:(0,pt.__)("Older Comments")}}},ai=()=>jt({name:ni,metadata:ti,settings:ri});var ii=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h6v-3H4v3zm8 0h3v-3h-3v3zm5-3v3h3v-3h-3z"})});const si=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination","title":"Comments Pagination","category":"theme","parent":["core/comments"],"allowedBlocks":["core/comments-pagination-previous","core/comments-pagination-numbers","core/comments-pagination-next"],"description":"Displays a paginated navigation to next/previous set of comments, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"}},"example":{"attributes":{"paginationArrow":"none"}},"providesContext":{"comments/paginationArrow":"paginationArrow"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-comments-pagination-editor","style":"wp-block-comments-pagination"}');function li({value:e,onChange:t}){return(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:e,onChange:t,help:(0,pt.__)("A decorative arrow appended to the next and previous comments link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Comments Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Comments Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Comments Pagination Next/Previous blocks")})]})}const ci=[["core/comments-pagination-previous"],["core/comments-pagination-numbers"],["core/comments-pagination-next"]];const{name:ui}=si,di={icon:ii,edit:function({attributes:{paginationArrow:e},setAttributes:t,clientId:o}){const n=(0,lt.useSelect)((e=>{const{getBlocks:t}=e(ct.store),n=t(o);return n?.find((e=>["core/comments-pagination-previous","core/comments-pagination-next"].includes(e.name)))}),[]),r=(0,ct.useBlockProps)(),a=vt(),i=(0,ct.useInnerBlocksProps)(r,{template:ci});return(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{__experimentalDiscussionSettings:o}=t();return o?.pageComments}),[])?(0,it.jsxs)(it.Fragment,{children:[n&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),dropdownMenuProps:a,resetAll:()=>t({paginationArrow:"none"}),children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Arrow"),hasValue:()=>"none"!==e,onDeselect:()=>t({paginationArrow:"none"}),isShownByDefault:!0,children:(0,it.jsx)(li,{value:e,onChange:e=>{t({paginationArrow:e})}})})})}),(0,it.jsx)("div",{...i})]}):(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Comments Pagination block: paging comments is disabled in the Discussion Settings")})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},pi=()=>jt({name:ui,metadata:si,settings:di});var mi=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 13.5h3v-3H5v3zm5 0h3v-3h-3v3zM17 9l-1 1 2 2-2 2 1 1 3-3-3-3z"})});const gi=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-next","title":"Comments Next Page","category":"theme","parent":["core/comments-pagination"],"description":"Displays the next comment\'s page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["postId","comments/paginationArrow"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),hi={none:"",arrow:"→",chevron:"»"};const{name:_i}=gi,xi={icon:mi,edit:function({attributes:{label:e},setAttributes:t,context:{"comments/paginationArrow":o}}){const n=hi[o];return(0,it.jsxs)("a",{href:"#comments-pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Newer comments page link"),placeholder:(0,pt.__)("Newer Comments"),value:e,onChange:e=>t({label:e})}),n&&(0,it.jsx)("span",{className:`wp-block-comments-pagination-next-arrow is-arrow-${o}`,children:n})]})},example:{attributes:{label:(0,pt.__)("Newer Comments")}}},bi=()=>jt({name:_i,metadata:gi,settings:xi});var fi=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 13.5h6v-3H4v3zm8.2-2.5.8-.3V14h1V9.3l-2.2.7.4 1zm7.1-1.2c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3-.1-.8-.3-1.1z"})});const yi=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-pagination-numbers","title":"Comments Page Numbers","category":"theme","parent":["core/comments-pagination"],"description":"Displays a list of page numbers for comments pagination.","textdomain":"default","usesContext":["postId"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),vi=({content:e,tag:t="a",extraClass:o=""})=>"a"===t?(0,it.jsx)(t,{className:`page-numbers ${o}`,href:"#comments-pagination-numbers-pseudo-link",onClick:e=>e.preventDefault(),children:e}):(0,it.jsx)(t,{className:`page-numbers ${o}`,children:e});const{name:ki}=yi,wi={icon:fi,edit:function(){return(0,it.jsxs)("div",{...(0,ct.useBlockProps)(),children:[(0,it.jsx)(vi,{content:"1"}),(0,it.jsx)(vi,{content:"2"}),(0,it.jsx)(vi,{content:"3",tag:"span",extraClass:"current"}),(0,it.jsx)(vi,{content:"4"}),(0,it.jsx)(vi,{content:"5"}),(0,it.jsx)(vi,{content:"...",tag:"span",extraClass:"dots"}),(0,it.jsx)(vi,{content:"8"})]})},example:{}},Ci=()=>jt({name:ki,metadata:yi,settings:wi});var ji=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})});const Si=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/comments-title","title":"Comments Title","category":"theme","ancestor":["core/comments"],"description":"Displays a title with the number of comments.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"showPostTitle":{"type":"boolean","default":true},"showCommentsCount":{"type":"boolean","default":true},"level":{"type":"number","default":2},"levelOptions":{"type":"array"}},"supports":{"anchor":false,"align":true,"html":false,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true}},"interactivity":{"clientNavigation":true}}}');const{attributes:Bi,supports:Ti}=Si;var Ni=[{attributes:{...Bi,singleCommentLabel:{type:"string"},multipleCommentsLabel:{type:"string"}},supports:Ti,migrate:e=>{const{singleCommentLabel:t,multipleCommentsLabel:o,...n}=e;return n},isEligible:({multipleCommentsLabel:e,singleCommentLabel:t})=>e||t,save:()=>null}];const{name:Pi}=Si,Ii={icon:ji,edit:function({attributes:{textAlign:e,showPostTitle:t,showCommentsCount:o,level:n,levelOptions:r},setAttributes:a,context:{postType:i,postId:s}}){const l="h"+n,[c,u]=(0,gt.useState)(),[d]=(0,_t.useEntityProp)("postType",i,"title",s),p=void 0===s,m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${e}`]:e})}),{threadCommentsDepth:g,threadComments:h,commentsPerPage:_,pageComments:x}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return t().__experimentalDiscussionSettings})),b=vt();(0,gt.useEffect)((()=>{if(p){const e=h?Math.min(g,3)-1:0,t=x?_:3,o=parseInt(e)+parseInt(t);return void u(Math.min(o,3))}const e=s;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:s,_fields:"id"}),method:"HEAD",parse:!1}).then((t=>{e===s&&u(parseInt(t.headers.get("X-WP-Total")))})).catch((()=>{u(0)}))}),[s]);const f=(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:e,onChange:e=>a({textAlign:e})}),(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>a({level:e})})]}),y=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({showPostTitle:!0,showCommentsCount:!0})},dropdownMenuProps:b,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show post title"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>a({showPostTitle:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post title"),checked:t,onChange:e=>a({showPostTitle:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show comments count"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>a({showCommentsCount:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show comments count"),checked:o,onChange:e=>a({showCommentsCount:e})})})]})}),v=p?(0,pt.__)("“Post Title”"):`"${d}"`;let k;return k=o&&void 0!==c?t?1===c?(0,pt.sprintf)((0,pt.__)("One response to %s"),v):(0,pt.sprintf)((0,pt._n)("%1$s response to %2$s","%1$s responses to %2$s",c),c,v):1===c?(0,pt.__)("One response"):(0,pt.sprintf)((0,pt._n)("%s response","%s responses",c),c):t?1===c?(0,pt.sprintf)((0,pt.__)("Response to %s"),v):(0,pt.sprintf)((0,pt.__)("Responses to %s"),v):1===c?(0,pt.__)("Response"):(0,pt.__)("Responses"),(0,it.jsxs)(it.Fragment,{children:[f,y,(0,it.jsx)(l,{...m,children:k})]})},deprecated:Ni,example:{}},Di=()=>jt({name:Pi,metadata:Si,settings:Ii});var Mi=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h6.2v8.9l2.5-3.1 2.5 3.1V4.5h2.2c.4 0 .8.4.8.8v13.4z"})});const zi={"top left":"is-position-top-left","top center":"is-position-top-center","top right":"is-position-top-right","center left":"is-position-center-left","center center":"is-position-center-center",center:"is-position-center-center","center right":"is-position-center-right","bottom left":"is-position-bottom-left","bottom center":"is-position-bottom-center","bottom right":"is-position-bottom-right"},Ai="image",Li="video",Hi={x:.5,y:.5},Ri=["image","video"];function Vi({x:e,y:t}=Hi){return`${Math.round(100*e)}% ${Math.round(100*t)}%`}function Fi(e){return 50===e||void 0===e?null:"has-background-dim-"+10*Math.round(e/10)}function Ei(e){return!e||"center center"===e||"center"===e}function Oi(e){return Ei(e)?"":zi[e]}function Gi(e){return e?{backgroundImage:`url(${e})`}:{}}function $i(e){return 0!==e&&50!==e&&e?"has-background-dim-"+10*Math.round(e/10):null}function Ui(e){return{...e,dimRatio:e.url?e.dimRatio:100}}function qi(e){return e.tagName||(e={...e,tagName:"div"}),{...e}}const Wi={url:{type:"string"},id:{type:"number"},hasParallax:{type:"boolean",default:!1},dimRatio:{type:"number",default:50},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"}},Zi={url:{type:"string"},id:{type:"number"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},hasParallax:{type:"boolean",default:!1},isRepeated:{type:"boolean",default:!1},dimRatio:{type:"number",default:100},overlayColor:{type:"string"},customOverlayColor:{type:"string"},backgroundType:{type:"string",default:"image"},focalPoint:{type:"object"},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},isDark:{type:"boolean",default:!0},allowedBlocks:{type:"array"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},Ji={...Zi,useFeaturedImage:{type:"boolean",default:!1},tagName:{type:"string",default:"div"}},Qi={...Ji,isUserOverlayColor:{type:"boolean"},sizeSlug:{type:"string"},alt:{type:"string",default:""}},Ki={anchor:!0,align:!0,html:!1,spacing:{padding:!0,__experimentalDefaultControls:{padding:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",text:!1,background:!1}},Yi={...Ki,spacing:{padding:!0,margin:["top","bottom"],blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{__experimentalDuotone:"> .wp-block-cover__image-background, > .wp-block-cover__video-background",heading:!0,text:!0,background:!1,__experimentalSkipSerialization:["gradients"],enableContrastChecker:!1},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},layout:{allowJustification:!1}},Xi={attributes:Qi,supports:{...Yi,shadow:!0,dimensions:{aspectRatio:!0},interactivity:{clientNavigation:!0}},save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b,sizeSlug:f}=e,y=(0,ct.getColorClassName)("background-color",p),v=(0,ct.__experimentalGetGradientClass)(o),k=Ai===t,w=Li===t,C=!(c||d),j={minHeight:(_&&x?`${_}${x}`:_)||void 0},S={backgroundColor:y?void 0:a,background:r||void 0},B=s&&C?Vi(s):void 0,T=m?`url(${m})`:void 0,N=Vi(s),P=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),I=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{[`size-${f}`]:f,"has-parallax":c,"is-repeated":d}),D=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:P,style:j}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",y,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&D&&0!==i,"has-background-gradient":D,[v]:v}),style:S}),!l&&k&&m&&(C?(0,it.jsx)("img",{className:I,alt:g,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}):(0,it.jsx)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:I,style:{backgroundPosition:N,backgroundImage:T}})),w&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:B},"data-object-fit":"cover","data-object-position":B}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},es={attributes:Ji,supports:Yi,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b}=e,f=(0,ct.getColorClassName)("background-color",p),y=(0,ct.__experimentalGetGradientClass)(o),v=Ai===t,k=Li===t,w=!(c||d),C={minHeight:(_&&x?`${_}${x}`:_)||void 0},j={backgroundColor:f?void 0:a,background:r||void 0},S=s&&w?Vi(s):void 0,B=m?`url(${m})`:void 0,T=Vi(s),N=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),P=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),I=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:N,style:C}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",f,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&I&&0!==i,"has-background-gradient":I,[y]:y}),style:j}),!l&&v&&m&&(w?(0,it.jsx)("img",{className:P,alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,it.jsx)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),k&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},ts={attributes:Ji,supports:Yi,isEligible:e=>(void 0!==e.customOverlayColor||void 0!==e.overlayColor)&&void 0===e.isUserOverlayColor,migrate:e=>({...e,isUserOverlayColor:!0}),save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b}=e,f=(0,ct.getColorClassName)("background-color",p),y=(0,ct.__experimentalGetGradientClass)(o),v=Ai===t,k=Li===t,w=!(c||d),C={minHeight:(_&&x?`${_}${x}`:_)||void 0},j={backgroundColor:f?void 0:a,background:r||void 0},S=s&&w?Vi(s):void 0,B=m?`url(${m})`:void 0,T=Vi(s),N=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),P=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),I=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:N,style:C}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",f,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&I&&0!==i,"has-background-gradient":I,[y]:y}),style:j}),!l&&v&&m&&(w?(0,it.jsx)("img",{className:P,alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}):(0,it.jsx)("div",{role:"img",className:P,style:{backgroundPosition:T,backgroundImage:B}})),k&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})}},os={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x}=e,b=(0,ct.getColorClassName)("background-color",p),f=(0,ct.__experimentalGetGradientClass)(o),y=Ai===t,v=Li===t,k=!(c||d),w={minHeight:(_&&x?`${_}${x}`:_)||void 0},C={backgroundColor:b?void 0:a,background:r||void 0},j=s&&k?Vi(s):void 0,S=m?`url(${m})`:void 0,B=Vi(s),T=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),N=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{"has-parallax":c,"is-repeated":d}),P=o||r;return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:T,style:w}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",b,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&P&&0!==i,"has-background-gradient":P,[f]:f}),style:C}),!l&&y&&m&&(k?(0,it.jsx)("img",{className:N,alt:g,src:m,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}):(0,it.jsx)("div",{role:"img",className:N,style:{backgroundPosition:B,backgroundImage:S}})),v&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},ns={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x}=e,b=(0,ct.getColorClassName)("background-color",p),f=(0,ct.__experimentalGetGradientClass)(o),y=_&&x?`${_}${x}`:_,v=Ai===t,k=Li===t,w=!(c||d),C={...!v||w||l?{}:Gi(m),minHeight:y||void 0},j={backgroundColor:b?void 0:a,background:r||void 0},S=s&&w?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,B=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),T=o||r;return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:B,style:C}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",b,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&T&&0!==i,"has-background-gradient":T,[f]:f}),style:j}),!l&&v&&w&&m&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null),alt:g,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),k&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,style:{objectPosition:S},"data-object-fit":"cover","data-object-position":S}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},rs={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isDark:c,isRepeated:u,overlayColor:d,url:p,alt:m,id:g,minHeight:h,minHeightUnit:_}=e,x=(0,ct.getColorClassName)("background-color",d),b=(0,ct.__experimentalGetGradientClass)(o),f=_?`${h}${_}`:h,y=Ai===t,v=Li===t,k=!(l||u),w={...y&&!k?Gi(p):{},minHeight:f||void 0},C={backgroundColor:x?void 0:a,background:r||void 0},j=s&&k?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,S=Dt({"is-light":!c,"has-parallax":l,"is-repeated":u,"has-custom-content-position":!Ei(n)},Oi(n)),B=o||r;return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:S,style:w}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",x,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":p&&B&&0!==i,"has-background-gradient":B,[b]:b}),style:C}),y&&k&&p&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:m,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),v&&p&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},as={attributes:Zi,supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isDark:c,isRepeated:u,overlayColor:d,url:p,alt:m,id:g,minHeight:h,minHeightUnit:_}=e,x=(0,ct.getColorClassName)("background-color",d),b=(0,ct.__experimentalGetGradientClass)(o),f=_?`${h}${_}`:h,y=Ai===t,v=Li===t,k=!(l||u),w={...y&&!k?Gi(p):{},minHeight:f||void 0},C={backgroundColor:x?void 0:a,background:r||void 0},j=s&&k?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,S=Dt({"is-light":!c,"has-parallax":l,"is-repeated":u,"has-custom-content-position":!Ei(n)},Oi(n));return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:S,style:w}),children:[(0,it.jsx)("span",{"aria-hidden":"true",className:Dt(x,Fi(i),"wp-block-cover__gradient-background",b,{"has-background-dim":void 0!==i,"has-background-gradient":o||r,[b]:!p&&b}),style:C}),y&&k&&p&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",g?`wp-image-${g}`:null),alt:m,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),v&&p&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:p,style:{objectPosition:j},"data-object-fit":"cover","data-object-position":j}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},migrate:qi},is={attributes:{...Wi,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""}},supports:Ki,save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,alt:p,id:m,minHeight:g,minHeightUnit:h}=e,_=(0,ct.getColorClassName)("background-color",u),x=(0,ct.__experimentalGetGradientClass)(o),b=h?`${g}${h}`:g,f=Ai===t,y=Li===t,v=!(l||c),k={...f&&!v?Gi(d):{},backgroundColor:_?void 0:a,background:r&&!d?r:void 0,minHeight:b||void 0},w=s&&v?`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`:void 0,C=Dt($i(i),_,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":o||r,[x]:!d&&x,"has-custom-content-position":!Ei(n)},Oi(n));return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:C,style:k}),children:[d&&(o||r)&&0!==i&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",x),style:r?{background:r}:void 0}),f&&v&&d&&(0,it.jsx)("img",{className:Dt("wp-block-cover__image-background",m?`wp-image-${m}`:null),alt:p,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),y&&d&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:{objectPosition:w},"data-object-fit":"cover","data-object-position":w}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},ss={attributes:{...Wi,isRepeated:{type:"boolean",default:!1},minHeight:{type:"number"},minHeightUnit:{type:"string"},gradient:{type:"string"},customGradient:{type:"string"},contentPosition:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,hasParallax:l,isRepeated:c,overlayColor:u,url:d,minHeight:p,minHeightUnit:m}=e,g=(0,ct.getColorClassName)("background-color",u),h=(0,ct.__experimentalGetGradientClass)(o),_=m?`${p}${m}`:p,x=Ai===t,b=Li===t,f=x?Gi(d):{},y={};let v;g||(f.backgroundColor=a),r&&!d&&(f.background=r),f.minHeight=_||void 0,s&&(v=`${Math.round(100*s.x)}% ${Math.round(100*s.y)}%`,x&&!l&&(f.backgroundPosition=v),b&&(y.objectPosition=v));const k=Dt($i(i),g,{"has-background-dim":0!==i,"has-parallax":l,"is-repeated":c,"has-background-gradient":o||r,[h]:!d&&h,"has-custom-content-position":!Ei(n)},Oi(n));return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:k,style:f}),children:[d&&(o||r)&&0!==i&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",h),style:r?{background:r}:void 0}),b&&d&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:d,style:y}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},ls={attributes:{...Wi,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,customGradient:n,customOverlayColor:r,dimRatio:a,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=(0,ct.getColorClassName)("background-color",l),p=(0,ct.__experimentalGetGradientClass)(o),m=t===Ai?Gi(c):{};d||(m.backgroundColor=r),i&&!s&&(m.backgroundPosition=`${Math.round(100*i.x)}% ${Math.round(100*i.y)}%`),n&&!c&&(m.background=n),m.minHeight=u||void 0;const g=Dt($i(a),d,{"has-background-dim":0!==a,"has-parallax":s,"has-background-gradient":n,[p]:!c&&p});return(0,it.jsxs)("div",{className:g,style:m,children:[c&&(o||n)&&0!==a&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",p),style:n?{background:n}:void 0}),Li===t&&c&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},cs={attributes:{...Wi,minHeight:{type:"number"},gradient:{type:"string"},customGradient:{type:"string"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,gradient:o,customGradient:n,customOverlayColor:r,dimRatio:a,focalPoint:i,hasParallax:s,overlayColor:l,url:c,minHeight:u}=e,d=(0,ct.getColorClassName)("background-color",l),p=(0,ct.__experimentalGetGradientClass)(o),m=t===Ai?Gi(c):{};d||(m.backgroundColor=r),i&&!s&&(m.backgroundPosition=`${100*i.x}% ${100*i.y}%`),n&&!c&&(m.background=n),m.minHeight=u||void 0;const g=Dt($i(a),d,{"has-background-dim":0!==a,"has-parallax":s,"has-background-gradient":n,[p]:!c&&p});return(0,it.jsxs)("div",{className:g,style:m,children:[c&&(o||n)&&0!==a&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__gradient-background",p),style:n?{background:n}:void 0}),Li===t&&c&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),(0,it.jsx)("div",{className:"wp-block-cover__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})},migrate:(0,xt.compose)(Ui,qi)},us={attributes:{...Wi,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"}},supports:{align:!0},save({attributes:e}){const{backgroundType:t,contentAlign:o,customOverlayColor:n,dimRatio:r,focalPoint:a,hasParallax:i,overlayColor:s,title:l,url:c}=e,u=(0,ct.getColorClassName)("background-color",s),d=t===Ai?Gi(c):{};u||(d.backgroundColor=n),a&&!i&&(d.backgroundPosition=`${100*a.x}% ${100*a.y}%`);const p=Dt($i(r),u,{"has-background-dim":0!==r,"has-parallax":i,[`has-${o}-content`]:"center"!==o});return(0,it.jsxs)("div",{className:p,style:d,children:[Li===t&&c&&(0,it.jsx)("video",{className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:c}),!ct.RichText.isEmpty(l)&&(0,it.jsx)(ct.RichText.Content,{tagName:"p",className:"wp-block-cover-text",value:l})]})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,...r}=t;return[r,[(0,st.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,pt.__)("Write title…")})]]}},ds={attributes:{...Wi,title:{type:"string",source:"html",selector:"p"},contentAlign:{type:"string",default:"center"},align:{type:"string"}},supports:{className:!1},save({attributes:e}){const{url:t,title:o,hasParallax:n,dimRatio:r,align:a,contentAlign:i,overlayColor:s,customOverlayColor:l}=e,c=(0,ct.getColorClassName)("background-color",s),u=Gi(t);c||(u.backgroundColor=l);const d=Dt("wp-block-cover-image",$i(r),c,{"has-background-dim":0!==r,"has-parallax":n,[`has-${i}-content`]:"center"!==i},a?`align${a}`:null);return(0,it.jsx)("div",{className:d,style:u,children:!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"p",className:"wp-block-cover-image-text",value:o})})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,align:r,...a}=t;return[a,[(0,st.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,pt.__)("Write title…")})]]}},ps={attributes:{...Wi,title:{type:"string",source:"html",selector:"h2"},align:{type:"string"},contentAlign:{type:"string",default:"center"}},supports:{className:!1},save({attributes:e}){const{url:t,title:o,hasParallax:n,dimRatio:r,align:a}=e,i=Gi(t),s=Dt("wp-block-cover-image",$i(r),{"has-background-dim":0!==r,"has-parallax":n},a?`align${a}`:null);return(0,it.jsx)("section",{className:s,style:i,children:(0,it.jsx)(ct.RichText.Content,{tagName:"h2",value:o})})},migrate(e){const t={...e,dimRatio:e.url?e.dimRatio:100,tagName:e.tagName?e.tagName:"div"},{title:o,contentAlign:n,align:r,...a}=t;return[a,[(0,st.createBlock)("core/paragraph",{content:e.title,align:e.contentAlign,fontSize:"large",placeholder:(0,pt.__)("Write title…")})]]}};var ms=[Xi,es,ts,os,ns,rs,as,is,ss,ls,cs,us,ds,ps];const gs="full",hs=["image"];var _s=function e({poster:t,onChange:o}){const n=(0,gt.useRef)(),[r,a]=(0,gt.useState)(!1),i=(0,xt.useInstanceId)(e,"block-library-poster-image-description"),{getSettings:s}=(0,lt.useSelect)(ct.store),{createErrorNotice:l}=(0,lt.useDispatch)(bo.store),c=e=>{s().mediaUpload({allowedTypes:hs,filesList:e,onFileChange:([e])=>{(0,ht.isBlobURL)(e?.url)?a(!0):(e&&o(e),a(!1))},onError:e=>{l(e,{id:"poster-image-upload-notice",type:"snackbar"}),a(!1)},multiple:!1})};return(0,it.jsx)(ct.MediaUploadCheck,{children:(0,it.jsxs)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Poster image"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>o(void 0),children:[(0,it.jsx)(mt.BaseControl.VisualLabel,{children:(0,pt.__)("Poster image")}),(0,it.jsx)(ct.MediaUpload,{title:(0,pt.__)("Select poster image"),onSelect:o,allowedTypes:hs,render:({open:e})=>(0,it.jsxs)("div",{className:"block-library-poster-image__container",children:[t&&(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,onClick:e,"aria-haspopup":"dialog","aria-label":(0,pt.__)("Edit or replace the poster image."),className:"block-library-poster-image__preview",disabled:r,accessibleWhenDisabled:!0,children:[(0,it.jsx)("img",{src:t,alt:(0,pt.__)("Poster image preview"),className:"block-library-poster-image__preview-image"}),r&&(0,it.jsx)(mt.Spinner,{})]}),(0,it.jsxs)(mt.__experimentalHStack,{className:Dt("block-library-poster-image__actions",{"block-library-poster-image__actions-select":!t}),children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:e,ref:n,className:"block-library-poster-image__action","aria-describedby":i,"aria-haspopup":"dialog",variant:t?void 0:"secondary",disabled:r,accessibleWhenDisabled:!0,children:!t&&r?(0,it.jsx)(mt.Spinner,{}):t?(0,pt.__)("Replace"):(0,pt.__)("Set poster image")}),(0,it.jsx)("p",{id:i,hidden:!0,children:t?(0,pt.sprintf)((0,pt.__)("The current poster image url is %s."),t):(0,pt.__)("There is no poster image currently selected.")}),!!t&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{o(void 0),n.current.focus()},className:"block-library-poster-image__action",disabled:r,accessibleWhenDisabled:!0,children:(0,pt.__)("Remove")})]}),(0,it.jsx)(mt.DropZone,{onFilesDrop:c})]})})]})})};const{cleanEmptyObject:xs,ResolutionTool:bs,HTMLElementControl:fs}=jo(ct.privateApis);function ys({onChange:e,onUnitChange:t,unit:o="px",value:n=""}){const r=`block-cover-height-input-${(0,xt.useInstanceId)(mt.__experimentalUnitControl)}`,a="px"===o,[i]=(0,ct.useSettings)("spacing.units"),s=(0,mt.__experimentalUseCustomUnits)({availableUnits:i||["px","em","rem","vw","vh"],defaultValues:{px:430,"%":20,em:20,rem:20,vw:20,vh:50}}),l=(0,gt.useMemo)((()=>{const[e]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(n);return[e,o].join("")}),[o,n]),c=a?50:0;return(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Minimum height"),id:r,isResetValueOnUnitChange:!0,min:c,onChange:t=>{const o=""!==t?parseFloat(t):void 0;isNaN(o)&&void 0!==o||e(o)},onUnitChange:t,units:s,value:l})}function vs({attributes:e,setAttributes:t,clientId:o,setOverlayColor:n,coverRef:r,currentSettings:a,updateDimRatio:i,featuredImage:s}){const{useFeaturedImage:l,id:c,dimRatio:u,focalPoint:d,hasParallax:p,isRepeated:m,minHeight:g,minHeightUnit:h,alt:_,tagName:x,poster:b}=e,{isVideoBackground:f,isImageBackground:y,mediaElement:v,url:k,overlayColor:w}=a,C=e.sizeSlug||gs,{gradientValue:j,setGradient:S}=(0,ct.__experimentalUseGradient)(),{getSettings:B}=(0,lt.useSelect)(ct.store),T=B()?.imageSizes,N=(0,lt.useSelect)((e=>c&&y?e(_t.store).getEntityRecord("postType","attachment",c,{context:"view"}):null),[c,y]),P=l?s:N;function I(e){const o=P?.media_details?.sizes?.[e]?.source_url;if(!o)return null;t({url:o,sizeSlug:e})}const D=T?.filter((({slug:e})=>P?.media_details?.sizes?.[e]?.source_url))?.map((({name:e,slug:t})=>({value:t,label:e}))),M=f||y&&(!p||m),z=e=>{const[t,o]=v.current?[v.current.style,"objectPosition"]:[r.current.style,"backgroundPosition"];t[o]=Vi(e)},A=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)(),L=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:!!k&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({hasParallax:!1,focalPoint:void 0,isRepeated:!1,alt:"",poster:void 0}),I(gs)},dropdownMenuProps:L,children:[y&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Fixed background"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>t({hasParallax:!1,focalPoint:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Fixed background"),checked:!!p,onChange:()=>{t({hasParallax:!p,...p?{}:{focalPoint:void 0}})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Repeated background"),isShownByDefault:!0,hasValue:()=>m,onDeselect:()=>t({isRepeated:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Repeated background"),checked:m,onChange:()=>{t({isRepeated:!m})}})})]}),M&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!d,onDeselect:()=>t({focalPoint:void 0}),children:(0,it.jsx)(mt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Focal point"),url:k,value:d,onDragStart:z,onDrag:z,onChange:e=>t({focalPoint:e})})}),f&&(0,it.jsx)(_s,{poster:b,onChange:e=>t({poster:e?.url})}),!l&&k&&!f&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!_,onDeselect:()=>t({alt:""}),children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Alternative text"),value:_,onChange:e=>t({alt:e}),help:(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]})})}),!!D?.length&&(0,it.jsx)(bs,{value:C,onChange:I,options:D,defaultValue:gs})]})}),A.hasColorsOrGradients&&(0,it.jsxs)(ct.InspectorControls,{group:"color",children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:w.color,gradientValue:j,label:(0,pt.__)("Overlay"),onColorChange:n,onGradientChange:S,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:o,...A}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==u&&u!==(k?50:100),label:(0,pt.__)("Overlay opacity"),onDeselect:()=>i(k?50:100),resetAllFilter:()=>({dimRatio:k?50:100}),isShownByDefault:!0,panelId:o,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay opacity"),value:u,onChange:e=>i(e),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}),(0,it.jsx)(ct.InspectorControls,{group:"dimensions",children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!g,label:(0,pt.__)("Minimum height"),onDeselect:()=>t({minHeight:void 0,minHeightUnit:void 0}),resetAllFilter:()=>({minHeight:void 0,minHeightUnit:void 0}),isShownByDefault:!0,panelId:o,children:(0,it.jsx)(ys,{value:e?.style?.dimensions?.aspectRatio?"":g,unit:h,onChange:o=>t({minHeight:o,style:xs({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})}),onUnitChange:e=>t({minHeightUnit:e})})})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(fs,{tagName:x,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]})})]})}const{cleanEmptyObject:ks}=jo(ct.privateApis);function ws({attributes:e,setAttributes:t,onSelectMedia:o,currentSettings:n,toggleUseFeaturedImage:r,onClearMedia:a,blockEditingMode:i}){const{contentPosition:s,id:l,useFeaturedImage:c,minHeight:u,minHeightUnit:d}=e,{hasInnerBlocks:p,url:m}=n,[g,h]=(0,gt.useState)(u),[_,x]=(0,gt.useState)(d),b="vh"===d&&100===u&&!e?.style?.dimensions?.aspectRatio,f="contentOnly"===i;return(0,it.jsxs)(it.Fragment,{children:[!f&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.__experimentalBlockAlignmentMatrixControl,{label:(0,pt.__)("Change content position"),value:s,onChange:e=>t({contentPosition:e}),isDisabled:!p}),(0,it.jsx)(ct.__experimentalBlockFullHeightAligmentControl,{isActive:b,onToggle:()=>b?t("vh"===_&&100===g?{minHeight:void 0,minHeightUnit:void 0}:{minHeight:g,minHeightUnit:_}):(h(u),x(d),t({minHeight:100,minHeightUnit:"vh",style:ks({...e?.style,dimensions:{...e?.style?.dimensions,aspectRatio:void 0}})})),isDisabled:!p})]}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:l,mediaURL:m,allowedTypes:Ri,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:r,useFeaturedImage:c,name:m?(0,pt.__)("Replace"):(0,pt.__)("Add media"),onReset:a})})]})}function Cs({disableMediaButtons:e=!1,children:t,onSelectMedia:o,onError:n,style:r,toggleUseFeaturedImage:a}){return(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Mi}),labels:{title:(0,pt.__)("Cover")},onSelect:o,accept:"image/*,video/*",allowedTypes:Ri,disableMediaButtons:e,onToggleFeaturedImage:a,onError:n,style:r,children:t})}const js={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},{ResizableBoxPopover:Ss}=jo(ct.privateApis);function Bs({className:e,height:t,minHeight:o,onResize:n,onResizeStart:r,onResizeStop:a,showHandle:i,size:s,width:l,...c}){const[u,d]=(0,gt.useState)(!1),p={className:Dt(e,{"is-resizing":u}),enable:js,onResizeStart:(e,t,o)=>{r(o.clientHeight),n(o.clientHeight)},onResize:(e,t,o)=>{n(o.clientHeight),u||d(!0)},onResizeStop:(e,t,o)=>{a(o.clientHeight),d(!1)},showHandle:i,size:s,__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"y",position:"bottom",isVisible:u}};return(0,it.jsx)(Ss,{className:"block-library-cover__resizable-box-popover",resizableBoxProps:p,...c})}var Ts={grad:.9,turn:360,rad:360/(2*Math.PI)},Ns=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Ps=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=Math.pow(10,t)),Math.round(o*e)/o+0},Is=function(e,t,o){return void 0===t&&(t=0),void 0===o&&(o=1),e>o?o:e>t?e:t},Ds=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ms=function(e){return{r:Is(e.r,0,255),g:Is(e.g,0,255),b:Is(e.b,0,255),a:Is(e.a)}},zs=function(e){return{r:Ps(e.r),g:Ps(e.g),b:Ps(e.b),a:Ps(e.a,3)}},As=/^#([0-9a-f]{3,8})$/i,Ls=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Hs=function(e){var t=e.r,o=e.g,n=e.b,r=e.a,a=Math.max(t,o,n),i=a-Math.min(t,o,n),s=i?a===t?(o-n)/i:a===o?2+(n-t)/i:4+(t-o)/i:0;return{h:60*(s<0?s+6:s),s:a?i/a*100:0,v:a/255*100,a:r}},Rs=function(e){var t=e.h,o=e.s,n=e.v,r=e.a;t=t/360*6,o/=100,n/=100;var a=Math.floor(t),i=n*(1-o),s=n*(1-(t-a)*o),l=n*(1-(1-t+a)*o),c=a%6;return{r:255*[n,s,i,i,l,n][c],g:255*[l,n,n,s,i,i][c],b:255*[i,i,l,n,n,s][c],a:r}},Vs=function(e){return{h:Ds(e.h),s:Is(e.s,0,100),l:Is(e.l,0,100),a:Is(e.a)}},Fs=function(e){return{h:Ps(e.h),s:Ps(e.s),l:Ps(e.l),a:Ps(e.a,3)}},Es=function(e){return Rs((o=(t=e).s,{h:t.h,s:(o*=((n=t.l)<50?n:100-n)/100)>0?2*o/(n+o)*100:0,v:n+o,a:t.a}));var t,o,n},Os=function(e){return{h:(t=Hs(e)).h,s:(r=(200-(o=t.s))*(n=t.v)/100)>0&&r<200?o*n/100/(r<=100?r:200-r)*100:0,l:r/2,a:t.a};var t,o,n,r},Gs=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$s=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Us=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qs=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ws={string:[[function(e){var t=As.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Ps(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Ps(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Us.exec(e)||qs.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ms({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Gs.exec(e)||$s.exec(e);if(!t)return null;var o,n,r=Vs({h:(o=t[1],n=t[2],void 0===n&&(n="deg"),Number(o)*(Ts[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return Es(r)},"hsl"]],object:[[function(e){var t=e.r,o=e.g,n=e.b,r=e.a,a=void 0===r?1:r;return Ns(t)&&Ns(o)&&Ns(n)?Ms({r:Number(t),g:Number(o),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,o=e.s,n=e.l,r=e.a,a=void 0===r?1:r;if(!Ns(t)||!Ns(o)||!Ns(n))return null;var i=Vs({h:Number(t),s:Number(o),l:Number(n),a:Number(a)});return Es(i)},"hsl"],[function(e){var t=e.h,o=e.s,n=e.v,r=e.a,a=void 0===r?1:r;if(!Ns(t)||!Ns(o)||!Ns(n))return null;var i=function(e){return{h:Ds(e.h),s:Is(e.s,0,100),v:Is(e.v,0,100),a:Is(e.a)}}({h:Number(t),s:Number(o),v:Number(n),a:Number(a)});return Rs(i)},"hsv"]]},Zs=function(e,t){for(var o=0;o<t.length;o++){var n=t[o][0](e);if(n)return[n,t[o][1]]}return[null,void 0]},Js=function(e){return"string"==typeof e?Zs(e.trim(),Ws.string):"object"==typeof e&&null!==e?Zs(e,Ws.object):[null,void 0]},Qs=function(e,t){var o=Os(e);return{h:o.h,s:Is(o.s+100*t,0,100),l:o.l,a:o.a}},Ks=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Ys=function(e,t){var o=Os(e);return{h:o.h,s:o.s,l:Is(o.l+100*t,0,100),a:o.a}},Xs=function(){function e(e){this.parsed=Js(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Ps(Ks(this.rgba),2)},e.prototype.isDark=function(){return Ks(this.rgba)<.5},e.prototype.isLight=function(){return Ks(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=zs(this.rgba)).r,o=e.g,n=e.b,a=(r=e.a)<1?Ls(Ps(255*r)):"","#"+Ls(t)+Ls(o)+Ls(n)+a;var e,t,o,n,r,a},e.prototype.toRgb=function(){return zs(this.rgba)},e.prototype.toRgbString=function(){return t=(e=zs(this.rgba)).r,o=e.g,n=e.b,(r=e.a)<1?"rgba("+t+", "+o+", "+n+", "+r+")":"rgb("+t+", "+o+", "+n+")";var e,t,o,n,r},e.prototype.toHsl=function(){return Fs(Os(this.rgba))},e.prototype.toHslString=function(){return t=(e=Fs(Os(this.rgba))).h,o=e.s,n=e.l,(r=e.a)<1?"hsla("+t+", "+o+"%, "+n+"%, "+r+")":"hsl("+t+", "+o+"%, "+n+"%)";var e,t,o,n,r},e.prototype.toHsv=function(){return e=Hs(this.rgba),{h:Ps(e.h),s:Ps(e.s),v:Ps(e.v),a:Ps(e.a,3)};var e},e.prototype.invert=function(){return el({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),el(Qs(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),el(Qs(this.rgba,-e))},e.prototype.grayscale=function(){return el(Qs(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),el(Ys(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),el(Ys(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?el({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Ps(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=Os(this.rgba);return"number"==typeof e?el({h:e,s:t.s,l:t.l,a:t.a}):Ps(t.h)},e.prototype.isEqual=function(e){return this.toHex()===el(e).toHex()},e}(),el=function(e){return e instanceof Xs?e:new Xs(e)},tl=[];
/*! Fast Average Color | © 2022 Denis Seleznev | MIT License | https://github.com/fast-average-color/fast-average-color */
-function ol(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function nl(e){return"#"+e.map(ol).join("")}function rl(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function al(e,t,o){for(var n=0;n<o.length;n++)if(il(e,t,o[n]))return!0;return!1}function il(e,t,o){switch(o.length){case 3:if(function(e,t,o){if(255!==e[t+3])return!0;if(e[t]===o[0]&&e[t+1]===o[1]&&e[t+2]===o[2])return!0;return!1}(e,t,o))return!0;break;case 4:if(function(e,t,o){if(e[t+3]&&o[3])return e[t]===o[0]&&e[t+1]===o[1]&&e[t+2]===o[2]&&e[t+3]===o[3];return e[t+3]===o[3]}(e,t,o))return!0;break;case 5:if(function(e,t,o){var n=o[0],r=o[1],a=o[2],i=o[3],s=o[4],l=e[t+3],c=sl(l,i,s);if(!i)return c;if(!l&&c)return!0;if(sl(e[t],n,s)&&sl(e[t+1],r,s)&&sl(e[t+2],a,s)&&c)return!0;return!1}(e,t,o))return!0;break;default:return!1}}function sl(e,t,o){return e>=t-o&&e<=t+o}function ll(e,t,o){for(var n={},r=o.ignoredColor,a=o.step,i=[0,0,0,0,0],s=0;s<t;s+=a){var l=e[s],c=e[s+1],u=e[s+2],d=e[s+3];if(!r||!al(e,s,r)){var p=Math.round(l/24)+","+Math.round(c/24)+","+Math.round(u/24);n[p]?n[p]=[n[p][0]+l*d,n[p][1]+c*d,n[p][2]+u*d,n[p][3]+d,n[p][4]+1]:n[p]=[l*d,c*d,u*d,d,1],i[4]<n[p][4]&&(i=n[p])}}var m=i[0],g=i[1],h=i[2],_=i[3],x=i[4];return _?[Math.round(m/_),Math.round(g/_),Math.round(h/_),Math.round(_/x)]:o.defaultColor}function cl(e,t,o){for(var n=0,r=0,a=0,i=0,s=0,l=o.ignoredColor,c=o.step,u=0;u<t;u+=c){var d=e[u+3],p=e[u]*d,m=e[u+1]*d,g=e[u+2]*d;l&&al(e,u,l)||(n+=p,r+=m,a+=g,i+=d,s++)}return i?[Math.round(n/i),Math.round(r/i),Math.round(a/i),Math.round(i/s)]:o.defaultColor}function ul(e,t,o){for(var n=0,r=0,a=0,i=0,s=0,l=o.ignoredColor,c=o.step,u=0;u<t;u+=c){var d=e[u],p=e[u+1],m=e[u+2],g=e[u+3];l&&al(e,u,l)||(n+=d*d*g,r+=p*p*g,a+=m*m*g,i+=g,s++)}return i?[Math.round(Math.sqrt(n/i)),Math.round(Math.sqrt(r/i)),Math.round(Math.sqrt(a/i)),Math.round(i/s)]:o.defaultColor}function dl(e){return pl(e,"defaultColor",[0,0,0,0])}function pl(e,t,o){return void 0===e[t]?o:e[t]}function ml(e){if(hl(e)){var t=e.naturalWidth,o=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=o=100),{width:t,height:o}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function gl(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return _l&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function hl(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var _l="undefined"!=typeof OffscreenCanvas;var xl="undefined"==typeof window;function bl(e){return Error("FastAverageColor: "+e)}function fl(e,t){t||console.error(e)}var yl=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(bl("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(bl("resource as string is not supported in this environment"));var o=new Image;return o.crossOrigin=t&&t.crossOrigin||"",o.src=e,this.bindImageEvents(o,t)}if(hl(e)&&!e.complete)return this.bindImageEvents(e,t);var n=this.getColor(e,t);return n.error?Promise.reject(n.error):Promise.resolve(n)},e.prototype.getColor=function(e,t){var o=dl(t=t||{});if(!e)return fl(a=bl("call .getColor(null) without resource"),t.silent),this.prepareResult(o,a);var n=function(e,t){var o,n=pl(t,"left",0),r=pl(t,"top",0),a=pl(t,"width",e.width),i=pl(t,"height",e.height),s=a,l=i;return"precision"===t.mode||(a>i?(o=a/i,s=100,l=Math.round(s/o)):(o=i/a,l=100,s=Math.round(l/o)),(s>a||l>i||s<10||l<10)&&(s=a,l=i)),{srcLeft:n,srcTop:r,srcWidth:a,srcHeight:i,destWidth:s,destHeight:l}}(ml(e),t);if(!(n.srcWidth&&n.srcHeight&&n.destWidth&&n.destHeight))return fl(a=bl('incorrect sizes for resource "'.concat(gl(e),'"')),t.silent),this.prepareResult(o,a);if(!this.canvas&&(this.canvas=xl?_l?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return fl(a=bl("OffscreenCanvas is not supported in this browser"),t.silent),this.prepareResult(o,a);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return fl(a=bl("Canvas Context 2D is not supported in this browser"),t.silent),this.prepareResult(o);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=n.destWidth,this.canvas.height=n.destHeight;try{this.ctx.clearRect(0,0,n.destWidth,n.destHeight),this.ctx.drawImage(e,n.srcLeft,n.srcTop,n.srcWidth,n.srcHeight,0,0,n.destWidth,n.destHeight);var r=this.ctx.getImageData(0,0,n.destWidth,n.destHeight).data;return this.prepareResult(this.getColorFromArray4(r,t))}catch(n){var a;return fl(a=bl("security error (CORS) for resource ".concat(gl(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),t.silent),!t.silent&&console.error(n),this.prepareResult(o,a)}},e.prototype.getColorFromArray4=function(e,t){t=t||{};var o=e.length,n=dl(t);if(o<4)return n;var r,a=o-o%4,i=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":r=cl;break;case"sqrt":r=ul;break;case"dominant":r=ll;break;default:throw bl("".concat(t.algorithm," is unknown algorithm"))}return r(e,a,{defaultColor:n,ignoredColor:rl(t.ignoredColor),step:i})},e.prototype.prepareResult=function(e,t){var o,n=e.slice(0,3),r=[e[0],e[1],e[2],e[3]/255],a=(299*(o=e)[0]+587*o[1]+114*o[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+n.join(",")+")",rgba:"rgba("+r.join(",")+")",hex:nl(n),hexa:nl(e),isDark:a,isLight:!a,error:t}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(e,t){var o=this;return new Promise((function(n,r){var a=function(){l();var a=o.getColor(e,t);a.error?r(a.error):n(a)},i=function(){l(),r(bl('Error loading image "'.concat(e.src,'".')))},s=function(){l(),r(bl('Image "'.concat(e.src,'" loading aborted')))},l=function(){e.removeEventListener("load",a),e.removeEventListener("error",i),e.removeEventListener("abort",s)};e.addEventListener("load",a),e.addEventListener("error",i),e.addEventListener("abort",s)}))},e}();const vl=window.wp.hooks;!function(e){e.forEach((function(e){tl.indexOf(e)<0&&(e(Xs,Ws),tl.push(e))}))}([function(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var r in o)n[o[r]]=r;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=n[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!a.length)for(var d in o)a[d]=new e(o[d]).toRgb();for(var p in o){var m=(r=l,i=a[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var n=t.toLowerCase(),r="transparent"===n?"#0000":o[n];return r?new e(r).toRgb():null},"name"])}]);const kl="#FFF";function wl(){return wl.fastAverageColor||(wl.fastAverageColor=new yl),wl.fastAverageColor}const Cl=fo((async e=>{if(!e)return kl;const{r:t,g:o,b:n,a:r}=el(kl).toRgb();try{const a=(0,vl.applyFilters)("media.crossOrigin",void 0,e);return(await wl().getColorAsync(e,{defaultColor:[t,o,n,255*r],silent:!0,crossOrigin:a})).hex}catch(e){return kl}}));function jl(e,t,o){if(t===o||100===e)return el(t).isDark();const n=el(t).alpha(e/100).toRgb(),r=el(o).toRgb(),a=(s=r,{r:(i=n).r*i.a+s.r*s.a*(1-i.a),g:i.g*i.a+s.g*s.a*(1-i.a),b:i.b*i.a+s.b*s.a*(1-i.a),a:i.a+s.a*(1-i.a)});var i,s;return el(a).isDark()}var Sl=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((function({attributes:e,clientId:t,isSelected:o,overlayColor:n,setAttributes:r,setOverlayColor:a,toggleSelection:i,context:{postId:s,postType:l}}){const{contentPosition:c,id:u,url:d,backgroundType:p,useFeaturedImage:m,dimRatio:g,focalPoint:h,hasParallax:_,isDark:x,isRepeated:b,minHeight:f,minHeightUnit:y,alt:v,allowedBlocks:k,templateLock:w,tagName:C="div",isUserOverlayColor:j,sizeSlug:S,poster:B}=e,[T]=(0,_t.useEntityProp)("postType",l,"featured_media",s),{getSettings:N}=(0,lt.useSelect)(ct.store),{__unstableMarkNextChangeAsNotPersistent:P}=(0,lt.useDispatch)(ct.store),{media:I}=(0,lt.useSelect)((e=>({media:T&&m?e(_t.store).getEntityRecord("postType","attachment",T,{context:"view"}):void 0})),[T,m]),D=I?.media_details?.sizes?.[S]?.source_url??I?.source_url;(0,gt.useEffect)((()=>{(async()=>{if(!m)return;const e=await Cl(D);let t=n.color;j||(t=e,P(),a(t));const o=jl(g,t,e);P(),r({isDark:o,isUserOverlayColor:j||!1})})()}),[D]);const M=m?D:d?.replaceAll("&","&"),z=m?Ai:p,{createErrorNotice:A}=(0,lt.useDispatch)(bo.store),{gradientClass:L,gradientValue:H}=(0,ct.__experimentalUseGradient)(),R=async e=>{const t=function(e){if(!e||!e.url&&!e.src)return{url:void 0,id:void 0};let t;if((0,ht.isBlobURL)(e.url)&&(e.type=(0,ht.getBlobTypeByURL)(e.url)),e.media_type)t=e.media_type===Ai?Ai:Li;else{if(!e.type||e.type!==Ai&&e.type!==Li)return;t=e.type}return{url:e.url||e.src,id:e.id,alt:e?.alt,backgroundType:t,...t===Li?{hasParallax:void 0}:{}}}(e),o=[e?.type,e?.media_type].includes(Ai),i=await Cl(o?e?.url:void 0);let s=n.color;j||(s=i,a(s),P());const l=void 0===d&&100===g?50:g,c=jl(l,s,i);if(z===Ai&&t?.id){const{imageDefaultSize:o}=N();S&&(e?.sizes?.[S]||e?.media_details?.sizes?.[S])?(t.sizeSlug=S,t.url=e?.sizes?.[S]?.url||e?.media_details?.sizes?.[S]?.source_url):e?.sizes?.[o]||e?.media_details?.sizes?.[o]?(t.sizeSlug=o,t.url=e?.sizes?.[o]?.url||e?.media_details?.sizes?.[o]?.source_url):t.sizeSlug=gs}r({...t,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:l,isDark:c,isUserOverlayColor:j||!1})},V=()=>{let e=n.color;j||(e="#000",a(void 0),P());const t=jl(g,e,kl);r({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:t})},F=async e=>{const t=await Cl(M),o=jl(g,e,t);a(e),P(),r({isUserOverlayColor:!0,isDark:o})},E=e=>{A(e,{type:"snackbar"})},O=((e,t)=>!e&&(0,ht.isBlobURL)(t))(u,M),G=Ai===z,$=Li===z,U=(0,ct.useBlockEditingMode)(),q="default"===U,[W,{height:Z,width:J}]=(0,xt.useResizeObserver)(),Q=(0,gt.useMemo)((()=>({height:"px"===y&&f?f:"auto",width:"auto"})),[f,y]),K=f&&y?`${f}${y}`:f,Y=!(_||b),X={minHeight:K||void 0},ee=M?`url(${M})`:void 0,te=Vi(h),oe={backgroundColor:n.color},ne={objectPosition:h&&Y?Vi(h):void 0},re=!!(M||n.color||H),ae=(0,lt.useSelect)((e=>e(ct.store).getBlock(t).innerBlocks.length>0),[t]),ie=(0,gt.useRef)(),se=(0,ct.useBlockProps)({ref:ie}),[le]=(0,ct.useSettings)("typography.fontSizes"),ce=function(e){return[["core/paragraph",{align:"center",placeholder:(0,pt.__)("Write title…"),...e}]]}({fontSize:le?.length>0?"large":void 0}),ue=(0,ct.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:ae?void 0:ce,templateInsertUpdatesSelection:!0,allowedBlocks:k,templateLock:w,dropZoneElement:ie.current}),de=(0,gt.useRef)(),pe={isVideoBackground:$,isImageBackground:G,mediaElement:de,hasInnerBlocks:ae,url:M,isImgElement:Y,overlayColor:n},me=async()=>{const e=!m,t=e?await Cl(D):kl,o=j?n.color:t;j||(a(e?o:void 0),P());const i=100===g?50:g,s=jl(i,o,t);r({id:void 0,url:void 0,useFeaturedImage:e,dimRatio:i,backgroundType:m?Ai:void 0,isDark:s})},ge=(0,it.jsx)(ws,{attributes:e,setAttributes:r,onSelectMedia:R,currentSettings:pe,toggleUseFeaturedImage:me,onClearMedia:V,blockEditingMode:U}),he=(0,it.jsx)(vs,{attributes:e,setAttributes:r,clientId:t,setOverlayColor:F,coverRef:ie,currentSettings:pe,toggleUseFeaturedImage:me,updateDimRatio:async e=>{const t=await Cl(M),o=jl(e,n.color,t);r({dimRatio:e,isDark:o})},onClearMedia:V,featuredImage:I}),_e={className:"block-library-cover__resize-container",clientId:t,height:Z,minHeight:K,onResizeStart:()=>{r({minHeightUnit:"px"}),i(!1)},onResize:e=>{r({minHeight:e})},onResizeStop:e=>{i(!0),r({minHeight:e})},showHandle:!e.style?.dimensions?.aspectRatio,size:Q,width:J};if(!m&&!ae&&!re)return(0,it.jsxs)(it.Fragment,{children:[ge,he,q&&o&&(0,it.jsx)(Bs,{..._e}),(0,it.jsxs)(C,{...se,className:Dt("is-placeholder",se.className),style:{...se.style,minHeight:K||void 0},children:[W,(0,it.jsx)(Cs,{onSelectMedia:R,onError:E,toggleUseFeaturedImage:me,children:(0,it.jsx)("div",{className:"wp-block-cover__placeholder-background-options",children:(0,it.jsx)(ct.ColorPalette,{disableCustomColors:!0,value:n.color,onChange:F,clearable:!1,asButtons:!0,"aria-label":(0,pt.__)("Overlay color")})})})]})]});const xe=Dt({"is-dark-theme":x,"is-light":!x,"is-transient":O,"has-parallax":_,"is-repeated":b,"has-custom-content-position":!Ei(c)},Oi(c)),be=M||!m||m&&!M;return(0,it.jsxs)(it.Fragment,{children:[ge,he,(0,it.jsxs)(C,{...se,className:Dt(xe,se.className),style:{...X,...se.style},"data-url":M,children:[W,!M&&m&&(0,it.jsx)(mt.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),M&&G&&(Y?(0,it.jsx)("img",{ref:de,className:"wp-block-cover__image-background",alt:v,src:M,style:ne}):(0,it.jsx)("div",{ref:de,role:v?"img":void 0,"aria-label":v||void 0,className:Dt(xe,"wp-block-cover__image-background"),style:{backgroundImage:ee,backgroundPosition:te}})),M&&$&&(0,it.jsx)("video",{ref:de,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:M,poster:B,style:ne}),be&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",Fi(g),{[n.class]:n.class,"has-background-dim":void 0!==g,"wp-block-cover__gradient-background":M&&H&&0!==g,"has-background-gradient":H,[L]:L}),style:{backgroundImage:H,...oe}}),O&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(Cs,{disableMediaButtons:!0,onSelectMedia:R,onError:E,toggleUseFeaturedImage:me}),(0,it.jsx)("div",{...ue})]}),q&&o&&(0,it.jsx)(Bs,{..._e})]})}));const Bl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/cover","title":"Cover","category":"media","description":"Add an image or video with a text overlay.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"useFeaturedImage":{"type":"boolean","default":false},"id":{"type":"number"},"alt":{"type":"string","default":""},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"dimRatio":{"type":"number","default":100},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"backgroundType":{"type":"string","default":"image"},"focalPoint":{"type":"object"},"minHeight":{"type":"number"},"minHeightUnit":{"type":"string"},"gradient":{"type":"string"},"customGradient":{"type":"string"},"contentPosition":{"type":"string"},"isDark":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"sizeSlug":{"type":"string"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":true,"html":false,"shadow":true,"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"heading":true,"text":true,"background":false,"__experimentalSkipSerialization":["gradients"],"enableContrastChecker":false},"dimensions":{"aspectRatio":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowJustification":false},"interactivity":{"clientNavigation":true},"filter":{"duotone":true},"allowedBlocks":true},"selectors":{"filter":{"duotone":".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"}},"editorStyle":"wp-block-cover-editor","style":"wp-block-cover"}');const{cleanEmptyObject:Tl}=jo(ct.privateApis),Nl={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:o,align:n,id:r,anchor:a,style:i})=>(0,st.createBlock)("core/cover",{dimRatio:50,url:t,alt:o,align:n,id:r,anchor:a,style:{color:{duotone:i?.color?.duotone}}},[(0,st.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:o,id:n,anchor:r})=>(0,st.createBlock)("core/cover",{dimRatio:50,url:t,align:o,id:n,backgroundType:Li,anchor:r},[(0,st.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{const{align:o,anchor:n,backgroundColor:r,gradient:a,style:i}=e;if(1===t?.length&&"core/cover"===t[0]?.name)return(0,st.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const s={align:o,anchor:n,dimRatio:r||a||i?.color?.background||i?.color?.gradient?void 0:50,overlayColor:r,customOverlayColor:i?.color?.background,gradient:a,customGradient:i?.color?.gradient},l={...e,backgroundColor:void 0,gradient:void 0,style:Tl({...e?.style,color:i?.color?{...i?.color,background:void 0,gradient:void 0}:void 0})};return(0,st.createBlock)("core/cover",s,[(0,st.createBlock)("core/group",l,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:o,customOverlayColor:n,gradient:r,customGradient:a})=>t?e===Ai:!(o||n||r||a),transform:({title:e,url:t,alt:o,align:n,id:r,anchor:a,style:i})=>(0,st.createBlock)("core/image",{caption:e,url:t,alt:o,align:n,id:r,anchor:a,style:{color:{duotone:i?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:o,customOverlayColor:n,gradient:r,customGradient:a})=>t?e===Li:!(o||n||r||a),transform:({title:e,url:t,align:o,id:n,anchor:r})=>(0,st.createBlock)("core/video",{caption:e,src:t,id:n,align:o,anchor:r})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!e&&!t,transform:(e,t)=>{const o={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:Tl({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(1===t?.length&&"core/group"===t[0]?.name){const e=Tl(t[0].attributes||{});return e?.backgroundColor||e?.gradient||e?.style?.color?.background||e?.style?.color?.gradient?(0,st.createBlock)("core/group",e,t[0]?.innerBlocks):(0,st.createBlock)("core/group",{...o,...e,style:Tl({...e?.style,color:o?.style?.color||e?.style?.color?{...o?.style?.color,...e?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,st.createBlock)("core/group",{...e,...o},t)}}]};var Pl=Nl;var Il=[{name:"cover",title:(0,pt.__)("Cover"),description:(0,pt.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:Mi}];const{name:Dl}=Bl,Ml={icon:Mi,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg",style:{typography:{fontSize:48},color:{text:"white"}}},innerBlocks:[{name:"core/paragraph",attributes:{content:`<strong>${(0,pt.__)("Snow Patrol")}</strong>`,align:"center"}}]},transforms:Pl,save:function({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b,sizeSlug:f,poster:y}=e,v=(0,ct.getColorClassName)("background-color",p),k=(0,ct.__experimentalGetGradientClass)(o),w=Ai===t,C=Li===t,j=!(c||d),S={minHeight:(_&&x?`${_}${x}`:_)||void 0},B={backgroundColor:v?void 0:a,background:r||void 0},T=s&&j?Vi(s):void 0,N=m?`url(${m})`:void 0,P=Vi(s),I=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),D=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{[`size-${f}`]:f,"has-parallax":c,"is-repeated":d}),M=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:I,style:S}),children:[!l&&w&&m&&(j?(0,it.jsx)("img",{className:D,alt:g,src:m,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}):(0,it.jsx)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:D,style:{backgroundPosition:P,backgroundImage:N}})),C&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,poster:y,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}),(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",v,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&M&&0!==i,"has-background-gradient":M,[k]:k}),style:B}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},edit:Sl,deprecated:ms,variations:Il},zl=()=>jt({name:Dl,metadata:Bl,settings:Ml});var Al=(0,it.jsxs)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)(St.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,it.jsx)(St.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})]});const Ll=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/details","title":"Details","category":"text","description":"Hide and show additional content.","keywords":["summary","toggle","disclosure"],"textdomain":"default","attributes":{"showContent":{"type":"boolean","default":false},"summary":{"type":"rich-text","source":"rich-text","selector":"summary","role":"content"},"name":{"type":"string","source":"attribute","attribute":"name","selector":".wp-block-details"},"placeholder":{"type":"string"}},"supports":{"__experimentalOnEnter":true,"align":["wide","full"],"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowEditing":false},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-details-editor","style":"wp-block-details"}'),{withIgnoreIMEEvents:Hl}=jo(mt.privateApis),Rl=[["core/paragraph",{placeholder:(0,pt.__)("Type / to add a hidden block")}]];var Vl=function({attributes:e,setAttributes:t,clientId:o}){const{name:n,showContent:r,summary:a,allowedBlocks:i,placeholder:s}=e,l=(0,ct.useBlockProps)(),c=(0,ct.useInnerBlocksProps)(l,{template:Rl,__experimentalCaptureToolbars:!0,allowedBlocks:i}),[u,d]=(0,gt.useState)(r),p=vt(),m=(0,lt.useSelect)((e=>e(ct.store).hasSelectedInnerBlock(o,!0)),[o]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({showContent:!1})},dropdownMenuProps:p,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Open by default"),hasValue:()=>r,onDeselect:()=>{t({showContent:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open by default"),checked:r,onChange:()=>t({showContent:!r})})})})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Name attribute"),value:n||"",onChange:e=>t({name:e}),help:(0,pt.__)("Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.")})}),(0,it.jsxs)("details",{...c,open:u||m,onToggle:e=>d(e.target.open),name:n||"",children:[(0,it.jsx)("summary",{onKeyDown:Hl((e=>{"Enter"!==e.key||e.shiftKey||(d((e=>!e)),e.preventDefault())})),onKeyUp:e=>{" "===e.key&&e.preventDefault()},children:(0,it.jsx)(ct.RichText,{identifier:"summary","aria-label":(0,pt.__)("Write summary. Press Enter to expand or collapse the details."),placeholder:s||(0,pt.__)("Write summary…"),withoutInteractiveFormatting:!0,value:a,onChange:e=>t({summary:e})})}),c.children]})]})};var Fl={from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>!(1===e.length&&"core/details"===e[0].name),__experimentalConvert:e=>(0,st.createBlock)("core/details",{},e.map((e=>(0,st.cloneBlock)(e))))}]};const{name:El}=Ll,Ol={icon:Al,example:{attributes:{summary:(0,pt.__)("La Mancha"),showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},__experimentalLabel(e,{context:t}){const{summary:o}=e,n=e?.metadata?.name,r=o?.trim().length>0;return"list-view"===t&&(n||r)?n||o:"accessibility"===t?r?(0,pt.sprintf)((0,pt.__)("Details. %s"),o):(0,pt.__)("Details. Empty."):void 0},save:function({attributes:e}){const{name:t,showContent:o}=e,n=e.summary?e.summary:"Details",r=ct.useBlockProps.save();return(0,it.jsxs)("details",{...r,name:t||void 0,open:o,children:[(0,it.jsx)("summary",{children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(ct.InnerBlocks.Content,{})]})},edit:Vl,transforms:Fl},Gl=()=>jt({name:El,metadata:Ll,settings:Ol});var $l=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});function Ul(e){return e?(0,pt.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,pt.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var ql=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:o,allowResponsive:n,toggleResponsive:r,switchBackToURLInput:a})=>{const i=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:t&&(0,it.jsx)(mt.ToolbarButton,{className:"components-toolbar__control",label:(0,pt.__)("Edit URL"),icon:$l,onClick:a})})}),o&&e&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Media settings"),resetAll:()=>{r(!0)},dropdownMenuProps:i,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Media settings"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>{r(!n)},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Resize for smaller devices"),checked:n,help:Ul,onChange:r})})})})]})};const Wl=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})}),Zl=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})}),Jl=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),Ql=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})}),Kl={foreground:"#1da1f2",src:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})})})},Yl={foreground:"#ff0000",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})})},Xl={foreground:"#3b5998",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})})},ec=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})}),tc={foreground:"#0073AA",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})})})},oc={foreground:"#1db954",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"})})},nc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})}),rc={foreground:"#1ab7ea",src:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})})})},ac=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})}),ic={foreground:"#35465c",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"})})},sc=(0,it.jsxs)(mt.SVG,{viewBox:"0 0 24 24",children:[(0,it.jsx)(mt.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,it.jsx)(mt.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,it.jsx)(mt.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})]}),lc=(0,it.jsxs)(mt.SVG,{viewBox:"0 0 24 24",children:[(0,it.jsx)(mt.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,it.jsx)(mt.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,it.jsx)(mt.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,it.jsx)(mt.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,it.jsx)(mt.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,it.jsx)(mt.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})]}),cc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})}),uc=(0,it.jsx)(mt.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(mt.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})}),dc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 44 44",children:(0,it.jsx)(mt.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})}),pc={foreground:"#f43e37",src:(0,it.jsxs)(mt.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)(mt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,it.jsx)(mt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"})]})},mc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{fill:"#0a7aff",d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})});var gc=()=>(0,it.jsx)("div",{className:"wp-block-embed is-loading",children:(0,it.jsx)(mt.Spinner,{})});var hc=({icon:e,label:t,value:o,onSubmit:n,onChange:r,cannotEmbed:a,fallback:i,tryAgain:s})=>(0,it.jsxs)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,pt.__)("Paste a link to the content you want to display on your site."),children:[(0,it.jsxs)("form",{onSubmit:n,children:[(0,it.jsx)(mt.__experimentalInputControl,{__next40pxDefaultSize:!0,type:"url",value:o||"",className:"wp-block-embed__placeholder-input",label:t,hideLabelFromVision:!0,placeholder:(0,pt.__)("Enter URL to embed here…"),onChange:r}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,pt._x)("Embed","button label")})]}),(0,it.jsx)("div",{className:"wp-block-embed__learn-more",children:(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://wordpress.org/documentation/article/embeds/"),children:(0,pt.__)("Learn more about embeds")})}),a&&(0,it.jsxs)(mt.__experimentalVStack,{spacing:3,className:"components-placeholder__error",children:[(0,it.jsx)("div",{className:"components-placeholder__instructions",children:(0,pt.__)("Sorry, this content could not be embedded.")}),(0,it.jsxs)(mt.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:s,children:(0,pt._x)("Try again","button label")})," ",(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,children:(0,pt._x)("Convert to link","button label")})]})]})]});const _c={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function xc({html:e}){const t=(0,gt.useRef)(),o=(0,gt.useMemo)((()=>{const t=(new window.DOMParser).parseFromString(e,"text/html").querySelector("iframe"),o={};return t?(Array.from(t.attributes).forEach((({name:e,value:t})=>{"style"!==e&&(o[_c[e]||e]=t)})),o):o}),[e]);return(0,gt.useEffect)((()=>{const{ownerDocument:e}=t.current,{defaultView:n}=e;function r({data:{secret:e,message:n,value:r}={}}){"height"===n&&e===o["data-secret"]&&(t.current.height=r)}return n.addEventListener("message",r),()=>{n.removeEventListener("message",r)}}),[]),(0,it.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,it.jsx)("iframe",{ref:(0,xt.useMergeRefs)([t,(0,xt.useFocusableIframe)()]),title:o.title,...o})})}function bc({preview:e,previewable:t,url:o,type:n,isSelected:r,className:a,icon:i,label:s}){const[l,c]=(0,gt.useState)(!1);!r&&l&&c(!1);const u=()=>{c(!0)},{scripts:d}=e,p="photo"===n?(e=>{const t=e.url||e.thumbnail_url,o=(0,it.jsx)("p",{children:(0,it.jsx)("img",{src:t,alt:e.title,width:"100%"})});return(0,gt.renderToString)(o)})(e):e.html,m=(0,no.getAuthority)(o),g=(0,pt.sprintf)((0,pt.__)("Embedded content from %s"),m),h=Dt(n,a,"wp-block-embed__wrapper"),_="wp-embed"===n?(0,it.jsx)(xc,{html:p}):(0,it.jsxs)("div",{className:"wp-block-embed__wrapper",children:[(0,it.jsx)(mt.SandBox,{html:p,scripts:d,title:g,type:h,onFocus:u}),!l&&(0,it.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:u})]});return(0,it.jsx)(it.Fragment,{children:t?_:(0,it.jsxs)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:i,showColors:!0}),label:s,children:[(0,it.jsx)("p",{className:"components-placeholder__error",children:(0,it.jsx)("a",{href:o,children:o})}),(0,it.jsx)("p",{className:"components-placeholder__error",children:(0,pt.sprintf)((0,pt.__)("Embedded content from %s can't be previewed in the editor."),m)})]})})}var fc=e=>{const{attributes:{providerNameSlug:t,previewable:o,responsive:n,url:r},attributes:a,isSelected:i,onReplace:s,setAttributes:l,insertBlocksAfter:c,onFocus:u}=e,d={title:(0,pt._x)("Embed","block title"),icon:Wl},{icon:p,title:m}=(g=t,(0,st.getBlockVariations)(So)?.find((({name:e})=>e===g))||d);var g;const[h,_]=(0,gt.useState)(r),[x,b]=(0,gt.useState)(!1),{invalidateResolution:f}=(0,lt.useDispatch)(_t.store),{preview:y,fetching:v,themeSupportsResponsive:k,cannotEmbed:w,hasResolved:C}=(0,lt.useSelect)((e=>{const{getEmbedPreview:t,isPreviewEmbedFallback:o,isRequestingEmbedPreview:n,getThemeSupports:a,hasFinishedResolution:i}=e(_t.store);if(!r)return{fetching:!1,cannotEmbed:!1};const s=t(r),l=o(r),c=!!s&&!(!1===s?.html&&void 0===s?.type)&&!(404===s?.data?.status);return{preview:c?s:void 0,fetching:n(r),themeSupportsResponsive:a()["responsive-embeds"],cannotEmbed:!c||l,hasResolved:i("getEmbedPreview",[r])}}),[r]),j=()=>((e,t,o,n)=>{const{allowResponsive:r,className:a}=e;return{...e,...Do(t,o,a,n,r)}})(a,y,m,n);(0,gt.useEffect)((()=>{if(y?.html||!w||!C)return;const e=r.replace(/\/$/,"");_(e),b(!1),l({url:e})}),[y?.html,r,w,C,l]),(0,gt.useEffect)((()=>{if(w&&!v&&h&&"x.com"===(0,no.getAuthority)(h)){const e=new URL(h);e.host="twitter.com",l({url:e.toString()})}}),[h,w,v,l]),(0,gt.useEffect)((()=>{if(y&&!x){const t=j();if(Object.keys(t).some((e=>t[e]!==a[e]))&&l(t),s){const o=No(e,t);o&&s(o)}}}),[y,x]);const S=(0,ct.useBlockProps)();if(v)return(0,it.jsx)(St.View,{...S,children:(0,it.jsx)(gc,{})});const B=(0,pt.sprintf)((0,pt.__)("%s URL"),m);if(!y||w||x)return(0,it.jsx)(St.View,{...S,children:(0,it.jsx)(hc,{icon:p,label:B,onFocus:u,onSubmit:e=>{e&&e.preventDefault();const t=Po(a.className);b(!1),l({url:h,className:t})},value:h,cannotEmbed:w,onChange:e=>_(e),fallback:()=>function(e,t){const o=(0,it.jsx)("a",{href:e,children:e});t((0,st.createBlock)("core/paragraph",{content:(0,gt.renderToString)(o)}))}(h,s),tryAgain:()=>{f("getEmbedPreview",[h])}})});const{caption:T,type:N,allowResponsive:P,className:I}=j(),D=Dt(I,e.className);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ql,{showEditButton:y&&!w,themeSupportsResponsive:k,blockSupportsResponsive:n,allowResponsive:P,toggleResponsive:function(e){const{className:t}=a,{html:o}=y;l({allowResponsive:e,className:Io(o,t,n&&e)})},switchBackToURLInput:()=>b(!0)}),(0,it.jsxs)("figure",{...S,className:Dt(S.className,D,{[`is-type-${N}`]:N,[`is-provider-${t}`]:t,[`wp-block-embed-${t}`]:t}),children:[(0,it.jsx)(bc,{preview:y,previewable:o,className:D,url:h,type:N,caption:T,onCaptionChange:e=>l({caption:e}),isSelected:i,icon:p,label:B,insertBlocksAfter:c,attributes:a,setAttributes:l}),(0,it.jsx)(zo,{attributes:a,setAttributes:l,isSelected:i,insertBlocksAfter:c,label:(0,pt.__)("Embed caption text"),showToolbarButton:i})]})]})};const{name:yc}=yo;var vc={from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:e=>(0,st.createBlock)(yc,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t,className:o})=>{let n=`<a href="${e}">${e}</a>`;return t?.trim()&&(n+=`<br />${t}`),(0,st.createBlock)("core/paragraph",{content:n,className:Po(o)})}}]};function kc(e){return(0,pt.sprintf)((0,pt.__)("%s Embed"),e)}const wc=[{name:"twitter",title:kc("Twitter"),icon:Kl,keywords:["tweet",(0,pt.__)("social")],description:(0,pt.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:kc("YouTube"),icon:Yl,keywords:[(0,pt.__)("music"),(0,pt.__)("video")],description:(0,pt.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:kc("Facebook"),icon:Xl,keywords:[(0,pt.__)("social")],description:(0,pt.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:kc("Instagram"),icon:ec,keywords:[(0,pt.__)("image"),(0,pt.__)("social")],description:(0,pt.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:kc("WordPress"),icon:tc,keywords:[(0,pt.__)("post"),(0,pt.__)("blog")],description:(0,pt.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:kc("SoundCloud"),icon:Zl,keywords:[(0,pt.__)("music"),(0,pt.__)("audio")],description:(0,pt.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:kc("Spotify"),icon:oc,keywords:[(0,pt.__)("music"),(0,pt.__)("audio")],description:(0,pt.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:kc("Flickr"),icon:nc,keywords:[(0,pt.__)("image")],description:(0,pt.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:kc("Vimeo"),icon:rc,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:kc("Animoto"),icon:lc,description:(0,pt.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:kc("Cloudup"),icon:Wl,description:(0,pt.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:kc("CollegeHumor"),icon:Ql,description:(0,pt.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:kc("Crowdsignal"),icon:Wl,keywords:["polldaddy",(0,pt.__)("survey")],description:(0,pt.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:kc("Dailymotion"),icon:cc,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:kc("Imgur"),icon:Jl,description:(0,pt.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:kc("Issuu"),icon:Wl,description:(0,pt.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:kc("Kickstarter"),icon:Wl,description:(0,pt.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:kc("Mixcloud"),icon:Zl,keywords:[(0,pt.__)("music"),(0,pt.__)("audio")],description:(0,pt.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:kc("Pocket Casts"),icon:pc,keywords:[(0,pt.__)("podcast"),(0,pt.__)("audio")],description:(0,pt.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:kc("Reddit"),icon:ac,description:(0,pt.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:kc("ReverbNation"),icon:Zl,description:(0,pt.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"scribd",title:kc("Scribd"),icon:Wl,description:(0,pt.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"smugmug",title:kc("SmugMug"),icon:Jl,description:(0,pt.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:kc("Speaker Deck"),icon:Wl,description:(0,pt.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:kc("TikTok"),icon:Ql,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:kc("TED"),icon:Ql,description:(0,pt.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:kc("Tumblr"),icon:ic,keywords:[(0,pt.__)("social")],description:(0,pt.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:kc("VideoPress"),icon:Ql,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:kc("WordPress.tv"),icon:Ql,description:(0,pt.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:kc("Amazon Kindle"),icon:sc,keywords:[(0,pt.__)("ebook")],description:(0,pt.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:kc("Pinterest"),icon:uc,keywords:[(0,pt.__)("social"),(0,pt.__)("bookmark")],description:(0,pt.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:kc("Wolfram"),icon:dc,description:(0,pt.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}},{name:"bluesky",title:kc("Bluesky"),icon:mc,description:(0,pt.__)("Embed a Bluesky post."),patterns:[/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],attributes:{providerNameSlug:"bluesky"}}];wc.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));var Cc=wc;const{attributes:jc}=yo,Sc={attributes:jc,save({attributes:e}){const{url:t,caption:o,type:n,providerNameSlug:r}=e;if(!t)return null;const a=Dt("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${r}`]:r,[`wp-block-embed-${r}`]:r});return(0,it.jsxs)("figure",{...ct.useBlockProps.save({className:a}),children:[(0,it.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${t}\n`}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}};var Bc=[Sc,{attributes:jc,save({attributes:{url:e,caption:t,type:o,providerNameSlug:n}}){if(!e)return null;const r=Dt("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${n}`]:n});return(0,it.jsxs)("figure",{className:r,children:[`\n${e}\n`,!ct.RichText.isEmpty(t)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:t})]})}}];const{name:Tc}=yo,Nc={icon:Wl,edit:fc,save:function({attributes:e}){const{url:t,caption:o,type:n,providerNameSlug:r}=e;if(!t)return null;const a=Dt("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${r}`]:r,[`wp-block-embed-${r}`]:r});return(0,it.jsxs)("figure",{...ct.useBlockProps.save({className:a}),children:[(0,it.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${t}\n`}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o})]})},transforms:vc,variations:Cc,deprecated:Bc},Pc=()=>jt({name:Tc,metadata:yo,settings:Nc});var Ic=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});const Dc={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:r,textLinkTarget:a,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=ct.RichText.isEmpty(n)?(0,pt.__)("PDF embed"):(0,pt.sprintf)((0,pt.__)("Embed of %s."),n),d=!ct.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,it.jsx)("a",{id:p,href:r,target:a,rel:a?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:n})}),i&&(0,it.jsx)("a",{href:t,className:Dt("wp-block-file__button",(0,ct.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p,children:(0,it.jsx)(ct.RichText.Content,{value:s})})]})}},Mc={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:r,textLinkTarget:a,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=ct.RichText.isEmpty(n)?(0,pt.__)("PDF embed"):(0,pt.sprintf)((0,pt.__)("Embed of %s."),n),d=!ct.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,it.jsx)("a",{id:p,href:r,target:a,rel:a?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:n})}),i&&(0,it.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":p,children:(0,it.jsx)(ct.RichText.Content,{value:s})})]})}},zc={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileName:o,textLinkHref:n,textLinkTarget:r,showDownloadButton:a,downloadButtonText:i,displayPreview:s,previewHeight:l}=e,c=ct.RichText.isEmpty(o)?(0,pt.__)("PDF embed"):(0,pt.sprintf)((0,pt.__)("Embed of %s."),o);return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[s&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${l}px`},"aria-label":c})}),!ct.RichText.isEmpty(o)&&(0,it.jsx)("a",{href:n,target:r,rel:r?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:o})}),a&&(0,it.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,children:(0,it.jsx)(ct.RichText.Content,{value:i})})]})}};var Ac=[Dc,Mc,zc];function Lc({hrefs:e,openInNewWindow:t,showDownloadButton:o,changeLinkDestinationOption:n,changeOpenInNewWindow:r,changeShowDownloadButton:a,displayPreview:i,changeDisplayPreview:s,previewHeight:l,changePreviewHeight:c}){const{href:u,textLinkHref:d,attachmentPage:p}=e,m=vt();let g=[{value:u,label:(0,pt.__)("URL")}];return p&&(g=[{value:u,label:(0,pt.__)("Media file")},{value:p,label:(0,pt.__)("Attachment page")}]),(0,it.jsx)(it.Fragment,{children:(0,it.jsxs)(ct.InspectorControls,{children:[u.endsWith(".pdf")&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("PDF settings"),resetAll:()=>{s(!0),c(600)},dropdownMenuProps:m,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show inline embed"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>s(!0),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show inline embed"),help:i?(0,pt.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!i,onChange:s})}),i&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Height in pixels"),isShownByDefault:!0,hasValue:()=>600!==l,onDeselect:()=>c(600),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Height in pixels"),min:Rc,max:Math.max(Vc,l),value:l,onChange:c})})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n(u),r(!1),a(!0)},dropdownMenuProps:m,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to"),isShownByDefault:!0,hasValue:()=>d!==u,onDeselect:()=>n(u),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to"),value:d,options:g,onChange:n})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>r(!1),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),checked:t,onChange:r})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show download button"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>a(!0),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show download button"),checked:o,onChange:a})})]})]})})}const Hc=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},Rc=200,Vc=2e3;function Fc({text:e,disabled:t}){const{createNotice:o}=(0,lt.useDispatch)(bo.store),n=(0,xt.useCopyToClipboard)(e,(()=>{o("info",(0,pt.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,it.jsx)(mt.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:n,disabled:t,children:(0,pt.__)("Copy URL")})}var Ec=function({attributes:e,isSelected:t,setAttributes:o,clientId:n}){const{id:r,fileName:a,href:i,textLinkHref:s,textLinkTarget:l,showDownloadButton:c,downloadButtonText:u,displayPreview:d,previewHeight:p}=e,[m,g]=(0,gt.useState)(e.blob),{media:h}=(0,lt.useSelect)((e=>({media:void 0===r?void 0:e(_t.store).getEntityRecord("postType","attachment",r)})),[r]),{createErrorNotice:_}=(0,lt.useDispatch)(bo.store),{toggleSelection:x,__unstableMarkNextChangeAsNotPersistent:b}=(0,lt.useDispatch)(ct.store);function f(t){if(!t||!t.url)return o({href:void 0,fileName:void 0,textLinkHref:void 0,id:void 0,fileId:void 0,displayPreview:void 0,previewHeight:void 0}),void g();if((0,ht.isBlobURL)(t.url))return void g(t.url);const r="application/pdf"===(t.mime||t.mime_type)||(0,no.getFilename)(t.url).toLowerCase().endsWith(".pdf"),a={displayPreview:r?e.displayPreview??!0:void 0,previewHeight:r?e.previewHeight??600:void 0};o({href:t.url,fileName:t.title,textLinkHref:t.url,id:t.id,fileId:`wp-block-file--media-${n}`,blob:void 0,...a}),g()}function y(e){o({href:void 0}),_(e,{type:"snackbar"})}ft({url:m,onChange:f,onError:y}),(0,gt.useEffect)((()=>{ct.RichText.isEmpty(u)&&(b(),o({downloadButtonText:(0,pt._x)("Download","button label")}))}),[]);const v=h&&h.link,k=(0,ct.useBlockProps)({className:Dt(!!m&&(0,mt.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":!!m})}),w=!(!window.navigator.pdfViewerEnabled&&(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!Hc("AcroPDF.PDF")&&!Hc("PDF.PdfCtrl")))&&d;return i||m?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Lc,{hrefs:{href:i||m,textLinkHref:s,attachmentPage:v},openInNewWindow:!!l,showDownloadButton:c,changeLinkDestinationOption:function(e){o({textLinkHref:e})},changeOpenInNewWindow:function(e){o({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){o({showDownloadButton:e})},displayPreview:d,changeDisplayPreview:function(e){o({displayPreview:e})},previewHeight:p,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Rc);o({previewHeight:t})}}),(0,it.jsxs)(ct.BlockControls,{group:"other",children:[(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:r,mediaURL:i,accept:"*",onSelect:f,onError:y,onReset:()=>f(void 0)}),(0,it.jsx)(Fc,{text:i,disabled:(0,ht.isBlobURL)(i)})]}),(0,it.jsxs)("div",{...k,children:[w&&(0,it.jsxs)(mt.ResizableBox,{size:{height:p,width:"100%"},minHeight:Rc,maxHeight:Vc,grid:[1,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>x(!1),onResizeStop:function(e,t,n,r){x(!0);const a=parseInt(p+r.height,10);o({previewHeight:a})},showHandle:t,children:[(0,it.jsx)("object",{className:"wp-block-file__preview",data:i,type:"application/pdf","aria-label":(0,pt.__)("Embed of the selected PDF file.")}),!t&&(0,it.jsx)("div",{className:"wp-block-file__preview-overlay"})]}),(0,it.jsxs)("div",{className:"wp-block-file__content-wrapper",children:[(0,it.jsx)(ct.RichText,{identifier:"fileName",tagName:"a",value:a,placeholder:(0,pt.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>o({fileName:pn(e)}),href:s}),c&&(0,it.jsx)("div",{className:"wp-block-file__button-richtext-wrapper",children:(0,it.jsx)(ct.RichText,{identifier:"downloadButtonText",tagName:"div","aria-label":(0,pt.__)("Download button text"),className:Dt("wp-block-file__button",(0,ct.__experimentalGetElementClassName)("button")),value:u,withoutInteractiveFormatting:!0,placeholder:(0,pt.__)("Add text…"),onChange:e=>o({downloadButtonText:pn(e)})})})]})]})]}):(0,it.jsx)("div",{...k,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Ic}),labels:{title:(0,pt.__)("File"),instructions:(0,pt.__)("Drag and drop a file, upload, or choose from your library.")},onSelect:f,onError:y,accept:"*"})})};const Oc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/file","title":"File","category":"media","description":"Add a link to a downloadable file.","keywords":["document","pdf","download"],"textdomain":"default","attributes":{"id":{"type":"number"},"blob":{"type":"string","role":"local"},"href":{"type":"string","role":"content"},"fileId":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"id"},"fileName":{"type":"rich-text","source":"rich-text","selector":"a:not([download])","role":"content"},"textLinkHref":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"href","role":"content"},"textLinkTarget":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"target"},"showDownloadButton":{"type":"boolean","default":true},"downloadButtonText":{"type":"rich-text","source":"rich-text","selector":"a[download]","role":"content"},"displayPreview":{"type":"boolean"},"previewHeight":{"type":"number","default":600}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":true},"editorStyle":"wp-block-file-editor","style":"wp-block-file"}');const Gc={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const o=(0,ht.createBlobURL)(e);e.type.startsWith("video/")?t.push((0,st.createBlock)("core/video",{blob:(0,ht.createBlobURL)(e)})):e.type.startsWith("image/")?t.push((0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})):e.type.startsWith("audio/")?t.push((0,st.createBlock)("core/audio",{blob:(0,ht.createBlobURL)(e)})):t.push((0,st.createBlock)("core/file",{blob:o,fileName:e.name}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,st.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,st.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,st.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,no.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getEntityRecord:t}=(0,lt.select)(_t.store),o=t("postType","attachment",e);return!!o&&o.mime_type.includes("audio")},transform:e=>(0,st.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getEntityRecord:t}=(0,lt.select)(_t.store),o=t("postType","attachment",e);return!!o&&o.mime_type.includes("video")},transform:e=>(0,st.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getEntityRecord:t}=(0,lt.select)(_t.store),o=t("postType","attachment",e);return!!o&&o.mime_type.includes("image")},transform:e=>(0,st.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};var $c=Gc;const{name:Uc}=Oc,qc={icon:Ic,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,pt._x)("Armstrong_Small_Step","Name of the file")}},transforms:$c,deprecated:Ac,edit:Ec,save:function({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:r,textLinkTarget:a,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=ct.RichText.isEmpty(n)?"PDF embed":n.toString(),d=!ct.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,it.jsx)("a",{id:p,href:r,target:a,rel:a?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:n})}),i&&(0,it.jsx)("a",{href:t,className:Dt("wp-block-file__button",(0,ct.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p,children:(0,it.jsx)(ct.RichText.Content,{value:s})})]})}},Wc=()=>jt({name:Uc,metadata:Oc,settings:qc}),Zc=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">'+(0,pt.__)("Your form has been submitted successfully")+"</mark>"}]]],Jc=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">'+(0,pt.__)("There was an error submitting your form.")+"</mark>"}]]],Qc=[Zc,Jc,["core/form-input",{type:"text",label:(0,pt.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,pt.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,pt.__)("Comment"),required:!0}],["core/form-submit-button",{}]];var Kc=({attributes:e,setAttributes:t,clientId:o})=>{const n=vt(),{action:r,method:a,email:i,submissionMethod:s}=e,l=(0,ct.useBlockProps)(),{hasInnerBlocks:c}=(0,lt.useSelect)((e=>{const{getBlock:t}=e(ct.store),n=t(o);return{hasInnerBlocks:!(!n||!n.innerBlocks.length)}}),[o]),u=(0,ct.useInnerBlocksProps)(l,{template:Qc,renderAppender:c?void 0:ct.InnerBlocks.ButtonBlockAppender});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{dropdownMenuProps:n,label:(0,pt.__)("Settings"),resetAll:()=>{t({submissionMethod:"email",email:void 0,action:void 0,method:"post"})},children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"email"!==s,label:(0,pt.__)("Submissions method"),onDeselect:()=>t({submissionMethod:"email"}),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Submissions method"),options:[{label:(0,pt.__)("Send email"),value:"email"},{label:(0,pt.__)("- Custom -"),value:"custom"}],value:s,onChange:e=>t({submissionMethod:e}),help:"custom"===s?(0,pt.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,pt.__)("Select the method to use for form submissions.")})}),"email"===s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Email for form submissions"),onDeselect:()=>t({email:void 0,action:void 0,method:"post"}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,pt.__)("Email for form submissions"),value:i||"",required:!0,onChange:e=>{t({email:e}),t({action:`mailto:${e}`}),t({method:"post"})},help:(0,pt.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma."),type:"email"})})]})}),"email"!==s&&(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:a,onChange:e=>t({method:e}),help:(0,pt.__)("Select the method to use for form submissions.")}),(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Form action"),value:r,onChange:e=>{t({action:e})},help:(0,pt.__)("The URL where the form should be submitted."),type:"url"})]}),(0,it.jsx)("form",{...u,encType:"email"===s?"text/plain":null})]})};const Yc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form","title":"Form","category":"common","allowedBlocks":["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],"description":"A form.","keywords":["container","wrapper","row","section"],"textdomain":"default","icon":"feedback","attributes":{"submissionMethod":{"type":"string","default":"email"},"method":{"type":"string","default":"post"},"action":{"type":"string"},"email":{"type":"string"}},"supports":{"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}}}');const Xc=[{name:"comment-form",title:(0,pt.__)("Experimental Comment form"),description:(0,pt.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,pt.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,pt.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,pt.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"wp-privacy-form",title:(0,pt.__)("Experimental Privacy Request Form"),keywords:["GDPR"],description:(0,pt.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[Zc,Jc,["core/paragraph",{content:(0,pt.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,pt.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,pt.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,pt.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type}];var eu=Xc;const tu={supports:{},attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"},anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},fontFamily:{type:"string"},fontSize:{type:"string"}},save({attributes:e}){const{submissionMethod:t}=e,o=(0,ct.__experimentalGetColorClassesAndStyles)(e),n=(0,ct.getTypographyClassesAndStyles)(e),r=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),a=ct.useBlockProps.save({style:{...o.style,...n.style,...r.style},id:e.anchor});return(0,it.jsx)("form",{...a,className:"wp-block-form",encType:"email"===t?"text/plain":null,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}};var ou=[tu];const{name:nu}=Yc,ru={edit:Kc,save:function({attributes:e}){const t=ct.useBlockProps.save(),{submissionMethod:o}=e;return(0,it.jsx)("form",{...t,encType:"email"===o?"text/plain":null,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},deprecated:ou,variations:eu,example:{}},au=()=>{const e=["core/form"];return(0,vl.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",((t,o,n,{getBlock:r,getBlockParentsByBlockName:a})=>{if("core/form"!==o.name)return t;for(const t of e){if(r(n)?.name===t||a(n,t).length)return!1}return!0})),jt({name:nu,metadata:Yc,settings:ru})};var iu=r(9681),su=r.n(iu);const lu=window.wp.dom,cu=e=>su()((0,lu.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),uu={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:o,label:n,inlineLabel:r,required:a,placeholder:i,value:s}=e,l=(0,ct.__experimentalGetBorderClassesAndStyles)(e),c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=Dt("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input",m=ct.useBlockProps.save();return"hidden"===t?(0,it.jsx)("input",{type:t,name:o,value:s}):(0,it.jsx)("div",{...m,children:(0,it.jsxs)("label",{className:Dt("wp-block-form-input__label",{"is-label-inline":r}),children:[(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||cu(n),required:a,"aria-required":a,placeholder:i||void 0,style:u})]})})}},du={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:o,label:n,inlineLabel:r,required:a,placeholder:i,value:s}=e,l=(0,ct.__experimentalGetBorderClassesAndStyles)(e),c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=Dt("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input";return"hidden"===t?(0,it.jsx)("input",{type:t,name:o,value:s}):(0,it.jsxs)("label",{className:Dt("wp-block-form-input__label",{"is-label-inline":r}),children:[(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||cu(n),required:a,"aria-required":a,placeholder:i||void 0,style:u})]})}};var pu=[uu,du];var mu=function({attributes:e,setAttributes:t,className:o}){const{type:n,name:r,label:a,inlineLabel:i,required:s,placeholder:l,value:c}=e,u=(0,ct.useBlockProps)(),d=vt(),p=(0,gt.useRef)(),m="textarea"===n?"textarea":"input",g=(0,ct.__experimentalUseBorderProps)(e),h=(0,ct.__experimentalUseColorProps)(e);p.current&&p.current.focus();const _="checkbox"===n||"radio"===n,x=(0,it.jsxs)(it.Fragment,{children:["hidden"!==n&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({inlineLabel:!1,required:!1})},dropdownMenuProps:d,children:["checkbox"!==n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Inline label"),hasValue:()=>!!i,onDeselect:()=>t({inlineLabel:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Inline label"),checked:i,onChange:e=>{t({inlineLabel:e})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Required"),hasValue:()=>!!s,onDeselect:()=>t({required:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Required"),checked:s,onChange:e=>{t({required:e})}})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Name"),value:r,onChange:e=>{t({name:e})},help:(0,pt.__)('Affects the "name" attribute of the input element, and is used as a name for the form submission results.')})})]}),b=(0,it.jsx)(ct.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:a,onChange:e=>t({label:e}),"aria-label":a?(0,pt.__)("Label"):(0,pt.__)("Empty label"),"data-empty":!a,placeholder:(0,pt.__)("Type the label for this input")});return"hidden"===n?(0,it.jsxs)(it.Fragment,{children:[x,(0,it.jsx)("input",{type:"hidden",className:Dt(o,"wp-block-form-input__input",h.className,g.className),"aria-label":(0,pt.__)("Value"),value:c,onChange:e=>t({value:e.target.value})})]}):(0,it.jsxs)("div",{...u,children:[x,(0,it.jsxs)("span",{className:Dt("wp-block-form-input__label",{"is-label-inline":i||"checkbox"===n}),children:[!_&&b,(0,it.jsx)(m,{type:"textarea"===n?void 0:n,className:Dt(o,"wp-block-form-input__input",h.className,g.className),"aria-label":(0,pt.__)("Optional placeholder text"),placeholder:l?void 0:(0,pt.__)("Optional placeholder…"),value:l,onChange:e=>t({placeholder:e.target.value}),"aria-required":s,style:{...g.style,...h.style}}),_&&b]})]})};const gu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-input","title":"Input Field","category":"common","ancestor":["core/form"],"description":"The basic building block for forms.","keywords":["input","form"],"textdomain":"default","icon":"forms","attributes":{"type":{"type":"string","default":"text"},"name":{"type":"string"},"label":{"type":"rich-text","default":"Label","selector":".wp-block-form-input__label-content","source":"rich-text","role":"content"},"inlineLabel":{"type":"boolean","default":false},"required":{"type":"boolean","default":false,"selector":".wp-block-form-input__input","source":"attribute","attribute":"required"},"placeholder":{"type":"string","selector":".wp-block-form-input__input","source":"attribute","attribute":"placeholder","role":"content"},"value":{"type":"string","default":"","selector":"input","source":"attribute","attribute":"value"},"visibilityPermissions":{"type":"string","default":"all"}},"supports":{"anchor":true,"reusable":false,"spacing":{"margin":["top","bottom"]},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"style":["wp-block-form-input"]}');const hu=[{name:"text",title:(0,pt.__)("Text Input"),icon:"edit-page",description:(0,pt.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"textarea",title:(0,pt.__)("Textarea Input"),icon:"testimonial",description:(0,pt.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"textarea"===e?.type},{name:"checkbox",title:(0,pt.__)("Checkbox Input"),description:(0,pt.__)("A simple checkbox input."),icon:"forms",attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>"checkbox"===e?.type},{name:"email",title:(0,pt.__)("Email Input"),icon:"email",description:(0,pt.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"email"===e?.type},{name:"url",title:(0,pt.__)("URL Input"),icon:"admin-site",description:(0,pt.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"url"===e?.type},{name:"tel",title:(0,pt.__)("Telephone Input"),icon:"phone",description:(0,pt.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"tel"===e?.type},{name:"number",title:(0,pt.__)("Number Input"),icon:"edit-page",description:(0,pt.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"number"===e?.type}];var _u=hu;const{name:xu}=gu,bu={deprecated:pu,edit:mu,save:function({attributes:e}){const{type:t,name:o,label:n,inlineLabel:r,required:a,placeholder:i,value:s}=e,l=(0,ct.__experimentalGetBorderClassesAndStyles)(e),c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=Dt("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input",m=ct.useBlockProps.save(),g="checkbox"===t||"radio"===t;return"hidden"===t?(0,it.jsx)("input",{type:t,name:o,value:s}):(0,it.jsx)("div",{...m,children:(0,it.jsxs)("label",{className:Dt("wp-block-form-input__label",{"is-label-inline":r}),children:[!g&&(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||(h=n,su()((0,lu.__unstableStripHTML)(h)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:a,"aria-required":a,placeholder:i||void 0,style:u}),g&&(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})})]})});var h},variations:_u,example:{}},fu=()=>jt({name:xu,metadata:gu,settings:bu}),yu=[["core/buttons",{},[["core/button",{text:(0,pt.__)("Submit"),tagName:"button",type:"submit"}]]]];var vu=()=>{const e=(0,ct.useBlockProps)(),t=(0,ct.useInnerBlocksProps)(e,{template:yu,templateLock:"all"});return(0,it.jsx)("div",{className:"wp-block-form-submit-wrapper",...t})};const ku=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submit-button","title":"Form Submit Button","category":"common","icon":"button","ancestor":["core/form"],"allowedBlocks":["core/buttons","core/button"],"description":"A submission button for forms.","keywords":["submit","button","form"],"textdomain":"default","style":["wp-block-form-submit-button"]}');const{name:wu}=ku,Cu={edit:vu,save:function(){const e=ct.useBlockProps.save();return(0,it.jsx)("div",{className:"wp-block-form-submit-wrapper",...e,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},example:{}},ju=()=>jt({name:wu,metadata:ku,settings:Cu});var Su=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const Bu=[["core/paragraph",{content:(0,pt.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]];var Tu=({attributes:e,clientId:t})=>{const{type:o}=e,n=(0,ct.useBlockProps)({className:Dt("wp-block-form-submission-notification",{[`form-notification-type-${o}`]:o})}),{hasInnerBlocks:r}=(0,lt.useSelect)((e=>{const{getBlock:o}=e(ct.store),n=o(t);return{hasInnerBlocks:!(!n||!n.innerBlocks.length)}}),[t]),a=(0,ct.useInnerBlocksProps)(n,{template:Bu,renderAppender:r?void 0:ct.InnerBlocks.ButtonBlockAppender});return(0,it.jsx)("div",{...a,"data-message-success":(0,pt.__)("Submission success notification"),"data-message-error":(0,pt.__)("Submission error notification")})};const Nu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submission-notification","title":"Form Submission Notification","category":"common","ancestor":["core/form"],"description":"Provide a notification message after the form has been submitted.","keywords":["form","feedback","notification","message"],"textdomain":"default","icon":"feedback","attributes":{"type":{"type":"string","default":"success"}}}');const Pu=[{name:"form-submission-success",title:(0,pt.__)("Form Submission Success"),description:(0,pt.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,pt.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"success"===e?.type},{name:"form-submission-error",title:(0,pt.__)("Form Submission Error"),description:(0,pt.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,pt.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"error"===e?.type}];var Iu=Pu;const{name:Du}=Nu,Mu={icon:Su,edit:Tu,save:function({attributes:e}){const{type:t}=e;return(0,it.jsx)("div",{...ct.useInnerBlocksProps.save(ct.useBlockProps.save({className:Dt("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})},variations:Iu,example:{}},zu=()=>jt({name:Du,metadata:Nu,settings:Mu});var Au=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"})});const Lu="none",Hu="media",Ru="lightbox",Vu="attachment",Fu="large",Eu="file",Ou="post";function Gu(e){return Math.min(3,e?.images?.length)}function $u(e,t){switch(t){case Eu:return{href:e?.source_url||e?.url,linkDestination:Hu};case Ou:return{href:e?.link,linkDestination:Vu};case Hu:return{href:e?.source_url||e?.url,linkDestination:Hu};case Vu:return{href:e?.link,linkDestination:Vu};case Lu:return{href:void 0,linkDestination:Lu}}return{}}function Uu(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const o=e.images.map((o=>function(e,t,o){return(0,st.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...$u(e,o)})}(o,e.sizeSlug,t))),{images:n,ids:r,...a}=e;return[{...a,linkTo:t,allowResize:!1},o]}const qu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){const{caption:t,columns:o,imageCrop:n}=e,r=Dt("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":n}),a=ct.useBlockProps.save({className:r}),i=ct.useInnerBlocksProps.save(a);return(0,it.jsxs)("figure",{...i,children:[i.children,!ct.RichText.isEmpty(t)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t})]})}},Wu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,caption:r,linkTo:a}=e,i=`columns-${o} ${n?"is-cropped":""}`;return(0,it.jsxs)("figure",{...ct.useBlockProps.save({className:i}),children:[(0,it.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(a){case Eu:t=e.fullUrl||e.url;break;case Ou:t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,!ct.RichText.isEmpty(e.caption)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!ct.RichText.isEmpty(r)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r})]})},migrate:e=>Uu(e)},Zu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:({linkTo:e})=>!e||"attachment"===e||"media"===e,migrate:e=>Uu(e),save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,caption:r,linkTo:a}=e;return(0,it.jsxs)("figure",{className:`columns-${o} ${n?"is-cropped":""}`,children:[(0,it.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,!ct.RichText.isEmpty(e.caption)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!ct.RichText.isEmpty(r)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r})]})}},Ju={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:({ids:e})=>e&&e.some((e=>"string"==typeof e)),migrate:e=>Uu(e),save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,caption:r,linkTo:a}=e;return(0,it.jsxs)("figure",{className:`columns-${o} ${n?"is-cropped":""}`,children:[(0,it.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,!ct.RichText.isEmpty(e.caption)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!ct.RichText.isEmpty(r)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r})]})}},Qu={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,linkTo:r}=e;return(0,it.jsx)("ul",{className:`columns-${o} ${n?"is-cropped":""}`,children:t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,e.caption&&e.caption.length>0&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:e.caption})]})},e.id||e.url)}))})},migrate:e=>Uu(e)},Ku={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:({images:e,ids:t})=>e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some(((e,o)=>!e&&null!==t[o]||parseInt(e,10)!==t[o]))),migrate:e=>Uu(e),supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,linkTo:r}=e;return(0,it.jsx)("ul",{className:`columns-${o} ${n?"is-cropped":""}`,children:t.map((e=>{let t;switch(r){case"media":t=e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,e.caption&&e.caption.length>0&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:e.caption})]})},e.id||e.url)}))})}},Yu={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),align:n,imageCrop:r,linkTo:a}=e,i=Dt(`columns-${o}`,{alignnone:"none"===n,"is-cropped":r});return(0,it.jsx)("div",{className:i,children:t.map((e=>{let t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,it.jsx)("figure",{className:"blocks-gallery-image",children:t?(0,it.jsx)("a",{href:t,children:o}):o},e.id||e.url)}))})},migrate:e=>Uu(e)};var Xu=[qu,Wu,Zu,Ju,Qu,Ku,Yu],ed=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})}),td=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});const od=(0,it.jsx)(ct.BlockIcon,{icon:Au});function nd(e){return e?Math.min(3,e):3}const rd=(e,t="large")=>{const o=Object.fromEntries(Object.entries(e??{}).filter((([e])=>["alt","id","link"].includes(e))));o.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;const n=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return n&&(o.fullUrl=n),o},ad=20,id="none",sd="media",ld="attachment",cd="custom",ud=["noreferrer","noopener"],dd=["image"],pd=["flex","grid"],md="full";function gd(e,t,o,n,r){switch(o||t){case"file":case Hu:return{href:e?.source_url||e?.url,linkDestination:sd,lightbox:r?.enabled?{...n?.lightbox,enabled:!1}:void 0};case"post":case Vu:return{href:e?.link,linkDestination:ld,lightbox:r?.enabled?{...n?.lightbox,enabled:!1}:void 0};case Ru:return{href:void 0,lightbox:r?.enabled?void 0:{...n?.lightbox,enabled:!0},linkDestination:id};case Lu:return{href:void 0,linkDestination:id,lightbox:void 0}}return{}}function hd(e,{rel:t}){const o=e?"_blank":void 0;let n;return n=o||t?function(e){let t=e;return void 0!==e&&t&&(ud.forEach((e=>{const o=new RegExp("\\b"+e+"\\b","gi");t=t.replace(o,"")})),t!==e&&(t=t.trim()),t||(t=void 0)),t}(t):void 0,{linkTarget:o,rel:n}}function _d(e){return dd.some((t=>0===e.type.indexOf(t)))}function xd(e){const{attributes:t,isSelected:o,setAttributes:n,mediaPlaceholder:r,insertBlocksAfter:a,blockProps:i,__unstableLayoutClassNames:s,isContentLocked:l,multiGallerySelection:c}=e,{align:u,columns:d,imageCrop:p}=t;return(0,it.jsxs)("figure",{...i,className:Dt(i.className,s,"blocks-gallery-grid",{[`align${u}`]:u,[`columns-${d}`]:void 0!==d,"columns-default":void 0===d,"is-cropped":p}),children:[i.children,o&&!i.children&&(0,it.jsx)(St.View,{className:"blocks-gallery-media-placeholder-wrapper",children:r}),(0,it.jsx)(zo,{attributes:t,setAttributes:n,isSelected:o,insertBlocksAfter:a,showToolbarButton:!c&&!l,className:"blocks-gallery-caption",label:(0,pt.__)("Gallery caption text"),placeholder:(0,pt.__)("Add gallery caption")})]})}function bd(e,t,o){return(0,gt.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:n}=o();let r={};t&&(r=e.reduce(((e,t)=>{if(!t.id)return e;const o=n.reduce(((e,o)=>{const n=t.sizes?.[o.slug]?.url,r=t.media_details?.sizes?.[o.slug]?.source_url;return{...e,[o.slug]:n||r}}),{});return{...e,[parseInt(t.id,10)]:o}}),{}));const a=Object.values(r);return n.filter((({slug:e})=>a.some((t=>t[e])))).map((({name:e,slug:t})=>({value:t,label:e})))}()),[e,t])}function fd(e,t){const[o,n]=(0,gt.useState)([]);return(0,gt.useMemo)((()=>function(){let r=!1;const a=o.filter((t=>e.find((e=>t.clientId===e.clientId))));a.length<o.length&&(r=!0);e.forEach((e=>{e.fromSavedContent&&!a.find((t=>t.id===e.id))&&(r=!0,a.push(e))}));const i=e.filter((e=>!a.find((t=>e.clientId&&t.clientId===e.clientId))&&t?.find((t=>t.id===e.id))&&!e.fromSavedContent));(r||i?.length>0)&&n([...a,...i]);return i.length>0?i:null}()),[e,t])}const yd=[];function vd({blockGap:e,clientId:t}){const o="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let n,r=o,a=o;e&&(n="string"==typeof e?(0,ct.__experimentalGetGapCSSValue)(e):(0,ct.__experimentalGetGapCSSValue)(e?.top)||o,a="string"==typeof e?(0,ct.__experimentalGetGapCSSValue)(e):(0,ct.__experimentalGetGapCSSValue)(e?.left)||o,r=n===a?n:`${n} ${a}`);const i=`#block-${t} {\n\t\t--wp--style--unstable-gallery-gap: ${"0"===a?"0px":a};\n\t\tgap: ${r}\n\t}`;return(0,ct.useStyleOverride)({css:i}),null}const kd=[{icon:ed,label:(0,pt.__)("Link images to attachment pages"),value:Vu,noticeText:(0,pt.__)("Attachment Pages")},{icon:td,label:(0,pt.__)("Link images to media files"),value:Hu,noticeText:(0,pt.__)("Media Files")},{icon:tr,label:(0,pt.__)("Enlarge on click"),value:Ru,noticeText:(0,pt.__)("Lightbox effect"),infoText:(0,pt.__)("Scale images with a lightbox effect")},{icon:hn,label:(0,pt._x)("None","Media item link option"),value:Lu,noticeText:(0,pt.__)("None")}],wd=["image"],Cd=gt.Platform.isNative?(0,pt.__)("Add media"):(0,pt.__)("Drag and drop images, upload, or choose from your library."),jd=gt.Platform.isNative?{type:"stepper"}:{},Sd={name:"core/image"},Bd=[];const Td=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/gallery","title":"Gallery","category":"media","allowedBlocks":["core/image"],"description":"Display multiple images in a rich gallery.","keywords":["images","photos"],"textdomain":"default","attributes":{"images":{"type":"array","default":[],"source":"query","selector":".blocks-gallery-item","query":{"url":{"type":"string","source":"attribute","selector":"img","attribute":"src"},"fullUrl":{"type":"string","source":"attribute","selector":"img","attribute":"data-full-url"},"link":{"type":"string","source":"attribute","selector":"img","attribute":"data-link"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"id":{"type":"string","source":"attribute","selector":"img","attribute":"data-id"},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-item__caption"}}},"ids":{"type":"array","items":{"type":"number"},"default":[]},"shortCodeTransforms":{"type":"array","items":{"type":"object"},"default":[]},"columns":{"type":"number","minimum":1,"maximum":8},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-caption","role":"content"},"imageCrop":{"type":"boolean","default":true},"randomOrder":{"type":"boolean","default":false},"fixedHeight":{"type":"boolean","default":true},"linkTarget":{"type":"string"},"linkTo":{"type":"string"},"sizeSlug":{"type":"string","default":"large"},"allowResize":{"type":"boolean","default":false},"aspectRatio":{"type":"string","default":"auto"}},"providesContext":{"allowResize":"allowResize","imageCrop":"imageCrop","fixedHeight":"fixedHeight"},"supports":{"anchor":true,"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"radius":true}},"html":false,"units":["px","em","rem","vh","vw"],"spacing":{"margin":true,"padding":true,"blockGap":["horizontal","vertical"],"__experimentalSkipSerialization":["blockGap"],"__experimentalDefaultControls":{"blockGap":true,"margin":false,"padding":false}},"color":{"text":false,"background":true,"gradients":true},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-gallery-editor","style":"wp-block-gallery"}');(0,vl.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){if("core/gallery"===e.name&&e.attributes?.images.length>0){const t=e.attributes.images.map((({url:t,id:o,alt:n})=>(0,st.createBlock)("core/image",{url:t,id:o?parseInt(o,10):null,alt:n,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,vl.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const o=(Array.isArray(t)?t:[t]).find((t=>"core/gallery"===t.name&&t.innerBlocks.length>0&&!t.attributes.images?.length>0&&!e.name.includes("core/")));if(o){const e=o.innerBlocks.map((({attributes:{url:e,id:t,alt:o}})=>({url:e,id:t?parseInt(t,10):null,alt:o}))),t=e.map((({id:e})=>e));o.attributes.images=e,o.attributes.ids=t}return e}));const Nd={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:o}=e[0];t=e.every((e=>e.align===t))?t:void 0,o=e.every((e=>e.sizeSlug===o))?o:void 0;const n=e.filter((({url:e})=>e)).map((e=>(e.width=void 0,e.height=void 0,(0,st.createBlock)("core/image",e))));return(0,st.createBlock)("core/gallery",{align:t,sizeSlug:o},n)}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:o,orderby:n}}){const r=(e=>e?e.split(",").map((e=>parseInt(e,10))):[])(e).map((e=>parseInt(e,10)));let a=Lu;"post"===o?a=Vu:"file"===o&&(a=Hu);return(0,st.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:a,randomOrder:"rand"===n},r.map((e=>(0,st.createBlock)("core/image",{id:e}))))},isMatch:({named:e})=>void 0!==e.ids},{type:"files",priority:1,isMatch:e=>1!==e.length&&e.every((e=>0===e.type.indexOf("image/"))),transform(e){const t=e.map((e=>(0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})));return(0,st.createBlock)("core/gallery",{},t)}}],to:[{type:"block",blocks:["core/image"],transform:({align:e},t)=>t.length>0?t.map((({attributes:{url:t,alt:o,caption:n,title:r,href:a,rel:i,linkClass:s,id:l,sizeSlug:c,linkDestination:u,linkTarget:d,anchor:p,className:m}})=>(0,st.createBlock)("core/image",{align:e,url:t,alt:o,caption:n,title:r,href:a,rel:i,linkClass:s,id:l,sizeSlug:c,linkDestination:u,linkTarget:d,anchor:p,className:m}))):(0,st.createBlock)("core/image",{align:e})}]};var Pd=Nd;const{name:Id}=Td,Dd={icon:Au,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:Pd,edit:function(e){const{setAttributes:t,attributes:o,className:n,clientId:r,isSelected:a,insertBlocksAfter:i,isContentLocked:s,onFocus:l}=e,[c,u,d,p]=(0,ct.useSettings)("blocks.core/image.lightbox","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),m=c?.allowEditing?kd:kd.filter((e=>e.value!==Ru)),{columns:g,imageCrop:h,randomOrder:_,linkTarget:x,linkTo:b,sizeSlug:f,aspectRatio:y}=o,{__unstableMarkNextChangeAsNotPersistent:v,replaceInnerBlocks:k,updateBlockAttributes:w,selectBlock:C}=(0,lt.useDispatch)(ct.store),{createSuccessNotice:j,createErrorNotice:S}=(0,lt.useDispatch)(bo.store),{getBlock:B,getSettings:T,innerBlockImages:N,blockWasJustInserted:P,multiGallerySelection:I}=(0,lt.useSelect)((e=>{const{getBlockName:t,getMultiSelectedBlockClientIds:o,getSettings:n,getBlock:a,wasBlockJustInserted:i}=e(ct.store),s=o();return{getBlock:a,getSettings:n,innerBlockImages:a(r)?.innerBlocks??Bd,blockWasJustInserted:i(r,"inserter_menu"),multiGallerySelection:s.length&&s.every((e=>"core/gallery"===t(e)))}}),[r]),D=(0,gt.useMemo)((()=>N?.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[N]),M=function(e){return(0,lt.useSelect)((t=>{const o=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===o.length?yd:t(_t.store).getEntityRecords("postType","attachment",{include:o.join(","),per_page:-1,orderby:"include"})??yd}),[e])}(N),z=fd(D,M),A=d?.map((({name:e,ratio:t})=>({label:e,value:t}))),L=u?.map((({name:e,ratio:t})=>({label:e,value:t}))),H=[{label:(0,pt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...p&&L||[],...A||[]];(0,gt.useEffect)((()=>{z?.forEach((e=>{v(),w(e.clientId,{...V(e.attributes),id:e.id,align:void 0})}))}),[z]);const R=bd(M,a,T);function V(e){const t=e.id?M.find((({id:t})=>t===e.id)):null;let n,r;return e.className&&""!==e.className&&(n=e.className),r=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:hd(x,o),{...rd(t,f),...gd(t,b,e?.linkDestination),...r,className:n,sizeSlug:f,caption:e.caption||t.caption?.raw,alt:e.alt||t.alt_text,aspectRatio:"auto"===y?void 0:y}}function F(e){const t=gt.Platform.isNative&&e.id?M.find((({id:t})=>t===e.id)):null,o=t?t?.media_type:e.type;return wd.some((e=>0===o?.indexOf(e)))||e.blob}function E(e){const t="[object FileList]"===Object.prototype.toString.call(e),o=t?Array.from(e).map((e=>e.url?e:{blob:(0,ht.createBlobURL)(e)})):e;o.every(F)||S((0,pt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const n=o.filter((e=>e.url||F(e))).map((e=>e.url?e:{blob:e.blob||(0,ht.createBlobURL)(e)})),a=n.reduce(((e,t,o)=>(e[t.id]=o,e)),{}),i=t?N:N.filter((e=>n.find((t=>t.id===e.attributes.id)))),s=n.filter((e=>!i.find((t=>e.id===t.attributes.id)))).map((e=>(0,st.createBlock)("core/image",{id:e.id,blob:e.blob,url:e.url,caption:e.caption,alt:e.alt})));k(r,i.concat(s).sort(((e,t)=>a[e.attributes.id]-a[t.attributes.id]))),s?.length>0&&C(s[0].clientId)}function O(e){t({linkTo:e});const o={},n=[];B(r).innerBlocks.forEach((t=>{n.push(t.clientId);const r=t.attributes.id?M.find((({id:e})=>e===t.attributes.id)):null;o[t.clientId]=gd(r,e,!1,t.attributes,c)})),w(n,o,{uniqueByBlock:!0});const a=[...m].find((t=>t.value===e));j((0,pt.sprintf)((0,pt.__)("All gallery image links updated to: %s"),a.noticeText),{id:"gallery-attributes-linkTo",type:"snackbar"})}function G(e){t({columns:e})}function $(){t({imageCrop:!h})}function U(){t({randomOrder:!_})}function q(e){const o=e?"_blank":void 0;t({linkTarget:o});const n={},a=[];B(r).innerBlocks.forEach((e=>{a.push(e.clientId),n[e.clientId]=hd(o,e.attributes)})),w(a,n,{uniqueByBlock:!0});const i=e?(0,pt.__)("All gallery images updated to open in new tab"):(0,pt.__)("All gallery images updated to not open in new tab");j(i,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}function W(e){t({sizeSlug:e});const o={},n=[];B(r).innerBlocks.forEach((t=>{n.push(t.clientId);const r=t.attributes.id?M.find((({id:e})=>e===t.attributes.id)):null;o[t.clientId]=function(e,t){const o=e?.media_details?.sizes?.[t]?.source_url;return o?{url:o,width:void 0,height:void 0,sizeSlug:t}:{}}(r,e)})),w(n,o,{uniqueByBlock:!0});const a=R.find((t=>t.value===e));j((0,pt.sprintf)((0,pt.__)("All gallery image sizes updated to: %s"),a?.label??e),{id:"gallery-attributes-sizeSlug",type:"snackbar"})}function Z(e){t({aspectRatio:e});const o={},n=[];B(r).innerBlocks.forEach((t=>{n.push(t.clientId),o[t.clientId]={aspectRatio:"auto"===e?void 0:e}})),w(n,o,!0);const a=H.find((t=>t.value===e));j((0,pt.sprintf)((0,pt.__)("All gallery images updated to aspect ratio: %s"),a?.label||e),{id:"gallery-attributes-aspectRatio",type:"snackbar"})}(0,gt.useEffect)((()=>{b||(v(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Lu}))}),[b]);const J=!!D.length,Q=J&&D.some((e=>!!e.id)),K=D.some((e=>gt.Platform.isNative?0===e.url?.indexOf("file:"):!e.id&&0===e.url?.indexOf("blob:"))),Y=gt.Platform.select({web:{addToGallery:!1,disableMediaButtons:K,value:{}},native:{addToGallery:Q,isAppender:J,disableMediaButtons:J&&!a||K,value:Q?D:{},autoOpenMediaUpload:!J&&a&&P,onFocus:l}}),X=(0,it.jsx)(ct.MediaPlaceholder,{handleUpload:!1,icon:od,labels:{title:(0,pt.__)("Gallery"),instructions:Cd},onSelect:E,accept:"image/*",allowedTypes:wd,multiple:!0,onError:function(e){S(e,{type:"snackbar"})},...Y}),ee=(0,ct.useBlockProps)({className:Dt(n,"has-nested-images")}),te=gt.Platform.isNative&&{marginHorizontal:0,marginVertical:0},oe=(0,ct.useInnerBlocksProps)(ee,{defaultBlock:Sd,directInsert:!0,orientation:"horizontal",renderAppender:!1,...te}),ne=vt();if(!J)return(0,it.jsxs)(St.View,{...oe,children:[oe.children,X]});const re=b&&"none"!==b;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.InspectorControls,{children:[gt.Platform.isWeb&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({columns:void 0,imageCrop:!0,randomOrder:!1}),Z("auto"),f!==Fu&&W(Fu),x&&q(!1)},dropdownMenuProps:ne,children:[D.length>1&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Columns"),hasValue:()=>!!g&&g!==D.length,onDeselect:()=>G(void 0),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Columns"),value:g||nd(D.length),onChange:G,min:1,max:Math.min(8,D.length),required:!0,__next40pxDefaultSize:!0})}),R?.length>0&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Resolution"),hasValue:()=>f!==Fu,onDeselect:()=>W(Fu),children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Resolution"),help:(0,pt.__)("Select the size of the source images."),value:f,options:R,onChange:W,hideCancelButton:!0,size:"__unstable-large"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Crop images to fit"),hasValue:()=>!h,onDeselect:()=>t({imageCrop:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Crop images to fit"),checked:!!h,onChange:$})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Randomize order"),hasValue:()=>!!_,onDeselect:()=>t({randomOrder:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Randomize order"),checked:!!_,onChange:U})}),re&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Open images in new tab"),hasValue:()=>!!x,onDeselect:()=>q(!1),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open images in new tab"),checked:"_blank"===x,onChange:q})}),H.length>1&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!y&&"auto"!==y,label:(0,pt.__)("Aspect ratio"),onDeselect:()=>Z("auto"),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect ratio"),help:(0,pt.__)("Set a consistent aspect ratio for all images in the gallery."),value:y,options:H,onChange:Z})})]}),gt.Platform.isNative&&(0,it.jsxs)(mt.PanelBody,{title:(0,pt.__)("Settings"),children:[D.length>1&&(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Columns"),value:g||nd(D.length),onChange:G,min:1,max:Math.min(8,D.length),...jd,required:!0,__next40pxDefaultSize:!0}),R?.length>0&&(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Resolution"),help:(0,pt.__)("Select the size of the source images."),value:f,options:R,onChange:W,hideCancelButton:!0,size:"__unstable-large"}),(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link"),value:b,onChange:O,options:m,hideCancelButton:!0,size:"__unstable-large"}),(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Crop images to fit"),checked:!!h,onChange:$}),(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Randomize order"),checked:!!_,onChange:U}),re&&(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open images in new tab"),checked:"_blank"===x,onChange:q}),H.length>1&&(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect Ratio"),help:(0,pt.__)("Set a consistent aspect ratio for all images in the gallery."),value:y,options:H,onChange:Z,hideCancelButton:!0,size:"__unstable-large"})]})]}),gt.Platform.isWeb?(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:gn,label:(0,pt.__)("Link"),children:({onClose:e})=>(0,it.jsx)(mt.MenuGroup,{children:m.map((t=>{const o=b===t.value;return(0,it.jsx)(mt.MenuItem,{isSelected:o,className:Dt("components-dropdown-menu__menu-item",{"is-active":o}),iconPosition:"left",icon:t.icon,onClick:()=>{O(t.value),e()},role:"menuitemradio",info:t.infoText,children:t.label},t.value)}))})})}):null,gt.Platform.isWeb&&(0,it.jsxs)(it.Fragment,{children:[!I&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{allowedTypes:wd,accept:"image/*",handleUpload:!1,onSelect:E,name:(0,pt.__)("Add"),multiple:!0,mediaIds:D.filter((e=>e.id)).map((e=>e.id)),addToGallery:Q})}),(0,it.jsx)(vd,{blockGap:o.style?.spacing?.blockGap,clientId:r})]}),(0,it.jsx)(xd,{...e,isContentLocked:s,images:D,mediaPlaceholder:!J||gt.Platform.isNative?X:void 0,blockProps:oe,insertBlocksAfter:i,multiGallerySelection:I})]})},save:function({attributes:e}){const{caption:t,columns:o,imageCrop:n}=e,r=Dt("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":n}),a=ct.useBlockProps.save({className:r}),i=ct.useInnerBlocksProps.save(a);return(0,it.jsxs)("figure",{...i,children:[i.children,!ct.RichText.isEmpty(t)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:Dt("blocks-gallery-caption",(0,ct.__experimentalGetElementClassName)("caption")),value:t})]})},deprecated:Xu},Md=()=>jt({name:Id,metadata:Td,settings:Dd}),zd=e=>{if(e.tagName||(e={...e,tagName:"div"}),!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:o,customBackgroundColor:n,...r}=e;return{...r,style:t}},Ad=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save:({attributes:{tagName:e}})=>(0,it.jsx)(e,{...ct.useInnerBlocksProps.save(ct.useBlockProps.save())}),isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate:e=>{const{layout:t=null}=e;if(t?.inherit||t?.contentSize)return{...e,layout:{...t,type:"constrained"}}}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){const{tagName:t}=e;return(0,it.jsx)(t,{...ct.useBlockProps.save(),children:(0,it.jsx)("div",{className:"wp-block-group__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:zd,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,textColor:n,customTextColor:r}=e,a=(0,ct.getColorClassName)("background-color",t),i=(0,ct.getColorClassName)("color",n),s=Dt(a,i,{"has-text-color":n||r,"has-background":t||o}),l={backgroundColor:a?void 0:o,color:i?void 0:r};return(0,it.jsx)("div",{className:s,style:l,children:(0,it.jsx)("div",{className:"wp-block-group__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:zd,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,textColor:n,customTextColor:r}=e,a=(0,ct.getColorClassName)("background-color",t),i=(0,ct.getColorClassName)("color",n),s=Dt(a,{"has-text-color":n||r,"has-background":t||o}),l={backgroundColor:a?void 0:o,color:i?void 0:r};return(0,it.jsx)("div",{className:s,style:l,children:(0,it.jsx)("div",{className:"wp-block-group__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:zd,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o}=e,n=(0,ct.getColorClassName)("background-color",t),r=Dt(n,{"has-background":t||o}),a={backgroundColor:n?void 0:o};return(0,it.jsx)("div",{className:r,style:a,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];var Ld=Ad;const Hd=(e="group")=>{const t={group:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),"group-row":(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),"group-stack":(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z"})}),"group-grid":(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z"})})};return t?.[e]};var Rd=function({name:e,onSelect:t}){const o=(0,lt.useSelect)((t=>t(st.store).getBlockVariations(e,"block")),[e]),n=(0,ct.useBlockProps)({className:"wp-block-group__placeholder"});return(0,gt.useEffect)((()=>{o&&1===o.length&&t(o[0])}),[t,o]),(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.Placeholder,{instructions:(0,pt.__)("Group blocks together. Select a layout:"),children:(0,it.jsx)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,pt.__)("Block variations"),children:o.map((e=>(0,it.jsx)("li",{children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:Hd(e.name),iconSize:48,onClick:()=>t(e),className:"wp-block-group-placeholder__variation-button",label:`${e.title}: ${e.description}`})},e.name)))})})})};const{HTMLElementControl:Vd}=jo(ct.privateApis);function Fd({tagName:e,onSelectTagName:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Vd,{tagName:e,onChange:t,clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]})})}var Ed=function({attributes:e,name:t,setAttributes:o,clientId:n}){const{hasInnerBlocks:r,themeSupportsLayout:a}=(0,lt.useSelect)((e=>{const{getBlock:t,getSettings:o}=e(ct.store),r=t(n);return{hasInnerBlocks:!(!r||!r.innerBlocks.length),themeSupportsLayout:o()?.supportsLayout}}),[n]),{tagName:i="div",templateLock:s,allowedBlocks:l,layout:c={}}=e,{type:u="default"}=c,d=a||"flex"===u||"grid"===u,p=(0,gt.useRef)(),m=(0,ct.useBlockProps)({ref:p}),[g,h]=function({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:o=!1}){const{style:n,backgroundColor:r,textColor:a,fontSize:i}=e,[s,l]=(0,gt.useState)(!(o||r||i||a||n||"flex"===t||"grid"===t));return(0,gt.useEffect)((()=>{(o||r||i||a||n||"flex"===t)&&l(!1)}),[r,i,a,n,t,o]),[s,l]}({attributes:e,usedLayoutType:u,hasInnerBlocks:r});let _;g?_=!1:r||(_=ct.InnerBlocks.ButtonBlockAppender);const x=(0,ct.useInnerBlocksProps)(d?m:{className:"wp-block-group__inner-container"},{dropZoneElement:p.current,templateLock:s,allowedBlocks:l,renderAppender:_}),{selectBlock:b}=(0,lt.useDispatch)(ct.store);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Fd,{tagName:i,onSelectTagName:e=>o({tagName:e}),clientId:n}),g&&(0,it.jsxs)(St.View,{children:[x.children,(0,it.jsx)(Rd,{name:t,onSelect:e=>{o(e.attributes),b(n,-1),h(!1)}})]}),d&&!g&&(0,it.jsx)(i,{...x}),!d&&!g&&(0,it.jsx)(i,{...m,children:(0,it.jsx)("div",{...x})})]})};const Od=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/group","title":"Group","category":"design","description":"Gather blocks in a layout container.","keywords":["container","wrapper","row","section"],"textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"__experimentalOnMerge":true,"__experimentalSettings":true,"align":["wide","full"],"anchor":true,"ariaLabel":true,"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"margin":["top","bottom"],"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"dimensions":{"minHeight":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"position":{"sticky":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowSizingOnChildren":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-group-editor","style":"wp-block-group"}');var Gd={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const t=["wide","full"],o=e.reduce(((e,o)=>{const{align:n}=o.attributes;return t.indexOf(n)>t.indexOf(e)?n:e}),void 0),n=e.map((e=>(0,st.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,st.createBlock)("core/group",{align:o,layout:{type:"constrained"}},n)}}]},$d=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),Ud=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),qd=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})});const Wd={innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("One.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Two.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Three.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Four.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Five.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Six.")}}]};var Zd=[{name:"group",title:(0,pt.__)("Group"),description:(0,pt.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],icon:Su},{name:"group-row",title:(0,pt._x)("Row","single horizontal line"),description:(0,pt.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:$d,example:Wd},{name:"group-stack",title:(0,pt.__)("Stack"),description:(0,pt.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:["layout.type","layout.orientation"],icon:Ud,example:Wd},{name:"group-grid",title:(0,pt.__)("Grid"),description:(0,pt.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:qd,example:Wd}];const{name:Jd}=Od,Qd={icon:Su,example:{attributes:{layout:{type:"constrained",justifyContent:"center"},style:{spacing:{padding:{top:"4em",right:"3em",bottom:"4em",left:"3em"}}}},innerBlocks:[{name:"core/heading",attributes:{content:(0,pt.__)("La Mancha"),textAlign:"center"}},{name:"core/paragraph",attributes:{align:"center",content:(0,pt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},{name:"core/spacer",attributes:{height:"10px"}},{name:"core/button",attributes:{text:(0,pt.__)("Read more")}}],viewportWidth:600},transforms:Gd,edit:Ed,save:function({attributes:{tagName:e}}){return(0,it.jsx)(e,{...ct.useInnerBlocksProps.save(ct.useBlockProps.save())})},deprecated:Ld,variations:Zd},Kd=()=>jt({name:Jd,metadata:Od,settings:Qd});var Yd=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})});const Xd={className:!1,anchor:!0},ep={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},tp=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:o,...n}=e;return{...n,style:t}},op=["left","right","center"],np=e=>{const{align:t,...o}=e;return op.includes(t)?{...o,textAlign:t}:e},rp={supports:Xd,attributes:{...ep,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>tp(np(e)),save({attributes:e}){const{align:t,level:o,content:n,textColor:r,customTextColor:a}=e,i="h"+o,s=(0,ct.getColorClassName)("color",r),l=Dt({[s]:s});return(0,it.jsx)(ct.RichText.Content,{className:l||void 0,tagName:i,style:{textAlign:t,color:s?void 0:a},value:n})}},ap={attributes:{...ep,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>tp(np(e)),save({attributes:e}){const{align:t,content:o,customTextColor:n,level:r,textColor:a}=e,i="h"+r,s=(0,ct.getColorClassName)("color",a),l=Dt({[s]:s,[`has-text-align-${t}`]:t});return(0,it.jsx)(ct.RichText.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:n},value:o})},supports:Xd},ip={supports:Xd,attributes:{...ep,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>tp(np(e)),save({attributes:e}){const{align:t,content:o,customTextColor:n,level:r,textColor:a}=e,i="h"+r,s=(0,ct.getColorClassName)("color",a),l=Dt({[s]:s,"has-text-color":a||n,[`has-text-align-${t}`]:t});return(0,it.jsx)(ct.RichText.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:n},value:o})}},sp={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:ep,isEligible:({align:e})=>op.includes(e),migrate:np,save({attributes:e}){const{align:t,content:o,level:n}=e,r="h"+n,a=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)(r,{...ct.useBlockProps.save({className:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},lp={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){const{textAlign:t,content:o,level:n}=e,r="h"+n,a=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)(r,{...ct.useBlockProps.save({className:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}};var cp=[lp,sp,ip,ap,rp];const up={},dp=e=>su()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),pp=(e,t)=>{const o=dp(t);if(""===o)return null;delete up[e];let n=o,r=0;for(;Object.values(up).includes(n);)r+=1,n=o+"-"+r;return n},mp=(e,t)=>{up[e]=t};var gp=function({attributes:e,setAttributes:t,mergeBlocks:o,onReplace:n,style:r,clientId:a}){const{textAlign:i,content:s,level:l,levelOptions:c,placeholder:u,anchor:d}=e,p="h"+l,m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i}),style:r}),g=(0,ct.useBlockEditingMode)(),{canGenerateAnchors:h}=(0,lt.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:o}=e(ct.store);return{canGenerateAnchors:!!o().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:_}=(0,lt.useDispatch)(ct.store);return(0,gt.useEffect)((()=>{if(h)return!d&&s&&(_(),t({anchor:pp(a,s)})),mp(a,d),()=>mp(a,null)}),[d,s,a,h]),(0,it.jsxs)(it.Fragment,{children:["default"===g&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:l,options:c,onChange:e=>t({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:i,onChange:e=>{t({textAlign:e})}})]}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:p,value:s,onChange:e=>{const o={content:e};!h||d&&e&&pp(a,s)!==d||(o.anchor=pp(a,e)),t(o)},onMerge:o,onReplace:n,onRemove:()=>n([]),placeholder:u||(0,pt.__)("Heading"),textAlign:i,...gt.Platform.isNative&&{deleteEnter:!0},...m})]})};const hp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/heading","title":"Heading","category":"text","description":"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.","keywords":["title","subtitle"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"h1,h2,h3,h4,h5,h6","role":"content"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"placeholder":{"type":"string"}},"supports":{"align":["wide","full"],"anchor":true,"className":true,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__unstablePasteTextInline":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-heading-editor","style":"wp-block-heading"}');const _p={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{const{content:t,anchor:o,align:n}=e;return(0,st.createBlock)("core/heading",{...Nn(e,"core/heading",(({content:e})=>({content:e}))),content:t,anchor:o,textAlign:n})}))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const o={children:e,attributes:t?[]:["style","id"]};return{h1:o,h2:o,h3:o,h4:o,h5:o,h6:o}},transform(e){const t=(0,st.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:o}=e.style||{};var n;return t.level=(n=e.nodeName,Number(n.substr(1))),"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,st.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>(0,st.createBlock)("core/heading",{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,st.createBlock)("core/heading",{level:e})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{const{content:t,textAlign:o}=e;return(0,st.createBlock)("core/paragraph",{...Nn(e,"core/paragraph",(({content:e})=>({content:e}))),content:t,align:o})}))}]};var xp=_p;const{name:bp}=hp,fp={icon:Yd,example:{attributes:{content:(0,pt.__)("Code is Poetry"),level:2,textAlign:"center"}},__experimentalLabel(e,{context:t}){const{content:o,level:n}=e,r=e?.metadata?.name,a=o?.trim().length>0;return"list-view"===t&&(r||a)?r||o:"accessibility"===t?a?(0,pt.sprintf)((0,pt.__)("Level %1$s. %2$s"),n,o):(0,pt.sprintf)((0,pt.__)("Level %s. Empty."),n):void 0},transforms:xp,deprecated:cp,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:gp,save:function({attributes:e}){const{textAlign:t,content:o,level:n}=e,r="h"+n,a=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)(r,{...ct.useBlockProps.save({className:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},yp=()=>jt({name:bp,metadata:hp,settings:fp});var vp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});const kp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/home-link","category":"design","parent":["core/navigation"],"title":"Home Link","description":"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-home-link-editor","style":"wp-block-home-link"}'),wp=e=>e.preventDefault();const{name:Cp}=kp,jp={icon:vp,edit:function({attributes:e,setAttributes:t,context:o}){const n=(0,lt.useSelect)((e=>e(_t.store).getEntityRecord("root","__unstableBase")?.home),[]),{textColor:r,backgroundColor:a,style:i}=o,s=(0,ct.useBlockProps)({className:Dt("wp-block-navigation-item",{"has-text-color":!!r||!!i?.color?.text,[`has-${r}-color`]:!!r,"has-background":!!a||!!i?.color?.background,[`has-${a}-background-color`]:!!a}),style:{color:i?.color?.text,backgroundColor:i?.color?.background}});return(0,it.jsx)("div",{...s,children:(0,it.jsx)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:n,onClick:wp,children:(0,it.jsx)(ct.RichText,{identifier:"label",className:"wp-block-home-link__label",value:e.label??(0,pt.__)("Home"),onChange:e=>{t({label:e})},"aria-label":(0,pt.__)("Home link text"),placeholder:(0,pt.__)("Add home link"),withoutInteractiveFormatting:!0})})})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{attributes:{label:(0,pt._x)("Home Link","block example")}}},Sp=()=>jt({name:Cp,metadata:kp,settings:jp});var Bp=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})});function Tp({content:e,isSelected:t}){const o=(0,lt.useSelect)((e=>e(ct.store).getSettings().styles),[]),n=(0,gt.useMemo)((()=>["\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n",...(0,ct.transformStyles)((o??[]).filter((e=>e.css)))]),[o]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.SandBox,{html:e,styles:n,title:(0,pt.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,it.jsx)("div",{className:"block-library-html__preview-overlay"})]})}const Np=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/html","title":"Custom HTML","category":"widgets","description":"Add custom HTML code and preview it as you edit.","keywords":["embed"],"textdomain":"default","attributes":{"content":{"type":"string","source":"raw","role":"content"}},"supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-html-editor"}');var Pp={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>(0,st.createBlock)("core/html",{content:(0,Tn.create)({html:e}).text})}]};const{name:Ip}=Np,Dp={icon:Bp,example:{attributes:{content:"<marquee>"+(0,pt.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function e({attributes:t,setAttributes:o,isSelected:n}){const[r,a]=(0,gt.useState)(),i=(0,gt.useContext)(mt.Disabled.Context),s=(0,xt.useInstanceId)(e,"html-edit-desc"),l=(0,lt.useSelect)((e=>e(ct.store).getSettings().isPreviewMode),[]),c=(0,ct.useBlockProps)({className:"block-library-html__edit","aria-describedby":r?s:void 0});return(0,it.jsxs)("div",{...c,children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{isPressed:!r,onClick:function(){a(!1)},children:"HTML"}),(0,it.jsx)(mt.ToolbarButton,{isPressed:r,onClick:function(){a(!0)},children:(0,pt.__)("Preview")})]})}),r||l||i?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Tp,{content:t.content,isSelected:n}),(0,it.jsx)(mt.VisuallyHidden,{id:s,children:(0,pt.__)("HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame.")})]}):(0,it.jsx)(ct.PlainText,{value:t.content,onChange:e=>o({content:e}),placeholder:(0,pt.__)("Write HTML…"),"aria-label":(0,pt.__)("HTML")})]})},save:function({attributes:e}){return(0,it.jsx)(gt.RawHTML,{children:e.content})},transforms:Pp},Mp=()=>jt({name:Ip,metadata:Np,settings:Dp}),zp={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,width:i,height:s}=e,l=i||s?{width:i,height:s}:{},c=(0,it.jsx)("img",{src:t,alt:o,...l});let u={};return i?u={width:i}:"left"!==r&&"right"!==r||(u={maxWidth:"50%"}),(0,it.jsxs)("figure",{className:r?`align${r}`:null,style:u,children:[a?(0,it.jsx)("a",{href:a,children:c}):c,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]})}},Ap={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,width:i,height:s,id:l}=e,c=(0,it.jsx)("img",{src:t,alt:o,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,it.jsxs)("figure",{className:r?`align${r}`:null,children:[a?(0,it.jsx)("a",{href:a,children:c}):c,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]})}},Lp={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,width:i,height:s,id:l}=e,c=Dt({[`align${r}`]:r,"is-resized":i||s}),u=(0,it.jsx)("img",{src:t,alt:o,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,it.jsxs)("figure",{className:c,children:[a?(0,it.jsx)("a",{href:a,children:u}):u,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]})}},Hp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,g=i||void 0,h=Dt({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":l||c}),_=(0,it.jsx)("img",{src:t,alt:o,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),x=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:d,rel:g,children:_}):_,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]});return"left"===r||"right"===r||"center"===r?(0,it.jsx)("div",{...ct.useBlockProps.save(),children:(0,it.jsx)("figure",{className:h,children:x})}):(0,it.jsx)("figure",{...ct.useBlockProps.save({className:h}),children:x})}},Rp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}},__experimentalStyle:{spacing:{margin:"0 0 1em 0"}}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,g=i||void 0,h=Dt({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":l||c}),_=(0,it.jsx)("img",{src:t,alt:o,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),x=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:d,rel:g,children:_}):_,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:h}),children:x})}},Vp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate(e){const{height:t,width:o}=e;return{...e,width:"number"==typeof o?`${o}px`:o,height:"number"==typeof t?`${t}px`:t}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,_=i||void 0,x=(0,ct.__experimentalGetBorderClassesAndStyles)(e),b=Dt({[`align${r}`]:r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!x.className||x.style&&Object.keys(x.style).length>0}),f=Dt(x.className,{[`wp-image-${p}`]:!!p}),y=(0,it.jsx)("img",{src:t,alt:o,className:f||void 0,style:{...x.style,aspectRatio:u,objectFit:d},width:l,height:c,title:h}),v=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:_,children:y}):y,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:b}),children:v})}},Fp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate:({width:e,height:t,...o})=>({...o,width:`${e}px`,height:`${t}px`}),save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,_=i||void 0,x=(0,ct.__experimentalGetBorderClassesAndStyles)(e),b=Dt({[`align${r}`]:r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!x.className||x.style&&Object.keys(x.style).length>0}),f=Dt(x.className,{[`wp-image-${p}`]:!!p}),y=(0,it.jsx)("img",{src:t,alt:o,className:f||void 0,style:{...x.style,aspectRatio:u,objectFit:d,width:l,height:c},width:l,height:c,title:h}),v=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:_,children:y}):y,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:b}),children:v})}},Ep={attributes:{align:{type:"string"},behaviors:{type:"object"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...o}){if(!o.behaviors?.lightbox)return o;const{behaviors:{lightbox:{enabled:n}}}=o,r={...o,lightbox:{enabled:n}};return delete r.behaviors,r},isEligible:e=>!!e.behaviors,save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,_=i||void 0,x=(0,ct.__experimentalGetBorderClassesAndStyles)(e),b=Dt({[`align${r}`]:r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!x.className||x.style&&Object.keys(x.style).length>0}),f=Dt(x.className,{[`wp-image-${p}`]:!!p}),y=(0,it.jsx)("img",{src:t,alt:o,className:f||void 0,style:{...x.style,aspectRatio:u,objectFit:d,width:l,height:c},title:h}),v=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:_,children:y}):y,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:b}),children:v})}};var Op=[Ep,Fp,Vp,Rp,Hp,Lp,Ap,zp],Gp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),$p=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),Up=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})}),qp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})}),Wp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})});const{DimensionsTool:Zp,ResolutionTool:Jp}=jo(ct.privateApis),Qp=[{value:"cover",label:(0,pt._x)("Cover","Scale option for dimensions control"),help:(0,pt.__)("Image covers the space evenly.")},{value:"contain",label:(0,pt._x)("Contain","Scale option for dimensions control"),help:(0,pt.__)("Image is contained without distortion.")}],Kp={placement:"bottom-start"},Yp=({href:e,children:t})=>e?(0,it.jsx)("a",{href:e,onClick:e=>e.preventDefault(),"aria-disabled":!0,style:{pointerEvents:"none",cursor:"default",display:"inline"},children:t}):t;function Xp({attributes:e,setAttributes:t,lockAltControls:o,lockAltControlsMessage:n,lockTitleControls:r,lockTitleControlsMessage:a}){const[i,s]=(0,gt.useState)(null),[l,c]=(0,gt.useState)(!1),[u,d]=(0,gt.useState)(!1);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ToolbarItem,{ref:s,children:e=>(0,it.jsx)(mt.DropdownMenu,{icon:$p,label:(0,pt.__)("More"),toggleProps:{...e,description:(0,pt.__)("Displays more controls.")},popoverProps:Kp,children:({onClose:e})=>(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.MenuItem,{onClick:()=>{c(!0),e()},"aria-haspopup":"dialog",children:(0,pt._x)("Alternative text","Alternative text for an image. Block toolbar label, a low character count is preferred.")}),(0,it.jsx)(mt.MenuItem,{onClick:()=>{d(!0),e()},"aria-haspopup":"dialog",children:(0,pt.__)("Title text")})]})})}),l&&(0,it.jsx)(mt.Popover,{placement:"bottom-start",anchor:i,onClose:()=>c(!1),offset:13,variant:"toolbar",children:(0,it.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,it.jsx)(mt.TextareaControl,{className:"wp-block-image__toolbar_content_textarea",label:(0,pt.__)("Alternative text"),value:e.alt||"",onChange:e=>t({alt:e}),disabled:o,help:o?(0,it.jsx)(it.Fragment,{children:n}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]}),__nextHasNoMarginBottom:!0})})}),u&&(0,it.jsx)(mt.Popover,{placement:"bottom-start",anchor:i,onClose:()=>d(!1),offset:13,variant:"toolbar",children:(0,it.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,className:"wp-block-image__toolbar_content_textarea",__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title attribute"),value:e.title||"",onChange:e=>t({title:e}),disabled:r,help:r?(0,it.jsx)(it.Fragment,{children:a}):(0,it.jsxs)(it.Fragment,{children:[(0,pt.__)("Describe the role of this image on the page."),(0,it.jsx)(mt.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute",children:(0,pt.__)("(Note: many devices and browsers do not display this text.)")})]})})})})]})}function em({temporaryURL:e,attributes:t,setAttributes:o,isSingleSelected:n,insertBlocksAfter:r,onReplace:a,onSelectImage:i,onSelectURL:s,onUploadError:l,context:c,clientId:u,blockEditingMode:d,parentLayoutType:p,maxContentWidth:m}){const{url:g="",alt:h,align:_,id:x,href:b,rel:f,linkClass:y,linkDestination:v,title:k,width:w,height:C,aspectRatio:j,scale:S,linkTarget:B,sizeSlug:T,lightbox:N,metadata:P}=t,[I,D]=(0,gt.useState)(),[M,z]=(0,gt.useState)(null),[A,L]=(0,gt.useState)({}),[H,R]=(0,gt.useState)(0),V=(0,xt.useResizeObserver)((([e])=>{if(!M){const[t]=e.borderBoxSize;L({width:t.inlineSize,height:t.blockSize})}R(e.target.offsetTop)})),F=(0,gt.useCallback)((()=>{R(I?.offsetTop??0)}),[I]),E=(0,xt.useMergeRefs)([D,V]),{allowResize:O=!0}=c,G=(0,lt.useSelect)((e=>x&&n?e(_t.store).getEntityRecord("postType","attachment",x,{context:"view"}):null),[x,n]),{canInsertCover:$,imageEditing:U,imageSizes:q,maxWidth:W}=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:o,getSettings:n}=e(ct.store),r=t(u),a=n();return{imageEditing:a.imageEditing,imageSizes:a.imageSizes,maxWidth:a.maxWidth,canInsertCover:o("core/cover",r)}}),[u]),{getBlock:Z,getSettings:J}=(0,lt.useSelect)(ct.store),{replaceBlocks:Q,toggleSelection:K}=(0,lt.useDispatch)(ct.store),{createErrorNotice:Y,createSuccessNotice:X}=(0,lt.useDispatch)(bo.store),{editEntityRecord:ee}=(0,lt.useDispatch)(_t.store),te=(0,xt.useViewportMatch)("medium"),oe=["wide","full"].includes(_),[{loadedNaturalWidth:ne,loadedNaturalHeight:re},ae]=(0,gt.useState)({}),[ie,se]=(0,gt.useState)(!1),[le,ce]=(0,gt.useState)(),[ue,de]=(0,gt.useState)(!1),pe="default"===d,me="contentOnly"===d,ge=O&&pe&&!oe&&te,he=q.filter((({slug:e})=>G?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));(0,gt.useEffect)((()=>{tm(x,g)&&n&&J().mediaUpload?le||window.fetch(g.includes("?")?g:g+"?").then((e=>e.blob())).then((e=>ce(e))).catch((()=>{})):ce()}),[x,g,n,le,J]);const{naturalWidth:_e,naturalHeight:xe}=(0,gt.useMemo)((()=>({naturalWidth:I?.naturalWidth||ne||void 0,naturalHeight:I?.naturalHeight||re||void 0})),[ne,re,I?.complete]);function be(e){const t=G?.media_details?.sizes?.[e]?.source_url;if(!t)return null;o({url:t,sizeSlug:e})}(0,gt.useEffect)((()=>{n||se(!1)}),[n]);const fe=x&&_e&&xe&&U,ye=n&&fe&&!ie&&!me;const ve=(0,mt.__experimentalUseCustomUnits)({availableUnits:["px"]}),[ke]=(0,ct.useSettings)("lightbox"),we=!!N&&N?.enabled!==ke?.enabled||ke?.allowEditing,Ce=!!N?.enabled||!N&&!!ke?.enabled,je=vt(),Se=ge&&(pd.includes(p)?(0,it.jsx)(Zp,{value:{aspectRatio:j},onChange:({aspectRatio:e})=>{o({aspectRatio:e,scale:"cover"})},defaultAspectRatio:"auto",tools:["aspectRatio"]}):(0,it.jsx)(Zp,{value:{width:w,height:C,scale:S,aspectRatio:j},onChange:({width:e,height:t,scale:n,aspectRatio:r})=>{o({width:!e&&t?"auto":e,height:t,scale:n,aspectRatio:r})},defaultScale:"cover",defaultAspectRatio:"auto",scaleOptions:Qp,unitsOptions:ve})),Be=()=>{o({alt:void 0,width:void 0,height:void 0,scale:void 0,aspectRatio:void 0,lightbox:void 0}),be(md)},Te=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:Be,dropdownMenuProps:je,children:Se})}),Ne="core/pattern-overrides"===P?.bindings?.__default?.source,{lockUrlControls:Pe=!1,lockHrefControls:Ie=!1,lockAltControls:De=!1,lockAltControlsMessage:Me,lockTitleControls:ze=!1,lockTitleControlsMessage:Ae,hideCaptionControls:Le=!1}=(0,lt.useSelect)((e=>{if(!n)return{};const{url:t,alt:o,title:r,caption:a}=P?.bindings||{},i=!!c["pattern/overrides"],s=(0,st.getBlockBindingsSource)(t?.source),l=(0,st.getBlockBindingsSource)(o?.source),u=(0,st.getBlockBindingsSource)(r?.source);return{lockUrlControls:!!t&&!s?.canUserEditValue?.({select:e,context:c,args:t?.args}),lockHrefControls:i||Ne,hideCaptionControls:!!a,lockAltControls:!!o&&!l?.canUserEditValue?.({select:e,context:c,args:o?.args}),lockAltControlsMessage:l?.label?(0,pt.sprintf)((0,pt.__)("Connected to %s"),l.label):(0,pt.__)("Connected to dynamic data"),lockTitleControls:!!r&&!u?.canUserEditValue?.({select:e,context:c,args:r?.args}),lockTitleControlsMessage:u?.label?(0,pt.sprintf)((0,pt.__)("Connected to %s"),u.label):(0,pt.__)("Connected to dynamic data")}}),[Ne,c,n,P?.bindings]),He=n&&!ie&&!Ie&&!Pe,Re=n&&$&&!me,Ve=He||ye||Re,Fe=n&&!ie&&!Pe&&(0,it.jsx)(ct.BlockControls,{group:me?"inline":"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:x,mediaURL:g,allowedTypes:dd,accept:"image/*",onSelect:i,onSelectURL:s,onError:l,name:g?(0,pt.__)("Replace"):(0,pt.__)("Add image"),onReset:()=>i(void 0)})}),Ee=(0,it.jsxs)(it.Fragment,{children:[Ve&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[He&&(0,it.jsx)(ct.__experimentalImageURLInputUI,{url:b||"",onChangeUrl:function(e){o(e)},linkDestination:v,mediaUrl:G&&G.source_url||g,mediaLink:G&&G.link,linkTarget:B,linkClass:y,rel:f,showLightboxSetting:we,lightboxEnabled:Ce,onSetLightbox:function(e){o(e&&!ke?.enabled?{lightbox:{enabled:!0}}:!e&&ke?.enabled?{lightbox:{enabled:!1}}:{lightbox:void 0})},resetLightbox:function(){o(ke?.enabled&&ke?.allowEditing?{lightbox:{enabled:!1}}:{lightbox:void 0})}}),ye&&(0,it.jsx)(mt.ToolbarButton,{onClick:()=>se(!0),icon:Up,label:(0,pt.__)("Crop")}),Re&&(0,it.jsx)(mt.ToolbarButton,{icon:qp,label:(0,pt.__)("Add text over image"),onClick:function(){Q(u,(0,st.switchToBlockType)(Z(u),"core/cover"))}})]}),n&&le&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:function(){const{mediaUpload:e}=J();e&&e({filesList:[le],onFileChange([e]){i(e),(0,ht.isBlobURL)(e.url)||(ce(),X((0,pt.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:dd,onError(e){Y(e,{type:"snackbar"})}})},icon:Wp,label:(0,pt.__)("Upload to Media Library")})})}),me&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(Xp,{attributes:t,setAttributes:o,lockAltControls:De,lockAltControlsMessage:Me,lockTitleControls:ze,lockTitleControlsMessage:Ae})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:Be,dropdownMenuProps:je,children:[n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!h,onDeselect:()=>o({alt:void 0}),children:(0,it.jsx)(mt.TextareaControl,{label:(0,pt.__)("Alternative text"),value:h||"",onChange:function(e){o({alt:e})},readOnly:De,help:De?(0,it.jsx)(it.Fragment,{children:Me}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]}),__nextHasNoMarginBottom:!0})}),Se,!!he.length&&(0,it.jsx)(Jp,{value:T,defaultValue:md,onChange:be,options:he})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Title attribute"),value:k||"",onChange:function(e){o({title:e})},readOnly:ze,help:ze?(0,it.jsx)(it.Fragment,{children:Ae}):(0,it.jsxs)(it.Fragment,{children:[(0,pt.__)("Describe the role of this image on the page."),(0,it.jsx)(mt.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute",children:(0,pt.__)("(Note: many devices and browsers do not display this text.)")})]})})})]}),Oe=(0,no.getFilename)(g);let Ge;Ge=h||(Oe?(0,pt.sprintf)((0,pt.__)("This image has an empty alt attribute; its file name is %s"),Oe):(0,pt.__)("This image has an empty alt attribute"));const $e=(0,ct.__experimentalUseBorderProps)(t),Ue=(0,ct.__experimentalGetShadowClassesAndStyles)(t),qe=t.className?.includes("is-style-rounded"),{postType:We,postId:Ze,queryId:Je}=c,Qe=Number.isFinite(Je);let Ke,Ye=e&&ue?(0,it.jsx)(mt.Placeholder,{className:"wp-block-image__placeholder",withIllustration:!0,children:(0,it.jsx)(mt.Spinner,{})}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{src:e||g,alt:Ge,onError:function(){de(!0);const e=No({attributes:{url:g}});void 0!==e&&a(e)},onLoad:function(e){de(!1),ae({loadedNaturalWidth:e.target?.naturalWidth,loadedNaturalHeight:e.target?.naturalHeight})},ref:E,className:$e.className,width:_e,height:xe,style:{aspectRatio:j,...M?{width:A.width+M.width,height:A.height+M.height}:{width:w,height:C},objectFit:S,...$e.style,...Ue.style}}),e&&(0,it.jsx)(mt.Spinner,{})]});if(Ye=fe&&ie?(0,it.jsx)(Yp,{href:b,children:(0,it.jsx)(ct.__experimentalImageEditor,{id:x,url:g,...A,naturalHeight:xe,naturalWidth:_e,onSaveImage:e=>o(e),onFinishEditing:()=>{se(!1)},borderProps:qe?void 0:$e})}):(0,it.jsx)(Yp,{href:b,children:Ye}),ge&&n&&!ie&&!pd.includes(p)){const e=j&&function(e){const[t,o=1]=e.split("/").map(Number),n=t/o;return n===1/0||0===n?NaN:n}(j),t=A.width/A.height,n=_e/xe,r=e||t||n||1,a=_e<xe?ad:ad*r,i=xe<_e?ad:ad/r,s=m||2.5*W;let l=!1,c=!1;"center"===_?(l=!0,c=!0):(0,pt.isRTL)()?"left"===_?l=!0:c=!0:"right"===_?c=!0:l=!0,Ke=(0,it.jsx)(mt.ResizableBox,{ref:F,style:{position:"absolute",inset:`${H}px 0 0 0`},size:A,minWidth:a,maxWidth:s,minHeight:i,maxHeight:s/r,lockAspectRatio:r,enable:{top:!1,right:l,bottom:!0,left:c},onResizeStart:()=>{K(!1)},onResize:(e,t,o,n)=>{z(n)},onResizeStop:(e,t,a,i)=>{K(!0),z(null),L((e=>({width:e.width+i.width,height:e.height+i.height}))),m&&_e>=m&&Math.abs(a.offsetWidth-m)<10?o({width:void 0,height:void 0}):o({width:`${a.offsetWidth}px`,height:"auto",aspectRatio:r===n?void 0:String(r)})},resizeRatio:"center"===_?2:1})}if(!g&&!e)return(0,it.jsxs)(it.Fragment,{children:[Fe,P?.bindings?Ee:Te]});const Xe=()=>{ee("postType",We,Ze,{featured_media:x}),X((0,pt.__)("Post featured image updated."),{type:"snackbar"})},et=(0,it.jsx)(ct.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1===e.length&&!Qe&&Ze&&x&&u===e[0]&&(0,it.jsx)(mt.MenuItem,{onClick:Xe,children:(0,pt.__)("Set as featured image")})});return(0,it.jsxs)(it.Fragment,{children:[Fe,Ee,et,Ye,Ke,(0,it.jsx)(zo,{attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:r,label:(0,pt.__)("Image caption text"),showToolbarButton:n&&(pe||me)&&!Le})]})}const tm=(e,t)=>t&&!e&&!(0,ht.isBlobURL)(t);function om(e,t){return"url"in(e?.sizes?.[t]??{})||"source_url"in(e?.media_details?.sizes?.[t]??{})}var nm=function({attributes:e,setAttributes:t,isSelected:o,className:n,insertBlocksAfter:r,onReplace:a,context:i,clientId:s,__unstableParentLayout:l}){const{url:c="",caption:u,id:d,width:p,height:m,sizeSlug:g,aspectRatio:h,scale:_,align:x,metadata:b}=e,[f,y]=(0,gt.useState)(e.blob),v=(0,gt.useRef)(),k=l?.type||l?.default?.type,w=!k||"flex"!==k&&"grid"!==k,[C,j]=function(){const[e,{width:t}]=(0,xt.useResizeObserver)(),o=(0,gt.useRef)();return[(0,it.jsx)("div",{className:"wp-block","aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:0,margin:0},ref:o,children:e}),t]}(),[S,{width:B}]=(0,xt.useResizeObserver)(),T=B&&B<160,N=(0,gt.useRef)();(0,gt.useEffect)((()=>{N.current=u}),[u]);const{__unstableMarkNextChangeAsNotPersistent:P,replaceBlock:I}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{["wide","full"].includes(x)&&(P(),t({width:void 0,height:void 0,aspectRatio:void 0,scale:void 0}))}),[P,x,t]);const{getSettings:D,getBlockRootClientId:M,getBlockName:z,canInsertBlockType:A}=(0,lt.useSelect)(ct.store),L=(0,ct.useBlockEditingMode)(),{createErrorNotice:H}=(0,lt.useDispatch)(bo.store);function R(e){H(e,{type:"snackbar"}),t({src:void 0,id:void 0,url:void 0,blob:void 0})}function V(o){if(Array.isArray(o))return void function(e){const t=v.current?.ownerDocument.defaultView;if(e.every((e=>e instanceof t.File))){const t=e,o=M(s);t.some((e=>!_d(e)))&&H((0,pt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const n=t.filter((e=>_d(e))).map((e=>(0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})));if("core/gallery"===z(o))I(s,n);else if(A("core/gallery",o)){const e=(0,st.createBlock)("core/gallery",{},n);I(s,e)}}}(o);if(!o||!o.url)return t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0,blob:void 0}),void y();if((0,ht.isBlobURL)(o.url))return void y(o.url);const{imageDefaultSize:n}=D();let r=md;g&&om(o,g)?r=g:om(o,n)&&(r=n);let a,i=((e,t)=>{const o=Object.fromEntries(Object.entries(e??{}).filter((([e])=>["alt","id","link","caption"].includes(e))));return o.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e.url,o})(o,r);if("string"==typeof i.caption&&i.caption.includes("\n")&&(i.caption=i.caption.replace(/\n/g,"<br>")),N.current&&!i.caption){const{caption:e,...t}=i;i=t}o.id&&o.id===d||(a={sizeSlug:r});let l,c=e.linkDestination;if(!c)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||id){case"file":case sd:c=sd;break;case"post":case ld:c=ld;break;case cd:c=cd;break;case id:c=id}switch(c){case sd:l=o.url;break;case ld:l=o.link}i.href=l,t({blob:void 0,...i,...a,linkDestination:c}),y()}function F(e){e!==c&&(t({blob:void 0,url:e,id:void 0,sizeSlug:D().imageDefaultSize}),y())}ft({url:f,allowedTypes:dd,onChange:V,onError:R});const E=tm(d,c)?c:void 0,O=!!c&&(0,it.jsx)("img",{alt:(0,pt.__)("Edit image"),title:(0,pt.__)("Edit image"),className:"edit-image-preview",src:c}),G=(0,ct.__experimentalUseBorderProps)(e),$=(0,ct.__experimentalGetShadowClassesAndStyles)(e),U=Dt(n,{"is-transient":!!f,"is-resized":!!p||!!m,[`size-${g}`]:g,"has-custom-border":!!G.className||G.style&&Object.keys(G.style).length>0}),q=(0,ct.useBlockProps)({ref:v,className:U}),{lockUrlControls:W=!1,lockUrlControlsMessage:Z}=(0,lt.useSelect)((e=>{if(!o)return{};const t=(0,st.getBlockBindingsSource)(b?.bindings?.url?.source);return{lockUrlControls:!!b?.bindings?.url&&!t?.canUserEditValue?.({select:e,context:i,args:b?.bindings?.url?.args}),lockUrlControlsMessage:t?.label?(0,pt.sprintf)((0,pt.__)("Connected to %s"),t.label):(0,pt.__)("Connected to dynamic data")}}),[i,o,b?.bindings?.url]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)("figure",{...q,children:[(0,it.jsx)(em,{temporaryURL:f,attributes:e,setAttributes:t,isSingleSelected:o,insertBlocksAfter:r,onReplace:a,onSelectImage:V,onSelectURL:F,onUploadError:R,context:i,clientId:s,blockEditingMode:L,parentLayoutType:k,maxContentWidth:j}),(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:td}),onSelect:V,onSelectURL:F,onError:R,placeholder:e=>(0,it.jsxs)(mt.Placeholder,{className:Dt("block-editor-media-placeholder",{[G.className]:!!G.className&&!o}),icon:!T&&(W?Gp:td),withIllustration:!o||T,label:!T&&(0,pt.__)("Image"),instructions:!W&&!T&&(0,pt.__)("Drag and drop an image, upload, or choose from your library."),style:{aspectRatio:p&&m||!h?void 0:h,width:m&&h?"100%":p,height:p&&h?"100%":m,objectFit:_,...G.style,...$.style},children:[W&&!T&&Z,!W&&!T&&e,S]}),accept:"image/*",allowedTypes:dd,handleUpload:e=>1===e.length,value:{id:d,src:E},mediaPreview:O,disableMediaButtons:f||c})]}),o&&w&&C]})};const rm=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/image","title":"Image","category":"media","usesContext":["allowResize","imageCrop","fixedHeight","postId","postType","queryId"],"description":"Insert an image to make a visual statement.","keywords":["img","photo","picture"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"url":{"type":"string","source":"attribute","selector":"img","attribute":"src","role":"content"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":"","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"lightbox":{"type":"object","enabled":{"type":"boolean"}},"title":{"type":"string","source":"attribute","selector":"img","attribute":"title","role":"content"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"id":{"type":"number","role":"content"},"width":{"type":"string"},"height":{"type":"string"},"aspectRatio":{"type":"string"},"scale":{"type":"string"},"sizeSlug":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"interactivity":true,"align":["left","center","right","wide","full"],"anchor":true,"color":{"text":false,"background":false},"filter":{"duotone":true},"spacing":{"margin":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"shadow":{"__experimentalSkipSerialization":true}},"selectors":{"border":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","shadow":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","filter":{"duotone":".wp-block-image img, .wp-block-image .components-placeholder"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"editorStyle":"wp-block-image-editor","style":"wp-block-image"}');function am(e,t){const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=e;const{firstElementChild:n}=o;if(n&&"A"===n.nodeName)return n.getAttribute(t)||void 0}const im={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},sm={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...im,a:{attributes:["href","rel","target"],classes:["*"],children:im},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,o=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),n=""===e.id?void 0:e.id,r=o?o[1]:void 0,a=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),i=a?Number(a[1]):void 0,s=e.querySelector("a"),l=s&&s.href?"custom":void 0,c=s&&s.href?s.href:void 0,u=s&&s.rel?s.rel:void 0,d=s&&s.className?s.className:void 0,p=(0,st.getBlockAttributes)("core/image",e.outerHTML,{align:r,id:i,linkDestination:l,href:c,rel:u,linkClass:d,anchor:n});return(0,ht.isBlobURL)(p.url)&&(p.blob=p.url,delete p.url),(0,st.createBlock)("core/image",p)}},{type:"files",isMatch:e=>e.every((e=>0===e.type.indexOf("image/"))),transform:e=>e.map((e=>(0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})))},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=t.content;let n=o.querySelector("img");for(;n&&n.parentNode&&n.parentNode!==o;)n=n.parentNode;return n&&n.parentNode.removeChild(n),o.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>am(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>am(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>am(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]};var lm=sm;const{name:cm}=rm,um={icon:td,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,pt.__)("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;if("list-view"===t&&o)return o;if("accessibility"===t){const{caption:t,alt:o,url:n}=e;return n?o?o+(t?". "+t:""):t||"":(0,pt.__)("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:lm,edit:nm,save:function({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h,metadata:{bindings:_={}}={}}=e,x=i||void 0,b=(0,ct.__experimentalGetBorderClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=Dt({alignnone:"none"===r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!b.className||b.style&&Object.keys(b.style).length>0}),v=Dt(b.className,{[`wp-image-${p}`]:!!p}),k=(0,it.jsx)("img",{src:t,alt:o,className:v||void 0,style:{...b.style,...f.style,aspectRatio:u,objectFit:d,width:l,height:c},title:h}),w=!ct.RichText.isEmpty(n)||_.caption||"core/pattern-overrides"===_?.__default?.source,C=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:x,children:k}):k,w&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:y}),children:C})},deprecated:Op},dm=()=>jt({name:cm,metadata:rm,settings:um});var pm=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});const mm=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-comments","title":"Latest Comments","category":"widgets","description":"Display a list of your most recent comments.","keywords":["recent comments"],"textdomain":"default","attributes":{"commentsToShow":{"type":"number","default":5,"minimum":1,"maximum":100},"displayAvatar":{"type":"boolean","default":true},"displayDate":{"type":"boolean","default":true},"displayExcerpt":{"type":"boolean","default":true}},"supports":{"align":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-comments-editor","style":"wp-block-latest-comments"}');const{name:gm}=mm,hm={icon:pm,example:{},edit:function({attributes:e,setAttributes:t}){const{commentsToShow:o,displayAvatar:n,displayDate:r,displayExcerpt:a}=e,i={...e,style:{...e?.style,spacing:void 0}},s=vt();return(0,it.jsxs)("div",{...(0,ct.useBlockProps)(),children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({commentsToShow:5,displayAvatar:!0,displayDate:!0,displayExcerpt:!0})},dropdownMenuProps:s,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!n,label:(0,pt.__)("Display avatar"),onDeselect:()=>t({displayAvatar:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display avatar"),checked:n,onChange:()=>t({displayAvatar:!n})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,pt.__)("Display date"),onDeselect:()=>t({displayDate:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display date"),checked:r,onChange:()=>t({displayDate:!r})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!a,label:(0,pt.__)("Display excerpt"),onDeselect:()=>t({displayExcerpt:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display excerpt"),checked:a,onChange:()=>t({displayExcerpt:!a})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>5!==o,label:(0,pt.__)("Number of comments"),onDeselect:()=>t({commentsToShow:5}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Number of comments"),value:o,onChange:e=>t({commentsToShow:e}),min:1,max:100,required:!0})})]})}),(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/latest-comments",attributes:i,urlQueryArgs:{_locale:"site"}})})]})}},_m=()=>jt({name:gm,metadata:mm,settings:hm});var xm=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})});const bm=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-posts","title":"Latest Posts","category":"widgets","description":"Display a list of your most recent posts.","keywords":["recent posts"],"textdomain":"default","attributes":{"categories":{"type":"array","items":{"type":"object"}},"selectedAuthor":{"type":"number"},"postsToShow":{"type":"number","default":5},"displayPostContent":{"type":"boolean","default":false},"displayPostContentRadio":{"type":"string","default":"excerpt"},"excerptLength":{"type":"number","default":55},"displayAuthor":{"type":"boolean","default":false},"displayPostDate":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":3},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"},"displayFeaturedImage":{"type":"boolean","default":false},"featuredImageAlign":{"type":"string","enum":["left","center","right"]},"featuredImageSizeSlug":{"type":"string","default":"thumbnail"},"featuredImageSizeWidth":{"type":"number","default":null},"featuredImageSizeHeight":{"type":"number","default":null},"addLinkToFeaturedImage":{"type":"boolean","default":false}},"supports":{"align":true,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-posts-editor","style":"wp-block-latest-posts"}'),{attributes:fm}=bm;var ym=[{attributes:{...fm,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],vm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),km=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),wm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),Cm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),jm=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})});const Sm={per_page:-1,_fields:"id,name",context:"view"},Bm={per_page:-1,has_published_posts:["post"],context:"view"},Tm=[{value:"none",icon:vm,label:(0,pt.__)("None")},{value:"left",icon:km,label:(0,pt.__)("Left")},{value:"center",icon:wm,label:(0,pt.__)("Center")},{value:"right",icon:Cm,label:(0,pt.__)("Right")}];function Nm({attributes:e,setAttributes:t,postCount:o}){const{postsToShow:n,order:r,orderBy:a,categories:i,selectedAuthor:s,displayFeaturedImage:l,displayPostContentRadio:c,displayPostContent:u,displayPostDate:d,displayAuthor:p,postLayout:m,columns:g,excerptLength:h,featuredImageAlign:_,featuredImageSizeSlug:x,featuredImageSizeWidth:b,featuredImageSizeHeight:f,addLinkToFeaturedImage:y}=e,{imageSizes:v,defaultImageWidth:k,defaultImageHeight:w,categoriesList:C,authorList:j}=(0,lt.useSelect)((e=>{const{getEntityRecords:t,getUsers:o}=e(_t.store),n=e(ct.store).getSettings();return{defaultImageWidth:n.imageDimensions?.[x]?.width??0,defaultImageHeight:n.imageDimensions?.[x]?.height??0,imageSizes:n.imageSizes,categoriesList:t("taxonomy","category",Sm),authorList:o(Bm)}}),[x]),S=vt(),B=v.filter((({slug:e})=>"full"!==e)).map((({name:e,slug:t})=>({value:t,label:e}))),T=C?.reduce(((e,t)=>({...e,[t.name]:t})),{})??{};return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Post content"),resetAll:()=>t({displayPostContent:!1,displayPostContentRadio:"excerpt",excerptLength:55}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,pt.__)("Display post content"),onDeselect:()=>t({displayPostContent:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display post content"),checked:u,onChange:e=>t({displayPostContent:e})})}),u&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"excerpt"!==c,label:(0,pt.__)("Content length"),onDeselect:()=>t({displayPostContentRadio:"excerpt"}),isShownByDefault:!0,children:(0,it.jsx)(mt.RadioControl,{label:(0,pt.__)("Content length"),selected:c,options:[{label:(0,pt.__)("Excerpt"),value:"excerpt"},{label:(0,pt.__)("Full post"),value:"full_post"}],onChange:e=>t({displayPostContentRadio:e})})}),u&&"excerpt"===c&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>55!==h,label:(0,pt.__)("Max number of words"),onDeselect:()=>t({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Max number of words"),value:h,onChange:e=>t({excerptLength:e}),min:10,max:100})})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Post meta"),resetAll:()=>t({displayAuthor:!1,displayPostDate:!1}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,pt.__)("Display author name"),onDeselect:()=>t({displayAuthor:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display author name"),checked:p,onChange:e=>t({displayAuthor:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,pt.__)("Display post date"),onDeselect:()=>t({displayPostDate:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display post date"),checked:d,onChange:e=>t({displayPostDate:e})})})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Featured image"),resetAll:()=>t({displayFeaturedImage:!1,featuredImageAlign:void 0,featuredImageSizeSlug:"thumbnail",featuredImageSizeWidth:null,featuredImageSizeHeight:null,addLinkToFeaturedImage:!1}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!l,label:(0,pt.__)("Display featured image"),onDeselect:()=>t({displayFeaturedImage:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display featured image"),checked:l,onChange:e=>t({displayFeaturedImage:e})})}),l&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"thumbnail"!==x||null!==b||null!==f,label:(0,pt.__)("Image size"),onDeselect:()=>t({featuredImageSizeSlug:"thumbnail",featuredImageSizeWidth:null,featuredImageSizeHeight:null}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalImageSizeControl,{onChange:e=>{const o={};e.hasOwnProperty("width")&&(o.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(o.featuredImageSizeHeight=e.height),t(o)},slug:x,width:b,height:f,imageWidth:k,imageHeight:w,imageSizeOptions:B,imageSizeHelp:(0,pt.__)("Select the size of the source image."),onChangeImage:e=>t({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!_,label:(0,pt.__)("Image alignment"),onDeselect:()=>t({featuredImageAlign:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{className:"editor-latest-posts-image-alignment-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image alignment"),value:_||"none",onChange:e=>t({featuredImageAlign:"none"!==e?e:void 0}),children:Tm.map((({value:e,icon:t,label:o})=>(0,it.jsx)(mt.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:o},e)))})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!y,label:(0,pt.__)("Add link to featured image"),onDeselect:()=>t({addLinkToFeaturedImage:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Add link to featured image"),checked:y,onChange:e=>t({addLinkToFeaturedImage:e})})})]})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Sorting and filtering"),resetAll:()=>t({order:"desc",orderBy:"date",postsToShow:5,categories:void 0,selectedAuthor:void 0,columns:3}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==r||"date"!==a||5!==n||i?.length>0||!!s,label:(0,pt.__)("Sort and filter"),onDeselect:()=>t({order:"desc",orderBy:"date",postsToShow:5,categories:void 0,selectedAuthor:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.QueryControls,{order:r,orderBy:a,numberOfItems:n,onOrderChange:e=>t({order:e}),onOrderByChange:e=>t({orderBy:e}),onNumberOfItemsChange:e=>t({postsToShow:e}),categorySuggestions:T,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!T[e])))return;const o=e.map((e=>"string"==typeof e?T[e]:e));if(o.includes(null))return!1;t({categories:o})},selectedCategories:i,onAuthorChange:e=>t({selectedAuthor:""!==e?Number(e):void 0}),authorList:j??[],selectedAuthorId:s})}),"grid"===m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>3!==g,label:(0,pt.__)("Columns"),onDeselect:()=>t({columns:3}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:g,onChange:e=>t({columns:e}),min:2,max:o?Math.min(6,o):6,required:!0})})]})]})}const{name:Pm}=bm,Im={icon:xm,example:{},edit:function e({attributes:t,setAttributes:o}){const n=(0,xt.useInstanceId)(e),{postsToShow:r,order:a,orderBy:i,categories:s,selectedAuthor:l,displayFeaturedImage:c,displayPostContentRadio:u,displayPostContent:d,displayPostDate:p,displayAuthor:m,postLayout:g,columns:h,excerptLength:_,featuredImageAlign:x,featuredImageSizeSlug:b,featuredImageSizeWidth:f,featuredImageSizeHeight:y,addLinkToFeaturedImage:v}=t,{latestPosts:k}=(0,lt.useSelect)((e=>{const{getEntityRecords:t}=e(_t.store),o=s&&s.length>0?s.map((e=>e.id)):[];return{latestPosts:t("postType","post",Object.fromEntries(Object.entries({categories:o,author:l,order:a,orderby:i,per_page:r,_embed:"author,wp:featuredmedia",ignore_sticky:!0}).filter((([,e])=>void 0!==e))))}}),[r,a,i,s,l]),{createWarningNotice:w}=(0,lt.useDispatch)(bo.store),C=e=>{e.preventDefault(),w((0,pt.__)("Links are disabled in the editor."),{id:`block-library/core/latest-posts/redirection-prevented/${n}`,type:"snackbar"})},j=!!k?.length,S=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Nm,{attributes:t,setAttributes:o,postCount:k?.length??0})}),B=(0,ct.useBlockProps)({className:Dt({"wp-block-latest-posts__list":!0,"is-grid":"grid"===g,"has-dates":p,"has-author":m,[`columns-${h}`]:"grid"===g})});if(!j)return(0,it.jsxs)("div",{...B,children:[S,(0,it.jsx)(mt.Placeholder,{icon:Wn,label:(0,pt.__)("Latest Posts"),children:Array.isArray(k)?(0,pt.__)("No posts found."):(0,it.jsx)(mt.Spinner,{})})]});const T=k.length>r?k.slice(0,r):k,N=[{icon:jm,title:(0,pt._x)("List view","Latest posts block display setting"),onClick:()=>o({postLayout:"list"}),isActive:"list"===g},{icon:qd,title:(0,pt._x)("Grid view","Latest posts block display setting"),onClick:()=>o({postLayout:"grid"}),isActive:"grid"===g}],P=(0,ja.getSettings)().formats.date;return(0,it.jsxs)(it.Fragment,{children:[S,(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:N})}),(0,it.jsx)("ul",{...B,children:T.map((e=>{const t=e.title.rendered.trim();let o=e.excerpt.rendered;const n=function(e){return e._embedded?.author?.[0]}(e),r=document.createElement("div");r.innerHTML=o,o=r.textContent||r.innerText||"";const{url:a,alt:i}=function(e,t){const o=e._embedded?.["wp:featuredmedia"]?.[0];return{url:o?.media_details?.sizes?.[t]?.source_url??o?.source_url,alt:o?.alt_text}}(e,b),s=Dt({"wp-block-latest-posts__featured-image":!0,[`align${x}`]:!!x}),l=c&&a,g=l&&(0,it.jsx)("img",{src:a,alt:i,style:{maxWidth:f,maxHeight:y}}),h=_<o.trim().split(" ").length&&""===e.excerpt.raw?(0,it.jsxs)(it.Fragment,{children:[o.trim().split(" ",_).join(" "),(0,gt.createInterpolateElement)((0,pt.sprintf)((0,pt.__)("… <a>Read more<span>: %1$s</span></a>"),t||(0,pt.__)("(no title)")),{a:(0,it.jsx)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:C}),span:(0,it.jsx)("span",{className:"screen-reader-text"})})]}):o;return(0,it.jsxs)("li",{children:[l&&(0,it.jsx)("div",{className:s,children:v?(0,it.jsx)("a",{href:e.link,onClick:C,children:g}):g}),(0,it.jsx)("a",{className:"wp-block-latest-posts__post-title",href:e.link,dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:C,children:t?null:(0,pt.__)("(no title)")}),m&&n&&(0,it.jsx)("div",{className:"wp-block-latest-posts__post-author",children:(0,pt.sprintf)((0,pt.__)("by %s"),n.name)}),p&&e.date_gmt&&(0,it.jsx)("time",{dateTime:(0,ja.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date",children:(0,ja.dateI18n)(P,e.date_gmt)}),d&&"excerpt"===u&&(0,it.jsx)("div",{className:"wp-block-latest-posts__post-excerpt",children:h}),d&&"full_post"===u&&(0,it.jsx)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}})]},e.id)}))})]})},deprecated:ym},Dm=()=>jt({name:Pm,metadata:bm,settings:Im}),Mm={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function zm(e){const{values:t,start:o,reversed:n,ordered:r,type:a,...i}=e,s=document.createElement(r?"ol":"ul");s.innerHTML=t,o&&s.setAttribute("start",o),n&&s.setAttribute("reversed",!0),a&&s.setAttribute("type",a);const[l]=(0,st.rawHandler)({HTML:s.outerHTML});return[{...i,...l.attributes},l.innerBlocks]}const Am={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:r,start:a}=e,i=t?"ol":"ul";return(0,it.jsx)(i,{...ct.useBlockProps.save({type:n,reversed:r,start:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o,multiline:"li"})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily},Lm={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:r,start:a}=e,i=t?"ol":"ul";return(0,it.jsx)(i,{...ct.useBlockProps.save({type:n,reversed:r,start:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o,multiline:"li"})})},migrate:zm},Hm={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible:({type:e})=>!!e,save({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,it.jsx)(a,{...ct.useBlockProps.save({type:o,reversed:n,start:r}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},migrate:function(e){const{type:t}=e;return t&&Mm[t]?{...e,type:Mm[t]}:e}},Rm={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:"true",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,it.jsx)(a,{...ct.useBlockProps.save({reversed:n,start:r,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}};var Vm=[Rm,Hm,Lm,Am],Fm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})}),Em=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})}),Om=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Gm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),$m=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})}),Um=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})});const qm=window.wp.deprecated;var Wm=r.n(qm);const Zm=[{label:(0,pt.__)("Numbers"),value:"decimal"},{label:(0,pt.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,pt.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,pt.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,pt.__)("Lowercase Roman numerals"),value:"lower-roman"}];var Jm=({setAttributes:e,reversed:t,start:o,type:n})=>{const r=vt();return(0,it.jsx)(ct.InspectorControls,{children:gt.Platform.isNative?(0,it.jsxs)(mt.PanelBody,{title:(0,pt.__)("Settings"),children:[(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("List style"),options:Zm,value:n,onChange:t=>e({type:t})}),(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Start value"),type:"number",onChange:t=>{const o=parseInt(t,10);e({start:isNaN(o)?void 0:o})},value:Number.isInteger(o)?o.toString(10):"",step:"1"}),(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})]}):(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({type:void 0,start:void 0,reversed:void 0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("List style"),isShownByDefault:!0,hasValue:()=>!!n,onDeselect:()=>e({type:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("List style"),options:Zm,value:n||"decimal",onChange:t=>e({type:t})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Start value"),isShownByDefault:!0,hasValue:()=>!!o,onDeselect:()=>e({start:void 0}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Start value"),type:"number",onChange:t=>{const o=parseInt(t,10);e({start:isNaN(o)?void 0:o})},value:Number.isInteger(o)?o.toString(10):"",step:"1"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Reverse order"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>e({reversed:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})})]})})};var Qm=(0,gt.forwardRef)((function(e,t){const{ordered:o,...n}=e,r=o?"ol":"ul";return(0,it.jsx)(r,{ref:t,...n})}));const Km={name:"core/list-item"},Ym=[["core/list-item"]];function Xm({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:n,getBlockAttributes:r,getBlock:a}=(0,lt.useSelect)(ct.store);return(0,gt.useCallback)((()=>{const i=n(e),s=r(i),l=(0,st.createBlock)("core/list-item",s),{innerBlocks:c}=a(e);t([i],[l,...c]),o(c[c.length-1].clientId)}),[e])}(e),o=(0,lt.useSelect)((t=>{const{getBlockRootClientId:o,getBlockName:n}=t(ct.store);return"core/list-item"===n(o(e))}),[e]);return(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Fm:Em,title:(0,pt.__)("Outdent"),description:(0,pt.__)("Outdent list item"),disabled:!o,onClick:t})})}const eg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list","title":"List","category":"text","allowedBlocks":["core/list-item"],"description":"An organized collection of items displayed in a specific order.","keywords":["bullet list","ordered list","numbered list"],"textdomain":"default","attributes":{"ordered":{"type":"boolean","default":false,"role":"content"},"values":{"type":"string","source":"html","selector":"ol,ul","multiline":"li","default":"","role":"content"},"type":{"type":"string"},"start":{"type":"number"},"reversed":{"type":"boolean"},"placeholder":{"type":"string"}},"supports":{"anchor":true,"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__unstablePasteTextInline":true,"__experimentalOnMerge":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-list:not(.wp-block-list .wp-block-list)"},"editorStyle":"wp-block-list-editor","style":"wp-block-list"}');function tg({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function og(e){return e.flatMap((({name:e,attributes:t,innerBlocks:o=[]})=>"core/list-item"===e?[t.content,...og(o)]:og(o)))}const ng={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,st.createBlock)("core/list-item",{content:e})));else if(1===e.length){const o=(0,Tn.create)({html:e[0].content});t=(0,Tn.split)(o,"\n").map((e=>(0,st.createBlock)("core/list-item",{content:(0,Tn.toHTMLString)({value:e})})))}return(0,st.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:tg(e).ol,ul:tg(e).ul}),transform:function e(t){const o=t.getAttribute("type"),n={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:o&&Mm[o]?Mm[o]:void 0},r=Array.from(t.children).map((t=>{const o=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));o.reverse();const[n,...r]=o;if(!("UL"===n?.tagName||"OL"===n?.tagName))return(0,st.createBlock)("core/list-item",{content:t.innerHTML});const a=r.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));a.reverse();const i={content:a.join("").trim()},s=[e(n)];return(0,st.createBlock)("core/list-item",i,s)}));return(0,st.createBlock)("core/list",n,r)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,st.createBlock)("core/list",{},[(0,st.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,st.createBlock)("core/list",{ordered:!0},[(0,st.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,o)=>og(o).map((t=>(0,st.createBlock)(e,{content:t})))})))]};var rg=ng;const{name:ag}=eg,ig={icon:jm,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,pt.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The Queen of Hearts.")}}]},transforms:rg,edit:function({attributes:e,setAttributes:t,clientId:o,style:n}){const{ordered:r,type:a,reversed:i,start:s}=e,l=(0,ct.useBlockProps)({style:{...gt.Platform.isNative&&n,listStyleType:r&&"decimal"!==a?a:void 0}}),c=(0,ct.useInnerBlocksProps)(l,{defaultBlock:Km,directInsert:!0,template:Ym,templateLock:!1,templateInsertUpdatesSelection:!0,...gt.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const o=(0,lt.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:r}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{if(!e.values)return;const[a,i]=zm(e);Wm()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,a),r(t,i)}))}),[e.values])}(e,o);const u=(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Om:Gm,title:(0,pt.__)("Unordered"),description:(0,pt.__)("Convert to unordered list"),isActive:!1===r,onClick:()=>{t({ordered:!1})}}),(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?$m:Um,title:(0,pt.__)("Ordered"),description:(0,pt.__)("Convert to ordered list"),isActive:!0===r,onClick:()=>{t({ordered:!0})}}),(0,it.jsx)(Xm,{clientId:o})]});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Qm,{ordered:r,reversed:i,start:s,...c}),u,r&&(0,it.jsx)(Jm,{setAttributes:t,reversed:i,start:s,type:a})]})},save:function({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,it.jsx)(a,{...ct.useBlockProps.save({reversed:n,start:r,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},deprecated:Vm},sg=()=>jt({name:ag,metadata:eg,settings:ig});var lg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});const{Badge:cg}=jo(mt.privateApis);const ug=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/math","title":"Math","category":"text","description":"Display mathematical notation using LaTeX.","keywords":["equation","formula","latex","mathematics"],"textdomain":"default","attributes":{"latex":{"type":"string","role":"content"},"mathML":{"type":"string","source":"html","selector":"math"}}}');const{name:dg}=ug,pg={icon:lg,example:{attributes:{latex:"x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",mathML:'<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">−</mo><mi>b</mi><mo>±</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'},viewportWidth:300},edit:function({attributes:e,setAttributes:t,isSelected:o}){const{latex:n}=e,[a,i]=(0,gt.useState)(),[s,l]=(0,gt.useState)(null),[c,u]=(0,gt.useState)(),d=(0,gt.useRef)(e.latex),{__unstableMarkNextChangeAsNotPersistent:p}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{Promise.resolve().then(r.t.bind(r,3533,23)).then((e=>{u((()=>e.default)),d.current&&(p(),t({mathML:e.default(d.current,{displayMode:!0})}))}))}),[d,t,p]);const m=(0,ct.useBlockProps)({ref:i,position:"relative"});return(0,it.jsxs)("div",{...m,children:[e.mathML?(0,it.jsx)("math",{display:"block",dangerouslySetInnerHTML:{__html:e.mathML}}):"",o&&(0,it.jsx)(mt.Popover,{placement:"bottom-start",offset:8,anchor:a,focusOnMount:"firstContentElement",children:(0,it.jsx)("div",{style:{padding:"4px",minWidth:"300px"},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:1,children:[(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("LaTeX math syntax"),hideLabelFromVision:!0,value:n,className:"wp-block-math__textarea-control",onChange:e=>{if(!c)return void t({latex:e});let o="";try{o=c(e,{displayMode:!0}),l(null)}catch(e){l(e.message)}t({mathML:o,latex:e})},placeholder:(0,pt.__)("e.g., x^2, \\frac{a}{b}")}),s&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(cg,{intent:"error",className:"wp-block-math__error",children:s}),(0,it.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})]})},save:function({attributes:e}){const{latex:t,mathML:o}=e;return t?(0,it.jsx)("math",{...ct.useBlockProps.save(),display:"block",dangerouslySetInnerHTML:{__html:o}}):null}},mg=()=>jt({name:dg,metadata:ug,settings:pg});var gg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});const hg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list-item","title":"List Item","category":"text","parent":["core/list"],"allowedBlocks":["core/list"],"description":"An individual item within a list.","textdomain":"default","attributes":{"placeholder":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"li","role":"content"}},"supports":{"anchor":true,"className":false,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"background":true,"__experimentalDefaultControls":{"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-list > li","border":".wp-block-list:not(.wp-block-list .wp-block-list) > li"}}');var _g=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})}),xg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})});function bg(e){const{replaceBlocks:t,selectionChange:o,multiSelect:n}=(0,lt.useDispatch)(ct.store),{getBlock:r,getPreviousBlockClientId:a,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:l,getMultiSelectedBlockClientIds:c}=(0,lt.useSelect)(ct.store);return(0,gt.useCallback)((()=>{const u=l(),d=u?c():[e],p=d.map((e=>(0,st.cloneBlock)(r(e)))),m=a(e),g=(0,st.cloneBlock)(r(m));g.innerBlocks?.length||(g.innerBlocks=[(0,st.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=i(),_=s();return t([m,...d],[g]),u?n(p[0].clientId,p[p.length-1].clientId):o(p[0].clientId,_.attributeKey,_.clientId===h.clientId?h.offset:_.offset,_.offset),!0}),[e])}function fg(){const e=(0,lt.useRegistry)(),{moveBlocksToPosition:t,removeBlock:o,insertBlock:n,updateBlockListSettings:r}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:a,getBlockName:i,getBlockOrder:s,getBlockIndex:l,getSelectedBlockClientIds:c,getBlock:u,getBlockListSettings:d}=(0,lt.useSelect)(ct.store);return(0,gt.useCallback)(((p=c())=>{if(Array.isArray(p)||(p=[p]),!p.length)return;const m=p[0];if("core/list-item"!==i(m))return;const g=function(e){const t=a(e),o=a(t);if(o&&"core/list-item"===i(o))return o}(m);if(!g)return;const h=a(m),_=p[p.length-1],x=s(h).slice(l(_)+1);return e.batch((()=>{if(x.length){let e=s(m)[0];if(!e){const t=(0,st.cloneBlock)(u(h),{},[]);e=t.clientId,n(t,0,m,!1),r(e,d(h))}t(x,h,e)}if(t(p,h,a(g),l(g)+1),!s(h).length){o(h,!1)}})),!0}),[])}function yg(e,t){const o=(0,lt.useRegistry)(),{getPreviousBlockClientId:n,getNextBlockClientId:r,getBlockOrder:a,getBlockRootClientId:i,getBlockName:s}=(0,lt.useSelect)(ct.store),{mergeBlocks:l,moveBlocksToPosition:c}=(0,lt.useDispatch)(ct.store),u=fg();function d(e){const t=a(e);return t.length?d(t[t.length-1]):e}function p(e){const t=i(e),o=i(t);if(o&&"core/list-item"===s(o))return o}function m(e){const t=r(e);if(t)return t;const o=p(e);return o?m(o):void 0}function g(e){const t=a(e);return t.length?a(t[0])[0]:m(e)}return r=>{function s(e,t){o.batch((()=>{const[o]=a(t);o&&(n(t)!==e||a(e).length?c(a(o),o,i(e)):c([o],t,e)),l(e,t)}))}if(r){const o=g(e);if(!o)return void t(r);p(o)?u(o):s(e,o)}else{const o=n(e);if(p(e))u(e);else if(o){s(d(o),e)}else t(r)}}}function vg({clientId:e}){const t=bg(e),o=fg(),{canIndent:n,canOutdent:r}=(0,lt.useSelect)((t=>{const{getBlockIndex:o,getBlockRootClientId:n,getBlockName:r}=t(ct.store);return{canIndent:o(e)>0,canOutdent:"core/list-item"===r(n(n(e)))}}),[e]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Fm:Em,title:(0,pt.__)("Outdent"),shortcut:mn.displayShortcut.shift("Tab"),description:(0,pt.__)("Outdent list item"),disabled:!r,onClick:()=>o()}),(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?_g:xg,title:(0,pt.__)("Indent"),shortcut:"Tab",description:(0,pt.__)("Indent list item"),disabled:!n,onClick:()=>t()})]})}const kg={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,st.createBlock)("core/paragraph",e),...t.map((e=>(0,st.cloneBlock)(e)))]}]};var wg=kg;const{name:Cg}=hg,jg={icon:gg,edit:function({attributes:e,setAttributes:t,clientId:o,mergeBlocks:n}){const{placeholder:r,content:a}=e,i=(0,ct.useBlockProps)(),s=(0,ct.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),l=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlock:n,getBlockRootClientId:r,getBlockIndex:a,getBlockName:i}=(0,lt.useSelect)(ct.store),s=(0,gt.useRef)(e);s.current=e;const l=fg();return(0,xt.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==mn.ENTER)return;const{content:c,clientId:u}=s.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===i(r(r(s.current.clientId))))return void l();const d=n(r(u)),p=a(u),m=(0,st.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,p)}),g=(0,st.createBlock)((0,st.getDefaultBlockName)()),h=[...d.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...d.innerBlocks.slice(p+1)],_=h.length?[(0,st.cloneBlock)({...d,innerBlocks:h})]:[];t(d.clientId,[m,g,..._],1),o(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:a,clientId:o}),c=function(e){const{getSelectionStart:t,getSelectionEnd:o,getBlockIndex:n}=(0,lt.useSelect)(ct.store),r=bg(e),a=fg();return(0,xt.useRefEffect)((i=>{function s(i){const{keyCode:s,shiftKey:l,altKey:c,metaKey:u,ctrlKey:d}=i;if(i.defaultPrevented||s!==mn.SPACE&&s!==mn.TAB||c||u||d)return;const p=t(),m=o();0===p.offset&&0===m.offset&&(l?s===mn.TAB&&a()&&i.preventDefault():0!==n(e)&&r()&&i.preventDefault())}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[e,r])}(o),u=yg(o,n);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)("li",{...s,children:[(0,it.jsx)(ct.RichText,{ref:(0,xt.useMergeRefs)([l,c]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:a,"aria-label":(0,pt.__)("List text"),placeholder:r||(0,pt.__)("List"),onMerge:u}),s.children]}),(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(vg,{clientId:o})})]})},save:function({attributes:e}){return(0,it.jsxs)("li",{...ct.useBlockProps.save(),children:[(0,it.jsx)(ct.RichText.Content,{value:e.content}),(0,it.jsx)(ct.InnerBlocks.Content,{})]})},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:wg,[jo(ct.privateApis).requiresWrapperOnCopy]:!0},Sg=()=>jt({name:Cg,metadata:hg,settings:jg});var Bg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})});const Tg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/loginout","title":"Login/out","category":"theme","description":"Show login & logout links.","keywords":["login","logout","form"],"textdomain":"default","attributes":{"displayLoginAsForm":{"type":"boolean","default":false},"redirectToCurrent":{"type":"boolean","default":true}},"example":{"viewportWidth":350},"supports":{"className":true,"color":{"background":true,"text":false,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-loginout"}'),{name:Ng}=Tg,Pg={icon:Bg,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:o,redirectToCurrent:n}=e,r=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayLoginAsForm:!1,redirectToCurrent:!0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display login as form"),isShownByDefault:!0,hasValue:()=>o,onDeselect:()=>t({displayLoginAsForm:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display login as form"),checked:o,onChange:()=>t({displayLoginAsForm:!o})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Redirect to current URL"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>t({redirectToCurrent:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Redirect to current URL"),checked:n,onChange:()=>t({redirectToCurrent:!n})})})]})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)({className:"logged-in"}),children:(0,it.jsx)("a",{href:"#login-pseudo-link",children:(0,pt.__)("Log out")})})]})}},Ig=()=>jt({name:Ng,metadata:Tg,settings:Pg});var Dg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})});const Mg="full",zg=[["core/paragraph",{placeholder:(0,pt._x)("Content…","content placeholder")}]],Ag=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},Lg=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{},Hg=50,Rg=()=>{},Vg=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:o,...n}=e;return{...n,style:t}},Fg=e=>e.align?e:{...e,align:"wide"},Eg={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},Og={...Eg,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Gg={...Og,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},mediaType:{type:"string",role:"content"}},$g={...Gg,align:{type:"string",default:"none"},useFeaturedImage:{type:"boolean",default:!1}},Ug={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},qg={...Ug,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},Wg={attributes:$g,supports:{...qg,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},usesContext:["postId","postType"],save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Mg,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=a?(0,it.jsx)("img",{src:a,alt:o,className:x||null}):null;p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Lg(a,u):{};let k;i!==Hg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}},Zg={attributes:Gg,supports:qg,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Mg,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,it.jsx)("img",{src:a,alt:o,className:x||null});p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Lg(a,u):{};let k;i!==Hg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Fg,isEligible(e,t,{block:o}){const{attributes:n}=o;return void 0===e.align&&!!n.className?.includes("alignwide")}},Jg={attributes:Og,supports:Ug,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Mg,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,it.jsx)("img",{src:a,alt:o,className:x||null});p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Ag(a,u):{};let k;i!==Hg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Fg},Qg={attributes:Og,supports:Ug,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Mg,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,it.jsx)("img",{src:a,alt:o,className:x||null});p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Ag(a,u):{};let k;i!==Hg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Rg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Fg},Kg={attributes:{...Eg,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,xt.compose)(Vg,Fg),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p,linkClass:m,href:g,linkTarget:h,rel:_}=e,x=_||void 0;let b=(0,it.jsx)("img",{src:s,alt:r,className:c&&"image"===i?`wp-image-${c}`:null});g&&(b=(0,it.jsx)("a",{className:m,href:g,target:h,rel:x,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:s})},y=(0,ct.getColorClassName)("background-color",t),v=Dt({"has-media-on-the-right":"right"===a,"has-background":y||o,[y]:y,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),k=d?Ag(s,p):{};let w;l!==Hg&&(w="right"===a?`auto ${l}%`:`${l}% auto`);const C={backgroundColor:y?void 0:o,gridTemplateColumns:w};return(0,it.jsxs)("div",{className:v,style:C,children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:k,children:(f[i]||Rg)()}),(0,it.jsx)("div",{className:"wp-block-media-text__content",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})}},Yg={attributes:{...Eg,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,xt.compose)(Vg,Fg),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p}=e,m={image:()=>(0,it.jsx)("img",{src:s,alt:r,className:c&&"image"===i?`wp-image-${c}`:null}),video:()=>(0,it.jsx)("video",{controls:!0,src:s})},g=(0,ct.getColorClassName)("background-color",t),h=Dt({"has-media-on-the-right":"right"===a,[g]:g,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),_=d?Ag(s,p):{};let x;l!==Hg&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const b={backgroundColor:g?void 0:o,gridTemplateColumns:x};return(0,it.jsxs)("div",{className:h,style:b,children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:_,children:(m[i]||Rg)()}),(0,it.jsx)("div",{className:"wp-block-media-text__content",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})}},Xg={attributes:{...Eg,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Fg,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l}=e,c={image:()=>(0,it.jsx)("img",{src:s,alt:r}),video:()=>(0,it.jsx)("video",{controls:!0,src:s})},u=(0,ct.getColorClassName)("background-color",t),d=Dt({"has-media-on-the-right":"right"===a,[u]:u,"is-stacked-on-mobile":n});let p;l!==Hg&&(p="right"===a?`auto ${l}%`:`${l}% auto`);const m={backgroundColor:u?void 0:o,gridTemplateColumns:p};return(0,it.jsxs)("div",{className:d,style:m,children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",children:(c[i]||Rg)()}),(0,it.jsx)("div",{className:"wp-block-media-text__content",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})}};var eh=[Wg,Zg,Jg,Qg,Kg,Yg,Xg],th=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),oh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),nh=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]});function rh(e,t){return e?{objectPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const ah=["image","video"],ih=()=>{},sh=(0,gt.forwardRef)((({isSelected:e,isStackedOnMobile:t,...o},n)=>{const r=(0,xt.useViewportMatch)("small","<");return(0,it.jsx)(mt.ResizableBox,{ref:n,showHandle:e&&(!r||!t),...o})}));function lh({mediaId:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n,useFeaturedImage:r}){return(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:ah,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:n,useFeaturedImage:r,onReset:()=>o(void 0)})})}function ch({className:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n}){const{createErrorNotice:r}=(0,lt.useDispatch)(bo.store);return(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:nh}),labels:{title:(0,pt.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",onToggleFeaturedImage:n,allowedTypes:ah,onError:e=>{r(e,{type:"snackbar"})},disableMediaButtons:t})}var uh=(0,gt.forwardRef)((function(e,t){const{className:o,commitWidthChange:n,focalPoint:r,imageFill:a,isSelected:i,isStackedOnMobile:s,mediaAlt:l,mediaId:c,mediaPosition:u,mediaType:d,mediaUrl:p,mediaWidth:m,onSelectMedia:g,onWidthChange:h,enableResize:_,toggleUseFeaturedImage:x,useFeaturedImage:b,featuredImageURL:f,featuredImageAlt:y,refMedia:v}=e,k=!c&&(0,ht.isBlobURL)(p),{toggleSelection:w}=(0,lt.useDispatch)(ct.store);if(p||f||b){const C=()=>{w(!1)},j=(e,t,o)=>{h(parseInt(o.style.width))},S=(e,t,o)=>{w(!0),n(parseInt(o.style.width))},B={right:_&&"left"===u,left:_&&"right"===u},T="image"===d&&a?rh(p||f,r):{},N={image:()=>b&&f?(0,it.jsx)("img",{ref:v,src:f,alt:y,style:T}):p&&(0,it.jsx)("img",{ref:v,src:p,alt:l,style:T}),video:()=>(0,it.jsx)("video",{controls:!0,ref:v,src:p})};return(0,it.jsxs)(sh,{as:"figure",className:Dt(o,"editor-media-container__resizer",{"is-transient":k}),size:{width:m+"%"},minWidth:"10%",maxWidth:"100%",enable:B,onResizeStart:C,onResize:j,onResizeStop:S,axis:"x",isSelected:i,isStackedOnMobile:s,ref:t,children:[(0,it.jsx)(lh,{onSelectMedia:g,mediaUrl:b&&f?f:p,mediaId:c,toggleUseFeaturedImage:x,useFeaturedImage:b}),(N[d]||ih)(),k&&(0,it.jsx)(mt.Spinner,{}),!b&&(0,it.jsx)(ch,{...e}),!f&&b&&(0,it.jsx)(mt.Placeholder,{className:"wp-block-media-text--placeholder-image",style:T,withIllustration:!0})]})}return(0,it.jsx)(ch,{...e})}));const{ResolutionTool:dh}=jo(ct.privateApis),ph=e=>Math.max(15,Math.min(e,85));function mh(e,t){return e?.media_details?.sizes?.[t]?.source_url}function gh({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const r=n.filter((({slug:t})=>mh(e,t))).map((({name:e,slug:t})=>({value:t,label:e})));return(0,it.jsx)(dh,{value:t,defaultValue:Mg,options:r,onChange:o})}var hh=function({attributes:e,isSelected:t,setAttributes:o,context:{postId:n,postType:r}}){const{focalPoint:a,href:i,imageFill:s,isStackedOnMobile:l,linkClass:c,linkDestination:u,linkTarget:d,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:_,mediaWidth:x,mediaSizeSlug:b,rel:f,verticalAlignment:y,allowedBlocks:v,useFeaturedImage:k}=e,[w]=(0,_t.useEntityProp)("postType",r,"featured_media",n),{featuredImageMedia:C}=(0,lt.useSelect)((e=>({featuredImageMedia:w&&k?e(_t.store).getEntityRecord("postType","attachment",w,{context:"view"}):void 0})),[w,k]),{image:j}=(0,lt.useSelect)((e=>({image:m&&t?e(_t.store).getEntityRecord("postType","attachment",m,{context:"view"}):null})),[t,m]),S=k?C?.source_url:"",B=k?C?.alt_text:"",T=(0,gt.useRef)(),N=e=>{const{style:t}=T.current,{x:o,y:n}=e;t.objectPosition=`${100*o}% ${100*n}%`},[P,I]=(0,gt.useState)(null),D=function({attributes:{linkDestination:e,href:t},setAttributes:o}){return n=>{if(!n||!n.url)return void o({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0,useFeaturedImage:!1});let r,a;(0,ht.isBlobURL)(n.url)&&(n.type=(0,ht.getBlobTypeByURL)(n.url)),r=n.media_type?"image"===n.media_type?"image":"video":n.type,"image"===r&&(a=n.sizes?.large?.url||n.media_details?.sizes?.large?.source_url);let i=t;"media"===e&&(i=n.url),"attachment"===e&&(i=n.link),o({mediaAlt:n.alt,mediaId:n.id,mediaType:r,mediaUrl:a||n.url,mediaLink:n.link||void 0,href:i,focalPoint:void 0,useFeaturedImage:!1})}}({attributes:e,setAttributes:o}),M=e=>{o({mediaWidth:ph(e)}),I(null)},z=Dt({"has-media-on-the-right":"right"===g,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${y}`]:y,"is-image-fill-element":s}),A=`${P||x}%`,L="right"===g?`1fr ${A}`:`${A} 1fr`,H={gridTemplateColumns:L,msGridColumns:L},R=e=>{const t=mh(j,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})},V=vt(),F=(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({isStackedOnMobile:!0,imageFill:!1,mediaAlt:"",focalPoint:void 0,mediaWidth:50}),R(Mg)},dropdownMenuProps:V,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Media width"),isShownByDefault:!0,hasValue:()=>50!==x,onDeselect:()=>o({mediaWidth:50}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Media width"),value:P||x,onChange:M,min:15,max:85})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>o({isStackedOnMobile:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Stack on mobile"),checked:l,onChange:()=>o({isStackedOnMobile:!l})})}),"image"===h&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Crop image to fill"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({imageFill:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Crop image to fill"),checked:!!s,onChange:()=>o({imageFill:!s})})}),s&&(_||S)&&"image"===h&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>o({focalPoint:void 0}),children:(0,it.jsx)(mt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Focal point"),url:k&&S?S:_,value:a,onChange:e=>o({focalPoint:e}),onDragStart:N,onDrag:N})}),"image"===h&&_&&!k&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>o({mediaAlt:""}),children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Alternative text"),value:p,onChange:e=>{o({mediaAlt:e})},help:(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]})})}),"image"===h&&!k&&(0,it.jsx)(gh,{image:j,value:b,onChange:R})]}),E=(0,ct.useBlockProps)({className:z,style:H}),O=(0,ct.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:zg,allowedBlocks:v}),G=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:F}),(0,it.jsxs)(ct.BlockControls,{group:"block",children:["default"===G&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:y}),(0,it.jsx)(mt.ToolbarButton,{icon:th,title:(0,pt.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,it.jsx)(mt.ToolbarButton,{icon:oh,title:(0,pt.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})]}),"image"===h&&!k&&(0,it.jsx)(ct.__experimentalImageURLInputUI,{url:i||"",onChangeUrl:e=>{o(e)},linkDestination:u,mediaType:h,mediaUrl:j&&j.source_url,mediaLink:j&&j.link,linkTarget:d,linkClass:c,rel:f})]}),(0,it.jsxs)("div",{...E,children:["right"===g&&(0,it.jsx)("div",{...O}),(0,it.jsx)(uh,{className:"wp-block-media-text__media",onSelectMedia:D,onWidthChange:e=>{I(ph(e))},commitWidthChange:M,refMedia:T,enableResize:"default"===G,toggleUseFeaturedImage:()=>{o({imageFill:!1,mediaType:"image",mediaId:void 0,mediaUrl:void 0,mediaAlt:void 0,mediaLink:void 0,linkDestination:void 0,linkTarget:void 0,linkClass:void 0,rel:void 0,href:void 0,useFeaturedImage:!k})},focalPoint:a,imageFill:s,isSelected:t,isStackedOnMobile:l,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:_,mediaWidth:x,useFeaturedImage:k,featuredImageURL:S,featuredImageAlt:B}),"right"!==g&&(0,it.jsx)("div",{...O})]})]})};const _h=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/media-text","title":"Media & Text","category":"media","description":"Set media and words side-by-side for a richer layout.","keywords":["image","video"],"textdomain":"default","attributes":{"align":{"type":"string","default":"none"},"mediaAlt":{"type":"string","source":"attribute","selector":"figure img","attribute":"alt","default":"","role":"content"},"mediaPosition":{"type":"string","default":"left"},"mediaId":{"type":"number","role":"content"},"mediaUrl":{"type":"string","source":"attribute","selector":"figure video,figure img","attribute":"src","role":"content"},"mediaLink":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure a","attribute":"target"},"href":{"type":"string","source":"attribute","selector":"figure a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure a","attribute":"class"},"mediaType":{"type":"string","role":"content"},"mediaWidth":{"type":"number","default":50},"mediaSizeSlug":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"verticalAlignment":{"type":"string"},"imageFill":{"type":"boolean"},"focalPoint":{"type":"object"},"useFeaturedImage":{"type":"boolean","default":false}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-media-text-editor","style":"wp-block-media-text"}'),xh=()=>{};const bh={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:o,anchor:n})=>(0,st.createBlock)("core/media-text",{mediaAlt:e,mediaId:o,mediaUrl:t,mediaType:"image",anchor:n})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:o})=>(0,st.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:o,backgroundType:n,customGradient:r,customOverlayColor:a,gradient:i,id:s,overlayColor:l,style:c,textColor:u,url:d,useFeaturedImage:p},m)=>{let g={};return r?g={style:{color:{gradient:r}}}:a&&(g={style:{color:{background:a}}}),c?.color?.text&&(g.style={color:{...g.style?.color,text:c.color.text}}),(0,st.createBlock)("core/media-text",{align:e,anchor:o,backgroundColor:l,gradient:i,mediaAlt:t,mediaId:s,mediaType:n,mediaUrl:d,textColor:u,useFeaturedImage:p,...g},m)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:o,anchor:n})=>(0,st.createBlock)("core/image",{alt:e,id:t,url:o,anchor:n})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:o})=>(0,st.createBlock)("core/video",{id:e,src:t,anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:o,focalPoint:n,gradient:r,mediaAlt:a,mediaId:i,mediaType:s,mediaUrl:l,style:c,textColor:u,useFeaturedImage:d},p)=>{const m={};c?.color?.gradient?m.customGradient=c.color.gradient:c?.color?.background&&(m.customOverlayColor=c.color.background),c?.color?.text&&(m.style={color:{text:c.color.text}});const g={align:e,alt:a,anchor:t,backgroundType:s,dimRatio:l||d?50:100,focalPoint:n,gradient:r,id:i,overlayColor:o,textColor:u,url:l,useFeaturedImage:d,...m};return(0,st.createBlock)("core/cover",g,p)}}]};var fh=bh;const{name:yh}=_h,vh={icon:Dg,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("— Kobayashi Issa (一茶)")}}]},transforms:fh,edit:hh,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Mg,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r}),b=c?rh(a,u):{};let f=a?(0,it.jsx)("img",{src:a,alt:o,className:x||null,style:b}):null;p&&(f=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:f}));const y={image:()=>f,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},v=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill-element":c});let k;50!==i&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:v,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",children:(y[r]||xh)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:v,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",children:(y[r]||xh)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},deprecated:eh},kh=()=>jt({name:yh,metadata:_h,settings:vh});const wh=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/missing","title":"Unsupported","category":"text","description":"Your site doesn’t include support for this block.","textdomain":"default","attributes":{"originalName":{"type":"string"},"originalUndelimitedContent":{"type":"string"},"originalContent":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"inserter":false,"html":false,"reusable":false,"interactivity":{"clientNavigation":true}}}');const{name:Ch}=wh,jh={name:Ch,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,o=t?(0,st.getBlockType)(t):void 0;return o?o.settings.title||t:""}},edit:function({attributes:e,clientId:t}){const{originalName:o,originalUndelimitedContent:n}=e,r=!!n,{hasFreeformBlock:a,hasHTMLBlock:i}=(0,lt.useSelect)((e=>{const{canInsertBlockType:o,getBlockRootClientId:n}=e(ct.store);return{hasFreeformBlock:o("core/freeform",n(t)),hasHTMLBlock:o("core/html",n(t))}}),[t]),{replaceBlock:s}=(0,lt.useDispatch)(ct.store),l=[];let c;const u=(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:function(){s(t,(0,st.createBlock)("core/html",{content:n}))},variant:"primary",children:(0,pt.__)("Keep as HTML")},"convert");return!r||a||o?r&&i?(c=(0,pt.sprintf)((0,pt.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'),o),l.push(u)):c=(0,pt.sprintf)((0,pt.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is or remove it.'),o):i?(c=(0,pt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),l.push(u)):c=(0,pt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,it.jsxs)("div",{...(0,ct.useBlockProps)({className:"has-warning"}),children:[(0,it.jsx)(ct.Warning,{actions:l,children:c}),(0,it.jsx)(gt.RawHTML,{children:(0,lu.safeHTML)(n)})]})},save:function({attributes:e}){return(0,it.jsx)(gt.RawHTML,{children:e.originalContent})}},Sh=()=>jt({name:Ch,metadata:wh,settings:jh});var Bh=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})});const Th=(0,pt.__)("Read more");const Nh=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/more","title":"More","category":"design","description":"Content before this block will be shown in the excerpt on your archives page.","keywords":["read more"],"textdomain":"default","attributes":{"customText":{"type":"string","default":"","role":"content"},"noTeaser":{"type":"boolean","default":false}},"supports":{"customClassName":false,"className":false,"html":false,"multiple":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-more-editor"}');var Ph={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:o}=e.dataset,n={};return t&&(n.customText=t),""===o&&(n.noTeaser=!0),(0,st.createBlock)("core/more",n)}}]};const{name:Ih}=Nh,Dh={icon:Bh,example:{},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;return"list-view"===t&&o?o:"accessibility"===t?e.customText:void 0},transforms:Ph,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:o,setAttributes:n}){const r=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({noTeaser:!1})},dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Hide excerpt"),isShownByDefault:!0,hasValue:()=>t,onDeselect:()=>n({noTeaser:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>n({noTeaser:!t}),help:e=>e?(0,pt.__)("The excerpt is hidden."):(0,pt.__)("The excerpt is visible.")})})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)('"Read more" text'),value:e,placeholder:Th,onChange:e=>n({customText:e}),disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,st.createBlock)((0,st.getDefaultBlockName)()))})})]})},save:function({attributes:{customText:e,noTeaser:t}}){const o=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",n=t?"\x3c!--noteaser--\x3e":"";return(0,it.jsx)(gt.RawHTML,{children:[o,n].filter(Boolean).join("\n")})}},Mh=()=>jt({name:Ih,metadata:Nh,settings:Dh});var zh=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})});const Ah=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation","title":"Navigation","category":"theme","allowedBlocks":["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],"description":"A collection of blocks that allow visitors to get around your site.","keywords":["menu","navigation","links"],"textdomain":"default","attributes":{"ref":{"type":"number"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"rgbTextColor":{"type":"string"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"rgbBackgroundColor":{"type":"string"},"showSubmenuIcon":{"type":"boolean","default":true},"openSubmenusOnClick":{"type":"boolean","default":false},"overlayMenu":{"type":"string","default":"mobile"},"icon":{"type":"string","default":"handle"},"hasIcon":{"type":"boolean","default":true},"__unstableLocation":{"type":"string"},"overlayBackgroundColor":{"type":"string"},"customOverlayBackgroundColor":{"type":"string"},"overlayTextColor":{"type":"string"},"customOverlayTextColor":{"type":"string"},"maxNestingLevel":{"type":"number","default":5},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"providesContext":{"textColor":"textColor","customTextColor":"customTextColor","backgroundColor":"backgroundColor","customBackgroundColor":"customBackgroundColor","overlayTextColor":"overlayTextColor","customOverlayTextColor":"customOverlayTextColor","overlayBackgroundColor":"overlayBackgroundColor","customOverlayBackgroundColor":"customOverlayBackgroundColor","fontSize":"fontSize","customFontSize":"customFontSize","showSubmenuIcon":"showSubmenuIcon","openSubmenusOnClick":"openSubmenusOnClick","style":"style","maxNestingLevel":"maxNestingLevel"},"supports":{"align":["wide","full"],"ariaLabel":true,"html":false,"inserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalFontFamily":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalSkipSerialization":["textDecoration"],"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"blockGap":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"allowSizingOnChildren":true,"default":{"type":"flex"}},"interactivity":true,"renaming":false,"contentRole":true},"editorStyle":"wp-block-navigation-editor","style":"wp-block-navigation"}'),Lh=window.wp.a11y;var Hh=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,it.jsx)(St.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Rh=(0,gt.forwardRef)((({icon:e,size:t=24,...o},n)=>(0,gt.cloneElement)(e,{width:t,height:t,...o,ref:n}))),Vh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});const Fh={name:"core/navigation-link",attributes:{kind:"post-type",type:"page"}},Eh=["core/navigation-link/page","core/navigation-link"],Oh={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},Gh=["postType","wp_navigation",Oh];function $h(e){const t=(0,_t.useResourcePermissions)({kind:"postType",name:"wp_navigation",id:e}),{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:r}=(0,lt.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:o,getEditedEntityRecord:n,hasFinishedResolution:r}=e(_t.store),a=["postType","wp_navigation",t],i=o(...a),s=n(...a),l=r("getEditedEntityRecord",a),c="publish"===s.status||"draft"===s.status;return{isNavigationMenuResolved:l,isNavigationMenuMissing:l&&(!i||!c),navigationMenu:c?s:null}}(t,e)),[e]),{canCreate:a,canUpdate:i,canDelete:s,isResolving:l,hasResolved:c}=t,{records:u,isResolving:d,hasResolved:p}=(0,_t.useEntityRecords)("postType","wp_navigation",Oh);return{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:r,navigationMenus:u,isResolvingNavigationMenus:d,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?u?.length>1:u?.length>0,canUserCreateNavigationMenus:a,isResolvingCanUserCreateNavigationMenus:l,hasResolvedCanUserCreateNavigationMenus:c,canUserUpdateNavigationMenu:i,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:s,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Uh(e){const{records:t,isResolving:o,hasResolved:n}=(0,_t.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:r,isResolving:a,hasResolved:i}=(0,_t.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:s,hasResolved:l}=(0,_t.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:r,isResolvingPages:a,hasResolvedPages:i,hasPages:!(!i||!r?.length),menus:t,isResolvingMenus:o,hasResolvedMenus:n,hasMenus:!(!n||!t?.length),menuItems:s,hasResolvedMenuItems:l}}var qh=({isVisible:e=!0})=>(0,it.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview",children:(0,it.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,it.jsx)(Rh,{icon:zh}),(0,pt.__)("Navigation")]})}),Wh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Zh=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:o,onCreateNew:n,actionLabel:r,createNavigationMenuIsSuccess:a,createNavigationMenuIsError:i}){const s=(0,pt.__)("Create from '%s'"),[l,c]=(0,gt.useState)(!1);r=r||s;const{menus:u}=Uh(),{navigationMenus:d,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:m,canUserCreateNavigationMenus:g,canSwitchNavigationMenu:h,isNavigationMenuMissing:_}=$h(e),[x]=(0,_t.useEntityProp)("postType","wp_navigation","title"),b=(0,gt.useMemo)((()=>d?.map((({id:e,title:t,status:o},n)=>{const a=function(e,t,o){return e?"publish"===o?(0,ao.decodeEntities)(e):(0,pt.sprintf)((0,pt.__)("%1$s (%2$s)"),(0,ao.decodeEntities)(e),o):(0,pt.sprintf)((0,pt.__)("(no title %s)"),t)}(t?.rendered,n+1,o);return{value:e,label:a,ariaLabel:(0,pt.sprintf)(r,a),disabled:l||p||!m}}))||[]),[d,r,p,m,l]),f=!!d?.length,y=!!u?.length,v=!!h,k=!!g,w=f&&!e,C=!f&&m,j=m&&null===e,S=e&&_;let B="";return B=p?(0,pt.__)("Loading…"):w||C||j||S?(0,pt.__)("Choose or create a Navigation Menu"):x,(0,gt.useEffect)((()=>{l&&(a||i)&&c(!1)}),[m,a,g,i,l,j,C,w]),(0,it.jsx)(mt.DropdownMenu,{label:B,icon:Wh,toggleProps:{size:"small"},children:({onClose:r})=>(0,it.jsxs)(it.Fragment,{children:[v&&f&&(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Menus"),children:(0,it.jsx)(mt.MenuItemsChoice,{value:e,onSelect:e=>{t(e),r()},choices:b})}),k&&y&&(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Import Classic Menus"),children:u?.map((e=>{const t=(0,ao.decodeEntities)(e.name);return(0,it.jsx)(mt.MenuItem,{onClick:async()=>{c(!0),await o(e),c(!1),r()},"aria-label":(0,pt.sprintf)(s,t),disabled:l||p||!m,children:t},e.id)}))}),g&&(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Tools"),children:(0,it.jsx)(mt.MenuItem,{onClick:async()=>{c(!0),await n(),c(!1),r()},disabled:l||p||!m,children:(0,pt.__)("Create new Menu")})})]})})};function Jh({isSelected:e,currentMenuId:t,clientId:o,canUserCreateNavigationMenus:n=!1,isResolvingCanUserCreateNavigationMenus:r,onSelectNavigationMenu:a,onSelectClassicMenu:i,onCreateEmpty:s}){const{isResolvingMenus:l,hasResolvedMenus:c}=Uh();(0,gt.useEffect)((()=>{e&&(l&&(0,Lh.speak)((0,pt.__)("Loading navigation block setup options…")),c&&(0,Lh.speak)((0,pt.__)("Navigation block setup options ready.")))}),[c,l,e]);const u=l&&r;return(0,it.jsx)(it.Fragment,{children:(0,it.jsxs)(mt.Placeholder,{className:"wp-block-navigation-placeholder",children:[(0,it.jsx)(qh,{isVisible:!e}),(0,it.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls",children:(0,it.jsxs)("div",{className:"wp-block-navigation-placeholder__actions",children:[(0,it.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,it.jsx)(Rh,{icon:zh})," ",(0,pt.__)("Navigation")]}),(0,it.jsx)("hr",{}),u&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(Zh,{currentMenuId:t,clientId:o,onSelectNavigationMenu:a,onSelectClassicMenu:i}),(0,it.jsx)("hr",{}),n&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,pt.__)("Start empty")})]})})]})})}var Qh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});function Kh({icon:e}){return"menu"===e?(0,it.jsx)(Rh,{icon:Qh}):(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,it.jsx)(St.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,it.jsx)(St.Rect,{x:"4",y:"15",width:"16",height:"1.5"})]})}function Yh({children:e,id:t,isOpen:o,isResponsive:n,onToggle:r,isHiddenByDefault:a,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:l,icon:c}){if(!n)return e;const u=Dt("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!!s?.class,[(0,ct.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!i.color||i?.class,[(0,ct.getColorClassName)("background-color",i?.slug)]:!!i?.slug,"is-menu-open":o,"hidden-by-default":a}),d={color:!s?.slug&&s?.color,backgroundColor:!i?.slug&&i?.color&&i.color},p=Dt("wp-block-navigation__responsive-container-open",{"always-shown":a}),m=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...o&&{role:"dialog","aria-modal":!0,"aria-label":(0,pt.__)("Menu")}};return(0,it.jsxs)(it.Fragment,{children:[!o&&(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,"aria-haspopup":"true","aria-label":l&&(0,pt.__)("Open menu"),className:p,onClick:()=>r(!0),children:[l&&(0,it.jsx)(Kh,{icon:c}),!l&&(0,pt.__)("Menu")]}),(0,it.jsx)("div",{className:u,style:d,id:m,children:(0,it.jsx)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1",children:(0,it.jsxs)("div",{...g,children:[(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation__responsive-container-close","aria-label":l&&(0,pt.__)("Close menu"),onClick:()=>r(!1),children:[l&&(0,it.jsx)(Rh,{icon:Vh}),!l&&(0,pt.__)("Close")]}),(0,it.jsx)("div",{className:"wp-block-navigation__responsive-container-content",id:`${m}-content`,children:e})]})})})]})}function Xh({clientId:e,hasCustomPlaceholder:t,orientation:o,templateLock:n}){const{isImmediateParentOfSelectedBlock:r,selectedBlockHasChildren:a,isSelected:i,hasSelectedDescendant:s}=(0,lt.useSelect)((t=>{const{getBlockCount:o,hasSelectedInnerBlock:n,getSelectedBlockClientId:r}=t(ct.store),a=r();return{isImmediateParentOfSelectedBlock:n(e,!1),selectedBlockHasChildren:!!o(a),hasSelectedDescendant:n(e,!0),isSelected:a===e}}),[e]),[l,c,u]=(0,_t.useEntityBlockEditor)("postType","wp_navigation"),d=i||r&&!a,p=(0,gt.useMemo)((()=>(0,it.jsx)(qh,{})),[]),m=!t&&!!!l?.length&&!i,g=(0,ct.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:l,onInput:c,onChange:u,prioritizedInserterBlocks:Eh,defaultBlock:Fh,directInsert:!0,orientation:o,templateLock:n,renderAppender:!!(i||r&&!a||s||d)&&ct.InnerBlocks.ButtonBlockAppender,placeholder:m?p:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("div",{...g})}function e_(){const[e,t]=(0,_t.useEntityProp)("postType","wp_navigation","title");return(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Menu name"),value:e,onChange:t})}const t_=(e,t,o)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(o&&o(n,e))return!0;if(!t_(e[n],t[n],o))return!1}return!0}return!1},o_={};function n_({blocks:e,createNavigationMenu:t,hasSelection:o}){const n=(0,gt.useRef)();(0,gt.useEffect)((()=>{n?.current||(n.current=e)}),[e]);const r=function(e,t){return!t_(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(n?.current,e),a=(0,gt.useContext)(mt.Disabled.Context),i=(0,ct.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!o&&void 0,defaultBlock:Fh,directInsert:!0}),{isSaving:s,hasResolvedAllNavigationMenus:l}=(0,lt.useSelect)((e=>{if(a)return o_;const{hasFinishedResolution:t,isSavingEntityRecord:o}=e(_t.store);return{isSaving:o("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",Gh)}}),[a]);(0,gt.useEffect)((()=>{!a&&!s&&l&&o&&r&&t(null,e)}),[e,t,a,s,l,r,o]);const c=s?mt.Disabled:"div";return(0,it.jsx)(c,{...i})}function r_({onDelete:e}){const[t,o]=(0,gt.useState)(!1),n=(0,_t.useEntityId)("postType","wp_navigation"),{deleteEntityRecord:r}=(0,lt.useDispatch)(_t.store);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)},children:(0,pt.__)("Delete menu")}),t&&(0,it.jsx)(mt.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{r("postType","wp_navigation",n,{force:!0}),e()},onCancel:()=>{o(!1)},confirmButtonText:(0,pt.__)("Delete"),size:"medium",children:(0,pt.__)("Are you sure you want to delete this Navigation Menu?")})]})}var a_=function({name:e,message:t=""}={}){const o=(0,gt.useRef)(),{createWarningNotice:n,removeNotice:r}=(0,lt.useDispatch)(bo.store);return[(0,gt.useCallback)((r=>{o.current||(o.current=e,n(r||t,{id:o.current,type:"snackbar"}))}),[o,n,t,e]),(0,gt.useCallback)((()=>{o.current&&(r(o.current),o.current=null)}),[o,r])]};function i_({setAttributes:e,hasIcon:t,icon:o}){return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show icon button"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>e({hasIcon:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show icon button"),help:(0,pt.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Icon"),isShownByDefault:!0,hasValue:()=>"handle"!==o,onDeselect:()=>e({icon:"handle"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,pt.__)("Icon"),value:o,onChange:t=>e({icon:t}),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,pt.__)("handle"),label:(0,it.jsx)(Kh,{icon:"handle"})}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,pt.__)("menu"),label:(0,it.jsx)(Kh,{icon:"menu"})})]})})]})}function s_(e){if(void 0===e)throw new Error('buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.');if("post-type"!==e&&"taxonomy"!==e)throw new Error(`Invalid kind "${e}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`);return{url:{source:"taxonomy"===e?"core/term-data":"core/post-data",args:{field:"link"}}}}function l_({clientId:e,attributes:t}){const{updateBlockBindings:o}=(0,ct.useBlockBindingsUtils)(e),{metadata:n,id:r,kind:a}=t,i=!!n?.bindings?.url&&!!r,s="post-type"===a?"core/post-data":"core/term-data";return{hasUrlBinding:i&&n?.bindings?.url?.source===s,clearBinding:(0,gt.useCallback)((()=>{i&&o({url:void 0})}),[o,i,n,r]),createBinding:(0,gt.useCallback)((e=>{const t=e?.kind??a;if(t)try{const e=s_(t);o(e)}catch(e){console.warn("Failed to create entity binding:",e.message)}}),[o,a,r])}}function c_(e){if(!e)return null;const t=u_(function(e,t="id",o="parent"){const n=Object.create(null),r=[];for(const a of e)n[a[t]]={...a,children:[]},a[o]?(n[a[o]]=n[a[o]]||{},n[a[o]].children=n[a[o]].children||[],n[a[o]].children.push(n[a[t]])):r.push(n[a[t]]);return r}(e));return(0,vl.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function u_(e,t=0){let o={};const n=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),r=n.map((e=>{if("block"===e.type){const[t]=(0,st.parse)(e.content.raw);return t||(0,st.createBlock)("core/freeform",{content:e.content})}const n=e.children?.length?"core/navigation-submenu":"core/navigation-link",r=function({title:e,xfn:t,classes:o,attr_title:n,object:r,object_id:a,description:i,url:s,type:l,target:c},u,d){r&&"post_tag"===r&&(r="tag");const p=l?.replace("_","-")||"custom";return{label:e?.rendered||"",...r?.length&&{type:r},kind:p,url:s||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...o?.length&&o.join(" ").trim()&&{className:o.join(" ").trim()},...n?.length&&{title:n},...a&&("post-type"===p||"taxonomy"===p)&&{id:a,metadata:{bindings:s_(p)}},...i?.length&&{description:i},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===u&&{isTopLevelItem:0===d},..."core/navigation-link"===u&&{isTopLevelLink:0===d}}}(e,n,t),{innerBlocks:a=[],mapping:i={}}=e.children?.length?u_(e.children,t+1):{};o={...o,...i};const s=(0,st.createBlock)(n,r,a);return o[e.id]=s.clientId,s}));return{innerBlocks:r,mapping:o}}const d_="success",p_="error",m_="pending";let g_=null;var h_=function(e,{throwOnError:t=!1}={}){const o=(0,lt.useRegistry)(),{editEntityRecord:n}=(0,lt.useDispatch)(_t.store),[r,a]=(0,gt.useState)("idle"),[i,s]=(0,gt.useState)(null),l=(0,gt.useCallback)((async(t,r,a="publish")=>{let i,s;try{s=await o.resolveSelect(_t.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,pt.sprintf)((0,pt.__)('Unable to fetch classic menu "%s" from API.'),r),{cause:e})}if(null===s)throw new Error((0,pt.sprintf)((0,pt.__)('Unable to fetch classic menu "%s" from API.'),r));const{innerBlocks:l}=c_(s);try{i=await e(r,l,a),await n("postType","wp_navigation",i.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,pt.sprintf)((0,pt.__)('Unable to create Navigation Menu "%s".'),r),{cause:e})}return i}),[e,n,o]);return{convert:(0,gt.useCallback)((async(e,o,n)=>{if(g_!==e)return g_=e,e&&o?(a(m_),s(null),await l(e,o,n).then((e=>(a(d_),g_=null,e))).catch((e=>{if(s(e?.message),a(p_),g_=null,t)throw new Error((0,pt.sprintf)((0,pt.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}))):(s("Unable to convert menu. Missing menu details."),void a(p_))}),[l,t]),status:r,error:i}};function __(e,t){return e&&t?e+"//"+t:null}var x_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),b_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),f_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),y_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const v_=e=>"header"===e?x_:"footer"===e?b_:"sidebar"===e?f_:y_;const k_=["postType","wp_navigation",{status:"draft",per_page:-1}],w_=["postType","wp_navigation",{per_page:-1,status:"publish"}];function C_(e){const t=(0,gt.useContext)(mt.Disabled.Context),o=function(e){return(0,lt.useSelect)((t=>{if(!e)return;const{getBlock:o,getBlockParentsByBlockName:n}=t(ct.store),r=n(e,"core/template-part",!0);if(!r?.length)return;const{getCurrentTheme:a,getEditedEntityRecord:i}=t(_t.store),s=a(),l=(s?.default_template_part_areas||[]).map((e=>({...e,icon:v_(e.icon)})));for(const e of r){const t=o(e),{theme:n=s?.stylesheet,slug:r}=t.attributes,a=i("postType","wp_template_part",__(n,r));if(a?.area)return l.find((e=>"uncategorized"!==e.area&&e.area===a.area))?.label}}),[e])}(t?void 0:e),n=(0,lt.useRegistry)();return(0,gt.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=n.resolveSelect(_t.store),[r,a]=await Promise.all([e(...k_),e(...w_)]),i=o?(0,pt.sprintf)((0,pt.__)("%s menu"),o):(0,pt.__)("Menu"),s=[...r,...a].reduce(((e,t)=>t?.title?.raw?.startsWith(i)?e+1:e),0);return(s>0?`${i} ${s+1}`:i)||""}),[t,o,n])}const j_="success",S_="error",B_="pending",T_="idle";const N_=[];function P_(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function I_(e,t,o){if(!e)return;t(P_(e).color);let n=e,r=P_(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=P_(n).backgroundColor;o(r)}function D_(e,t){const{textColor:o,customTextColor:n,backgroundColor:r,customBackgroundColor:a,overlayTextColor:i,customOverlayTextColor:s,overlayBackgroundColor:l,customOverlayBackgroundColor:c,style:u}=e,d={};return t&&s?d.customTextColor=s:t&&i?d.textColor=i:n?d.customTextColor=n:o?d.textColor=o:u?.color?.text&&(d.customTextColor=u.color.text),t&&c?d.customBackgroundColor=c:t&&l?d.backgroundColor=l:a?d.customBackgroundColor=a:r?d.backgroundColor=r:u?.color?.background&&(d.customTextColor=u.color.background),d}function M_(e){return{className:Dt("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}var z_=({className:e="",disabled:t,isMenuItem:o=!1})=>{let n=mt.Button;return o&&(n=mt.MenuItem),(0,it.jsx)(n,{variant:"link",disabled:t,className:e,href:(0,no.addQueryArgs)("edit.php",{post_type:"wp_navigation"}),children:(0,pt.__)("Manage menus")})};var A_=function({onCreateNew:e,isNotice:t=!1}){const[o,n]=(0,gt.useState)(!1),r=(0,gt.createInterpolateElement)((0,pt.__)("Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"),{button:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{n(!0),e()},variant:"link",disabled:o,accessibleWhenDisabled:!0})});return t?(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:r}):(0,it.jsx)(ct.Warning,{children:r})},L_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})}),H_=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});const R_={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},V_=["core/navigation-link","core/navigation-submenu"];function F_({block:e,onClose:t,expandedState:o,expand:n,setInsertedBlock:r}){const{insertBlock:a,replaceBlock:i,replaceInnerBlocks:s}=(0,lt.useDispatch)(ct.store),l=e.clientId,c=!V_.includes(e.name);return(0,it.jsx)(mt.MenuItem,{icon:L_,disabled:c,onClick:()=>{const c=!1,u=(0,st.createBlock)(Fh.name,Fh.attributes);if("core/navigation-submenu"===e.name)a(u,e.innerBlocks.length,l,c);else{const t=(0,st.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);i(l,t),s(t.clientId,[u],c)}r(u),o[e.clientId]||n(e.clientId),t()},children:(0,pt.__)("Add submenu link")})}function E_(e){const{block:t}=e,{clientId:o}=t,{moveBlocksDown:n,moveBlocksUp:r,removeBlocks:a}=(0,lt.useDispatch)(ct.store),i=(0,pt.sprintf)((0,pt.__)("Remove %s"),(0,ct.BlockTitle)({clientId:o,maximumLength:25})),s=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t}=e(ct.store);return t(o)}),[o]);return(0,it.jsx)(mt.DropdownMenu,{icon:Wh,label:(0,pt.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:R_,noIcons:!0,...e,children:({onClose:l})=>(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.MenuGroup,{children:[(0,it.jsx)(mt.MenuItem,{icon:H_,onClick:()=>{r([o],s),l()},children:(0,pt.__)("Move up")}),(0,it.jsx)(mt.MenuItem,{icon:$p,onClick:()=>{n([o],s),l()},children:(0,pt.__)("Move down")}),(0,it.jsx)(F_,{block:t,onClose:l,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,it.jsx)(mt.MenuGroup,{children:(0,it.jsx)(mt.MenuItem,{onClick:()=>{a([o],!1),l()},children:i})})]})})}var O_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),G_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),$_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});function U_({className:e,onBack:t}){return(0,it.jsx)(mt.Button,{className:e,icon:(0,pt.isRTL)()?G_:$_,onClick:e=>{e.preventDefault(),t()},size:"small",children:(0,pt.__)("Back")})}var q_=function e({className:t,title:o,description:n,onBack:r,children:a}){const i=(0,xt.useInstanceId)(e,"link-ui-dialog-title"),s=(0,xt.useInstanceId)(e,"link-ui-dialog-description"),l=(0,xt.useFocusOnMount)("firstElement"),c=`${t}__back`;return(0,it.jsxs)("div",{className:t,role:"dialog","aria-labelledby":i,"aria-describedby":s,ref:l,children:[(0,it.jsxs)(mt.VisuallyHidden,{children:[(0,it.jsx)("h2",{id:i,children:o}),(0,it.jsx)("p",{id:s,children:n})]}),(0,it.jsx)(U_,{className:c,onBack:r}),a]})};function W_({postType:e,onBack:t,onPageCreated:o,initialTitle:n=""}){const[r,a]=(0,gt.useState)(n),[i,s]=(0,gt.useState)(!1),l=r.trim().length>0,{lastError:c,isSaving:u}=(0,lt.useSelect)((t=>({lastError:t(_t.store).getLastEntitySaveError("postType",e),isSaving:t(_t.store).isSavingEntityRecord("postType",e)})),[e]),{saveEntityRecord:d}=(0,lt.useDispatch)(_t.store);const p=u||!l;return(0,it.jsx)(q_,{className:"link-ui-page-creator",title:(0,pt.__)("Create page"),description:(0,pt.__)("Create a new page to add to your Navigation."),onBack:t,children:(0,it.jsx)(mt.__experimentalVStack,{className:"link-ui-page-creator__inner",spacing:4,children:(0,it.jsx)("form",{onSubmit:async function(t){if(t.preventDefault(),!u&&l)try{const t=await d("postType",e,{title:r,status:i?"publish":"draft"},{throwOnError:!0});if(t){const n={id:t.id,type:e,title:(0,ao.decodeEntities)(t.title.rendered),url:t.link,kind:"post-type"};o(n)}}catch(e){}},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title"),onChange:a,placeholder:(0,pt.__)("No title"),value:r}),(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Publish immediately"),help:(0,pt.__)("If unchecked, the page will be created as a draft."),checked:i,onChange:s}),c&&(0,it.jsx)(mt.Notice,{status:"error",isDismissible:!1,children:c.message}),(0,it.jsxs)(mt.__experimentalHStack,{spacing:2,justify:"flex-end",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:u,accessibleWhenDisabled:!0,children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:u,"aria-disabled":p,children:(0,pt.__)("Create page")})]})]})})})})}const{PrivateQuickInserter:Z_}=jo(ct.privateApis);var J_=function({clientId:e,onBack:t,onBlockInsert:o}){const{rootBlockClientId:n}=(0,lt.useSelect)((t=>{const{getBlockRootClientId:o}=t(ct.store);return{rootBlockClientId:o(e)}}),[e]);return e?(0,it.jsx)(q_,{className:"link-ui-block-inserter",title:(0,pt.__)("Add block"),description:(0,pt.__)("Choose a block to add to your Navigation."),onBack:t,children:(0,it.jsx)(Z_,{rootClientId:n,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!o,onSelect:o||void 0,hasSearch:!1})}):null};function Q_(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}const K_=(0,gt.forwardRef)((function(e,t){const{label:o,url:n,opensInNewTab:r,type:a,kind:i,id:s,metadata:l}=e.link,c=a||"page",[u,d]=(0,gt.useState)(!1),[p,m]=(0,gt.useState)(!1),[g,h]=(0,gt.useState)(!1),[_,x]=(0,gt.useState)(!1),b=(0,_t.useResourcePermissions)({kind:"postType",name:c}),f=("core/post-data"===l?.bindings?.url?.source||"core/term-data"===l?.bindings?.url?.source)&&!!s,y=(0,gt.useMemo)((()=>({url:n,opensInNewTab:r,title:o&&(0,lu.__unstableStripHTML)(o),kind:i,type:a,id:s})),[o,r,n,i,a,s]),v=(0,xt.useInstanceId)(K_,"link-ui-link-control__title"),k=(0,xt.useInstanceId)(K_,"link-ui-link-control__description"),w=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(mt.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!u&&!p&&(0,it.jsxs)("div",{role:"dialog","aria-labelledby":v,"aria-describedby":k,children:[(0,it.jsxs)(mt.VisuallyHidden,{children:[(0,it.jsx)("h2",{id:v,children:(0,pt.__)("Add link")}),(0,it.jsx)("p",{id:k,children:(0,pt.__)("Search for and add a link to your Navigation.")})]}),(0,it.jsx)(ct.LinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:y,showInitialSuggestions:!0,withCreateSuggestion:!1,noDirectEntry:!!a,noURLSuggestion:!!a,suggestionsQuery:Q_(a,i),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,handleEntities:f,renderControlBottom:()=>y?.url?.length?null:(0,it.jsx)(Y_,{focusAddBlockButton:g,focusAddPageButton:_,setAddingBlock:()=>{d(!0),h(!1)},setAddingPage:()=>{m(!0),x(!1)},canAddPage:b?.canCreate&&"page"===a,canAddBlock:"default"===w})})]}),u&&(0,it.jsx)(J_,{clientId:e.clientId,onBack:()=>{d(!1),h(!0),x(!1)},onBlockInsert:e?.onBlockInsert}),p&&(0,it.jsx)(W_,{postType:c,onBack:()=>{m(!1),x(!0),h(!1)},onPageCreated:t=>{e.onChange(t),m(!1)},initialTitle:y?.url||""})]})})),Y_=({setAddingBlock:e,setAddingPage:t,focusAddBlockButton:o,focusAddPageButton:n,canAddPage:r,canAddBlock:a})=>{const i="listbox",s=(0,gt.useRef)(),l=(0,gt.useRef)();return(0,gt.useEffect)((()=>{o&&s.current?.focus()}),[o]),(0,gt.useEffect)((()=>{n&&l.current?.focus()}),[n]),r||a?(0,it.jsxs)(mt.__experimentalVStack,{spacing:0,className:"link-ui-tools",children:[r&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,ref:l,icon:O_,onClick:e=>{e.preventDefault(),t(!0)},"aria-haspopup":i,children:(0,pt.__)("Create page")}),a&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,ref:s,icon:O_,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":i,children:(0,pt.__)("Add block")})]}):null};const X_=window.wp.escapeHtml,ex=(e={},t,o={})=>{const{label:n="",kind:r="",type:a=""}=o,{title:i="",label:s="",url:l,opensInNewTab:c,id:u,kind:d=r,type:p=a}=e,m=i||s,g=m.replace(/http(s?):\/\//gi,""),h=l?.replace(/http(s?):\/\//gi,"")??"",_=m&&m!==n&&g!==h?(0,X_.escapeHTML)(m):n||(0,X_.escapeHTML)(h),x="post_tag"===p?"tag":p.replace("-","_"),b=["post","page","tag","category"].indexOf(x)>-1,f=!d&&!b||"custom"===d?"custom":d,y={...void 0!==l?{url:l?encodeURI((0,no.safeDecodeURI)(l)):l}:{},..._&&{label:_},...void 0!==c&&{opensInNewTab:c},...f&&{kind:f},...x&&"URL"!==x&&{type:x}};if(l&&!u&&o.id){const e=((e,t)=>{if(!e||!t)return!1;const o=e=>e?e.replace(/\/+$/,""):"",n=(e,t=null)=>{try{const o=t||("undefined"!=typeof window?window.location.origin:"https://wordpress.org");return new URL(e,o)}catch(e){return null}},r=n(e);if(!r)return!0;const a=n(t,e);if(!a)return!0;const i=r.hostname,s=a.hostname,l=o((0,no.getPath)(r.toString())),c=o((0,no.getPath)(a.toString()));if(i!==s||l!==c)return!0;const u=r.searchParams.get("p"),d=a.searchParams.get("p");if(u&&d&&u!==d)return!0;const p=r.searchParams.get("page_id"),m=a.searchParams.get("page_id");return!(!p||!m||p===m)||!!(u&&m||p&&d)})(o.url,l);e&&(y.id=void 0,y.kind="custom",y.type="custom")}else u&&Number.isInteger(u)?y.id=u:o.id&&(y.kind=f,y.type=x);t(y);const v="id"in y?y.id:o.id,k="kind"in y?y.kind:o.kind;return{isEntityLink:!!v&&"custom"!==k,attributes:y}},tx=(0,pt.__)("Switch to '%s'"),ox=["core/navigation-link","core/navigation-submenu"],{PrivateListView:nx}=jo(ct.privateApis);function rx({block:e,insertedBlock:t,setInsertedBlock:o}){const{updateBlockAttributes:n,removeBlock:r}=(0,lt.useDispatch)(ct.store),a=ox?.includes(t?.name),i=t?.clientId===e.clientId,s=a&&i,{createBinding:l,clearBinding:c}=l_({clientId:t?.clientId,attributes:t?.attributes||{}});if(!s)return null;return(0,it.jsx)(K_,{clientId:t?.clientId,link:t?.attributes,onBlockInsert:e=>{t?.clientId&&e&&r(t.clientId,false),o(e)},onClose:()=>{!t?.attributes?.url&&t?.clientId&&r(t.clientId,!1),o(null)},onChange:e=>{const{isEntityLink:r,attributes:a}=ex(e,(i=t?.clientId,e=>{i&&n(i,e)}),t?.attributes);var i;r?l(a):c(a),o(null)}})}const ax=({clientId:e,currentMenuId:t,isLoading:o,isNavigationMenuMissing:n,onCreateNew:r})=>{const a=(0,lt.useSelect)((t=>!!t(ct.store).getBlockCount(e)),[e]),{navigationMenu:i}=$h(t);if(t&&n)return(0,it.jsx)(A_,{onCreateNew:r,isNotice:!0});if(o)return(0,it.jsx)(mt.Spinner,{});const s=i?(0,pt.sprintf)((0,pt.__)("Structure for Navigation Menu: %s"),i?.title||(0,pt.__)("Untitled menu")):(0,pt.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,it.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!a&&(0,it.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,pt.__)("This Navigation Menu is empty.")}),(0,it.jsx)(nx,{rootClientId:e,isExpanded:!0,description:s,showAppender:!0,blockSettingsMenu:E_,additionalBlockContent:rx})]})};var ix=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,currentMenuId:n=null,onCreateNew:r,onSelectClassicMenu:a,onSelectNavigationMenu:i,isManageMenusButtonDisabled:s,blockEditingMode:l}=e;return(0,it.jsx)(ct.InspectorControls,{group:"list",children:(0,it.jsxs)(mt.PanelBody,{title:null,children:[(0,it.jsxs)(mt.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,it.jsx)(mt.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:(0,pt.__)("Menu")}),"default"===l&&(0,it.jsx)(Zh,{currentMenuId:n,onSelectClassicMenu:a,onSelectNavigationMenu:i,onCreateNew:r,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,actionLabel:tx,isManageMenusButtonDisabled:s})]}),(0,it.jsx)(ax,{...e})]})})};function sx({id:e,children:t}){return(0,it.jsx)(mt.VisuallyHidden,{children:(0,it.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}function lx({id:e}){const[t]=(0,_t.useEntityProp)("postType","wp_navigation","title"),o=(0,pt.sprintf)((0,pt.__)('Navigation Menu: "%s"'),t);return(0,it.jsx)(sx,{id:e,children:o})}function cx({clientId:e}){const{insertBlock:t}=(0,lt.useDispatch)(ct.store),{getBlockCount:o}=(0,lt.useSelect)(ct.store),n=(0,gt.useCallback)((()=>{const n=o(e),r=(0,st.createBlock)(Fh.name,{kind:Fh.attributes.kind,type:Fh.attributes.type});t(r,n,e)}),[e,t,o]);return(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{name:"add-page",icon:Hh,onClick:n,children:(0,pt.__)("Add page")})})})}function ux({textColor:e,setTextColor:t,backgroundColor:o,setBackgroundColor:n,overlayTextColor:r,setOverlayTextColor:a,overlayBackgroundColor:i,setOverlayBackgroundColor:s,clientId:l,navRef:c}){const[u,d]=(0,gt.useState)(),[p,m]=(0,gt.useState)(),[g,h]=(0,gt.useState)(),[_,x]=(0,gt.useState)(),b="web"===gt.Platform.OS;(0,gt.useEffect)((()=>{if(!b)return;I_(c.current,m,d);const e=c.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(r.color||i.color)&&I_(e,x,h)}),[b,r.color,i.color,c]);const f=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return f.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:e.color,label:(0,pt.__)("Text"),onColorChange:t,resetAllFilter:()=>t(),clearable:!0,enableAlpha:!0},{colorValue:o.color,label:(0,pt.__)("Background"),onColorChange:n,resetAllFilter:()=>n(),clearable:!0,enableAlpha:!0},{colorValue:r.color,label:(0,pt.__)("Submenu & overlay text"),onColorChange:a,resetAllFilter:()=>a(),clearable:!0,enableAlpha:!0},{colorValue:i.color,label:(0,pt.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s(),clearable:!0,enableAlpha:!0}],panelId:l,...f,gradients:[],disableCustomGradients:!0}),b&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.ContrastChecker,{backgroundColor:u,textColor:p}),(0,it.jsx)(ct.ContrastChecker,{backgroundColor:g,textColor:_})]})]}):null}var dx=(0,ct.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:o,isSelected:n,className:r,backgroundColor:a,setBackgroundColor:i,textColor:s,setTextColor:l,overlayBackgroundColor:c,setOverlayBackgroundColor:u,overlayTextColor:d,setOverlayTextColor:p,hasSubmenuIndicatorSetting:m=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:_,overlayMenu:x,showSubmenuIcon:b,templateLock:f,layout:{justifyContent:y,orientation:v="horizontal",flexWrap:k="wrap"}={},hasIcon:w,icon:C="handle"}=e,j=e.ref,S=(0,gt.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${j}`,T=(0,ct.useHasRecursion)(B),N=(0,ct.useBlockEditingMode)(),{menus:P}=Uh(),[I,D]=a_({name:"block-library/core/navigation/status"}),[M,z]=a_({name:"block-library/core/navigation/classic-menu-conversion"}),[A,L]=a_({name:"block-library/core/navigation/permissions/update"}),{create:H,status:R,error:V,value:F,isPending:E,isSuccess:O,isError:G}=function(e){const[t,o]=(0,gt.useState)(T_),[n,r]=(0,gt.useState)(null),[a,i]=(0,gt.useState)(null),{saveEntityRecord:s,editEntityRecord:l}=(0,lt.useDispatch)(_t.store),c=C_(e);return{create:(0,gt.useCallback)((async(e=null,t=[],n)=>{if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(S_),new Error("Value of supplied title argument was not a string.");o(B_),r(null),i(null),e||(e=await c().catch((e=>{throw i(e?.message),o(S_),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const a={title:e,content:(0,st.serialize)(t),status:n};return s("postType","wp_navigation",a).then((e=>(r(e),o(j_),"publish"!==n&&l("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw i(e?.message),o(S_),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[s,l,c]),status:t,value:n,error:a,isIdle:t===T_,isPending:t===B_,isSuccess:t===j_,isError:t===S_}}(o),$=async()=>{await H("")},{hasUncontrolledInnerBlocks:U,uncontrolledInnerBlocks:q,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,lt.useSelect)((t=>{const{getBlock:o,getBlocks:n,hasSelectedInnerBlock:r}=t(ct.store),a=o(e).innerBlocks,i=!!a?.length,s=i?N_:n(e);return{innerBlocks:i?a:s,hasUncontrolledInnerBlocks:i,uncontrolledInnerBlocks:a,controlledInnerBlocks:s,isInnerBlockSelected:r(e,!0)}}),[e])}(o),J=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:Q,selectBlock:K,__unstableMarkNextChangeAsNotPersistent:Y}=(0,lt.useDispatch)(ct.store),[X,ee]=(0,gt.useState)(!1),[te,oe]=(0,gt.useState)(!1),{hasResolvedNavigationMenus:ne,isNavigationMenuResolved:re,isNavigationMenuMissing:ae,canUserUpdateNavigationMenu:ie,hasResolvedCanUserUpdateNavigationMenu:se,canUserDeleteNavigationMenu:le,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,hasResolvedCanUserCreateNavigationMenus:pe}=$h(j),me=ne&&ae,{convert:ge,status:he,error:_e}=h_(H),xe=he===m_,be=(0,gt.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:n}=t;S(e),n&&K(o)}),[K,o,S]),fe=!ae&&re,ye=U&&!fe,{getNavigationFallbackId:ve}=jo((0,lt.useSelect)(_t.store)),ke=j||ye?null:ve();(0,gt.useEffect)((()=>{j||ye||!ke||(Y(),S(ke))}),[j,S,ye,ke,Y]);const we=(0,gt.useRef)(),Ce="nav",je=!j&&!E&&!xe&&ne&&0===P?.length&&!U,Se=!ne||E||xe||!(!j||fe||xe),Be=e.style?.typography?.textDecoration,Te=(0,lt.useSelect)((e=>e(ct.store).__unstableHasActiveBlockOverlayActive(o)),[o]),Ne="never"!==x,Pe=(0,ct.useBlockProps)({ref:we,className:Dt(r,{"items-justified-right":"right"===y,"items-justified-space-between":"space-between"===y,"items-justified-left":"left"===y,"items-justified-center":"center"===y,"is-vertical":"vertical"===v,"no-wrap":"nowrap"===k,"is-responsive":Ne,"has-text-color":!!s.color||!!s?.class,[(0,ct.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!a.color||a.class,[(0,ct.getColorClassName)("background-color",a?.slug)]:!!a?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te},h),style:{color:!s?.slug&&s?.color,backgroundColor:!a?.slug&&a?.color}}),Ie=async e=>ge(e.id,e.name,"draft"),De=e=>{be(e)};(0,gt.useEffect)((()=>{D(),E&&(0,Lh.speak)((0,pt.__)("Creating Navigation Menu.")),O&&(be(F?.id,{focusNavigationBlock:!0}),I((0,pt.__)("Navigation Menu successfully created."))),G&&I((0,pt.__)("Failed to create Navigation Menu."))}),[R,V,F?.id,G,O,E,be,D,I]),(0,gt.useEffect)((()=>{z(),he===m_&&(0,Lh.speak)((0,pt.__)("Classic menu importing.")),he===d_&&(M((0,pt.__)("Classic menu imported successfully.")),be(F?.id,{focusNavigationBlock:!0})),he===p_&&M((0,pt.__)("Classic menu import failed."))}),[he,_e,z,M,F?.id,be]),(0,gt.useEffect)((()=>{n||W||L(),(n||W)&&(j&&!me&&se&&!ie&&A((0,pt.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),j||!pe||ue||A((0,pt.__)("You do not have permission to create Navigation Menus.")))}),[n,W,ie,se,ue,pe,j,L,A,me]);const Me=ue||ie,ze=Dt("wp-block-navigation__overlay-menu-preview",{open:te}),Ae=b||_?"":(0,pt.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),Le=(0,gt.useRef)(!0);(0,gt.useEffect)((()=>{!Le.current&&Ae&&(0,Lh.speak)(Ae),Le.current=!1}),[Ae]);const He=(0,xt.useInstanceId)(i_,"overlay-menu-preview"),Re=vt(),Ve=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:m&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Display"),resetAll:()=>{t({showSubmenuIcon:!0,openSubmenusOnClick:!1,overlayMenu:"mobile",hasIcon:!0,icon:"handle"})},dropdownMenuProps:Re,children:[Ne&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,className:ze,onClick:()=>{oe(!te)},"aria-label":(0,pt.__)("Overlay menu controls"),"aria-controls":He,"aria-expanded":te,children:[w&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Kh,{icon:C}),(0,it.jsx)(Rh,{icon:Vh})]}),!w&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("span",{children:(0,pt.__)("Menu")}),(0,it.jsx)("span",{children:(0,pt.__)("Close")})]})]}),te&&(0,it.jsx)(mt.__experimentalVStack,{id:He,spacing:4,style:{gridColumn:"span 2"},children:(0,it.jsx)(i_,{setAttributes:t,hasIcon:w,icon:C,hidden:!te})})]}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"mobile"!==x,label:(0,pt.__)("Overlay Menu"),onDeselect:()=>t({overlayMenu:"mobile"}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay Menu"),"aria-label":(0,pt.__)("Configure overlay menu"),value:x,help:(0,pt.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"never",label:(0,pt.__)("Off")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,pt.__)("Mobile")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"always",label:(0,pt.__)("Always")})]})}),J&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("h3",{className:"wp-block-navigation__submenu-header",children:(0,pt.__)("Submenus")}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>_,label:(0,pt.__)("Open on click"),onDeselect:()=>t({openSubmenusOnClick:!1,showSubmenuIcon:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:_,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,pt.__)("Open on click")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!b,label:(0,pt.__)("Show arrow"),onDeselect:()=>t({showSubmenuIcon:!0}),isDisabled:e.openSubmenusOnClick,isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,pt.__)("Show arrow")})}),Ae&&(0,it.jsx)(mt.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,className:"wp-block-navigation__submenu-accessibility-notice",children:Ae})]})]})}),(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(ux,{textColor:s,setTextColor:l,backgroundColor:a,setBackgroundColor:i,overlayTextColor:d,setOverlayTextColor:p,overlayBackgroundColor:c,setOverlayBackgroundColor:u,clientId:o,navRef:we})})]}),Fe=`${o}-desc`,Ee="always"===x,Oe=!Me||!ne;if(ye&&!E)return(0,it.jsxs)(Ce,{...Pe,"aria-describedby":je?void 0:Fe,children:[(0,it.jsx)(sx,{id:Fe,children:(0,pt.__)("Unsaved Navigation Menu.")}),(0,it.jsx)(ix,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),"default"===N&&Ve,(0,it.jsx)(Yh,{id:o,onToggle:ee,isOpen:X,hasIcon:w,icon:C,isResponsive:Ne,isHiddenByDefault:Ee,overlayBackgroundColor:c,overlayTextColor:d,children:(0,it.jsx)(n_,{createNavigationMenu:H,blocks:q,hasSelection:n||W})})]});if(j&&ae)return(0,it.jsxs)(Ce,{...Pe,children:[(0,it.jsx)(ix,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),(0,it.jsx)(A_,{onCreateNew:$})]});if(fe&&T)return(0,it.jsx)("div",{...Pe,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})});const Ge=g||Jh;return je&&g?(0,it.jsx)(Ce,{...Pe,children:(0,it.jsx)(Ge,{isSelected:n,currentMenuId:j,clientId:o,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,onSelectNavigationMenu:De,onSelectClassicMenu:Ie,onCreateEmpty:$})}):(0,it.jsx)(_t.EntityProvider,{kind:"postType",type:"wp_navigation",id:j,children:(0,it.jsxs)(ct.RecursionProvider,{uniqueId:B,children:[(0,it.jsx)(ix,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),"default"===N&&Ve,"contentOnly"===N&&fe&&(0,it.jsx)(cx,{clientId:o}),"default"===N&&fe&&(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[se&&ie&&(0,it.jsx)(e_,{}),ce&&le&&(0,it.jsx)(r_,{onDelete:()=>{Q(o,[]),I((0,pt.__)("Navigation Menu successfully deleted."))}}),(0,it.jsx)(z_,{disabled:Oe,className:"wp-block-navigation-manage-menus-button"})]}),(0,it.jsxs)(Ce,{...Pe,"aria-describedby":je||Se?void 0:Fe,children:[Se&&!Ee&&(0,it.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,it.jsx)(mt.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Se||Ee)&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(lx,{id:Fe}),(0,it.jsx)(Yh,{id:o,onToggle:ee,hasIcon:w,icon:C,isOpen:X,isResponsive:Ne,isHiddenByDefault:Ee,overlayBackgroundColor:c,overlayTextColor:d,children:fe&&(0,it.jsx)(Xh,{clientId:o,hasCustomPlaceholder:!!g,templateLock:f,orientation:v})})]})]})]})})}));const px={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},mx=({navigationMenuId:e,...t})=>({...t,ref:e}),gx=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:o,...n}=e;return(t||o)&&Object.assign(n,{layout:{type:"flex",...t&&{justifyContent:t},...o&&{orientation:o}}}),n},hx={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),isEligible:({navigationMenuId:e})=>!!e,migrate:mx},_x={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,xt.compose)(mx,gx)},xx={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),migrate:(0,xt.compose)(mx,gx,Yo),isEligible:({style:e})=>e?.typography?.fontFamily},bx=[hx,_x,xx,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,xt.compose)(mx,gx,Yo,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in px){const o=e.style.typography[t];if(o&&o.startsWith(px[t]))return!0}return!1},migrate:(0,xt.compose)(mx,gx,Yo,(function(e){return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(e.style.typography??{}).map((([e,t])=>{const o=px[e];if(o&&t.startsWith(o)){const n=t.slice(o.length);return"textDecoration"===e&&"strikethrough"===n?[e,"line-through"]:[e,n]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,xt.compose)(mx,(e=>{const{rgbTextColor:t,rgbBackgroundColor:o,...n}=e;return{...n,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})}];var fx=bx;const{name:yx}=Ah,vx={icon:zh,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,pt.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,pt.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,pt.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:dx,save:function({attributes:e}){if(!e.ref)return(0,it.jsx)(ct.InnerBlocks.Content,{})},__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,lt.select)(_t.store).getEditedEntityRecord("postType","wp_navigation",e);return t?.title?(0,ao.decodeEntities)(t.title):void 0},deprecated:fx},kx=()=>jt({name:yx,metadata:Ah,settings:vx}),wx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-link","title":"Custom Link","category":"design","parent":["core/navigation"],"allowedBlocks":["core/navigation-link","core/navigation-submenu","core/page-list"],"description":"Add a page, link, or another item to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelLink":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],"supports":{"reusable":false,"html":false,"__experimentalSlashInserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-link-editor","style":"wp-block-navigation-link"}');function Cx({attributes:e,setAttributes:t,clientId:o}){const{label:n,url:r,description:a,rel:i,opensInNewTab:s}=e,l=(0,gt.useRef)(r),c=vt(),u=(0,xt.useInstanceId)(Cx,"link-input"),d=`${u}__help`,{hasUrlBinding:p,clearBinding:m}=l_({clientId:o,attributes:e}),{updateBlockAttributes:g}=(0,lt.useDispatch)(ct.store);return(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({label:"",url:"",description:"",rel:"",opensInNewTab:!1})},dropdownMenuProps:c,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Text"),value:n?(0,lu.__unstableStripHTML)(n):"",onChange:e=>{t({label:e})},autoComplete:"off"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,pt.__)("Link"),onDeselect:()=>t({url:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalInputControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,id:u,label:(0,pt.__)("Link"),value:r?(0,no.safeDecodeURI)(r):"",onChange:e=>{p||t({url:encodeURI((0,no.safeDecodeURI)(e))})},autoComplete:"off",type:"url",disabled:p,onFocus:()=>{p||(l.current=r)},onBlur:()=>{p||ex({url:r||l.current},t,{...e,url:l.current})},help:p&&(0,it.jsx)(jx,{type:e.type,kind:e.kind}),suffix:p&&(0,it.jsx)(mt.Button,{icon:hn,onClick:()=>{m(),g(o,{url:"",id:void 0})},"aria-describedby":d,showTooltip:!0,label:(0,pt.__)("Unsync and edit"),__next40pxDefaultSize:!0})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Open in new tab"),onDeselect:()=>t({opensInNewTab:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),checked:s,onChange:e=>t({opensInNewTab:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,pt.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Description"),value:a||"",onChange:e=>{t({description:e})},help:(0,pt.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Rel attribute"),onDeselect:()=>t({rel:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Rel attribute"),value:i||"",onChange:e=>{t({rel:e})},autoComplete:"off",help:(0,pt.__)("The relationship of the linked URL as space-separated link types.")})})]})}function jx({type:e,kind:t}){const o=function(e,t){if("post-type"===t)switch(e){case"post":return(0,pt.__)("post");case"page":return(0,pt.__)("page");default:return e||(0,pt.__)("post")}if("taxonomy"===t)switch(e){case"category":return(0,pt.__)("category");case"tag":return(0,pt.__)("tag");default:return e||(0,pt.__)("term")}return e||(0,pt.__)("item")}(e,t);return(0,pt.sprintf)((0,pt.__)("Synced with the selected %s."),o)}const Sx={name:"core/navigation-link"},Bx=["core/navigation-link","core/navigation-submenu"];var Tx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),Nx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})});function Px(e){switch(e){case"post":return xm;case"page":return Hh;case"tag":return Tx;case"category":return Un;default:return Nx}}function Ix(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,o=e.variations.map((e=>({...e,...!e.icon&&{icon:Px(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:o}}return e}const Dx={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,st.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,st.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,st.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,st.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,st.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,st.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,st.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,st.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:o,title:n,opensInNewTab:r})=>(0,st.createBlock)("core/buttons",{},[(0,st.createBlock)("core/button",{text:e,url:t,rel:o,title:n,linkTarget:r?"_blank":void 0})])}]};var Mx=Dx;const{name:zx}=wx,Ax={icon:ed,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:o,insertBlocksAfter:n,mergeBlocks:r,onReplace:a,context:i,clientId:s}){const{id:l,label:c,type:u,url:d,description:p,kind:m,metadata:g}=e,{maxNestingLevel:h}=i,{replaceBlock:_,__unstableMarkNextChangeAsNotPersistent:x,selectBlock:b}=(0,lt.useDispatch)(ct.store),[f,y]=(0,gt.useState)(t&&!d),[v,k]=(0,gt.useState)(null),w=(0,gt.useRef)(null),C=(e=>{const[t,o]=(0,gt.useState)(!1);return(0,gt.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function r(){o(!1)}function a(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[e]),t})(w),j=(0,pt.__)("Add label…"),S=(0,gt.useRef)(),B=(0,gt.useRef)(),T=(0,xt.usePrevious)(d),N=(0,gt.useRef)(!d),{isAtMaxNesting:P,isTopLevelLink:I,isParentOfSelectedBlock:D,hasChildren:M,validateLinkStatus:z,parentBlockClientId:A}=(0,lt.useSelect)((e=>{const{getBlockCount:t,getBlockName:o,getBlockRootClientId:n,hasSelectedInnerBlock:r,getBlockParentsByBlockName:a,getSelectedBlockClientId:i}=e(ct.store),l=n(s),c=o(l),u="core/navigation"===c,d=i(),p=u?l:a(s,"core/navigation")[0],m="core/navigation-submenu"===c?l:p,g=d===p||r(p,!0);return{isAtMaxNesting:a(s,Bx).length>=h,isTopLevelLink:u,isParentOfSelectedBlock:r(s,!0),hasChildren:!!t(s),validateLinkStatus:g,parentBlockClientId:m}}),[s,h]),{getBlocks:L}=(0,lt.useSelect)(ct.store),{clearBinding:H,createBinding:R}=l_({clientId:s,attributes:e}),[V,F]=((e,t,o,n)=>{const r="post-type"===e||"post"===t||"page"===t,a=Number.isInteger(o),i=(0,ct.useBlockEditingMode)(),s=(0,lt.useSelect)((e=>{if(!r)return null;if("disabled"===i||!n)return null;const{getEntityRecord:a}=e(_t.store);return a("postType",t,o)?.status}),[r,i,n,t,o]);return[r&&a&&s&&"trash"===s,"draft"===s]})(m,u,l,z),E=(0,gt.useCallback)((()=>{let t=L(s);0===t.length&&(t=[(0,st.createBlock)("core/navigation-link")],b(t[0].clientId));const o=(0,st.createBlock)("core/navigation-submenu",e,t);_(s,o)}),[L,s,b,_,e]);(0,gt.useEffect)((()=>{N.current&&t&&!d&&b(A)}),[]),(0,gt.useEffect)((()=>{M&&(x(),E())}),[M,x,E]),(0,gt.useEffect)((()=>{!T&&d&&f&&(0,no.isURL)((0,no.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)&&function(){S.current.focus();const{ownerDocument:e}=S.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(S.current),o.removeAllRanges(),o.addRange(n)}()}),[T,d,f,c]);const{textColor:O,customTextColor:G,backgroundColor:$,customBackgroundColor:U}=D_(i,!I),q=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([k,w]),className:Dt("wp-block-navigation-item",{"is-editing":t||D,"is-dragging-within":C,"has-link":!!d,"has-child":M,"has-text-color":!!O||!!G,[(0,ct.getColorClassName)("color",O)]:!!O,"has-background":!!$||U,[(0,ct.getColorClassName)("background-color",$)]:!!$}),style:{color:!O&&G,backgroundColor:!$&&U},onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),y(!0))}}),W=(0,ct.useInnerBlocksProps)({...q,className:"remove-outline"},{defaultBlock:Sx,directInsert:!0,renderAppender:!1});(!d||V||F)&&(q.onClick=()=>{y(!0)});const Z=Dt("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!d||V||F}),J=function(e){let t="";switch(e){case"post":t=(0,pt.__)("Select post");break;case"page":t=(0,pt.__)("Select page");break;case"category":t=(0,pt.__)("Select category");break;case"tag":t=(0,pt.__)("Select tag");break;default:t=(0,pt.__)("Add link")}return t}(u),Q=`(${V?(0,pt.__)("Invalid"):(0,pt.__)("Draft")})`;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:gn,title:(0,pt.__)("Link"),shortcut:mn.displayShortcut.primary("k"),onClick:()=>{y(!0)}}),!P&&(0,it.jsx)(mt.ToolbarButton,{name:"submenu",icon:L_,title:(0,pt.__)("Add submenu"),onClick:E})]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Cx,{attributes:e,setAttributes:o,clientId:s})}),(0,it.jsxs)("div",{...q,children:[(0,it.jsxs)("a",{className:Z,children:[d||g?.bindings?.url?(0,it.jsxs)(it.Fragment,{children:[!V&&!F&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.RichText,{ref:S,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>o({label:e}),onMerge:r,onReplace:a,__unstableOnSplitAtEnd:()=>n((0,st.createBlock)("core/navigation-link")),"aria-label":(0,pt.__)("Navigation link text"),placeholder:j,withoutInteractiveFormatting:!0}),p&&(0,it.jsx)("span",{className:"wp-block-navigation-item__description",children:p})]}),(V||F)&&(0,it.jsx)("div",{className:Dt("wp-block-navigation-link__placeholder-text","wp-block-navigation-link__label",{"is-invalid":V,"is-draft":F}),children:(0,it.jsx)("span",{children:`${(0,ao.decodeEntities)(c)} ${V||F?Q:""}`.trim()})})]}):(0,it.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,it.jsx)("span",{children:J})}),f&&(0,it.jsx)(K_,{ref:B,clientId:s,link:e,onClose:()=>{y(!1),d?N.current&&b(s):a([])},anchor:v,onRemove:function(){o({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),y(!1)},onChange:t=>{const{isEntityLink:n,attributes:r}=ex(t,o,e);n?R(r):H(r)}})]}),(0,it.jsx)("div",{...W})]})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{attributes:{label:(0,pt._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})}],transforms:Mx},Lx=()=>((0,vl.addFilter)("blocks.registerBlockType","core/navigation-link",Ix),jt({name:zx,metadata:wx,settings:Ax})),Hx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-submenu","title":"Submenu","category":"design","parent":["core/navigation"],"description":"Add a submenu to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelItem":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-submenu-editor","style":"wp-block-navigation-submenu"}');var Rx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})});const Vx=()=>(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,it.jsx)(mt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}),Fx=["core/navigation-link","core/navigation-submenu","core/page-list"];const Ex={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,st.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/search")}]};var Ox=Ex;const{name:Gx}=Hx,$x={icon:({context:e})=>"list-view"===e?Hh:L_,__experimentalLabel(e,{context:t}){const{label:o}=e,n=e?.metadata?.name;return"list-view"===t&&(n||o)&&e?.metadata?.name||o},edit:function({attributes:e,isSelected:t,setAttributes:o,mergeBlocks:n,onReplace:r,context:a,clientId:i}){const{label:s,url:l,description:c}=e,{showSubmenuIcon:u,maxNestingLevel:d,openSubmenusOnClick:p}=a,m="default"!==(0,ct.useBlockEditingMode)()||p,{clearBinding:g,createBinding:h}=l_({clientId:i,attributes:e}),{__unstableMarkNextChangeAsNotPersistent:_,replaceBlock:x}=(0,lt.useDispatch)(ct.store),[b,f]=(0,gt.useState)(!1),[y,v]=(0,gt.useState)(null),k=(0,gt.useRef)(null),w=(e=>{const[t,o]=(0,gt.useState)(!1);return(0,gt.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function r(){o(!1)}function a(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[]),t})(k),C=(0,pt.__)("Add text…"),j=(0,gt.useRef)(),{parentCount:S,isParentOfSelectedBlock:B,isImmediateParentOfSelectedBlock:T,hasChildren:N,selectedBlockHasChildren:P,onlyDescendantIsEmptyLink:I}=(0,lt.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:o,getBlockParentsByBlockName:n,getBlock:r,getBlockCount:a,getBlockOrder:s}=e(ct.store);let l;const c=s(o());if(1===c?.length){const e=r(c[0]);l="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:n(i,"core/navigation-submenu").length,isParentOfSelectedBlock:t(i,!0),isImmediateParentOfSelectedBlock:t(i,!1),hasChildren:!!a(i),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:l}}),[i]),D=(0,xt.usePrevious)(N);(0,gt.useEffect)((()=>{m||l||f(!0)}),[]),(0,gt.useEffect)((()=>{t||f(!1)}),[t]),(0,gt.useEffect)((()=>{b&&l&&(0,no.isURL)((0,no.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)&&function(){j.current.focus();const{ownerDocument:e}=j.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(j.current),o.removeAllRanges(),o.addRange(n)}()}),[l]);const{textColor:M,customTextColor:z,backgroundColor:A,customBackgroundColor:L}=D_(a,S>0),H=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([v,k]),className:Dt("wp-block-navigation-item",{"is-editing":t||B,"is-dragging-within":w,"has-link":!!l,"has-child":N,"has-text-color":!!M||!!z,[(0,ct.getColorClassName)("color",M)]:!!M,"has-background":!!A||L,[(0,ct.getColorClassName)("background-color",A)]:!!A,"open-on-click":m}),style:{color:!M&&z,backgroundColor:!A&&L},onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),f(!0))}}),R=D_(a,!0),V=S>=d?Fx.filter((e=>"core/navigation-submenu"!==e)):Fx,F=M_(R),E=(0,ct.useInnerBlocksProps)(F,{allowedBlocks:V,defaultBlock:Fh,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||T&&!P||N)&&ct.InnerBlocks.ButtonBlockAppender}),O=m?"button":"a";function G(){const t=(0,st.createBlock)("core/navigation-link",e);x(i,t)}(0,gt.useEffect)((()=>{!N&&D&&(_(),G())}),[N,D]);const $=!P||I;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[!m&&(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:gn,title:(0,pt.__)("Link"),shortcut:mn.displayShortcut.primary("k"),onClick:()=>{f(!0)}}),(0,it.jsx)(mt.ToolbarButton,{name:"revert",icon:Rx,title:(0,pt.__)("Convert to Link"),onClick:G,className:"wp-block-navigation__submenu__revert",disabled:!$})]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Cx,{attributes:e,setAttributes:o,clientId:i})}),(0,it.jsxs)("div",{...H,children:[(0,it.jsxs)(O,{className:"wp-block-navigation-item__content",children:[(0,it.jsx)(ct.RichText,{ref:j,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:n,onReplace:r,"aria-label":(0,pt.__)("Navigation link text"),placeholder:C,withoutInteractiveFormatting:!0,onClick:()=>{m||l||f(!0)}}),c&&(0,it.jsx)("span",{className:"wp-block-navigation-item__description",children:c}),!m&&b&&(0,it.jsx)(K_,{clientId:i,link:e,onClose:()=>{f(!1)},anchor:y,onRemove:()=>{o({url:""}),(0,Lh.speak)((0,pt.__)("Link removed."),"assertive")},onChange:t=>{const{isEntityLink:n,attributes:r}=ex(t,o,e);n?h(r):g(r)}})]}),(u||m)&&(0,it.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,it.jsx)(Vx,{})}),(0,it.jsx)("div",{...E})]})]})},example:{attributes:{label:(0,pt._x)("About","Example link text for Navigation Submenu"),type:"page"}},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},transforms:Ox},Ux=()=>jt({name:Gx,metadata:Hx,settings:$x});var qx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"})});const Wx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/nextpage","title":"Page Break","category":"design","description":"Separate your content into a multi-page experience.","keywords":["next page","pagination"],"parent":["core/post-content"],"textdomain":"default","supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-nextpage-editor"}');var Zx={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,st.createBlock)("core/nextpage",{})}]};const{name:Jx}=Wx,Qx={icon:qx,example:{},transforms:Zx,edit:function(){return(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)("span",{children:(0,pt.__)("Page break")})})},save:function(){return(0,it.jsx)(gt.RawHTML,{children:"\x3c!--nextpage--\x3e"})}},Kx=()=>jt({name:Jx,metadata:Wx,settings:Qx}),Yx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pattern","title":"Pattern Placeholder","category":"theme","description":"Show a block pattern.","supports":{"html":false,"inserter":false,"renaming":false,"blockVisibility":false,"interactivity":{"clientNavigation":true}},"textdomain":"default","attributes":{"slug":{"type":"string"}}}'),Xx=new WeakMap;function eb(){const e=(0,lt.useRegistry)();if(!Xx.has(e)){const t=new Map;Xx.set(e,tb.bind(null,t))}return Xx.get(e)}function tb(e,{name:t,blocks:o}){const n=[...o];for(;n.length;){const o=n.shift();for(const e of o.innerBlocks??[])n.unshift(e);"core/pattern"===o.name&&ob(e,t,o.attributes.slug)}}function ob(e,t,o){if(e.has(t)||e.set(t,new Set),e.get(t).add(o),nb(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function nb(e,t,o=new Set,n=new Set){o.add(t),n.add(t);const r=e.get(t)??new Set;for(const t of r)if(o.has(t)){if(n.has(t))return!0}else if(nb(e,t,o,n))return!0;return n.delete(t),!1}var rb=({attributes:e,clientId:t})=>{const o=(0,lt.useRegistry)(),n=(0,lt.useSelect)((t=>t(ct.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),r=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:a,setBlockEditingMode:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:l,getBlockEditingMode:c}=(0,lt.useSelect)(ct.store),[u,d]=(0,gt.useState)(!1),p=eb();(0,gt.useEffect)((()=>{if(!u&&n?.blocks){try{p(n)}catch(e){return void d(!0)}window.queueMicrotask((()=>{const e=l(t),u=n.blocks.map((e=>(0,st.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e}(e))));1===u.length&&n.categories?.length>0&&(u[0].attributes={...u[0].attributes,metadata:{...u[0].attributes.metadata,categories:n.categories,patternName:n.name,name:u[0].attributes.metadata.name||n.title}});const d=c(e);o.batch((()=>{s(),i(e,"default"),s(),a(t,u),s(),i(e,d)}))}))}}),[t,u,n,s,a,c,i,l]);const m=(0,ct.useBlockProps)();return u?(0,it.jsx)("div",{...m,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name)})}):(0,it.jsx)("div",{...m})};const{name:ab}=Yx,ib={edit:rb},sb=()=>jt({name:ab,metadata:Yx,settings:ib});var lb=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,it.jsx)(St.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,it.jsx)(St.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});const cb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list","title":"Page List","category":"widgets","allowedBlocks":["core/page-list-item"],"description":"Display a list of all pages.","keywords":["menu","navigation"],"textdomain":"default","attributes":{"parentPageID":{"type":"integer","default":0},"isNested":{"type":"boolean","default":false}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"contentRole":true},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');function ub(e,t){for(const o of e){if(o.attributes.id===t)return o;if(o.innerBlocks&&o.innerBlocks.length){const e=ub(o.innerBlocks,t);if(e)return e}}return null}function db(e=[],t=null){let o=function(e=[]){const t="post-type",o={},n=[];return e.forEach((({id:e,title:r,link:a,type:i,parent:s})=>{const l=o[e]?.innerBlocks??[];o[e]=(0,st.createBlock)("core/navigation-link",{id:e,label:r.rendered,url:a,type:i,kind:t,metadata:{bindings:s_(t)}},l),s?(o[s]||(o[s]={innerBlocks:[]}),o[s].innerBlocks.push(o[e])):n.push(o[e])})),n}(e);if(t){const e=ub(o,t);e&&e.innerBlocks&&(o=e.innerBlocks)}const n=e=>{e.forEach(((e,t,o)=>{const{attributes:r,innerBlocks:a}=e;if(0!==a.length){n(a);const e=(0,st.createBlock)("core/navigation-submenu",r,a);o[t]=e}}))};return n(o),o}function pb({clientId:e,pages:t,parentClientId:o,parentPageID:n}){const{replaceBlock:r,selectBlock:a}=(0,lt.useDispatch)(ct.store);return()=>{const i=db(t,n);r(e,i),a(o)}}const mb=(0,pt.__)("This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function gb({onClick:e,onClose:t,disabled:o}){return(0,it.jsxs)(mt.Modal,{onRequestClose:t,title:(0,pt.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,xt.useInstanceId)(gb,"wp-block-page-list-modal__description")},children:[(0,it.jsx)("p",{id:(0,xt.useInstanceId)(gb,"wp-block-page-list-modal__description"),children:mb}),(0,it.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:o,onClick:e,children:(0,pt.__)("Edit")})]})]})}const hb=()=>{};function _b({blockProps:e,innerBlocksProps:t,hasResolvedPages:o,blockList:n,pages:r,parentPageID:a}){if(!o)return(0,it.jsx)("div",{...e,children:(0,it.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,it.jsx)(mt.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(null===r)return(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})});if(0===r.length)return(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"info",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})});if(0===n.length){const t=r.find((e=>e.id===a));return t?.title?.rendered?(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)('Page List: "%s" page has no children.'),t.title.rendered)})}):(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})})}return r.length>0?(0,it.jsx)("ul",{...t}):void 0}const{name:xb}=cb,bb={icon:lb,example:{},edit:function({context:e,clientId:t,attributes:o,setAttributes:n}){const{parentPageID:r}=o,[a,i]=(0,gt.useState)(!1),s=(0,gt.useCallback)((()=>i(!0)),[]),l=vt(),{records:c,hasResolved:u}=(0,_t.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),d="showSubmenuIcon"in e&&c?.length>0&&c?.length<=100,p=(0,gt.useMemo)((()=>{if(null===c)return new Map;const e=c.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:o}=t;return e.has(o)?e.get(o).push(t):e.set(o,[t]),e}),new Map)}),[c]),m=(0,ct.useBlockProps)({className:Dt("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,ct.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,ct.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),g=(0,gt.useMemo)((function e(t=0,o=0){const n=p.get(t);return n?.length?n.reduce(((t,n)=>{const r=p.has(n.id),a={value:n.id,label:"— ".repeat(o)+n.title.rendered,rawName:n.title.rendered};return t.push(a),r&&t.push(...e(n.id,o+1)),t}),[]):[]}),[p]),h=(0,gt.useMemo)((function e(t=r){const o=p.get(t);return o?.length?o.reduce(((t,o)=>{const n=p.has(o.id),r={id:o.id,label:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,pt.__)("(no title)"),title:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,pt.__)("(no title)"),link:o.url,hasChildren:n};let a=null;const i=e(o.id);return a=(0,st.createBlock)("core/page-list-item",r,i),t.push(a),t}),[]):[]}),[p,r]),{isNested:_,hasSelectedChild:x,parentClientId:b,hasDraggedChild:f,isChildOfNavigation:y}=(0,lt.useSelect)((e=>{const{getBlockParentsByBlockName:o,hasSelectedInnerBlock:n,hasDraggedInnerBlock:r}=e(ct.store),a=o(t,"core/navigation-submenu",!0),i=o(t,"core/navigation",!0);return{isNested:a.length>0,isChildOfNavigation:i.length>0,hasSelectedChild:n(t,!0),hasDraggedChild:r(t,!0),parentClientId:i[0]}}),[t]),v=pb({clientId:t,pages:c,parentClientId:b,parentPageID:r}),k=(0,ct.useInnerBlocksProps)(m,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!y&&"all",onInput:hb,onChange:hb,value:h}),{selectBlock:w}=(0,lt.useDispatch)(ct.store);return(0,gt.useEffect)((()=>{(x||f)&&(s(),w(b))}),[x,f,b,w,s]),(0,gt.useEffect)((()=>{n({isNested:_})}),[_,n]),(0,it.jsxs)(it.Fragment,{children:[(g.length>0||d)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({parentPageID:0})},dropdownMenuProps:l,children:[g.length>0&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Parent Page"),hasValue:()=>0!==r,onDeselect:()=>n({parentPageID:0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,pt.__)("Parent"),value:r,options:g,onChange:e=>n({parentPageID:e??0}),help:(0,pt.__)("Choose a page to show only its subpages.")})}),d&&(0,it.jsxs)("div",{style:{gridColumn:"1 / -1"},children:[(0,it.jsx)("p",{children:mb}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!u,onClick:v,children:(0,pt.__)("Edit")})]})]})}),d&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{title:(0,pt.__)("Edit"),onClick:s,children:(0,pt.__)("Edit")})}),a&&(0,it.jsx)(gb,{onClick:v,onClose:()=>i(!1),disabled:!u})]}),(0,it.jsx)(_b,{blockProps:m,innerBlocksProps:k,hasResolvedPages:u,blockList:h,pages:c,parentPageID:r})]})}},fb=()=>jt({name:xb,metadata:cb,settings:bb}),yb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list-item","title":"Page List Item","category":"widgets","parent":["core/page-list"],"description":"Displays a page inside a list of all pages.","keywords":["page","menu","navigation"],"textdomain":"default","attributes":{"id":{"type":"number"},"label":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"},"hasChildren":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"lock":false,"inserter":false,"__experimentalToolbar":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}'),vb=()=>(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,it.jsx)(mt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});const{name:kb}=yb,wb={__experimentalLabel:({label:e})=>e,icon:Hh,example:{},edit:function({context:e,attributes:t}){const{id:o,label:n,link:r,hasChildren:a,title:i}=t,s="showSubmenuIcon"in e,l=(0,lt.useSelect)((e=>{if(!e(_t.store).canUser("read",{kind:"root",name:"site"}))return;const t=e(_t.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=M_(D_(e,!0)),u=(0,ct.useBlockProps)(c,{className:"wp-block-pages-list__item"}),d=(0,ct.useInnerBlocksProps)(u);return(0,it.jsxs)("li",{className:Dt("wp-block-pages-list__item",{"has-child":a,"wp-block-navigation-item":s,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":o===l}),children:[a&&e.openSubmenusOnClick?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false",children:(0,ao.decodeEntities)(n)}),(0,it.jsx)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",children:(0,it.jsx)(vb,{})})]}):(0,it.jsx)("a",{className:Dt("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":s}),href:r,children:(0,ao.decodeEntities)(i)}),a&&(0,it.jsxs)(it.Fragment,{children:[!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,it.jsx)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false",type:"button",children:(0,it.jsx)(vb,{})}),(0,it.jsx)("ul",{...d})]})]},o)}},Cb=()=>jt({name:kb,metadata:yb,settings:wb});var jb=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})});const Sb={className:!1},Bb={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Tb=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:o,customBackgroundColor:n,customFontSize:r,...a}=e;return{...a,style:t}},{style:Nb,...Pb}=Bb,Ib=[{supports:Sb,attributes:{...Pb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=Dt({"has-drop-cap":t!==((0,pt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,it.jsx)("p",{...ct.useBlockProps.save({className:a,dir:r}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},{supports:Sb,attributes:{...Pb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Tb,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,ct.getColorClassName)("color",a),p=(0,ct.getColorClassName)("background-color",r),m=(0,ct.getFontSizeClass)(l),g=Dt({"has-text-color":a||s,"has-background":r||i,"has-drop-cap":n,[`has-text-align-${t}`]:t,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c};return(0,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:Sb,attributes:{...Pb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Tb,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,ct.getColorClassName)("color",a),p=(0,ct.getColorClassName)("background-color",r),m=(0,ct.getFontSizeClass)(l),g=Dt({"has-text-color":a||s,"has-background":r||i,"has-drop-cap":n,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c,textAlign:t};return(0,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:Sb,attributes:{...Pb,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Tb,save({attributes:e}){const{width:t,align:o,content:n,dropCap:r,backgroundColor:a,textColor:i,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u}=e,d=(0,ct.getColorClassName)("color",i),p=(0,ct.getColorClassName)("background-color",a),m=c&&`is-${c}-text`,g=Dt({[`align${t}`]:t,"has-background":a||s,"has-drop-cap":r,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:s,color:d?void 0:l,fontSize:m?void 0:u,textAlign:o};return(0,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n})}},{supports:Sb,attributes:{...Pb,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:o,content:n,dropCap:r,backgroundColor:a,textColor:i,fontSize:s}=e,l=Dt({[`align${t}`]:t,"has-background":a,"has-drop-cap":r}),c={backgroundColor:a,color:i,fontSize:s,textAlign:o};return(0,it.jsx)("p",{style:c,className:l||void 0,children:n})},migrate:e=>Tb({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})},{supports:Sb,attributes:{...Bb,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,it.jsx)(gt.RawHTML,{children:e.content}),migrate:e=>e}];var Db=Ib,Mb=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z"})});function zb(e){const{batch:t}=(0,lt.useRegistry)(),{moveBlocksToPosition:o,replaceInnerBlocks:n,duplicateBlocks:r,insertBlock:a}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:l,getBlockName:c,getBlock:u,getNextBlockClientId:d,canInsertBlockType:p}=(0,lt.useSelect)(ct.store),m=(0,gt.useRef)(e);return m.current=e,(0,xt.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==mn.ENTER)return;const{content:g,clientId:h}=m.current;if(g.length)return;const _=i(h);if(!(0,st.hasBlockSupport)(c(_),"__experimentalOnEnter",!1))return;const x=l(_),b=x.indexOf(h);if(b===x.length-1){let t=_;for(;!p(c(h),i(t));)t=i(t);return void("string"==typeof t&&(e.preventDefault(),o([h],_,i(t),s(t)+1)))}const f=(0,st.getDefaultBlockName)();if(!p(f,i(_)))return;e.preventDefault();const y=u(_);t((()=>{r([_]);const e=s(_);n(_,y.innerBlocks.slice(0,b)),n(d(_),y.innerBlocks.slice(b+1)),a((0,st.createBlock)(f),e+1,i(_),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function Ab({direction:e,setDirection:t}){return(0,pt.isRTL)()&&(0,it.jsx)(mt.ToolbarButton,{icon:Mb,title:(0,pt._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function Lb(e){return e===((0,pt.isRTL)()?"left":"right")||"center"===e}function Hb({clientId:e,attributes:t,setAttributes:o,name:n}){const[r]=(0,ct.useSettings)("typography.dropCap");if(!r)return null;const{align:a,dropCap:i}=t;let s;s=Lb(a)?(0,pt.__)("Not available for aligned text."):i?(0,pt.__)("Showing large initial letter."):(0,pt.__)("Show a large initial letter.");const l=(0,st.getBlockSupport)(n,"typography.defaultControls.dropCap",!1);return(0,it.jsx)(ct.InspectorControls,{group:"typography",children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Drop cap"),isShownByDefault:l,onDeselect:()=>o({dropCap:!1}),resetAllFilter:()=>({dropCap:!1}),panelId:e,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Drop cap"),checked:!!i,onChange:()=>o({dropCap:!i}),help:s,disabled:Lb(a)})})})}var Rb=function({attributes:e,mergeBlocks:t,onReplace:o,onRemove:n,setAttributes:r,clientId:a,isSelected:i,name:s}){const{align:l,content:c,direction:u,dropCap:d,placeholder:p}=e,m=(0,ct.useBlockProps)({ref:zb({clientId:a,content:c}),className:Dt({"has-drop-cap":!Lb(l)&&d,[`has-text-align-${l}`]:l}),style:{direction:u}}),g=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:["default"===g&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:l,onChange:e=>r({align:e,dropCap:!Lb(e)&&d})}),(0,it.jsx)(Ab,{direction:u,setDirection:e=>r({direction:e})})]}),i&&(0,it.jsx)(Hb,{name:s,clientId:a,attributes:e,setAttributes:r}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:"p",...m,value:c,onChange:e=>r({content:e}),onMerge:t,onReplace:o,onRemove:n,"aria-label":ct.RichText.isEmpty(c)?(0,pt.__)("Empty block; start writing or type forward slash to choose a block"):(0,pt.__)("Block: Paragraph"),"data-empty":ct.RichText.isEmpty(c),placeholder:p||(0,pt.__)("Type / to choose a block"),"data-custom-placeholder":!!p||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})]})};const Vb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/paragraph","title":"Paragraph","category":"text","description":"Start with the basic building block of all narrative.","keywords":["text"],"textdomain":"default","attributes":{"align":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"dropCap":{"type":"boolean","default":false},"placeholder":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]}},"supports":{"splitting":true,"anchor":true,"className":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalSelector":"p","__unstablePasteTextInline":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-paragraph-editor","style":"wp-block-paragraph"}');const Fb={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,st.getBlockAttributes)(Vb.name,e.outerHTML),{textAlign:o}=e.style||{};return"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,st.createBlock)(Vb.name,t)}}]};var Eb=Fb;const{name:Ob}=Vb,Gb={icon:jb,example:{attributes:{content:(0,pt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;if("list-view"===t&&o)return o;if("accessibility"===t){if(o)return o;const{content:t}=e;return t&&0!==t.length?t:(0,pt.__)("Empty")}},transforms:Eb,deprecated:Db,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:Rb,save:function({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=Dt({"has-drop-cap":t!==((0,pt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,it.jsx)("p",{...ct.useBlockProps.save({className:a,dir:r}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},$b=()=>jt({name:Ob,metadata:Vb,settings:Gb});var Ub=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})});const qb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author","title":"Author","category":"theme","description":"Display post author details such as name, avatar, and bio.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"avatarSize":{"type":"number","default":48},"showAvatar":{"type":"boolean","default":true},"showBio":{"type":"boolean"},"byline":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId","queryId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"filter":{"duotone":true}},"selectors":{"filter":{"duotone":".wp-block-post-author .wp-block-post-author__avatar img"}},"editorStyle":"wp-block-post-author-editor","style":"wp-block-post-author"}'),Wb={who:"authors",per_page:100,_fields:"id,name",context:"view"};function Zb({value:e,onChange:t}){const[o,n]=(0,gt.useState)(""),{authors:r,isLoading:a}=(0,lt.useSelect)((e=>{const{getUsers:t,isResolving:n}=e(_t.store),r={...Wb};return o&&(r.search=o,r.search_columns=["name"]),{authors:t(r),isLoading:n("getUsers",[r])}}),[o]),i=(0,gt.useMemo)((()=>{const t=(r??[]).map((e=>({value:e.id,label:(0,ao.decodeEntities)(e.name)}))),o=t.findIndex((t=>e?.id===t.value));let n=[];return o<0&&e?n=[{value:e.id,label:(0,ao.decodeEntities)(e.name)}]:o<0&&!e&&(n=[{value:0,label:(0,pt.__)("(No author)")}]),[...n,...t]}),[r,e]);return(0,it.jsx)(mt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Author"),options:i,value:e?.id,onFilterValueChange:(0,xt.debounce)(n,300),onChange:t,allowReset:!1,isLoading:a})}var Jb=function({isSelected:e,context:{postType:t,postId:o,queryId:n},attributes:r,setAttributes:a}){const i=Number.isFinite(n),s=vt(),l=yt(),{authorDetails:c,canAssignAuthor:u,supportsAuthor:d}=(0,lt.useSelect)((e=>{const{getEditedEntityRecord:n,getUser:r,getPostType:a}=e(_t.store),i=n("postType",t,o),s=i?.author;return{authorDetails:s?r(s,{context:"view"}):null,supportsAuthor:a(t)?.supports?.author??!1,canAssignAuthor:!!i?._links?.["wp:action-assign-author"]}}),[t,o]),{editEntityRecord:p}=(0,lt.useDispatch)(_t.store),{textAlign:m,showAvatar:g,showBio:h,byline:_,isLink:x,linkTarget:b,avatarSize:f}=r,y=[],v=c?.name||(0,pt.__)("Post Author");c?.avatar_urls&&Object.keys(c.avatar_urls).forEach((e=>{y.push({value:e,label:`${e} x ${e}`})}));const k=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${m}`]:m})}),w=!!o&&!i&&u;return d||void 0===t?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({avatarSize:48,showAvatar:!0,isLink:!1,linkTarget:"_self"})},dropdownMenuProps:s,children:[w&&(0,it.jsx)("div",{style:{gridColumn:"1 / -1"},children:(0,it.jsx)(Zb,{value:c,onChange:e=>{p("postType",t,o,{author:e})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show avatar"),isShownByDefault:!0,hasValue:()=>!g,onDeselect:()=>a({showAvatar:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show avatar"),checked:g,onChange:()=>a({showAvatar:!g})})}),g&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Avatar size"),isShownByDefault:!0,hasValue:()=>48!==f,onDeselect:()=>a({avatarSize:48}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Avatar size"),value:f,options:y,onChange:e=>{a({avatarSize:Number(e)})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show bio"),isShownByDefault:!0,hasValue:()=>!!h,onDeselect:()=>a({showBio:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show bio"),checked:!!h,onChange:()=>a({showBio:!h})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link author name to author page"),isShownByDefault:!0,hasValue:()=>!!x,onDeselect:()=>a({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link author name to author page"),checked:x,onChange:()=>a({isLink:!x})})}),x&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link target"),isShownByDefault:!0,hasValue:()=>"_self"!==b,onDeselect:()=>a({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b})})]})}),(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:m,onChange:e=>{a({textAlign:e})}})}),(0,it.jsxs)("div",{...k,children:[g&&(0,it.jsx)("div",{className:"wp-block-post-author__avatar",children:(0,it.jsx)("img",{width:f,src:c?.avatar_urls?.[f]||l,alt:c?.name||(0,pt.__)("Default Avatar")})}),(0,it.jsxs)("div",{className:"wp-block-post-author__content",children:[(!ct.RichText.isEmpty(_)||e)&&(0,it.jsx)(ct.RichText,{identifier:"byline",className:"wp-block-post-author__byline","aria-label":(0,pt.__)("Post author byline text"),placeholder:(0,pt.__)("Write byline…"),value:_,onChange:e=>a({byline:e})}),(0,it.jsx)("p",{className:"wp-block-post-author__name",children:x?(0,it.jsx)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault(),children:v}):v}),h&&(0,it.jsx)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:c?.description}})]})]})]}):(0,it.jsx)("div",{...k,children:(0,pt.sprintf)((0,pt.__)("This post type (%s) does not support the author."),t)})};const{name:Qb}=qb,Kb={icon:Ub,example:{viewportWidth:350,attributes:{showBio:!0,byline:(0,pt.__)("Posted by")}},edit:Jb},Yb=()=>jt({name:Qb,metadata:qb,settings:Kb}),Xb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-name","title":"Author Name","category":"theme","description":"The author name.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-name"}');var ef=function({context:{postType:e,postId:t},attributes:{textAlign:o,isLink:n,linkTarget:r},setAttributes:a}){const{authorName:i,supportsAuthor:s}=(0,lt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r,getPostType:a}=o(_t.store),i=n("postType",e,t)?.author;return{authorName:i?r(i):null,supportsAuthor:a(e)?.supports?.author??!1}}),[e,t]),l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),c=i?.name||(0,pt.__)("Author Name"),u=n?(0,it.jsx)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link",children:c}):c,d=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({isLink:!1,linkTarget:"_self"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to author archive"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>a({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to author archive"),onChange:()=>a({isLink:!n}),checked:n})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==r,onDeselect:()=>a({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r})})]})}),(0,it.jsx)("div",{...l,children:s||void 0===e?u:(0,pt.sprintf)((0,pt.__)("This post type (%s) does not support the author."),e)})]})};var tf={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-author",{textAlign:e})}]};const{name:of}=Xb,nf={icon:Ub,transforms:tf,edit:ef},rf=()=>jt({name:of,metadata:Xb,settings:nf}),af=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-biography","title":"Author Biography","category":"theme","description":"The author biography.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-biography"}');var sf=function({context:{postType:e,postId:t},attributes:{textAlign:o},setAttributes:n}){const{authorDetails:r}=(0,lt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r}=o(_t.store),a=n("postType",e,t)?.author;return{authorDetails:a?r(a):null}}),[e,t]),a=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),i=r?.description||(0,pt.__)("Author Biography");return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{n({textAlign:e})}})}),(0,it.jsx)("div",{...a,dangerouslySetInnerHTML:{__html:i}})]})};const{name:lf}=af,cf={icon:Ub,edit:sf},uf=()=>jt({name:lf,metadata:af,settings:cf}),df=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/post-comment","title":"Comment (deprecated)","category":"theme","allowedBlocks":["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],"description":"This block is deprecated. Please use the Comments block instead.","textdomain":"default","attributes":{"commentId":{"type":"number"}},"providesContext":{"commentId":"commentId"},"supports":{"html":false,"inserter":false,"interactivity":{"clientNavigation":true}}}');var pf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});const mf=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const{name:gf}=df,hf={icon:pm,edit:function({attributes:{commentId:e},setAttributes:t}){const[o,n]=(0,gt.useState)(e),r=(0,ct.useBlockProps)(),a=(0,ct.useInnerBlocksProps)(r,{template:mf});return e?(0,it.jsx)("div",{...a}):(0,it.jsx)("div",{...r,children:(0,it.jsxs)(mt.Placeholder,{icon:pf,label:(0,pt._x)("Post Comment","block title"),instructions:(0,pt.__)("To show a comment, input the comment ID."),children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e,onChange:e=>n(parseInt(e))}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t({commentId:o})},children:(0,pt.__)("Save")})]})})},save:function(){const e=ct.useBlockProps.save(),t=ct.useInnerBlocksProps.save(e);return(0,it.jsx)("div",{...t})}},_f=()=>jt({name:gf,metadata:df,settings:hf});var xf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"})});const bf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-count","title":"Comments Count","category":"theme","description":"Display a post\'s comments count.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-comments-count"}');var ff={to:[{type:"block",blocks:["core/post-comments-link"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-comments-link",{textAlign:e})}]};const{name:yf}=bf,vf={icon:xf,edit:function({attributes:e,context:t,setAttributes:o}){const{textAlign:n}=e,{postId:r}=t,[a,i]=(0,gt.useState)(),s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});(0,gt.useEffect)((()=>{if(!r)return;const e=r;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&i(t.headers.get("X-WP-Total"))}))}),[r]);const l=r&&void 0!==a,c={...s.style,textDecoration:l?s.style?.textDecoration:void 0};return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,it.jsx)("div",{...s,style:c,children:l?a:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Count block: post not found.")})})]})},transforms:ff},kf=()=>jt({name:yf,metadata:bf,settings:vf});var wf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})});const Cf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-form","title":"Comments Form","category":"theme","description":"Display a post\'s comments form.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-comments-form-editor","style":["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],"example":{"attributes":{"textAlign":"center"}}}');const{name:jf}=Cf,Sf={icon:wf,edit:function e({attributes:t,context:o,setAttributes:n}){const{textAlign:r}=t,{postId:a,postType:i}=o,s=(0,xt.useInstanceId)(e),l=(0,pt.sprintf)("comments-form-edit-%d-desc",s),c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r}),"aria-describedby":l});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})}),(0,it.jsxs)("div",{...c,children:[(0,it.jsx)(ea,{postId:a,postType:i}),(0,it.jsx)(mt.VisuallyHidden,{id:l,children:(0,pt.__)("Comments form disabled in editor.")})]})]})}},Bf=()=>jt({name:jf,metadata:Cf,settings:Sf}),Tf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-link","title":"Comments Link","category":"theme","description":"Displays the link to the current post comments.","textdomain":"default","usesContext":["postType","postId"],"attributes":{"textAlign":{"type":"string"}},"example":{"viewportWidth":350},"supports":{"html":false,"color":{"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-comments-link"}');var Nf=function({context:e,attributes:t,setAttributes:o}){const{textAlign:n}=t,{postType:r,postId:a}=e,[i,s]=(0,gt.useState)(),l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});(0,gt.useEffect)((()=>{if(!a)return;const e=a;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:a}),parse:!1}).then((t=>{e===a&&s(t.headers.get("X-WP-Total"))}))}),[a]);const c=(0,lt.useSelect)((e=>e(_t.store).getEditedEntityRecord("postType",r,a)),[r,a]);if(!c)return(0,it.jsx)("div",{...l,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Link block: post not found.")})});const{link:u}=c;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,pt.__)("No comments"):(0,pt.sprintf)((0,pt._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,it.jsx)("div",{...l,children:u&&void 0!==d?(0,it.jsx)("a",{href:u+"#comments",onClick:e=>e.preventDefault(),children:d}):(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Link block: post not found.")})})]})};var Pf={to:[{type:"block",blocks:["core/post-comments-count"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-comments-count",{textAlign:e})}]};const{name:If}=Tf,Df={edit:Nf,icon:xf,transforms:Pf},Mf=()=>jt({name:If,metadata:Tf,settings:Df});var zf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})});const Af=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-content","title":"Content","category":"theme","description":"Displays the contents of a post or page.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"tagName":{"type":"string","default":"div"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-content","editorStyle":"wp-block-post-content-editor"}'),{HTMLElementControl:Lf}=jo(ct.privateApis);function Hf({parentLayout:e,layoutClassNames:t,userCanEdit:o,postType:n,postId:r,tagName:a="div"}){const[,,i]=(0,_t.useEntityProp)("postType",n,"content",r),s=(0,ct.useBlockProps)({className:t}),l=(0,gt.useMemo)((()=>i?.raw?(0,st.parse)(i.raw):[]),[i?.raw]),c=(0,ct.__experimentalUseBlockPreview)({blocks:l,props:s,layout:e});return o?(0,it.jsx)("div",{...c}):i?.protected?(0,it.jsx)(a,{...s,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("This content is password protected.")})}):(0,it.jsx)(a,{...s,dangerouslySetInnerHTML:{__html:i?.rendered}})}function Rf({context:e={},tagName:t="div"}){const{postType:o,postId:n}=e,[r,a,i]=(0,_t.useEntityBlockEditor)("postType",o,{id:n}),s=(0,lt.useSelect)((e=>e(_t.store).getEntityRecord("postType",o,n)),[o,n]),l=!!s?.content?.raw||r?.length,c=(0,ct.useInnerBlocksProps)((0,ct.useBlockProps)({className:"entry-content"}),{value:r,onInput:a,onChange:i,template:l?void 0:[["core/paragraph"]]});return(0,it.jsx)(t,{...c})}function Vf(e){const{context:{queryId:t,postType:o,postId:n}={},layoutClassNames:r,tagName:a}=e,i=bt("postType",o,n);if(void 0===i)return null;const s=Number.isFinite(t);return i&&!s?(0,it.jsx)(Rf,{...e}):(0,it.jsx)(Hf,{parentLayout:e.parentLayout,layoutClassNames:r,userCanEdit:i,postType:o,postId:n,tagName:a})}function Ff({layoutClassNames:e}){const t=(0,ct.useBlockProps)({className:e});return(0,it.jsxs)("div",{...t,children:[(0,it.jsx)("p",{children:(0,pt.__)("This is the Content block, it will display all the blocks in any single post or page.")}),(0,it.jsx)("p",{children:(0,pt.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")}),(0,it.jsx)("p",{children:(0,pt.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")})]})}function Ef(){const e=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})})}function Of({tagName:e,onSelectTagName:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Lf,{tagName:e,onChange:t,clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"}]})})}const{name:Gf}=Af,$f={icon:zf,edit:function({context:e,attributes:{tagName:t="div"},setAttributes:o,clientId:n,__unstableLayoutClassNames:r,__unstableParentLayout:a}){const{postId:i,postType:s}=e,l=(0,ct.useHasRecursion)(i);return i&&s&&l?(0,it.jsx)(Ef,{}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Of,{tagName:t,onSelectTagName:e=>{o({tagName:e})},clientId:n}),(0,it.jsx)(ct.RecursionProvider,{uniqueId:i,children:i&&s?(0,it.jsx)(Vf,{context:e,parentLayout:a,layoutClassNames:r}):(0,it.jsx)(Ff,{layoutClassNames:r})})]})}},Uf=()=>jt({name:Gf,metadata:Af,settings:$f}),qf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');function Wf(e){return/(?:^|[^\\])[aAgh]/.test(e)}const Zf={attributes:{datetime:{type:"string",role:"content"},textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save:()=>null,migrate:({metadata:{bindings:{datetime:{source:e,args:{key:t,...o}},...n},...r},...a})=>({metadata:{bindings:{datetime:{source:e,args:{field:t,...o}},...n},...r},...a}),isEligible:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&!!e?.metadata?.bindings?.datetime?.args?.key},Jf={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},displayType:{type:"string",default:"date"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save:()=>null,migrate({className:e,displayType:t,metadata:o,...n}){if("date"===t||"modified"===t)return"modified"===t&&(e=Dt(e,"wp-block-post-date__modified-date")),{...n,className:e,metadata:{...o,bindings:{datetime:{source:"core/post-data",args:{field:t}}}}}},isEligible:e=>!e.datetime&&!e?.metadata?.bindings?.datetime},Qf={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Kf=[Zf,Jf,Qf];const Yf=[{name:"post-date",title:(0,pt.__)("Post Date"),description:(0,pt.__)("Display a post's publish date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"date"===e?.metadata?.bindings?.datetime?.args?.field},{name:"post-date-modified",title:(0,pt.__)("Modified Date"),description:(0,pt.__)("Display a post's last updated date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"modified"}}}},className:"wp-block-post-date__modified-date"},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"modified"===e?.metadata?.bindings?.datetime?.args?.field}];var Xf=Yf;const{name:ey}=qf,ty={icon:wa,edit:function({attributes:e,context:{postType:t,queryId:o},setAttributes:n,name:r}){const{datetime:a,textAlign:i,format:s,isLink:l}=e,c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i})}),u=vt(),[d,p]=(0,gt.useState)(null),m=(0,gt.useMemo)((()=>({anchor:d})),[d]),{__unstableMarkNextChangeAsNotPersistent:g}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{void 0===a&&(g(),n({datetime:new Date}))}),[a]);const h=Number.isFinite(o),_=(0,ja.getSettings)(),{postType:x,siteFormat:b=_.formats.date,siteTimeFormat:f=_.formats.time}=(0,lt.useSelect)((e=>{const{getPostType:o,getEntityRecord:n}=e(_t.store),r=n("root","site");return{siteFormat:r?.date_format,siteTimeFormat:r?.time_format,postType:t?o(t):null}}),[t]),y=(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation(r,e)?.name),[r,e]),v=(0,ct.useBlockEditingMode)();let k=(0,it.jsx)("time",{dateTime:(0,ja.dateI18n)("c",a),ref:p,children:"human-diff"===s?(0,ja.humanTimeDiff)(a):(0,ja.dateI18n)(s||b,a)});return l&&a&&(k=(0,it.jsx)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault(),children:k})),(0,it.jsxs)(it.Fragment,{children:[("default"===v||!h)&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:i,onChange:e=>{n({textAlign:e})}}),"post-date-modified"!==y&&(!h||!y)&&(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.Dropdown,{popoverProps:m,renderContent:({onClose:e})=>(0,it.jsx)(ct.__experimentalPublishDateTimePicker,{title:"post-date"===y?(0,pt.__)("Publish Date"):(0,pt.__)("Date"),currentDate:a,onChange:e=>n({datetime:e}),is12Hour:Wf(f),onClose:e,dateOrder:(0,pt._x)("dmy","date order")}),renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-expanded":e,icon:$l,title:(0,pt.__)("Change Date"),onClick:t,onKeyDown:o=>{e||o.keyCode!==mn.DOWN||(o.preventDefault(),t())}})})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({datetime:void 0,format:void 0,isLink:!1})},dropdownMenuProps:u,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Date Format"),onDeselect:()=>n({format:void 0}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalDateFormatPicker,{format:s,defaultFormat:b,onChange:e=>n({format:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==l,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onDeselect:()=>n({isLink:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onChange:()=>n({isLink:!l}),checked:l})})]})}),(0,it.jsx)("div",{...c,children:k})]})},deprecated:Kf,variations:Xf},oy=()=>jt({name:ey,metadata:qf,settings:ty});var ny=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})});const ry=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-excerpt","title":"Excerpt","category":"theme","description":"Display the excerpt.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"moreText":{"type":"string","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}');var ay={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-content")}]};const{name:iy}=ry,sy={icon:ny,transforms:ay,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:o,excerptLength:n},setAttributes:r,isSelected:a,context:{postId:i,postType:s,queryId:l}}){const c="default"===(0,ct.useBlockEditingMode)(),u=Number.isFinite(l),d=bt("postType",s,i),[p,m,{rendered:g,protected:h}={}]=(0,_t.useEntityProp)("postType",s,"excerpt",i),_=vt(),x=(0,lt.useSelect)((e=>"page"===s||!!e(_t.store).getPostType(s)?.supports?.excerpt),[s]),b=d&&!u&&x,f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${e}`]:e})}),y=(0,pt._x)("words","Word count type. Do not translate!"),v=(0,gt.useMemo)((()=>{if(!g)return"";const e=(new window.DOMParser).parseFromString(g,"text/html");return e.body.textContent||e.body.innerText||""}),[g]);if(!s||!i)return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)("div",{...f,children:(0,it.jsx)("p",{children:(0,pt.__)("This block will display the excerpt.")})})]});if(h&&!d)return(0,it.jsx)("div",{...f,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("The content is currently protected and does not have the available excerpt.")})});const k=(0,it.jsx)(ct.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,pt.__)("“Read more” link text"),placeholder:(0,pt.__)('Add "read more" link text'),value:t,onChange:e=>r({moreText:e}),withoutInteractiveFormatting:!0}),w=Dt("wp-block-post-excerpt__excerpt",{"is-inline":!o}),C=(p||v).trim();let j="";if("words"===y)j=C.split(" ",n).join(" ");else if("characters_excluding_spaces"===y){const e=C.split("",n).join(""),t=e.length-e.replaceAll(" ","").length;j=C.split("",n+t).join("")}else"characters_including_spaces"===y&&(j=C.split("",n).join(""));const S=j!==C,B=b?(0,it.jsx)(ct.RichText,{className:w,"aria-label":(0,pt.__)("Excerpt text"),value:a?C:(S?j+"…":C)||(0,pt.__)("No excerpt found"),onChange:m,tagName:"p"}):(0,it.jsx)("p",{className:w,children:S?j+"…":C||(0,pt.__)("No excerpt found")});return(0,it.jsxs)(it.Fragment,{children:[c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{r({showMoreOnNewLine:!0,excerptLength:55})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==o,label:(0,pt.__)("Show link on new line"),onDeselect:()=>r({showMoreOnNewLine:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show link on new line"),checked:o,onChange:e=>r({showMoreOnNewLine:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>55!==n,label:(0,pt.__)("Max number of words"),onDeselect:()=>r({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Max number of words"),value:n,onChange:e=>{r({excerptLength:e})},min:"10",max:"100"})})]})}),(0,it.jsxs)("div",{...f,children:[B,!o&&" ",o?(0,it.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:k}):k]})]})}},ly=()=>jt({name:iy,metadata:ry,settings:sy});var cy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});const uy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-featured-image","title":"Featured Image","category":"theme","description":"Display a post\'s featured image.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay","shadow":".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder","filter":{"duotone":".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},"editorStyle":"wp-block-post-featured-image-editor","style":"wp-block-post-featured-image"}'),dy=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"cover",label:(0,pt._x)("Cover","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"contain",label:(0,pt._x)("Contain","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"fill",label:(0,pt._x)("Fill","Scale option for Image dimension control")})]}),py="cover",my={cover:(0,pt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,pt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,pt.__)("Image will be stretched and distorted to completely fill the space.")};var gy=({clientId:e,attributes:{aspectRatio:t,width:o,height:n,scale:r},setAttributes:a})=>{const[i,s,l,c]=(0,ct.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),u=(0,mt.__experimentalUseCustomUnits)({availableUnits:i||["px","%","vw","em","rem"]}),d=(e,t)=>{const o=parseFloat(t);isNaN(o)&&t||a({[e]:o<0?"0":t})},p=(0,pt._x)("Scale","Image scaling options"),m=n||t&&"auto"!==t,g=l?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=s?.map((({name:e,ratio:t})=>({label:e,value:t}))),_=[{label:(0,pt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...c?h:[],...g||[]];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,pt.__)("Aspect ratio"),onDeselect:()=>a({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect ratio"),value:t,options:_,onChange:e=>a({aspectRatio:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,pt.__)("Height"),onDeselect:()=>a({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Height"),labelPosition:"top",value:n||"",min:0,onChange:e=>d("height",e),units:u})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,pt.__)("Width"),onDeselect:()=>a({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Width"),labelPosition:"top",value:o||"",min:0,onChange:e=>d("width",e),units:u})}),m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r&&r!==py,label:p,onDeselect:()=>a({scale:py}),resetAllFilter:()=>({scale:py}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:p,value:r,help:my[r],onChange:e=>a({scale:e}),isBlock:!0,children:dy})})]})};var hy=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:o,overlayColor:n,setOverlayColor:r})=>{const{dimRatio:a}=t,{gradientValue:i,setGradient:s}=(0,ct.__experimentalUseGradient)(),l=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return l.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n.color,gradientValue:i,label:(0,pt.__)("Overlay"),onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:e,...l}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==a,label:(0,pt.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay opacity"),value:a,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null}));var _y=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({attributes:e,overlayColor:t})=>{const{dimRatio:o}=e,{gradientClass:n,gradientValue:r}=(0,ct.__experimentalUseGradient)(),a=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)(),i=(0,ct.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:r,...i.style};return a.hasColorsOrGradients&&o?(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-post-featured-image__overlay",(l=o,void 0===l?null:"has-background-dim-"+10*Math.round(l/10)),{[t.class]:t.class,"has-background-dim":void 0!==o,"has-background-gradient":r,[n]:n},i.className),style:s}):null;var l}));const xy=["image"],{ResolutionTool:by}=jo(ct.privateApis),fy="full";function yy({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const r=n.filter((({slug:t})=>e?.media_details?.sizes?.[t]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));return(0,it.jsx)(by,{value:t,defaultValue:fy,options:r,onChange:o})}const{name:vy}=uy,ky={icon:cy,edit:function({clientId:e,attributes:t,setAttributes:o,context:{postId:n,postType:r,queryId:a}}){const i=Number.isFinite(a),{isLink:s,aspectRatio:l,height:c,width:u,scale:d,sizeSlug:p,rel:m,linkTarget:g,useFirstImageFromPost:h}=t,[_,x]=(0,gt.useState)(),[b,f]=(0,_t.useEntityProp)("postType",r,"featured_media",n),[y]=(0,_t.useEntityProp)("postType",r,"content",n),v=(0,gt.useMemo)((()=>{if(b)return b;if(!h)return;const e=/<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(y);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,y]),{media:k,postType:w,postPermalink:C}=(0,lt.useSelect)((e=>{const{getEntityRecord:t,getPostType:o,getEditedEntityRecord:a}=e(_t.store);return{media:v&&t("postType","attachment",v,{context:"view"}),postType:r&&o(r),postPermalink:a("postType",r,n)?.link}}),[v,r,n]),j=k?.media_details?.sizes?.[p]?.source_url||k?.source_url,S=(0,ct.useBlockProps)({style:{width:u,height:c,aspectRatio:l},className:Dt({"is-transient":_})}),B=(0,ct.__experimentalUseBorderProps)(t),T=(0,ct.__experimentalGetShadowClassesAndStyles)(t),N=(0,ct.useBlockEditingMode)(),P=e=>(0,it.jsx)(mt.Placeholder,{className:Dt("block-editor-media-placeholder",B.className),withIllustration:!0,style:{height:!!l&&"100%",width:!!l&&"100%",...B.style,...T.style},children:e}),I=e=>{e?.id&&f(e.id),e?.url&&(0,ht.isBlobURL)(e.url)&&x(e.url)};(0,gt.useEffect)((()=>{j&&_&&x()}),[j,_]);const{createErrorNotice:D}=(0,lt.useDispatch)(bo.store),M=e=>{D(e,{type:"snackbar"}),x()},z=vt(),A="default"===N&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(hy,{attributes:t,setAttributes:o,clientId:e})}),(0,it.jsx)(ct.InspectorControls,{group:"dimensions",children:(0,it.jsx)(gy,{clientId:e,attributes:t,setAttributes:o,media:k})}),(v||i||!n)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:fy})},dropdownMenuProps:z,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==g,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!m,onDeselect:()=>o({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m,onChange:e=>o({rel:e})})}),!!k&&(0,it.jsx)(yy,{image:k,value:p,onChange:e=>o({sizeSlug:e})})]})})]});let L;if(!v&&(i||!n))return(0,it.jsxs)(it.Fragment,{children:[A,(0,it.jsxs)("div",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:P()}):P(),(0,it.jsx)(_y,{attributes:t,setAttributes:o,clientId:e})]})]});const H=(0,pt.__)("Add a featured image"),R={...B.style,...T.style,height:l?"100%":c,width:!!l&&"100%",objectFit:!(!c&&!l)&&d};return L=v||_?k||_?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{className:B.className,src:_||j,alt:k&&k?.alt_text?(0,pt.sprintf)((0,pt.__)("Featured image: %s"),k.alt_text):(0,pt.__)("Featured image"),style:R}),_&&(0,it.jsx)(mt.Spinner,{})]}):P():(0,it.jsx)(ct.MediaPlaceholder,{onSelect:I,accept:"image/*",allowedTypes:xy,onError:M,placeholder:P,mediaLibraryButton:({open:e})=>(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,icon:Wp,variant:"primary",label:H,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,it.jsxs)(it.Fragment,{children:[!_&&A,!!k&&!i&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:v,mediaURL:j,allowedTypes:xy,accept:"image/*",onSelect:I,onError:M,onReset:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:void 0}),f(0)}})}),(0,it.jsxs)("figure",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:L}):L,(0,it.jsx)(_y,{attributes:t,setAttributes:o,clientId:e})]})]})}},wy=()=>jt({name:vy,metadata:uy,settings:ky}),Cy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-navigation-link","title":"Post Navigation Link","category":"theme","description":"Displays the next or previous post link that is adjacent to the current post.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"type":{"type":"string","default":"next"},"label":{"type":"string","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}');var jy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Sy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});const By=[{name:"post-previous",title:(0,pt.__)("Previous Post"),description:(0,pt.__)("Displays the post link that precedes the current post."),icon:jy,attributes:{type:"previous"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Previous post"),arrow:"arrow"}}},{isDefault:!0,name:"post-next",title:(0,pt.__)("Next Post"),description:(0,pt.__)("Displays the post link that follows the current post."),icon:Sy,attributes:{type:"next"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}}];By.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Ty=By;const{name:Ny}=Cy,Py={edit:function({context:{postType:e},attributes:{type:t,label:o,showTitle:n,textAlign:r,linkLabel:a,arrow:i,taxonomy:s},setAttributes:l}){const c="default"===(0,ct.useBlockEditingMode)(),u="next"===t;let d=u?(0,pt.__)("Next"):(0,pt.__)("Previous");const p={none:"",arrow:u?"→":"←",chevron:u?"»":"«"}[i];n&&(d=u?(0,pt.__)("Next: "):(0,pt.__)("Previous: "));const m=u?(0,pt.__)("Next post"):(0,pt.__)("Previous post"),g=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),h=(0,lt.useSelect)((t=>{const{getTaxonomies:o}=t(_t.store);return o({type:e,per_page:-1})}),[e]),_=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{l({showTitle:!1,linkLabel:!1,arrow:"none"})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display the title as a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>l({showTitle:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display the title as a link"),help:(0,pt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Include the label as part of the link"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>l({linkLabel:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Include the label as part of the link"),checked:!!a,onChange:()=>l({linkLabel:!a})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Arrow"),isShownByDefault:!0,hasValue:()=>"none"!==i,onDeselect:()=>l({arrow:"none"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:i,onChange:e=>{l({arrow:e})},help:(0,pt.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Next/Previous link")})]})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Filter by taxonomy"),value:s,options:[{label:(0,pt.__)("Unfiltered"),value:""},...(h??[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>l({taxonomy:e}),help:(0,pt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:r,onChange:e=>{l({textAlign:e})}})}),(0,it.jsxs)("div",{...g,children:[!u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${i}`,children:p}),(0,it.jsx)(ct.RichText,{tagName:"a",identifier:"label","aria-label":m,placeholder:d,value:o,withoutInteractiveFormatting:!0,onChange:e=>l({label:e})}),n&&(0,it.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("An example title")}),u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${i}`,"aria-hidden":!0,children:p})]})]})},variations:Ty,example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}},Iy=()=>jt({name:Ny,metadata:Cy,settings:Py}),Dy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}'),My=[["core/post-title"],["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}],["core/post-excerpt"]];function zy({classList:e}){const t=(0,ct.useInnerBlocksProps)({className:Dt("wp-block-post",e)},{template:My,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("li",{...t})}const Ay=(0,gt.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ct.__experimentalUseBlockPreview)({blocks:e,props:{className:Dt("wp-block-post",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,it.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const{name:Ly}=Dy,Hy={icon:Oa,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:o,offset:n=0,postType:r,order:a,orderBy:i,author:s,search:l,exclude:c,sticky:u,inherit:d,taxQuery:p,parents:m,pages:g,format:h,..._}={},templateSlug:x,previewPostType:b},attributes:{layout:f},__unstableLayoutClassNames:y}){const{type:v,columnCount:k=3}=f||{},[w,C]=(0,gt.useState)(),{posts:j,blocks:S}=(0,lt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:f}=e(_t.store),{getBlocks:y}=e(ct.store),v=d&&x?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:x.replace("category-","")}),k=d&&x?.startsWith("tag-")&&g("taxonomy","post_tag",{context:"view",per_page:1,_fields:["id"],slug:x.replace("tag-","")}),w={offset:n||0,order:a,orderby:i};if(p&&!d){const e=f({type:r,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[o,n])=>{const r=e?.find((({slug:e})=>e===o));return r?.rest_base&&(t[r?.rest_base]=n),t}),{});Object.keys(t).length&&Object.assign(w,t)}o&&(w.per_page=o),s&&(w.author=s),l&&(w.search=l),c?.length&&(w.exclude=c),m?.length&&(w.parent=m),h?.length&&(w.format=h),["exclude","only"].includes(u)&&(w.sticky="only"===u),["","ignore"].includes(u)&&(delete w.sticky,w.ignore_sticky="ignore"===u);let C=r;d&&(x?.startsWith("archive-")?(w.postType=x.replace("archive-",""),C=w.postType):v?w.categories=v[0]?.id:k?w.tags=k[0]?.id:x?.startsWith("taxonomy-post_format")&&(w.format=x.replace("taxonomy-post_format-post-format-","")));return{posts:g("postType",b||C,{...w,..._}),blocks:y(t)}}),[o,n,a,i,t,s,l,r,c,u,d,x,p,m,h,_,b]),B=(0,gt.useMemo)((()=>j?.map((e=>({postType:e.type,postId:e.id,classList:e.class_list??""})))),[j]),T=(0,ct.useBlockProps)({className:Dt(y,{[`columns-${k}`]:"grid"===v&&k})});if(!j)return(0,it.jsx)("p",{...T,children:(0,it.jsx)(mt.Spinner,{})});if(!j.length)return(0,it.jsxs)("p",{...T,children:[" ",(0,pt.__)("No results found.")]});const N=t=>e({layout:{...f,...t}}),P=[{icon:jm,title:(0,pt._x)("List view","Post template block display setting"),onClick:()=>N({type:"default"}),isActive:"default"===v||"constrained"===v},{icon:qd,title:(0,pt._x)("Grid view","Post template block display setting"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===v}];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:P})}),(0,it.jsx)("ul",{...T,children:B&&B.map((e=>(0,it.jsxs)(ct.BlockContextProvider,{value:e,children:[e.postId===(w||B[0]?.postId)?(0,it.jsx)(zy,{classList:e.classList}):null,(0,it.jsx)(Ay,{blocks:S,blockContextId:e.postId,classList:e.classList,setActiveBlockContextId:C,isHidden:e.postId===(w||B[0]?.postId)})]},e.postId)))})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},Ry=()=>jt({name:Ly,metadata:Dy,settings:Hy});var Vy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})});const Fy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-terms","title":"Post Terms","category":"theme","description":"Post terms.","textdomain":"default","attributes":{"term":{"type":"string"},"textAlign":{"type":"string"},"separator":{"type":"string","default":", "},"prefix":{"type":"string","default":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}'),Ey=[];const Oy=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];var Gy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});const $y={category:Vy,post_tag:Gy};function Uy(e,t){if("core/post-terms"!==t)return e;const o=e.variations.map((e=>({...e,icon:$y[e.name]??Vy})));return{...e,variations:o}}const{name:qy}=Fy,Wy={icon:Vy,edit:function({attributes:e,clientId:t,context:o,isSelected:n,setAttributes:r,insertBlocksAfter:a}){const{term:i,textAlign:s,separator:l,prefix:c,suffix:u}=e,{postId:d,postType:p}=o,m="default"===(0,ct.useBlockEditingMode)(),g=(0,lt.useSelect)((e=>{if(!i)return{};const{getTaxonomy:t}=e(_t.store),o=t(i);return o?.visibility?.publicly_queryable?o:{}}),[i]),{postTerms:h,hasPostTerms:_,isLoading:x}=function({postId:e,term:t}){const{slug:o}=t;return(0,lt.useSelect)((n=>{const r=t?.visibility?.publicly_queryable;if(!r)return{postTerms:Ey,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:a,isResolving:i}=n(_t.store),s=["taxonomy",o,{post:e,per_page:-1,context:"view"}],l=a(...s);return{postTerms:l,isLoading:i("getEntityRecords",s),hasPostTerms:!!l?.length}}),[e,t?.visibility?.publicly_queryable,o])}({postId:d,term:g}),b=d&&p,f=(0,ct.useBlockDisplayInformation)(t),y=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${s}`]:s,[`taxonomy-${i}`]:i})});return(0,it.jsxs)(it.Fragment,{children:[m&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:s,onChange:e=>{r({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:l||"",onChange:e=>{r({separator:e})},help:(0,pt.__)("Enter character(s) used to separate terms.")})}),(0,it.jsxs)("div",{...y,children:[x&&b&&(0,it.jsx)(mt.Spinner,{}),!x&&(n||c)&&(0,it.jsx)(ct.RichText,{identifier:"prefix",allowedFormats:Oy,className:"wp-block-post-terms__prefix","aria-label":(0,pt.__)("Prefix"),placeholder:(0,pt.__)("Prefix")+" ",value:c,onChange:e=>r({prefix:e}),tagName:"span"}),(!b||!i)&&(0,it.jsx)("span",{children:f.title}),b&&!x&&_&&h.map((e=>(0,it.jsx)("a",{href:e.link,onClick:e=>e.preventDefault(),rel:"tag",children:(0,ao.decodeEntities)(e.name)},e.id))).reduce(((e,t)=>(0,it.jsxs)(it.Fragment,{children:[e,(0,it.jsx)("span",{className:"wp-block-post-terms__separator",children:l||" "}),t]}))),b&&!x&&!_&&(g?.labels?.no_terms||(0,pt.__)("Term items not found.")),!x&&(n||u)&&(0,it.jsx)(ct.RichText,{identifier:"suffix",allowedFormats:Oy,className:"wp-block-post-terms__suffix","aria-label":(0,pt.__)("Suffix"),placeholder:" "+(0,pt.__)("Suffix"),value:u,onChange:e=>r({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>a((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})]})}},Zy=()=>((0,vl.addFilter)("blocks.registerBlockType","core/template-part",Uy),jt({name:qy,metadata:Fy,settings:Wy}));var Jy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})});const Qy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}'),Ky=window.wp.wordcount;var Yy=function({attributes:e,setAttributes:t,context:o}){const{textAlign:n,displayAsRange:r,displayMode:a,averageReadingSpeed:i}=e,{postId:s,postType:l}=o,c=vt(),[u]=(0,_t.useEntityProp)("postType",l,"content",s),[d]=(0,_t.useEntityBlockEditor)("postType",l,{id:s}),p=(0,gt.useMemo)((()=>{let e;e=u instanceof Function?u({blocks:d}):d?(0,st.__unstableSerializeAndClean)(d):u;const t=(0,pt._x)("words","Word count type. Do not translate!"),o=(0,Ky.count)(e||"",t);if("time"===a){if(r){let e=Math.max(1,Math.round(o/i*1.2));const t=Math.max(1,Math.round(o/i*.8));t===e&&(e+=1);const n=(0,pt._x)("%1$s–%2$s minutes","Range of minutes to read");return(0,pt.sprintf)(n,t,e)}const e=Math.max(1,Math.round(o/i));return(0,pt.sprintf)((0,pt._n)("%s minute","%s minutes",e),e)}if("words"===a)return"words"===t?(0,pt.sprintf)((0,pt._n)("%s word","%s words",o),o.toLocaleString()):(0,pt.sprintf)((0,pt._n)("%s character","%s characters",o),o.toLocaleString())}),[u,d,r,a,i]),m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{t({textAlign:e})}})}),"time"===a&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsRange:!0})},dropdownMenuProps:c,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt._x)("Display as range","Turns reading time range display on or off"),hasValue:()=>!r,onDeselect:()=>{t({displayAsRange:!0})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as range"),checked:!!r,onChange:()=>t({displayAsRange:!r})})})})}),(0,it.jsx)("div",{...m,children:p})]})},Xy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z"})});const ev=[{name:"time-to-read",title:(0,pt.__)("Time to Read"),description:(0,pt.__)("Show minutes required to finish reading the post."),attributes:{displayMode:"time"},scope:["inserter","transform"],isActive:e=>"time"===e?.displayMode,icon:Jy,isDefault:!0},{name:"word-count",title:(0,pt.__)("Word Count"),description:(0,pt.__)("Show the number of words in the post."),attributes:{displayMode:"words"},scope:["inserter","transform"],isActive:e=>"words"===e?.displayMode,icon:Xy}];var tv=ev;const{name:ov}=Qy,nv={icon:Jy,edit:Yy,variations:tv,example:{}},rv=()=>jt({name:ov,metadata:Qy,settings:nv}),av=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-title","title":"Title","category":"theme","description":"Displays the title of a post, page, or any other content-type.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"isLink":{"type":"boolean","default":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}');const iv={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var sv=[iv];const{name:lv}=av,cv={icon:ji,edit:function({attributes:{level:e,levelOptions:t,textAlign:o,isLink:n,rel:r,linkTarget:a},setAttributes:i,context:{postType:s,postId:l,queryId:c},insertBlocksAfter:u}){const d=0===e?"p":`h${e}`,p=Number.isFinite(c),m=(0,lt.useSelect)((e=>!p&&e(_t.store).canUser("update",{kind:"postType",name:s,id:l})),[p,s,l]),[g="",h,_]=(0,_t.useEntityProp)("postType",s,"title",l),[x]=(0,_t.useEntityProp)("postType",s,"link",l),b=()=>{u((0,st.createBlock)((0,st.getDefaultBlockName)()))},f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),y=(0,ct.useBlockEditingMode)(),v=vt();let k=(0,it.jsx)(d,{...f,children:(0,pt.__)("Title")});return s&&l&&(k=m?(0,it.jsx)(ct.PlainText,{tagName:d,placeholder:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b,...f}):(0,it.jsx)(d,{...f,dangerouslySetInnerHTML:{__html:_?.rendered}})),n&&s&&l&&(k=m?(0,it.jsx)(d,{...f,children:(0,it.jsx)(ct.PlainText,{tagName:"a",href:x,target:a,rel:r,placeholder:g.length?null:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b})}):(0,it.jsx)(d,{...f,children:(0,it.jsx)("a",{href:x,target:a,rel:r,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:_?.rendered}})})),(0,it.jsxs)(it.Fragment,{children:["default"===y&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:e,options:t,onChange:e=>i({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{i({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({rel:"",linkTarget:"_self",isLink:!1})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Make title a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>i({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make title a link"),onChange:()=>i({isLink:!n}),checked:n})}),n&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_blank"===a,onDeselect:()=>i({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>i({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>i({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:r,onChange:e=>i({rel:e})})})]})]})})]}),k]})},deprecated:sv},uv=()=>jt({name:lv,metadata:av,settings:cv});var dv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})});const pv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/preformatted","title":"Preformatted","category":"text","description":"Add text that respects your spacing and tabs, and also allows styling.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}');const mv={from:[{type:"block",blocks:["core/code","core/paragraph","core/verse"],transform:({content:e,anchor:t})=>(0,st.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,st.createBlock)("core/code",e)},{type:"block",blocks:["core/verse"],transform:e=>(0,st.createBlock)("core/verse",e)}]};var gv=mv;const{name:hv}=pv,_v={icon:dv,example:{attributes:{content:(0,pt.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:gv,edit:function({attributes:e,mergeBlocks:t,setAttributes:o,onRemove:n,insertBlocksAfter:r,style:a}){const{content:i}=e,s=(0,ct.useBlockProps)({style:a});return(0,it.jsx)(ct.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{o({content:e})},onRemove:n,"aria-label":(0,pt.__)("Preformatted text"),placeholder:(0,pt.__)("Write preformatted text…"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,it.jsx)("pre",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.RichText.Content,{value:t})})},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},xv=()=>jt({name:hv,metadata:pv,settings:_v});var bv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})});const fv="is-style-solid-color",yv={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function vv(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function kv(e){const t=`</p>${e=e||"<p></p>"}<p>`.split("</p><p>");return t.shift(),t.pop(),t.join("<br>")}const wv={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:n,multiline:!0}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},migrate:({value:e,...t})=>({value:kv(e),...t})},Cv={attributes:{...yv},save({attributes:e}){const{mainColor:t,customMainColor:o,customTextColor:n,textColor:r,value:a,citation:i,className:s}=e,l=s?.includes(fv);let c,u;if(l){const e=(0,ct.getColorClassName)("background-color",t);c=Dt({"has-background":e||o,[e]:e}),u={backgroundColor:e?void 0:o}}else o&&(u={borderColor:o});const d=(0,ct.getColorClassName)("color",r),p=Dt({"has-text-color":r||n,[d]:d}),m=d?void 0:{color:n};return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:c,style:u}),children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(fv);let s;return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:kv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},jv={attributes:{...yv,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s,figureStyle:l}=e,c=s?.includes(fv);let u,d;if(c){const e=(0,ct.getColorClassName)("background-color",t);u=Dt({"has-background":e||o,[e]:e}),d={backgroundColor:e?void 0:o}}else if(o)d={borderColor:o};else if(t){d={borderColor:vv(l)}}const p=(0,ct.getColorClassName)("color",n),m=(n||r)&&Dt("has-text-color",{[p]:p}),g=p?void 0:{color:r};return(0,it.jsx)("figure",{className:u,style:d,children:(0,it.jsxs)("blockquote",{className:m,style:g,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,figureStyle:o,mainColor:n,customMainColor:r,customTextColor:a,...i}){const s=t?.includes(fv);let l;if(r&&(l=s?{color:{background:r}}:{border:{color:r}}),a&&l&&(l.color={...l.color,text:a}),!s&&n&&o){const n=vv(o);if(n)return{value:kv(e),...i,className:t,style:{border:{color:n}}}}return{value:kv(e),className:t,backgroundColor:s?n:void 0,borderColor:s?void 0:n,textAlign:s?"left":void 0,style:l,...i}}},Sv={attributes:yv,save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s}=e,l=s?.includes(fv);let c,u;if(l)c=(0,ct.getColorClassName)("background-color",t),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(t){const e=(0,lt.select)(ct.store).getSettings().colors??[];u={borderColor:(0,ct.getColorObjectByAttributeValues)(e,t).color}}const d=(0,ct.getColorClassName)("color",n),p=n||r?Dt("has-text-color",{[d]:d}):void 0,m=d?void 0:{color:r};return(0,it.jsx)("figure",{className:c,style:u,children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(fv);let s={};return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:kv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},Bv={attributes:{...yv},save({attributes:e}){const{value:t,citation:o}=e;return(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},migrate:({value:e,...t})=>({value:kv(e),...t})},Tv={attributes:{...yv,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:o,align:n}=e;return(0,it.jsxs)("blockquote",{className:`align${n}`,children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"footer",value:o})]})},migrate:({value:e,...t})=>({value:kv(e),...t})};var Nv=[wv,Cv,jv,Sv,Bv,Tv];const Pv="web"===gt.Platform.OS;var Iv=function({attributes:e,setAttributes:t,isSelected:o,insertBlocksAfter:n}){const{textAlign:r,citation:a,value:i}=e,s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),l=!ct.RichText.isEmpty(a)||o;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)("figure",{...s,children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>t({value:e}),"aria-label":(0,pt.__)("Pullquote text"),placeholder:(0,pt.__)("Add quote"),textAlign:"center"}),l&&(0,it.jsx)(ct.RichText,{identifier:"citation",tagName:Pv?"cite":void 0,style:{display:"block"},value:a,"aria-label":(0,pt.__)("Pullquote citation text"),placeholder:(0,pt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})})]})};const Dv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pullquote","title":"Pullquote","category":"text","description":"Give special visual emphasis to a quote from your text.","textdomain":"default","attributes":{"value":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}');const Mv={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/pullquote",{value:(0,Tn.toHTMLString)({value:(0,Tn.join)(e.map((({content:e})=>(0,Tn.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,st.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const o=[];return e&&o.push((0,st.createBlock)("core/paragraph",{content:e})),t&&o.push((0,st.createBlock)("core/paragraph",{content:t})),0===o.length?(0,st.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,st.createBlock)("core/heading",{content:t});const o=(0,st.createBlock)("core/heading",{content:e});return t?[o,(0,st.createBlock)("core/heading",{content:t})]:o}}]};var zv=Mv;const{name:Av}=Dv,Lv={icon:bv,example:{attributes:{value:(0,pt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,pt.__)("Matt Mullenweg")}},transforms:zv,edit:Iv,save:function({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{tagName:"p",value:n}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},deprecated:Nv},Hv=()=>jt({name:Av,metadata:Dv,settings:Lv});var Rv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})});const Vv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}'),Fv=e=>{const t=e?.reduce(((e,t)=>{const{mapById:o,mapByName:n,names:r}=e;return o[t.id]=t,n[t.name]=t,r.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},Ev=(e,t)=>{const o=t.split(".");let n=e;return o.forEach((e=>{n=n?.[e]})),n},Ov=(e,t)=>(e||[]).map((e=>({...e,name:(0,ao.decodeEntities)(Ev(e,t))}))),Gv=e=>{const t=(0,lt.useSelect)((t=>{const{getTaxonomies:o,getPostType:n}=t(_t.store);return n(e)?.taxonomies?.length>0?o({type:e,per_page:-1}):[]}),[e]);return(0,gt.useMemo)((()=>t?.filter((({visibility:e})=>!!e?.publicly_queryable))),[t])};function $v(e,t){return!e||e.includes(t)}const Uv=e=>(0,lt.useSelect)((t=>{const{getClientIdsOfDescendants:o,getBlockName:n}=t(ct.store);return o(e).some((e=>{const t=n(e),o=Object.is((0,st.getBlockSupport)(t,"interactivity"),!0),r=(0,st.getBlockSupport)(t,"interactivity.clientNavigation");return!o&&!r}))}),[e]);function qv({enhancedPagination:e,setAttributes:t,clientId:o}){const n=Uv(o);let r=(0,pt.__)("Reload the full page—instead of just the posts list—when visitors navigate between pages.");return n&&(r=(0,pt.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reload full page"),help:r,checked:!e,disabled:n,onChange:e=>{t({enhancedPagination:!e})}})})}const Wv=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];var Zv=function({order:e,orderBy:t,orderByOptions:o=Wv,onChange:n}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Order by"),value:`${t}/${e}`,options:o,onChange:e=>{const[t,o]=e.split("/");n({order:o,orderBy:t})}})};const Jv={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var Qv=function({value:e,onChange:t}){const o=(0,lt.useSelect)((e=>{const{getUsers:t}=e(_t.store);return t(Jv)}),[]);if(!o)return null;const n=Fv(o),r=(e?e.toString().split(","):[]).reduce(((e,t)=>{const o=n.mapById[t];return o&&e.push({id:t,value:o.name}),e}),[]);return(0,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Authors"),value:r,suggestions:n.names,onChange:e=>{const o=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e[t]?.id;if(o)return o})(n.mapByName,t);return o&&e.add(o),e}),new Set));t({author:o.join(",")})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})};const Kv=[],Yv={order:"asc",_fields:"id,title",context:"view"};var Xv=function({parents:e,postType:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(Kv),[s,l]=(0,gt.useState)(Kv),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:Kv,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["postType",t,{...Yv,search:n,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,t,e]),p=(0,lt.useSelect)((o=>{if(!e?.length)return Kv;const{getEntityRecords:n}=o(_t.store);return n("postType",t,{...Yv,include:e,per_page:e.length})}),[e,t]);(0,gt.useEffect)((()=>{if(e?.length||i(Kv),!p?.length)return;const t=Fv(Ov(p,"title.rendered")),o=e.reduce(((e,o)=>{const n=t.mapById[o];return n&&e.push({id:o,value:n.name}),e}),[]);i(o)}),[e,p]);const m=(0,gt.useMemo)((()=>u?.length?Fv(Ov(u,"title.rendered")):Kv),[u]);return(0,gt.useEffect)((()=>{d&&l(m.names)}),[m.names,d]),(0,it.jsx)(mt.FormTokenField,{__next40pxDefaultSize:!0,label:(0,pt.__)("Parents"),value:a,onInputChange:c,suggestions:s,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e?.[t]?.id;if(o)return o})(m.mapByName,t);return o&&e.add(o),e}),new Set));l(Kv),o({parents:t})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0})};const ek=[],tk={order:"asc",_fields:"id,name",context:"view"},ok=(e,t)=>{const o=t?.id||e?.find((e=>e.name===t))?.id;if(o)return o;const n=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===n))?.id};function nk({onChange:e,query:t}){const{postType:o,taxQuery:n}=t,r=Gv(o);return r&&0!==r.length?(0,it.jsx)(mt.__experimentalVStack,{spacing:4,children:r.map((t=>{const o=n?.[t.slug]||[];return(0,it.jsx)(rk,{taxonomy:t,termIds:o,onChange:o=>e({taxQuery:{...n,[t.slug]:o}})},t.slug)}))}):null}function rk({taxonomy:e,termIds:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(ek),[s,l]=(0,gt.useState)(ek),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:ek,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["taxonomy",e.slug,{...tk,search:n,orderby:"name",exclude:t,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,e.slug,t]),p=(0,lt.useSelect)((o=>{if(!t?.length)return ek;const{getEntityRecords:n}=o(_t.store);return n("taxonomy",e.slug,{...tk,include:t,per_page:t.length})}),[e.slug,t]);(0,gt.useEffect)((()=>{if(t?.length||i(ek),!p?.length)return;const e=t.reduce(((e,t)=>{const o=p.find((e=>e.id===t));return o&&e.push({id:t,value:o.name}),e}),[]);i(e)}),[t,p]),(0,gt.useEffect)((()=>{d&&l(u.map((e=>e.name)))}),[u,d]);return(0,it.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,it.jsx)(mt.FormTokenField,{label:e.name,value:a,onInputChange:c,suggestions:s,displayTransform:ao.decodeEntities,onChange:e=>{const t=new Set;for(const o of e){const e=ok(u,o);e&&t.add(e)}l(ek),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}const ak=[{value:"aside",label:(0,pt.__)("Aside")},{value:"audio",label:(0,pt.__)("Audio")},{value:"chat",label:(0,pt.__)("Chat")},{value:"gallery",label:(0,pt.__)("Gallery")},{value:"image",label:(0,pt.__)("Image")},{value:"link",label:(0,pt.__)("Link")},{value:"quote",label:(0,pt.__)("Quote")},{value:"standard",label:(0,pt.__)("Standard")},{value:"status",label:(0,pt.__)("Status")},{value:"video",label:(0,pt.__)("Video")}].sort(((e,t)=>{const o=e.label.toUpperCase(),n=t.label.toUpperCase();return o<n?-1:o>n?1:0}));function ik(e,t){return e.map((e=>t.find((t=>t.label.toLocaleLowerCase()===e.toLocaleLowerCase()))?.value)).filter(Boolean)}function sk({onChange:e,query:{format:t}}){const o=Array.isArray(t)?t:[t],{supportedFormats:n}=(0,lt.useSelect)((e=>({supportedFormats:e(_t.store).getThemeSupports().formats})),[]),r=ak.filter((e=>n.includes(e.value))),a=o.map((e=>r.find((t=>t.value===e))?.label)).filter(Boolean),i=r.filter((e=>!o.includes(e.value))).map((e=>e.label));return(0,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Formats"),value:a,suggestions:i,onChange:t=>{e({format:ik(t,r)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}const lk=[{label:(0,pt.__)("Include"),value:""},{label:(0,pt.__)("Ignore"),value:"ignore"},{label:(0,pt.__)("Exclude"),value:"exclude"},{label:(0,pt.__)("Only"),value:"only"}];function ck({value:e,onChange:t}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Sticky posts"),options:lk,value:e,onChange:t,help:(0,pt.__)("Sticky posts always appear first, regardless of their publish date.")})}var uk=({perPage:e,offset:t=0,onChange:o})=>(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Items per page"),min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e,offset:t})},value:parseInt(e,10)});var dk=({offset:e=0,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Offset"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})}});var pk=({pages:e,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Max pages to show"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},help:(0,pt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")});function mk(e){const{attributes:t,setQuery:o,isSingular:n}=e,{query:r}=t,{order:a,orderBy:i,author:s,pages:l,postType:c,perPage:u,offset:d,sticky:p,inherit:m,taxQuery:g,parents:h,format:_}=r,x=function(e){return(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),b="post"===c,{postTypesTaxonomiesMap:f,postTypesSelectOptions:y,postTypeFormatSupportMap:v}=(()=>{const e=(0,lt.useSelect)((e=>{const{getPostTypes:t}=e(_t.store),o=["attachment"],n=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!o.includes(t)));return n}),[]);return{postTypesTaxonomiesMap:(0,gt.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,gt.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e]),postTypeFormatSupportMap:(0,gt.useMemo)((()=>e?.length?e.reduce(((e,t)=>(e[t.slug]=t.supports?.["post-formats"]||!1,e)),{}):{}),[e])}})(),k=Gv(c),w=function(e){return(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return o?.viewable&&o?.hierarchical}),[e])}(c),C=e=>{const t={postType:e},n=f[e],r=Object.entries(g||{}).reduce(((e,[t,o])=>(n.includes(t)&&(e[t]=o),e)),{});t.taxQuery=Object.keys(r).length?r:void 0,"post"!==e&&(t.sticky=""),t.parents=[];v[e]||(t.format=[]),o(t)},[j,S]=(0,gt.useState)(r.search),B=(0,gt.useMemo)((()=>(0,xt.debounce)((e=>{o({search:e})}),250)),[o]),T=function(e){const t=(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return!!o?.supports?.["page-attributes"]}),[e]);return(0,gt.useMemo)((()=>{const e=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];return t&&e.push({label:(0,pt.__)("Ascending by order"),value:"menu_order/asc"},{label:(0,pt.__)("Descending by order"),value:"menu_order/desc"}),e}),[t])}(c),N=$v(x,"inherit"),P=!m&&$v(x,"postType"),I=(0,pt.__)("Post type"),D=(0,pt.__)("Select the type of content to display: posts, pages, or custom post types."),M=!m&&$v(x,"order"),z=!m&&b&&$v(x,"sticky"),A=N||P||M||z,L=!!k?.length&&$v(x,"taxQuery"),H=$v(x,"author"),R=$v(x,"search"),V=$v(x,"parents")&&w,F=v[c],E=(0,lt.useSelect)((e=>{if(!F||!$v(x,"format"))return!1;const t=e(_t.store).getThemeSupports();return t.formats&&t.formats.length>0&&t.formats.some((e=>"standard"!==e))}),[x,F]),O=L||H||R||V||E,G=vt(),$=$v(x,"postCount"),U=$v(x,"offset"),q=$v(x,"pages"),W=$||U||q,Z=n&&m;return(0,it.jsxs)(it.Fragment,{children:[A&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({postType:"post",order:"desc",orderBy:"date",sticky:"",inherit:!0})},dropdownMenuProps:G,children:[N&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!m,label:(0,pt.__)("Query type"),onDeselect:()=>o({inherit:!0}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Query type"),isBlock:!0,onChange:e=>{o({inherit:"default"===e})},help:m?(0,pt.__)("Display a list of posts or custom post types based on the current template."):(0,pt.__)("Display a list of posts or custom post types based on specific criteria."),value:m?"default":"custom",children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"default",label:(0,pt.__)("Default")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,pt.__)("Custom")})]}),Z&&(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).")})]})}),P&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"post"!==c,label:I,onDeselect:()=>C("post"),isShownByDefault:!0,children:y.length>2?(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:y,value:c,label:I,onChange:C,help:D}):(0,it.jsx)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:c,label:I,onChange:C,help:D,children:y.map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e.value,label:e.label},e.value)))})}),M&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==a||"date"!==i,label:(0,pt.__)("Order by"),onDeselect:()=>o({order:"desc",orderBy:"date"}),isShownByDefault:!0,children:(0,it.jsx)(Zv,{order:a,orderBy:i,orderByOptions:T,onChange:o})}),z&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,pt.__)("Sticky posts"),onDeselect:()=>o({sticky:""}),isShownByDefault:!0,children:(0,it.jsx)(ck,{value:p,onChange:e=>o({sticky:e})})})]}),!m&&W&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,pt.__)("Display"),resetAll:()=>{o({offset:0,pages:0})},dropdownMenuProps:G,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Items per page"),hasValue:()=>u>0,children:(0,it.jsx)(uk,{perPage:u,offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Offset"),hasValue:()=>d>0,onDeselect:()=>o({offset:0}),children:(0,it.jsx)(dk,{offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Max pages to show"),hasValue:()=>l>0,onDeselect:()=>o({pages:0}),children:(0,it.jsx)(pk,{pages:l,onChange:o})})]}),!m&&O&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,pt.__)("Filters"),resetAll:()=>{o({author:"",parents:[],search:"",taxQuery:null,format:[]}),S("")},dropdownMenuProps:G,children:[L&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Taxonomies"),hasValue:()=>Object.values(g||{}).some((e=>!!e.length)),onDeselect:()=>o({taxQuery:null}),children:(0,it.jsx)(nk,{onChange:o,query:r})}),H&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Authors"),onDeselect:()=>o({author:""}),children:(0,it.jsx)(Qv,{value:s,onChange:o})}),R&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!j,label:(0,pt.__)("Keyword"),onDeselect:()=>{o({search:""}),S("")},children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Keyword"),value:j,onChange:e=>{B(e),S(e)}})}),V&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!h?.length,label:(0,pt.__)("Parents"),onDeselect:()=>o({parents:[]}),children:(0,it.jsx)(Xv,{parents:h,postType:c,onChange:o})}),E&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,pt.__)("Formats"),onDeselect:()=>o({format:[]}),children:(0,it.jsx)(sk,{onChange:o,query:r})})]})]})}const gk="wp-block-query-enhanced-pagination-modal__description";function hk({clientId:e,attributes:{enhancedPagination:t},setAttributes:o}){const[n,r]=(0,gt.useState)(!1),a=Uv(e);(0,gt.useEffect)((()=>{t&&a&&(o({enhancedPagination:!1}),r(!0))}),[t,a,o]);const i=()=>{r(!1)},s=(0,pt.__)("Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.")+" "+(0,pt.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return n&&(0,it.jsx)(mt.Modal,{title:(0,pt.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:gk},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:i,children:(0,it.jsxs)(mt.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,it.jsx)("span",{id:gk,children:s}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:i,children:(0,pt.__)("OK")})]})})}function _k(e=""){return e=(e=su()(e)).trim().toLowerCase()}function xk(e,t){const o=_k(t),n=_k(e.title);let r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every((e=>n.includes(e)))&&(r+=10)}return r}function bk(e=[],t=""){if(!t)return e;const o=e.map((e=>[e,xk(e,t)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))}function fk({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o}){return(0,it.jsx)(mt.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,pt.__)("Choose a pattern"),onRequestClose:()=>o(!1),isFullScreen:!0,children:(0,it.jsx)(vk,{clientId:e,attributes:t})})}function yk(e,t){const o=function(e,t){return(0,lt.useSelect)((o=>{const n=o(st.store).getActiveBlockVariation("core/query",t)?.name;if(!n)return"core/query";const{getBlockRootClientId:r,getPatternsByBlockTypes:a}=o(ct.store);return a(`core/query/${n}`,r(e)).length>0?`core/query/${n}`:"core/query"}),[e,t])}(e,t),n=((e,t)=>(0,lt.useSelect)((o=>{const{getBlockRootClientId:n,getPatternsByBlockTypes:r}=o(ct.store),a=n(e);return r(t,a)}),[t,e]))(e,o);return(0,gt.useMemo)((()=>n.filter((e=>e.blocks?.[0]?.name===o))),[n,o])}function vk({clientId:e,attributes:t,showTitlesAsTooltip:o=!1,showSearch:n=!0}){const[r,a]=(0,gt.useState)(""),{replaceBlock:i,selectBlock:s}=(0,lt.useDispatch)(ct.store),l=yk(e,t),c=(0,gt.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),u=(0,gt.useMemo)((()=>bk(l,r)),[l,r]);return(0,it.jsxs)("div",{className:"block-library-query-pattern__selection-content",children:[n&&(0,it.jsx)("div",{className:"block-library-query-pattern__selection-search",children:(0,it.jsx)(mt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:(0,pt.__)("Search"),placeholder:(0,pt.__)("Search")})}),(0,it.jsx)(ct.BlockContextProvider,{value:c,children:(0,it.jsx)(ct.__experimentalBlockPatternsList,{blockPatterns:u,onClickPattern:(o,n)=>{const{newBlocks:r,queryClientIds:a}=((e,t)=>{const{query:{postType:o,inherit:n},namespace:r}=t,a=e.map((e=>(0,st.cloneBlock)(e))),i=[],s=[...a];for(;s.length>0;){const e=s.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:o,inherit:n},r&&(e.attributes.namespace=r),i.push(e.clientId)),e.innerBlocks?.forEach((e=>{s.push(e)}))}return{newBlocks:a,queryClientIds:i}})(n,t);i(e,r),a[0]&&s(a[0])},showTitlesAsTooltip:o})})]})}function kk({clientId:e,attributes:t,hasInnerBlocks:o}){if(!yk(e,t).length)return null;const n=o?(0,pt.__)("Change design"):(0,pt.__)("Choose pattern");return(0,it.jsx)(mt.ToolbarGroup,{className:"wp-block-template-part__block-control-group",children:(0,it.jsx)(mt.__experimentalDropdownContentWrapper,{children:(0,it.jsx)(mt.Dropdown,{contentClassName:"block-editor-block-settings-menu__popover",focusOnMount:"firstElement",expandOnMobile:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-haspopup":"true","aria-expanded":e,onClick:t,children:n}),renderContent:()=>(0,it.jsx)(vk,{clientId:e,attributes:t,showSearch:!1,showTitlesAsTooltip:!0})})})})}const{HTMLElementControl:wk}=jo(ct.privateApis),Ck=[["core/post-template"]];function jk({attributes:e,setAttributes:t,clientId:o,context:n,name:r}){const{queryId:a,query:i,enhancedPagination:s,tagName:l="div",query:{inherit:c}={}}=e,{templateSlug:u}=n,{isSingular:d}=function(e){if(!e)return{isSingular:!0};let t=!1,o="wp"===e?"custom":e;const n=e.includes("-")?e.split("-",1)[0]:e;return(e.includes("-")?e.split("-").slice(1).join("-"):"")&&(o=n),t=["404","blank","single","page","custom"].includes(o),{isSingular:t,templateType:o}}(u),{__unstableMarkNextChangeAsNotPersistent:p}=(0,lt.useDispatch)(ct.store),m=(0,xt.useInstanceId)(jk),g=(0,ct.useBlockProps)(),h=(0,ct.useInnerBlocksProps)(g,{template:Ck}),{postsPerPage:_}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{getEntityRecord:o,getEntityRecordEdits:n,canUser:r}=e(_t.store),a=r("read",{kind:"root",name:"site"})?+o("root","site")?.posts_per_page:+t().postsPerPage;return{postsPerPage:+n("root","site")?.posts_per_page||a||3}}),[]),x=(0,gt.useCallback)((e=>t((t=>({query:{...t.query,...e}})))),[t]);return(0,gt.useEffect)((()=>{const e={};(c&&i.perPage!==_||!i.perPage&&_)&&(e.perPage=_),Object.keys(e).length&&(p(),x(e))}),[i.perPage,c,_,p,x]),(0,gt.useEffect)((()=>{Number.isFinite(a)||(p(),t({queryId:m}))}),[a,m,p,t]),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(kk,{clientId:o,attributes:e,hasInnerBlocks:!0})}),(0,it.jsx)(hk,{attributes:e,setAttributes:t,clientId:o}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mk,{name:r,attributes:e,setQuery:x,setAttributes:t,clientId:o,isSingular:d})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(wk,{tagName:l,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]}),(0,it.jsx)(qv,{enhancedPagination:s,setAttributes:t,clientId:o})]}),(0,it.jsx)(l,{...h})]})}function Sk({attributes:e,clientId:t,name:o,openPatternSelectionModal:n}){const[r,a]=(0,gt.useState)(!1),[i,s]=(0,gt.useState)(0),l=(0,xt.useResizeObserver)((([e])=>{s(e.contentRect.width)})),c=i>0&&i<160,{blockType:u,activeBlockVariation:d}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockType:r}=t(st.store);return{blockType:r(o),activeBlockVariation:n(o,e)}}),[o,e]),p=!!yk(t,e).length,m=d?.icon?.src||d?.icon||u?.icon?.src,g=d?.title||u?.title,h=(0,ct.useBlockProps)({ref:l});return r?(0,it.jsx)(Bk,{clientId:t,attributes:e,icon:m,label:g}):(0,it.jsxs)("div",{...h,children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(kk,{clientId:t,attributes:e,hasInnerBlocks:!1})}),(0,it.jsxs)(mt.Placeholder,{className:"block-editor-media-placeholder",icon:!c&&m,label:!c&&g,instructions:!c&&(0,pt.__)("Choose a pattern for the query loop or start blank."),withIllustration:c,children:[!!p&&!c&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,children:(0,pt.__)("Choose")}),!c&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{a(!0)},children:(0,pt.__)("Start blank")})]})]})}function Bk({clientId:e,attributes:t,icon:o,label:n}){const r=function(e){const{activeVariationName:t,blockVariations:o}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:o,getBlockVariations:n}=t(st.store);return{activeVariationName:o("core/query",e)?.name,blockVariations:n("core/query","block")}}),[e]);return(0,gt.useMemo)((()=>{const e=e=>!e.attributes?.namespace;if(!t)return o.filter(e);const n=o.filter((e=>e.attributes?.namespace?.includes(t)));return n.length?n:o.filter(e)}),[t,o])}(t),{replaceInnerBlocks:a}=(0,lt.useDispatch)(ct.store),i=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...i,children:(0,it.jsx)(ct.__experimentalBlockVariationPicker,{icon:o,label:n,variations:r,onSelect:t=>{t.innerBlocks&&a(e,(0,st.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!1)}})})}var Tk=e=>{const{clientId:t,attributes:o}=e,[n,r]=(0,gt.useState)(!1),a=(0,lt.useSelect)((e=>!!e(ct.store).getBlocks(t).length),[t])?jk:Sk;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(a,{...e,openPatternSelectionModal:()=>r(!0)}),n&&(0,it.jsx)(fk,{clientId:t,attributes:o,setIsPatternSelectionModalOpen:r})]})};const Nk=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"})}),Pk=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"})}),Ik=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"})}),Dk=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"})}),Mk=["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}];var zk=[{name:"title-date",title:(0,pt.__)("Title & Date"),icon:Nk,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],Mk]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-excerpt",title:(0,pt.__)("Title & Excerpt"),icon:Pk,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-date-excerpt",title:(0,pt.__)("Title, Date, & Excerpt"),icon:Ik,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],Mk,["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"image-date-title",title:(0,pt.__)("Image, Date, & Title"),icon:Dk,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-featured-image"],Mk,["core/post-title"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]}];const{cleanEmptyObject:Ak}=jo(ct.privateApis),Lk=e=>{const{query:t}=e,{categoryIds:o,tagIds:n,...r}=t;return(t.categoryIds?.length||t.tagIds?.length)&&(r.taxQuery={category:t.categoryIds?.length?t.categoryIds:void 0,post_tag:t.tagIds?.length?t.tagIds:void 0}),{...e,query:r}},Hk=(e,t)=>{const{style:o,backgroundColor:n,gradient:r,textColor:a,...i}=e;if(!(n||r||a||o?.color||o?.elements?.link))return[e,t];if(o&&(i.style=Ak({...o,color:void 0,elements:{...o.elements,link:void 0}})),Rk(t)){const e=t[0],s=o?.color||o?.elements?.link||e.attributes.style?Ak({...e.attributes.style,color:o?.color,elements:o?.elements?.link?{link:o?.elements?.link}:void 0}):void 0;return[i,[(0,st.createBlock)("core/group",{...e.attributes,backgroundColor:n,gradient:r,textColor:a,style:s},e.innerBlocks)]]}return[i,[(0,st.createBlock)("core/group",{backgroundColor:n,gradient:r,textColor:a,style:Ak({color:o?.color,elements:o?.elements?.link?{link:o?.elements?.link}:void 0})},t)]]},Rk=(e=[])=>1===e.length&&"core/group"===e[0].name,Vk=e=>{const{layout:t=null}=e;if(!t)return e;const{inherit:o=null,contentSize:n=null,...r}=t;return o||n?{...e,layout:{...r,contentSize:n,type:"constrained"}}:e},Fk=(e=[])=>{let t=null;for(const o of e){if("core/post-template"===o.name){t=o;break}o.innerBlocks.length&&(t=Fk(o.innerBlocks))}return t},Ek=(e=[],t)=>(e.forEach(((o,n)=>{"core/post-template"===o.name?e.splice(n,1,t):o.innerBlocks.length&&(o.innerBlocks=Ek(o.innerBlocks,t))})),e),Ok=(e,t)=>{const{displayLayout:o=null,...n}=e;if(!o)return[e,t];const r=Fk(t);if(!r)return[e,t];const{type:a,columns:i}=o,s="flex"===a?"grid":"default",l=(0,st.createBlock)("core/post-template",{...r.attributes,layout:{type:s,...i&&{columnCount:i}}},r.innerBlocks);return[n,Ek(t,l)]},Gk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},layout:{type:"object",default:{type:"list"}}},supports:{html:!1},migrate(e,t){const o=Lk(e),{layout:n,...r}=o,a={...r,displayLayout:o.layout};return Ok(a,t)},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})},$k={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},layout:!0},isEligible:({query:{categoryIds:e,tagIds:t}={}})=>e||t,migrate(e,t){const o=Lk(e),[n,r]=Hk(o,t),a=Vk(n);return Ok(a,r)},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})}},Uk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},isEligible(e){const{style:t,backgroundColor:o,gradient:n,textColor:r}=e;return o||n||r||t?.color||t?.elements?.link},migrate(e,t){const[o,n]=Hk(e,t),r=Vk(o);return Ok(r,n)},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})}},qk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate(e,t){const o=Vk(e);return Ok(o,t)}};var Wk=[{attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,layout:!0},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},isEligible:({displayLayout:e})=>!!e,migrate:Ok},qk,Uk,$k,Gk];const{name:Zk}=Vv,Jk={icon:Rv,edit:Tk,example:{viewportWidth:650,attributes:{namespace:"core/posts-list",query:{perPage:4,pages:1,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",sticky:"exclude",inherit:!1}},innerBlocks:[{name:"core/post-template",attributes:{layout:{type:"grid",columnCount:2}},innerBlocks:[{name:"core/post-title"},{name:"core/post-date",attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}},{name:"core/post-excerpt"}]}]},save:function({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},variations:zk,deprecated:Wk},Qk=()=>jt({name:Zk,metadata:Vv,settings:Jk}),Kk=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-no-results","title":"No Results","category":"theme","description":"Contains the block elements used to render content when no query results are found.","ancestor":["core/query"],"textdomain":"default","usesContext":["queryId","query"],"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),Yk=[["core/paragraph",{placeholder:(0,pt.__)("Add text or blocks that will display when a query returns no results.")}]];const{name:Xk}=Kk,ew={icon:Rv,edit:function(){const e=(0,ct.useBlockProps)(),t=(0,ct.useInnerBlocksProps)(e,{template:Yk});return(0,it.jsx)("div",{...t})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("No posts were found.")}}]}},tw=()=>jt({name:Xk,metadata:Kk,settings:ew}),ow=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination","title":"Pagination","category":"theme","ancestor":["core/query"],"allowedBlocks":["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],"description":"Displays a paginated navigation to next/previous set of posts, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"},"showLabel":{"type":"boolean","default":true}},"usesContext":["queryId","query"],"providesContext":{"paginationArrow":"paginationArrow","showLabel":"showLabel"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-editor","style":"wp-block-query-pagination"}');function nw({value:e,onChange:t}){return(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:e,onChange:t,help:(0,pt.__)("A decorative arrow appended to the next and previous page link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Query Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks")})]})}function rw({value:e,onChange:t}){return(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show label text"),help:(0,pt.__)('Make label text visible, e.g. "Next Page".'),onChange:t,checked:!0===e})}const aw=[["core/query-pagination-previous"],["core/query-pagination-numbers"],["core/query-pagination-next"]];var iw=[{save:()=>(0,it.jsx)("div",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}];const{name:sw}=ow,lw={icon:ii,edit:function({attributes:{paginationArrow:e,showLabel:t},setAttributes:o,clientId:n}){const r=(0,lt.useSelect)((e=>{const{getBlocks:t}=e(ct.store),o=t(n);return o?.find((e=>["core/query-pagination-next","core/query-pagination-previous"].includes(e.name)))}),[n]),{__unstableMarkNextChangeAsNotPersistent:a}=(0,lt.useDispatch)(ct.store),i=vt(),s=(0,ct.useBlockProps)(),l=(0,ct.useInnerBlocksProps)(s,{template:aw});return(0,gt.useEffect)((()=>{"none"!==e||t||(a(),o({showLabel:!0}))}),[e,o,t,a]),(0,it.jsxs)(it.Fragment,{children:[r&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({paginationArrow:"none",showLabel:!0})},dropdownMenuProps:i,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"none"!==e,label:(0,pt.__)("Pagination arrow"),onDeselect:()=>o({paginationArrow:"none"}),isShownByDefault:!0,children:(0,it.jsx)(nw,{value:e,onChange:e=>{o({paginationArrow:e})}})}),"none"!==e&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!t,label:(0,pt.__)("Show text"),onDeselect:()=>o({showLabel:!0}),isShownByDefault:!0,children:(0,it.jsx)(rw,{value:t,onChange:e=>{o({showLabel:e})}})})]})}),(0,it.jsx)("nav",{...l})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},deprecated:iw},cw=()=>jt({name:sw,metadata:ow,settings:lw}),uw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-next","title":"Next Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the next posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),dw={none:"",arrow:"→",chevron:"»"};const{name:pw}=uw,mw={icon:mi,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:o,showLabel:n}}){const r=dw[o];return(0,it.jsxs)("a",{href:"#pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[n&&(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Next page link"),placeholder:(0,pt.__)("Next Page"),value:e,onChange:e=>t({label:e})}),r&&(0,it.jsx)("span",{className:`wp-block-query-pagination-next-arrow is-arrow-${o}`,"aria-hidden":!0,children:r})]})}},gw=()=>jt({name:pw,metadata:uw,settings:mw}),hw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-numbers","title":"Page Numbers","category":"theme","parent":["core/query-pagination"],"description":"Displays a list of page numbers for pagination.","textdomain":"default","attributes":{"midSize":{"type":"number","default":2}},"usesContext":["queryId","query","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-numbers-editor"}'),_w=(e,t="a",o="")=>(0,it.jsx)(t,{className:`page-numbers ${o}`,children:e},e);const{name:xw}=hw,bw={icon:fi,edit:function({attributes:e,setAttributes:t}){const{midSize:o}=e,n=(e=>{const t=[];for(let o=1;o<=e;o++)t.push(_w(o));t.push(_w(e+1,"span","current"));for(let o=1;o<=e;o++)t.push(_w(e+1+o));return t.push(_w("...","span","dots")),t.push(_w(2*e+3)),(0,it.jsx)(it.Fragment,{children:t})})(parseInt(o,10)),r=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>t({midSize:2}),dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Number of links"),hasValue:()=>2!==o,onDeselect:()=>t({midSize:2}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Number of links"),help:(0,pt.__)("Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."),value:o,onChange:e=>{t({midSize:parseInt(e,10)})},min:0,max:5,withInputField:!1})})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:n})]})},example:{}},fw=()=>jt({name:xw,metadata:hw,settings:bw}),yw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-previous","title":"Previous Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the previous posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),vw={none:"",arrow:"←",chevron:"«"};const{name:kw}=yw,ww={icon:ei,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:o,showLabel:n}}){const r=vw[o];return(0,it.jsxs)("a",{href:"#pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[r&&(0,it.jsx)("span",{className:`wp-block-query-pagination-previous-arrow is-arrow-${o}`,"aria-hidden":!0,children:r}),n&&(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Previous page link"),placeholder:(0,pt.__)("Previous Page"),value:e,onChange:e=>t({label:e})})]})}},Cw=()=>jt({name:kw,metadata:yw,settings:ww}),jw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-title","title":"Query Title","category":"theme","description":"Display the query title.","textdomain":"default","attributes":{"type":{"type":"string"},"textAlign":{"type":"string"},"level":{"type":"number","default":1},"levelOptions":{"type":"array"},"showPrefix":{"type":"boolean","default":true},"showSearchTerm":{"type":"boolean","default":true}},"example":{"attributes":{"type":"search"}},"usesContext":["query"],"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-query-title"}');const Sw=["archive","search","post-type"];const Bw=[{isDefault:!0,name:"archive-title",title:(0,pt.__)("Archive Title"),description:(0,pt.__)("Display the archive title based on the queried object."),icon:ji,attributes:{type:"archive"},scope:["inserter"]},{isDefault:!1,name:"search-title",title:(0,pt.__)("Search Results Title"),description:(0,pt.__)("Display the search results title based on the queried object."),icon:ji,attributes:{type:"search"},scope:["inserter"]},{isDefault:!1,name:"post-type-label",title:(0,pt.__)("Post Type Label"),description:(0,pt.__)("Display the post type label based on the queried object."),icon:ji,attributes:{type:"post-type"},scope:["inserter"]}];Bw.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Tw=Bw;const Nw={attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Pw=[Nw];const{name:Iw}=jw,Dw={icon:ji,edit:function({attributes:{type:e,level:t,levelOptions:o,textAlign:n,showPrefix:r,showSearchTerm:a},setAttributes:i,context:{query:s}}){const{archiveTypeLabel:l,archiveNameLabel:c}=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n,r,a=!1;if(t)t[1]?o=t[2]?t[2]:t[1]:t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(a=!0,t[2]&&(r=t[2]))}return(0,lt.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:i,getAuthors:s}=e(_t.store);let l,c;if(o&&(l=i(o)?.labels?.singular_name),n){const e=t("taxonomy",o,{slug:n,per_page:1});e&&e[0]&&(c=e[0].name)}if(a&&(l="Author",r)){const e=s({slug:r});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[r,a,o,n])}(),{postTypeLabel:u}=function(e){const t=(0,lt.useSelect)((e=>{const{getCurrentPostType:t}=e("core/editor");return t()}),[]);return(0,lt.useSelect)((o=>{const{getPostType:n}=o(_t.store),r=n(e||t);return{postTypeLabel:r?r.labels.singular_name:""}}),[e,t])}(s?.postType),d=vt(),p=0===t?"p":`h${t}`,m=(0,ct.useBlockProps)({className:Dt("wp-block-query-title__placeholder",{[`has-text-align-${n}`]:n})});if(!Sw.includes(e))return(0,it.jsx)("div",{...m,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Provided type is not supported.")})});let g;if("archive"===e){let e;e=l?r?c?(0,pt.sprintf)((0,pt._x)("%1$s: %2$s","archive label"),l,c):(0,pt.sprintf)((0,pt.__)("%s: Name"),l):c||(0,pt.sprintf)((0,pt.__)("%s name"),l):r?(0,pt.__)("Archive type: Name"):(0,pt.__)("Archive title"),g=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>i({showPrefix:!0}),dropdownMenuProps:d,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,pt.__)("Show archive type in title"),onDeselect:()=>i({showPrefix:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show archive type in title"),onChange:()=>i({showPrefix:!r}),checked:r})})})}),(0,it.jsx)(p,{...m,children:e})]})}if("search"===e&&(g=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>i({showSearchTerm:!0}),dropdownMenuProps:d,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!a,label:(0,pt.__)("Show search term in title"),onDeselect:()=>i({showSearchTerm:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show search term in title"),onChange:()=>i({showSearchTerm:!a}),checked:a})})})}),(0,it.jsx)(p,{...m,children:a?(0,pt.__)("Search results for: “search term”"):(0,pt.__)("Search results")})]})),"post-type"===e){let e;e=u?r?(0,pt.sprintf)((0,pt.__)('Post Type: "%s"'),u):u:r?(0,pt.__)("Post Type: Name"):(0,pt.__)("Name"),g=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>i({showPrefix:!0}),dropdownMenuProps:d,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,pt.__)("Show post type label"),onDeselect:()=>i({showPrefix:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post type label"),onChange:()=>i({showPrefix:!r}),checked:r})})})}),(0,it.jsx)(p,{...m,children:e})]})}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:t,options:o,onChange:e=>i({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{i({textAlign:e})}})]}),g]})},variations:Tw,deprecated:Pw},Mw=()=>jt({name:Iw,metadata:jw,settings:Dw}),zw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-total","title":"Query Total","category":"theme","ancestor":["core/query"],"description":"Display the total number of results in a query.","textdomain":"default","attributes":{"displayType":{"type":"string","default":"total-results"}},"usesContext":["queryId","query"],"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-query-total"}'),Aw=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,it.jsx)(mt.Path,{d:"M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z"})}),Lw=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,it.jsx)(mt.Path,{d:"M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z"})}),Hw=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,it.jsx)(mt.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z"})});const{name:Rw}=zw,Vw={icon:Hw,edit:function({attributes:e,setAttributes:t}){const{displayType:o}=e,n=(0,ct.useBlockProps)(),r=[{role:"menuitemradio",title:(0,pt.__)("Total results"),isActive:"total-results"===o,icon:Aw,onClick:()=>{t({displayType:"total-results"})}},{role:"menuitemradio",title:(0,pt.__)("Range display"),isActive:"range-display"===o,icon:Lw,onClick:()=>{t({displayType:"range-display"})}}],a=(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:(()=>{switch(o){case"total-results":return Aw;case"range-display":return Lw}})(),label:(0,pt.__)("Change display type"),controls:r})})});return(0,it.jsxs)("div",{...n,children:[a,"total-results"===o?(0,it.jsx)(it.Fragment,{children:(0,pt.__)("12 results found")}):"range-display"===o?(0,it.jsx)(it.Fragment,{children:(0,pt.__)("Displaying 1 – 10 of 12")}):null]})}},Fw=()=>jt({name:Rw,metadata:zw,settings:Vw});var Ew=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})});const Ow=e=>{const{value:t,...o}=e;return[{...o},t?(0,st.parseWithAttributeSchema)(t,{type:"array",source:"query",selector:"p",query:{content:{type:"string",source:"html"}}}).map((({content:e})=>(0,st.createBlock)("core/paragraph",{content:e}))):(0,st.createBlock)("core/paragraph")]},Gw=["left","right","center"],$w=(e,t)=>{const{align:o,...n}=e;return[Gw.includes(o)?{...n,textAlign:o}:e,t]},Uw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},align:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalOnEnter:!0,__experimentalOnMerge:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}}},isEligible:({align:e})=>Gw.includes(e),save({attributes:e}){const{align:t,citation:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsxs)("blockquote",{...ct.useBlockProps.save({className:n}),children:[(0,it.jsx)(ct.InnerBlocks.Content,{}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},migrate:$w},qw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}}},save({attributes:e}){const{align:t,value:o,citation:n}=e,r=Dt({[`has-text-align-${t}`]:t});return(0,it.jsxs)("blockquote",{...ct.useBlockProps.save({className:r}),children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:n})]})},migrate:e=>$w(...Ow(e))},Ww={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},migrate:e=>$w(...Ow(e)),save({attributes:e}){const{align:t,value:o,citation:n}=e;return(0,it.jsxs)("blockquote",{style:{textAlign:t||null},children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:n})]})}},Zw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(2===e.style){const{style:t,...o}=e;return $w(...((e,t)=>[{...e,className:e.className?e.className+" is-style-large":"is-style-large"},t])(...Ow(o)))}return $w(...Ow(e))},save({attributes:e}){const{align:t,value:o,citation:n,style:r}=e;return(0,it.jsxs)("blockquote",{className:2===r?"is-large":"",style:{textAlign:t||null},children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:n})]})}},Jw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"footer",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(!isNaN(parseInt(e.style))){const{style:t,...o}=e;return $w(...Ow(o))}return $w(...Ow(e))},save({attributes:e}){const{align:t,value:o,citation:n,style:r}=e;return(0,it.jsxs)("blockquote",{className:`blocks-quote-style-${r}`,style:{textAlign:t||null},children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"footer",value:n})]})}};var Qw=[Uw,qw,Ww,Zw,Jw],Kw=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});const Yw="web"===gt.Platform.OS,Xw=[["core/paragraph",{}]];const eC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/quote","title":"Quote","category":"text","description":"Give quoted text visual emphasis. \\"In quoting others, we cite ourselves.\\" — Julio Cortázar","keywords":["blockquote","cite"],"textdomain":"default","attributes":{"value":{"type":"string","source":"html","selector":"blockquote","multiline":"p","default":"","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"__experimentalOnEnter":true,"__experimentalOnMerge":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"layout":{"allowEditing":false},"spacing":{"blockGap":true,"padding":true,"margin":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"plain","label":"Plain"}],"editorStyle":"wp-block-quote-editor","style":"wp-block-quote"}');const tC={from:[{type:"block",blocks:["core/pullquote"],transform:({value:e,align:t,citation:o,anchor:n,fontSize:r,style:a})=>(0,st.createBlock)("core/quote",{align:t,citation:o,anchor:n,fontSize:r,style:a},[(0,st.createBlock)("core/paragraph",{content:e})])},{type:"prefix",prefix:">",transform:e=>(0,st.createBlock)("core/quote",{},[(0,st.createBlock)("core/paragraph",{content:e})])},{type:"raw",schema:()=>({blockquote:{children:"*"}}),selector:"blockquote",transform:(e,t)=>(0,st.createBlock)("core/quote",{},t({HTML:e.innerHTML,mode:"BLOCKS"}))},{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>1===e.length?["core/paragraph","core/heading","core/list","core/pullquote"].includes(e[0].name):!e.some((({name:e})=>"core/quote"===e)),__experimentalConvert:e=>(0,st.createBlock)("core/quote",{},e.map((e=>(0,st.createBlock)(e.name,e.attributes,e.innerBlocks))))}],to:[{type:"block",blocks:["core/pullquote"],isMatch:({},e)=>e.innerBlocks.every((({name:e})=>"core/paragraph"===e)),transform:({align:e,citation:t,anchor:o,fontSize:n,style:r},a)=>{const i=a.map((({attributes:e})=>`${e.content}`)).join("<br>");return(0,st.createBlock)("core/pullquote",{value:i,align:e,citation:t,anchor:o,fontSize:n,style:r})}},{type:"block",blocks:["core/paragraph"],transform:({citation:e},t)=>ct.RichText.isEmpty(e)?t:[...t,(0,st.createBlock)("core/paragraph",{content:e})]},{type:"block",blocks:["core/group"],transform:({citation:e,anchor:t},o)=>(0,st.createBlock)("core/group",{anchor:t},ct.RichText.isEmpty(e)?o:[...o,(0,st.createBlock)("core/paragraph",{content:e})])}],ungroup:({citation:e},t)=>ct.RichText.isEmpty(e)?t:[...t,(0,st.createBlock)("core/paragraph",{content:e})]};var oC=tC;const{name:nC}=eC,rC={icon:Ew,example:{attributes:{citation:(0,pt.__)("Julio Cortázar")},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("In quoting others, we cite ourselves.")}}]},transforms:oC,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:o,clientId:n,className:r,style:a,isSelected:i}){const{textAlign:s,allowedBlocks:l}=e;((e,t)=>{const o=(0,lt.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:r}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{if(!e.value)return;const[a,i]=Ow(e);Wm()("Value attribute on the quote block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,a),r(t,i)}))}),[e.value])})(e,n);const c=(0,ct.useBlockProps)({className:Dt(r,{[`has-text-align-${s}`]:s}),...!Yw&&{style:a}}),u=(0,ct.useInnerBlocksProps)(c,{template:Xw,templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0,renderAppender:!1,allowedBlocks:l});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:s,onChange:e=>{t({textAlign:e})}})}),(0,it.jsxs)(mt.BlockQuotation,{...u,children:[u.children,(0,it.jsx)(zo,{attributeKey:"citation",tagName:Yw?"cite":"p",style:Yw&&{display:"block"},isSelected:i,attributes:e,setAttributes:t,__unstableMobileNoFocusOnMount:!0,icon:Kw,label:(0,pt.__)("Quote citation"),placeholder:(0,pt.__)("Add citation"),addLabel:(0,pt.__)("Add citation"),removeLabel:(0,pt.__)("Remove citation"),excludeElementClassName:!0,className:"wp-block-quote__citation",insertBlocksAfter:o,...Yw?{}:{textAlign:s}})]})]})},save:function({attributes:e}){const{textAlign:t,citation:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsxs)("blockquote",{...ct.useBlockProps.save({className:n}),children:[(0,it.jsx)(ct.InnerBlocks.Content,{}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},deprecated:Qw},aC=()=>jt({name:nC,metadata:eC,settings:rC});var iC=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const sC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/block","title":"Pattern","category":"reusable","description":"Reuse this design across your site.","keywords":["reusable"],"textdomain":"default","attributes":{"ref":{"type":"number"},"content":{"type":"object","default":{}}},"providesContext":{"pattern/overrides":"content"},"supports":{"customClassName":false,"html":false,"inserter":false,"renaming":false,"interactivity":{"clientNavigation":true}}}'),lC=window.wp.patterns,{useLayoutClasses:cC}=jo(ct.privateApis),{hasOverridableBlocks:uC}=jo(lC.privateApis),dC=["full","wide","left","right"];function pC(){const e=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})})}const mC=()=>{};function gC({recordId:e,canOverrideBlocks:t,hasContent:o,handleEditOriginal:n,resetContent:r}){const a=(0,lt.useSelect)((t=>!!t(_t.store).canUser("update",{kind:"postType",name:"wp_block",id:e})),[e]);return(0,it.jsxs)(it.Fragment,{children:[a&&!!n&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:n,children:(0,pt.__)("Edit original")})})}),t&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:r,disabled:!o,children:(0,pt.__)("Reset")})})})]})}function hC({name:e,attributes:{ref:t,content:o},__unstableParentLayout:n,setAttributes:r}){const{record:a,hasResolved:i}=(0,_t.useEntityRecord)("postType","wp_block",t),[s]=(0,_t.useEntityBlockEditor)("postType","wp_block",{id:t}),l=i&&!a,{__unstableMarkLastChangeAsPersistent:c}=(0,lt.useDispatch)(ct.store),{onNavigateToEntityRecord:u,hasPatternOverridesSource:d}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,hasPatternOverridesSource:!!(0,st.getBlockBindingsSource)("core/pattern-overrides")}}),[]),p=(0,gt.useMemo)((()=>d&&uC(s)),[d,s]),{alignment:m,layout:g}=((e,t)=>{const o=(0,gt.useRef)();return(0,gt.useMemo)((()=>{if(!e?.length)return{};let n=o.current;if(void 0===n){const r="constrained"===t?.type,a=e.some((e=>dC.includes(e.attributes.align)));n=r&&a?"full":null,o.current=n}return{alignment:n,layout:n?t:void 0}}),[e,t])})(s,n),h=cC({layout:g},e),_=(0,ct.useBlockProps)({className:Dt("block-library-block__reusable-block-container",g&&h,{[`align${m}`]:m})}),x=(0,ct.useInnerBlocksProps)(_,{layout:g,value:s,onInput:mC,onChange:mC,renderAppender:s?.length?void 0:ct.InnerBlocks.ButtonBlockAppender});let b=null;return l&&(b=(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block has been deleted or is unavailable.")})),i||(b=(0,it.jsx)(mt.Placeholder,{children:(0,it.jsx)(mt.Spinner,{})})),(0,it.jsxs)(it.Fragment,{children:[i&&!l&&(0,it.jsx)(gC,{recordId:t,canOverrideBlocks:p,hasContent:!!o,handleEditOriginal:u?()=>{u({postId:t,postType:"wp_block"})}:void 0,resetContent:()=>{o&&(c(),r({content:void 0}))}}),null===b?(0,it.jsx)("div",{...x}):(0,it.jsx)("div",{..._,children:b})]})}const _C={attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({content:e})=>!!e&&Object.keys(e).every((t=>{return e[t].values&&("object"==typeof(o=e[t].values)&&!Array.isArray(o)&&null!==o);var o})),migrate(e){const{content:t,...o}=e;if(t&&Object.keys(t).length){const e={...t};for(const o in t)e[o]=t[o].values;return{...o,content:e}}return e}},xC={attributes:{ref:{type:"number"},overrides:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({overrides:e})=>!!e,migrate(e){const{overrides:t,...o}=e,n={};return Object.keys(t).forEach((e=>{n[e]=t[e]})),{...o,content:n}}};var bC=[_C,xC];const{name:fC}=sC,yC={deprecated:bC,edit:function(e){const{ref:t}=e.attributes;return(0,ct.useHasRecursion)(t)?(0,it.jsx)(pC,{}):(0,it.jsx)(ct.RecursionProvider,{uniqueId:t,children:(0,it.jsx)(hC,{...e})})},icon:iC,__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,lt.select)(_t.store).getEditedEntityRecord("postType","wp_block",e);return t?.title?(0,ao.decodeEntities)(t.title):void 0}},vC=()=>jt({name:fC,metadata:sC,settings:yC}),kC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/read-more","title":"Read More","category":"theme","description":"Displays the link of a post, page, or any other content-type.","textdomain":"default","attributes":{"content":{"type":"string","role":"content"},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postId"],"supports":{"html":false,"color":{"gradients":true,"text":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true,"textDecoration":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"width":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-read-more"}');const{name:wC}=kC,CC={icon:gn,edit:function({attributes:{content:e,linkTarget:t},setAttributes:o,insertBlocksAfter:n}){const r=(0,ct.useBlockProps)(),a=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>o({linkTarget:"_self"}),dropdownMenuProps:a,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==t,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})})})}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:"a","aria-label":(0,pt.__)("“Read more” link text"),placeholder:(0,pt.__)("Read more"),value:e,onChange:e=>o({content:e}),__unstableOnSplitAtEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)())),withoutInteractiveFormatting:!0,...r})]})},example:{attributes:{content:(0,pt.__)("Read more")}}},jC=()=>jt({name:wC,metadata:kC,settings:CC});var SC=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"})});const BC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/rss","title":"RSS","category":"widgets","description":"Display entries from any RSS or Atom feed.","keywords":["atom","feed"],"textdomain":"default","attributes":{"columns":{"type":"number","default":2},"blockLayout":{"type":"string","default":"list"},"feedURL":{"type":"string","default":"","role":"content"},"itemsToShow":{"type":"number","default":5},"displayExcerpt":{"type":"boolean","default":false},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":55},"openInNewTab":{"type":"boolean","default":false},"rel":{"type":"string"}},"supports":{"align":true,"html":false,"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"color":{"background":true,"text":true,"gradients":true,"link":true}},"editorStyle":"wp-block-rss-editor","style":"wp-block-rss"}');const{name:TC}=BC,NC={icon:SC,example:{attributes:{feedURL:"https://wordpress.org"}},edit:function({attributes:e,setAttributes:t}){const[o,n]=(0,gt.useState)(!e.feedURL),{blockLayout:r,columns:a,displayAuthor:i,displayDate:s,displayExcerpt:l,excerptLength:c,feedURL:u,itemsToShow:d,openInNewTab:p,rel:m}=e,g=vt();function h(o){return()=>{const n=e[o];t({[o]:!n})}}const _=(0,ct.useBlockProps)(),x=(0,pt.__)("RSS URL");if(o)return(0,it.jsx)("div",{..._,children:(0,it.jsx)(mt.Placeholder,{icon:SC,label:x,instructions:(0,pt.__)("Display entries from any RSS or Atom feed."),children:(0,it.jsxs)("form",{onSubmit:function(e){e.preventDefault(),u&&(t({feedURL:(0,no.prependHTTP)(u)}),n(!1))},className:"wp-block-rss__placeholder-form",children:[(0,it.jsx)(mt.__experimentalInputControl,{__next40pxDefaultSize:!0,label:x,type:"url",hideLabelFromVision:!0,placeholder:(0,pt.__)("Enter URL here…"),value:u,onChange:e=>t({feedURL:e}),className:"wp-block-rss__placeholder-input"}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,pt.__)("Apply")})]})})});const b=[{icon:$l,title:(0,pt.__)("Edit RSS URL"),onClick:()=>n(!0)},{icon:jm,title:(0,pt._x)("List view","RSS block display setting"),onClick:()=>t({blockLayout:"list"}),isActive:"list"===r},{icon:qd,title:(0,pt._x)("Grid view","RSS block display setting"),onClick:()=>t({blockLayout:"grid"}),isActive:"grid"===r}],f={...e,style:{...e?.style,border:void 0,spacing:void 0}};return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:b})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({itemsToShow:5,displayAuthor:!1,displayDate:!1,displayExcerpt:!1,excerptLength:55,columns:2,openInNewTab:!1})},dropdownMenuProps:g,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Number of items"),hasValue:()=>5!==d,onDeselect:()=>t({itemsToShow:5}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Number of items"),value:d,onChange:e=>t({itemsToShow:e}),min:1,max:20,required:!0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display author"),hasValue:()=>!!i,onDeselect:()=>t({displayAuthor:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display author"),checked:i,onChange:h("displayAuthor")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display date"),hasValue:()=>!!s,onDeselect:()=>t({displayDate:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display date"),checked:s,onChange:h("displayDate")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display excerpt"),hasValue:()=>!!l,onDeselect:()=>t({displayExcerpt:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display excerpt"),checked:l,onChange:h("displayExcerpt")})}),l&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Max number of words in excerpt"),hasValue:()=>55!==c,onDeselect:()=>t({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Max number of words in excerpt"),value:c,onChange:e=>t({excerptLength:e}),min:10,max:100,required:!0})}),"grid"===r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Columns"),hasValue:()=>2!==a,onDeselect:()=>t({columns:2}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:a,onChange:e=>t({columns:e}),min:2,max:6,required:!0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open links in new tab"),hasValue:()=>!!p,onDeselect:()=>t({openInNewTab:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open links in new tab"),checked:p,onChange:e=>t({openInNewTab:e})})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m||"",onChange:e=>t({rel:e})})}),(0,it.jsx)("div",{..._,children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/rss",attributes:f})})})]})}},PC=()=>jt({name:TC,metadata:BC,settings:NC});var IC=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const DC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/search","title":"Search","category":"widgets","description":"Help visitors find your content.","keywords":["find"],"textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true},"placeholder":{"type":"string","default":"","role":"content"},"width":{"type":"number"},"widthUnit":{"type":"string"},"buttonText":{"type":"string","role":"content"},"buttonPosition":{"type":"string","default":"button-outside"},"buttonUseIcon":{"type":"boolean","default":false},"query":{"type":"object","default":{}},"isSearchFieldHidden":{"type":"boolean","default":false}},"supports":{"align":["left","center","right"],"color":{"gradients":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":true,"typography":{"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-search__label, .wp-block-search__input, .wp-block-search__button","fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"spacing":{"margin":true},"html":false},"editorStyle":"wp-block-search-editor","style":"wp-block-search"}');function MC(e){return"%"===e}const zC=[25,50,75,100];var AC=[{name:"default",isDefault:!0,attributes:{buttonText:(0,pt.__)("Search"),label:(0,pt.__)("Search")}}];const{name:LC}=DC,HC={icon:IC,example:{attributes:{buttonText:(0,pt.__)("Search"),label:(0,pt.__)("Search")},viewportWidth:400},variations:AC,edit:function({className:e,attributes:t,setAttributes:o,toggleSelection:n,isSelected:r,clientId:a}){const{label:i,showLabel:s,placeholder:l,width:c,widthUnit:u,align:d,buttonText:p,buttonPosition:m,buttonUseIcon:g,isSearchFieldHidden:h,style:_}=t,x=(0,lt.useSelect)((e=>{const{getBlockParentsByBlockName:t,wasBlockJustInserted:o}=e(ct.store);return!!t(a,"core/navigation")?.length&&o(a)}),[a]),{__unstableMarkNextChangeAsNotPersistent:b}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{x&&(b(),o({showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"}))}),[b,x,o]);const f=_?.border?.radius;let y=(0,ct.__experimentalUseBorderProps)(t);"number"==typeof f&&(y={...y,style:{...y.style,borderRadius:`${f}px`}});const v=(0,ct.__experimentalUseColorProps)(t),[k,w]=(0,ct.useSettings)("typography.fluid","layout"),C=(0,ct.getTypographyClassesAndStyles)(t,{typography:{fluid:k},layout:{wideSize:w?.wideSize}}),j=`wp-block-search__width-${(0,xt.useInstanceId)(mt.__experimentalUnitControl)}`,S="button-inside"===m,B="button-outside"===m,T="no-button"===m,N="button-only"===m,P=(0,gt.useRef)(),I=(0,gt.useRef)(),D=(0,mt.__experimentalUseCustomUnits)({availableUnits:["%","px"],defaultValues:{"%":50,px:350}});(0,gt.useEffect)((()=>{N&&!r&&o({isSearchFieldHidden:!0})}),[N,r,o]),(0,gt.useEffect)((()=>{N&&r&&o({isSearchFieldHidden:!1})}),[N,r,o,c]);const M=[{label:(0,pt.__)("Button outside"),value:"button-outside"},{label:(0,pt.__)("Button inside"),value:"button-inside"},{label:(0,pt.__)("No button"),value:"no-button"},{label:(0,pt.__)("Button only"),value:"button-only"}],z=()=>{const e=Dt("wp-block-search__input",S?void 0:y.className,C.className),t={...S?{borderRadius:y.style?.borderRadius,borderTopLeftRadius:y.style?.borderTopLeftRadius,borderTopRightRadius:y.style?.borderTopRightRadius,borderBottomLeftRadius:y.style?.borderBottomLeftRadius,borderBottomRightRadius:y.style?.borderBottomRightRadius}:y.style,...C.style,textDecoration:void 0};return(0,it.jsx)("input",{type:"search",className:e,style:t,"aria-label":(0,pt.__)("Optional placeholder text"),placeholder:l?void 0:(0,pt.__)("Optional placeholder…"),value:l,onChange:e=>o({placeholder:e.target.value}),ref:P})},A=vt(),L=(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({width:void 0,widthUnit:void 0,showLabel:!0,buttonUseIcon:!1,buttonPosition:"button-outside",isSearchFieldHidden:!1})},dropdownMenuProps:A,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!s,label:(0,pt.__)("Show label"),onDeselect:()=>{o({showLabel:!0})},isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,pt.__)("Show label"),onChange:e=>o({showLabel:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"button-outside"!==m,label:(0,pt.__)("Button position"),onDeselect:()=>{o({buttonPosition:"button-outside",isSearchFieldHidden:!1})},isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{value:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Button position"),onChange:e=>{o({buttonPosition:e,isSearchFieldHidden:"button-only"===e})},options:M})}),"no-button"!==m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!g,label:(0,pt.__)("Use button with icon"),onDeselect:()=>{o({buttonUseIcon:!1})},isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:g,label:(0,pt.__)("Use button with icon"),onChange:e=>o({buttonUseIcon:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,pt.__)("Width"),onDeselect:()=>{o({width:void 0,widthUnit:void 0})},isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalVStack,{children:[(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Width"),id:j,min:MC(u)?0:220,max:MC(u)?100:void 0,step:1,onChange:e=>{const t=""===e?void 0:parseInt(e,10);o({width:t})},onUnitChange:e=>{o({width:"%"===e?50:350,widthUnit:e})},__unstableInputWidth:"80px",value:`${c}${u}`,units:D}),(0,it.jsx)(mt.__experimentalToggleGroupControl,{label:(0,pt.__)("Percentage Width"),value:zC.includes(c)&&"%"===u?c:void 0,hideLabelFromVision:!0,onChange:e=>{o({width:e,widthUnit:"%"})},isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:zC.map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e,label:(0,pt.sprintf)((0,pt.__)("%d%%"),e)},e)))})]})})]})})}),H=e=>(e=>void 0!==e&&0!==parseInt(e,10))(e)?`calc(${e} + 4px)`:void 0,R=(0,ct.useBlockProps)({className:Dt(e,S?"wp-block-search__button-inside":void 0,B?"wp-block-search__button-outside":void 0,T?"wp-block-search__no-button":void 0,N?"wp-block-search__button-only":void 0,g||T?void 0:"wp-block-search__text-button",g&&!T?"wp-block-search__icon-button":void 0,N&&h?"wp-block-search__searchfield-hidden":void 0),style:{...C.style,textDecoration:void 0}}),V=Dt("wp-block-search__label",C.className);return(0,it.jsxs)("div",{...R,children:[L,s&&(0,it.jsx)(ct.RichText,{identifier:"label",className:V,"aria-label":(0,pt.__)("Label text"),placeholder:(0,pt.__)("Add label…"),withoutInteractiveFormatting:!0,value:i,onChange:e=>o({label:e}),style:C.style}),(0,it.jsxs)(mt.ResizableBox,{size:{width:void 0===c?"auto":`${c}${u}`,height:"auto"},className:Dt("wp-block-search__inside-wrapper",S?y.className:void 0),style:(()=>{const e=S?y.style:{borderRadius:y.style?.borderRadius,borderTopLeftRadius:y.style?.borderTopLeftRadius,borderTopRightRadius:y.style?.borderTopRightRadius,borderBottomLeftRadius:y.style?.borderBottomLeftRadius,borderBottomRightRadius:y.style?.borderBottomRightRadius};if(S){if("object"==typeof f){const{borderTopLeftRadius:t,borderTopRightRadius:o,borderBottomLeftRadius:n,borderBottomRightRadius:r}=y.style;return{...e,borderTopLeftRadius:H(t),borderTopRightRadius:H(o),borderBottomLeftRadius:H(n),borderBottomRightRadius:H(r)}}const t=Number.isInteger(f)?`${f}px`:f;e.borderRadius=`calc(${t} + 4px)`}return e})(),minWidth:220,enable:N?{}:{right:"right"!==d,left:"right"===d},onResizeStart:(e,t,r)=>{o({width:parseInt(r.offsetWidth,10),widthUnit:"px"}),n(!1)},onResizeStop:(e,t,r,a)=>{o({width:parseInt(c+a.width,10)}),n(!0)},showHandle:r,children:[(S||B||N)&&(0,it.jsxs)(it.Fragment,{children:[z(),(()=>{const e=Dt("wp-block-search__button",v.className,C.className,S?void 0:y.className,g?"has-icon":void 0,(0,ct.__experimentalGetElementClassName)("button")),t={...v.style,...C.style,...S?{borderRadius:y.style?.borderRadius,borderTopLeftRadius:y.style?.borderTopLeftRadius,borderTopRightRadius:y.style?.borderTopRightRadius,borderBottomLeftRadius:y.style?.borderBottomLeftRadius,borderBottomRightRadius:y.style?.borderBottomRightRadius}:y.style},n=()=>{N&&o({isSearchFieldHidden:!h})};return(0,it.jsxs)(it.Fragment,{children:[g&&(0,it.jsx)("button",{type:"button",className:e,style:t,"aria-label":p?(0,lu.__unstableStripHTML)(p):(0,pt.__)("Search"),onClick:n,ref:I,children:(0,it.jsx)(Rh,{icon:IC})}),!g&&(0,it.jsx)(ct.RichText,{identifier:"buttonText",className:e,style:t,"aria-label":(0,pt.__)("Button text"),placeholder:(0,pt.__)("Add button text…"),withoutInteractiveFormatting:!0,value:p,onChange:e=>o({buttonText:e}),onClick:n})]})})()]}),T&&z()]})]})}},RC=()=>jt({name:LC,metadata:DC,settings:HC});var VC=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"})});const FC=({tagName:e,setAttributes:t})=>(0,it.jsx)(mt.SelectControl,{label:(0,pt.__)("HTML element"),value:e,onChange:e=>t({tagName:e}),options:[{label:(0,pt.__)("Default (<hr>)"),value:"hr"},{label:"<div>",value:"div"}],help:"hr"===e?(0,pt.__)("Only select <hr> if the separator conveys important information and should be announced by screen readers."):(0,pt.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0});const EC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/separator","title":"Separator","category":"design","description":"Create a break between ideas or sections with a horizontal separator.","keywords":["horizontal-line","hr","divider"],"textdomain":"default","attributes":{"opacity":{"type":"string","default":"alpha-channel"},"tagName":{"type":"string","enum":["hr","div"],"default":"hr"}},"supports":{"anchor":true,"align":["center","wide","full"],"color":{"enableContrastChecker":false,"__experimentalSkipSerialization":true,"gradients":true,"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"margin":["top","bottom"]},"interactivity":{"clientNavigation":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"wide","label":"Wide Line"},{"name":"dots","label":"Dots"}],"editorStyle":"wp-block-separator-editor","style":"wp-block-separator"}');var OC={from:[{type:"enter",regExp:/^-{3,}$/,transform:()=>(0,st.createBlock)("core/separator")},{type:"raw",selector:"hr",schema:{hr:{}}}],to:[{type:"block",blocks:["core/spacer"],transform:({anchor:e})=>(0,st.createBlock)("core/spacer",{anchor:e||""})}]};const GC={attributes:{color:{type:"string"},customColor:{type:"string"}},save({attributes:e}){const{color:t,customColor:o}=e,n=(0,ct.getColorClassName)("background-color",t),r=(0,ct.getColorClassName)("color",t),a=Dt({"has-text-color has-background":t||o,[n]:n,[r]:r}),i={backgroundColor:n?void 0:o,color:r?void 0:o};return(0,it.jsx)("hr",{...ct.useBlockProps.save({className:a,style:i})})},migrate(e){const{color:t,customColor:o,...n}=e;return{...n,backgroundColor:t||void 0,opacity:"css",style:o?{color:{background:o}}:void 0,tagName:"hr"}}};var $C=[GC];const{name:UC}=EC,qC={icon:VC,example:{attributes:{customColor:"#065174",className:"is-style-wide"}},transforms:OC,edit:function({attributes:e,setAttributes:t}){const{backgroundColor:o,opacity:n,style:r,tagName:a}=e,i=(0,ct.__experimentalUseColorProps)(e),s=i?.style?.backgroundColor,l=!!r?.color?.background;!function(e,t,o){const[n,r]=(0,gt.useState)(!1),a=(0,xt.usePrevious)(t);(0,gt.useEffect)((()=>{"css"!==e||t||a||r(!0)}),[t,a,e]),(0,gt.useEffect)((()=>{"css"===e&&(n&&t||a&&t!==a)&&(o({opacity:"alpha-channel"}),r(!1))}),[n,t,a])}(n,s,t);const c=(0,ct.getColorClassName)("color",o),u=Dt({"has-text-color":o||s,[c]:c,"has-css-opacity":"css"===n,"has-alpha-channel-opacity":"alpha-channel"===n},i.className),d={color:s,backgroundColor:s},p="hr"===a?mt.HorizontalRule:a;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(FC,{tagName:a,setAttributes:t})}),(0,it.jsx)(p,{...(0,ct.useBlockProps)({className:u,style:l?d:void 0})})]})},save:function({attributes:e}){const{backgroundColor:t,style:o,opacity:n,tagName:r}=e,a=o?.color?.background,i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.getColorClassName)("color",t),l=Dt({"has-text-color":t||a,[s]:s,"has-css-opacity":"css"===n,"has-alpha-channel-opacity":"alpha-channel"===n},i.className),c={backgroundColor:i?.style?.backgroundColor,color:s?void 0:a};return(0,it.jsx)(r,{...ct.useBlockProps.save({className:l,style:c})})},deprecated:$C},WC=()=>jt({name:UC,metadata:EC,settings:qC});var ZC=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"})});const JC=window.wp.autop;var QC={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:(e,{content:t})=>(0,JC.removep)((0,JC.autop)(t))}},priority:20}]};const KC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/shortcode","title":"Shortcode","category":"widgets","description":"Insert additional custom elements with a WordPress shortcode.","textdomain":"default","attributes":{"text":{"type":"string","source":"raw","role":"content"}},"supports":{"className":false,"customClassName":false,"html":false},"editorStyle":"wp-block-shortcode-editor"}'),{name:YC}=KC,XC={icon:ZC,transforms:QC,edit:function e({attributes:t,setAttributes:o}){const n=`blocks-shortcode-input-${(0,xt.useInstanceId)(e)}`;return(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Placeholder,{icon:ZC,label:(0,pt.__)("Shortcode"),children:(0,it.jsx)(ct.PlainText,{className:"blocks-shortcode__textarea",id:n,value:t.text,"aria-label":(0,pt.__)("Shortcode text"),placeholder:(0,pt.__)("Write shortcode here…"),onChange:e=>o({text:e})})})})},save:function({attributes:e}){return(0,it.jsx)(gt.RawHTML,{children:e.text})}},ej=()=>jt({name:YC,metadata:KC,settings:XC});var tj=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z"})});const oj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-logo","title":"Site Logo","category":"theme","description":"Display an image to represent this site. Update this block and the changes apply everywhere.","textdomain":"default","attributes":{"width":{"type":"number"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"shouldSyncIcon":{"type":"boolean"}},"example":{"viewportWidth":500,"attributes":{"width":350,"className":"block-editor-block-types-list__site-logo-example"}},"supports":{"html":false,"align":true,"alignWide":false,"color":{"text":false,"background":false},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true},"filter":{"duotone":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"selectors":{"filter":{"duotone":".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"}},"editorStyle":"wp-block-site-logo-editor","style":"wp-block-site-logo"}'),nj=["image"],rj="image/*",aj=({alt:e,attributes:{align:t,width:o,height:n,isLink:r,linkTarget:a,shouldSyncIcon:i},isSelected:s,setAttributes:l,setLogo:c,logoUrl:u,siteUrl:d,logoId:p,iconId:m,setIcon:g,canUserEdit:h})=>{const _=(0,xt.useViewportMatch)("medium"),x=!["wide","full"].includes(t)&&_,[{naturalWidth:b,naturalHeight:f},y]=(0,gt.useState)({}),[v,k]=(0,gt.useState)(!1),{toggleSelection:w}=(0,lt.useDispatch)(ct.store),C=vt(),j="contentOnly"===(0,ct.useBlockEditingMode)(),{imageEditing:S,maxWidth:B,title:T}=(0,lt.useSelect)((e=>{const t=e(ct.store).getSettings(),o=e(_t.store).getEntityRecord("root","__unstableBase");return{title:o?.name,imageEditing:t.imageEditing,maxWidth:t.maxWidth}}),[]);(0,gt.useEffect)((()=>{i&&p!==m&&l({shouldSyncIcon:!1})}),[]),(0,gt.useEffect)((()=>{s||k(!1)}),[s]);const N=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{className:"custom-logo",src:u,alt:e,onLoad:e=>{y({naturalWidth:e.target.naturalWidth,naturalHeight:e.target.naturalHeight})}}),(0,ht.isBlobURL)(u)&&(0,it.jsx)(mt.Spinner,{})]});let P=N;if(r&&(P=(0,it.jsx)("a",{href:d,className:"custom-logo-link",rel:"home",title:T,onClick:e=>e.preventDefault(),children:N})),!x||!b||!f)return(0,it.jsx)("div",{style:{width:o,height:n},children:P});const I=o||120,D=b/f,M=I/D,z=b<f?ad:Math.ceil(ad*D),A=f<b?ad:Math.ceil(ad/D),L=2.5*B;let H=!1,R=!1;"center"===t?(H=!0,R=!0):(0,pt.isRTL)()?"left"===t?H=!0:R=!0:"right"===t?R=!0:H=!0;const V=p&&b&&f&&S,F=!j;let E;E=V&&v?(0,it.jsx)(ct.__experimentalImageEditor,{id:p,url:u,width:I,height:M,naturalHeight:f,naturalWidth:b,onSaveImage:e=>{c(e.id)},onFinishEditing:()=>{k(!1)}}):(0,it.jsx)(mt.ResizableBox,{size:{width:I,height:M},showHandle:s&&F,minWidth:z,maxWidth:L,minHeight:A,maxHeight:L/D,lockAspectRatio:!0,enable:{top:!1,right:H,bottom:!0,left:R},onResizeStart:function(){w(!1)},onResizeStop:(e,t,o,n)=>{w(!0),l({width:parseInt(I+n.width,10),height:parseInt(M+n.height,10)})},children:P});const O=!window?.__experimentalUseCustomizerSiteLogoUrl?d+"/wp-admin/options-general.php":d+"/wp-admin/customize.php?autofocus[section]=title_tagline",G=(0,gt.createInterpolateElement)((0,pt.__)("Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."),{a:(0,it.jsx)("a",{href:O,target:"_blank",rel:"noopener noreferrer"})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),dropdownMenuProps:C,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!o,label:(0,pt.__)("Image width"),onDeselect:()=>l({width:void 0}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image width"),onChange:e=>l({width:e}),min:z,max:L,initialPosition:Math.min(120,L),value:o||"",disabled:!x})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!r,label:(0,pt.__)("Link image to home"),onDeselect:()=>l({isLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link image to home"),onChange:()=>l({isLink:!r}),checked:r})}),r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>"_blank"===a,label:(0,pt.__)("Open in new tab"),onDeselect:()=>l({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})}),h&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!i,label:(0,pt.__)("Use as Site Icon"),onDeselect:()=>{l({shouldSyncIcon:!1}),g(void 0)},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Use as Site Icon"),onChange:e=>{l({shouldSyncIcon:e}),g(e?p:void 0)},checked:!!i,help:G})})]})}),V&&!v&&F&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>k(!0),icon:Up,label:(0,pt.__)("Crop")})}),E]})};function ij({mediaURL:e,...t}){return(0,it.jsx)(ct.MediaReplaceFlow,{...t,mediaURL:e,allowedTypes:nj,accept:rj})}const sj=({media:e,itemGroupProps:t})=>{const{alt_text:o,source_url:n,slug:r,media_details:a}=e??{},i=a?.sizes?.full?.file||r;return(0,it.jsx)(mt.__experimentalItemGroup,{...t,as:"span",children:(0,it.jsxs)(mt.__experimentalHStack,{justify:"flex-start",as:"span",children:[(0,it.jsx)("img",{src:n,alt:o}),(0,it.jsx)(mt.FlexItem,{as:"span",children:(0,it.jsx)(mt.__experimentalTruncate,{numberOfLines:1,className:"block-library-site-logo__inspector-media-replace-title",children:i})})]})})};var lj={to:[{type:"block",blocks:["core/site-title"],transform:({isLink:e,linkTarget:t})=>(0,st.createBlock)("core/site-title",{isLink:e,linkTarget:t})}]};const{name:cj}=oj,uj={icon:tj,example:{},edit:function({attributes:e,className:t,setAttributes:o,isSelected:n}){const{width:r,shouldSyncIcon:a}=e,{siteLogoId:i,canUserEdit:s,url:l,siteIconId:c,mediaItemData:u,isRequestingMediaItem:d}=(0,lt.useSelect)((e=>{const{canUser:t,getEntityRecord:o,getEditedEntityRecord:n}=e(_t.store),r=t("update",{kind:"root",name:"site"}),a=r?n("root","site"):void 0,i=o("root","__unstableBase"),s=r?a?.site_logo:i?.site_logo,l=a?.site_icon,c=s&&e(_t.store).getEntityRecord("postType","attachment",s,{context:"view"}),u=!!s&&!e(_t.store).hasFinishedResolution("getEntityRecord",["postType","attachment",s,{context:"view"}]);return{siteLogoId:s,canUserEdit:r,url:i?.home,mediaItemData:c,isRequestingMediaItem:u,siteIconId:l}}),[]),{getSettings:p}=(0,lt.useSelect)(ct.store),[m,g]=(0,gt.useState)(),h=vt(),{editEntityRecord:_}=(0,lt.useDispatch)(_t.store),x=(e,t=!1)=>{(a||t)&&b(e),_("root","site",void 0,{site_logo:e})},b=e=>_("root","site",void 0,{site_icon:e??null}),{alt_text:f,source_url:y}=u??{},v=e=>{if(void 0===a){const t=!c;return o({shouldSyncIcon:t}),void k(e,t)}k(e)},k=(e,t=!1)=>{if(e)return!e.id&&e.url?(g(e.url),void x(void 0)):void x(e.id,t)},{createErrorNotice:w}=(0,lt.useDispatch)(bo.store),C=e=>{w(e,{type:"snackbar"}),g()},j=e=>{p().mediaUpload({allowedTypes:nj,filesList:e,onFileChange([e]){(0,ht.isBlobURL)(e?.url)?g(e.url):v(e)},onError:C,multiple:!1})},S={mediaURL:y,name:y?(0,pt.__)("Replace"):(0,pt.__)("Choose logo"),onSelect:k,onError:C,onReset:()=>{x(null),o({width:void 0})}},B=s&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ij,{...S})});let T;const N=void 0===i||d;N&&(T=(0,it.jsx)(mt.Spinner,{})),(0,gt.useEffect)((()=>{y&&m&&g()}),[y,m]),(y||m)&&(T=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(aj,{alt:f,attributes:e,className:t,isSelected:n,setAttributes:o,logoUrl:m||y,setLogo:x,logoId:u?.id||i,siteUrl:l,setIcon:b,iconId:c,canUserEdit:s}),s&&(0,it.jsx)(mt.DropZone,{onFilesDrop:j})]}));const P=Dt(t,{"is-default-size":!r,"is-transient":m}),I=(0,ct.useBlockProps)({className:P}),D=(s||y)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Media"),dropdownMenuProps:h,children:s?(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!y,label:(0,pt.__)("Logo"),isShownByDefault:!0,children:(0,it.jsxs)("div",{className:"block-library-site-logo__inspector-media-replace-container",children:[(0,it.jsx)(ij,{...S,name:y?(0,it.jsx)(sj,{media:u}):(0,pt.__)("Choose logo"),renderToggle:e=>(0,it.jsx)(mt.Button,{...e,__next40pxDefaultSize:!0,children:m?(0,it.jsx)(mt.Spinner,{}):e.children})}),(0,it.jsx)(mt.DropZone,{onFilesDrop:j})]})}):(0,it.jsx)("div",{className:"block-library-site-logo__inspector-media-replace-container",style:{gridColumn:"1 / -1"},children:(0,it.jsx)(sj,{media:u,itemGroupProps:{isBordered:!0,className:"block-library-site-logo__inspector-readonly-logo-preview"}})})})});return(0,it.jsxs)("div",{...I,children:[B,D,(!!y||!!m)&&T,(N||!m&&!y&&!s)&&(0,it.jsx)(mt.Placeholder,{className:"site-logo_placeholder",withIllustration:!0,children:N&&(0,it.jsx)("span",{className:"components-placeholder__preview",children:(0,it.jsx)(mt.Spinner,{})})}),!N&&!m&&!y&&s&&(0,it.jsx)(ct.MediaPlaceholder,{onSelect:v,accept:rj,allowedTypes:nj,onError:C,placeholder:e=>{const o=Dt("block-editor-media-placeholder",t);return(0,it.jsx)(mt.Placeholder,{className:o,preview:T,withIllustration:!0,style:{width:r},children:e})},mediaLibraryButton:({open:e})=>(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,icon:Wp,variant:"primary",label:(0,pt.__)("Choose logo"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{e()}})})]})},transforms:lj},dj=()=>jt({name:cj,metadata:oj,settings:uj}),pj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-tagline","title":"Site Tagline","category":"theme","description":"Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.","keywords":["description"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]}},"example":{"viewportWidth":350,"attributes":{"textAlign":"center"}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"contentRole":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-tagline-editor","style":"wp-block-site-tagline"}');var mj=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:(0,it.jsx)(mt.Path,{d:"M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"})});const gj={attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var hj=[gj];const{name:_j}=pj,xj={icon:mj,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:o}){const{textAlign:n,level:r,levelOptions:a}=e,{canUserEdit:i,tagline:s}=(0,lt.useSelect)((e=>{const{canUser:t,getEntityRecord:o,getEditedEntityRecord:n}=e(_t.store),r=t("update",{kind:"root",name:"site"}),a=r?n("root","site"):{},i=o("root","__unstableBase");return{canUserEdit:r,tagline:r?a?.description:i?.description}}),[]),l=0===r?"p":`h${r}`,{editEntityRecord:c}=(0,lt.useDispatch)(_t.store),u=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n,"wp-block-site-tagline__placeholder":!i&&!s})}),d=i?(0,it.jsx)(ct.RichText,{allowedFormats:[],onChange:function(e){c("root","site",void 0,{description:e})},"aria-label":(0,pt.__)("Site tagline text"),placeholder:(0,pt.__)("Write site tagline…"),tagName:l,value:s,disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,st.createBlock)((0,st.getDefaultBlockName)())),...u}):(0,it.jsx)(l,{...u,children:s||(0,pt.__)("Site Tagline placeholder")});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:r,options:a,onChange:e=>t({level:e})}),(0,it.jsx)(ct.AlignmentControl,{onChange:e=>t({textAlign:e}),value:n})]}),d]})},deprecated:hj},bj=()=>jt({name:_j,metadata:pj,settings:xj});var fj=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})});const yj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-title","title":"Site Title","category":"theme","description":"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.","textdomain":"default","attributes":{"level":{"type":"number","default":1},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]},"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":500},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-title-editor","style":"wp-block-site-title"}');const vj={attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var kj=[vj];var wj={to:[{type:"block",blocks:["core/site-logo"],transform:({isLink:e,linkTarget:t})=>(0,st.createBlock)("core/site-logo",{isLink:e,linkTarget:t})}]};const{name:Cj}=yj,jj={icon:fj,example:{viewportWidth:350,attributes:{textAlign:"center"}},edit:function({attributes:e,setAttributes:t,insertBlocksAfter:o}){const{level:n,levelOptions:r,textAlign:a,isLink:i,linkTarget:s}=e,{canUserEdit:l,title:c}=(0,lt.useSelect)((e=>{const{canUser:t,getEntityRecord:o,getEditedEntityRecord:n}=e(_t.store),r=t("update",{kind:"root",name:"site"}),a=r?n("root","site"):{},i=o("root","__unstableBase");return{canUserEdit:r,title:r?a?.title:i?.name}}),[]),{editEntityRecord:u}=(0,lt.useDispatch)(_t.store),d=vt(),p=(0,ct.useBlockEditingMode)(),m=0===n?"p":`h${n}`,g=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${a}`]:a,"wp-block-site-title__placeholder":!l&&!c})}),h=l?(0,it.jsx)(m,{...g,children:(0,it.jsx)(ct.RichText,{tagName:i?"a":"span",href:i?"#site-title-pseudo-link":void 0,"aria-label":(0,pt.__)("Site title text"),placeholder:(0,pt.__)("Write site title…"),value:c,onChange:function(e){u("root","site",void 0,{title:e.trim()})},allowedFormats:[],disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,st.createBlock)((0,st.getDefaultBlockName)()))})}):(0,it.jsx)(m,{...g,children:i?(0,it.jsx)("a",{href:"#site-title-pseudo-link",onClick:e=>e.preventDefault(),children:(0,ao.decodeEntities)(c)||(0,pt.__)("Site Title placeholder")}):(0,it.jsx)("span",{children:(0,ao.decodeEntities)(c)||(0,pt.__)("Site Title placeholder")})});return(0,it.jsxs)(it.Fragment,{children:["default"===p&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>t({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!i,label:(0,pt.__)("Make title link to home"),onDeselect:()=>t({isLink:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make title link to home"),onChange:()=>t({isLink:!i}),checked:i})}),i&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"_self"!==s,label:(0,pt.__)("Open in new tab"),onDeselect:()=>t({linkTarget:"_self"}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===s})})]})}),h]})},transforms:wj,deprecated:kj},Sj=()=>jt({name:Cj,metadata:yj,settings:jj});var Bj=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})}),Tj=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})});const Nj=()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})});const Pj=({url:e,setAttributes:t,setPopover:o,popoverAnchor:n,clientId:r})=>{const{removeBlock:a}=(0,lt.useDispatch)(ct.store);return(0,it.jsx)(ct.URLPopover,{anchor:n,"aria-label":(0,pt.__)("Edit social link"),onClose:()=>{o(!1),n?.focus()},children:(0,it.jsx)("form",{className:"block-editor-url-popover__link-editor",onSubmit:e=>{e.preventDefault(),o(!1),n?.focus()},children:(0,it.jsx)("div",{className:"block-editor-url-input",children:(0,it.jsx)(ct.URLInput,{value:e,onChange:e=>t({url:e}),placeholder:(0,pt.__)("Enter social link"),label:(0,pt.__)("Enter social link"),hideLabelFromVision:!0,disableSuggestions:!0,onKeyDown:t=>{e||t.defaultPrevented||![mn.BACKSPACE,mn.DELETE].includes(t.keyCode)||a(r)},suffix:(0,it.jsx)(mt.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,it.jsx)(mt.Button,{icon:Tj,label:(0,pt.__)("Apply"),type:"submit",size:"small"})})})})})})};var Ij=({attributes:e,context:t,isSelected:o,setAttributes:n,clientId:r,name:a})=>{const{url:i,service:s,label:l="",rel:c}=e,u=vt(),{showLabels:d,iconColor:p,iconColorValue:m,iconBackgroundColor:g,iconBackgroundColorValue:h}=t,[_,x]=(0,gt.useState)(!1),b=Dt("wp-social-link","wp-block-social-link","wp-social-link-"+s,{"wp-social-link__is-incomplete":!i,[`has-${p}-color`]:p,[`has-${g}-background-color`]:g}),[f,y]=(0,gt.useState)(null),v="contentOnly"===(0,ct.useBlockEditingMode)(),{activeVariation:k}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:o}=t(st.store);return{activeVariation:o(a,e)}}),[a,e]),{icon:w,label:C}=(j=k,j?.name?{icon:j?.icon??Nj,label:j?.title??(0,pt.__)("Social Icon")}:{icon:Nj,label:(0,pt.__)("Social Icon")});var j;const S=""===l.trim()?C:l,B=(0,gt.useRef)(),T=(0,ct.useBlockProps)({className:"wp-block-social-link-anchor",ref:(0,xt.useMergeRefs)([y,B]),onClick:()=>x(!0),onKeyDown:e=>{e.keyCode===mn.ENTER&&(e.preventDefault(),x(!0))}});return(0,it.jsxs)(it.Fragment,{children:[v&&d&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":e,children:(0,pt.__)("Text")}),renderContent:()=>(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-social-link__toolbar_content_text",label:(0,pt.__)("Text"),help:(0,pt.__)("Provide a text label or use the default."),value:l,onChange:e=>n({label:e}),placeholder:C})})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({label:void 0})},dropdownMenuProps:u,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Text"),hasValue:()=>!!l,onDeselect:()=>{n({label:void 0})},children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Text"),help:(0,pt.__)("The text is visible when enabled from the parent Social Icons block."),value:l,onChange:e=>n({label:e}),placeholder:C})})})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:c||"",onChange:e=>n({rel:e})})}),(0,it.jsxs)("li",{role:"presentation",className:b,style:{color:m,backgroundColor:h},children:[(0,it.jsxs)("button",{"aria-haspopup":"dialog",...T,role:"button",children:[(0,it.jsx)(mt.Icon,{icon:w}),(0,it.jsx)("span",{className:Dt("wp-block-social-link-label",{"screen-reader-text":!d}),children:S})]}),o&&_&&(0,it.jsx)(Pj,{url:i,setAttributes:n,setPopover:x,popoverAnchor:f,clientId:r})]})]})};const Dj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-link","title":"Social Icon","category":"widgets","parent":["core/social-links"],"description":"Display an icon linking to a social profile or site.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"service":{"type":"string"},"label":{"type":"string","role":"content"},"rel":{"type":"string"}},"usesContext":["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],"supports":{"reusable":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-social-link-editor"}'),Mj=[{isDefault:!0,name:"wordpress",attributes:{service:"wordpress"},title:(0,pt._x)("WordPress","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"})})},{name:"fivehundredpx",attributes:{service:"fivehundredpx"},title:(0,pt._x)("500px","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"})})},{name:"amazon",attributes:{service:"amazon"},title:(0,pt._x)("Amazon","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"})})},{name:"bandcamp",attributes:{service:"bandcamp"},title:(0,pt._x)("Bandcamp","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"})})},{name:"behance",attributes:{service:"behance"},title:(0,pt._x)("Behance","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"})})},{name:"bluesky",attributes:{service:"bluesky"},title:(0,pt._x)("Bluesky","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})})},{name:"chain",attributes:{service:"chain"},title:(0,pt._x)("Link","social link block variation name"),icon:Nj},{name:"codepen",attributes:{service:"codepen"},title:(0,pt._x)("CodePen","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"})})},{name:"deviantart",attributes:{service:"deviantart"},title:(0,pt._x)("DeviantArt","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"})})},{name:"discord",attributes:{service:"discord"},title:(0,pt._x)("Discord","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z"})})},{name:"dribbble",attributes:{service:"dribbble"},title:(0,pt._x)("Dribbble","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"})})},{name:"dropbox",attributes:{service:"dropbox"},title:(0,pt._x)("Dropbox","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"})})},{name:"etsy",attributes:{service:"etsy"},title:(0,pt._x)("Etsy","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"})})},{name:"facebook",attributes:{service:"facebook"},title:(0,pt._x)("Facebook","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"})})},{name:"feed",attributes:{service:"feed"},title:(0,pt._x)("RSS Feed","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"})})},{name:"flickr",attributes:{service:"flickr"},title:(0,pt._x)("Flickr","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"})})},{name:"foursquare",attributes:{service:"foursquare"},title:(0,pt._x)("Foursquare","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"})})},{name:"goodreads",attributes:{service:"goodreads"},title:(0,pt._x)("Goodreads","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"})})},{name:"google",attributes:{service:"google"},title:(0,pt._x)("Google","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"})})},{name:"github",attributes:{service:"github"},title:(0,pt._x)("GitHub","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"})})},{name:"gravatar",attributes:{service:"gravatar"},title:(0,pt._x)("Gravatar","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z"})})},{name:"instagram",attributes:{service:"instagram"},title:(0,pt._x)("Instagram","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"})})},{name:"lastfm",attributes:{service:"lastfm"},title:(0,pt._x)("Last.fm","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"})})},{name:"linkedin",attributes:{service:"linkedin"},title:(0,pt._x)("LinkedIn","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"})})},{name:"mail",attributes:{service:"mail"},title:(0,pt._x)("Mail","social link block variation name"),keywords:["email","e-mail"],icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z"})})},{name:"mastodon",attributes:{service:"mastodon"},title:(0,pt._x)("Mastodon","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"})})},{name:"meetup",attributes:{service:"meetup"},title:(0,pt._x)("Meetup","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"})})},{name:"medium",attributes:{service:"medium"},title:(0,pt._x)("Medium","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"})})},{name:"patreon",attributes:{service:"patreon"},title:(0,pt._x)("Patreon","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z"})})},{name:"pinterest",attributes:{service:"pinterest"},title:(0,pt._x)("Pinterest","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})})},{name:"pocket",attributes:{service:"pocket"},title:(0,pt._x)("Pocket","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"})})},{name:"reddit",attributes:{service:"reddit"},title:(0,pt._x)("Reddit","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"})})},{name:"skype",attributes:{service:"skype"},title:(0,pt._x)("Skype","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"})}),scope:[]},{name:"snapchat",attributes:{service:"snapchat"},title:(0,pt._x)("Snapchat","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"})})},{name:"soundcloud",attributes:{service:"soundcloud"},title:(0,pt._x)("SoundCloud","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z"})})},{name:"spotify",attributes:{service:"spotify"},title:(0,pt._x)("Spotify","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"})})},{name:"telegram",attributes:{service:"telegram"},title:(0,pt._x)("Telegram","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 128 128",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"})})},{name:"threads",attributes:{service:"threads"},title:(0,pt._x)("Threads","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z"})})},{name:"tiktok",attributes:{service:"tiktok"},title:(0,pt._x)("TikTok","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z"})})},{name:"tumblr",attributes:{service:"tumblr"},title:(0,pt._x)("Tumblr","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"})})},{name:"twitch",attributes:{service:"twitch"},title:(0,pt._x)("Twitch","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"})})},{name:"twitter",attributes:{service:"twitter"},title:(0,pt._x)("Twitter","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"})})},{name:"vimeo",attributes:{service:"vimeo"},title:(0,pt._x)("Vimeo","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"})})},{name:"vk",attributes:{service:"vk"},title:(0,pt._x)("VK","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"})})},{name:"whatsapp",attributes:{service:"whatsapp"},title:(0,pt._x)("WhatsApp","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"})})},{name:"x",attributes:{service:"x"},keywords:["twitter"],title:(0,pt._x)("X","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"})})},{name:"yelp",attributes:{service:"yelp"},title:(0,pt._x)("Yelp","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"})})},{name:"youtube",attributes:{service:"youtube"},title:(0,pt._x)("YouTube","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"})})}];Mj.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.service===t.service)}));var zj=Mj;const{name:Aj}=Dj,Lj={icon:Bj,edit:Ij,variations:zj},Hj=()=>jt({name:Aj,metadata:Dj,settings:Lj}),Rj=[{attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab"},supports:{align:["left","center","right"],anchor:!0},migrate:e=>{if(e.layout)return e;const{className:t}=e,o="items-justified-",n=new RegExp(`\\b${o}[^ ]*[ ]?\\b`,"g"),r={...e,className:t?.replace(n,"").trim()},a=t?.match(n)?.[0]?.trim();return a&&Object.assign(r,{layout:{type:"flex",justifyContent:a.slice(16)}}),r},save:e=>{const{attributes:{iconBackgroundColorValue:t,iconColorValue:o,itemsJustification:n,size:r}}=e,a=Dt(r,{"has-icon-color":o,"has-icon-background-color":t,[`items-justified-${n}`]:n}),i={"--wp--social-links--icon-color":o,"--wp--social-links--icon-background-color":t};return(0,it.jsx)("ul",{...ct.useBlockProps.save({className:a,style:i}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];var Vj=Rj;const Fj=[{label:(0,pt.__)("Default"),value:""},{label:(0,pt.__)("Small"),value:"has-small-icon-size"},{label:(0,pt.__)("Normal"),value:"has-normal-icon-size"},{label:(0,pt.__)("Large"),value:"has-large-icon-size"},{label:(0,pt.__)("Huge"),value:"has-huge-icon-size"}];var Ej=(0,ct.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){const{clientId:t,attributes:o,iconBackgroundColor:n,iconColor:r,isSelected:a,setAttributes:i,setIconBackgroundColor:s,setIconColor:l}=e,{iconBackgroundColorValue:c,iconColorValue:u,openInNewTab:d,showLabels:p,size:m}=o,{hasSocialIcons:g,hasSelectedChild:h}=(0,lt.useSelect)((e=>{const{getBlockCount:o,hasSelectedInnerBlock:n}=e(ct.store);return{hasSocialIcons:o(t)>0,hasSelectedChild:n(t)}}),[t]),_=a||h,x=o.className?.includes("is-style-logos-only"),b=vt();(0,gt.useEffect)((()=>{if(x){let e;return i((t=>(e={iconBackgroundColor:t.iconBackgroundColor,iconBackgroundColorValue:t.iconBackgroundColorValue,customIconBackgroundColor:t.customIconBackgroundColor},{iconBackgroundColor:void 0,iconBackgroundColorValue:void 0,customIconBackgroundColor:void 0}))),()=>i({...e})}}),[x,i]);const f=Dt(m,{"has-visible-labels":p,"has-icon-color":r.color||u,"has-icon-background-color":n.color||c}),y=(0,ct.useBlockProps)({className:f}),v=(0,ct.useInnerBlocksProps)(y,{templateLock:!1,orientation:o.layout?.orientation??"horizontal",__experimentalAppenderTagName:"li",renderAppender:!g||_?ct.InnerBlocks.ButtonBlockAppender:void 0}),k=[{value:r.color||u,onChange:e=>{l(e),i({iconColorValue:e})},label:(0,pt.__)("Icon color"),resetAllFilter:()=>{l(void 0),i({iconColorValue:void 0})}}];x||k.push({value:n.color||c,onChange:e=>{s(e),i({iconBackgroundColorValue:e})},label:(0,pt.__)("Icon background"),resetAllFilter:()=>{s(void 0),i({iconBackgroundColorValue:void 0})}});const w=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({openInNewTab:!1,showLabels:!1,size:void 0})},dropdownMenuProps:b,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!m,label:(0,pt.__)("Icon size"),onDeselect:()=>i({size:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Icon Size"),onChange:e=>{i({size:""===e?void 0:e})},value:m??"",options:Fj})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Show text"),hasValue:()=>!!p,onDeselect:()=>i({showLabels:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show text"),checked:p,onChange:()=>i({showLabels:!p})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Open links in new tab"),hasValue:()=>!!d,onDeselect:()=>i({openInNewTab:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open links in new tab"),checked:d,onChange:()=>i({openInNewTab:!d})})})]})}),w.hasColorsOrGradients&&(0,it.jsxs)(ct.InspectorControls,{group:"color",children:[k.map((({onChange:e,label:o,value:n,resetAllFilter:r})=>(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n,label:o,onColorChange:e,isShownByDefault:!0,resetAllFilter:r,enableAlpha:!0,clearable:!0}],panelId:t,...w},`social-links-color-${o}`))),!x&&(0,it.jsx)(ct.ContrastChecker,{textColor:u,backgroundColor:c,isLargeText:!1})]}),(0,it.jsx)("ul",{...v})]})}));const Oj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-links","title":"Social Icons","category":"widgets","allowedBlocks":["core/social-link"],"description":"Display icons linking to your social profiles or sites.","keywords":["links"],"textdomain":"default","attributes":{"iconColor":{"type":"string"},"customIconColor":{"type":"string"},"iconColorValue":{"type":"string"},"iconBackgroundColor":{"type":"string"},"customIconBackgroundColor":{"type":"string"},"iconBackgroundColorValue":{"type":"string"},"openInNewTab":{"type":"boolean","default":false},"showLabels":{"type":"boolean","default":false},"size":{"type":"string"}},"providesContext":{"openInNewTab":"openInNewTab","showLabels":"showLabels","iconColor":"iconColor","iconColorValue":"iconColorValue","iconBackgroundColor":"iconBackgroundColor","iconBackgroundColorValue":"iconBackgroundColorValue"},"supports":{"align":["left","center","right"],"anchor":true,"html":false,"__experimentalExposeControlsToChildren":true,"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"default":{"type":"flex"}},"color":{"enableContrastChecker":false,"background":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":false}},"spacing":{"blockGap":["horizontal","vertical"],"margin":true,"padding":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true,"margin":true,"padding":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"contentRole":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"logos-only","label":"Logos Only"},{"name":"pill-shape","label":"Pill Shape"}],"editorStyle":"wp-block-social-links-editor","style":"wp-block-social-links"}');const{name:Gj}=Oj,$j={example:{innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"twitter",url:"https://twitter.com/WordPress"}}]},icon:Bj,edit:Ej,save:function(e){const{attributes:{iconBackgroundColorValue:t,iconColorValue:o,showLabels:n,size:r}}=e,a=Dt(r,{"has-visible-labels":n,"has-icon-color":o,"has-icon-background-color":t}),i=ct.useBlockProps.save({className:a}),s=ct.useInnerBlocksProps.save(i);return(0,it.jsx)("ul",{...s})},deprecated:Vj},Uj=()=>jt({name:Gj,metadata:Oj,settings:$j});var qj=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"})});const Wj=[{attributes:{height:{type:"number",default:100},width:{type:"number"}},migrate(e){const{height:t,width:o}=e;return{...e,width:void 0!==o?`${o}px`:void 0,height:void 0!==t?`${t}px`:void 0}},save:({attributes:e})=>(0,it.jsx)("div",{...ct.useBlockProps.save({style:{height:e.height,width:e.width},"aria-hidden":!0})})}];var Zj=Wj;const{useSpacingSizes:Jj}=jo(ct.privateApis);function Qj({label:e,onChange:t,isResizing:o,value:n=""}){const r=(0,xt.useInstanceId)(mt.__experimentalUnitControl,"block-spacer-height-input"),a=Jj(),[i]=(0,ct.useSettings)("spacing.units"),s=i?i.filter((e=>"%"!==e)):["px","em","rem","vw","vh"],l=(0,mt.__experimentalUseCustomUnits)({availableUnits:s,defaultValues:{px:100,em:10,rem:10,vw:10,vh:25}}),[c,u]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(n),d=(0,ct.isValueSpacingPreset)(n)?n:[c,o?"px":u].join("");return(0,it.jsx)(it.Fragment,{children:a?.length<2?(0,it.jsx)(mt.__experimentalUnitControl,{id:r,isResetValueOnUnitChange:!0,min:0,onChange:t,value:d,units:l,label:e,__next40pxDefaultSize:!0}):(0,it.jsx)(St.View,{className:"tools-panel-item-spacing",children:(0,it.jsx)(ct.__experimentalSpacingSizesControl,{values:{all:d},onChange:({all:e})=>{t(e)},label:e,sides:["all"],units:l,allowReset:!1,splitOnAxis:!1,showSideInLabel:!1})})})}function Kj({setAttributes:e,orientation:t,height:o,width:n,isResizing:r}){const a=vt();return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({width:void 0,height:"100px"})},dropdownMenuProps:a,children:["horizontal"===t&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Width"),isShownByDefault:!0,hasValue:()=>void 0!==n,onDeselect:()=>e({width:void 0}),children:(0,it.jsx)(Qj,{label:(0,pt.__)("Width"),value:n,onChange:t=>e({width:t}),isResizing:r})}),"horizontal"!==t&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Height"),isShownByDefault:!0,hasValue:()=>"100px"!==o,onDeselect:()=>e({height:"100px"}),children:(0,it.jsx)(Qj,{label:(0,pt.__)("Height"),value:o,onChange:t=>e({height:t}),isResizing:r})})]})})}const{useSpacingSizes:Yj}=jo(ct.privateApis),Xj=({orientation:e,onResizeStart:t,onResize:o,onResizeStop:n,isSelected:r,isResizing:a,setIsResizing:i,...s})=>{const l=t=>"horizontal"===e?t.clientWidth:t.clientHeight,c=e=>`${l(e)}px`;return(0,it.jsx)(mt.ResizableBox,{className:Dt("block-library-spacer__resize-container",{"resize-horizontal":"horizontal"===e,"is-resizing":a,"is-selected":r}),onResizeStart:(e,n,r)=>{const a=c(r);t(a),o(a)},onResize:(e,t,n)=>{o(c(n)),a||i(!0)},onResizeStop:(e,t,o)=>{const r=l(o);n(`${r}px`),i(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"horizontal"===e?"x":"y",position:"corner",isVisible:a},showHandle:r,...s})};var eS=({attributes:e,isSelected:t,setAttributes:o,toggleSelection:n,context:r,__unstableParentLayout:a,className:i})=>{const s=(0,lt.useSelect)((e=>{const t=e(ct.store).getSettings();return t?.disableCustomSpacingSizes})),{orientation:l}=r,{orientation:c,type:u,default:{type:d}={}}=a||{},p="flex"===u||!u&&"flex"===d,m=!c&&p?"horizontal":c||l,{height:g,width:h,style:_={}}=e,{layout:x={}}=_,{selfStretch:b,flexSize:f}=x,y=Yj(),[v,k]=(0,gt.useState)(!1),[w,C]=(0,gt.useState)(null),[j,S]=(0,gt.useState)(null),B=()=>n(!1),T=()=>n(!0),{__unstableMarkNextChangeAsNotPersistent:N}=(0,lt.useDispatch)(ct.store),P=e=>{T(),p&&o({style:{..._,layout:{...x,flexSize:e,selfStretch:"fixed"}}}),o({height:e}),C(null)},I=e=>{T(),p&&o({style:{..._,layout:{...x,flexSize:e,selfStretch:"fixed"}}}),o({width:e}),S(null)},D="horizontal"===m?j||f:w||f,M={height:"horizontal"===m?24:(()=>{if(!p)return w||(0,ct.getSpacingPresetCssVar)(g)||void 0})(),width:"horizontal"===m?(()=>{if(!p)return j||(0,ct.getSpacingPresetCssVar)(h)||void 0})():void 0,minWidth:"vertical"===m&&p?48:void 0,flexBasis:p?D:void 0,flexGrow:p&&v?0:void 0};(0,gt.useEffect)((()=>{const e=e=>{N(),o(e)};if(p&&"fill"!==b&&"fit"!==b&&void 0===f)if("horizontal"===m){const t=(0,ct.getCustomValueFromPreset)(h,y)||(0,ct.getCustomValueFromPreset)(g,y)||"100px";e({width:"0px",style:{..._,layout:{...x,flexSize:t,selfStretch:"fixed"}}})}else{const t=(0,ct.getCustomValueFromPreset)(g,y)||(0,ct.getCustomValueFromPreset)(h,y)||"100px";e({height:"0px",style:{..._,layout:{...x,flexSize:t,selfStretch:"fixed"}}})}else!p||"fill"!==b&&"fit"!==b?p||!b&&!f||e({..."horizontal"===m?{width:f}:{height:f},style:{..._,layout:{...x,flexSize:void 0,selfStretch:void 0}}}):e("horizontal"===m?{width:void 0}:{height:void 0})}),[_,f,g,m,p,x,b,o,y,h,N]);const z=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(St.View,{...(0,ct.useBlockProps)({style:M,className:Dt(i,{"custom-sizes-disabled":s})}),children:"default"===z&&(A=m,"horizontal"===A?(0,it.jsx)(Xj,{minWidth:0,enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:A,onResizeStart:B,onResize:S,onResizeStop:I,isSelected:t,isResizing:v,setIsResizing:k}):(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(Xj,{minHeight:0,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:A,onResizeStart:B,onResize:C,onResizeStop:P,isSelected:t,isResizing:v,setIsResizing:k})}))}),!p&&(0,it.jsx)(Kj,{setAttributes:o,height:w||g,width:j||h,orientation:m,isResizing:v})]});var A};const tS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/spacer","title":"Spacer","category":"design","description":"Add white space between blocks and customize its height.","textdomain":"default","attributes":{"height":{"type":"string","default":"100px"},"width":{"type":"string"}},"usesContext":["orientation"],"supports":{"anchor":true,"spacing":{"margin":["top","bottom"],"__experimentalDefaultControls":{"margin":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-spacer-editor","style":"wp-block-spacer"}');var oS={to:[{type:"block",blocks:["core/separator"],transform:({anchor:e})=>(0,st.createBlock)("core/separator",{anchor:e||""})}]};const{name:nS}=tS,rS={icon:qj,transforms:oS,edit:eS,save:function({attributes:e}){const{height:t,width:o,style:n}=e,{layout:{selfStretch:r}={}}=n||{},a="fill"===r||"fit"===r?void 0:t;return(0,it.jsx)("div",{...ct.useBlockProps.save({style:{height:(0,ct.getSpacingPresetCssVar)(a),width:(0,ct.getSpacingPresetCssVar)(o)},"aria-hidden":!0})})},deprecated:Zj},aS=()=>jt({name:nS,metadata:tS,settings:rS});var iS=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})});const sS={"subtle-light-gray":"#f3f4f5","subtle-pale-green":"#e9fbe5","subtle-pale-blue":"#e7f5fe","subtle-pale-pink":"#fcf0ef"},lS={content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}},cS={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"rich-text",source:"rich-text",selector:"figcaption"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:lS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:lS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:lS}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table",interactivity:{clientNavigation:!0}},save({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,caption:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.__experimentalGetBorderClassesAndStyles)(e),l=Dt(i.className,s.className,{"has-fixed-layout":t}),c=!ct.RichText.isEmpty(a),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n,colspan:r,rowspan:a},i)=>{const s=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:s||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0,colSpan:r,rowSpan:a},i)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,style:{...i.style,...s.style},children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:a,className:(0,ct.__experimentalGetElementClassName)("caption")})]})}},uS={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}},dS={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:uS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:uS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:uS}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table"},save({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,caption:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.__experimentalGetBorderClassesAndStyles)(e),l=Dt(i.className,s.className,{"has-fixed-layout":t}),c=!ct.RichText.isEmpty(a),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n},r)=>{const a=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:a||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0},r)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,style:{...i.style,...s.style},children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:a})]})}},pS={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}},mS={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:pS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:pS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:pS}}}},supports:{anchor:!0,align:!0,__experimentalSelector:".wp-block-table > table"},save:({attributes:e})=>{const{hasFixedLayout:t,head:o,body:n,foot:r,backgroundColor:a,caption:i}=e;if(!o.length&&!n.length&&!r.length)return null;const s=(0,ct.getColorClassName)("background-color",a),l=Dt(s,{"has-fixed-layout":t,"has-background":!!s}),c=!ct.RichText.isEmpty(i),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n},r)=>{const a=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:a||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0},r)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:i})]})},isEligible:e=>e.backgroundColor&&e.backgroundColor in sS&&!e.style,migrate:e=>({...e,backgroundColor:void 0,style:{color:{background:sS[e.backgroundColor]}}})},gS={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}},hS={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:gS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:gS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:gS}}}},supports:{align:!0},save({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,backgroundColor:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.getColorClassName)("background-color",a),s=Dt(i,{"has-fixed-layout":t,"has-background":!!i}),l=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o},n)=>(0,it.jsx)(ct.RichText.Content,{tagName:t,value:e,scope:"th"===t?o:void 0},n)))},t)))})};return(0,it.jsxs)("table",{className:s,children:[(0,it.jsx)(l,{type:"head",rows:o}),(0,it.jsx)(l,{type:"body",rows:n}),(0,it.jsx)(l,{type:"foot",rows:r})]})}};var _S=[cS,dS,mS,hS],xS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),bS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),fS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),yS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})}),vS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})}),kS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z"})}),wS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})}),CS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})}),jS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z"})}),SS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z"})});const BS=["align"];function TS(e,t,o){if(!t)return e;const n=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e)))),{sectionName:r,rowIndex:a}=t;return Object.fromEntries(Object.entries(n).map((([e,n])=>r&&r!==e?[e,n]:[e,n.map(((n,r)=>a&&a!==r?n:{cells:n.cells.map(((n,a)=>function(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}({sectionName:e,columnIndex:a,rowIndex:r},t)?o(n):n))}))])))}function NS(e,{sectionName:t,rowIndex:o,columnCount:n}){const r=function(e){return IS(e.head)?IS(e.body)?IS(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),a=void 0===n?r?.cells?.length:n;return a?{[t]:[...e[t].slice(0,o),{cells:Array.from({length:a}).map(((e,o)=>{const n=r?.cells?.[o]??{};return{...Object.fromEntries(Object.entries(n).filter((([e])=>BS.includes(e)))),content:"",tag:"head"===t?"th":"td"}}))},...e[t].slice(o)]}:e}function PS(e,t){if(!IS(e[t]))return{[t]:[]};return NS(e,{sectionName:t,rowIndex:0,columnCount:e.body?.[0]?.cells?.length??1})}function IS(e){return!e||!e.length||e.every(DS)}function DS(e){return!(e.cells&&e.cells.length)}const MS=[{icon:xS,title:(0,pt.__)("Align column left"),align:"left"},{icon:bS,title:(0,pt.__)("Align column center"),align:"center"},{icon:fS,title:(0,pt.__)("Align column right"),align:"right"}],zS={head:(0,pt.__)("Header cell text"),body:(0,pt.__)("Body cell text"),foot:(0,pt.__)("Footer cell text")},AS={head:(0,pt.__)("Header label"),foot:(0,pt.__)("Footer label")};function LS({name:e,...t}){const o=`t${e}`;return(0,it.jsx)(o,{...t})}var HS=function({attributes:e,setAttributes:t,insertBlocksAfter:o,isSelected:n}){const{hasFixedLayout:r,head:a,foot:i}=e,[s,l]=(0,gt.useState)(2),[c,u]=(0,gt.useState)(2),[d,p]=(0,gt.useState)(),m=(0,ct.__experimentalUseColorProps)(e),g=(0,ct.__experimentalUseBorderProps)(e),h=(0,ct.useBlockEditingMode)(),_=(0,gt.useRef)(),[x,b]=(0,gt.useState)(!1),f=vt();function y(o){d&&t(TS(e,d,(e=>({...e,content:o}))))}function v(o){if(!d)return;const{sectionName:n,rowIndex:r}=d,a=r+o;t(NS(e,{sectionName:n,rowIndex:a})),p({sectionName:n,rowIndex:a,columnIndex:0,type:"cell"})}function k(o=0){if(!d)return;const{columnIndex:n}=d,r=n+o;t(function(e,{columnIndex:t}){const o=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(o).map((([e,o])=>IS(o)?[e,o]:[e,o.map((o=>DS(o)||o.cells.length<t?o:{cells:[...o.cells.slice(0,t),{content:"",tag:"head"===e?"th":"td"},...o.cells.slice(t)]}))])))}(e,{columnIndex:r})),p({rowIndex:0,columnIndex:r,type:"cell"})}(0,gt.useEffect)((()=>{n||p()}),[n]),(0,gt.useEffect)((()=>{x&&(_?.current?.querySelector('td div[contentEditable="true"]')?.focus(),b(!1))}),[x]);const w=["head","body","foot"].filter((t=>!IS(e[t]))),C=[{icon:yS,title:(0,pt.__)("Insert row before"),isDisabled:!d,onClick:function(){v(0)}},{icon:vS,title:(0,pt.__)("Insert row after"),isDisabled:!d,onClick:function(){v(1)}},{icon:kS,title:(0,pt.__)("Delete row"),isDisabled:!d,onClick:function(){if(!d)return;const{sectionName:o,rowIndex:n}=d;p(),t(function(e,{sectionName:t,rowIndex:o}){return{[t]:e[t].filter(((e,t)=>t!==o))}}(e,{sectionName:o,rowIndex:n}))}},{icon:wS,title:(0,pt.__)("Insert column before"),isDisabled:!d,onClick:function(){k(0)}},{icon:CS,title:(0,pt.__)("Insert column after"),isDisabled:!d,onClick:function(){k(1)}},{icon:jS,title:(0,pt.__)("Delete column"),isDisabled:!d,onClick:function(){if(!d)return;const{sectionName:o,columnIndex:n}=d;p(),t(function(e,{columnIndex:t}){const o=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(o).map((([e,o])=>IS(o)?[e,o]:[e,o.map((e=>({cells:e.cells.length>=t?e.cells.filter(((e,o)=>o!==t)):e.cells}))).filter((e=>e.cells.length))])))}(e,{sectionName:o,columnIndex:n}))}}],j=w.map((t=>(0,it.jsx)(LS,{name:t,children:e[t].map((({cells:e},o)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:n,scope:r,align:a,colspan:i,rowspan:s},l)=>(0,it.jsx)(n,{scope:"th"===n?r:void 0,colSpan:i,rowSpan:s,className:Dt({[`has-text-align-${a}`]:a},"wp-block-table__cell-content"),children:(0,it.jsx)(ct.RichText,{value:e,onChange:y,onFocus:()=>{p({sectionName:t,rowIndex:o,columnIndex:l,type:"cell"})},"aria-label":zS[t],placeholder:AS[t]})},l)))},o)))},t))),S=!w.length;return(0,it.jsxs)("figure",{...(0,ct.useBlockProps)({ref:_}),children:[!S&&"default"===h&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{label:(0,pt.__)("Change column alignment"),alignmentControls:MS,value:function(){if(d)return function(e,t,o){const{sectionName:n,rowIndex:r,columnIndex:a}=t;return e[n]?.[r]?.cells?.[a]?.[o]}(e,d,"align")}(),onChange:o=>function(o){if(!d)return;const n={type:"column",columnIndex:d.columnIndex},r=TS(e,n,(e=>({...e,align:o})));t(r)}(o)})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:SS,label:(0,pt.__)("Edit table"),controls:C})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({hasFixedLayout:!0,head:[],foot:[]})},dropdownMenuProps:f,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==r,label:(0,pt.__)("Fixed width table cells"),onDeselect:()=>t({hasFixedLayout:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Fixed width table cells"),checked:!!r,onChange:function(){t({hasFixedLayout:!r})}})}),!S&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>a&&a.length,label:(0,pt.__)("Header section"),onDeselect:()=>t({head:[]}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Header section"),checked:!(!a||!a.length),onChange:function(){t(PS(e,"head"))}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>i&&i.length,label:(0,pt.__)("Footer section"),onDeselect:()=>t({foot:[]}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Footer section"),checked:!(!i||!i.length),onChange:function(){t(PS(e,"foot"))}})})]})]})}),!S&&(0,it.jsx)("table",{className:Dt(m.className,g.className,{"has-fixed-layout":r,"has-individual-borders":(0,mt.__experimentalHasSplitBorders)(e?.style?.border)}),style:{...m.style,...g.style},children:j}),S?(0,it.jsx)(mt.Placeholder,{label:(0,pt.__)("Table"),icon:(0,it.jsx)(ct.BlockIcon,{icon:iS,showColors:!0}),instructions:(0,pt.__)("Insert a table for sharing data."),children:(0,it.jsxs)("form",{className:"blocks-table__placeholder-form",onSubmit:function(e){e.preventDefault(),t(function({rowCount:e,columnCount:t}){return{body:Array.from({length:e}).map((()=>({cells:Array.from({length:t}).map((()=>({content:"",tag:"td"})))})))}}({rowCount:parseInt(s,10)||2,columnCount:parseInt(c,10)||2})),b(!0)},children:[(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,pt.__)("Column count"),value:c,onChange:function(e){u(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,pt.__)("Row count"),value:s,onChange:function(e){l(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,pt.__)("Create Table")})]})}):(0,it.jsx)(zo,{attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:o,label:(0,pt.__)("Table caption text"),showToolbarButton:n&&"default"===h})]})};const RS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/table","title":"Table","category":"text","description":"Create structured content in rows and columns to display information.","textdomain":"default","attributes":{"hasFixedLayout":{"type":"boolean","default":true},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"head":{"type":"array","default":[],"source":"query","selector":"thead tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"body":{"type":"array","default":[],"source":"query","selector":"tbody tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"foot":{"type":"array","default":[],"source":"query","selector":"tfoot tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}}},"supports":{"anchor":true,"align":true,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-table > table","spacing":".wp-block-table"},"styles":[{"name":"regular","label":"Default","isDefault":true},{"name":"stripes","label":"Stripes"}],"editorStyle":"wp-block-table-editor","style":"wp-block-table"}');function VS(e){const t=parseInt(e,10);if(Number.isInteger(t))return t<0||1===t?void 0:t.toString()}const FS=({phrasingContentSchema:e})=>({tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:e,attributes:["scope","colspan","rowspan","style"]},td:{allowEmpty:!0,children:e,attributes:["colspan","rowspan","style"]}}}}),ES={from:[{type:"raw",selector:"table",schema:e=>({table:{children:{thead:{allowEmpty:!0,children:FS(e)},tfoot:{allowEmpty:!0,children:FS(e)},tbody:{allowEmpty:!0,children:FS(e)}}}}),transform:e=>{const t=Array.from(e.children).reduce(((e,t)=>{if(!t.children.length)return e;const o=t.nodeName.toLowerCase().slice(1),n=Array.from(t.children).reduce(((e,t)=>{if(!t.children.length)return e;const o=Array.from(t.children).reduce(((e,t)=>{const o=VS(t.getAttribute("rowspan")),n=VS(t.getAttribute("colspan")),{textAlign:r}=t.style||{};let a;return"left"!==r&&"center"!==r&&"right"!==r||(a=r),e.push({tag:t.nodeName.toLowerCase(),content:t.innerHTML,rowspan:o,colspan:n,align:a}),e}),[]);return e.push({cells:o}),e}),[]);return e[o]=n,e}),{});return(0,st.createBlock)("core/table",t)}}]};var OS=ES;const{name:GS}=RS,$S={icon:iS,example:{attributes:{head:[{cells:[{content:(0,pt.__)("Version"),tag:"th"},{content:(0,pt.__)("Jazz Musician"),tag:"th"},{content:(0,pt.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:(0,pt.__)("Jaco Pastorius"),tag:"td"},{content:(0,pt.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:(0,pt.__)("Betty Carter"),tag:"td"},{content:(0,pt.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:(0,pt.__)("Bebo Valdés"),tag:"td"},{content:(0,pt.__)("December 6, 2018"),tag:"td"}]}]},viewportWidth:450},transforms:OS,edit:HS,save:function({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,caption:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.__experimentalGetBorderClassesAndStyles)(e),l=Dt(i.className,s.className,{"has-fixed-layout":t}),c=!ct.RichText.isEmpty(a),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n,colspan:r,rowspan:a},i)=>{const s=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:s||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0,colSpan:r,rowSpan:a},i)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,style:{...i.style,...s.style},children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:a,className:(0,ct.__experimentalGetElementClassName)("caption")})]})},deprecated:_S},US=()=>jt({name:GS,metadata:RS,settings:$S});var qS=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,it.jsx)(St.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})]});const WS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/table-of-contents","title":"Table of Contents","category":"design","description":"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.","keywords":["document outline","summary"],"textdomain":"default","attributes":{"headings":{"type":"array","items":{"type":"object"},"default":[]},"onlyIncludeCurrentPage":{"type":"boolean","default":false},"maxLevel":{"type":"number"},"ordered":{"type":"boolean","default":true}},"supports":{"ariaLabel":true,"html":false,"color":{"text":true,"background":true,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-table-of-contents"}'),ZS="wp-block-table-of-contents__entry";function JS({nestedHeadingList:e,disableLinkActivation:t,onClick:o,ordered:n=!0}){return(0,it.jsx)(it.Fragment,{children:e.map(((e,r)=>{const{content:a,link:i}=e.heading,s=i?(0,it.jsx)("a",{className:ZS,href:i,"aria-disabled":t||void 0,onClick:t&&"function"==typeof o?o:void 0,children:a}):(0,it.jsx)("span",{className:ZS,children:a}),l=n?"ol":"ul";return(0,it.jsxs)("li",{children:[s,e.children?(0,it.jsx)(l,{children:(0,it.jsx)(JS,{nestedHeadingList:e.children,disableLinkActivation:t,onClick:t&&"function"==typeof o?o:void 0,ordered:n})}):null]},r)}))})}function QS(e){const t=[];return e.forEach(((o,n)=>{if(""!==o.content&&o.level===e[0].level)if(e[n+1]?.level>o.level){let r=e.length;for(let t=n+1;t<e.length;t++)if(e[t].level===o.level){r=t;break}t.push({heading:o,children:QS(e.slice(n+1,r))})}else t.push({heading:o,children:null})})),t}var KS=r(7734),YS=r.n(KS);function XS(e,t,o){const{getBlockAttributes:n}=e(ct.store),{updateBlockAttributes:r,__unstableMarkNextChangeAsNotPersistent:a}=t(ct.store),i=n(o);if(null===i)return;const s=function(e,t){const{getBlockAttributes:o,getBlockName:n,getBlocksByName:r,getClientIdsOfDescendants:a}=e(ct.store),i=e("core/editor").getPermalink()??null,s=0!==r("core/nextpage").length,{onlyIncludeCurrentPage:l,maxLevel:c}=o(t)??{},[u=""]=r("core/post-content"),d=a(u);let p=1;if(s&&l){const e=d.indexOf(t);for(const[t,o]of d.entries()){if(t>=e)break;"core/nextpage"===n(o)&&p++}}const m=[];let g=1,h=null;"string"==typeof i&&(h=s?(0,no.addQueryArgs)(i,{page:g}):i);for(const e of d){const t=n(e);if("core/nextpage"===t){if(g++,l&&g>p)break;"string"==typeof i&&(h=(0,no.addQueryArgs)((0,no.removeQueryArgs)(i,["page"]),{page:g}))}else if((!l||g===p)&&"core/heading"===t){const t=o(e);if(c&&t.level>c)continue;const n="string"==typeof h&&"string"==typeof t.anchor&&""!==t.anchor;m.push({content:(0,lu.__unstableStripHTML)(t.content.replace(/(<br *\/?>)+/g," ")),level:t.level,link:n?`${h}#${t.anchor}`:null})}}return m}(e,o);YS()(s,i.headings)||window.queueMicrotask((()=>{a(),r(o,{headings:s})}))}const{name:eB}=WS,tB={icon:qS,edit:function e({attributes:{headings:t=[],onlyIncludeCurrentPage:o,maxLevel:n,ordered:r=!0},clientId:a,setAttributes:i}){!function(e){const t=(0,lt.useRegistry)();(0,gt.useEffect)((()=>t.subscribe((()=>XS(t.select,t.dispatch,e)))),[t,e])}(a);const s=(0,ct.useBlockProps)(),l=(0,xt.useInstanceId)(e,"table-of-contents"),{createWarningNotice:c}=(0,lt.useDispatch)(bo.store),u=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:o}=e(ct.store);return o("core/list",t(a))}),[a]),{replaceBlocks:d}=(0,lt.useDispatch)(ct.store),p=vt(),m=QS(t),g=(0,it.jsxs)(ct.BlockControls,{children:[(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Om:Gm,title:(0,pt.__)("Unordered"),description:(0,pt.__)("Convert to unordered list"),onClick:()=>i({ordered:!1}),isActive:!1===r}),(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?$m:Um,title:(0,pt.__)("Ordered"),description:(0,pt.__)("Convert to ordered list"),onClick:()=>i({ordered:!0}),isActive:!0===r})]}),u&&(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>d(a,(0,st.createBlock)("core/list",{ordered:r,values:(0,gt.renderToString)((0,it.jsx)(JS,{nestedHeadingList:m,ordered:r}))})),children:(0,pt.__)("Convert to static list")})})]}),h=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({onlyIncludeCurrentPage:!1,maxLevel:void 0,ordered:!0})},dropdownMenuProps:p,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,pt.__)("Only include current page"),onDeselect:()=>i({onlyIncludeCurrentPage:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Only include current page"),checked:o,onChange:e=>i({onlyIncludeCurrentPage:e}),help:o?(0,pt.__)("Only including headings from the current page (if the post is paginated)."):(0,pt.__)("Include headings from all pages (if the post is paginated).")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Limit heading levels"),onDeselect:()=>i({maxLevel:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Include headings down to level"),value:n||"",options:[{value:"",label:(0,pt.__)("All levels")},{value:"1",label:(0,pt.__)("Heading 1")},{value:"2",label:(0,pt.__)("Heading 2")},{value:"3",label:(0,pt.__)("Heading 3")},{value:"4",label:(0,pt.__)("Heading 4")},{value:"5",label:(0,pt.__)("Heading 5")},{value:"6",label:(0,pt.__)("Heading 6")}],onChange:e=>i({maxLevel:e?parseInt(e):void 0}),help:n?(0,pt.__)("Only include headings up to and including this level."):(0,pt.__)("Including all heading levels in the table of contents.")})})]})});if(0===t.length)return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{...s,children:(0,it.jsx)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:qS}),label:(0,pt.__)("Table of Contents"),instructions:(0,pt.__)("Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.")})}),h]});const _=r?"ol":"ul";return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("nav",{...s,children:(0,it.jsx)(_,{children:(0,it.jsx)(JS,{nestedHeadingList:m,disableLinkActivation:!0,onClick:e=>{e.preventDefault(),c((0,pt.__)("Links are disabled in the editor."),{id:`block-library/core/table-of-contents/redirection-prevented/${l}`,type:"snackbar"})},ordered:r})})}),g,h]})},save:function({attributes:{headings:e=[],ordered:t=!0}}){if(0===e.length)return null;const o=t?"ol":"ul";return(0,it.jsx)("nav",{...ct.useBlockProps.save(),children:(0,it.jsx)(o,{children:(0,it.jsx)(JS,{nestedHeadingList:QS(e),ordered:t})})})},example:{innerBlocks:[{name:"core/heading",attributes:{level:2,content:(0,pt.__)("Heading")}},{name:"core/heading",attributes:{level:3,content:(0,pt.__)("Subheading")}},{name:"core/heading",attributes:{level:2,content:(0,pt.__)("Heading")}},{name:"core/heading",attributes:{level:3,content:(0,pt.__)("Subheading")}}],attributes:{headings:[{content:(0,pt.__)("Heading"),level:2},{content:(0,pt.__)("Subheading"),level:3},{content:(0,pt.__)("Heading"),level:2},{content:(0,pt.__)("Subheading"),level:3}]}}},oB=()=>jt({name:eB,metadata:WS,settings:tB});var nB={from:[{type:"block",blocks:["core/categories"],transform:()=>(0,st.createBlock)("core/tag-cloud")}],to:[{type:"block",blocks:["core/categories"],transform:()=>(0,st.createBlock)("core/categories")}]};const rB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/tag-cloud","title":"Tag Cloud","category":"widgets","description":"A cloud of popular keywords, each sized by how often it appears.","textdomain":"default","attributes":{"numberOfTags":{"type":"number","default":45,"minimum":1,"maximum":100},"taxonomy":{"type":"string","default":"post_tag"},"showTagCounts":{"type":"boolean","default":false},"smallestFontSize":{"type":"string","default":"8pt"},"largestFontSize":{"type":"string","default":"22pt"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"outline","label":"Outline"}],"supports":{"html":false,"align":true,"spacing":{"margin":true,"padding":true},"typography":{"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-tag-cloud-editor"}');var aB=function({attributes:e,setAttributes:t}){const{taxonomy:o,showTagCounts:n,numberOfTags:r,smallestFontSize:a,largestFontSize:i}=e,[s]=(0,ct.useSettings)("spacing.units"),l=vt(),c=(0,mt.__experimentalUseCustomUnits)({availableUnits:s?[...s,"pt"]:["%","px","em","rem","pt"]}),u=(0,lt.useSelect)((e=>e(_t.store).getTaxonomies({per_page:-1})),[]),d=(e,o)=>{const[n,r]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(o);if(!Number.isFinite(n))return;const s={[e]:o};Object.entries({smallestFontSize:a,largestFontSize:i}).forEach((([t,o])=>{const[n,a]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(o);t!==e&&a!==r&&(s[t]=`${n}${r}`)})),t(s)},p={...e,style:{...e?.style,border:void 0}},m=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({taxonomy:"post_tag",showTagCounts:!1,numberOfTags:45,smallestFontSize:"8pt",largestFontSize:"22pt"})},dropdownMenuProps:l,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"post_tag"!==o,label:(0,pt.__)("Taxonomy"),onDeselect:()=>t({taxonomy:"post_tag"}),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Taxonomy"),options:[{label:(0,pt.__)("- Select -"),value:"",disabled:!0},...(u??[]).filter((e=>!!e.show_cloud)).map((e=>({value:e.slug,label:e.name})))],value:o,onChange:e=>t({taxonomy:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"8pt"!==a||"22pt"!==i,label:(0,pt.__)("Font size"),onDeselect:()=>t({smallestFontSize:"8pt",largestFontSize:"22pt"}),isShownByDefault:!0,children:(0,it.jsxs)(mt.Flex,{gap:4,children:[(0,it.jsx)(mt.FlexItem,{isBlock:!0,children:(0,it.jsx)(mt.__experimentalUnitControl,{label:(0,pt.__)("Smallest size"),value:a,onChange:e=>{d("smallestFontSize",e)},units:c,min:.1,max:100,size:"__unstable-large"})}),(0,it.jsx)(mt.FlexItem,{isBlock:!0,children:(0,it.jsx)(mt.__experimentalUnitControl,{label:(0,pt.__)("Largest size"),value:i,onChange:e=>{d("largestFontSize",e)},units:c,min:.1,max:100,size:"__unstable-large"})})]})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>45!==r,label:(0,pt.__)("Number of tags"),onDeselect:()=>t({numberOfTags:45}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Number of tags"),value:r,onChange:e=>t({numberOfTags:e}),min:1,max:100,required:!0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==n,label:(0,pt.__)("Show tag counts"),onDeselect:()=>t({showTagCounts:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show tag counts"),checked:n,onChange:()=>t({showTagCounts:!n})})})]})});return(0,it.jsxs)(it.Fragment,{children:[m,(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{skipBlockSupportAttributes:!0,block:"core/tag-cloud",attributes:p})})})]})};const{name:iB}=rB,sB={icon:Tx,example:{},edit:aB,transforms:nB},lB=()=>jt({name:iB,metadata:rB,settings:sB});var cB=function(){return cB=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},cB.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function uB(e){return e.toLowerCase()}var dB=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],pB=/[^A-Z0-9]+/gi;function mB(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,n=void 0===o?dB:o,r=t.stripRegexp,a=void 0===r?pB:r,i=t.transform,s=void 0===i?uB:i,l=t.delimiter,c=void 0===l?" ":l,u=gB(gB(e,n,"$1\0$2"),a,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(s).join(c)}function gB(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce((function(e,t){return e.replace(t,o)}),e)}function hB(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}const _B=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/template-part","title":"Template Part","category":"theme","description":"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.","textdomain":"default","attributes":{"slug":{"type":"string"},"theme":{"type":"string"},"tagName":{"type":"string"},"area":{"type":"string"}},"supports":{"align":true,"html":false,"reusable":false,"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-template-part-editor"}');function xB(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),mB(e,cB({delimiter:"."},t))}(e,cB({delimiter:"-"},t))}function bB(e,t){const{templateParts:o,isResolving:n}=(0,lt.useSelect)((e=>{const{getEntityRecords:t,isResolving:o}=e(_t.store),n={per_page:-1};return{templateParts:t("postType","wp_template_part",n),isResolving:o("getEntityRecords",["postType","wp_template_part",n])}}),[]);return{templateParts:(0,gt.useMemo)((()=>o&&o.filter((o=>__(o.theme,o.slug)!==t&&(!e||"uncategorized"===e||o.area===e)))||[]),[o,e,t]),isResolving:n}}function fB(e,t){return(0,lt.useSelect)((o=>{const n=e?`core/template-part/${e}`:"core/template-part",{getBlockRootClientId:r,getPatternsByBlockTypes:a}=o(ct.store);return a(n,r(t))}),[e,t])}function yB(e,t){const{saveEntityRecord:o}=(0,lt.useDispatch)(_t.store);return async(n=[],r=(0,pt.__)("Untitled Template Part"))=>{const a={title:r,slug:xB(r).replace(/[^\w-]+/g,"")||"wp-custom-part",content:(0,st.serialize)(n),area:e},i=await o("postType","wp_template_part",a);t({slug:i.slug,theme:i.theme,area:void 0})}}function vB(e){return(0,lt.useSelect)((t=>{const o=t(_t.store).getCurrentTheme()?.default_template_part_areas||[],n=o.find((t=>t.area===e)),r=o.find((e=>"uncategorized"===e.area));return{icon:n?.icon||r?.icon,label:n?.label||(0,pt.__)("Template Part"),tagName:n?.area_tag??"div"}}),[e])}function kB({areaLabel:e,onClose:t,onSubmit:o}){const[n,r]=(0,gt.useState)("");return(0,it.jsx)(mt.Modal,{title:(0,pt.sprintf)((0,pt.__)("Create new %s"),e.toLowerCase()),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,it.jsx)("form",{onSubmit:e=>{e.preventDefault(),o(n)},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:"5",children:[(0,it.jsx)(mt.TextControl,{label:(0,pt.__)("Name"),value:n,onChange:r,placeholder:(0,pt.__)("Custom Template Part"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,it.jsxs)(mt.__experimentalHStack,{justify:"right",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t(),r("")},children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!n.length,__next40pxDefaultSize:!0,children:(0,pt.__)("Create")})]})]})})})}function wB({area:e,clientId:t,templatePartId:o,onOpenSelectionModal:n,setAttributes:r}){const{templateParts:a,isResolving:i}=bB(e,o),s=fB(e,t),{isBlockBasedTheme:l,canCreateTemplatePart:c}=(0,lt.useSelect)((e=>{const{getCurrentTheme:t,canUser:o}=e(_t.store);return{isBlockBasedTheme:t()?.is_block_theme,canCreateTemplatePart:o("create",{kind:"postType",name:"wp_template_part"})}}),[]),[u,d]=(0,gt.useState)(!1),p=vB(e),m=yB(e,r);return(0,it.jsxs)(mt.Placeholder,{icon:v_(p.icon),label:p.label,instructions:l?(0,pt.sprintf)((0,pt.__)("Choose an existing %s or create a new one."),p.label.toLowerCase()):(0,pt.sprintf)((0,pt.__)("Choose an existing %s."),p.label.toLowerCase()),children:[i&&(0,it.jsx)(mt.Spinner,{}),!i&&!(!a.length&&!s.length)&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,children:(0,pt.__)("Choose")}),!i&&l&&c&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{d(!0)},children:(0,pt.__)("Start blank")}),u&&(0,it.jsx)(kB,{areaLabel:p.label,onClose:()=>d(!1),onSubmit:e=>{m([],e)}})]})}function CB({setAttributes:e,onClose:t,templatePartId:o=null,area:n,clientId:r}){const[a,i]=(0,gt.useState)(""),{templateParts:s}=bB(n,o),l=(0,gt.useMemo)((()=>bk(s.map((e=>function(e){return{name:__(e.theme,e.slug),title:e.title.rendered,blocks:(0,st.parse)(e.content.raw),templatePart:e}}(e))),a)),[s,a]),c=fB(n,r),u=(0,gt.useMemo)((()=>bk(c,a)),[c,a]),{createSuccessNotice:d}=(0,lt.useDispatch)(bo.store),p=!!l.length,m=!!u.length;return(0,it.jsxs)("div",{className:"block-library-template-part__selection-content",children:[(0,it.jsx)("div",{className:"block-library-template-part__selection-search",children:(0,it.jsx)(mt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:i,value:a,label:(0,pt.__)("Search"),placeholder:(0,pt.__)("Search")})}),p&&(0,it.jsxs)("div",{children:[(0,it.jsx)("h2",{children:(0,pt.__)("Existing template parts")}),(0,it.jsx)(ct.__experimentalBlockPatternsList,{blockPatterns:l,onClickPattern:o=>{var n;n=o.templatePart,e({slug:n.slug,theme:n.theme,area:void 0}),d((0,pt.sprintf)((0,pt.__)('Template Part "%s" inserted.'),n.title?.rendered||n.slug),{type:"snackbar"}),t()}})]}),!p&&!m&&(0,it.jsx)(mt.__experimentalHStack,{alignment:"center",children:(0,it.jsx)("p",{children:(0,pt.__)("No results found.")})})]})}function jB(e){const t=(0,st.getPossibleBlockTransformations)([e]).filter((e=>{if(!e.transforms)return!0;const t=e.transforms?.from?.find((e=>e.blocks&&e.blocks.includes("*"))),o=e.transforms?.to?.find((e=>e.blocks&&e.blocks.includes("*")));return!t&&!o}));if(t.length)return(0,st.switchToBlockType)(e,t[0].name)}function SB(e=[]){return e.flatMap((e=>"core/legacy-widget"===e.name?jB(e):(0,st.createBlock)(e.name,e.attributes,SB(e.innerBlocks)))).filter((e=>!!e))}const BB={per_page:-1,_fields:"id,name,description,status,widgets"};function TB({area:e,setAttributes:t}){const[o,n]=(0,gt.useState)(""),[r,a]=(0,gt.useState)(!1),i=(0,lt.useRegistry)(),{sidebars:s,hasResolved:l}=(0,lt.useSelect)((e=>{const{getSidebars:t,hasFinishedResolution:o}=e(_t.store);return{sidebars:t(BB),hasResolved:o("getSidebars",[BB])}}),[]),{createErrorNotice:c}=(0,lt.useDispatch)(bo.store),u=yB(e,t),d=(0,gt.useMemo)((()=>{const e=(s??[]).filter((e=>"wp_inactive_widgets"!==e.id&&e.widgets.length>0)).map((e=>({value:e.id,label:e.name})));return e.length?[{value:"",label:(0,pt.__)("Select widget area")},...e]:[]}),[s]);if(!l)return(0,it.jsx)(mt.__experimentalSpacer,{marginBottom:"0"});if(l&&!d.length)return null;return(0,it.jsx)(mt.__experimentalSpacer,{marginBottom:"4",children:(0,it.jsxs)(mt.__experimentalHStack,{as:"form",onSubmit:async function(e){if(e.preventDefault(),r||!o)return;a(!0);const t=d.find((({value:e})=>e===o)),{getWidgets:n}=i.resolveSelect(_t.store),s=await n({sidebar:t.value,_embed:"about"}),l=new Set,p=s.flatMap((e=>{const t=function(e){if("block"!==e.id_base){let t;return t=e._embedded.about[0].is_multi?{idBase:e.id_base,instance:e.instance}:{id:e.id},jB((0,st.createBlock)("core/legacy-widget",t))}const t=(0,st.parse)(e.instance.raw.content,{__unstableSkipAutop:!0});if(!t.length)return;const o=t[0];return"core/widget-group"===o.name?(0,st.createBlock)((0,st.getGroupingBlockName)(),void 0,SB(o.innerBlocks)):o.innerBlocks.length>0?(0,st.cloneBlock)(o,void 0,SB(o.innerBlocks)):o}(e);return t||(l.add(e.id_base),[])}));await u(p,(0,pt.sprintf)((0,pt.__)("Widget area: %s"),t.label)),l.size&&c((0,pt.sprintf)((0,pt.__)("Unable to import the following widgets: %s."),Array.from(l).join(", ")),{type:"snackbar"}),a(!1)},children:[(0,it.jsx)(mt.FlexBlock,{children:(0,it.jsx)(mt.SelectControl,{label:(0,pt.__)("Import widget area"),value:o,options:d,onChange:e=>n(e),disabled:!d.length,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),(0,it.jsx)(mt.FlexItem,{style:{marginBottom:"8px",marginTop:"auto"},children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r||!o,children:(0,pt._x)("Import","button label")})})]})})}const{HTMLElementControl:NB}=jo(ct.privateApis);function PB({tagName:e,setAttributes:t,isEntityAvailable:o,templatePartId:n,defaultWrapper:r,hasInnerBlocks:a,clientId:i}){const[s,l]=(0,_t.useEntityProp)("postType","wp_template_part","area",n),[c,u]=(0,_t.useEntityProp)("postType","wp_template_part","title",n),d=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.default_template_part_areas||[]),[]).map((({label:e,area:t})=>({label:e,value:t})));return(0,it.jsxs)(it.Fragment,{children:[o&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title"),value:c,onChange:e=>{u(e)},onFocus:e=>e.target.select()}),(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Area"),labelPosition:"top",options:d,value:s,onChange:l})]}),(0,it.jsx)(NB,{tagName:e||"",onChange:e=>t({tagName:e}),clientId:i,options:[{label:(0,pt.sprintf)((0,pt.__)("Default based on area (%s)"),`<${r}>`),value:""},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"},{label:"<div>",value:"div"}]}),!a&&(0,it.jsx)(TB,{area:s,setAttributes:t})]})}function IB(e){return"contentOnly"!==(0,ct.useBlockEditingMode)()&&(e?void 0:ct.InnerBlocks.ButtonBlockAppender)}function DB(e){const t=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return t()?.supportsLayout}),[]),[o]=(0,ct.useSettings)("layout");if(t)return e?.inherit?o||{}:e}function MB({postId:e,layout:t,tagName:o,blockProps:n}){(0,ct.useBlockEditingMode)("disabled");const{content:r,editedBlocks:a}=(0,lt.useSelect)((t=>{if(!e)return{};const{getEditedEntityRecord:o}=t(_t.store),n=o("postType","wp_template_part",e,{context:"view"});return{editedBlocks:n.blocks,content:n.content}}),[e]),i=(0,gt.useMemo)((()=>{if(e)return a||(r&&"string"==typeof r?(0,st.parse)(r):[])}),[e,a,r]),s=(0,ct.useInnerBlocksProps)(n,{value:i,onInput:()=>{},onChange:()=>{},renderAppender:!1,layout:DB(t)});return(0,it.jsx)(o,{...s})}function zB({postId:e,hasInnerBlocks:t,layout:o,tagName:n,blockProps:r}){const a=(0,lt.useSelect)((e=>e(ct.store).getSettings().onNavigateToEntityRecord),[]),[i,s,l]=(0,_t.useEntityBlockEditor)("postType","wp_template_part",{id:e}),c=(0,ct.useInnerBlocksProps)(r,{value:i,onInput:s,onChange:l,renderAppender:IB(t),layout:DB(o)}),u="contentOnly"===(0,ct.useBlockEditingMode)()&&a?{onDoubleClick:()=>a({postId:e,postType:"wp_template_part"})}:{};return(0,it.jsx)(n,{...c,...u})}function AB({postId:e,hasInnerBlocks:t,layout:o,tagName:n,blockProps:r}){const{canViewTemplatePart:a,canEditTemplatePart:i}=(0,lt.useSelect)((t=>({canViewTemplatePart:!!t(_t.store).canUser("read",{kind:"postType",name:"wp_template_part",id:e}),canEditTemplatePart:!!t(_t.store).canUser("update",{kind:"postType",name:"wp_template_part",id:e})})),[e]);if(!a)return null;const s=i?zB:MB;return(0,it.jsx)(s,{postId:e,hasInnerBlocks:t,layout:o,tagName:n,blockProps:r})}function LB({isEntityAvailable:e,area:t,templatePartId:o,isTemplatePartSelectionOpen:n,setIsTemplatePartSelectionOpen:r}){const{templateParts:a}=bB(t,o),i=!!a.length;return e&&i&&("header"===t||"footer"===t)?(0,it.jsx)(mt.MenuItem,{onClick:()=>{r(!0)},"aria-expanded":n,"aria-haspopup":"dialog",children:(0,pt.__)("Replace")}):null}function HB({area:e,clientId:t,isEntityAvailable:o,onSelect:n}){const r=fB(e,t);return o&&!!r.length&&("header"===e||"footer"===e)?(0,it.jsx)(mt.PanelBody,{title:(0,pt.__)("Design"),children:(0,it.jsx)(ct.__experimentalBlockPatternsList,{label:(0,pt.__)("Templates"),blockPatterns:r,onClickPattern:n,showTitlesAsTooltip:!0})}):null}function RB(e,t){if("core/template-part"!==t)return e;if(e.variations){const t=(e,t)=>{const{area:o,theme:n,slug:r}=e;if(o)return o===t.area;if(!r)return!1;const{getCurrentTheme:a,getEntityRecord:i}=(0,lt.select)(_t.store),s=i("postType","wp_template_part",`${n||a()?.stylesheet}//${r}`);return s?.slug?s.slug===t.slug:s?.area===t.area},o=e.variations.map((e=>({...e,...!e.isActive&&{isActive:t},..."string"==typeof e.icon&&{icon:v_(e.icon)}})));return{...e,variations:o}}return e}const{name:VB}=_B,FB={icon:y_,__experimentalLabel:({slug:e,theme:t})=>{if(!e)return;const{getCurrentTheme:o,getEditedEntityRecord:n}=(0,lt.select)(_t.store),r=n("postType","wp_template_part",(t||o()?.stylesheet)+"//"+e);return r?(0,ao.decodeEntities)(r.title)||function(e,t){return void 0===t&&(t={}),mB(e,cB({delimiter:" ",transform:hB},t))}(r.slug||""):void 0},edit:function({attributes:e,setAttributes:t,clientId:o}){const{createSuccessNotice:n}=(0,lt.useDispatch)(bo.store),{editEntityRecord:r}=(0,lt.useDispatch)(_t.store),a=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.stylesheet),[]),{slug:i,theme:s=a,tagName:l,layout:c={}}=e,u=__(s,i),d=(0,ct.useHasRecursion)(u),[p,m]=(0,gt.useState)(!1),{isResolved:g,hasInnerBlocks:h,isMissing:_,area:x,onNavigateToEntityRecord:b,title:f,canUserEdit:y}=(0,lt.useSelect)((t=>{const{getEditedEntityRecord:n,hasFinishedResolution:r}=t(_t.store),{getBlockCount:a,getSettings:i}=t(ct.store),s=["postType","wp_template_part",u],l=u?n(...s):null,c=l?.area||e.area,d=!!u&&r("getEditedEntityRecord",s),p=!!d&&t(_t.store).canUser("update",{kind:"postType",name:"wp_template_part",id:u});return{hasInnerBlocks:a(o)>0,isResolved:d,isMissing:d&&(!l||0===Object.keys(l).length),area:c,onNavigateToEntityRecord:i().onNavigateToEntityRecord,title:l?.title,canUserEdit:!!p}}),[u,e.area,o]),v=vB(x),k=(0,ct.useBlockProps)(),w=!i,C=!w&&!_&&g,j=l||v.tagName;return!h&&(i&&!s||i&&_)?(0,it.jsx)(j,{...k,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)("Template part has been deleted or is unavailable: %s"),i)})}):C&&d?(0,it.jsx)(j,{...k,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.RecursionProvider,{uniqueId:u,children:[C&&b&&y&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>b({postId:u,postType:"wp_template_part"}),children:(0,pt.__)("Edit")})}),y&&(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(PB,{tagName:l,setAttributes:t,isEntityAvailable:C,templatePartId:u,defaultWrapper:v.tagName,hasInnerBlocks:h,clientId:o})}),w&&(0,it.jsx)(j,{...k,children:(0,it.jsx)(wB,{area:e.area,templatePartId:u,clientId:o,setAttributes:t,onOpenSelectionModal:()=>m(!0)})}),(0,it.jsx)(ct.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1!==e.length||o!==e[0]?null:(0,it.jsx)(LB,{isEntityAvailable:C,area:x,clientId:o,templatePartId:u,isTemplatePartSelectionOpen:p,setIsTemplatePartSelectionOpen:m})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(HB,{area:x,clientId:o,isEntityAvailable:C,onSelect:e=>(async e=>{await r("postType","wp_template_part",u,{blocks:e.blocks,content:(0,st.serialize)(e.blocks)}),n((0,pt.sprintf)((0,pt.__)('Template Part "%s" updated.'),f||i),{type:"snackbar"})})(e)})}),C&&(0,it.jsx)(AB,{tagName:j,blockProps:k,postId:u,hasInnerBlocks:h,layout:c}),!w&&!g&&(0,it.jsx)(j,{...k,children:(0,it.jsx)(mt.Spinner,{})})]}),p&&(0,it.jsx)(mt.Modal,{overlayClassName:"block-editor-template-part__selection-modal",title:(0,pt.sprintf)((0,pt.__)("Choose a %s"),v.label.toLowerCase()),onRequestClose:()=>m(!1),isFullScreen:!0,children:(0,it.jsx)(CB,{templatePartId:u,clientId:o,area:x,setAttributes:t,onClose:()=>m(!1)})})]})}},EB=()=>{(0,vl.addFilter)("blocks.registerBlockType","core/template-part",RB);const e=["core/post-template","core/post-content"];return(0,vl.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/removeTemplatePartsFromPostTemplates",((t,o,n,{getBlock:r,getBlockParentsByBlockName:a})=>{if("core/template-part"!==o.name)return t;for(const t of e){if(r(n)?.name===t||a(n,t).length)return!1}return!0})),jt({name:VB,metadata:_B,settings:FB})};var OB=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z"}),(0,it.jsx)(St.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]});const GB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-count","title":"Term Count","category":"theme","description":"Displays the post count of a taxonomy term.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"bracketType":{"type":"string","enum":["none","round","square","curly","angle"],"default":"round"}},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-count"}'),$B=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z"})}),UB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z"})}),qB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z"})}),WB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z"})}),ZB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z"})});function JB(e,t){const[o]=(0,_t.useEntityProp)("taxonomy",t,"count",e),n=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n;t&&(t[1]?o=t[2]?t[2]:t[1]:t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o);return(0,lt.useSelect)((e=>{if(!o||!n)return"";const{getEntityRecords:t}=e(_t.store),r=t("taxonomy",o,{slug:n,per_page:1});return r&&r[0]&&r[0].count||""}),[o,n])}(),r=Boolean(e&&t);return{hasContext:r,termCount:r?o||"":n}}const QB={none:{label:(0,pt.__)("No brackets"),icon:$B},round:{label:(0,pt.__)("Round brackets"),icon:UB,before:"(",after:")"},square:{label:(0,pt.__)("Square brackets"),icon:qB,before:"[",after:"]"},curly:{label:(0,pt.__)("Curly brackets"),icon:WB,before:"{",after:"}"},angle:{label:(0,pt.__)("Angle brackets"),icon:ZB,before:"<",after:">"}};const{name:KB}=GB,YB={icon:OB,edit:function({attributes:e,setAttributes:t,context:{termId:o,taxonomy:n}}){const{bracketType:r}=e,a=JB(o,n),i=a?.termCount||0,s=(0,ct.useBlockProps)(),l=Object.entries(QB).map((([e,{label:o,icon:n}])=>({role:"menuitemradio",title:o,isActive:r===e,icon:n,onClick:()=>{t({bracketType:e})}})));return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:QB[r]?.icon??$B,label:(0,pt.__)("Change bracket type"),controls:l})}),(0,it.jsx)("div",{...s,children:((e,t)=>{const{before:o="",after:n=""}=QB[t]||{};return`${o}${e}${n}`})(i,r)})]})}},XB=()=>jt({name:KB,metadata:GB,settings:YB});var eT=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})});const tT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-description","title":"Term Description","category":"theme","description":"Display the description of categories, tags and custom taxonomies when viewing an archive.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"}},"supports":{"align":["wide","full"],"html":false,"color":{"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');function oT(e,t){const[o,n,r]=(0,_t.useEntityProp)("taxonomy",t,"description",e),a=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n;t&&(t[1]?o=t[2]?t[2]:t[1]:t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o);return(0,lt.useSelect)((e=>{if(!o||!n)return"";const{getEntityRecords:t}=e(_t.store),r=t("taxonomy",o,{slug:n,per_page:1});return r&&r[0]&&r[0].description||""}),[o,n])}(),i=Boolean(e&&t);return{hasContext:i,setDescription:n,termDescription:i?r?.rendered||o||"":a}}const{name:nT}=tT,rT={icon:eT,edit:function({attributes:e,setAttributes:t,mergedStyle:o,context:{termId:n,taxonomy:r}}){const{textAlign:a}=e,{termDescription:i}=oT(n,r),s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${a}`]:a}),style:o});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)("div",{...s,children:i?(0,it.jsx)("div",{dangerouslySetInnerHTML:{__html:i}}):(0,it.jsx)("div",{className:"wp-block-term-description__placeholder",children:(0,it.jsx)("span",{children:(0,pt.__)("Term Description")})})})]})},example:{}},aT=()=>jt({name:nT,metadata:tT,settings:rT});var iT=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z"}),(0,it.jsx)(St.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]});const sT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-name","title":"Term Name","category":"theme","description":"Displays the name of a taxonomy term.","keywords":["term title"],"textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"isLink":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-name"}');function lT(e,t){const o=(0,lt.useSelect)((o=>e&&t?o(_t.store).getEntityRecord("taxonomy",t,e):null),[e,t]),n=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n;t&&(t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o);return(0,lt.useSelect)((e=>{if(!o||!n)return null;const{getEntityRecords:t}=e(_t.store),r=t("taxonomy",o,{slug:n,per_page:1});return r&&r[0]?r[0]:null}),[o,n])}(),r=Boolean(e&&t);return{hasContext:r,term:r?o:n}}const{name:cT}=sT,uT={icon:iT,edit:function({attributes:e,setAttributes:t,context:{termId:o,taxonomy:n}}){const{textAlign:r,level:a=0,isLink:i}=e,{term:s}=lT(o,n),l=s?.name?(0,ao.decodeEntities)(s.name):(0,pt.__)("Term Name"),c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),u=vt(),d=0===a?"p":`h${a}`;let p=l;return i&&(p=(0,it.jsx)("a",{href:"#term-name-pseudo-link",onClick:e=>e.preventDefault(),children:l})),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:a,options:[0,1,2,3,4,5,6],onChange:e=>{t({level:e})}}),(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({isLink:!1})},dropdownMenuProps:u,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Make term name a link"),onDeselect:()=>t({isLink:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make term name a link"),onChange:()=>t({isLink:!i}),checked:i})})})}),(0,it.jsx)(d,{...c,children:p})]})}},dT=()=>jt({name:cT,metadata:sT,settings:uT}),pT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/terms-query","title":"Terms Query","category":"theme","description":"An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.","keywords":["terms","taxonomy","categories","tags","list"],"textdomain":"default","attributes":{"termQuery":{"type":"object","default":{"perPage":10,"taxonomy":"category","order":"asc","orderBy":"name","include":[],"hideEmpty":true,"showNested":false,"inherit":false}},"tagName":{"type":"string","default":"div"}},"usesContext":["templateSlug"],"providesContext":{"termQuery":"termQuery"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true}}');function mT(){const e=(0,lt.useSelect)((e=>e(_t.store).getTaxonomies({per_page:-1})),[]);return(0,gt.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))||[]),[e])}function gT({value:e,onChange:t,...o}){const n=mT().map((e=>({label:e.name,value:e.slug})));return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:n,value:e,onChange:t,...o})}function hT({orderBy:e,order:t,onChange:o,...n}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:[{label:(0,pt.__)("Name: A → Z"),value:"name/asc"},{label:(0,pt.__)("Name: Z → A"),value:"name/desc"},{label:(0,pt.__)("Count, high to low"),value:"count/desc"},{label:(0,pt.__)("Count, low to high"),value:"count/asc"}],value:e+"/"+t,onChange:e=>{const[t,n]=e.split("/");o(t,n)},...n})}function _T({value:e,onChange:t,...o}){return(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:!e,onChange:e=>t(!e),...o})}function xT({value:e,onChange:t,...o}){return(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:e,onChange:t,...o})}function bT({value:e,onChange:t,label:o}){return(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:o,isBlock:!0,onChange:e=>{t({inherit:"default"===e})},help:e?(0,pt.__)("Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."):(0,pt.__)("Display terms based on specific criteria."),value:e?"default":"custom",children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"default",label:(0,pt.__)("Default")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,pt.__)("Custom")})]})}function fT({value:e,onChange:t,...o}){return(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:e,min:0,max:100,onChange:t,help:(0,pt.__)("Limit the number of terms you want to show. To show all terms, use 0 (zero)."),...o})}const{HTMLElementControl:yT}=jo(ct.privateApis);function vT({TagName:e,setAttributes:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(yT,{tagName:e,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]})})}const kT=[],wT={order:"asc",_fields:"id,name",context:"view"};function CT({value:e,taxonomy:t,onChange:o,...n}){const[r,a]=(0,gt.useState)(""),[i,s]=(0,gt.useState)(kT),[l,c]=(0,gt.useState)(kT),u=(0,xt.useDebounce)(a,250),{searchResults:d,searchHasResolved:p}=(0,lt.useSelect)((o=>{if(!r)return{searchResults:kT,searchHasResolved:!0};const{getEntityRecords:n,hasFinishedResolution:a}=o(_t.store),i=["taxonomy",t,{...wT,search:r,orderby:"name",exclude:e,per_page:20}];return{searchResults:n(...i),searchHasResolved:a("getEntityRecords",i)}}),[r,t,e]),m=(0,lt.useSelect)((o=>{if(!e?.length)return kT;const{getEntityRecords:n}=o(_t.store);return n("taxonomy",t,{...wT,include:e,per_page:e.length})}),[e,t]);(0,gt.useEffect)((()=>{if(e?.length||s(kT),!m?.length)return;const t=e.reduce(((e,t)=>{const o=m.find((e=>e.id===t));return o&&e.push({id:t,value:(0,ao.decodeEntities)(o.name)}),e}),[]);s(t)}),[e,m]);const g=(0,gt.useMemo)((()=>{if(!d?.length)return{names:kT,mapByName:{}};const e=[],t={};return d.forEach((o=>{const n=(0,ao.decodeEntities)(o.name);e.push(n),t[n]=o})),{names:e,mapByName:t}}),[d]);(0,gt.useEffect)((()=>{p&&c(g.names)}),[g.names,p]);return(0,it.jsx)(mt.FormTokenField,{__next40pxDefaultSize:!0,value:i,onInputChange:u,suggestions:l,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>t?.id||e?.[t]?.id)(g.mapByName,t);return o&&e.add(o),e}),new Set));c(kT),o(t)},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,...n})}function jT({attributes:e,setQuery:t,setAttributes:o,clientId:n,templateSlug:r}){const{termQuery:a,tagName:i}=e,{taxonomy:s,orderBy:l,order:c,hideEmpty:u,inherit:d,showNested:p,perPage:m,include:g}=a,h=vt(),_=mT(),x=_.find((e=>e.slug===s))?.hierarchical,b=!!d,f=["taxonomy","category","tag","archive"].includes(r)||r?.startsWith("taxonomy-")||r?.startsWith("category-")||r?.startsWith("tag-"),y=x,v=!!g?.length,k=(0,pt.__)("Query type"),w=(0,pt.__)("Taxonomy"),C=(0,pt.__)("Order by"),j=(0,pt.__)("Show empty terms"),S=(0,pt.__)("Show nested terms"),B=(0,pt.__)("Max terms"),T=(0,pt.__)("Selected terms");return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({termQuery:{taxonomy:"category",order:"asc",orderBy:"name",include:[],hideEmpty:!0,showNested:!1,inherit:!1,perPage:10}})},dropdownMenuProps:h,children:[f&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==d,label:k,onDeselect:()=>t({inherit:!1}),isShownByDefault:!0,children:(0,it.jsx)(bT,{label:k,value:d,onChange:t})}),!b&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"category"!==s,label:w,onDeselect:()=>{t({taxonomy:"category"})},isShownByDefault:!0,children:(0,it.jsx)(gT,{label:w,value:s,onChange:e=>t({taxonomy:e,include:[]})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"name"!==l||"asc"!==c,label:C,onDeselect:()=>t({orderBy:"name",order:"asc"}),isShownByDefault:!0,children:(0,it.jsx)(hT,{label:C,orderBy:l,order:c,onChange:(e,o)=>{t({orderBy:e,order:o})},disabled:v,help:v?(0,pt.__)("When specific terms are selected, the order is based on their selection order."):void 0})}),!b&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!g?.length,label:T,onDeselect:()=>t({include:[],orderBy:"name",order:"asc"}),isShownByDefault:!0,children:(0,it.jsx)(CT,{label:T,taxonomy:s,value:g,onChange:e=>t({include:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==u,label:j,onDeselect:()=>t({hideEmpty:!0}),isShownByDefault:!0,children:(0,it.jsx)(_T,{label:j,value:u,onChange:e=>t({hideEmpty:e})})}),y&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==p,label:S,onDeselect:()=>t({showNested:!1}),isShownByDefault:!0,children:(0,it.jsx)(xT,{label:S,value:p,onChange:e=>t({showNested:e}),disabled:v,help:v?(0,pt.__)("When specific terms are selected, only those are displayed."):void 0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>10!==m,label:B,onDeselect:()=>t({perPage:10}),isShownByDefault:!0,children:(0,it.jsx)(fT,{label:B,value:m,onChange:e=>t({perPage:e})})})]})}),(0,it.jsx)(vT,{TagName:i,setAttributes:o,clientId:n})]})}const ST=[["core/term-template"]];function BT({attributes:e,setAttributes:t,clientId:o,context:n}){const{tagName:r}=e,a=(0,ct.useBlockProps)(),i=(0,ct.useInnerBlocksProps)(a,{template:ST}),s=(0,gt.useCallback)((e=>t((t=>({termQuery:{...t.termQuery,...e}})))),[t]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(jT,{attributes:e,setQuery:s,setAttributes:t,clientId:o,templateSlug:n?.templateSlug}),(0,it.jsx)(r,{...i})]})}function TT({attributes:e,clientId:t,name:o}){const{blockType:n,activeBlockVariation:r,scopeVariations:a}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockType:r,getBlockVariations:a}=t(st.store);return{blockType:r(o),activeBlockVariation:n(o,e),scopeVariations:a(o,"block")}}),[o,e]),i=r?.icon?.src||r?.icon||n?.icon?.src,s=r?.title||n?.title,{replaceInnerBlocks:l}=(0,lt.useDispatch)(ct.store),c=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...c,children:(0,it.jsx)(ct.__experimentalBlockVariationPicker,{icon:i,label:s,variations:a,onSelect:e=>{e.innerBlocks&&l(t,(0,st.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!1)}})})}var NT=e=>{const t=(0,lt.useSelect)((t=>!!t(ct.store).getBlocks(e.clientId).length),[e.clientId])?BT:TT;return(0,it.jsx)(t,{...e})};const PT=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z"})}),IT=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z"})}),DT=["core/term-name",{isLink:!0}];var MT=[{name:"name",title:(0,pt.__)("Name"),description:(0,pt.__)("Display the terms' names."),attributes:{},icon:PT,scope:["block"],innerBlocks:[["core/term-template",{},[DT]]]},{name:"name-count",title:(0,pt.__)("Name & Count"),description:(0,pt.__)("Display the terms' names and number of posts assigned to each term."),attributes:{},icon:IT,scope:["block"],innerBlocks:[["core/term-template",{},[["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[DT,["core/term-count"]]]]]]}];const{name:zT}=pT,AT={icon:Rv,edit:NT,save:function({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},example:{},variations:MT},LT=()=>jt({name:zT,metadata:pT,settings:AT}),HT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-template","title":"Term Template","category":"theme","ancestor":["core/terms-query"],"description":"Contains the block elements used to render a taxonomy term, like the name, description, and more.","textdomain":"default","usesContext":["termQuery"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-term-template","editorStyle":"wp-block-term-template-editor"}'),RT=[["core/term-name"]];function VT({classList:e}){const t=(0,ct.useInnerBlocksProps)({className:Dt("wp-block-term",e)},{template:RT,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("li",{...t})}const FT=(0,gt.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ct.__experimentalUseBlockPreview)({blocks:e,props:{className:Dt("wp-block-term",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,it.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const{name:ET}=HT,OT={icon:Oa,edit:function({clientId:e,attributes:{layout:t},setAttributes:o,context:{termQuery:{taxonomy:n,order:r,orderBy:a,hideEmpty:i,showNested:s=!1,perPage:l,include:c}={}},__unstableLayoutClassNames:u}){const{type:d,columnCount:p=3}=t||{},[m,g]=(0,gt.useState)(),h={hide_empty:i,order:r,orderby:a,per_page:l||-1};s||c?.length||(h.parent=0),c?.length&&(h.include=c,h.orderby="include",h.order="asc");const{records:_}=(0,_t.useEntityRecords)("taxonomy",n,h),x=(0,lt.useSelect)((t=>t(ct.store).getBlocks(e)),[e]),b=(0,ct.useBlockProps)({className:u}),f=(0,gt.useMemo)((()=>_?.map((e=>({taxonomy:n,termId:e.id,classList:`term-${e.id}`,termData:e})))),[_,n]);if(!_)return(0,it.jsx)("ul",{...b,children:(0,it.jsx)("li",{className:"wp-block-term term-loading",children:(0,it.jsx)("div",{className:"term-loading-placeholder"})})});if(!_.length)return(0,it.jsxs)("p",{...b,children:[" ",(0,pt.__)("No terms found.")]});const y=e=>o((t=>({layout:{...t.layout,...e}})));return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:[{icon:jm,title:(0,pt._x)("List view","Term template block display setting"),onClick:()=>y({type:"default"}),isActive:"default"===d||"constrained"===d},{icon:qd,title:(0,pt._x)("Grid view","Term template block display setting"),onClick:()=>y({type:"grid",columnCount:p}),isActive:"grid"===d}]})}),(0,it.jsx)("ul",{...b,children:f?.map((e=>(0,it.jsxs)(ct.BlockContextProvider,{value:e,children:[e.termId===(m||f[0]?.termId)?(0,it.jsx)(VT,{classList:e.classList}):null,(0,it.jsx)(FT,{blocks:x,blockContextId:e.termId,classList:e.classList,setActiveBlockContextId:g,isHidden:e.termId===(m||f[0]?.termId)})]},e.termId)))})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{}},GT=()=>jt({name:ET,metadata:HT,settings:OT});const $T=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/text-columns","title":"Text Columns (deprecated)","icon":"columns","category":"design","description":"This block is deprecated. Please use the Columns block instead.","textdomain":"default","attributes":{"content":{"type":"array","source":"query","selector":"p","query":{"children":{"type":"string","source":"html"}},"default":[{},{}]},"columns":{"type":"number","default":2},"width":{"type":"string"}},"supports":{"inserter":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-text-columns-editor","style":"wp-block-text-columns"}');var UT={to:[{type:"block",blocks:["core/columns"],transform:({className:e,columns:t,content:o,width:n})=>(0,st.createBlock)("core/columns",{align:"wide"===n||"full"===n?n:void 0,className:e,columns:t},o.map((({children:e})=>(0,st.createBlock)("core/column",{},[(0,st.createBlock)("core/paragraph",{content:e})]))))}]};const{name:qT}=$T,WT={transforms:UT,getEditWrapperProps(e){const{width:t}=e;if("wide"===t||"full"===t)return{"data-align":t}},edit:function({attributes:e,setAttributes:t}){const{width:o,content:n,columns:r}=e;return Wm()("The Text Columns block",{since:"5.3",alternative:"the Columns block"}),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.BlockAlignmentToolbar,{value:o,onChange:e=>t({width:e}),controls:["center","wide","full"]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.PanelBody,{children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:r,onChange:e=>t({columns:e}),min:2,max:4,required:!0})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)({className:`align${o} columns-${r}`}),children:Array.from({length:r}).map(((e,o)=>(0,it.jsx)("div",{className:"wp-block-column",children:(0,it.jsx)(ct.RichText,{tagName:"p",value:n?.[o]?.children,onChange:e=>{t({content:[...n.slice(0,o),{children:e},...n.slice(o+1)]})},"aria-label":(0,pt.sprintf)((0,pt.__)("Column %d text"),o+1),placeholder:(0,pt.__)("New Column")})},`column-${o}`)))})]})},save:function({attributes:e}){const{width:t,content:o,columns:n}=e;return(0,it.jsx)("div",{...ct.useBlockProps.save({className:`align${t} columns-${n}`}),children:Array.from({length:n}).map(((e,t)=>(0,it.jsx)("div",{className:"wp-block-column",children:(0,it.jsx)(ct.RichText.Content,{tagName:"p",value:o?.[t]?.children})},`column-${t}`)))})}},ZT=()=>jt({name:qT,metadata:$T,settings:WT}),JT={attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,content:o}=e;return(0,it.jsx)(ct.RichText.Content,{tagName:"pre",style:{textAlign:t},value:o})}},QT={attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},spacing:{padding:!0}},save({attributes:e}){const{textAlign:t,content:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)("pre",{...ct.useBlockProps.save({className:n}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var KT=[QT,JT];const YT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/verse","title":"Verse","category":"text","description":"Insert poetry. Use special spacing formats. Or quote song lyrics.","keywords":["poetry","poem"],"textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"typography":{"fontSize":true,"__experimentalFontFamily":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-verse","editorStyle":"wp-block-verse-editor"}');const XT={from:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/verse",e)}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/paragraph",e)}]};var eN=XT;const{name:tN}=YT,oN={icon:Kw,example:{attributes:{content:(0,pt.__)("WHAT was he doing, the great god Pan,\n\tDown in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river.")}},transforms:eN,deprecated:KT,merge:(e,t)=>({content:e.content+"\n\n"+t.content}),edit:function({attributes:e,setAttributes:t,mergeBlocks:o,onRemove:n,insertBlocksAfter:r,style:a}){const{textAlign:i,content:s}=e,l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i}),style:a});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:i,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)(ct.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:s,onChange:e=>{t({content:e})},"aria-label":(0,pt.__)("Verse text"),placeholder:(0,pt.__)("Write verse…"),onRemove:n,onMerge:o,textAlign:i,...l,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})},save:function({attributes:e}){const{textAlign:t,content:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)("pre",{...ct.useBlockProps.save({className:n}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},nN=()=>jt({name:tN,metadata:YT,settings:oN});var rN=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})});const aN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/video","title":"Video","category":"media","description":"Embed a video from your media library or upload a new one.","keywords":["movie"],"textdomain":"default","attributes":{"autoplay":{"type":"boolean","source":"attribute","selector":"video","attribute":"autoplay"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"controls":{"type":"boolean","source":"attribute","selector":"video","attribute":"controls","default":true},"id":{"type":"number","role":"content"},"loop":{"type":"boolean","source":"attribute","selector":"video","attribute":"loop"},"muted":{"type":"boolean","source":"attribute","selector":"video","attribute":"muted"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"},"preload":{"type":"string","source":"attribute","selector":"video","attribute":"preload","default":"metadata"},"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"video","attribute":"src","role":"content"},"playsInline":{"type":"boolean","source":"attribute","selector":"video","attribute":"playsinline"},"tracks":{"role":"content","type":"array","items":{"type":"object"},"default":[]}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-video-editor","style":"wp-block-video"}');function iN({tracks:e=[]}){return e.map((e=>{const{id:t,...o}=e;return(0,it.jsx)("track",{...o},t??o.src)}))}const{attributes:sN}=aN,lN={attributes:sN,save({attributes:e}){const{autoplay:t,caption:o,controls:n,loop:r,muted:a,poster:i,preload:s,src:l,playsInline:c,tracks:u}=e;return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)("video",{autoPlay:t,controls:n,loop:r,muted:a,poster:i,preload:"metadata"!==s?s:void 0,src:l,playsInline:c,children:(0,it.jsx)(iN,{tracks:u})}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}};var cN=[lN];const uN=[{value:"auto",label:(0,pt.__)("Auto")},{value:"metadata",label:(0,pt.__)("Metadata")},{value:"none",label:(0,pt._x)("None","Preload value")}];var dN=({setAttributes:e,attributes:t})=>{const{autoplay:o,controls:n,loop:r,muted:a,playsInline:i,preload:s}=t,l=(0,pt.__)("Autoplay may cause usability issues for some users."),c=gt.Platform.select({web:(0,gt.useCallback)((e=>e?l:null),[]),native:l}),u=(0,gt.useMemo)((()=>{const t=t=>o=>{e({[t]:o,..."autoplay"===t&&{muted:o,playsInline:o}})};return{autoplay:t("autoplay"),loop:t("loop"),muted:t("muted"),controls:t("controls"),playsInline:t("playsInline")}}),[]),d=(0,gt.useCallback)((t=>{e({preload:t})}),[]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!o,onDeselect:()=>{e({autoplay:!1,muted:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Autoplay"),onChange:u.autoplay,checked:!!o,help:c})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>{e({loop:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Loop"),onChange:u.loop,checked:!!r})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Muted"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>{e({muted:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Muted"),onChange:u.muted,checked:!!a,disabled:o,help:o?(0,pt.__)("Muted because of Autoplay."):null})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Playback controls"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>{e({controls:!0})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Playback controls"),onChange:u.controls,checked:!!n})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Play inline"),isShownByDefault:!0,hasValue:()=>!!i,onDeselect:()=>{e({playsInline:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Play inline"),onChange:u.playsInline,checked:!!i,disabled:o,help:o?(0,pt.__)("Play inline enabled because of Autoplay."):(0,pt.__)("When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Preload"),isShownByDefault:!0,hasValue:()=>"metadata"!==s,onDeselect:()=>{e({preload:"metadata"})},children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Preload"),value:s,onChange:d,options:uN,hideCancelButton:!0})})]})};const{Badge:pN}=jo(mt.privateApis),mN=["text/vtt"],gN=[{label:(0,pt.__)("Subtitles"),value:"subtitles"},{label:(0,pt.__)("Captions"),value:"captions"},{label:(0,pt.__)("Descriptions"),value:"descriptions"},{label:(0,pt.__)("Chapters"),value:"chapters"},{label:(0,pt.__)("Metadata"),value:"metadata"}],hN={src:"",label:"",srcLang:"en",kind:"subtitles",default:!1};function _N({tracks:e,onEditPress:t}){const o=e.map(((e,o)=>(0,it.jsxs)(mt.__experimentalHStack,{className:"block-library-video-tracks-editor__track-list-track",children:[(0,it.jsx)("span",{children:e.label}),(0,it.jsxs)(mt.__experimentalHStack,{justify:"flex-end",children:[e.default&&(0,it.jsx)(pN,{children:(0,pt.__)("Default")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(o),"aria-label":(0,pt.sprintf)((0,pt._x)("Edit %s","text tracks"),e.label),children:(0,pt.__)("Edit")})]})]},e.id??e.src)));return(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Text tracks"),className:"block-library-video-tracks-editor__track-list",children:o})}function xN({track:e,onChange:t,onClose:o,onRemove:n,allowSettingDefault:r}){const[a,i]=(0,gt.useState)({...hN,...e}),{src:s,label:l,srcLang:c,kind:u,default:d}=a,p=s.startsWith("blob:")?"":(0,no.getFilename)(s)||"";return(0,it.jsxs)(mt.__experimentalVStack,{className:"block-library-video-tracks-editor__single-track-editor",spacing:"4",children:[(0,it.jsx)("span",{className:"block-library-video-tracks-editor__single-track-editor-edit-track-label",children:(0,pt.__)("Edit track")}),(0,it.jsxs)("span",{children:[(0,pt.__)("File"),": ",(0,it.jsx)("b",{children:p})]}),(0,it.jsxs)(mt.__experimentalGrid,{columns:2,gap:4,children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>i((t=>({...t,label:e}))),label:(0,pt.__)("Label"),value:l,help:(0,pt.__)("Title of track")}),(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>i((t=>({...t,srcLang:e}))),label:(0,pt.__)("Source language"),value:c,help:(0,pt.__)("Language tag (en, fr, etc.)")})]}),(0,it.jsxs)(mt.__experimentalVStack,{spacing:"4",children:[(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-library-video-tracks-editor__single-track-editor-kind-select",options:gN,value:u,label:(0,pt.__)("Kind"),onChange:e=>i((t=>({...t,kind:e})))}),(0,it.jsx)(mt.ToggleControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Set as default track"),checked:d,disabled:!r,onChange:e=>i((t=>({...t,default:e})))}),(0,it.jsxs)(mt.__experimentalHStack,{className:"block-library-video-tracks-editor__single-track-editor-buttons-container",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"link",onClick:n,children:(0,pt.__)("Remove track")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t(a),o()},children:(0,pt.__)("Apply")})]})]})]})}function bN({tracks:e=[],onChange:t}){const o=(0,lt.useSelect)((e=>e(ct.store).getSettings().mediaUpload),[]),[n,r]=(0,gt.useState)(null),a=(0,gt.useRef)(),i=(o=[],n=!1)=>{const r=new Map(e.map((e=>[e.id,e]))),a=o.map((({id:e,title:t,url:o})=>r.has(e)?r.get(e):{...hN,id:e,label:t||"",src:o}));0!==a.length&&t([...n?e:[],...a])};function s(e){const t=e.target.files;o({allowedTypes:mN,filesList:t,onFileChange:e=>{if(!Array.isArray(e))return;const t=e.filter((e=>!!e?.id));t.length&&i(t,!0)}})}return(0,gt.useEffect)((()=>{a.current?.focus()}),[n]),o?(0,it.jsx)(mt.Dropdown,{contentClassName:"block-library-video-tracks-editor",focusOnMount:!0,popoverProps:{ref:a},renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e||r(null),t()},children:(0,pt.__)("Text tracks")})}),renderContent:()=>null!==n?(0,it.jsx)(xN,{track:e[n],onChange:o=>{const r=[...e];r[n]=o,t(r)},onClose:()=>r(null),onRemove:()=>{t(e.filter(((e,t)=>t!==n))),r(null)},allowSettingDefault:!e.some((e=>e.default))||e[n].default}):(0,it.jsxs)(it.Fragment,{children:[0===e.length&&(0,it.jsxs)("div",{className:"block-library-video-tracks-editor__tracks-informative-message",children:[(0,it.jsx)("h2",{className:"block-library-video-tracks-editor__tracks-informative-message-title",children:(0,pt.__)("Text tracks")}),(0,it.jsx)("p",{className:"block-library-video-tracks-editor__tracks-informative-message-description",children:(0,pt.__)("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.")})]}),(0,it.jsxs)(mt.NavigableMenu,{children:[(0,it.jsx)(_N,{tracks:e,onEditPress:r}),(0,it.jsx)(mt.MenuGroup,{className:"block-library-video-tracks-editor__add-tracks-container",label:(0,pt.__)("Add tracks"),children:(0,it.jsxs)(ct.MediaUploadCheck,{children:[(0,it.jsx)(ct.MediaUpload,{onSelect:i,allowedTypes:mN,value:e.map((({id:e})=>e)),multiple:!0,render:({open:e})=>(0,it.jsx)(mt.MenuItem,{icon:nh,onClick:e,children:(0,pt.__)("Open Media Library")})}),(0,it.jsx)(mt.FormFileUpload,{onChange:s,accept:".vtt,text/vtt",multiple:!0,render:({openFileDialog:e})=>(0,it.jsx)(mt.MenuItem,{icon:Wp,onClick:e,children:(0,pt._x)("Upload","verb")})})]})})]})]})}):null}const fN=["video"];var yN=function({isSelected:e,attributes:t,className:o,setAttributes:n,insertBlocksAfter:r,onReplace:a}){const i=(0,gt.useRef)(),{id:s,controls:l,poster:c,src:u,tracks:d}=t,[p,m]=(0,gt.useState)(t.blob),g=vt(),h="default"===(0,ct.useBlockEditingMode)();function _(e){if(!e||!e.url)return n({src:void 0,id:void 0,poster:void 0,caption:void 0,blob:void 0}),void m();(0,ht.isBlobURL)(e.url)?m(e.url):(n({blob:void 0,src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0,caption:e.caption}),m())}function x(e){if(e!==u){const t=No({attributes:{url:e}});if(void 0!==t&&a)return void a(t);n({blob:void 0,src:e,id:void 0,poster:void 0}),m()}}ft({url:p,allowedTypes:fN,onChange:_,onError:f}),(0,gt.useEffect)((()=>{i.current&&i.current.load()}),[c]);const{createErrorNotice:b}=(0,lt.useDispatch)(bo.store);function f(e){b(e,{type:"snackbar"})}const y=t=>(0,it.jsx)(mt.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!e,icon:rN,label:(0,pt.__)("Video"),instructions:(0,pt.__)("Drag and drop a video, upload, or choose from your library."),children:t}),v=Dt(o,{"is-transient":!!p}),k=(0,ct.useBlockProps)({className:v});return u||p?(0,it.jsxs)(it.Fragment,{children:[e&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(bN,{tracks:d,onChange:e=>{n({tracks:e})}})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:s,mediaURL:u,allowedTypes:fN,accept:"video/*",onSelect:_,onSelectURL:x,onError:f,onReset:()=>_(void 0)})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({autoplay:!1,controls:!0,loop:!1,muted:!1,playsInline:!1,preload:"metadata",poster:void 0})},dropdownMenuProps:g,children:[(0,it.jsx)(dN,{setAttributes:n,attributes:t}),(0,it.jsx)(_s,{poster:c,onChange:e=>n({poster:e?.url})})]})}),(0,it.jsxs)("figure",{...k,children:[(0,it.jsx)(mt.Disabled,{isDisabled:!e,children:(0,it.jsx)("video",{controls:l,poster:c,src:u||p,ref:i,children:(0,it.jsx)(iN,{tracks:d})})}),!!p&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(zo,{attributes:t,setAttributes:n,isSelected:e,insertBlocksAfter:r,label:(0,pt.__)("Video caption text"),showToolbarButton:e&&h})]})]}):(0,it.jsx)("div",{...k,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:rN}),onSelect:_,onSelectURL:x,accept:"video/*",allowedTypes:fN,value:t,onError:f,placeholder:y})})};const vN={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("video/"),transform(e){const t=e[0];return(0,st.createBlock)("core/video",{blob:(0,ht.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:({named:{src:e,mp4:t,m4v:o,webm:n,ogv:r,flv:a}})=>e||t||o||n||r||a},poster:{type:"string",shortcode:({named:{poster:e}})=>e},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&1===e.children.length&&"VIDEO"===e.firstChild.nodeName,transform:e=>{const t=e.firstChild,o={autoplay:!!t.hasAttribute("autoplay")||void 0,controls:!!t.hasAttribute("controls")&&void 0,loop:!!t.hasAttribute("loop")||void 0,muted:!!t.hasAttribute("muted")||void 0,preload:t.getAttribute("preload")||void 0,playsInline:!!t.hasAttribute("playsinline")||void 0,poster:t.getAttribute("poster")||void 0,src:t.getAttribute("src")||void 0};return(0,ht.isBlobURL)(o.src)&&(o.blob=o.src,delete o.src),(0,st.createBlock)("core/video",o)}}]};var kN=vN;const{name:wN}=aN,CN={icon:rN,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",caption:(0,pt.__)("Wood thrush singing in Central Park, NYC.")}},transforms:kN,deprecated:cN,edit:yN,save:function({attributes:e}){const{autoplay:t,caption:o,controls:n,loop:r,muted:a,poster:i,preload:s,src:l,playsInline:c,tracks:u}=e;return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)("video",{autoPlay:t,controls:n,loop:r,muted:a,poster:i,preload:"metadata"!==s?s:void 0,src:l,playsInline:c,children:(0,it.jsx)(iN,{tracks:u})}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o})]})}},jN=()=>jt({name:wN,metadata:aN,settings:CN});const SN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/footnotes","title":"Footnotes","category":"text","description":"Display footnotes added to the page.","keywords":["references"],"textdomain":"default","usesContext":["postId","postType"],"supports":{"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":false,"width":false,"style":false}},"color":{"background":true,"link":true,"text":true,"__experimentalDefaultControls":{"link":true,"text":true}},"html":false,"multiple":false,"reusable":false,"inserter":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-footnotes"}'),BN={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let TN;const NN=new Uint8Array(16);function PN(){if(!TN&&(TN="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!TN))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return TN(NN)}const IN=[];for(let e=0;e<256;++e)IN.push((e+256).toString(16).slice(1));function DN(e,t=0){return IN[e[t+0]]+IN[e[t+1]]+IN[e[t+2]]+IN[e[t+3]]+"-"+IN[e[t+4]]+IN[e[t+5]]+"-"+IN[e[t+6]]+IN[e[t+7]]+"-"+IN[e[t+8]]+IN[e[t+9]]+"-"+IN[e[t+10]]+IN[e[t+11]]+IN[e[t+12]]+IN[e[t+13]]+IN[e[t+14]]+IN[e[t+15]]}const MN=function(e,t,o){if(BN.randomUUID&&!t&&!e)return BN.randomUUID();const n=(e=e||{}).random||(e.rng||PN)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){o=o||0;for(let e=0;e<16;++e)t[o+e]=n[e];return t}return DN(n)},{usesContextKey:zN}=jo(ct.privateApis),AN="core/footnote",LN="core/post-content",HN={title:(0,pt.__)("Footnote"),tagName:"sup",className:"fn",attributes:{"data-fn":"data-fn"},interactive:!0,contentEditable:!1,[zN]:["postType","postId"],edit:function({value:e,onChange:t,isObjectActive:o,context:{postType:n,postId:r}}){const a=(0,lt.useRegistry)(),{getSelectedBlockClientId:i,getBlocks:s,getBlockRootClientId:l,getBlockName:c,getBlockParentsByBlockName:u}=a.select(ct.store),d=(0,lt.useSelect)((e=>{if(!e(st.store).getBlockType("core/footnotes"))return!1;const t=e(ct.store).getSettings().allowedBlockTypes;if(!1===t||Array.isArray(t)&&!t.includes("core/footnotes"))return!1;const o=e(_t.store).getEntityRecord("postType",n,r);if("string"!=typeof o?.meta?.footnotes)return!1;const{getBlockParentsByBlockName:a,getSelectedBlockClientId:i}=e(ct.store),s=a(i(),"core/block");return!s||0===s.length}),[n,r]),{selectionChange:p,insertBlock:m}=(0,lt.useDispatch)(ct.store);if(!d)return null;return(0,it.jsx)(ct.RichTextToolbarButton,{icon:Um,title:(0,pt.__)("Footnote"),onClick:function(){a.batch((()=>{let n;if(o){const t=e.replacements[e.start];n=t?.attributes?.["data-fn"]}else{n=MN();const o=(0,Tn.insertObject)(e,{type:AN,attributes:{"data-fn":n},innerHTML:`<a href="#${n}" id="${n}-link">*</a>`},e.end,e.end);o.start=o.end-1,t(o)}const r=i(),a=u(r,LN);let d=null;{const e=[...a.length?s(a[0]):s()];for(;e.length;){const t=e.shift();if("core/footnotes"===t.name){d=t;break}e.push(...t.innerBlocks)}}if(!d){let e=l(r);for(;e&&c(e)!==LN;)e=l(e);d=(0,st.createBlock)("core/footnotes"),m(d,void 0,e)}p(d.clientId,n,0,0)}))},isActive:o})}},{name:RN}=SN,VN={icon:Um,edit:function({context:{postType:e,postId:t}}){const[o,n]=(0,_t.useEntityProp)("postType",e,"meta",t),r="string"==typeof o?.footnotes,a=o?.footnotes?JSON.parse(o.footnotes):[],i=(0,ct.useBlockProps)();return r?a.length?(0,it.jsx)("ol",{...i,children:a.map((({id:e,content:t})=>(0,it.jsxs)("li",{onMouseDown:e=>{e.target===e.currentTarget&&(e.target.firstElementChild.focus(),e.preventDefault())},children:[(0,it.jsx)(ct.RichText,{id:e,tagName:"span",value:t,identifier:e,onFocus:e=>{e.target.textContent.trim()||e.target.scrollIntoView()},onChange:t=>{n({...o,footnotes:JSON.stringify(a.map((o=>o.id===e?{content:t,id:e}:o)))})}})," ",(0,it.jsx)("a",{href:`#${e}-link`,children:"↩︎"})]},e)))}):(0,it.jsx)("div",{...i,children:(0,it.jsx)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Um}),label:(0,pt.__)("Footnotes"),instructions:(0,pt.__)("Footnotes found in blocks within this document will be displayed here.")})}):(0,it.jsx)("div",{...i,children:(0,it.jsx)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Um}),label:(0,pt.__)("Footnotes"),instructions:(0,pt.__)("Footnotes are not supported here. Add this block to post or page content.")})})}},FN=()=>{(0,Tn.registerFormatType)(AN,HN),jt({name:RN,metadata:SN,settings:VN})};var EN,ON,GN=Object.getOwnPropertyNames;const $N=(EN={"packages/block-library/src/utils/is-block-metadata-experimental.js"(e,t){t.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}}},function(){return ON||(0,EN[GN(EN)[0]])((ON={exports:{}}).exports,ON),ON.exports})(),UN=window.wp.keyboardShortcuts;var qN=function(){const{registerShortcut:e}=(0,lt.useDispatch)(UN.store),{replaceBlocks:t}=(0,lt.useDispatch)(ct.store),{getBlockName:o,getSelectedBlockClientId:n,getBlockAttributes:r}=(0,lt.useSelect)(ct.store),a=(e,a)=>{e.preventDefault();const i=n();if(null===i)return;const s=o(i),l="core/paragraph"===s,c="core/heading"===s;if(!l&&!c)return;const u=0===a?"core/paragraph":"core/heading",d=r(i);if(l&&0===a||c&&d.level===a)return;const p="core/paragraph"===s?"align":"textAlign",m="core/paragraph"===u?"align":"textAlign";t(i,(0,st.createBlock)(u,{level:a,content:d.content,[m]:d[p]}))};return(0,gt.useEffect)((()=>{e({name:"core/block-editor/transform-heading-to-paragraph",category:"block-library",description:(0,pt.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}]}),[1,2,3,4,5,6].forEach((t=>{e({name:`core/block-editor/transform-paragraph-to-heading-${t}`,category:"block-library",description:(0,pt.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${t}`}})}))}),[e]),(0,UN.useShortcut)("core/block-editor/transform-heading-to-paragraph",(e=>a(e,0))),(0,UN.useShortcut)("core/block-editor/transform-paragraph-to-heading-1",(e=>a(e,1))),(0,UN.useShortcut)("core/block-editor/transform-paragraph-to-heading-2",(e=>a(e,2))),(0,UN.useShortcut)("core/block-editor/transform-paragraph-to-heading-3",(e=>a(e,3))),(0,UN.useShortcut)("core/block-editor/transform-paragraph-to-heading-4",(e=>a(e,4))),(0,UN.useShortcut)("core/block-editor/transform-paragraph-to-heading-5",(e=>a(e,5))),(0,UN.useShortcut)("core/block-editor/transform-paragraph-to-heading-6",(e=>a(e,6))),null};const WN={};Co(WN,{BlockKeyboardShortcuts:qN});const ZN=()=>(()=>{const r=[se,$,E,V,W,J,ze,e,t,o,n,i,l,u,d,p,m,h,_,x,f,I,D,M,z,F,G,Z,U,q,K,Y,X,ne,ae,ie,re,Ce,je,Ae,He,Re,Ve,Fe,$e,Ue,qe,We,Je,ot,nt,rt,at,ee,te,oe,Ee,Ge,Oe,Se,Qe,s,we,xe,be,he,le,ce,de,pe,ge,_e,ve,fe,ye,ke,Te,Ne,Pe,Ie,Be,Me,Le,b,y,v,k,w,C,j,P,B,T,N,S,me,Ze,O,Q,Ke,Ye,Xe,et,tt,De,ue];return window?.__experimentalEnableBlockExperiments&&r.push(c),window?.__experimentalEnableFormBlocks&&(r.push(A),r.push(L),r.push(H),r.push(R)),window?.wp?.oldEditor&&(window?.wp?.needsClassicBlock||!window?.__experimentalDisableTinymce||new URLSearchParams(window?.location?.search).get("requiresTinymce"))&&r.push(g),r.filter(Boolean)})().filter((({metadata:e})=>!$N(e))),JN=(e=ZN())=>{e.forEach((({init:e})=>e())),window.__unstableAutoRegisterBlocks&&window.__unstableAutoRegisterBlocks.forEach((e=>{const t=jo((0,lt.select)(st.store)).getBootstrappedBlockType(e).apiVersion;(0,st.registerBlockType)(e,{title:e,...t<3&&{apiVersion:3},edit:function({attributes:t}){const o=(0,ct.useBlockProps)(),{content:n,status:r,error:a}=(0,ut.useServerSideRender)({block:e,attributes:t});return"loading"===r?(0,it.jsx)("div",{...o,children:(0,pt.__)("Loading…")}):"error"===r?(0,it.jsx)("div",{...o,children:(0,pt.sprintf)((0,pt.__)("Error loading block: %s"),a)}):(0,it.jsx)("div",{...o,dangerouslySetInnerHTML:{__html:n||""}})},save:()=>null})})),(0,st.setDefaultBlockName)(Ob),window.wp&&window.wp.oldEditor&&e.some((({name:e})=>e===lr))&&(0,st.setFreeformContentHandlerName)(lr),(0,st.setUnregisteredTypeHandlerName)(Ch),(0,st.setGroupingBlockName)(Jd)},QN=void 0})(),(window.wp=window.wp||{}).blockLibrary=a})();
\ No newline at end of file
+function ol(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function nl(e){return"#"+e.map(ol).join("")}function rl(e){return e?(t=e,Array.isArray(t[0])?e:[e]):[];var t}function al(e,t,o){for(var n=0;n<o.length;n++)if(il(e,t,o[n]))return!0;return!1}function il(e,t,o){switch(o.length){case 3:if(function(e,t,o){if(255!==e[t+3])return!0;if(e[t]===o[0]&&e[t+1]===o[1]&&e[t+2]===o[2])return!0;return!1}(e,t,o))return!0;break;case 4:if(function(e,t,o){if(e[t+3]&&o[3])return e[t]===o[0]&&e[t+1]===o[1]&&e[t+2]===o[2]&&e[t+3]===o[3];return e[t+3]===o[3]}(e,t,o))return!0;break;case 5:if(function(e,t,o){var n=o[0],r=o[1],a=o[2],i=o[3],s=o[4],l=e[t+3],c=sl(l,i,s);if(!i)return c;if(!l&&c)return!0;if(sl(e[t],n,s)&&sl(e[t+1],r,s)&&sl(e[t+2],a,s)&&c)return!0;return!1}(e,t,o))return!0;break;default:return!1}}function sl(e,t,o){return e>=t-o&&e<=t+o}function ll(e,t,o){for(var n={},r=o.ignoredColor,a=o.step,i=[0,0,0,0,0],s=0;s<t;s+=a){var l=e[s],c=e[s+1],u=e[s+2],d=e[s+3];if(!r||!al(e,s,r)){var p=Math.round(l/24)+","+Math.round(c/24)+","+Math.round(u/24);n[p]?n[p]=[n[p][0]+l*d,n[p][1]+c*d,n[p][2]+u*d,n[p][3]+d,n[p][4]+1]:n[p]=[l*d,c*d,u*d,d,1],i[4]<n[p][4]&&(i=n[p])}}var m=i[0],g=i[1],h=i[2],_=i[3],x=i[4];return _?[Math.round(m/_),Math.round(g/_),Math.round(h/_),Math.round(_/x)]:o.defaultColor}function cl(e,t,o){for(var n=0,r=0,a=0,i=0,s=0,l=o.ignoredColor,c=o.step,u=0;u<t;u+=c){var d=e[u+3],p=e[u]*d,m=e[u+1]*d,g=e[u+2]*d;l&&al(e,u,l)||(n+=p,r+=m,a+=g,i+=d,s++)}return i?[Math.round(n/i),Math.round(r/i),Math.round(a/i),Math.round(i/s)]:o.defaultColor}function ul(e,t,o){for(var n=0,r=0,a=0,i=0,s=0,l=o.ignoredColor,c=o.step,u=0;u<t;u+=c){var d=e[u],p=e[u+1],m=e[u+2],g=e[u+3];l&&al(e,u,l)||(n+=d*d*g,r+=p*p*g,a+=m*m*g,i+=g,s++)}return i?[Math.round(Math.sqrt(n/i)),Math.round(Math.sqrt(r/i)),Math.round(Math.sqrt(a/i)),Math.round(i/s)]:o.defaultColor}function dl(e){return pl(e,"defaultColor",[0,0,0,0])}function pl(e,t,o){return void 0===e[t]?o:e[t]}function ml(e){if(hl(e)){var t=e.naturalWidth,o=e.naturalHeight;return e.naturalWidth||-1===e.src.search(/\.svg(\?|$)/i)||(t=o=100),{width:t,height:o}}return function(e){return"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement}(e)?{width:e.videoWidth,height:e.videoHeight}:{width:e.width,height:e.height}}function gl(e){return function(e){return"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement}(e)?"canvas":function(e){return _l&&e instanceof OffscreenCanvas}(e)?"offscreencanvas":function(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}(e)?"imagebitmap":e.src}function hl(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement}var _l="undefined"!=typeof OffscreenCanvas;var xl="undefined"==typeof window;function bl(e){return Error("FastAverageColor: "+e)}function fl(e,t){t||console.error(e)}var yl=function(){function e(){this.canvas=null,this.ctx=null}return e.prototype.getColorAsync=function(e,t){if(!e)return Promise.reject(bl("call .getColorAsync() without resource."));if("string"==typeof e){if("undefined"==typeof Image)return Promise.reject(bl("resource as string is not supported in this environment"));var o=new Image;return o.crossOrigin=t&&t.crossOrigin||"",o.src=e,this.bindImageEvents(o,t)}if(hl(e)&&!e.complete)return this.bindImageEvents(e,t);var n=this.getColor(e,t);return n.error?Promise.reject(n.error):Promise.resolve(n)},e.prototype.getColor=function(e,t){var o=dl(t=t||{});if(!e)return fl(a=bl("call .getColor(null) without resource"),t.silent),this.prepareResult(o,a);var n=function(e,t){var o,n=pl(t,"left",0),r=pl(t,"top",0),a=pl(t,"width",e.width),i=pl(t,"height",e.height),s=a,l=i;return"precision"===t.mode||(a>i?(o=a/i,s=100,l=Math.round(s/o)):(o=i/a,l=100,s=Math.round(l/o)),(s>a||l>i||s<10||l<10)&&(s=a,l=i)),{srcLeft:n,srcTop:r,srcWidth:a,srcHeight:i,destWidth:s,destHeight:l}}(ml(e),t);if(!(n.srcWidth&&n.srcHeight&&n.destWidth&&n.destHeight))return fl(a=bl('incorrect sizes for resource "'.concat(gl(e),'"')),t.silent),this.prepareResult(o,a);if(!this.canvas&&(this.canvas=xl?_l?new OffscreenCanvas(1,1):null:document.createElement("canvas"),!this.canvas))return fl(a=bl("OffscreenCanvas is not supported in this browser"),t.silent),this.prepareResult(o,a);if(!this.ctx){if(this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),!this.ctx)return fl(a=bl("Canvas Context 2D is not supported in this browser"),t.silent),this.prepareResult(o);this.ctx.imageSmoothingEnabled=!1}this.canvas.width=n.destWidth,this.canvas.height=n.destHeight;try{this.ctx.clearRect(0,0,n.destWidth,n.destHeight),this.ctx.drawImage(e,n.srcLeft,n.srcTop,n.srcWidth,n.srcHeight,0,0,n.destWidth,n.destHeight);var r=this.ctx.getImageData(0,0,n.destWidth,n.destHeight).data;return this.prepareResult(this.getColorFromArray4(r,t))}catch(n){var a;return fl(a=bl("security error (CORS) for resource ".concat(gl(e),".\nDetails: https://developer.mozilla.org/en/docs/Web/HTML/CORS_enabled_image")),t.silent),!t.silent&&console.error(n),this.prepareResult(o,a)}},e.prototype.getColorFromArray4=function(e,t){t=t||{};var o=e.length,n=dl(t);if(o<4)return n;var r,a=o-o%4,i=4*(t.step||1);switch(t.algorithm||"sqrt"){case"simple":r=cl;break;case"sqrt":r=ul;break;case"dominant":r=ll;break;default:throw bl("".concat(t.algorithm," is unknown algorithm"))}return r(e,a,{defaultColor:n,ignoredColor:rl(t.ignoredColor),step:i})},e.prototype.prepareResult=function(e,t){var o,n=e.slice(0,3),r=[e[0],e[1],e[2],e[3]/255],a=(299*(o=e)[0]+587*o[1]+114*o[2])/1e3<128;return{value:[e[0],e[1],e[2],e[3]],rgb:"rgb("+n.join(",")+")",rgba:"rgba("+r.join(",")+")",hex:nl(n),hexa:nl(e),isDark:a,isLight:!a,error:t}},e.prototype.destroy=function(){this.canvas&&(this.canvas.width=1,this.canvas.height=1,this.canvas=null),this.ctx=null},e.prototype.bindImageEvents=function(e,t){var o=this;return new Promise((function(n,r){var a=function(){l();var a=o.getColor(e,t);a.error?r(a.error):n(a)},i=function(){l(),r(bl('Error loading image "'.concat(e.src,'".')))},s=function(){l(),r(bl('Image "'.concat(e.src,'" loading aborted')))},l=function(){e.removeEventListener("load",a),e.removeEventListener("error",i),e.removeEventListener("abort",s)};e.addEventListener("load",a),e.addEventListener("error",i),e.addEventListener("abort",s)}))},e}();const vl=window.wp.hooks;!function(e){e.forEach((function(e){tl.indexOf(e)<0&&(e(Xs,Ws),tl.push(e))}))}([function(e,t){var o={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var r in o)n[o[r]]=r;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var r,i,s=n[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!a.length)for(var d in o)a[d]=new e(o[d]).toRgb();for(var p in o){var m=(r=l,i=a[p],Math.pow(r.r-i.r,2)+Math.pow(r.g-i.g,2)+Math.pow(r.b-i.b,2));m<c&&(c=m,u=p)}return u}},t.string.push([function(t){var n=t.toLowerCase(),r="transparent"===n?"#0000":o[n];return r?new e(r).toRgb():null},"name"])}]);const kl="#FFF";function wl(){return wl.fastAverageColor||(wl.fastAverageColor=new yl),wl.fastAverageColor}const Cl=fo((async e=>{if(!e)return kl;const{r:t,g:o,b:n,a:r}=el(kl).toRgb();try{const a=(0,vl.applyFilters)("media.crossOrigin",void 0,e);return(await wl().getColorAsync(e,{defaultColor:[t,o,n,255*r],silent:!0,crossOrigin:a})).hex}catch(e){return kl}}));function jl(e,t,o){if(t===o||100===e)return el(t).isDark();const n=el(t).alpha(e/100).toRgb(),r=el(o).toRgb(),a=(s=r,{r:(i=n).r*i.a+s.r*s.a*(1-i.a),g:i.g*i.a+s.g*s.a*(1-i.a),b:i.b*i.a+s.b*s.a*(1-i.a),a:i.a+s.a*(1-i.a)});var i,s;return el(a).isDark()}var Sl=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((function({attributes:e,clientId:t,isSelected:o,overlayColor:n,setAttributes:r,setOverlayColor:a,toggleSelection:i,context:{postId:s,postType:l}}){const{contentPosition:c,id:u,url:d,backgroundType:p,useFeaturedImage:m,dimRatio:g,focalPoint:h,hasParallax:_,isDark:x,isRepeated:b,minHeight:f,minHeightUnit:y,alt:v,allowedBlocks:k,templateLock:w,tagName:C="div",isUserOverlayColor:j,sizeSlug:S,poster:B}=e,[T]=(0,_t.useEntityProp)("postType",l,"featured_media",s),{getSettings:N}=(0,lt.useSelect)(ct.store),{__unstableMarkNextChangeAsNotPersistent:P}=(0,lt.useDispatch)(ct.store),{media:I}=(0,lt.useSelect)((e=>({media:T&&m?e(_t.store).getEntityRecord("postType","attachment",T,{context:"view"}):void 0})),[T,m]),D=I?.media_details?.sizes?.[S]?.source_url??I?.source_url;(0,gt.useEffect)((()=>{(async()=>{if(!m)return;const e=await Cl(D);let t=n.color;j||(t=e,P(),a(t));const o=jl(g,t,e);P(),r({isDark:o,isUserOverlayColor:j||!1})})()}),[D]);const M=m?D:d?.replaceAll("&","&"),z=m?Ai:p,{createErrorNotice:A}=(0,lt.useDispatch)(bo.store),{gradientClass:L,gradientValue:H}=(0,ct.__experimentalUseGradient)(),R=async e=>{const t=function(e){if(!e||!e.url&&!e.src)return{url:void 0,id:void 0};let t;if((0,ht.isBlobURL)(e.url)&&(e.type=(0,ht.getBlobTypeByURL)(e.url)),e.media_type)t=e.media_type===Ai?Ai:Li;else{if(!e.type||e.type!==Ai&&e.type!==Li)return;t=e.type}return{url:e.url||e.src,id:e.id,alt:e?.alt,backgroundType:t,...t===Li?{hasParallax:void 0}:{}}}(e),o=[e?.type,e?.media_type].includes(Ai),i=await Cl(o?e?.url:void 0);let s=n.color;j||(s=i,a(s),P());const l=void 0===d&&100===g?50:g,c=jl(l,s,i);if(z===Ai&&t?.id){const{imageDefaultSize:o}=N();S&&(e?.sizes?.[S]||e?.media_details?.sizes?.[S])?(t.sizeSlug=S,t.url=e?.sizes?.[S]?.url||e?.media_details?.sizes?.[S]?.source_url):e?.sizes?.[o]||e?.media_details?.sizes?.[o]?(t.sizeSlug=o,t.url=e?.sizes?.[o]?.url||e?.media_details?.sizes?.[o]?.source_url):t.sizeSlug=gs}r({...t,focalPoint:void 0,useFeaturedImage:void 0,dimRatio:l,isDark:c,isUserOverlayColor:j||!1})},V=()=>{let e=n.color;j||(e="#000",a(void 0),P());const t=jl(g,e,kl);r({url:void 0,id:void 0,backgroundType:void 0,focalPoint:void 0,hasParallax:void 0,isRepeated:void 0,useFeaturedImage:void 0,isDark:t})},F=async e=>{const t=await Cl(M),o=jl(g,e,t);a(e),P(),r({isUserOverlayColor:!0,isDark:o})},E=e=>{A(e,{type:"snackbar"})},O=((e,t)=>!e&&(0,ht.isBlobURL)(t))(u,M),G=Ai===z,$=Li===z,U=(0,ct.useBlockEditingMode)(),q="default"===U,[W,{height:Z,width:J}]=(0,xt.useResizeObserver)(),Q=(0,gt.useMemo)((()=>({height:"px"===y&&f?f:"auto",width:"auto"})),[f,y]),K=f&&y?`${f}${y}`:f,Y=!(_||b),X={minHeight:K||void 0},ee=M?`url(${M})`:void 0,te=Vi(h),oe={backgroundColor:n.color},ne={objectPosition:h&&Y?Vi(h):void 0},re=!!(M||n.color||H),ae=(0,lt.useSelect)((e=>e(ct.store).getBlock(t).innerBlocks.length>0),[t]),ie=(0,gt.useRef)(),se=(0,ct.useBlockProps)({ref:ie}),[le]=(0,ct.useSettings)("typography.fontSizes"),ce=function(e){return[["core/paragraph",{align:"center",placeholder:(0,pt.__)("Write title…"),...e}]]}({fontSize:le?.length>0?"large":void 0}),ue=(0,ct.useInnerBlocksProps)({className:"wp-block-cover__inner-container"},{template:ae?void 0:ce,templateInsertUpdatesSelection:!0,allowedBlocks:k,templateLock:w,dropZoneElement:ie.current}),de=(0,gt.useRef)(),pe={isVideoBackground:$,isImageBackground:G,mediaElement:de,hasInnerBlocks:ae,url:M,isImgElement:Y,overlayColor:n},me=async()=>{const e=!m,t=e?await Cl(D):kl,o=j?n.color:t;j||(a(e?o:void 0),P());const i=100===g?50:g,s=jl(i,o,t);r({id:void 0,url:void 0,useFeaturedImage:e,dimRatio:i,backgroundType:m?Ai:void 0,isDark:s})},ge=(0,it.jsx)(ws,{attributes:e,setAttributes:r,onSelectMedia:R,currentSettings:pe,toggleUseFeaturedImage:me,onClearMedia:V,blockEditingMode:U}),he=(0,it.jsx)(vs,{attributes:e,setAttributes:r,clientId:t,setOverlayColor:F,coverRef:ie,currentSettings:pe,toggleUseFeaturedImage:me,updateDimRatio:async e=>{const t=await Cl(M),o=jl(e,n.color,t);r({dimRatio:e,isDark:o})},onClearMedia:V,featuredImage:I}),_e={className:"block-library-cover__resize-container",clientId:t,height:Z,minHeight:K,onResizeStart:()=>{r({minHeightUnit:"px"}),i(!1)},onResize:e=>{r({minHeight:e})},onResizeStop:e=>{i(!0),r({minHeight:e})},showHandle:!e.style?.dimensions?.aspectRatio,size:Q,width:J};if(!m&&!ae&&!re)return(0,it.jsxs)(it.Fragment,{children:[ge,he,q&&o&&(0,it.jsx)(Bs,{..._e}),(0,it.jsxs)(C,{...se,className:Dt("is-placeholder",se.className),style:{...se.style,minHeight:K||void 0},children:[W,(0,it.jsx)(Cs,{onSelectMedia:R,onError:E,toggleUseFeaturedImage:me,children:(0,it.jsx)("div",{className:"wp-block-cover__placeholder-background-options",children:(0,it.jsx)(ct.ColorPalette,{disableCustomColors:!0,value:n.color,onChange:F,clearable:!1,asButtons:!0,"aria-label":(0,pt.__)("Overlay color")})})})]})]});const xe=Dt({"is-dark-theme":x,"is-light":!x,"is-transient":O,"has-parallax":_,"is-repeated":b,"has-custom-content-position":!Ei(c)},Oi(c)),be=M||!m||m&&!M;return(0,it.jsxs)(it.Fragment,{children:[ge,he,(0,it.jsxs)(C,{...se,className:Dt(xe,se.className),style:{...X,...se.style},"data-url":M,children:[W,!M&&m&&(0,it.jsx)(mt.Placeholder,{className:"wp-block-cover__image--placeholder-image",withIllustration:!0}),M&&G&&(Y?(0,it.jsx)("img",{ref:de,className:"wp-block-cover__image-background",alt:v,src:M,style:ne}):(0,it.jsx)("div",{ref:de,role:v?"img":void 0,"aria-label":v||void 0,className:Dt(xe,"wp-block-cover__image-background"),style:{backgroundImage:ee,backgroundPosition:te}})),M&&$&&(0,it.jsx)("video",{ref:de,className:"wp-block-cover__video-background",autoPlay:!0,muted:!0,loop:!0,src:M,poster:B,style:ne}),be&&(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",Fi(g),{[n.class]:n.class,"has-background-dim":void 0!==g,"wp-block-cover__gradient-background":M&&H&&0!==g,"has-background-gradient":H,[L]:L}),style:{backgroundImage:H,...oe}}),O&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(Cs,{disableMediaButtons:!0,onSelectMedia:R,onError:E,toggleUseFeaturedImage:me}),(0,it.jsx)("div",{...ue})]}),q&&o&&(0,it.jsx)(Bs,{..._e})]})}));const Bl=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/cover","title":"Cover","category":"media","description":"Add an image or video with a text overlay.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"useFeaturedImage":{"type":"boolean","default":false},"id":{"type":"number"},"alt":{"type":"string","default":""},"hasParallax":{"type":"boolean","default":false},"isRepeated":{"type":"boolean","default":false},"dimRatio":{"type":"number","default":100},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"isUserOverlayColor":{"type":"boolean"},"backgroundType":{"type":"string","default":"image"},"focalPoint":{"type":"object"},"minHeight":{"type":"number"},"minHeightUnit":{"type":"string"},"gradient":{"type":"string"},"customGradient":{"type":"string"},"contentPosition":{"type":"string"},"isDark":{"type":"boolean","default":true},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]},"tagName":{"type":"string","default":"div"},"sizeSlug":{"type":"string"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":true,"html":false,"shadow":true,"spacing":{"padding":true,"margin":["top","bottom"],"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"heading":true,"text":true,"background":false,"__experimentalSkipSerialization":["gradients"],"enableContrastChecker":false},"dimensions":{"aspectRatio":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowJustification":false},"interactivity":{"clientNavigation":true},"filter":{"duotone":true},"allowedBlocks":true},"selectors":{"filter":{"duotone":".wp-block-cover > .wp-block-cover__image-background, .wp-block-cover > .wp-block-cover__video-background"}},"editorStyle":"wp-block-cover-editor","style":"wp-block-cover"}');const{cleanEmptyObject:Tl}=jo(ct.privateApis),Nl={from:[{type:"block",blocks:["core/image"],transform:({caption:e,url:t,alt:o,align:n,id:r,anchor:a,style:i})=>(0,st.createBlock)("core/cover",{dimRatio:50,url:t,alt:o,align:n,id:r,anchor:a,style:{color:{duotone:i?.color?.duotone}}},[(0,st.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/video"],transform:({caption:e,src:t,align:o,id:n,anchor:r})=>(0,st.createBlock)("core/cover",{dimRatio:50,url:t,align:o,id:n,backgroundType:Li,anchor:r},[(0,st.createBlock)("core/paragraph",{content:e,fontSize:"large",align:"center"})])},{type:"block",blocks:["core/group"],transform:(e,t)=>{const{align:o,anchor:n,backgroundColor:r,gradient:a,style:i}=e;if(1===t?.length&&"core/cover"===t[0]?.name)return(0,st.createBlock)("core/cover",t[0].attributes,t[0].innerBlocks);const s={align:o,anchor:n,dimRatio:r||a||i?.color?.background||i?.color?.gradient?void 0:50,overlayColor:r,customOverlayColor:i?.color?.background,gradient:a,customGradient:i?.color?.gradient},l={...e,backgroundColor:void 0,gradient:void 0,style:Tl({...e?.style,color:i?.color?{...i?.color,background:void 0,gradient:void 0}:void 0})};return(0,st.createBlock)("core/cover",s,[(0,st.createBlock)("core/group",l,t)])}}],to:[{type:"block",blocks:["core/image"],isMatch:({backgroundType:e,url:t,overlayColor:o,customOverlayColor:n,gradient:r,customGradient:a})=>t?e===Ai:!(o||n||r||a),transform:({title:e,url:t,alt:o,align:n,id:r,anchor:a,style:i})=>(0,st.createBlock)("core/image",{caption:e,url:t,alt:o,align:n,id:r,anchor:a,style:{color:{duotone:i?.color?.duotone}}})},{type:"block",blocks:["core/video"],isMatch:({backgroundType:e,url:t,overlayColor:o,customOverlayColor:n,gradient:r,customGradient:a})=>t?e===Li:!(o||n||r||a),transform:({title:e,url:t,align:o,id:n,anchor:r})=>(0,st.createBlock)("core/video",{caption:e,src:t,id:n,align:o,anchor:r})},{type:"block",blocks:["core/group"],isMatch:({url:e,useFeaturedImage:t})=>!e&&!t,transform:(e,t)=>{const o={backgroundColor:e?.overlayColor,gradient:e?.gradient,style:Tl({...e?.style,color:e?.customOverlayColor||e?.customGradient||e?.style?.color?{background:e?.customOverlayColor,gradient:e?.customGradient,...e?.style?.color}:void 0})};if(1===t?.length&&"core/group"===t[0]?.name){const e=Tl(t[0].attributes||{});return e?.backgroundColor||e?.gradient||e?.style?.color?.background||e?.style?.color?.gradient?(0,st.createBlock)("core/group",e,t[0]?.innerBlocks):(0,st.createBlock)("core/group",{...o,...e,style:Tl({...e?.style,color:o?.style?.color||e?.style?.color?{...o?.style?.color,...e?.style?.color}:void 0})},t[0]?.innerBlocks)}return(0,st.createBlock)("core/group",{...e,...o},t)}}]};var Pl=Nl;var Il=[{name:"cover",title:(0,pt.__)("Cover"),description:(0,pt.__)("Add an image or video with a text overlay."),attributes:{layout:{type:"constrained"}},isDefault:!0,icon:Mi}];const{name:Dl}=Bl,Ml={icon:Mi,example:{attributes:{customOverlayColor:"#065174",dimRatio:40,url:"https://s.w.org/images/core/5.3/Windbuchencom.jpg",style:{typography:{fontSize:48},color:{text:"white"}}},innerBlocks:[{name:"core/paragraph",attributes:{content:`<strong>${(0,pt.__)("Snow Patrol")}</strong>`,align:"center"}}]},transforms:Pl,save:function({attributes:e}){const{backgroundType:t,gradient:o,contentPosition:n,customGradient:r,customOverlayColor:a,dimRatio:i,focalPoint:s,useFeaturedImage:l,hasParallax:c,isDark:u,isRepeated:d,overlayColor:p,url:m,alt:g,id:h,minHeight:_,minHeightUnit:x,tagName:b,sizeSlug:f,poster:y}=e,v=(0,ct.getColorClassName)("background-color",p),k=(0,ct.__experimentalGetGradientClass)(o),w=Ai===t,C=Li===t,j=!(c||d),S={minHeight:(_&&x?`${_}${x}`:_)||void 0},B={backgroundColor:v?void 0:a,background:r||void 0},T=s&&j?Vi(s):void 0,N=m?`url(${m})`:void 0,P=Vi(s),I=Dt({"is-light":!u,"has-parallax":c,"is-repeated":d,"has-custom-content-position":!Ei(n)},Oi(n)),D=Dt("wp-block-cover__image-background",h?`wp-image-${h}`:null,{[`size-${f}`]:f,"has-parallax":c,"is-repeated":d}),M=o||r;return(0,it.jsxs)(b,{...ct.useBlockProps.save({className:I,style:S}),children:[!l&&w&&m&&(j?(0,it.jsx)("img",{className:D,alt:g,src:m,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}):(0,it.jsx)("div",{role:g?"img":void 0,"aria-label":g||void 0,className:D,style:{backgroundPosition:P,backgroundImage:N}})),C&&m&&(0,it.jsx)("video",{className:Dt("wp-block-cover__video-background","intrinsic-ignore"),autoPlay:!0,muted:!0,loop:!0,playsInline:!0,src:m,poster:y,style:{objectPosition:T},"data-object-fit":"cover","data-object-position":T}),(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-cover__background",v,Fi(i),{"has-background-dim":void 0!==i,"wp-block-cover__gradient-background":m&&M&&0!==i,"has-background-gradient":M,[k]:k}),style:B}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-cover__inner-container"})})]})},edit:Sl,deprecated:ms,variations:Il},zl=()=>jt({name:Dl,metadata:Bl,settings:Ml});var Al=(0,it.jsxs)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)(St.Path,{d:"M4 16h10v1.5H4V16Zm0-4.5h16V13H4v-1.5ZM10 7h10v1.5H10V7Z",fillRule:"evenodd",clipRule:"evenodd"}),(0,it.jsx)(St.Path,{d:"m4 5.25 4 2.5-4 2.5v-5Z"})]});const Ll=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/details","title":"Details","category":"text","description":"Hide and show additional content.","keywords":["summary","toggle","disclosure"],"textdomain":"default","attributes":{"showContent":{"type":"boolean","default":false},"summary":{"type":"rich-text","source":"rich-text","selector":"summary","role":"content"},"name":{"type":"string","source":"attribute","attribute":"name","selector":".wp-block-details"},"placeholder":{"type":"string"}},"supports":{"__experimentalOnEnter":true,"align":["wide","full"],"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"__experimentalBorder":{"color":true,"width":true,"style":true},"html":false,"spacing":{"margin":true,"padding":true,"blockGap":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowEditing":false},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-details-editor","style":"wp-block-details"}'),{withIgnoreIMEEvents:Hl}=jo(mt.privateApis),Rl=[["core/paragraph",{placeholder:(0,pt.__)("Type / to add a hidden block")}]];var Vl=function({attributes:e,setAttributes:t,clientId:o}){const{name:n,showContent:r,summary:a,allowedBlocks:i,placeholder:s}=e,l=(0,ct.useBlockProps)(),c=(0,ct.useInnerBlocksProps)(l,{template:Rl,__experimentalCaptureToolbars:!0,allowedBlocks:i}),[u,d]=(0,gt.useState)(r),p=vt(),m=(0,lt.useSelect)((e=>e(ct.store).hasSelectedInnerBlock(o,!0)),[o]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({showContent:!1})},dropdownMenuProps:p,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Open by default"),hasValue:()=>r,onDeselect:()=>{t({showContent:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open by default"),checked:r,onChange:()=>t({showContent:!r})})})})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Name attribute"),value:n||"",onChange:e=>t({name:e}),help:(0,pt.__)("Enables multiple Details blocks with the same name attribute to be connected, with only one open at a time.")})}),(0,it.jsxs)("details",{...c,open:u||m,onToggle:e=>d(e.target.open),name:n||"",children:[(0,it.jsx)("summary",{onKeyDown:Hl((e=>{"Enter"!==e.key||e.shiftKey||(d((e=>!e)),e.preventDefault())})),onKeyUp:e=>{" "===e.key&&e.preventDefault()},children:(0,it.jsx)(ct.RichText,{identifier:"summary","aria-label":(0,pt.__)("Write summary. Press Enter to expand or collapse the details."),placeholder:s||(0,pt.__)("Write summary…"),withoutInteractiveFormatting:!0,value:a,onChange:e=>t({summary:e})})}),c.children]})]})};var Fl={from:[{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>!(1===e.length&&"core/details"===e[0].name),__experimentalConvert:e=>(0,st.createBlock)("core/details",{},e.map((e=>(0,st.cloneBlock)(e))))}]};const{name:El}=Ll,Ol={icon:Al,example:{attributes:{summary:(0,pt.__)("La Mancha"),showContent:!0},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}}]},__experimentalLabel(e,{context:t}){const{summary:o}=e,n=e?.metadata?.name,r=o?.trim().length>0;return"list-view"===t&&(n||r)?n||o:"accessibility"===t?r?(0,pt.sprintf)((0,pt.__)("Details. %s"),o):(0,pt.__)("Details. Empty."):void 0},save:function({attributes:e}){const{name:t,showContent:o}=e,n=e.summary?e.summary:"Details",r=ct.useBlockProps.save();return(0,it.jsxs)("details",{...r,name:t||void 0,open:o,children:[(0,it.jsx)("summary",{children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(ct.InnerBlocks.Content,{})]})},edit:Vl,transforms:Fl},Gl=()=>jt({name:El,metadata:Ll,settings:Ol});var $l=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});function Ul(e){return e?(0,pt.__)("This embed will preserve its aspect ratio when the browser is resized."):(0,pt.__)("This embed may not preserve its aspect ratio when the browser is resized.")}var ql=({blockSupportsResponsive:e,showEditButton:t,themeSupportsResponsive:o,allowResponsive:n,toggleResponsive:r,switchBackToURLInput:a})=>{const i=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:t&&(0,it.jsx)(mt.ToolbarButton,{className:"components-toolbar__control",label:(0,pt.__)("Edit URL"),icon:$l,onClick:a})})}),o&&e&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Media settings"),resetAll:()=>{r(!0)},dropdownMenuProps:i,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Media settings"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>{r(!n)},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Resize for smaller devices"),checked:n,help:Ul,onChange:r})})})})]})};const Wl=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zm-6-9.5L16 12l-2.5 2.8 1.1 1L18 12l-3.5-3.5-1 1zm-3 0l-1-1L6 12l3.5 3.8 1.1-1L8 12l2.5-2.5z"})}),Zl=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM13.2 7.7c-.4.4-.7 1.1-.7 1.9v3.7c-.4-.3-.8-.4-1.3-.4-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2.5 0 1-.2 1.4-.5.9-.6 1.4-1.6 1.4-2.6V9.6c0-.4.1-.6.2-.8.3-.3 1-.3 1.6-.3h.2V7h-.2c-.7 0-1.8 0-2.6.7z"})}),Jl=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-2zM9.2 4.5H19c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V9.8l4.6-5.3zm9.8 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})}),Ql=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(mt.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-.5V9.8l4.7-5.3H19c.3 0 .5.2.5.5v14zM10 15l5-3-5-3v6z"})}),Kl={foreground:"#1da1f2",src:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M22.23 5.924c-.736.326-1.527.547-2.357.646.847-.508 1.498-1.312 1.804-2.27-.793.47-1.67.812-2.606.996C18.325 4.498 17.258 4 16.078 4c-2.266 0-4.103 1.837-4.103 4.103 0 .322.036.635.106.935-3.41-.17-6.433-1.804-8.457-4.287-.353.607-.556 1.312-.556 2.064 0 1.424.724 2.68 1.825 3.415-.673-.022-1.305-.207-1.86-.514v.052c0 1.988 1.415 3.647 3.293 4.023-.344.095-.707.145-1.08.145-.265 0-.522-.026-.773-.074.522 1.63 2.038 2.817 3.833 2.85-1.404 1.1-3.174 1.757-5.096 1.757-.332 0-.66-.02-.98-.057 1.816 1.164 3.973 1.843 6.29 1.843 7.547 0 11.675-6.252 11.675-11.675 0-.178-.004-.355-.012-.53.802-.578 1.497-1.3 2.047-2.124z"})})})},Yl={foreground:"#ff0000",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M21.8 8s-.195-1.377-.795-1.984c-.76-.797-1.613-.8-2.004-.847-2.798-.203-6.996-.203-6.996-.203h-.01s-4.197 0-6.996.202c-.39.046-1.242.05-2.003.846C2.395 6.623 2.2 8 2.2 8S2 9.62 2 11.24v1.517c0 1.618.2 3.237.2 3.237s.195 1.378.795 1.985c.76.797 1.76.77 2.205.855 1.6.153 6.8.2 6.8.2s4.203-.005 7-.208c.392-.047 1.244-.05 2.005-.847.6-.607.795-1.985.795-1.985s.2-1.618.2-3.237v-1.517C22 9.62 21.8 8 21.8 8zM9.935 14.595v-5.62l5.403 2.82-5.403 2.8z"})})},Xl={foreground:"#3b5998",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})})},ec=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})}),tc={foreground:"#0073AA",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M12.158 12.786l-2.698 7.84c.806.236 1.657.365 2.54.365 1.047 0 2.05-.18 2.986-.51-.024-.037-.046-.078-.065-.123l-2.762-7.57zM3.008 12c0 3.56 2.07 6.634 5.068 8.092L3.788 8.342c-.5 1.117-.78 2.354-.78 3.658zm15.06-.454c0-1.112-.398-1.88-.74-2.48-.456-.74-.883-1.368-.883-2.11 0-.825.627-1.595 1.51-1.595.04 0 .078.006.116.008-1.598-1.464-3.73-2.36-6.07-2.36-3.14 0-5.904 1.613-7.512 4.053.21.008.41.012.58.012.94 0 2.395-.114 2.395-.114.484-.028.54.684.057.74 0 0-.487.058-1.03.086l3.275 9.74 1.968-5.902-1.4-3.838c-.485-.028-.944-.085-.944-.085-.486-.03-.43-.77.056-.742 0 0 1.484.114 2.368.114.94 0 2.397-.114 2.397-.114.486-.028.543.684.058.74 0 0-.488.058-1.03.086l3.25 9.665.897-2.997c.456-1.17.684-2.137.684-2.907zm1.82-3.86c.04.286.06.593.06.924 0 .912-.17 1.938-.683 3.22l-2.746 7.94c2.672-1.558 4.47-4.454 4.47-7.77 0-1.564-.4-3.033-1.1-4.314zM12 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10z"})})})},oc={foreground:"#1db954",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m4.586 14.424c-.18.295-.563.387-.857.207-2.35-1.434-5.305-1.76-8.786-.963-.335.077-.67-.133-.746-.47-.077-.334.132-.67.47-.745 3.808-.87 7.076-.496 9.712 1.115.293.18.386.563.206.857M17.81 13.7c-.226.367-.706.482-1.072.257-2.687-1.652-6.785-2.13-9.965-1.166-.413.127-.848-.106-.973-.517-.125-.413.108-.848.52-.973 3.632-1.102 8.147-.568 11.234 1.328.366.226.48.707.256 1.072m.105-2.835C14.692 8.95 9.375 8.775 6.297 9.71c-.493.15-1.016-.13-1.166-.624-.148-.495.13-1.017.625-1.167 3.532-1.073 9.404-.866 13.115 1.337.445.264.59.838.327 1.282-.264.443-.838.59-1.282.325"})})},nc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"m6.5 7c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5zm11 0c-2.75 0-5 2.25-5 5s2.25 5 5 5 5-2.25 5-5-2.25-5-5-5z"})}),rc={foreground:"#1ab7ea",src:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.G,{children:(0,it.jsx)(mt.Path,{d:"M22.396 7.164c-.093 2.026-1.507 4.8-4.245 8.32C15.323 19.16 12.93 21 10.97 21c-1.214 0-2.24-1.12-3.08-3.36-.56-2.052-1.118-4.105-1.68-6.158-.622-2.24-1.29-3.36-2.004-3.36-.156 0-.7.328-1.634.98l-.978-1.26c1.027-.903 2.04-1.806 3.037-2.71C6 3.95 7.03 3.328 7.716 3.265c1.62-.156 2.616.95 2.99 3.32.404 2.558.685 4.148.84 4.77.468 2.12.982 3.18 1.543 3.18.435 0 1.09-.687 1.963-2.064.872-1.376 1.34-2.422 1.402-3.142.125-1.187-.343-1.782-1.4-1.782-.5 0-1.013.115-1.542.34 1.023-3.35 2.977-4.976 5.862-4.883 2.14.063 3.148 1.45 3.024 4.16z"})})})},ac=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"})}),ic={foreground:"#35465c",src:(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M19 3H5a2 2 0 00-2 2v14c0 1.1.9 2 2 2h14a2 2 0 002-2V5a2 2 0 00-2-2zm-5.69 14.66c-2.72 0-3.1-1.9-3.1-3.16v-3.56H8.49V8.99c1.7-.62 2.54-1.99 2.64-2.87 0-.06.06-.41.06-.58h1.9v3.1h2.17v2.3h-2.18v3.1c0 .47.13 1.3 1.2 1.26h1.1v2.36c-1.01.02-2.07 0-2.07 0z"})})},sc=(0,it.jsxs)(mt.SVG,{viewBox:"0 0 24 24",children:[(0,it.jsx)(mt.Path,{d:"M18.42 14.58c-.51-.66-1.05-1.23-1.05-2.5V7.87c0-1.8.15-3.45-1.2-4.68-1.05-1.02-2.79-1.35-4.14-1.35-2.6 0-5.52.96-6.12 4.14-.06.36.18.54.4.57l2.66.3c.24-.03.42-.27.48-.5.24-1.12 1.17-1.63 2.2-1.63.56 0 1.22.21 1.55.7.4.56.33 1.31.33 1.97v.36c-1.59.18-3.66.27-5.16.93a4.63 4.63 0 0 0-2.93 4.44c0 2.82 1.8 4.23 4.1 4.23 1.95 0 3.03-.45 4.53-1.98.51.72.66 1.08 1.59 1.83.18.09.45.09.63-.1v.04l2.1-1.8c.24-.21.2-.48.03-.75zm-5.4-1.2c-.45.75-1.14 1.23-1.92 1.23-1.05 0-1.65-.81-1.65-1.98 0-2.31 2.1-2.73 4.08-2.73v.6c0 1.05.03 1.92-.5 2.88z"}),(0,it.jsx)(mt.Path,{d:"M21.69 19.2a17.62 17.62 0 0 1-21.6-1.57c-.23-.2 0-.5.28-.33a23.88 23.88 0 0 0 20.93 1.3c.45-.19.84.3.39.6z"}),(0,it.jsx)(mt.Path,{d:"M22.8 17.96c-.36-.45-2.22-.2-3.1-.12-.23.03-.3-.18-.05-.36 1.5-1.05 3.96-.75 4.26-.39.3.36-.1 2.82-1.5 4.02-.21.18-.42.1-.3-.15.3-.8 1.02-2.58.69-3z"})]}),lc=(0,it.jsxs)(mt.SVG,{viewBox:"0 0 24 24",children:[(0,it.jsx)(mt.Path,{d:"m.0206909 21 19.8160091-13.07806 3.5831 6.20826z",fill:"#4bc7ee"}),(0,it.jsx)(mt.Path,{d:"m23.7254 19.0205-10.1074-17.18468c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418h22.5655c1.279 0 1.8019-.8905 1.1599-1.9795z",fill:"#d4cdcb"}),(0,it.jsx)(mt.Path,{d:"m.0206909 21 15.2439091-16.38571 4.3029 7.32271z",fill:"#c3d82e"}),(0,it.jsx)(mt.Path,{d:"m13.618 1.83582c-.6421-1.114428-1.7087-1.114428-2.3249 0l-11.2931 19.16418 15.2646-16.38573z",fill:"#e4ecb0"}),(0,it.jsx)(mt.Path,{d:"m.0206909 21 19.5468091-9.063 1.6621 2.8344z",fill:"#209dbd"}),(0,it.jsx)(mt.Path,{d:"m.0206909 21 17.9209091-11.82623 1.6259 2.76323z",fill:"#7cb3c9"})]}),cc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M11.903 16.568c-1.82 0-3.124-1.281-3.124-2.967a2.987 2.987 0 0 1 2.989-2.989c1.663 0 2.944 1.304 2.944 3.034 0 1.663-1.281 2.922-2.81 2.922ZM17.997 3l-3.308.73v5.107c-.809-1.034-2.045-1.37-3.505-1.37-1.529 0-2.9.561-4.023 1.662-1.259 1.214-1.933 2.764-1.933 4.495 0 1.888.72 3.506 2.113 4.742 1.056.944 2.314 1.415 3.775 1.415 1.438 0 2.517-.382 3.573-1.415v1.415h3.308V3Z",fill:"#333436"})}),uc=(0,it.jsx)(mt.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(mt.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})}),dc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 44 44",children:(0,it.jsx)(mt.Path,{d:"M32.59521,22.001l4.31885-4.84473-6.34131-1.38379.646-6.459-5.94336,2.61035L22,6.31934l-3.27344,5.60351L12.78418,9.3125l.645,6.458L7.08643,17.15234,11.40479,21.999,7.08594,26.84375l6.34131,1.38379-.64551,6.458,5.94287-2.60938L22,37.68066l3.27344-5.60351,5.94287,2.61035-.64551-6.458,6.34277-1.38183Zm.44385,2.75244L30.772,23.97827l-1.59558-2.07391,1.97888.735Zm-8.82147,6.1579L22.75,33.424V30.88977l1.52228-2.22168ZM18.56226,13.48816,19.819,15.09534l-2.49219-.88642L15.94037,12.337Zm6.87719.00116,2.62043-1.15027-1.38654,1.86981L24.183,15.0946Zm3.59357,2.6029-1.22546,1.7381.07525-2.73486,1.44507-1.94867ZM22,29.33008l-2.16406-3.15686L22,23.23688l2.16406,2.93634Zm-4.25458-9.582-.10528-3.836,3.60986,1.284v3.73242Zm5.00458-2.552,3.60986-1.284-.10528,3.836L22.75,20.92853Zm-7.78174-1.10559-.29352-2.94263,1.44245,1.94739.07519,2.73321Zm2.30982,5.08319,3.50817,1.18164-2.16247,2.9342-3.678-1.08447Zm2.4486,7.49285L21.25,30.88977v2.53485L19.78052,30.91Zm3.48707-6.31121,3.50817-1.18164,2.33228,3.03137-3.678,1.08447Zm10.87219-4.28113-2.714,3.04529L28.16418,19.928l1.92176-2.72565ZM24.06036,12.81769l-2.06012,2.6322-2.059-2.63318L22,9.292ZM9.91455,18.07227l4.00079-.87195,1.921,2.72735-3.20794,1.19019Zm2.93024,4.565,1.9801-.73462L13.228,23.97827l-2.26838.77429Zm-1.55591,3.58819L13.701,25.4021l2.64935.78058-2.14447.67853Zm3.64868,1.977L18.19,27.17334l.08313,3.46332L14.52979,32.2793Zm10.7876,2.43549.08447-3.464,3.25165,1.03052.407,4.07684Zm4.06824-3.77478-2.14545-.68,2.65063-.781,2.41266.825Z"})}),pc={foreground:"#f43e37",src:(0,it.jsxs)(mt.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)(mt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M24,12A12,12,0,1,1,12,0,12,12,0,0,1,24,12Z"}),(0,it.jsx)(mt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.67,12a9.33,9.33,0,0,1,18.66,0H19a7,7,0,1,0-7,7v2.33A9.33,9.33,0,0,1,2.67,12ZM12,17.6A5.6,5.6,0,1,1,17.6,12h-2A3.56,3.56,0,1,0,12,15.56Z",fill:"#fff"})]})},mc=(0,it.jsx)(mt.SVG,{viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{fill:"#0a7aff",d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})});var gc=()=>(0,it.jsx)("div",{className:"wp-block-embed is-loading",children:(0,it.jsx)(mt.Spinner,{})});var hc=({icon:e,label:t,value:o,onSubmit:n,onChange:r,cannotEmbed:a,fallback:i,tryAgain:s})=>(0,it.jsxs)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:e,showColors:!0}),label:t,className:"wp-block-embed",instructions:(0,pt.__)("Paste a link to the content you want to display on your site."),children:[(0,it.jsxs)("form",{onSubmit:n,children:[(0,it.jsx)(mt.__experimentalInputControl,{__next40pxDefaultSize:!0,type:"url",value:o||"",className:"wp-block-embed__placeholder-input",label:t,hideLabelFromVision:!0,placeholder:(0,pt.__)("Enter URL to embed here…"),onChange:r}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,pt._x)("Embed","button label")})]}),(0,it.jsx)("div",{className:"wp-block-embed__learn-more",children:(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://wordpress.org/documentation/article/embeds/"),children:(0,pt.__)("Learn more about embeds")})}),a&&(0,it.jsxs)(mt.__experimentalVStack,{spacing:3,className:"components-placeholder__error",children:[(0,it.jsx)("div",{className:"components-placeholder__instructions",children:(0,pt.__)("Sorry, this content could not be embedded.")}),(0,it.jsxs)(mt.__experimentalHStack,{expanded:!1,spacing:3,justify:"flex-start",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:s,children:(0,pt._x)("Try again","button label")})," ",(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:i,children:(0,pt._x)("Convert to link","button label")})]})]})]});const _c={class:"className",frameborder:"frameBorder",marginheight:"marginHeight",marginwidth:"marginWidth"};function xc({html:e}){const t=(0,gt.useRef)(),o=(0,gt.useMemo)((()=>{const t=(new window.DOMParser).parseFromString(e,"text/html").querySelector("iframe"),o={};return t?(Array.from(t.attributes).forEach((({name:e,value:t})=>{"style"!==e&&(o[_c[e]||e]=t)})),o):o}),[e]);return(0,gt.useEffect)((()=>{const{ownerDocument:e}=t.current,{defaultView:n}=e;function r({data:{secret:e,message:n,value:r}={}}){"height"===n&&e===o["data-secret"]&&(t.current.height=r)}return n.addEventListener("message",r),()=>{n.removeEventListener("message",r)}}),[]),(0,it.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,it.jsx)("iframe",{ref:(0,xt.useMergeRefs)([t,(0,xt.useFocusableIframe)()]),title:o.title,...o})})}function bc({preview:e,previewable:t,url:o,type:n,isSelected:r,className:a,icon:i,label:s}){const[l,c]=(0,gt.useState)(!1);!r&&l&&c(!1);const u=()=>{c(!0)},{scripts:d}=e,p="photo"===n?(e=>{const t=e.url||e.thumbnail_url,o=(0,it.jsx)("p",{children:(0,it.jsx)("img",{src:t,alt:e.title,width:"100%"})});return(0,gt.renderToString)(o)})(e):e.html,m=(0,no.getAuthority)(o),g=(0,pt.sprintf)((0,pt.__)("Embedded content from %s"),m),h=Dt(n,a,"wp-block-embed__wrapper"),_="wp-embed"===n?(0,it.jsx)(xc,{html:p}):(0,it.jsxs)("div",{className:"wp-block-embed__wrapper",children:[(0,it.jsx)(mt.SandBox,{html:p,scripts:d,title:g,type:h,onFocus:u}),!l&&(0,it.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:u})]});return(0,it.jsx)(it.Fragment,{children:t?_:(0,it.jsxs)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:i,showColors:!0}),label:s,children:[(0,it.jsx)("p",{className:"components-placeholder__error",children:(0,it.jsx)("a",{href:o,children:o})}),(0,it.jsx)("p",{className:"components-placeholder__error",children:(0,pt.sprintf)((0,pt.__)("Embedded content from %s can't be previewed in the editor."),m)})]})})}var fc=e=>{const{attributes:{providerNameSlug:t,previewable:o,responsive:n,url:r},attributes:a,isSelected:i,onReplace:s,setAttributes:l,insertBlocksAfter:c,onFocus:u}=e,d={title:(0,pt._x)("Embed","block title"),icon:Wl},{icon:p,title:m}=(g=t,(0,st.getBlockVariations)(So)?.find((({name:e})=>e===g))||d);var g;const[h,_]=(0,gt.useState)(r),[x,b]=(0,gt.useState)(!1),{invalidateResolution:f}=(0,lt.useDispatch)(_t.store),{preview:y,fetching:v,themeSupportsResponsive:k,cannotEmbed:w,hasResolved:C}=(0,lt.useSelect)((e=>{const{getEmbedPreview:t,isPreviewEmbedFallback:o,isRequestingEmbedPreview:n,getThemeSupports:a,hasFinishedResolution:i}=e(_t.store);if(!r)return{fetching:!1,cannotEmbed:!1};const s=t(r),l=o(r),c=!!s&&!(!1===s?.html&&void 0===s?.type)&&!(404===s?.data?.status);return{preview:c?s:void 0,fetching:n(r),themeSupportsResponsive:a()["responsive-embeds"],cannotEmbed:!c||l,hasResolved:i("getEmbedPreview",[r])}}),[r]),j=()=>((e,t,o,n)=>{const{allowResponsive:r,className:a}=e;return{...e,...Do(t,o,a,n,r)}})(a,y,m,n);(0,gt.useEffect)((()=>{if(y?.html||!w||!C)return;const e=r.replace(/\/$/,"");_(e),b(!1),l({url:e})}),[y?.html,r,w,C,l]),(0,gt.useEffect)((()=>{if(w&&!v&&h&&"x.com"===(0,no.getAuthority)(h)){const e=new URL(h);e.host="twitter.com",l({url:e.toString()})}}),[h,w,v,l]),(0,gt.useEffect)((()=>{if(y&&!x){const t=j();if(Object.keys(t).some((e=>t[e]!==a[e]))&&l(t),s){const o=No(e,t);o&&s(o)}}}),[y,x]);const S=(0,ct.useBlockProps)();if(v)return(0,it.jsx)(St.View,{...S,children:(0,it.jsx)(gc,{})});const B=(0,pt.sprintf)((0,pt.__)("%s URL"),m);if(!y||w||x)return(0,it.jsx)(St.View,{...S,children:(0,it.jsx)(hc,{icon:p,label:B,onFocus:u,onSubmit:e=>{e&&e.preventDefault();const t=Po(a.className);b(!1),l({url:h,className:t})},value:h,cannotEmbed:w,onChange:e=>_(e),fallback:()=>function(e,t){const o=(0,it.jsx)("a",{href:e,children:e});t((0,st.createBlock)("core/paragraph",{content:(0,gt.renderToString)(o)}))}(h,s),tryAgain:()=>{f("getEmbedPreview",[h])}})});const{caption:T,type:N,allowResponsive:P,className:I}=j(),D=Dt(I,e.className);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ql,{showEditButton:y&&!w,themeSupportsResponsive:k,blockSupportsResponsive:n,allowResponsive:P,toggleResponsive:function(e){const{className:t}=a,{html:o}=y;l({allowResponsive:e,className:Io(o,t,n&&e)})},switchBackToURLInput:()=>b(!0)}),(0,it.jsxs)("figure",{...S,className:Dt(S.className,D,{[`is-type-${N}`]:N,[`is-provider-${t}`]:t,[`wp-block-embed-${t}`]:t}),children:[(0,it.jsx)(bc,{preview:y,previewable:o,className:D,url:h,type:N,caption:T,onCaptionChange:e=>l({caption:e}),isSelected:i,icon:p,label:B,insertBlocksAfter:c,attributes:a,setAttributes:l}),(0,it.jsx)(zo,{attributes:a,setAttributes:l,isSelected:i,insertBlocksAfter:c,label:(0,pt.__)("Embed caption text"),showToolbarButton:i})]})]})};const{name:yc}=yo;var vc={from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&/^\s*(https?:\/\/\S+)\s*$/i.test(e.textContent)&&1===e.textContent?.match(/https/gi)?.length,transform:e=>(0,st.createBlock)(yc,{url:e.textContent.trim()})}],to:[{type:"block",blocks:["core/paragraph"],isMatch:({url:e})=>!!e,transform:({url:e,caption:t,className:o})=>{let n=`<a href="${e}">${e}</a>`;return t?.trim()&&(n+=`<br />${t}`),(0,st.createBlock)("core/paragraph",{content:n,className:Po(o)})}}]};function kc(e){return(0,pt.sprintf)((0,pt.__)("%s Embed"),e)}const wc=[{name:"twitter",title:kc("Twitter"),icon:Kl,keywords:["tweet",(0,pt.__)("social")],description:(0,pt.__)("Embed a tweet."),patterns:[/^https?:\/\/(www\.)?twitter\.com\/.+/i],attributes:{providerNameSlug:"twitter",responsive:!0}},{name:"youtube",title:kc("YouTube"),icon:Yl,keywords:[(0,pt.__)("music"),(0,pt.__)("video")],description:(0,pt.__)("Embed a YouTube video."),patterns:[/^https?:\/\/((m|www)\.)?youtube\.com\/.+/i,/^https?:\/\/youtu\.be\/.+/i],attributes:{providerNameSlug:"youtube",responsive:!0}},{name:"facebook",title:kc("Facebook"),icon:Xl,keywords:[(0,pt.__)("social")],description:(0,pt.__)("Embed a Facebook post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}},{name:"instagram",title:kc("Instagram"),icon:ec,keywords:[(0,pt.__)("image"),(0,pt.__)("social")],description:(0,pt.__)("Embed an Instagram post."),scope:["block"],patterns:[],attributes:{providerNameSlug:"instagram",responsive:!0}},{name:"wordpress",title:kc("WordPress"),icon:tc,keywords:[(0,pt.__)("post"),(0,pt.__)("blog")],description:(0,pt.__)("Embed a WordPress post."),attributes:{providerNameSlug:"wordpress"}},{name:"soundcloud",title:kc("SoundCloud"),icon:Zl,keywords:[(0,pt.__)("music"),(0,pt.__)("audio")],description:(0,pt.__)("Embed SoundCloud content."),patterns:[/^https?:\/\/(www\.)?soundcloud\.com\/.+/i],attributes:{providerNameSlug:"soundcloud",responsive:!0}},{name:"spotify",title:kc("Spotify"),icon:oc,keywords:[(0,pt.__)("music"),(0,pt.__)("audio")],description:(0,pt.__)("Embed Spotify content."),patterns:[/^https?:\/\/(open|play)\.spotify\.com\/.+/i],attributes:{providerNameSlug:"spotify",responsive:!0}},{name:"flickr",title:kc("Flickr"),icon:nc,keywords:[(0,pt.__)("image")],description:(0,pt.__)("Embed Flickr content."),patterns:[/^https?:\/\/(www\.)?flickr\.com\/.+/i,/^https?:\/\/flic\.kr\/.+/i],attributes:{providerNameSlug:"flickr",responsive:!0}},{name:"vimeo",title:kc("Vimeo"),icon:rc,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a Vimeo video."),patterns:[/^https?:\/\/(www\.)?vimeo\.com\/.+/i],attributes:{providerNameSlug:"vimeo",responsive:!0}},{name:"animoto",title:kc("Animoto"),icon:lc,description:(0,pt.__)("Embed an Animoto video."),patterns:[/^https?:\/\/(www\.)?(animoto|video214)\.com\/.+/i],attributes:{providerNameSlug:"animoto",responsive:!0}},{name:"cloudup",title:kc("Cloudup"),icon:Wl,description:(0,pt.__)("Embed Cloudup content."),patterns:[/^https?:\/\/cloudup\.com\/.+/i],attributes:{providerNameSlug:"cloudup",responsive:!0}},{name:"collegehumor",title:kc("CollegeHumor"),icon:Ql,description:(0,pt.__)("Embed CollegeHumor content."),scope:["block"],patterns:[],attributes:{providerNameSlug:"collegehumor",responsive:!0}},{name:"crowdsignal",title:kc("Crowdsignal"),icon:Wl,keywords:["polldaddy",(0,pt.__)("survey")],description:(0,pt.__)("Embed Crowdsignal (formerly Polldaddy) content."),patterns:[/^https?:\/\/((.+\.)?polldaddy\.com|poll\.fm|.+\.crowdsignal\.net|.+\.survey\.fm)\/.+/i],attributes:{providerNameSlug:"crowdsignal",responsive:!0}},{name:"dailymotion",title:kc("Dailymotion"),icon:cc,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a Dailymotion video."),patterns:[/^https?:\/\/(www\.)?dailymotion\.com\/.+/i],attributes:{providerNameSlug:"dailymotion",responsive:!0}},{name:"imgur",title:kc("Imgur"),icon:Jl,description:(0,pt.__)("Embed Imgur content."),patterns:[/^https?:\/\/(.+\.)?imgur\.com\/.+/i],attributes:{providerNameSlug:"imgur",responsive:!0}},{name:"issuu",title:kc("Issuu"),icon:Wl,description:(0,pt.__)("Embed Issuu content."),patterns:[/^https?:\/\/(www\.)?issuu\.com\/.+/i],attributes:{providerNameSlug:"issuu",responsive:!0}},{name:"kickstarter",title:kc("Kickstarter"),icon:Wl,description:(0,pt.__)("Embed Kickstarter content."),patterns:[/^https?:\/\/(www\.)?kickstarter\.com\/.+/i,/^https?:\/\/kck\.st\/.+/i],attributes:{providerNameSlug:"kickstarter",responsive:!0}},{name:"mixcloud",title:kc("Mixcloud"),icon:Zl,keywords:[(0,pt.__)("music"),(0,pt.__)("audio")],description:(0,pt.__)("Embed Mixcloud content."),patterns:[/^https?:\/\/(www\.)?mixcloud\.com\/.+/i],attributes:{providerNameSlug:"mixcloud",responsive:!0}},{name:"pocket-casts",title:kc("Pocket Casts"),icon:pc,keywords:[(0,pt.__)("podcast"),(0,pt.__)("audio")],description:(0,pt.__)("Embed a podcast player from Pocket Casts."),patterns:[/^https:\/\/pca.st\/\w+/i],attributes:{providerNameSlug:"pocket-casts",responsive:!0}},{name:"reddit",title:kc("Reddit"),icon:ac,description:(0,pt.__)("Embed a Reddit thread."),patterns:[/^https?:\/\/(www\.)?reddit\.com\/.+/i],attributes:{providerNameSlug:"reddit",responsive:!0}},{name:"reverbnation",title:kc("ReverbNation"),icon:Zl,description:(0,pt.__)("Embed ReverbNation content."),patterns:[/^https?:\/\/(www\.)?reverbnation\.com\/.+/i],attributes:{providerNameSlug:"reverbnation",responsive:!0}},{name:"scribd",title:kc("Scribd"),icon:Wl,description:(0,pt.__)("Embed Scribd content."),patterns:[/^https?:\/\/(www\.)?scribd\.com\/.+/i],attributes:{providerNameSlug:"scribd",responsive:!0}},{name:"smugmug",title:kc("SmugMug"),icon:Jl,description:(0,pt.__)("Embed SmugMug content."),patterns:[/^https?:\/\/(.+\.)?smugmug\.com\/.*/i],attributes:{providerNameSlug:"smugmug",previewable:!1,responsive:!0}},{name:"speaker-deck",title:kc("Speaker Deck"),icon:Wl,description:(0,pt.__)("Embed Speaker Deck content."),patterns:[/^https?:\/\/(www\.)?speakerdeck\.com\/.+/i],attributes:{providerNameSlug:"speaker-deck",responsive:!0}},{name:"tiktok",title:kc("TikTok"),icon:Ql,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a TikTok video."),patterns:[/^https?:\/\/(www\.)?tiktok\.com\/.+/i],attributes:{providerNameSlug:"tiktok",responsive:!0}},{name:"ted",title:kc("TED"),icon:Ql,description:(0,pt.__)("Embed a TED video."),patterns:[/^https?:\/\/(www\.|embed\.)?ted\.com\/.+/i],attributes:{providerNameSlug:"ted",responsive:!0}},{name:"tumblr",title:kc("Tumblr"),icon:ic,keywords:[(0,pt.__)("social")],description:(0,pt.__)("Embed a Tumblr post."),patterns:[/^https?:\/\/(.+)\.tumblr\.com\/.+/i],attributes:{providerNameSlug:"tumblr",responsive:!0}},{name:"videopress",title:kc("VideoPress"),icon:Ql,keywords:[(0,pt.__)("video")],description:(0,pt.__)("Embed a VideoPress video."),patterns:[/^https?:\/\/videopress\.com\/.+/i],attributes:{providerNameSlug:"videopress",responsive:!0}},{name:"wordpress-tv",title:kc("WordPress.tv"),icon:Ql,description:(0,pt.__)("Embed a WordPress.tv video."),patterns:[/^https?:\/\/wordpress\.tv\/.+/i],attributes:{providerNameSlug:"wordpress-tv",responsive:!0}},{name:"amazon-kindle",title:kc("Amazon Kindle"),icon:sc,keywords:[(0,pt.__)("ebook")],description:(0,pt.__)("Embed Amazon Kindle content."),patterns:[/^https?:\/\/([a-z0-9-]+\.)?(amazon|amzn)(\.[a-z]{2,4})+\/.+/i,/^https?:\/\/(www\.)?(a\.co|z\.cn)\/.+/i],attributes:{providerNameSlug:"amazon-kindle"}},{name:"pinterest",title:kc("Pinterest"),icon:uc,keywords:[(0,pt.__)("social"),(0,pt.__)("bookmark")],description:(0,pt.__)("Embed Pinterest pins, boards, and profiles."),patterns:[/^https?:\/\/([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?\/.*/i],attributes:{providerNameSlug:"pinterest"}},{name:"wolfram-cloud",title:kc("Wolfram"),icon:dc,description:(0,pt.__)("Embed Wolfram notebook content."),patterns:[/^https?:\/\/(www\.)?wolframcloud\.com\/obj\/.+/i],attributes:{providerNameSlug:"wolfram-cloud",responsive:!0}},{name:"bluesky",title:kc("Bluesky"),icon:mc,description:(0,pt.__)("Embed a Bluesky post."),patterns:[/^https?:\/\/bsky\.app\/profile\/.+\/post\/.+/i],attributes:{providerNameSlug:"bluesky"}}];wc.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.providerNameSlug===t.providerNameSlug)}));var Cc=wc;const{attributes:jc}=yo,Sc={attributes:jc,save({attributes:e}){const{url:t,caption:o,type:n,providerNameSlug:r}=e;if(!t)return null;const a=Dt("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${r}`]:r,[`wp-block-embed-${r}`]:r});return(0,it.jsxs)("figure",{...ct.useBlockProps.save({className:a}),children:[(0,it.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${t}\n`}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}};var Bc=[Sc,{attributes:jc,save({attributes:{url:e,caption:t,type:o,providerNameSlug:n}}){if(!e)return null;const r=Dt("wp-block-embed",{[`is-type-${o}`]:o,[`is-provider-${n}`]:n});return(0,it.jsxs)("figure",{className:r,children:[`\n${e}\n`,!ct.RichText.isEmpty(t)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:t})]})}}];const{name:Tc}=yo,Nc={icon:Wl,edit:fc,save:function({attributes:e}){const{url:t,caption:o,type:n,providerNameSlug:r}=e;if(!t)return null;const a=Dt("wp-block-embed",{[`is-type-${n}`]:n,[`is-provider-${r}`]:r,[`wp-block-embed-${r}`]:r});return(0,it.jsxs)("figure",{...ct.useBlockProps.save({className:a}),children:[(0,it.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${t}\n`}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o})]})},transforms:vc,variations:Cc,deprecated:Bc},Pc=()=>jt({name:Tc,metadata:yo,settings:Nc});var Ic=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});const Dc={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:r,textLinkTarget:a,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=ct.RichText.isEmpty(n)?(0,pt.__)("PDF embed"):(0,pt.sprintf)((0,pt.__)("Embed of %s."),n),d=!ct.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,it.jsx)("a",{id:p,href:r,target:a,rel:a?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:n})}),i&&(0,it.jsx)("a",{href:t,className:Dt("wp-block-file__button",(0,ct.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p,children:(0,it.jsx)(ct.RichText.Content,{value:s})})]})}},Mc={attributes:{id:{type:"number"},href:{type:"string"},fileId:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"id"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:r,textLinkTarget:a,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=ct.RichText.isEmpty(n)?(0,pt.__)("PDF embed"):(0,pt.sprintf)((0,pt.__)("Embed of %s."),n),d=!ct.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,it.jsx)("a",{id:p,href:r,target:a,rel:a?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:n})}),i&&(0,it.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,"aria-describedby":p,children:(0,it.jsx)(ct.RichText.Content,{value:s})})]})}},zc={attributes:{id:{type:"number"},href:{type:"string"},fileName:{type:"string",source:"html",selector:"a:not([download])"},textLinkHref:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"href"},textLinkTarget:{type:"string",source:"attribute",selector:"a:not([download])",attribute:"target"},showDownloadButton:{type:"boolean",default:!0},downloadButtonText:{type:"string",source:"html",selector:"a[download]"},displayPreview:{type:"boolean"},previewHeight:{type:"number",default:600}},supports:{anchor:!0,align:!0},save({attributes:e}){const{href:t,fileName:o,textLinkHref:n,textLinkTarget:r,showDownloadButton:a,downloadButtonText:i,displayPreview:s,previewHeight:l}=e,c=ct.RichText.isEmpty(o)?(0,pt.__)("PDF embed"):(0,pt.sprintf)((0,pt.__)("Embed of %s."),o);return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[s&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${l}px`},"aria-label":c})}),!ct.RichText.isEmpty(o)&&(0,it.jsx)("a",{href:n,target:r,rel:r?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:o})}),a&&(0,it.jsx)("a",{href:t,className:"wp-block-file__button",download:!0,children:(0,it.jsx)(ct.RichText.Content,{value:i})})]})}};var Ac=[Dc,Mc,zc];function Lc({hrefs:e,openInNewWindow:t,showDownloadButton:o,changeLinkDestinationOption:n,changeOpenInNewWindow:r,changeShowDownloadButton:a,displayPreview:i,changeDisplayPreview:s,previewHeight:l,changePreviewHeight:c}){const{href:u,textLinkHref:d,attachmentPage:p}=e,m=vt();let g=[{value:u,label:(0,pt.__)("URL")}];return p&&(g=[{value:u,label:(0,pt.__)("Media file")},{value:p,label:(0,pt.__)("Attachment page")}]),(0,it.jsx)(it.Fragment,{children:(0,it.jsxs)(ct.InspectorControls,{children:[u.endsWith(".pdf")&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("PDF settings"),resetAll:()=>{s(!0),c(600)},dropdownMenuProps:m,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show inline embed"),isShownByDefault:!0,hasValue:()=>!i,onDeselect:()=>s(!0),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show inline embed"),help:i?(0,pt.__)("Note: Most phone and tablet browsers won't display embedded PDFs."):null,checked:!!i,onChange:s})}),i&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Height in pixels"),isShownByDefault:!0,hasValue:()=>600!==l,onDeselect:()=>c(600),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Height in pixels"),min:Rc,max:Math.max(Vc,l),value:l,onChange:c})})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n(u),r(!1),a(!0)},dropdownMenuProps:m,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to"),isShownByDefault:!0,hasValue:()=>d!==u,onDeselect:()=>n(u),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to"),value:d,options:g,onChange:n})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>r(!1),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),checked:t,onChange:r})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show download button"),isShownByDefault:!0,hasValue:()=>!o,onDeselect:()=>a(!0),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show download button"),checked:o,onChange:a})})]})]})})}const Hc=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t},Rc=200,Vc=2e3;function Fc({text:e,disabled:t}){const{createNotice:o}=(0,lt.useDispatch)(bo.store),n=(0,xt.useCopyToClipboard)(e,(()=>{o("info",(0,pt.__)("Copied URL to clipboard."),{isDismissible:!0,type:"snackbar"})}));return(0,it.jsx)(mt.ToolbarButton,{className:"components-clipboard-toolbar-button",ref:n,disabled:t,children:(0,pt.__)("Copy URL")})}var Ec=function({attributes:e,isSelected:t,setAttributes:o,clientId:n}){const{id:r,fileName:a,href:i,textLinkHref:s,textLinkTarget:l,showDownloadButton:c,downloadButtonText:u,displayPreview:d,previewHeight:p}=e,[m,g]=(0,gt.useState)(e.blob),{media:h}=(0,lt.useSelect)((e=>({media:void 0===r?void 0:e(_t.store).getEntityRecord("postType","attachment",r)})),[r]),{createErrorNotice:_}=(0,lt.useDispatch)(bo.store),{toggleSelection:x,__unstableMarkNextChangeAsNotPersistent:b}=(0,lt.useDispatch)(ct.store);function f(t){if(!t||!t.url)return o({href:void 0,fileName:void 0,textLinkHref:void 0,id:void 0,fileId:void 0,displayPreview:void 0,previewHeight:void 0}),void g();if((0,ht.isBlobURL)(t.url))return void g(t.url);const r="application/pdf"===(t.mime||t.mime_type)||(0,no.getFilename)(t.url).toLowerCase().endsWith(".pdf"),a={displayPreview:r?e.displayPreview??!0:void 0,previewHeight:r?e.previewHeight??600:void 0};o({href:t.url,fileName:t.title,textLinkHref:t.url,id:t.id,fileId:`wp-block-file--media-${n}`,blob:void 0,...a}),g()}function y(e){o({href:void 0}),_(e,{type:"snackbar"})}ft({url:m,onChange:f,onError:y}),(0,gt.useEffect)((()=>{ct.RichText.isEmpty(u)&&(b(),o({downloadButtonText:(0,pt._x)("Download","button label")}))}),[]);const v=h&&h.link,k=(0,ct.useBlockProps)({className:Dt(!!m&&(0,mt.__unstableGetAnimateClassName)({type:"loading"}),{"is-transient":!!m})}),w=!(!window.navigator.pdfViewerEnabled&&(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!Hc("AcroPDF.PDF")&&!Hc("PDF.PdfCtrl")))&&d;return i||m?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Lc,{hrefs:{href:i||m,textLinkHref:s,attachmentPage:v},openInNewWindow:!!l,showDownloadButton:c,changeLinkDestinationOption:function(e){o({textLinkHref:e})},changeOpenInNewWindow:function(e){o({textLinkTarget:!!e&&"_blank"})},changeShowDownloadButton:function(e){o({showDownloadButton:e})},displayPreview:d,changeDisplayPreview:function(e){o({displayPreview:e})},previewHeight:p,changePreviewHeight:function(e){const t=Math.max(parseInt(e,10),Rc);o({previewHeight:t})}}),(0,it.jsxs)(ct.BlockControls,{group:"other",children:[(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:r,mediaURL:i,accept:"*",onSelect:f,onError:y,onReset:()=>f(void 0)}),(0,it.jsx)(Fc,{text:i,disabled:(0,ht.isBlobURL)(i)})]}),(0,it.jsxs)("div",{...k,children:[w&&(0,it.jsxs)(mt.ResizableBox,{size:{height:p,width:"100%"},minHeight:Rc,maxHeight:Vc,grid:[1,10],enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},onResizeStart:()=>x(!1),onResizeStop:function(e,t,n,r){x(!0);const a=parseInt(p+r.height,10);o({previewHeight:a})},showHandle:t,children:[(0,it.jsx)("object",{className:"wp-block-file__preview",data:i,type:"application/pdf","aria-label":(0,pt.__)("Embed of the selected PDF file.")}),!t&&(0,it.jsx)("div",{className:"wp-block-file__preview-overlay"})]}),(0,it.jsxs)("div",{className:"wp-block-file__content-wrapper",children:[(0,it.jsx)(ct.RichText,{identifier:"fileName",tagName:"a",value:a,placeholder:(0,pt.__)("Write file name…"),withoutInteractiveFormatting:!0,onChange:e=>o({fileName:pn(e)}),href:s}),c&&(0,it.jsx)("div",{className:"wp-block-file__button-richtext-wrapper",children:(0,it.jsx)(ct.RichText,{identifier:"downloadButtonText",tagName:"div","aria-label":(0,pt.__)("Download button text"),className:Dt("wp-block-file__button",(0,ct.__experimentalGetElementClassName)("button")),value:u,withoutInteractiveFormatting:!0,placeholder:(0,pt.__)("Add text…"),onChange:e=>o({downloadButtonText:pn(e)})})})]})]})]}):(0,it.jsx)("div",{...k,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Ic}),labels:{title:(0,pt.__)("File"),instructions:(0,pt.__)("Drag and drop a file, upload, or choose from your library.")},onSelect:f,onError:y,accept:"*"})})};const Oc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/file","title":"File","category":"media","description":"Add a link to a downloadable file.","keywords":["document","pdf","download"],"textdomain":"default","attributes":{"id":{"type":"number"},"blob":{"type":"string","role":"local"},"href":{"type":"string","role":"content"},"fileId":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"id"},"fileName":{"type":"rich-text","source":"rich-text","selector":"a:not([download])","role":"content"},"textLinkHref":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"href","role":"content"},"textLinkTarget":{"type":"string","source":"attribute","selector":"a:not([download])","attribute":"target"},"showDownloadButton":{"type":"boolean","default":true},"downloadButtonText":{"type":"rich-text","source":"rich-text","selector":"a[download]","role":"content"},"displayPreview":{"type":"boolean"},"previewHeight":{"type":"number","default":600}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":true},"editorStyle":"wp-block-file-editor","style":"wp-block-file"}');const Gc={from:[{type:"files",isMatch:e=>e.length>0,priority:15,transform:e=>{const t=[];return e.forEach((e=>{const o=(0,ht.createBlobURL)(e);e.type.startsWith("video/")?t.push((0,st.createBlock)("core/video",{blob:(0,ht.createBlobURL)(e)})):e.type.startsWith("image/")?t.push((0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})):e.type.startsWith("audio/")?t.push((0,st.createBlock)("core/audio",{blob:(0,ht.createBlobURL)(e)})):t.push((0,st.createBlock)("core/file",{blob:o,fileName:e.name}))})),t}},{type:"block",blocks:["core/audio"],transform:e=>(0,st.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],transform:e=>(0,st.createBlock)("core/file",{href:e.src,fileName:e.caption,textLinkHref:e.src,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],transform:e=>(0,st.createBlock)("core/file",{href:e.url,fileName:e.caption||(0,no.getFilename)(e.url),textLinkHref:e.url,id:e.id,anchor:e.anchor})}],to:[{type:"block",blocks:["core/audio"],isMatch:({id:e})=>{if(!e)return!1;const{getEntityRecord:t}=(0,lt.select)(_t.store),o=t("postType","attachment",e);return!!o&&o.mime_type.includes("audio")},transform:e=>(0,st.createBlock)("core/audio",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/video"],isMatch:({id:e})=>{if(!e)return!1;const{getEntityRecord:t}=(0,lt.select)(_t.store),o=t("postType","attachment",e);return!!o&&o.mime_type.includes("video")},transform:e=>(0,st.createBlock)("core/video",{src:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})},{type:"block",blocks:["core/image"],isMatch:({id:e})=>{if(!e)return!1;const{getEntityRecord:t}=(0,lt.select)(_t.store),o=t("postType","attachment",e);return!!o&&o.mime_type.includes("image")},transform:e=>(0,st.createBlock)("core/image",{url:e.href,caption:e.fileName,id:e.id,anchor:e.anchor})}]};var $c=Gc;const{name:Uc}=Oc,qc={icon:Ic,example:{attributes:{href:"https://upload.wikimedia.org/wikipedia/commons/d/dd/Armstrong_Small_Step.ogg",fileName:(0,pt._x)("Armstrong_Small_Step","Name of the file")}},transforms:$c,deprecated:Ac,edit:Ec,save:function({attributes:e}){const{href:t,fileId:o,fileName:n,textLinkHref:r,textLinkTarget:a,showDownloadButton:i,downloadButtonText:s,displayPreview:l,previewHeight:c}=e,u=ct.RichText.isEmpty(n)?"PDF embed":n.toString(),d=!ct.RichText.isEmpty(n),p=d?o:void 0;return t&&(0,it.jsxs)("div",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)(it.Fragment,{children:(0,it.jsx)("object",{className:"wp-block-file__embed",data:t,type:"application/pdf",style:{width:"100%",height:`${c}px`},"aria-label":u})}),d&&(0,it.jsx)("a",{id:p,href:r,target:a,rel:a?"noreferrer noopener":void 0,children:(0,it.jsx)(ct.RichText.Content,{value:n})}),i&&(0,it.jsx)("a",{href:t,className:Dt("wp-block-file__button",(0,ct.__experimentalGetElementClassName)("button")),download:!0,"aria-describedby":p,children:(0,it.jsx)(ct.RichText.Content,{value:s})})]})}},Wc=()=>jt({name:Uc,metadata:Oc,settings:qc}),Zc=["core/form-submission-notification",{type:"success"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#345C00" class="has-inline-color">'+(0,pt.__)("Your form has been submitted successfully")+"</mark>"}]]],Jc=["core/form-submission-notification",{type:"error"},[["core/paragraph",{content:'<mark style="background-color:rgba(0, 0, 0, 0);color:#CF2E2E" class="has-inline-color">'+(0,pt.__)("There was an error submitting your form.")+"</mark>"}]]],Qc=[Zc,Jc,["core/form-input",{type:"text",label:(0,pt.__)("Name"),required:!0}],["core/form-input",{type:"email",label:(0,pt.__)("Email"),required:!0}],["core/form-input",{type:"textarea",label:(0,pt.__)("Comment"),required:!0}],["core/form-submit-button",{}]];var Kc=({attributes:e,setAttributes:t,clientId:o})=>{const n=vt(),{action:r,method:a,email:i,submissionMethod:s}=e,l=(0,ct.useBlockProps)(),{hasInnerBlocks:c}=(0,lt.useSelect)((e=>{const{getBlock:t}=e(ct.store),n=t(o);return{hasInnerBlocks:!(!n||!n.innerBlocks.length)}}),[o]),u=(0,ct.useInnerBlocksProps)(l,{template:Qc,renderAppender:c?void 0:ct.InnerBlocks.ButtonBlockAppender});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{dropdownMenuProps:n,label:(0,pt.__)("Settings"),resetAll:()=>{t({submissionMethod:"email",email:void 0,action:void 0,method:"post"})},children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"email"!==s,label:(0,pt.__)("Submissions method"),onDeselect:()=>t({submissionMethod:"email"}),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Submissions method"),options:[{label:(0,pt.__)("Send email"),value:"email"},{label:(0,pt.__)("- Custom -"),value:"custom"}],value:s,onChange:e=>t({submissionMethod:e}),help:"custom"===s?(0,pt.__)('Select the method to use for form submissions. Additional options for the "custom" mode can be found in the "Advanced" section.'):(0,pt.__)("Select the method to use for form submissions.")})}),"email"===s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Email for form submissions"),onDeselect:()=>t({email:void 0,action:void 0,method:"post"}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,autoComplete:"off",label:(0,pt.__)("Email for form submissions"),value:i||"",required:!0,onChange:e=>{t({email:e}),t({action:`mailto:${e}`}),t({method:"post"})},help:(0,pt.__)("The email address where form submissions will be sent. Separate multiple email addresses with a comma."),type:"email"})})]})}),"email"!==s&&(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Method"),options:[{label:"Get",value:"get"},{label:"Post",value:"post"}],value:a,onChange:e=>t({method:e}),help:(0,pt.__)("Select the method to use for form submissions.")}),(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Form action"),value:r,onChange:e=>{t({action:e})},help:(0,pt.__)("The URL where the form should be submitted."),type:"url"})]}),(0,it.jsx)("form",{...u,encType:"email"===s?"text/plain":null})]})};const Yc=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form","title":"Form","category":"common","allowedBlocks":["core/paragraph","core/heading","core/form-input","core/form-submit-button","core/form-submission-notification","core/group","core/columns"],"description":"A form.","keywords":["container","wrapper","row","section"],"textdomain":"default","icon":"feedback","attributes":{"submissionMethod":{"type":"string","default":"email"},"method":{"type":"string","default":"post"},"action":{"type":"string"},"email":{"type":"string"}},"supports":{"anchor":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}}}}');const Xc=[{name:"comment-form",title:(0,pt.__)("Experimental Comment form"),description:(0,pt.__)("A comment form for posts and pages."),attributes:{submissionMethod:"custom",action:"{SITE_URL}/wp-comments-post.php",method:"post",anchor:"comment-form"},isDefault:!1,innerBlocks:[["core/form-input",{type:"text",name:"author",label:(0,pt.__)("Name"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"email",name:"email",label:(0,pt.__)("Email"),required:!0,visibilityPermissions:"logged-out"}],["core/form-input",{type:"textarea",name:"comment",label:(0,pt.__)("Comment"),required:!0,visibilityPermissions:"all"}],["core/form-submit-button",{}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"wp-privacy-form",title:(0,pt.__)("Experimental Privacy Request Form"),keywords:["GDPR"],description:(0,pt.__)("A form to request data exports and/or deletion."),attributes:{submissionMethod:"custom",action:"",method:"post",anchor:"gdpr-form"},isDefault:!1,innerBlocks:[Zc,Jc,["core/paragraph",{content:(0,pt.__)("To request an export or deletion of your personal data on this site, please fill-in the form below. You can define the type of request you wish to perform, and your email address. Once the form is submitted, you will receive a confirmation email with instructions on the next steps.")}],["core/form-input",{type:"email",name:"email",label:(0,pt.__)("Enter your email address."),required:!0,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"export_personal_data",label:(0,pt.__)("Request data export"),required:!1,visibilityPermissions:"all"}],["core/form-input",{type:"checkbox",name:"remove_personal_data",label:(0,pt.__)("Request data deletion"),required:!1,visibilityPermissions:"all"}],["core/form-submit-button",{}],["core/form-input",{type:"hidden",name:"wp-action",value:"wp_privacy_send_request"}],["core/form-input",{type:"hidden",name:"wp-privacy-request",value:"1"}]],scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type}];var eu=Xc;const tu={supports:{},attributes:{submissionMethod:{type:"string",default:"email"},method:{type:"string",default:"post"},action:{type:"string"},email:{type:"string"},anchor:{type:"string",source:"attribute",attribute:"id",selector:"*"},backgroundColor:{type:"string"},textColor:{type:"string"},gradient:{type:"string"},style:{type:"object"},fontFamily:{type:"string"},fontSize:{type:"string"}},save({attributes:e}){const{submissionMethod:t}=e,o=(0,ct.__experimentalGetColorClassesAndStyles)(e),n=(0,ct.getTypographyClassesAndStyles)(e),r=(0,ct.__experimentalGetSpacingClassesAndStyles)(e),a=ct.useBlockProps.save({style:{...o.style,...n.style,...r.style},id:e.anchor});return(0,it.jsx)("form",{...a,className:"wp-block-form",encType:"email"===t?"text/plain":null,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}};var ou=[tu];const{name:nu}=Yc,ru={edit:Kc,save:function({attributes:e}){const t=ct.useBlockProps.save(),{submissionMethod:o}=e;return(0,it.jsx)("form",{...t,encType:"email"===o?"text/plain":null,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},deprecated:ou,variations:eu,example:{}},au=()=>{const e=["core/form"];return(0,vl.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/preventInsertingFormIntoAnotherForm",((t,o,n,{getBlock:r,getBlockParentsByBlockName:a})=>{if("core/form"!==o.name)return t;for(const t of e){if(r(n)?.name===t||a(n,t).length)return!1}return!0})),jt({name:nu,metadata:Yc,settings:ru})};var iu=r(9681),su=r.n(iu);const lu=window.wp.dom,cu=e=>su()((0,lu.__unstableStripHTML)(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),uu={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:o,label:n,inlineLabel:r,required:a,placeholder:i,value:s}=e,l=(0,ct.__experimentalGetBorderClassesAndStyles)(e),c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=Dt("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input",m=ct.useBlockProps.save();return"hidden"===t?(0,it.jsx)("input",{type:t,name:o,value:s}):(0,it.jsx)("div",{...m,children:(0,it.jsxs)("label",{className:Dt("wp-block-form-input__label",{"is-label-inline":r}),children:[(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||cu(n),required:a,"aria-required":a,placeholder:i||void 0,style:u})]})})}},du={attributes:{type:{type:"string",default:"text"},name:{type:"string"},label:{type:"string",default:"Label",selector:".wp-block-form-input__label-content",source:"html",role:"content"},inlineLabel:{type:"boolean",default:!1},required:{type:"boolean",default:!1,selector:".wp-block-form-input__input",source:"attribute",attribute:"required"},placeholder:{type:"string",selector:".wp-block-form-input__input",source:"attribute",attribute:"placeholder",role:"content"},value:{type:"string",default:"",selector:"input",source:"attribute",attribute:"value"},visibilityPermissions:{type:"string",default:"all"}},supports:{className:!1,anchor:!0,reusable:!1,spacing:{margin:["top","bottom"]},__experimentalBorder:{radius:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{radius:!0}}},save({attributes:e}){const{type:t,name:o,label:n,inlineLabel:r,required:a,placeholder:i,value:s}=e,l=(0,ct.__experimentalGetBorderClassesAndStyles)(e),c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=Dt("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input";return"hidden"===t?(0,it.jsx)("input",{type:t,name:o,value:s}):(0,it.jsxs)("label",{className:Dt("wp-block-form-input__label",{"is-label-inline":r}),children:[(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||cu(n),required:a,"aria-required":a,placeholder:i||void 0,style:u})]})}};var pu=[uu,du];var mu=function({attributes:e,setAttributes:t,className:o}){const{type:n,name:r,label:a,inlineLabel:i,required:s,placeholder:l,value:c}=e,u=(0,ct.useBlockProps)(),d=vt(),p=(0,gt.useRef)(),m="textarea"===n?"textarea":"input",g=(0,ct.__experimentalUseBorderProps)(e),h=(0,ct.__experimentalUseColorProps)(e);p.current&&p.current.focus();const _="checkbox"===n||"radio"===n,x=(0,it.jsxs)(it.Fragment,{children:["hidden"!==n&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({inlineLabel:!1,required:!1})},dropdownMenuProps:d,children:["checkbox"!==n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Inline label"),hasValue:()=>!!i,onDeselect:()=>t({inlineLabel:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Inline label"),checked:i,onChange:e=>{t({inlineLabel:e})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Required"),hasValue:()=>!!s,onDeselect:()=>t({required:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Required"),checked:s,onChange:e=>{t({required:e})}})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Name"),value:r,onChange:e=>{t({name:e})},help:(0,pt.__)('Affects the "name" attribute of the input element, and is used as a name for the form submission results.')})})]}),b=(0,it.jsx)(ct.RichText,{tagName:"span",className:"wp-block-form-input__label-content",value:a,onChange:e=>t({label:e}),"aria-label":a?(0,pt.__)("Label"):(0,pt.__)("Empty label"),"data-empty":!a,placeholder:(0,pt.__)("Type the label for this input")});return"hidden"===n?(0,it.jsxs)(it.Fragment,{children:[x,(0,it.jsx)("input",{type:"hidden",className:Dt(o,"wp-block-form-input__input",h.className,g.className),"aria-label":(0,pt.__)("Value"),value:c,onChange:e=>t({value:e.target.value})})]}):(0,it.jsxs)("div",{...u,children:[x,(0,it.jsxs)("span",{className:Dt("wp-block-form-input__label",{"is-label-inline":i||"checkbox"===n}),children:[!_&&b,(0,it.jsx)(m,{type:"textarea"===n?void 0:n,className:Dt(o,"wp-block-form-input__input",h.className,g.className),"aria-label":(0,pt.__)("Optional placeholder text"),placeholder:l?void 0:(0,pt.__)("Optional placeholder…"),value:l,onChange:e=>t({placeholder:e.target.value}),"aria-required":s,style:{...g.style,...h.style}}),_&&b]})]})};const gu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-input","title":"Input Field","category":"common","ancestor":["core/form"],"description":"The basic building block for forms.","keywords":["input","form"],"textdomain":"default","icon":"forms","attributes":{"type":{"type":"string","default":"text"},"name":{"type":"string"},"label":{"type":"rich-text","default":"Label","selector":".wp-block-form-input__label-content","source":"rich-text","role":"content"},"inlineLabel":{"type":"boolean","default":false},"required":{"type":"boolean","default":false,"selector":".wp-block-form-input__input","source":"attribute","attribute":"required"},"placeholder":{"type":"string","selector":".wp-block-form-input__input","source":"attribute","attribute":"placeholder","role":"content"},"value":{"type":"string","default":"","selector":"input","source":"attribute","attribute":"value"},"visibilityPermissions":{"type":"string","default":"all"}},"supports":{"anchor":true,"reusable":false,"spacing":{"margin":["top","bottom"]},"__experimentalBorder":{"radius":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"radius":true}}},"style":["wp-block-form-input"]}');const hu=[{name:"text",title:(0,pt.__)("Text Input"),icon:"edit-page",description:(0,pt.__)("A generic text input."),attributes:{type:"text"},isDefault:!0,scope:["inserter","transform"],isActive:e=>!e?.type||"text"===e?.type},{name:"textarea",title:(0,pt.__)("Textarea Input"),icon:"testimonial",description:(0,pt.__)("A textarea input to allow entering multiple lines of text."),attributes:{type:"textarea"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"textarea"===e?.type},{name:"checkbox",title:(0,pt.__)("Checkbox Input"),description:(0,pt.__)("A simple checkbox input."),icon:"forms",attributes:{type:"checkbox",inlineLabel:!0},isDefault:!0,scope:["inserter","transform"],isActive:e=>"checkbox"===e?.type},{name:"email",title:(0,pt.__)("Email Input"),icon:"email",description:(0,pt.__)("Used for email addresses."),attributes:{type:"email"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"email"===e?.type},{name:"url",title:(0,pt.__)("URL Input"),icon:"admin-site",description:(0,pt.__)("Used for URLs."),attributes:{type:"url"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"url"===e?.type},{name:"tel",title:(0,pt.__)("Telephone Input"),icon:"phone",description:(0,pt.__)("Used for phone numbers."),attributes:{type:"tel"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"tel"===e?.type},{name:"number",title:(0,pt.__)("Number Input"),icon:"edit-page",description:(0,pt.__)("A numeric input."),attributes:{type:"number"},isDefault:!0,scope:["inserter","transform"],isActive:e=>"number"===e?.type}];var _u=hu;const{name:xu}=gu,bu={deprecated:pu,edit:mu,save:function({attributes:e}){const{type:t,name:o,label:n,inlineLabel:r,required:a,placeholder:i,value:s}=e,l=(0,ct.__experimentalGetBorderClassesAndStyles)(e),c=(0,ct.__experimentalGetColorClassesAndStyles)(e),u={...l.style,...c.style},d=Dt("wp-block-form-input__input",c.className,l.className),p="textarea"===t?"textarea":"input",m=ct.useBlockProps.save(),g="checkbox"===t||"radio"===t;return"hidden"===t?(0,it.jsx)("input",{type:t,name:o,value:s}):(0,it.jsx)("div",{...m,children:(0,it.jsxs)("label",{className:Dt("wp-block-form-input__label",{"is-label-inline":r}),children:[!g&&(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})}),(0,it.jsx)(p,{className:d,type:"textarea"===t?void 0:t,name:o||(h=n,su()((0,lu.__unstableStripHTML)(h)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,"")),required:a,"aria-required":a,placeholder:i||void 0,style:u}),g&&(0,it.jsx)("span",{className:"wp-block-form-input__label-content",children:(0,it.jsx)(ct.RichText.Content,{value:n})})]})});var h},variations:_u,example:{}},fu=()=>jt({name:xu,metadata:gu,settings:bu}),yu=[["core/buttons",{},[["core/button",{text:(0,pt.__)("Submit"),tagName:"button",type:"submit"}]]]];var vu=()=>{const e=(0,ct.useBlockProps)(),t=(0,ct.useInnerBlocksProps)(e,{template:yu,templateLock:"all"});return(0,it.jsx)("div",{className:"wp-block-form-submit-wrapper",...t})};const ku=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submit-button","title":"Form Submit Button","category":"common","icon":"button","ancestor":["core/form"],"allowedBlocks":["core/buttons","core/button"],"description":"A submission button for forms.","keywords":["submit","button","form"],"textdomain":"default","style":["wp-block-form-submit-button"]}');const{name:wu}=ku,Cu={edit:vu,save:function(){const e=ct.useBlockProps.save();return(0,it.jsx)("div",{className:"wp-block-form-submit-wrapper",...e,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},example:{}},ju=()=>jt({name:wu,metadata:ku,settings:Cu});var Su=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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"})});const Bu=[["core/paragraph",{content:(0,pt.__)("Enter the message you wish displayed for form submission error/success, and select the type of the message (success/error) from the block's options.")}]];var Tu=({attributes:e,clientId:t})=>{const{type:o}=e,n=(0,ct.useBlockProps)({className:Dt("wp-block-form-submission-notification",{[`form-notification-type-${o}`]:o})}),{hasInnerBlocks:r}=(0,lt.useSelect)((e=>{const{getBlock:o}=e(ct.store),n=o(t);return{hasInnerBlocks:!(!n||!n.innerBlocks.length)}}),[t]),a=(0,ct.useInnerBlocksProps)(n,{template:Bu,renderAppender:r?void 0:ct.InnerBlocks.ButtonBlockAppender});return(0,it.jsx)("div",{...a,"data-message-success":(0,pt.__)("Submission success notification"),"data-message-error":(0,pt.__)("Submission error notification")})};const Nu=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/form-submission-notification","title":"Form Submission Notification","category":"common","ancestor":["core/form"],"description":"Provide a notification message after the form has been submitted.","keywords":["form","feedback","notification","message"],"textdomain":"default","icon":"feedback","attributes":{"type":{"type":"string","default":"success"}}}');const Pu=[{name:"form-submission-success",title:(0,pt.__)("Form Submission Success"),description:(0,pt.__)("Success message for form submissions."),attributes:{type:"success"},isDefault:!0,innerBlocks:[["core/paragraph",{content:(0,pt.__)("Your form has been submitted successfully."),backgroundColor:"#00D084",textColor:"#000000",style:{elements:{link:{color:{text:"#000000"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"success"===e?.type},{name:"form-submission-error",title:(0,pt.__)("Form Submission Error"),description:(0,pt.__)("Error/failure message for form submissions."),attributes:{type:"error"},isDefault:!1,innerBlocks:[["core/paragraph",{content:(0,pt.__)("There was an error submitting your form."),backgroundColor:"#CF2E2E",textColor:"#FFFFFF",style:{elements:{link:{color:{text:"#FFFFFF"}}}}}]],scope:["inserter","transform"],isActive:e=>!e?.type||"error"===e?.type}];var Iu=Pu;const{name:Du}=Nu,Mu={icon:Su,edit:Tu,save:function({attributes:e}){const{type:t}=e;return(0,it.jsx)("div",{...ct.useInnerBlocksProps.save(ct.useBlockProps.save({className:Dt("wp-block-form-submission-notification",{[`form-notification-type-${t}`]:t})}))})},variations:Iu,example:{}},zu=()=>jt({name:Du,metadata:Nu,settings:Mu});var Au=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M16.375 4.5H4.625a.125.125 0 0 0-.125.125v8.254l2.859-1.54a.75.75 0 0 1 .68-.016l2.384 1.142 2.89-2.074a.75.75 0 0 1 .874 0l2.313 1.66V4.625a.125.125 0 0 0-.125-.125Zm.125 9.398-2.75-1.975-2.813 2.02a.75.75 0 0 1-.76.067l-2.444-1.17L4.5 14.583v1.792c0 .069.056.125.125.125h11.75a.125.125 0 0 0 .125-.125v-2.477ZM4.625 3C3.728 3 3 3.728 3 4.625v11.75C3 17.273 3.728 18 4.625 18h11.75c.898 0 1.625-.727 1.625-1.625V4.625C18 3.728 17.273 3 16.375 3H4.625ZM20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z",fillRule:"evenodd",clipRule:"evenodd"})});const Lu="none",Hu="media",Ru="lightbox",Vu="attachment",Fu="large",Eu="file",Ou="post";function Gu(e){return Math.min(3,e?.images?.length)}function $u(e,t){switch(t){case Eu:return{href:e?.source_url||e?.url,linkDestination:Hu};case Ou:return{href:e?.link,linkDestination:Vu};case Hu:return{href:e?.source_url||e?.url,linkDestination:Hu};case Vu:return{href:e?.link,linkDestination:Vu};case Lu:return{href:void 0,linkDestination:Lu}}return{}}function Uu(e){let t=e.linkTo?e.linkTo:"none";"post"===t?t="attachment":"file"===t&&(t="media");const o=e.images.map((o=>function(e,t,o){return(0,st.createBlock)("core/image",{...e.id&&{id:parseInt(e.id)},url:e.url,alt:e.alt,caption:e.caption,sizeSlug:t,...$u(e,o)})}(o,e.sizeSlug,t))),{images:n,ids:r,...a}=e;return[{...a,linkTo:t,allowResize:!1},o]}const qu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},shortCodeTransforms:{type:"array",default:[],items:{type:"object"}},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTarget:{type:"string"},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"},allowResize:{type:"boolean",default:!1}},save({attributes:e}){const{caption:t,columns:o,imageCrop:n}=e,r=Dt("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":n}),a=ct.useBlockProps.save({className:r}),i=ct.useInnerBlocksProps.save(a);return(0,it.jsxs)("figure",{...i,children:[i.children,!ct.RichText.isEmpty(t)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:t})]})}},Wu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},fixedHeight:{type:"boolean",default:!0},linkTo:{type:"string"},sizeSlug:{type:"string",default:"large"}},supports:{anchor:!0,align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,caption:r,linkTo:a}=e,i=`columns-${o} ${n?"is-cropped":""}`;return(0,it.jsxs)("figure",{...ct.useBlockProps.save({className:i}),children:[(0,it.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(a){case Eu:t=e.fullUrl||e.url;break;case Ou:t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,!ct.RichText.isEmpty(e.caption)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!ct.RichText.isEmpty(r)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r})]})},migrate:e=>Uu(e)},Zu={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},fullUrl:{type:"string",source:"attribute",selector:"img",attribute:"data-full-url"},link:{type:"string",source:"attribute",selector:"img",attribute:"data-link"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},id:{type:"string",source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",items:{type:"number"},default:[]},columns:{type:"number",minimum:1,maximum:8},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},sizeSlug:{type:"string",default:"large"}},supports:{align:!0},isEligible:({linkTo:e})=>!e||"attachment"===e||"media"===e,migrate:e=>Uu(e),save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,caption:r,linkTo:a}=e;return(0,it.jsxs)("figure",{className:`columns-${o} ${n?"is-cropped":""}`,children:[(0,it.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,!ct.RichText.isEmpty(e.caption)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!ct.RichText.isEmpty(r)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r})]})}},Ju={attributes:{images:{type:"array",default:[],source:"query",selector:".blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},link:{source:"attribute",selector:"img",attribute:"data-link"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},caption:{type:"string",source:"html",selector:".blocks-gallery-item__caption"}}},ids:{type:"array",default:[]},columns:{type:"number"},caption:{type:"string",source:"html",selector:".blocks-gallery-caption"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},isEligible:({ids:e})=>e&&e.some((e=>"string"==typeof e)),migrate:e=>Uu(e),save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,caption:r,linkTo:a}=e;return(0,it.jsxs)("figure",{className:`columns-${o} ${n?"is-cropped":""}`,children:[(0,it.jsx)("ul",{className:"blocks-gallery-grid",children:t.map((e=>{let t;switch(a){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,!ct.RichText.isEmpty(e.caption)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-item__caption",value:e.caption})]})},e.id||e.url)}))}),!ct.RichText.isEmpty(r)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:"blocks-gallery-caption",value:r})]})}},Qu={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},fullUrl:{source:"attribute",selector:"img",attribute:"data-full-url"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},ids:{type:"array",default:[]},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,linkTo:r}=e;return(0,it.jsx)("ul",{className:`columns-${o} ${n?"is-cropped":""}`,children:t.map((e=>{let t;switch(r){case"media":t=e.fullUrl||e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-full-url":e.fullUrl,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,e.caption&&e.caption.length>0&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:e.caption})]})},e.id||e.url)}))})},migrate:e=>Uu(e)},Ku={attributes:{images:{type:"array",default:[],source:"query",selector:"ul.wp-block-gallery .blocks-gallery-item",query:{url:{source:"attribute",selector:"img",attribute:"src"},alt:{source:"attribute",selector:"img",attribute:"alt",default:""},id:{source:"attribute",selector:"img",attribute:"data-id"},link:{source:"attribute",selector:"img",attribute:"data-link"},caption:{type:"string",source:"html",selector:"figcaption"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"}},isEligible:({images:e,ids:t})=>e&&e.length>0&&(!t&&e||t&&e&&t.length!==e.length||e.some(((e,o)=>!e&&null!==t[o]||parseInt(e,10)!==t[o]))),migrate:e=>Uu(e),supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),imageCrop:n,linkTo:r}=e;return(0,it.jsx)("ul",{className:`columns-${o} ${n?"is-cropped":""}`,children:t.map((e=>{let t;switch(r){case"media":t=e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id,"data-link":e.link,className:e.id?`wp-image-${e.id}`:null});return(0,it.jsx)("li",{className:"blocks-gallery-item",children:(0,it.jsxs)("figure",{children:[t?(0,it.jsx)("a",{href:t,children:o}):o,e.caption&&e.caption.length>0&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:e.caption})]})},e.id||e.url)}))})}},Yu={attributes:{images:{type:"array",default:[],source:"query",selector:"div.wp-block-gallery figure.blocks-gallery-image img",query:{url:{source:"attribute",attribute:"src"},alt:{source:"attribute",attribute:"alt",default:""},id:{source:"attribute",attribute:"data-id"}}},columns:{type:"number"},imageCrop:{type:"boolean",default:!0},linkTo:{type:"string",default:"none"},align:{type:"string",default:"none"}},supports:{align:!0},save({attributes:e}){const{images:t,columns:o=Gu(e),align:n,imageCrop:r,linkTo:a}=e,i=Dt(`columns-${o}`,{alignnone:"none"===n,"is-cropped":r});return(0,it.jsx)("div",{className:i,children:t.map((e=>{let t;switch(a){case"media":t=e.url;break;case"attachment":t=e.link}const o=(0,it.jsx)("img",{src:e.url,alt:e.alt,"data-id":e.id});return(0,it.jsx)("figure",{className:"blocks-gallery-image",children:t?(0,it.jsx)("a",{href:t,children:o}):o},e.id||e.url)}))})},migrate:e=>Uu(e)};var Xu=[qu,Wu,Zu,Ju,Qu,Ku,Yu],ed=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12.5 14.5h-1V16h1c2.2 0 4-1.8 4-4s-1.8-4-4-4h-1v1.5h1c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zm-4 1.5v-1.5h-1C6.1 14.5 5 13.4 5 12s1.1-2.5 2.5-2.5h1V8h-1c-2.2 0-4 1.8-4 4s1.8 4 4 4h1zm-1-3.2h5v-1.5h-5v1.5zM18 4H9c-1.1 0-2 .9-2 2v.5h1.5V6c0-.3.2-.5.5-.5h9c.3 0 .5.2.5.5v12c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5v-.5H7v.5c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"})}),td=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"})});const od=(0,it.jsx)(ct.BlockIcon,{icon:Au});function nd(e){return e?Math.min(3,e):3}const rd=(e,t="large")=>{const o=Object.fromEntries(Object.entries(e??{}).filter((([e])=>["alt","id","link"].includes(e))));o.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e?.url||e?.source_url;const n=e?.sizes?.full?.url||e?.media_details?.sizes?.full?.source_url;return n&&(o.fullUrl=n),o},ad=20,id="none",sd="media",ld="attachment",cd="custom",ud=["noreferrer","noopener"],dd=["image"],pd=["flex","grid"],md="full";function gd(e,t,o,n,r){switch(o||t){case"file":case Hu:return{href:e?.source_url||e?.url,linkDestination:sd,lightbox:r?.enabled?{...n?.lightbox,enabled:!1}:void 0};case"post":case Vu:return{href:e?.link,linkDestination:ld,lightbox:r?.enabled?{...n?.lightbox,enabled:!1}:void 0};case Ru:return{href:void 0,lightbox:r?.enabled?void 0:{...n?.lightbox,enabled:!0},linkDestination:id};case Lu:return{href:void 0,linkDestination:id,lightbox:void 0}}return{}}function hd(e,{rel:t}){const o=e?"_blank":void 0;let n;return n=o||t?function(e){let t=e;return void 0!==e&&t&&(ud.forEach((e=>{const o=new RegExp("\\b"+e+"\\b","gi");t=t.replace(o,"")})),t!==e&&(t=t.trim()),t||(t=void 0)),t}(t):void 0,{linkTarget:o,rel:n}}function _d(e){return dd.some((t=>0===e.type.indexOf(t)))}function xd(e){const{attributes:t,isSelected:o,setAttributes:n,mediaPlaceholder:r,insertBlocksAfter:a,blockProps:i,__unstableLayoutClassNames:s,isContentLocked:l,multiGallerySelection:c}=e,{align:u,columns:d,imageCrop:p}=t;return(0,it.jsxs)("figure",{...i,className:Dt(i.className,s,"blocks-gallery-grid",{[`align${u}`]:u,[`columns-${d}`]:void 0!==d,"columns-default":void 0===d,"is-cropped":p}),children:[i.children,o&&!i.children&&(0,it.jsx)(St.View,{className:"blocks-gallery-media-placeholder-wrapper",children:r}),(0,it.jsx)(zo,{attributes:t,setAttributes:n,isSelected:o,insertBlocksAfter:a,showToolbarButton:!c&&!l,className:"blocks-gallery-caption",label:(0,pt.__)("Gallery caption text"),placeholder:(0,pt.__)("Add gallery caption")})]})}function bd(e,t,o){return(0,gt.useMemo)((()=>function(){if(!e||0===e.length)return;const{imageSizes:n}=o();let r={};t&&(r=e.reduce(((e,t)=>{if(!t.id)return e;const o=n.reduce(((e,o)=>{const n=t.sizes?.[o.slug]?.url,r=t.media_details?.sizes?.[o.slug]?.source_url;return{...e,[o.slug]:n||r}}),{});return{...e,[parseInt(t.id,10)]:o}}),{}));const a=Object.values(r);return n.filter((({slug:e})=>a.some((t=>t[e])))).map((({name:e,slug:t})=>({value:t,label:e})))}()),[e,t])}function fd(e,t){const[o,n]=(0,gt.useState)([]);return(0,gt.useMemo)((()=>function(){let r=!1;const a=o.filter((t=>e.find((e=>t.clientId===e.clientId))));a.length<o.length&&(r=!0);e.forEach((e=>{e.fromSavedContent&&!a.find((t=>t.id===e.id))&&(r=!0,a.push(e))}));const i=e.filter((e=>!a.find((t=>e.clientId&&t.clientId===e.clientId))&&t?.find((t=>t.id===e.id))&&!e.fromSavedContent));(r||i?.length>0)&&n([...a,...i]);return i.length>0?i:null}()),[e,t])}const yd=[];function vd({blockGap:e,clientId:t}){const o="var( --wp--style--gallery-gap-default, var( --gallery-block--gutter-size, var( --wp--style--block-gap, 0.5em ) ) )";let n,r=o,a=o;e&&(n="string"==typeof e?(0,ct.__experimentalGetGapCSSValue)(e):(0,ct.__experimentalGetGapCSSValue)(e?.top)||o,a="string"==typeof e?(0,ct.__experimentalGetGapCSSValue)(e):(0,ct.__experimentalGetGapCSSValue)(e?.left)||o,r=n===a?n:`${n} ${a}`);const i=`#block-${t} {\n\t\t--wp--style--unstable-gallery-gap: ${"0"===a?"0px":a};\n\t\tgap: ${r}\n\t}`;return(0,ct.useStyleOverride)({css:i}),null}const kd=[{icon:ed,label:(0,pt.__)("Link images to attachment pages"),value:Vu,noticeText:(0,pt.__)("Attachment Pages")},{icon:td,label:(0,pt.__)("Link images to media files"),value:Hu,noticeText:(0,pt.__)("Media Files")},{icon:tr,label:(0,pt.__)("Enlarge on click"),value:Ru,noticeText:(0,pt.__)("Lightbox effect"),infoText:(0,pt.__)("Scale images with a lightbox effect")},{icon:hn,label:(0,pt._x)("None","Media item link option"),value:Lu,noticeText:(0,pt.__)("None")}],wd=["image"],Cd=gt.Platform.isNative?(0,pt.__)("Add media"):(0,pt.__)("Drag and drop images, upload, or choose from your library."),jd=gt.Platform.isNative?{type:"stepper"}:{},Sd={name:"core/image"},Bd=[];const Td=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/gallery","title":"Gallery","category":"media","allowedBlocks":["core/image"],"description":"Display multiple images in a rich gallery.","keywords":["images","photos"],"textdomain":"default","attributes":{"images":{"type":"array","default":[],"source":"query","selector":".blocks-gallery-item","query":{"url":{"type":"string","source":"attribute","selector":"img","attribute":"src"},"fullUrl":{"type":"string","source":"attribute","selector":"img","attribute":"data-full-url"},"link":{"type":"string","source":"attribute","selector":"img","attribute":"data-link"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":""},"id":{"type":"string","source":"attribute","selector":"img","attribute":"data-id"},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-item__caption"}}},"ids":{"type":"array","items":{"type":"number"},"default":[]},"shortCodeTransforms":{"type":"array","items":{"type":"object"},"default":[]},"columns":{"type":"number","minimum":1,"maximum":8},"caption":{"type":"rich-text","source":"rich-text","selector":".blocks-gallery-caption","role":"content"},"imageCrop":{"type":"boolean","default":true},"randomOrder":{"type":"boolean","default":false},"fixedHeight":{"type":"boolean","default":true},"linkTarget":{"type":"string"},"linkTo":{"type":"string"},"sizeSlug":{"type":"string","default":"large"},"allowResize":{"type":"boolean","default":false},"aspectRatio":{"type":"string","default":"auto"}},"providesContext":{"allowResize":"allowResize","imageCrop":"imageCrop","fixedHeight":"fixedHeight"},"supports":{"anchor":true,"align":true,"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"radius":true}},"html":false,"units":["px","em","rem","vh","vw"],"spacing":{"margin":true,"padding":true,"blockGap":["horizontal","vertical"],"__experimentalSkipSerialization":["blockGap"],"__experimentalDefaultControls":{"blockGap":true,"margin":false,"padding":false}},"color":{"text":false,"background":true,"gradients":true},"layout":{"allowSwitching":false,"allowInheriting":false,"allowEditing":false,"default":{"type":"flex"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-gallery-editor","style":"wp-block-gallery"}');(0,vl.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-to",(function(e){if("core/gallery"===e.name&&e.attributes?.images.length>0){const t=e.attributes.images.map((({url:t,id:o,alt:n})=>(0,st.createBlock)("core/image",{url:t,id:o?parseInt(o,10):null,alt:n,sizeSlug:e.attributes.sizeSlug,linkDestination:e.attributes.linkDestination})));delete e.attributes.ids,delete e.attributes.images,e.innerBlocks=t}return e})),(0,vl.addFilter)("blocks.switchToBlockType.transformedBlock","core/gallery/update-third-party-transform-from",(function(e,t){const o=(Array.isArray(t)?t:[t]).find((t=>"core/gallery"===t.name&&t.innerBlocks.length>0&&!t.attributes.images?.length>0&&!e.name.includes("core/")));if(o){const e=o.innerBlocks.map((({attributes:{url:e,id:t,alt:o}})=>({url:e,id:t?parseInt(t,10):null,alt:o}))),t=e.map((({id:e})=>e));o.attributes.images=e,o.attributes.ids=t}return e}));const Nd={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],transform:e=>{let{align:t,sizeSlug:o}=e[0];t=e.every((e=>e.align===t))?t:void 0,o=e.every((e=>e.sizeSlug===o))?o:void 0;const n=e.filter((({url:e})=>e)).map((e=>(e.width=void 0,e.height=void 0,(0,st.createBlock)("core/image",e))));return(0,st.createBlock)("core/gallery",{align:t,sizeSlug:o},n)}},{type:"shortcode",tag:"gallery",transform({named:{ids:e,columns:t=3,link:o,orderby:n}}){const r=(e=>e?e.split(",").map((e=>parseInt(e,10))):[])(e).map((e=>parseInt(e,10)));let a=Lu;"post"===o?a=Vu:"file"===o&&(a=Hu);return(0,st.createBlock)("core/gallery",{columns:parseInt(t,10),linkTo:a,randomOrder:"rand"===n},r.map((e=>(0,st.createBlock)("core/image",{id:e}))))},isMatch:({named:e})=>void 0!==e.ids},{type:"files",priority:1,isMatch:e=>1!==e.length&&e.every((e=>0===e.type.indexOf("image/"))),transform(e){const t=e.map((e=>(0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})));return(0,st.createBlock)("core/gallery",{},t)}}],to:[{type:"block",blocks:["core/image"],transform:({align:e},t)=>t.length>0?t.map((({attributes:{url:t,alt:o,caption:n,title:r,href:a,rel:i,linkClass:s,id:l,sizeSlug:c,linkDestination:u,linkTarget:d,anchor:p,className:m}})=>(0,st.createBlock)("core/image",{align:e,url:t,alt:o,caption:n,title:r,href:a,rel:i,linkClass:s,id:l,sizeSlug:c,linkDestination:u,linkTarget:d,anchor:p,className:m}))):(0,st.createBlock)("core/image",{align:e})}]};var Pd=Nd;const{name:Id}=Td,Dd={icon:Au,example:{attributes:{columns:2},innerBlocks:[{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Glacial_lakes%2C_Bhutan.jpg"}},{name:"core/image",attributes:{url:"https://s.w.org/images/core/5.3/Sediment_off_the_Yucatan_Peninsula.jpg"}}]},transforms:Pd,edit:function(e){const{setAttributes:t,attributes:o,className:n,clientId:r,isSelected:a,insertBlocksAfter:i,isContentLocked:s,onFocus:l}=e,[c,u,d,p]=(0,ct.useSettings)("blocks.core/image.lightbox","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),m=c?.allowEditing?kd:kd.filter((e=>e.value!==Ru)),{columns:g,imageCrop:h,randomOrder:_,linkTarget:x,linkTo:b,sizeSlug:f,aspectRatio:y}=o,{__unstableMarkNextChangeAsNotPersistent:v,replaceInnerBlocks:k,updateBlockAttributes:w,selectBlock:C}=(0,lt.useDispatch)(ct.store),{createSuccessNotice:j,createErrorNotice:S}=(0,lt.useDispatch)(bo.store),{getBlock:B,getSettings:T,innerBlockImages:N,blockWasJustInserted:P,multiGallerySelection:I}=(0,lt.useSelect)((e=>{const{getBlockName:t,getMultiSelectedBlockClientIds:o,getSettings:n,getBlock:a,wasBlockJustInserted:i}=e(ct.store),s=o();return{getBlock:a,getSettings:n,innerBlockImages:a(r)?.innerBlocks??Bd,blockWasJustInserted:i(r,"inserter_menu"),multiGallerySelection:s.length&&s.every((e=>"core/gallery"===t(e)))}}),[r]),D=(0,gt.useMemo)((()=>N?.map((e=>({clientId:e.clientId,id:e.attributes.id,url:e.attributes.url,attributes:e.attributes,fromSavedContent:Boolean(e.originalContent)})))),[N]),M=function(e){return(0,lt.useSelect)((t=>{const o=e.map((e=>e.attributes.id)).filter((e=>void 0!==e));return 0===o.length?yd:t(_t.store).getEntityRecords("postType","attachment",{include:o.join(","),per_page:-1,orderby:"include"})??yd}),[e])}(N),z=fd(D,M),A=d?.map((({name:e,ratio:t})=>({label:e,value:t}))),L=u?.map((({name:e,ratio:t})=>({label:e,value:t}))),H=[{label:(0,pt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...p&&L||[],...A||[]];(0,gt.useEffect)((()=>{z?.forEach((e=>{v(),w(e.clientId,{...V(e.attributes),id:e.id,align:void 0})}))}),[z]);const R=bd(M,a,T);function V(e){const t=e.id?M.find((({id:t})=>t===e.id)):null;let n,r;return e.className&&""!==e.className&&(n=e.className),r=e.linkTarget||e.rel?{linkTarget:e.linkTarget,rel:e.rel}:hd(x,o),{...rd(t,f),...gd(t,b,e?.linkDestination),...r,className:n,sizeSlug:f,caption:e.caption||t.caption?.raw,alt:e.alt||t.alt_text,aspectRatio:"auto"===y?void 0:y}}function F(e){const t=gt.Platform.isNative&&e.id?M.find((({id:t})=>t===e.id)):null,o=t?t?.media_type:e.type;return wd.some((e=>0===o?.indexOf(e)))||e.blob}function E(e){const t="[object FileList]"===Object.prototype.toString.call(e),o=t?Array.from(e).map((e=>e.url?e:{blob:(0,ht.createBlobURL)(e)})):e;o.every(F)||S((0,pt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const n=o.filter((e=>e.url||F(e))).map((e=>e.url?e:{blob:e.blob||(0,ht.createBlobURL)(e)})),a=n.reduce(((e,t,o)=>(e[t.id]=o,e)),{}),i=t?N:N.filter((e=>n.find((t=>t.id===e.attributes.id)))),s=n.filter((e=>!i.find((t=>e.id===t.attributes.id)))).map((e=>(0,st.createBlock)("core/image",{id:e.id,blob:e.blob,url:e.url,caption:e.caption,alt:e.alt})));k(r,i.concat(s).sort(((e,t)=>a[e.attributes.id]-a[t.attributes.id]))),s?.length>0&&C(s[0].clientId)}function O(e){t({linkTo:e});const o={},n=[];B(r).innerBlocks.forEach((t=>{n.push(t.clientId);const r=t.attributes.id?M.find((({id:e})=>e===t.attributes.id)):null;o[t.clientId]=gd(r,e,!1,t.attributes,c)})),w(n,o,{uniqueByBlock:!0});const a=[...m].find((t=>t.value===e));j((0,pt.sprintf)((0,pt.__)("All gallery image links updated to: %s"),a.noticeText),{id:"gallery-attributes-linkTo",type:"snackbar"})}function G(e){t({columns:e})}function $(){t({imageCrop:!h})}function U(){t({randomOrder:!_})}function q(e){const o=e?"_blank":void 0;t({linkTarget:o});const n={},a=[];B(r).innerBlocks.forEach((e=>{a.push(e.clientId),n[e.clientId]=hd(o,e.attributes)})),w(a,n,{uniqueByBlock:!0});const i=e?(0,pt.__)("All gallery images updated to open in new tab"):(0,pt.__)("All gallery images updated to not open in new tab");j(i,{id:"gallery-attributes-openInNewTab",type:"snackbar"})}function W(e){t({sizeSlug:e});const o={},n=[];B(r).innerBlocks.forEach((t=>{n.push(t.clientId);const r=t.attributes.id?M.find((({id:e})=>e===t.attributes.id)):null;o[t.clientId]=function(e,t){const o=e?.media_details?.sizes?.[t]?.source_url;return o?{url:o,width:void 0,height:void 0,sizeSlug:t}:{}}(r,e)})),w(n,o,{uniqueByBlock:!0});const a=R.find((t=>t.value===e));j((0,pt.sprintf)((0,pt.__)("All gallery image sizes updated to: %s"),a?.label??e),{id:"gallery-attributes-sizeSlug",type:"snackbar"})}function Z(e){t({aspectRatio:e});const o={},n=[];B(r).innerBlocks.forEach((t=>{n.push(t.clientId),o[t.clientId]={aspectRatio:"auto"===e?void 0:e}})),w(n,o,!0);const a=H.find((t=>t.value===e));j((0,pt.sprintf)((0,pt.__)("All gallery images updated to aspect ratio: %s"),a?.label||e),{id:"gallery-attributes-aspectRatio",type:"snackbar"})}(0,gt.useEffect)((()=>{b||(v(),t({linkTo:window?.wp?.media?.view?.settings?.defaultProps?.link||Lu}))}),[b]);const J=!!D.length,Q=J&&D.some((e=>!!e.id)),K=D.some((e=>gt.Platform.isNative?0===e.url?.indexOf("file:"):!e.id&&0===e.url?.indexOf("blob:"))),Y=gt.Platform.select({web:{addToGallery:!1,disableMediaButtons:K,value:{}},native:{addToGallery:Q,isAppender:J,disableMediaButtons:J&&!a||K,value:Q?D:{},autoOpenMediaUpload:!J&&a&&P,onFocus:l}}),X=(0,it.jsx)(ct.MediaPlaceholder,{handleUpload:!1,icon:od,labels:{title:(0,pt.__)("Gallery"),instructions:Cd},onSelect:E,accept:"image/*",allowedTypes:wd,multiple:!0,onError:function(e){S(e,{type:"snackbar"})},...Y}),ee=(0,ct.useBlockProps)({className:Dt(n,"has-nested-images")}),te=gt.Platform.isNative&&{marginHorizontal:0,marginVertical:0},oe=(0,ct.useInnerBlocksProps)(ee,{defaultBlock:Sd,directInsert:!0,orientation:"horizontal",renderAppender:!1,...te}),ne=vt();if(!J)return(0,it.jsxs)(St.View,{...oe,children:[oe.children,X]});const re=b&&"none"!==b;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.InspectorControls,{children:[gt.Platform.isWeb&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({columns:void 0,imageCrop:!0,randomOrder:!1}),Z("auto"),f!==Fu&&W(Fu),x&&q(!1)},dropdownMenuProps:ne,children:[D.length>1&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Columns"),hasValue:()=>!!g&&g!==D.length,onDeselect:()=>G(void 0),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Columns"),value:g||nd(D.length),onChange:G,min:1,max:Math.min(8,D.length),required:!0,__next40pxDefaultSize:!0})}),R?.length>0&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Resolution"),hasValue:()=>f!==Fu,onDeselect:()=>W(Fu),children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Resolution"),help:(0,pt.__)("Select the size of the source images."),value:f,options:R,onChange:W,hideCancelButton:!0,size:"__unstable-large"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Crop images to fit"),hasValue:()=>!h,onDeselect:()=>t({imageCrop:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Crop images to fit"),checked:!!h,onChange:$})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Randomize order"),hasValue:()=>!!_,onDeselect:()=>t({randomOrder:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Randomize order"),checked:!!_,onChange:U})}),re&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Open images in new tab"),hasValue:()=>!!x,onDeselect:()=>q(!1),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open images in new tab"),checked:"_blank"===x,onChange:q})}),H.length>1&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!y&&"auto"!==y,label:(0,pt.__)("Aspect ratio"),onDeselect:()=>Z("auto"),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect ratio"),help:(0,pt.__)("Set a consistent aspect ratio for all images in the gallery."),value:y,options:H,onChange:Z})})]}),gt.Platform.isNative&&(0,it.jsxs)(mt.PanelBody,{title:(0,pt.__)("Settings"),children:[D.length>1&&(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Columns"),value:g||nd(D.length),onChange:G,min:1,max:Math.min(8,D.length),...jd,required:!0,__next40pxDefaultSize:!0}),R?.length>0&&(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Resolution"),help:(0,pt.__)("Select the size of the source images."),value:f,options:R,onChange:W,hideCancelButton:!0,size:"__unstable-large"}),(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link"),value:b,onChange:O,options:m,hideCancelButton:!0,size:"__unstable-large"}),(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Crop images to fit"),checked:!!h,onChange:$}),(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Randomize order"),checked:!!_,onChange:U}),re&&(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open images in new tab"),checked:"_blank"===x,onChange:q}),H.length>1&&(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect Ratio"),help:(0,pt.__)("Set a consistent aspect ratio for all images in the gallery."),value:y,options:H,onChange:Z,hideCancelButton:!0,size:"__unstable-large"})]})]}),gt.Platform.isWeb?(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:gn,label:(0,pt.__)("Link"),children:({onClose:e})=>(0,it.jsx)(mt.MenuGroup,{children:m.map((t=>{const o=b===t.value;return(0,it.jsx)(mt.MenuItem,{isSelected:o,className:Dt("components-dropdown-menu__menu-item",{"is-active":o}),iconPosition:"left",icon:t.icon,onClick:()=>{O(t.value),e()},role:"menuitemradio",info:t.infoText,children:t.label},t.value)}))})})}):null,gt.Platform.isWeb&&(0,it.jsxs)(it.Fragment,{children:[!I&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{allowedTypes:wd,accept:"image/*",handleUpload:!1,onSelect:E,name:(0,pt.__)("Add"),multiple:!0,mediaIds:D.filter((e=>e.id)).map((e=>e.id)),addToGallery:Q})}),(0,it.jsx)(vd,{blockGap:o.style?.spacing?.blockGap,clientId:r})]}),(0,it.jsx)(xd,{...e,isContentLocked:s,images:D,mediaPlaceholder:!J||gt.Platform.isNative?X:void 0,blockProps:oe,insertBlocksAfter:i,multiGallerySelection:I})]})},save:function({attributes:e}){const{caption:t,columns:o,imageCrop:n}=e,r=Dt("has-nested-images",{[`columns-${o}`]:void 0!==o,"columns-default":void 0===o,"is-cropped":n}),a=ct.useBlockProps.save({className:r}),i=ct.useInnerBlocksProps.save(a);return(0,it.jsxs)("figure",{...i,children:[i.children,!ct.RichText.isEmpty(t)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",className:Dt("blocks-gallery-caption",(0,ct.__experimentalGetElementClassName)("caption")),value:t})]})},deprecated:Xu},Md=()=>jt({name:Id,metadata:Td,settings:Dd}),zd=e=>{if(e.tagName||(e={...e,tagName:"div"}),!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:o,customBackgroundColor:n,...r}=e;return{...r,style:t}},Ad=[{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{__experimentalOnEnter:!0,__experimentalSettings:!0,align:["wide","full"],anchor:!0,ariaLabel:!0,html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:["top","bottom"],padding:!0,blockGap:!0,__experimentalDefaultControls:{padding:!0,blockGap:!0}},__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},layout:!0},save:({attributes:{tagName:e}})=>(0,it.jsx)(e,{...ct.useInnerBlocksProps.save(ct.useBlockProps.save())}),isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate:e=>{const{layout:t=null}=e;if(t?.inherit||t?.contentSize)return{...e,layout:{...t,type:"constrained"}}}},{attributes:{tagName:{type:"string",default:"div"},templateLock:{type:["string","boolean"],enum:["all","insert",!1]}},supports:{align:["wide","full"],anchor:!0,color:{gradients:!0,link:!0},spacing:{padding:!0},__experimentalBorder:{radius:!0}},save({attributes:e}){const{tagName:t}=e;return(0,it.jsx)(t,{...ct.useBlockProps.save(),children:(0,it.jsx)("div",{className:"wp-block-group__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:zd,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,textColor:n,customTextColor:r}=e,a=(0,ct.getColorClassName)("background-color",t),i=(0,ct.getColorClassName)("color",n),s=Dt(a,i,{"has-text-color":n||r,"has-background":t||o}),l={backgroundColor:a?void 0:o,color:i?void 0:r};return(0,it.jsx)("div",{className:s,style:l,children:(0,it.jsx)("div",{className:"wp-block-group__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}},migrate:zd,supports:{align:["wide","full"],anchor:!0,html:!1},save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,textColor:n,customTextColor:r}=e,a=(0,ct.getColorClassName)("background-color",t),i=(0,ct.getColorClassName)("color",n),s=Dt(a,{"has-text-color":n||r,"has-background":t||o}),l={backgroundColor:a?void 0:o,color:i?void 0:r};return(0,it.jsx)("div",{className:s,style:l,children:(0,it.jsx)("div",{className:"wp-block-group__inner-container",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})})}},{attributes:{backgroundColor:{type:"string"},customBackgroundColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1},migrate:zd,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o}=e,n=(0,ct.getColorClassName)("background-color",t),r=Dt(n,{"has-background":t||o}),a={backgroundColor:n?void 0:o};return(0,it.jsx)("div",{className:r,style:a,children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];var Ld=Ad;const Hd=(e="group")=>{const t={group:(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Z"})}),"group-row":(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10Z"})}),"group-stack":(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm0 17a2 2 0 0 1 2-2h44a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Z"})}),"group-grid":(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M0 10a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V10Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V10ZM0 27a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V27Zm25 0a2 2 0 0 1 2-2h19a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H27a2 2 0 0 1-2-2V27Z"})})};return t?.[e]};var Rd=function({name:e,onSelect:t}){const o=(0,lt.useSelect)((t=>t(st.store).getBlockVariations(e,"block")),[e]),n=(0,ct.useBlockProps)({className:"wp-block-group__placeholder"});return(0,gt.useEffect)((()=>{o&&1===o.length&&t(o[0])}),[t,o]),(0,it.jsx)("div",{...n,children:(0,it.jsx)(mt.Placeholder,{instructions:(0,pt.__)("Group blocks together. Select a layout:"),children:(0,it.jsx)("ul",{role:"list",className:"wp-block-group-placeholder__variations","aria-label":(0,pt.__)("Block variations"),children:o.map((e=>(0,it.jsx)("li",{children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:Hd(e.name),iconSize:48,onClick:()=>t(e),className:"wp-block-group-placeholder__variation-button",label:`${e.title}: ${e.description}`})},e.name)))})})})};const{HTMLElementControl:Vd}=jo(ct.privateApis);function Fd({tagName:e,onSelectTagName:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Vd,{tagName:e,onChange:t,clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"}]})})}var Ed=function({attributes:e,name:t,setAttributes:o,clientId:n}){const{hasInnerBlocks:r,themeSupportsLayout:a}=(0,lt.useSelect)((e=>{const{getBlock:t,getSettings:o}=e(ct.store),r=t(n);return{hasInnerBlocks:!(!r||!r.innerBlocks.length),themeSupportsLayout:o()?.supportsLayout}}),[n]),{tagName:i="div",templateLock:s,allowedBlocks:l,layout:c={}}=e,{type:u="default"}=c,d=a||"flex"===u||"grid"===u,p=(0,gt.useRef)(),m=(0,ct.useBlockProps)({ref:p}),[g,h]=function({attributes:e={style:void 0,backgroundColor:void 0,textColor:void 0,fontSize:void 0},usedLayoutType:t="",hasInnerBlocks:o=!1}){const{style:n,backgroundColor:r,textColor:a,fontSize:i}=e,[s,l]=(0,gt.useState)(!(o||r||i||a||n||"flex"===t||"grid"===t));return(0,gt.useEffect)((()=>{(o||r||i||a||n||"flex"===t)&&l(!1)}),[r,i,a,n,t,o]),[s,l]}({attributes:e,usedLayoutType:u,hasInnerBlocks:r});let _;g?_=!1:r||(_=ct.InnerBlocks.ButtonBlockAppender);const x=(0,ct.useInnerBlocksProps)(d?m:{className:"wp-block-group__inner-container"},{dropZoneElement:p.current,templateLock:s,allowedBlocks:l,renderAppender:_}),{selectBlock:b}=(0,lt.useDispatch)(ct.store);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Fd,{tagName:i,onSelectTagName:e=>o({tagName:e}),clientId:n}),g&&(0,it.jsxs)(St.View,{children:[x.children,(0,it.jsx)(Rd,{name:t,onSelect:e=>{o(e.attributes),b(n,-1),h(!1)}})]}),d&&!g&&(0,it.jsx)(i,{...x}),!d&&!g&&(0,it.jsx)(i,{...m,children:(0,it.jsx)("div",{...x})})]})};const Od=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/group","title":"Group","category":"design","description":"Gather blocks in a layout container.","keywords":["container","wrapper","row","section"],"textdomain":"default","attributes":{"tagName":{"type":"string","default":"div"},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"supports":{"__experimentalOnEnter":true,"__experimentalOnMerge":true,"__experimentalSettings":true,"align":["wide","full"],"anchor":true,"ariaLabel":true,"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"heading":true,"button":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"shadow":true,"spacing":{"margin":["top","bottom"],"padding":true,"blockGap":true,"__experimentalDefaultControls":{"padding":true,"blockGap":true}},"dimensions":{"minHeight":true},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"position":{"sticky":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"layout":{"allowSizingOnChildren":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-group-editor","style":"wp-block-group"}');var Gd={from:[{type:"block",isMultiBlock:!0,blocks:["*"],__experimentalConvert(e){const t=["wide","full"],o=e.reduce(((e,o)=>{const{align:n}=o.attributes;return t.indexOf(n)>t.indexOf(e)?n:e}),void 0),n=e.map((e=>(0,st.createBlock)(e.name,e.attributes,e.innerBlocks)));return(0,st.createBlock)("core/group",{align:o,layout:{type:"constrained"}},n)}}]},$d=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),Ud=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})}),qd=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m3 5c0-1.10457.89543-2 2-2h13.5c1.1046 0 2 .89543 2 2v13.5c0 1.1046-.8954 2-2 2h-13.5c-1.10457 0-2-.8954-2-2zm2-.5h6v6.5h-6.5v-6c0-.27614.22386-.5.5-.5zm-.5 8v6c0 .2761.22386.5.5.5h6v-6.5zm8 0v6.5h6c.2761 0 .5-.2239.5-.5v-6zm0-8v6.5h6.5v-6c0-.27614-.2239-.5-.5-.5z",fillRule:"evenodd",clipRule:"evenodd"})});const Wd={innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("One.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Two.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Three.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Four.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Five.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("Six.")}}]};var Zd=[{name:"group",title:(0,pt.__)("Group"),description:(0,pt.__)("Gather blocks in a container."),attributes:{layout:{type:"constrained"}},isDefault:!0,scope:["block","inserter","transform"],icon:Su},{name:"group-row",title:(0,pt._x)("Row","single horizontal line"),description:(0,pt.__)("Arrange blocks horizontally."),attributes:{layout:{type:"flex",flexWrap:"nowrap"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:$d,example:Wd},{name:"group-stack",title:(0,pt.__)("Stack"),description:(0,pt.__)("Arrange blocks vertically."),attributes:{layout:{type:"flex",orientation:"vertical"}},scope:["block","inserter","transform"],isActive:["layout.type","layout.orientation"],icon:Ud,example:Wd},{name:"group-grid",title:(0,pt.__)("Grid"),description:(0,pt.__)("Arrange blocks in a grid."),attributes:{layout:{type:"grid"}},scope:["block","inserter","transform"],isActive:["layout.type"],icon:qd,example:Wd}];const{name:Jd}=Od,Qd={icon:Su,example:{attributes:{layout:{type:"constrained",justifyContent:"center"},style:{spacing:{padding:{top:"4em",right:"3em",bottom:"4em",left:"3em"}}}},innerBlocks:[{name:"core/heading",attributes:{content:(0,pt.__)("La Mancha"),textAlign:"center"}},{name:"core/paragraph",attributes:{align:"center",content:(0,pt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},{name:"core/spacer",attributes:{height:"10px"}},{name:"core/button",attributes:{text:(0,pt.__)("Read more")}}],viewportWidth:600},transforms:Gd,edit:Ed,save:function({attributes:{tagName:e}}){return(0,it.jsx)(e,{...ct.useInnerBlocksProps.save(ct.useBlockProps.save())})},deprecated:Ld,variations:Zd},Kd=()=>jt({name:Jd,metadata:Od,settings:Qd});var Yd=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6 5V18.5911L12 13.8473L18 18.5911V5H6Z"})});const Xd={className:!1,anchor:!0},ep={align:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:""},level:{type:"number",default:2},placeholder:{type:"string"}},tp=e=>{if(!e.customTextColor)return e;const t={color:{text:e.customTextColor}},{customTextColor:o,...n}=e;return{...n,style:t}},op=["left","right","center"],np=e=>{const{align:t,...o}=e;return op.includes(t)?{...o,textAlign:t}:e},rp={supports:Xd,attributes:{...ep,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>tp(np(e)),save({attributes:e}){const{align:t,level:o,content:n,textColor:r,customTextColor:a}=e,i="h"+o,s=(0,ct.getColorClassName)("color",r),l=Dt({[s]:s});return(0,it.jsx)(ct.RichText.Content,{className:l||void 0,tagName:i,style:{textAlign:t,color:s?void 0:a},value:n})}},ap={attributes:{...ep,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>tp(np(e)),save({attributes:e}){const{align:t,content:o,customTextColor:n,level:r,textColor:a}=e,i="h"+r,s=(0,ct.getColorClassName)("color",a),l=Dt({[s]:s,[`has-text-align-${t}`]:t});return(0,it.jsx)(ct.RichText.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:n},value:o})},supports:Xd},ip={supports:Xd,attributes:{...ep,customTextColor:{type:"string"},textColor:{type:"string"}},migrate:e=>tp(np(e)),save({attributes:e}){const{align:t,content:o,customTextColor:n,level:r,textColor:a}=e,i="h"+r,s=(0,ct.getColorClassName)("color",a),l=Dt({[s]:s,"has-text-color":a||n,[`has-text-align-${t}`]:t});return(0,it.jsx)(ct.RichText.Content,{className:l||void 0,tagName:i,style:{color:s?void 0:n},value:o})}},sp={supports:{align:["wide","full"],anchor:!0,className:!1,color:{link:!0},fontSize:!0,lineHeight:!0,__experimentalSelector:{"core/heading/h1":"h1","core/heading/h2":"h2","core/heading/h3":"h3","core/heading/h4":"h4","core/heading/h5":"h5","core/heading/h6":"h6"},__unstablePasteTextInline:!0},attributes:ep,isEligible:({align:e})=>op.includes(e),migrate:np,save({attributes:e}){const{align:t,content:o,level:n}=e,r="h"+n,a=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)(r,{...ct.useBlockProps.save({className:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},lp={supports:{align:["wide","full"],anchor:!0,className:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0,textTransform:!0}},__experimentalSelector:"h1,h2,h3,h4,h5,h6",__unstablePasteTextInline:!0,__experimentalSlashInserter:!0},attributes:{textAlign:{type:"string"},content:{type:"string",source:"html",selector:"h1,h2,h3,h4,h5,h6",default:"",role:"content"},level:{type:"number",default:2},placeholder:{type:"string"}},save({attributes:e}){const{textAlign:t,content:o,level:n}=e,r="h"+n,a=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)(r,{...ct.useBlockProps.save({className:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}};var cp=[lp,sp,ip,ap,rp];const up={},dp=e=>su()((e=>{const t=document.createElement("div");return t.innerHTML=e,t.innerText})(e)).replace(/[^\p{L}\p{N}]+/gu,"-").toLowerCase().replace(/(^-+)|(-+$)/g,""),pp=(e,t)=>{const o=dp(t);if(""===o)return null;delete up[e];let n=o,r=0;for(;Object.values(up).includes(n);)r+=1,n=o+"-"+r;return n},mp=(e,t)=>{up[e]=t};var gp=function({attributes:e,setAttributes:t,mergeBlocks:o,onReplace:n,style:r,clientId:a}){const{textAlign:i,content:s,level:l,levelOptions:c,placeholder:u,anchor:d}=e,p="h"+l,m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i}),style:r}),g=(0,ct.useBlockEditingMode)(),{canGenerateAnchors:h}=(0,lt.useSelect)((e=>{const{getGlobalBlockCount:t,getSettings:o}=e(ct.store);return{canGenerateAnchors:!!o().generateAnchors||t("core/table-of-contents")>0}}),[]),{__unstableMarkNextChangeAsNotPersistent:_}=(0,lt.useDispatch)(ct.store);return(0,gt.useEffect)((()=>{if(h)return!d&&s&&(_(),t({anchor:pp(a,s)})),mp(a,d),()=>mp(a,null)}),[d,s,a,h]),(0,it.jsxs)(it.Fragment,{children:["default"===g&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:l,options:c,onChange:e=>t({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:i,onChange:e=>{t({textAlign:e})}})]}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:p,value:s,onChange:e=>{const o={content:e};!h||d&&e&&pp(a,s)!==d||(o.anchor=pp(a,e)),t(o)},onMerge:o,onReplace:n,onRemove:()=>n([]),placeholder:u||(0,pt.__)("Heading"),textAlign:i,...gt.Platform.isNative&&{deleteEnter:!0},...m})]})};const hp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/heading","title":"Heading","category":"text","description":"Introduce new sections and organize content to help visitors (and search engines) understand the structure of your content.","keywords":["title","subtitle"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"h1,h2,h3,h4,h5,h6","role":"content"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"placeholder":{"type":"string"}},"supports":{"align":["wide","full"],"anchor":true,"className":true,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__unstablePasteTextInline":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-heading-editor","style":"wp-block-heading"}');const _p={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{const{content:t,anchor:o,align:n}=e;return(0,st.createBlock)("core/heading",{...Nn(e,"core/heading",(({content:e})=>({content:e}))),content:t,anchor:o,textAlign:n})}))},{type:"raw",selector:"h1,h2,h3,h4,h5,h6",schema:({phrasingContentSchema:e,isPaste:t})=>{const o={children:e,attributes:t?[]:["style","id"]};return{h1:o,h2:o,h3:o,h4:o,h5:o,h6:o}},transform(e){const t=(0,st.getBlockAttributes)("core/heading",e.outerHTML),{textAlign:o}=e.style||{};var n;return t.level=(n=e.nodeName,Number(n.substr(1))),"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,st.createBlock)("core/heading",t)}},...[1,2,3,4,5,6].map((e=>({type:"prefix",prefix:Array(e+1).join("#"),transform:t=>(0,st.createBlock)("core/heading",{level:e,content:t})}))),...[1,2,3,4,5,6].map((e=>({type:"enter",regExp:new RegExp(`^/(h|H)${e}$`),transform:()=>(0,st.createBlock)("core/heading",{level:e})})))],to:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>e.map((e=>{const{content:t,textAlign:o}=e;return(0,st.createBlock)("core/paragraph",{...Nn(e,"core/paragraph",(({content:e})=>({content:e}))),content:t,align:o})}))}]};var xp=_p;const{name:bp}=hp,fp={icon:Yd,example:{attributes:{content:(0,pt.__)("Code is Poetry"),level:2,textAlign:"center"}},__experimentalLabel(e,{context:t}){const{content:o,level:n}=e,r=e?.metadata?.name,a=o?.trim().length>0;return"list-view"===t&&(r||a)?r||o:"accessibility"===t?a?(0,pt.sprintf)((0,pt.__)("Level %1$s. %2$s"),n,o):(0,pt.sprintf)((0,pt.__)("Level %s. Empty."),n):void 0},transforms:xp,deprecated:cp,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:gp,save:function({attributes:e}){const{textAlign:t,content:o,level:n}=e,r="h"+n,a=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)(r,{...ct.useBlockProps.save({className:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},yp=()=>jt({name:bp,metadata:hp,settings:fp});var vp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})});const kp=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/home-link","category":"design","parent":["core/navigation"],"title":"Home Link","description":"Create a link that always points to the homepage of the site. Usually not necessary if there is already a site title link present in the header.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","fontSize","customFontSize","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-home-link-editor","style":"wp-block-home-link"}'),wp=e=>e.preventDefault();const{name:Cp}=kp,jp={icon:vp,edit:function({attributes:e,setAttributes:t,context:o}){const n=(0,lt.useSelect)((e=>e(_t.store).getEntityRecord("root","__unstableBase")?.home),[]),{textColor:r,backgroundColor:a,style:i}=o,s=(0,ct.useBlockProps)({className:Dt("wp-block-navigation-item",{"has-text-color":!!r||!!i?.color?.text,[`has-${r}-color`]:!!r,"has-background":!!a||!!i?.color?.background,[`has-${a}-background-color`]:!!a}),style:{color:i?.color?.text,backgroundColor:i?.color?.background}});return(0,it.jsx)("div",{...s,children:(0,it.jsx)("a",{className:"wp-block-home-link__content wp-block-navigation-item__content",href:n,onClick:wp,children:(0,it.jsx)(ct.RichText,{identifier:"label",className:"wp-block-home-link__label",value:e.label??(0,pt.__)("Home"),onChange:e=>{t({label:e})},"aria-label":(0,pt.__)("Home link text"),placeholder:(0,pt.__)("Add home link"),withoutInteractiveFormatting:!0})})})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{attributes:{label:(0,pt._x)("Home Link","block example")}}},Sp=()=>jt({name:Cp,metadata:kp,settings:jp});var Bp=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4.8 11.4H2.1V9H1v6h1.1v-2.6h2.7V15h1.1V9H4.8v2.4zm1.9-1.3h1.7V15h1.1v-4.9h1.7V9H6.7v1.1zM16.2 9l-1.5 2.7L13.3 9h-.9l-.8 6h1.1l.5-4 1.5 2.8 1.5-2.8.5 4h1.1L17 9h-.8zm3.8 5V9h-1.1v6h3.6v-1H20z"})});function Tp({content:e,isSelected:t}){const o=(0,lt.useSelect)((e=>e(ct.store).getSettings().styles),[]),n=(0,gt.useMemo)((()=>["\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n",...(0,ct.transformStyles)((o??[]).filter((e=>e.css)))]),[o]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.SandBox,{html:e,styles:n,title:(0,pt.__)("Custom HTML Preview"),tabIndex:-1}),!t&&(0,it.jsx)("div",{className:"block-library-html__preview-overlay"})]})}const Np=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/html","title":"Custom HTML","category":"widgets","description":"Add custom HTML code and preview it as you edit.","keywords":["embed"],"textdomain":"default","attributes":{"content":{"type":"string","source":"raw","role":"content"}},"supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-html-editor"}');var Pp={from:[{type:"block",blocks:["core/code"],transform:({content:e})=>(0,st.createBlock)("core/html",{content:(0,Tn.create)({html:e}).text})}]};const{name:Ip}=Np,Dp={icon:Bp,example:{attributes:{content:"<marquee>"+(0,pt.__)("Welcome to the wonderful world of blocks…")+"</marquee>"}},edit:function e({attributes:t,setAttributes:o,isSelected:n}){const[r,a]=(0,gt.useState)(),i=(0,gt.useContext)(mt.Disabled.Context),s=(0,xt.useInstanceId)(e,"html-edit-desc"),l=(0,lt.useSelect)((e=>e(ct.store).getSettings().isPreviewMode),[]),c=(0,ct.useBlockProps)({className:"block-library-html__edit","aria-describedby":r?s:void 0});return(0,it.jsxs)("div",{...c,children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{isPressed:!r,onClick:function(){a(!1)},children:"HTML"}),(0,it.jsx)(mt.ToolbarButton,{isPressed:r,onClick:function(){a(!0)},children:(0,pt.__)("Preview")})]})}),r||l||i?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Tp,{content:t.content,isSelected:n}),(0,it.jsx)(mt.VisuallyHidden,{id:s,children:(0,pt.__)("HTML preview is not yet fully accessible. Please switch screen reader to virtualized mode to navigate the below iFrame.")})]}):(0,it.jsx)(ct.PlainText,{value:t.content,onChange:e=>o({content:e}),placeholder:(0,pt.__)("Write HTML…"),"aria-label":(0,pt.__)("HTML")})]})},save:function({attributes:e}){return(0,it.jsx)(gt.RawHTML,{children:e.content})},transforms:Pp},Mp=()=>jt({name:Ip,metadata:Np,settings:Dp}),zp={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,width:i,height:s}=e,l=i||s?{width:i,height:s}:{},c=(0,it.jsx)("img",{src:t,alt:o,...l});let u={};return i?u={width:i}:"left"!==r&&"right"!==r||(u={maxWidth:"50%"}),(0,it.jsxs)("figure",{className:r?`align${r}`:null,style:u,children:[a?(0,it.jsx)("a",{href:a,children:c}):c,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]})}},Ap={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,width:i,height:s,id:l}=e,c=(0,it.jsx)("img",{src:t,alt:o,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,it.jsxs)("figure",{className:r?`align${r}`:null,children:[a?(0,it.jsx)("a",{href:a,children:c}):c,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]})}},Lp={attributes:{url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"array",source:"children",selector:"figcaption"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},id:{type:"number"},align:{type:"string"},width:{type:"number"},height:{type:"number"},linkDestination:{type:"string",default:"none"}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,width:i,height:s,id:l}=e,c=Dt({[`align${r}`]:r,"is-resized":i||s}),u=(0,it.jsx)("img",{src:t,alt:o,className:l?`wp-image-${l}`:null,width:i,height:s});return(0,it.jsxs)("figure",{className:c,children:[a?(0,it.jsx)("a",{href:a,children:u}):u,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]})}},Hp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,g=i||void 0,h=Dt({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":l||c}),_=(0,it.jsx)("img",{src:t,alt:o,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),x=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:d,rel:g,children:_}):_,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]});return"left"===r||"right"===r||"center"===r?(0,it.jsx)("div",{...ct.useBlockProps.save(),children:(0,it.jsx)("figure",{className:h,children:x})}):(0,it.jsx)("figure",{...ct.useBlockProps.save({className:h}),children:x})}},Rp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},title:{type:"string",source:"attribute",selector:"img",attribute:"title"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number"},width:{type:"number"},height:{type:"number"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{__experimentalDuotone:"img",text:!1,background:!1},__experimentalBorder:{radius:!0,__experimentalDefaultControls:{radius:!0}},__experimentalStyle:{spacing:{margin:"0 0 1em 0"}}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,id:u,linkTarget:d,sizeSlug:p,title:m}=e,g=i||void 0,h=Dt({[`align${r}`]:r,[`size-${p}`]:p,"is-resized":l||c}),_=(0,it.jsx)("img",{src:t,alt:o,className:u?`wp-image-${u}`:null,width:l,height:c,title:m}),x=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:d,rel:g,children:_}):_,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:h}),children:x})}},Vp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate(e){const{height:t,width:o}=e;return{...e,width:"number"==typeof o?`${o}px`:o,height:"number"==typeof t?`${t}px`:t}},save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,_=i||void 0,x=(0,ct.__experimentalGetBorderClassesAndStyles)(e),b=Dt({[`align${r}`]:r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!x.className||x.style&&Object.keys(x.style).length>0}),f=Dt(x.className,{[`wp-image-${p}`]:!!p}),y=(0,it.jsx)("img",{src:t,alt:o,className:f||void 0,style:{...x.style,aspectRatio:u,objectFit:d},width:l,height:c,title:h}),v=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:_,children:y}):y,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:b}),children:v})}},Fp={attributes:{align:{type:"string"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"number"},height:{type:"number"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate:({width:e,height:t,...o})=>({...o,width:`${e}px`,height:`${t}px`}),save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,_=i||void 0,x=(0,ct.__experimentalGetBorderClassesAndStyles)(e),b=Dt({[`align${r}`]:r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!x.className||x.style&&Object.keys(x.style).length>0}),f=Dt(x.className,{[`wp-image-${p}`]:!!p}),y=(0,it.jsx)("img",{src:t,alt:o,className:f||void 0,style:{...x.style,aspectRatio:u,objectFit:d,width:l,height:c},width:l,height:c,title:h}),v=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:_,children:y}):y,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:b}),children:v})}},Ep={attributes:{align:{type:"string"},behaviors:{type:"object"},url:{type:"string",source:"attribute",selector:"img",attribute:"src",role:"content"},alt:{type:"string",source:"attribute",selector:"img",attribute:"alt",default:"",role:"content"},caption:{type:"string",source:"html",selector:"figcaption",role:"content"},title:{type:"string",source:"attribute",selector:"img",attribute:"title",role:"content"},href:{type:"string",source:"attribute",selector:"figure > a",attribute:"href",role:"content"},rel:{type:"string",source:"attribute",selector:"figure > a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure > a",attribute:"class"},id:{type:"number",role:"content"},width:{type:"string"},height:{type:"string"},aspectRatio:{type:"string"},scale:{type:"string"},sizeSlug:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure > a",attribute:"target"}},supports:{anchor:!0,color:{text:!1,background:!1},filter:{duotone:!0},__experimentalBorder:{color:!0,radius:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,radius:!0,width:!0}}},migrate({width:e,height:t,...o}){if(!o.behaviors?.lightbox)return o;const{behaviors:{lightbox:{enabled:n}}}=o,r={...o,lightbox:{enabled:n}};return delete r.behaviors,r},isEligible:e=>!!e.behaviors,save({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h}=e,_=i||void 0,x=(0,ct.__experimentalGetBorderClassesAndStyles)(e),b=Dt({[`align${r}`]:r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!x.className||x.style&&Object.keys(x.style).length>0}),f=Dt(x.className,{[`wp-image-${p}`]:!!p}),y=(0,it.jsx)("img",{src:t,alt:o,className:f||void 0,style:{...x.style,aspectRatio:u,objectFit:d,width:l,height:c},title:h}),v=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:_,children:y}):y,!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:b}),children:v})}};var Op=[Ep,Fp,Vp,Rp,Hp,Lp,Ap,zp],Gp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),$p=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})}),Up=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 20v-2h2v-1.5H7.75a.25.25 0 0 1-.25-.25V4H6v2H4v1.5h2v8.75c0 .966.784 1.75 1.75 1.75h8.75v2H18ZM9.273 7.5h6.977a.25.25 0 0 1 .25.25v6.977H18V7.75A1.75 1.75 0 0 0 16.25 6H9.273v1.5Z"})}),qp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12-9.8c.4 0 .8-.3.9-.7l1.1-3h3.6l.5 1.7h1.9L13 9h-2.2l-3.4 9.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12H20V6c0-1.1-.9-2-2-2zm-6 7l1.4 3.9h-2.7L12 11z"})}),Wp=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})});const{DimensionsTool:Zp,ResolutionTool:Jp}=jo(ct.privateApis),Qp=[{value:"cover",label:(0,pt._x)("Cover","Scale option for dimensions control"),help:(0,pt.__)("Image covers the space evenly.")},{value:"contain",label:(0,pt._x)("Contain","Scale option for dimensions control"),help:(0,pt.__)("Image is contained without distortion.")}],Kp={placement:"bottom-start"},Yp=({href:e,children:t})=>e?(0,it.jsx)("a",{href:e,onClick:e=>e.preventDefault(),"aria-disabled":!0,style:{pointerEvents:"none",cursor:"default",display:"inline"},children:t}):t;function Xp({attributes:e,setAttributes:t,lockAltControls:o,lockAltControlsMessage:n,lockTitleControls:r,lockTitleControlsMessage:a}){const[i,s]=(0,gt.useState)(null),[l,c]=(0,gt.useState)(!1),[u,d]=(0,gt.useState)(!1);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ToolbarItem,{ref:s,children:e=>(0,it.jsx)(mt.DropdownMenu,{icon:$p,label:(0,pt.__)("More"),toggleProps:{...e,description:(0,pt.__)("Displays more controls.")},popoverProps:Kp,children:({onClose:e})=>(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.MenuItem,{onClick:()=>{c(!0),e()},"aria-haspopup":"dialog",children:(0,pt._x)("Alternative text","Alternative text for an image. Block toolbar label, a low character count is preferred.")}),(0,it.jsx)(mt.MenuItem,{onClick:()=>{d(!0),e()},"aria-haspopup":"dialog",children:(0,pt.__)("Title text")})]})})}),l&&(0,it.jsx)(mt.Popover,{placement:"bottom-start",anchor:i,onClose:()=>c(!1),offset:13,variant:"toolbar",children:(0,it.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,it.jsx)(mt.TextareaControl,{className:"wp-block-image__toolbar_content_textarea",label:(0,pt.__)("Alternative text"),value:e.alt||"",onChange:e=>t({alt:e}),disabled:o,help:o?(0,it.jsx)(it.Fragment,{children:n}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]}),__nextHasNoMarginBottom:!0})})}),u&&(0,it.jsx)(mt.Popover,{placement:"bottom-start",anchor:i,onClose:()=>d(!1),offset:13,variant:"toolbar",children:(0,it.jsx)("div",{className:"wp-block-image__toolbar_content_textarea__container",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,className:"wp-block-image__toolbar_content_textarea",__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title attribute"),value:e.title||"",onChange:e=>t({title:e}),disabled:r,help:r?(0,it.jsx)(it.Fragment,{children:a}):(0,it.jsxs)(it.Fragment,{children:[(0,pt.__)("Describe the role of this image on the page."),(0,it.jsx)(mt.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute",children:(0,pt.__)("(Note: many devices and browsers do not display this text.)")})]})})})})]})}function em({temporaryURL:e,attributes:t,setAttributes:o,isSingleSelected:n,insertBlocksAfter:r,onReplace:a,onSelectImage:i,onSelectURL:s,onUploadError:l,context:c,clientId:u,blockEditingMode:d,parentLayoutType:p,maxContentWidth:m}){const{url:g="",alt:h,align:_,id:x,href:b,rel:f,linkClass:y,linkDestination:v,title:k,width:w,height:C,aspectRatio:j,scale:S,linkTarget:B,sizeSlug:T,lightbox:N,metadata:P}=t,[I,D]=(0,gt.useState)(),[M,z]=(0,gt.useState)(null),[A,L]=(0,gt.useState)({}),[H,R]=(0,gt.useState)(0),V=(0,xt.useResizeObserver)((([e])=>{if(!M){const[t]=e.borderBoxSize;L({width:t.inlineSize,height:t.blockSize})}R(e.target.offsetTop)})),F=(0,gt.useCallback)((()=>{R(I?.offsetTop??0)}),[I]),E=(0,xt.useMergeRefs)([D,V]),{allowResize:O=!0}=c,G=(0,lt.useSelect)((e=>x&&n?e(_t.store).getEntityRecord("postType","attachment",x,{context:"view"}):null),[x,n]),{canInsertCover:$,imageEditing:U,imageSizes:q,maxWidth:W}=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:o,getSettings:n}=e(ct.store),r=t(u),a=n();return{imageEditing:a.imageEditing,imageSizes:a.imageSizes,maxWidth:a.maxWidth,canInsertCover:o("core/cover",r)}}),[u]),{getBlock:Z,getSettings:J}=(0,lt.useSelect)(ct.store),{replaceBlocks:Q,toggleSelection:K}=(0,lt.useDispatch)(ct.store),{createErrorNotice:Y,createSuccessNotice:X}=(0,lt.useDispatch)(bo.store),{editEntityRecord:ee}=(0,lt.useDispatch)(_t.store),te=(0,xt.useViewportMatch)("medium"),oe=["wide","full"].includes(_),[{loadedNaturalWidth:ne,loadedNaturalHeight:re},ae]=(0,gt.useState)({}),[ie,se]=(0,gt.useState)(!1),[le,ce]=(0,gt.useState)(),[ue,de]=(0,gt.useState)(!1),pe="default"===d,me="contentOnly"===d,ge=O&&pe&&!oe&&te,he=q.filter((({slug:e})=>G?.media_details?.sizes?.[e]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));(0,gt.useEffect)((()=>{tm(x,g)&&n&&J().mediaUpload?le||window.fetch(g.includes("?")?g:g+"?").then((e=>e.blob())).then((e=>ce(e))).catch((()=>{})):ce()}),[x,g,n,le,J]);const{naturalWidth:_e,naturalHeight:xe}=(0,gt.useMemo)((()=>({naturalWidth:I?.naturalWidth||ne||void 0,naturalHeight:I?.naturalHeight||re||void 0})),[ne,re,I?.complete]);function be(e){const t=G?.media_details?.sizes?.[e]?.source_url;if(!t)return null;o({url:t,sizeSlug:e})}(0,gt.useEffect)((()=>{n||se(!1)}),[n]);const fe=x&&_e&&xe&&U,ye=n&&fe&&!ie&&!me;const ve=(0,mt.__experimentalUseCustomUnits)({availableUnits:["px"]}),[ke]=(0,ct.useSettings)("lightbox"),we=!!N&&N?.enabled!==ke?.enabled||ke?.allowEditing,Ce=!!N?.enabled||!N&&!!ke?.enabled,je=vt(),Se=ge&&(pd.includes(p)?(0,it.jsx)(Zp,{value:{aspectRatio:j},onChange:({aspectRatio:e})=>{o({aspectRatio:e,scale:"cover"})},defaultAspectRatio:"auto",tools:["aspectRatio"]}):(0,it.jsx)(Zp,{value:{width:w,height:C,scale:S,aspectRatio:j},onChange:({width:e,height:t,scale:n,aspectRatio:r})=>{o({width:!e&&t?"auto":e,height:t,scale:n,aspectRatio:r})},defaultScale:"cover",defaultAspectRatio:"auto",scaleOptions:Qp,unitsOptions:ve})),Be=()=>{o({alt:void 0,width:void 0,height:void 0,scale:void 0,aspectRatio:void 0,lightbox:void 0}),be(md)},Te=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:Be,dropdownMenuProps:je,children:Se})}),Ne="core/pattern-overrides"===P?.bindings?.__default?.source,{lockUrlControls:Pe=!1,lockHrefControls:Ie=!1,lockAltControls:De=!1,lockAltControlsMessage:Me,lockTitleControls:ze=!1,lockTitleControlsMessage:Ae,hideCaptionControls:Le=!1}=(0,lt.useSelect)((e=>{if(!n)return{};const{url:t,alt:o,title:r,caption:a}=P?.bindings||{},i=!!c["pattern/overrides"],s=(0,st.getBlockBindingsSource)(t?.source),l=(0,st.getBlockBindingsSource)(o?.source),u=(0,st.getBlockBindingsSource)(r?.source);return{lockUrlControls:!!t&&!s?.canUserEditValue?.({select:e,context:c,args:t?.args}),lockHrefControls:i||Ne,hideCaptionControls:!!a,lockAltControls:!!o&&!l?.canUserEditValue?.({select:e,context:c,args:o?.args}),lockAltControlsMessage:l?.label?(0,pt.sprintf)((0,pt.__)("Connected to %s"),l.label):(0,pt.__)("Connected to dynamic data"),lockTitleControls:!!r&&!u?.canUserEditValue?.({select:e,context:c,args:r?.args}),lockTitleControlsMessage:u?.label?(0,pt.sprintf)((0,pt.__)("Connected to %s"),u.label):(0,pt.__)("Connected to dynamic data")}}),[Ne,c,n,P?.bindings]),He=n&&!ie&&!Ie&&!Pe,Re=n&&$&&!me,Ve=He||ye||Re,Fe=n&&!ie&&!Pe&&(0,it.jsx)(ct.BlockControls,{group:me?"inline":"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:x,mediaURL:g,allowedTypes:dd,accept:"image/*",onSelect:i,onSelectURL:s,onError:l,name:g?(0,pt.__)("Replace"):(0,pt.__)("Add image"),onReset:()=>i(void 0)})}),Ee=(0,it.jsxs)(it.Fragment,{children:[Ve&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[He&&(0,it.jsx)(ct.__experimentalImageURLInputUI,{url:b||"",onChangeUrl:function(e){o(e)},linkDestination:v,mediaUrl:G&&G.source_url||g,mediaLink:G&&G.link,linkTarget:B,linkClass:y,rel:f,showLightboxSetting:we,lightboxEnabled:Ce,onSetLightbox:function(e){o(e&&!ke?.enabled?{lightbox:{enabled:!0}}:!e&&ke?.enabled?{lightbox:{enabled:!1}}:{lightbox:void 0})},resetLightbox:function(){o(ke?.enabled&&ke?.allowEditing?{lightbox:{enabled:!1}}:{lightbox:void 0})}}),ye&&(0,it.jsx)(mt.ToolbarButton,{onClick:()=>se(!0),icon:Up,label:(0,pt.__)("Crop")}),Re&&(0,it.jsx)(mt.ToolbarButton,{icon:qp,label:(0,pt.__)("Add text over image"),onClick:function(){Q(u,(0,st.switchToBlockType)(Z(u),"core/cover"))}})]}),n&&le&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:function(){const{mediaUpload:e}=J();e&&e({filesList:[le],onFileChange([e]){i(e),(0,ht.isBlobURL)(e.url)||(ce(),X((0,pt.__)("Image uploaded."),{type:"snackbar"}))},allowedTypes:dd,onError(e){Y(e,{type:"snackbar"})}})},icon:Wp,label:(0,pt.__)("Upload to Media Library")})})}),me&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(Xp,{attributes:t,setAttributes:o,lockAltControls:De,lockAltControlsMessage:Me,lockTitleControls:ze,lockTitleControlsMessage:Ae})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:Be,dropdownMenuProps:je,children:[n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!h,onDeselect:()=>o({alt:void 0}),children:(0,it.jsx)(mt.TextareaControl,{label:(0,pt.__)("Alternative text"),value:h||"",onChange:function(e){o({alt:e})},readOnly:De,help:De?(0,it.jsx)(it.Fragment,{children:Me}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]}),__nextHasNoMarginBottom:!0})}),Se,!!he.length&&(0,it.jsx)(Jp,{value:T,defaultValue:md,onChange:be,options:he})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Title attribute"),value:k||"",onChange:function(e){o({title:e})},readOnly:ze,help:ze?(0,it.jsx)(it.Fragment,{children:Ae}):(0,it.jsxs)(it.Fragment,{children:[(0,pt.__)("Describe the role of this image on the page."),(0,it.jsx)(mt.ExternalLink,{href:"https://www.w3.org/TR/html52/dom.html#the-title-attribute",children:(0,pt.__)("(Note: many devices and browsers do not display this text.)")})]})})})]}),Oe=(0,no.getFilename)(g);let Ge;Ge=h||(Oe?(0,pt.sprintf)((0,pt.__)("This image has an empty alt attribute; its file name is %s"),Oe):(0,pt.__)("This image has an empty alt attribute"));const $e=(0,ct.__experimentalUseBorderProps)(t),Ue=(0,ct.__experimentalGetShadowClassesAndStyles)(t),qe=t.className?.includes("is-style-rounded"),{postType:We,postId:Ze,queryId:Je}=c,Qe=Number.isFinite(Je);let Ke,Ye=e&&ue?(0,it.jsx)(mt.Placeholder,{className:"wp-block-image__placeholder",withIllustration:!0,children:(0,it.jsx)(mt.Spinner,{})}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{src:e||g,alt:Ge,onError:function(){de(!0);const e=No({attributes:{url:g}});void 0!==e&&a(e)},onLoad:function(e){de(!1),ae({loadedNaturalWidth:e.target?.naturalWidth,loadedNaturalHeight:e.target?.naturalHeight})},ref:E,className:$e.className,width:_e,height:xe,style:{aspectRatio:j,...M?{width:A.width+M.width,height:A.height+M.height}:{width:w,height:C},objectFit:S,...$e.style,...Ue.style}}),e&&(0,it.jsx)(mt.Spinner,{})]});if(Ye=fe&&ie?(0,it.jsx)(Yp,{href:b,children:(0,it.jsx)(ct.__experimentalImageEditor,{id:x,url:g,...A,naturalHeight:xe,naturalWidth:_e,onSaveImage:e=>o(e),onFinishEditing:()=>{se(!1)},borderProps:qe?void 0:$e})}):(0,it.jsx)(Yp,{href:b,children:Ye}),ge&&n&&!ie&&!pd.includes(p)){const e=j&&function(e){const[t,o=1]=e.split("/").map(Number),n=t/o;return n===1/0||0===n?NaN:n}(j),t=A.width/A.height,n=_e/xe,r=e||t||n||1,a=_e<xe?ad:ad*r,i=xe<_e?ad:ad/r,s=m||2.5*W;let l=!1,c=!1;"center"===_?(l=!0,c=!0):(0,pt.isRTL)()?"left"===_?l=!0:c=!0:"right"===_?c=!0:l=!0,Ke=(0,it.jsx)(mt.ResizableBox,{ref:F,style:{position:"absolute",inset:`${H}px 0 0 0`},size:A,minWidth:a,maxWidth:s,minHeight:i,maxHeight:s/r,lockAspectRatio:r,enable:{top:!1,right:l,bottom:!0,left:c},onResizeStart:()=>{K(!1)},onResize:(e,t,o,n)=>{z(n)},onResizeStop:(e,t,a,i)=>{K(!0),z(null),L((e=>({width:e.width+i.width,height:e.height+i.height}))),m&&_e>=m&&Math.abs(a.offsetWidth-m)<10?o({width:void 0,height:void 0}):o({width:`${a.offsetWidth}px`,height:"auto",aspectRatio:r===n?void 0:String(r)})},resizeRatio:"center"===_?2:1})}if(!g&&!e)return(0,it.jsxs)(it.Fragment,{children:[Fe,P?.bindings?Ee:Te]});const Xe=()=>{ee("postType",We,Ze,{featured_media:x}),X((0,pt.__)("Post featured image updated."),{type:"snackbar"})},et=(0,it.jsx)(ct.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1===e.length&&!Qe&&Ze&&x&&u===e[0]&&(0,it.jsx)(mt.MenuItem,{onClick:Xe,children:(0,pt.__)("Set as featured image")})});return(0,it.jsxs)(it.Fragment,{children:[Fe,Ee,et,Ye,Ke,(0,it.jsx)(zo,{attributes:t,setAttributes:o,isSelected:n,insertBlocksAfter:r,label:(0,pt.__)("Image caption text"),showToolbarButton:n&&(pe||me)&&!Le})]})}const tm=(e,t)=>t&&!e&&!(0,ht.isBlobURL)(t);function om(e,t){return"url"in(e?.sizes?.[t]??{})||"source_url"in(e?.media_details?.sizes?.[t]??{})}var nm=function({attributes:e,setAttributes:t,isSelected:o,className:n,insertBlocksAfter:r,onReplace:a,context:i,clientId:s,__unstableParentLayout:l}){const{url:c="",caption:u,id:d,width:p,height:m,sizeSlug:g,aspectRatio:h,scale:_,align:x,metadata:b}=e,[f,y]=(0,gt.useState)(e.blob),v=(0,gt.useRef)(),k=l?.type||l?.default?.type,w=!k||"flex"!==k&&"grid"!==k,[C,j]=function(){const[e,{width:t}]=(0,xt.useResizeObserver)(),o=(0,gt.useRef)();return[(0,it.jsx)("div",{className:"wp-block","aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:0,margin:0},ref:o,children:e}),t]}(),[S,{width:B}]=(0,xt.useResizeObserver)(),T=B&&B<160,N=(0,gt.useRef)();(0,gt.useEffect)((()=>{N.current=u}),[u]);const{__unstableMarkNextChangeAsNotPersistent:P,replaceBlock:I}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{["wide","full"].includes(x)&&(P(),t({width:void 0,height:void 0,aspectRatio:void 0,scale:void 0}))}),[P,x,t]);const{getSettings:D,getBlockRootClientId:M,getBlockName:z,canInsertBlockType:A}=(0,lt.useSelect)(ct.store),L=(0,ct.useBlockEditingMode)(),{createErrorNotice:H}=(0,lt.useDispatch)(bo.store);function R(e){H(e,{type:"snackbar"}),t({src:void 0,id:void 0,url:void 0,blob:void 0})}function V(o){if(Array.isArray(o))return void function(e){const t=v.current?.ownerDocument.defaultView;if(e.every((e=>e instanceof t.File))){const t=e,o=M(s);t.some((e=>!_d(e)))&&H((0,pt.__)("If uploading to a gallery all files need to be image formats"),{id:"gallery-upload-invalid-file",type:"snackbar"});const n=t.filter((e=>_d(e))).map((e=>(0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})));if("core/gallery"===z(o))I(s,n);else if(A("core/gallery",o)){const e=(0,st.createBlock)("core/gallery",{},n);I(s,e)}}}(o);if(!o||!o.url)return t({url:void 0,alt:void 0,id:void 0,title:void 0,caption:void 0,blob:void 0}),void y();if((0,ht.isBlobURL)(o.url))return void y(o.url);const{imageDefaultSize:n}=D();let r=md;g&&om(o,g)?r=g:om(o,n)&&(r=n);let a,i=((e,t)=>{const o=Object.fromEntries(Object.entries(e??{}).filter((([e])=>["alt","id","link","caption"].includes(e))));return o.url=e?.sizes?.[t]?.url||e?.media_details?.sizes?.[t]?.source_url||e.url,o})(o,r);if("string"==typeof i.caption&&i.caption.includes("\n")&&(i.caption=i.caption.replace(/\n/g,"<br>")),N.current&&!i.caption){const{caption:e,...t}=i;i=t}o.id&&o.id===d||(a={sizeSlug:r});let l,c=e.linkDestination;if(!c)switch(window?.wp?.media?.view?.settings?.defaultProps?.link||id){case"file":case sd:c=sd;break;case"post":case ld:c=ld;break;case cd:c=cd;break;case id:c=id}switch(c){case sd:l=o.url;break;case ld:l=o.link}i.href=l,t({blob:void 0,...i,...a,linkDestination:c}),y()}function F(e){e!==c&&(t({blob:void 0,url:e,id:void 0,sizeSlug:D().imageDefaultSize}),y())}ft({url:f,allowedTypes:dd,onChange:V,onError:R});const E=tm(d,c)?c:void 0,O=!!c&&(0,it.jsx)("img",{alt:(0,pt.__)("Edit image"),title:(0,pt.__)("Edit image"),className:"edit-image-preview",src:c}),G=(0,ct.__experimentalUseBorderProps)(e),$=(0,ct.__experimentalGetShadowClassesAndStyles)(e),U=Dt(n,{"is-transient":!!f,"is-resized":!!p||!!m,[`size-${g}`]:g,"has-custom-border":!!G.className||G.style&&Object.keys(G.style).length>0}),q=(0,ct.useBlockProps)({ref:v,className:U}),{lockUrlControls:W=!1,lockUrlControlsMessage:Z}=(0,lt.useSelect)((e=>{if(!o)return{};const t=(0,st.getBlockBindingsSource)(b?.bindings?.url?.source);return{lockUrlControls:!!b?.bindings?.url&&!t?.canUserEditValue?.({select:e,context:i,args:b?.bindings?.url?.args}),lockUrlControlsMessage:t?.label?(0,pt.sprintf)((0,pt.__)("Connected to %s"),t.label):(0,pt.__)("Connected to dynamic data")}}),[i,o,b?.bindings?.url]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)("figure",{...q,children:[(0,it.jsx)(em,{temporaryURL:f,attributes:e,setAttributes:t,isSingleSelected:o,insertBlocksAfter:r,onReplace:a,onSelectImage:V,onSelectURL:F,onUploadError:R,context:i,clientId:s,blockEditingMode:L,parentLayoutType:k,maxContentWidth:j}),(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:td}),onSelect:V,onSelectURL:F,onError:R,placeholder:e=>(0,it.jsxs)(mt.Placeholder,{className:Dt("block-editor-media-placeholder",{[G.className]:!!G.className&&!o}),icon:!T&&(W?Gp:td),withIllustration:!o||T,label:!T&&(0,pt.__)("Image"),instructions:!W&&!T&&(0,pt.__)("Drag and drop an image, upload, or choose from your library."),style:{aspectRatio:p&&m||!h?void 0:h,width:m&&h?"100%":p,height:p&&h?"100%":m,objectFit:_,...G.style,...$.style},children:[W&&!T&&Z,!W&&!T&&e,S]}),accept:"image/*",allowedTypes:dd,handleUpload:e=>1===e.length,value:{id:d,src:E},mediaPreview:O,disableMediaButtons:f||c})]}),o&&w&&C]})};const rm=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/image","title":"Image","category":"media","usesContext":["allowResize","imageCrop","fixedHeight","postId","postType","queryId"],"description":"Insert an image to make a visual statement.","keywords":["img","photo","picture"],"textdomain":"default","attributes":{"blob":{"type":"string","role":"local"},"url":{"type":"string","source":"attribute","selector":"img","attribute":"src","role":"content"},"alt":{"type":"string","source":"attribute","selector":"img","attribute":"alt","default":"","role":"content"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"lightbox":{"type":"object","enabled":{"type":"boolean"}},"title":{"type":"string","source":"attribute","selector":"img","attribute":"title","role":"content"},"href":{"type":"string","source":"attribute","selector":"figure > a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure > a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure > a","attribute":"class"},"id":{"type":"number","role":"content"},"width":{"type":"string"},"height":{"type":"string"},"aspectRatio":{"type":"string"},"scale":{"type":"string"},"sizeSlug":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure > a","attribute":"target"}},"supports":{"interactivity":true,"align":["left","center","right","wide","full"],"anchor":true,"color":{"text":false,"background":false},"filter":{"duotone":true},"spacing":{"margin":true},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"shadow":{"__experimentalSkipSerialization":true}},"selectors":{"border":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","shadow":".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder","filter":{"duotone":".wp-block-image img, .wp-block-image .components-placeholder"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"editorStyle":"wp-block-image-editor","style":"wp-block-image"}');function am(e,t){const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=e;const{firstElementChild:n}=o;if(n&&"A"===n.nodeName)return n.getAttribute(t)||void 0}const im={img:{attributes:["src","alt","title"],classes:["alignleft","aligncenter","alignright","alignnone",/^wp-image-\d+$/]}},sm={from:[{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&!!e.querySelector("img"),schema:({phrasingContentSchema:e})=>({figure:{require:["img"],children:{...im,a:{attributes:["href","rel","target"],classes:["*"],children:im},figcaption:{children:e}}}}),transform:e=>{const t=e.className+" "+e.querySelector("img").className,o=/(?:^|\s)align(left|center|right)(?:$|\s)/.exec(t),n=""===e.id?void 0:e.id,r=o?o[1]:void 0,a=/(?:^|\s)wp-image-(\d+)(?:$|\s)/.exec(t),i=a?Number(a[1]):void 0,s=e.querySelector("a"),l=s&&s.href?"custom":void 0,c=s&&s.href?s.href:void 0,u=s&&s.rel?s.rel:void 0,d=s&&s.className?s.className:void 0,p=(0,st.getBlockAttributes)("core/image",e.outerHTML,{align:r,id:i,linkDestination:l,href:c,rel:u,linkClass:d,anchor:n});return(0,ht.isBlobURL)(p.url)&&(p.blob=p.url,delete p.url),(0,st.createBlock)("core/image",p)}},{type:"files",isMatch:e=>e.every((e=>0===e.type.indexOf("image/"))),transform:e=>e.map((e=>(0,st.createBlock)("core/image",{blob:(0,ht.createBlobURL)(e)})))},{type:"shortcode",tag:"caption",attributes:{url:{type:"string",source:"attribute",attribute:"src",selector:"img"},alt:{type:"string",source:"attribute",attribute:"alt",selector:"img"},caption:{shortcode:function(e,{shortcode:t}){const{body:o}=document.implementation.createHTMLDocument("");o.innerHTML=t.content;let n=o.querySelector("img");for(;n&&n.parentNode&&n.parentNode!==o;)n=n.parentNode;return n&&n.parentNode.removeChild(n),o.innerHTML.trim()}},href:{shortcode:(e,{shortcode:t})=>am(t.content,"href")},rel:{shortcode:(e,{shortcode:t})=>am(t.content,"rel")},linkClass:{shortcode:(e,{shortcode:t})=>am(t.content,"class")},id:{type:"number",shortcode:({named:{id:e}})=>{if(e)return parseInt(e.replace("attachment_",""),10)}},align:{type:"string",shortcode:({named:{align:e="alignnone"}})=>e.replace("align","")}}}]};var lm=sm;const{name:cm}=rm,um={icon:td,example:{attributes:{sizeSlug:"large",url:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",caption:(0,pt.__)("Mont Blanc appears—still, snowy, and serene.")}},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;if("list-view"===t&&o)return o;if("accessibility"===t){const{caption:t,alt:o,url:n}=e;return n?o?o+(t?". "+t:""):t||"":(0,pt.__)("Empty")}},getEditWrapperProps:e=>({"data-align":e.align}),transforms:lm,edit:nm,save:function({attributes:e}){const{url:t,alt:o,caption:n,align:r,href:a,rel:i,linkClass:s,width:l,height:c,aspectRatio:u,scale:d,id:p,linkTarget:m,sizeSlug:g,title:h,metadata:{bindings:_={}}={}}=e,x=i||void 0,b=(0,ct.__experimentalGetBorderClassesAndStyles)(e),f=(0,ct.__experimentalGetShadowClassesAndStyles)(e),y=Dt({alignnone:"none"===r,[`size-${g}`]:g,"is-resized":l||c,"has-custom-border":!!b.className||b.style&&Object.keys(b.style).length>0}),v=Dt(b.className,{[`wp-image-${p}`]:!!p}),k=(0,it.jsx)("img",{src:t,alt:o,className:v||void 0,style:{...b.style,...f.style,aspectRatio:u,objectFit:d,width:l,height:c},title:h}),w=!ct.RichText.isEmpty(n)||_.caption||"core/pattern-overrides"===_?.__default?.source,C=(0,it.jsxs)(it.Fragment,{children:[a?(0,it.jsx)("a",{className:s,href:a,target:m,rel:x,children:k}):k,w&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:n})]});return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:y}),children:C})},deprecated:Op},dm=()=>jt({name:cm,metadata:rm,settings:um});var pm=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});const mm=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-comments","title":"Latest Comments","category":"widgets","description":"Display a list of your most recent comments.","keywords":["recent comments"],"textdomain":"default","attributes":{"commentsToShow":{"type":"number","default":5,"minimum":1,"maximum":100},"displayAvatar":{"type":"boolean","default":true},"displayDate":{"type":"boolean","default":true},"displayExcerpt":{"type":"boolean","default":true}},"supports":{"align":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-comments-editor","style":"wp-block-latest-comments"}');const{name:gm}=mm,hm={icon:pm,example:{},edit:function({attributes:e,setAttributes:t}){const{commentsToShow:o,displayAvatar:n,displayDate:r,displayExcerpt:a}=e,i={...e,style:{...e?.style,spacing:void 0}},s=vt();return(0,it.jsxs)("div",{...(0,ct.useBlockProps)(),children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({commentsToShow:5,displayAvatar:!0,displayDate:!0,displayExcerpt:!0})},dropdownMenuProps:s,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!n,label:(0,pt.__)("Display avatar"),onDeselect:()=>t({displayAvatar:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display avatar"),checked:n,onChange:()=>t({displayAvatar:!n})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,pt.__)("Display date"),onDeselect:()=>t({displayDate:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display date"),checked:r,onChange:()=>t({displayDate:!r})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!a,label:(0,pt.__)("Display excerpt"),onDeselect:()=>t({displayExcerpt:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display excerpt"),checked:a,onChange:()=>t({displayExcerpt:!a})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>5!==o,label:(0,pt.__)("Number of comments"),onDeselect:()=>t({commentsToShow:5}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Number of comments"),value:o,onChange:e=>t({commentsToShow:e}),min:1,max:100,required:!0})})]})}),(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/latest-comments",attributes:i,urlQueryArgs:{_locale:"site"}})})]})}},_m=()=>jt({name:gm,metadata:mm,settings:hm});var xm=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 5.5H6a.5.5 0 0 0-.5.5v12a.5.5 0 0 0 .5.5h12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5ZM6 4h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm1 5h1.5v1.5H7V9Zm1.5 4.5H7V15h1.5v-1.5ZM10 9h7v1.5h-7V9Zm7 4.5h-7V15h7v-1.5Z"})});const bm=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/latest-posts","title":"Latest Posts","category":"widgets","description":"Display a list of your most recent posts.","keywords":["recent posts"],"textdomain":"default","attributes":{"categories":{"type":"array","items":{"type":"object"}},"selectedAuthor":{"type":"number"},"postsToShow":{"type":"number","default":5},"displayPostContent":{"type":"boolean","default":false},"displayPostContentRadio":{"type":"string","default":"excerpt"},"excerptLength":{"type":"number","default":55},"displayAuthor":{"type":"boolean","default":false},"displayPostDate":{"type":"boolean","default":false},"postLayout":{"type":"string","default":"list"},"columns":{"type":"number","default":3},"order":{"type":"string","default":"desc"},"orderBy":{"type":"string","default":"date"},"displayFeaturedImage":{"type":"boolean","default":false},"featuredImageAlign":{"type":"string","enum":["left","center","right"]},"featuredImageSizeSlug":{"type":"string","default":"thumbnail"},"featuredImageSizeWidth":{"type":"number","default":null},"featuredImageSizeHeight":{"type":"number","default":null},"addLinkToFeaturedImage":{"type":"boolean","default":false}},"supports":{"align":true,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-latest-posts-editor","style":"wp-block-latest-posts"}'),{attributes:fm}=bm;var ym=[{attributes:{...fm,categories:{type:"string"}},supports:{align:!0,html:!1},migrate:e=>({...e,categories:[{id:Number(e.categories)}]}),isEligible:({categories:e})=>e&&"string"==typeof e,save:()=>null}],vm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM5 9h14v6H5V9Z"})}),km=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 5.5h8V4H5v1.5ZM5 20h8v-1.5H5V20ZM19 9H5v6h14V9Z"})}),wm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5.5H5V4h14v1.5ZM19 20H5v-1.5h14V20ZM7 9h10v6H7V9Z"})}),Cm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5.5h-8V4h8v1.5ZM19 20h-8v-1.5h8V20ZM5 9h14v6H5V9Z"})}),jm=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})});const Sm={per_page:-1,_fields:"id,name",context:"view"},Bm={per_page:-1,has_published_posts:["post"],context:"view"},Tm=[{value:"none",icon:vm,label:(0,pt.__)("None")},{value:"left",icon:km,label:(0,pt.__)("Left")},{value:"center",icon:wm,label:(0,pt.__)("Center")},{value:"right",icon:Cm,label:(0,pt.__)("Right")}];function Nm({attributes:e,setAttributes:t,postCount:o}){const{postsToShow:n,order:r,orderBy:a,categories:i,selectedAuthor:s,displayFeaturedImage:l,displayPostContentRadio:c,displayPostContent:u,displayPostDate:d,displayAuthor:p,postLayout:m,columns:g,excerptLength:h,featuredImageAlign:_,featuredImageSizeSlug:x,featuredImageSizeWidth:b,featuredImageSizeHeight:f,addLinkToFeaturedImage:y}=e,{imageSizes:v,defaultImageWidth:k,defaultImageHeight:w,categoriesList:C,authorList:j}=(0,lt.useSelect)((e=>{const{getEntityRecords:t,getUsers:o}=e(_t.store),n=e(ct.store).getSettings();return{defaultImageWidth:n.imageDimensions?.[x]?.width??0,defaultImageHeight:n.imageDimensions?.[x]?.height??0,imageSizes:n.imageSizes,categoriesList:t("taxonomy","category",Sm),authorList:o(Bm)}}),[x]),S=vt(),B=v.filter((({slug:e})=>"full"!==e)).map((({name:e,slug:t})=>({value:t,label:e}))),T=C?.reduce(((e,t)=>({...e,[t.name]:t})),{})??{};return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Post content"),resetAll:()=>t({displayPostContent:!1,displayPostContentRadio:"excerpt",excerptLength:55}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!u,label:(0,pt.__)("Display post content"),onDeselect:()=>t({displayPostContent:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display post content"),checked:u,onChange:e=>t({displayPostContent:e})})}),u&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"excerpt"!==c,label:(0,pt.__)("Content length"),onDeselect:()=>t({displayPostContentRadio:"excerpt"}),isShownByDefault:!0,children:(0,it.jsx)(mt.RadioControl,{label:(0,pt.__)("Content length"),selected:c,options:[{label:(0,pt.__)("Excerpt"),value:"excerpt"},{label:(0,pt.__)("Full post"),value:"full_post"}],onChange:e=>t({displayPostContentRadio:e})})}),u&&"excerpt"===c&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>55!==h,label:(0,pt.__)("Max number of words"),onDeselect:()=>t({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Max number of words"),value:h,onChange:e=>t({excerptLength:e}),min:10,max:100})})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Post meta"),resetAll:()=>t({displayAuthor:!1,displayPostDate:!1}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,pt.__)("Display author name"),onDeselect:()=>t({displayAuthor:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display author name"),checked:p,onChange:e=>t({displayAuthor:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!d,label:(0,pt.__)("Display post date"),onDeselect:()=>t({displayPostDate:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display post date"),checked:d,onChange:e=>t({displayPostDate:e})})})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Featured image"),resetAll:()=>t({displayFeaturedImage:!1,featuredImageAlign:void 0,featuredImageSizeSlug:"thumbnail",featuredImageSizeWidth:null,featuredImageSizeHeight:null,addLinkToFeaturedImage:!1}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!l,label:(0,pt.__)("Display featured image"),onDeselect:()=>t({displayFeaturedImage:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display featured image"),checked:l,onChange:e=>t({displayFeaturedImage:e})})}),l&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"thumbnail"!==x||null!==b||null!==f,label:(0,pt.__)("Image size"),onDeselect:()=>t({featuredImageSizeSlug:"thumbnail",featuredImageSizeWidth:null,featuredImageSizeHeight:null}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalImageSizeControl,{onChange:e=>{const o={};e.hasOwnProperty("width")&&(o.featuredImageSizeWidth=e.width),e.hasOwnProperty("height")&&(o.featuredImageSizeHeight=e.height),t(o)},slug:x,width:b,height:f,imageWidth:k,imageHeight:w,imageSizeOptions:B,imageSizeHelp:(0,pt.__)("Select the size of the source image."),onChangeImage:e=>t({featuredImageSizeSlug:e,featuredImageSizeWidth:void 0,featuredImageSizeHeight:void 0})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!_,label:(0,pt.__)("Image alignment"),onDeselect:()=>t({featuredImageAlign:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{className:"editor-latest-posts-image-alignment-control",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image alignment"),value:_||"none",onChange:e=>t({featuredImageAlign:"none"!==e?e:void 0}),children:Tm.map((({value:e,icon:t,label:o})=>(0,it.jsx)(mt.__experimentalToggleGroupControlOptionIcon,{value:e,icon:t,label:o},e)))})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!y,label:(0,pt.__)("Add link to featured image"),onDeselect:()=>t({addLinkToFeaturedImage:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Add link to featured image"),checked:y,onChange:e=>t({addLinkToFeaturedImage:e})})})]})]}),(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Sorting and filtering"),resetAll:()=>t({order:"desc",orderBy:"date",postsToShow:5,categories:void 0,selectedAuthor:void 0,columns:3}),dropdownMenuProps:S,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==r||"date"!==a||5!==n||i?.length>0||!!s,label:(0,pt.__)("Sort and filter"),onDeselect:()=>t({order:"desc",orderBy:"date",postsToShow:5,categories:void 0,selectedAuthor:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.QueryControls,{order:r,orderBy:a,numberOfItems:n,onOrderChange:e=>t({order:e}),onOrderByChange:e=>t({orderBy:e}),onNumberOfItemsChange:e=>t({postsToShow:e}),categorySuggestions:T,onCategoryChange:e=>{if(e.some((e=>"string"==typeof e&&!T[e])))return;const o=e.map((e=>"string"==typeof e?T[e]:e));if(o.includes(null))return!1;t({categories:o})},selectedCategories:i,onAuthorChange:e=>t({selectedAuthor:""!==e?Number(e):void 0}),authorList:j??[],selectedAuthorId:s})}),"grid"===m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>3!==g,label:(0,pt.__)("Columns"),onDeselect:()=>t({columns:3}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:g,onChange:e=>t({columns:e}),min:2,max:o?Math.min(6,o):6,required:!0})})]})]})}const{name:Pm}=bm,Im={icon:xm,example:{},edit:function e({attributes:t,setAttributes:o}){const n=(0,xt.useInstanceId)(e),{postsToShow:r,order:a,orderBy:i,categories:s,selectedAuthor:l,displayFeaturedImage:c,displayPostContentRadio:u,displayPostContent:d,displayPostDate:p,displayAuthor:m,postLayout:g,columns:h,excerptLength:_,featuredImageAlign:x,featuredImageSizeSlug:b,featuredImageSizeWidth:f,featuredImageSizeHeight:y,addLinkToFeaturedImage:v}=t,{latestPosts:k}=(0,lt.useSelect)((e=>{const{getEntityRecords:t}=e(_t.store),o=s&&s.length>0?s.map((e=>e.id)):[];return{latestPosts:t("postType","post",Object.fromEntries(Object.entries({categories:o,author:l,order:a,orderby:i,per_page:r,_embed:"author,wp:featuredmedia",ignore_sticky:!0}).filter((([,e])=>void 0!==e))))}}),[r,a,i,s,l]),{createWarningNotice:w}=(0,lt.useDispatch)(bo.store),C=e=>{e.preventDefault(),w((0,pt.__)("Links are disabled in the editor."),{id:`block-library/core/latest-posts/redirection-prevented/${n}`,type:"snackbar"})},j=!!k?.length,S=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Nm,{attributes:t,setAttributes:o,postCount:k?.length??0})}),B=(0,ct.useBlockProps)({className:Dt({"wp-block-latest-posts__list":!0,"is-grid":"grid"===g,"has-dates":p,"has-author":m,[`columns-${h}`]:"grid"===g})});if(!j)return(0,it.jsxs)("div",{...B,children:[S,(0,it.jsx)(mt.Placeholder,{icon:Wn,label:(0,pt.__)("Latest Posts"),children:Array.isArray(k)?(0,pt.__)("No posts found."):(0,it.jsx)(mt.Spinner,{})})]});const T=k.length>r?k.slice(0,r):k,N=[{icon:jm,title:(0,pt._x)("List view","Latest posts block display setting"),onClick:()=>o({postLayout:"list"}),isActive:"list"===g},{icon:qd,title:(0,pt._x)("Grid view","Latest posts block display setting"),onClick:()=>o({postLayout:"grid"}),isActive:"grid"===g}],P=(0,ja.getSettings)().formats.date;return(0,it.jsxs)(it.Fragment,{children:[S,(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:N})}),(0,it.jsx)("ul",{...B,children:T.map((e=>{const t=e.title.rendered.trim();let o=e.excerpt.rendered;const n=function(e){return e._embedded?.author?.[0]}(e),r=document.createElement("div");r.innerHTML=o,o=r.textContent||r.innerText||"";const{url:a,alt:i}=function(e,t){const o=e._embedded?.["wp:featuredmedia"]?.[0];return{url:o?.media_details?.sizes?.[t]?.source_url??o?.source_url,alt:o?.alt_text}}(e,b),s=Dt({"wp-block-latest-posts__featured-image":!0,[`align${x}`]:!!x}),l=c&&a,g=l&&(0,it.jsx)("img",{src:a,alt:i,style:{maxWidth:f,maxHeight:y}}),h=_<o.trim().split(" ").length&&""===e.excerpt.raw?(0,it.jsxs)(it.Fragment,{children:[o.trim().split(" ",_).join(" "),(0,gt.createInterpolateElement)((0,pt.sprintf)((0,pt.__)("… <a>Read more<span>: %1$s</span></a>"),t||(0,pt.__)("(no title)")),{a:(0,it.jsx)("a",{className:"wp-block-latest-posts__read-more",href:e.link,rel:"noopener noreferrer",onClick:C}),span:(0,it.jsx)("span",{className:"screen-reader-text"})})]}):o;return(0,it.jsxs)("li",{children:[l&&(0,it.jsx)("div",{className:s,children:v?(0,it.jsx)("a",{href:e.link,onClick:C,children:g}):g}),(0,it.jsx)("a",{className:"wp-block-latest-posts__post-title",href:e.link,dangerouslySetInnerHTML:t?{__html:t}:void 0,onClick:C,children:t?null:(0,pt.__)("(no title)")}),m&&n&&(0,it.jsx)("div",{className:"wp-block-latest-posts__post-author",children:(0,pt.sprintf)((0,pt.__)("by %s"),n.name)}),p&&e.date_gmt&&(0,it.jsx)("time",{dateTime:(0,ja.format)("c",e.date_gmt),className:"wp-block-latest-posts__post-date",children:(0,ja.dateI18n)(P,e.date_gmt)}),d&&"excerpt"===u&&(0,it.jsx)("div",{className:"wp-block-latest-posts__post-excerpt",children:h}),d&&"full_post"===u&&(0,it.jsx)("div",{className:"wp-block-latest-posts__post-full-content",dangerouslySetInnerHTML:{__html:e.content.raw.trim()}})]},e.id)}))})]})},deprecated:ym},Dm=()=>jt({name:Pm,metadata:bm,settings:Im}),Mm={A:"upper-alpha",a:"lower-alpha",I:"upper-roman",i:"lower-roman"};function zm(e){const{values:t,start:o,reversed:n,ordered:r,type:a,...i}=e,s=document.createElement(r?"ol":"ul");s.innerHTML=t,o&&s.setAttribute("start",o),n&&s.setAttribute("reversed",!0),a&&s.setAttribute("type",a);const[l]=(0,st.rawHandler)({HTML:s.outerHTML});return[{...i,...l.attributes},l.innerBlocks]}const Am={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0},color:{gradients:!0,link:!0},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:r,start:a}=e,i=t?"ol":"ul";return(0,it.jsx)(i,{...ct.useBlockProps.save({type:n,reversed:r,start:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o,multiline:"li"})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily},Lm={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,__experimentalFontFamily:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,values:o,type:n,reversed:r,start:a}=e,i=t?"ol":"ul";return(0,it.jsx)(i,{...ct.useBlockProps.save({type:n,reversed:r,start:a}),children:(0,it.jsx)(ct.RichText.Content,{value:o,multiline:"li"})})},migrate:zm},Hm={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalSlashInserter:!0},isEligible:({type:e})=>!!e,save({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,it.jsx)(a,{...ct.useBlockProps.save({type:o,reversed:n,start:r}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},migrate:function(e){const{type:t}=e;return t&&Mm[t]?{...e,type:Mm[t]}:e}},Rm={attributes:{ordered:{type:"boolean",default:!1,role:"content"},values:{type:"string",source:"html",selector:"ol,ul",multiline:"li",__unstableMultilineWrapperTags:["ol","ul"],default:"",role:"content"},type:{type:"string"},start:{type:"number"},reversed:{type:"boolean"},placeholder:{type:"string"}},supports:{anchor:!0,className:!1,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},__unstablePasteTextInline:!0,__experimentalSelector:"ol,ul",__experimentalOnMerge:"true",__experimentalSlashInserter:!0},save({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,it.jsx)(a,{...ct.useBlockProps.save({reversed:n,start:r,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}};var Vm=[Rm,Hm,Lm,Am],Fm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM15.4697 14.9697L18.4393 12L15.4697 9.03033L16.5303 7.96967L20.0303 11.4697L20.5607 12L20.0303 12.5303L16.5303 16.0303L15.4697 14.9697Z"})}),Em=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-4-4.6l-4 4 4 4 1-1-3-3 3-3-1-1z"})}),Om=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Gm=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),$m=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3.8 15.8h8.9v-1.5H3.8v1.5zm0-7h8.9V7.2H3.8v1.6zm14.7-2.1V10h1V5.3l-2.2.7.3 1 .9-.3zm1.2 6.1c-.5-.6-1.2-.5-1.7-.4-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5H20v-1h-.9c.3-.6.8-1.4.9-2.1 0-.3 0-.8-.3-1.1z"})}),Um=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM5 6.7V10h1V5.3L3.8 6l.4 1 .8-.3zm-.4 5.7c-.3.1-.5.2-.7.3l.1 1.1c.2-.2.5-.4.8-.5.3-.1.6 0 .7.1.2.3 0 .8-.2 1.1-.5.8-.9 1.6-1.4 2.5h2.7v-1h-1c.3-.6.8-1.4.9-2.1.1-.3 0-.8-.2-1.1-.5-.6-1.3-.5-1.7-.4z"})});const qm=window.wp.deprecated;var Wm=r.n(qm);const Zm=[{label:(0,pt.__)("Numbers"),value:"decimal"},{label:(0,pt.__)("Uppercase letters"),value:"upper-alpha"},{label:(0,pt.__)("Lowercase letters"),value:"lower-alpha"},{label:(0,pt.__)("Uppercase Roman numerals"),value:"upper-roman"},{label:(0,pt.__)("Lowercase Roman numerals"),value:"lower-roman"}];var Jm=({setAttributes:e,reversed:t,start:o,type:n})=>{const r=vt();return(0,it.jsx)(ct.InspectorControls,{children:gt.Platform.isNative?(0,it.jsxs)(mt.PanelBody,{title:(0,pt.__)("Settings"),children:[(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("List style"),options:Zm,value:n,onChange:t=>e({type:t})}),(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Start value"),type:"number",onChange:t=>{const o=parseInt(t,10);e({start:isNaN(o)?void 0:o})},value:Number.isInteger(o)?o.toString(10):"",step:"1"}),(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})]}):(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({type:void 0,start:void 0,reversed:void 0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("List style"),isShownByDefault:!0,hasValue:()=>!!n,onDeselect:()=>e({type:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("List style"),options:Zm,value:n||"decimal",onChange:t=>e({type:t})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Start value"),isShownByDefault:!0,hasValue:()=>!!o,onDeselect:()=>e({start:void 0}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Start value"),type:"number",onChange:t=>{const o=parseInt(t,10);e({start:isNaN(o)?void 0:o})},value:Number.isInteger(o)?o.toString(10):"",step:"1"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Reverse order"),isShownByDefault:!0,hasValue:()=>!!t,onDeselect:()=>e({reversed:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reverse order"),checked:t||!1,onChange:t=>{e({reversed:t||void 0})}})})]})})};var Qm=(0,gt.forwardRef)((function(e,t){const{ordered:o,...n}=e,r=o?"ol":"ul";return(0,it.jsx)(r,{ref:t,...n})}));const Km={name:"core/list-item"},Ym=[["core/list-item"]];function Xm({clientId:e}){const t=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:n,getBlockAttributes:r,getBlock:a}=(0,lt.useSelect)(ct.store);return(0,gt.useCallback)((()=>{const i=n(e),s=r(i),l=(0,st.createBlock)("core/list-item",s),{innerBlocks:c}=a(e);t([i],[l,...c]),o(c[c.length-1].clientId)}),[e])}(e),o=(0,lt.useSelect)((t=>{const{getBlockRootClientId:o,getBlockName:n}=t(ct.store);return"core/list-item"===n(o(e))}),[e]);return(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Fm:Em,title:(0,pt.__)("Outdent"),description:(0,pt.__)("Outdent list item"),disabled:!o,onClick:t})})}const eg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list","title":"List","category":"text","allowedBlocks":["core/list-item"],"description":"An organized collection of items displayed in a specific order.","keywords":["bullet list","ordered list","numbered list"],"textdomain":"default","attributes":{"ordered":{"type":"boolean","default":false,"role":"content"},"values":{"type":"string","source":"html","selector":"ol,ul","multiline":"li","default":"","role":"content"},"type":{"type":"string"},"start":{"type":"number"},"reversed":{"type":"boolean"},"placeholder":{"type":"string"}},"supports":{"anchor":true,"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__unstablePasteTextInline":true,"__experimentalOnMerge":true,"__experimentalSlashInserter":true,"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-list:not(.wp-block-list .wp-block-list)"},"editorStyle":"wp-block-list-editor","style":"wp-block-list"}');function tg({phrasingContentSchema:e}){const t={...e,ul:{},ol:{attributes:["type","start","reversed"]}};return["ul","ol"].forEach((e=>{t[e].children={li:{children:t}}})),t}function og(e){return e.flatMap((({name:e,attributes:t,innerBlocks:o=[]})=>"core/list-item"===e?[t.content,...og(o)]:og(o)))}const ng={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph","core/heading"],transform:e=>{let t=[];if(e.length>1)t=e.map((({content:e})=>(0,st.createBlock)("core/list-item",{content:e})));else if(1===e.length){const o=(0,Tn.create)({html:e[0].content});t=(0,Tn.split)(o,"\n").map((e=>(0,st.createBlock)("core/list-item",{content:(0,Tn.toHTMLString)({value:e})})))}return(0,st.createBlock)("core/list",{anchor:e.anchor},t)}},{type:"raw",selector:"ol,ul",schema:e=>({ol:tg(e).ol,ul:tg(e).ul}),transform:function e(t){const o=t.getAttribute("type"),n={ordered:"OL"===t.tagName,anchor:""===t.id?void 0:t.id,start:t.getAttribute("start")?parseInt(t.getAttribute("start"),10):void 0,reversed:!!t.hasAttribute("reversed")||void 0,type:o&&Mm[o]?Mm[o]:void 0},r=Array.from(t.children).map((t=>{const o=Array.from(t.childNodes).filter((e=>e.nodeType!==e.TEXT_NODE||0!==e.textContent.trim().length));o.reverse();const[n,...r]=o;if(!("UL"===n?.tagName||"OL"===n?.tagName))return(0,st.createBlock)("core/list-item",{content:t.innerHTML});const a=r.map((e=>e.nodeType===e.TEXT_NODE?e.textContent:e.outerHTML));a.reverse();const i={content:a.join("").trim()},s=[e(n)];return(0,st.createBlock)("core/list-item",i,s)}));return(0,st.createBlock)("core/list",n,r)}},...["*","-"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,st.createBlock)("core/list",{},[(0,st.createBlock)("core/list-item",{content:e})])}))),...["1.","1)"].map((e=>({type:"prefix",prefix:e,transform:e=>(0,st.createBlock)("core/list",{ordered:!0},[(0,st.createBlock)("core/list-item",{content:e})])})))],to:[...["core/paragraph","core/heading"].map((e=>({type:"block",blocks:[e],transform:(t,o)=>og(o).map((t=>(0,st.createBlock)(e,{content:t})))})))]};var rg=ng;const{name:ag}=eg,ig={icon:jm,example:{innerBlocks:[{name:"core/list-item",attributes:{content:(0,pt.__)("Alice.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The White Rabbit.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The Cheshire Cat.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The Mad Hatter.")}},{name:"core/list-item",attributes:{content:(0,pt.__)("The Queen of Hearts.")}}]},transforms:rg,edit:function({attributes:e,setAttributes:t,clientId:o,style:n}){const{ordered:r,type:a,reversed:i,start:s}=e,l=(0,ct.useBlockProps)({style:{...gt.Platform.isNative&&n,listStyleType:r&&"decimal"!==a?a:void 0}}),c=(0,ct.useInnerBlocksProps)(l,{defaultBlock:Km,directInsert:!0,template:Ym,templateLock:!1,templateInsertUpdatesSelection:!0,...gt.Platform.isNative&&{marginVertical:8,marginHorizontal:8,renderAppender:!1},__experimentalCaptureToolbars:!0});!function(e,t){const o=(0,lt.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:r}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{if(!e.values)return;const[a,i]=zm(e);Wm()("Value attribute on the list block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,a),r(t,i)}))}),[e.values])}(e,o);const u=(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Om:Gm,title:(0,pt.__)("Unordered"),description:(0,pt.__)("Convert to unordered list"),isActive:!1===r,onClick:()=>{t({ordered:!1})}}),(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?$m:Um,title:(0,pt.__)("Ordered"),description:(0,pt.__)("Convert to ordered list"),isActive:!0===r,onClick:()=>{t({ordered:!0})}}),(0,it.jsx)(Xm,{clientId:o})]});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Qm,{ordered:r,reversed:i,start:s,...c}),u,r&&(0,it.jsx)(Jm,{setAttributes:t,reversed:i,start:s,type:a})]})},save:function({attributes:e}){const{ordered:t,type:o,reversed:n,start:r}=e,a=t?"ol":"ul";return(0,it.jsx)(a,{...ct.useBlockProps.save({reversed:n,start:r,style:{listStyleType:t&&"decimal"!==o?o:void 0}}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})},deprecated:Vm},sg=()=>jt({name:ag,metadata:eg,settings:ig});var lg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});const{Badge:cg}=jo(mt.privateApis);const ug=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/math","title":"Math","category":"text","description":"Display mathematical notation using LaTeX.","keywords":["equation","formula","latex","mathematics"],"textdomain":"default","attributes":{"latex":{"type":"string","role":"content"},"mathML":{"type":"string","source":"html","selector":"math"}}}');const dg={attributes:{latex:{type:"string",role:"content"},mathML:{type:"string",source:"html",selector:"math"}},save({attributes:e}){const{latex:t,mathML:o}=e;return t?(0,it.jsx)("math",{...ct.useBlockProps.save(),display:"block",dangerouslySetInnerHTML:{__html:o}}):null}};var pg=[dg];const{name:mg}=ug,gg={icon:lg,example:{attributes:{latex:"x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",mathML:'<semantics><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo lspace="0em" rspace="0em">−</mo><mi>b</mi><mo>±</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow><annotation encoding="application/x-tex">x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}</annotation></semantics>'},viewportWidth:300},edit:function({attributes:e,setAttributes:t,isSelected:o}){const{latex:n}=e,[a,i]=(0,gt.useState)(),[s,l]=(0,gt.useState)(null),[c,u]=(0,gt.useState)(),d=(0,gt.useRef)(e.latex),{__unstableMarkNextChangeAsNotPersistent:p}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{Promise.resolve().then(r.t.bind(r,3533,23)).then((e=>{u((()=>e.default)),d.current&&(p(),t({mathML:e.default(d.current,{displayMode:!0})}))}))}),[d,t,p]);const m=(0,ct.useBlockProps)({ref:i,position:"relative"});return(0,it.jsxs)("div",{...m,children:[e.mathML?(0,it.jsx)("math",{display:"block",dangerouslySetInnerHTML:{__html:e.mathML}}):"",o&&(0,it.jsx)(mt.Popover,{placement:"bottom-start",offset:8,anchor:a,focusOnMount:"firstContentElement",children:(0,it.jsx)("div",{style:{padding:"4px",minWidth:"300px"},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:1,children:[(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("LaTeX math syntax"),hideLabelFromVision:!0,value:n,className:"wp-block-math__textarea-control",onChange:e=>{if(!c)return void t({latex:e});let o="";try{o=c(e,{displayMode:!0}),l(null)}catch(e){l(e.message)}t({mathML:o,latex:e})},placeholder:(0,pt.__)("e.g., x^2, \\frac{a}{b}")}),s&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(cg,{intent:"error",className:"wp-block-math__error",children:s}),(0,it.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})]})},save:function({attributes:e}){const{latex:t,mathML:o}=e;return t?(0,it.jsx)("div",{...ct.useBlockProps.save(),children:(0,it.jsx)("math",{display:"block",dangerouslySetInnerHTML:{__html:o}})}):null},deprecated:pg},hg=()=>jt({name:mg,metadata:ug,settings:gg});var _g=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 11v1.5h8V11h-8zm-6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});const xg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/list-item","title":"List Item","category":"text","parent":["core/list"],"allowedBlocks":["core/list"],"description":"An individual item within a list.","textdomain":"default","attributes":{"placeholder":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"li","role":"content"}},"supports":{"anchor":true,"className":false,"splitting":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"background":true,"__experimentalDefaultControls":{"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-list > li","border":".wp-block-list:not(.wp-block-list .wp-block-list) > li"}}');var bg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M20 5.5H4V4H20V5.5ZM12 12.5H4V11H12V12.5ZM20 20V18.5H4V20H20ZM20.0303 9.03033L17.0607 12L20.0303 14.9697L18.9697 16.0303L15.4697 12.5303L14.9393 12L15.4697 11.4697L18.9697 7.96967L20.0303 9.03033Z"})}),fg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 7.2v1.5h16V7.2H4zm8 8.6h8v-1.5h-8v1.5zm-8-3.5l3 3-3 3 1 1 4-4-4-4-1 1z"})});function yg(e){const{replaceBlocks:t,selectionChange:o,multiSelect:n}=(0,lt.useDispatch)(ct.store),{getBlock:r,getPreviousBlockClientId:a,getSelectionStart:i,getSelectionEnd:s,hasMultiSelection:l,getMultiSelectedBlockClientIds:c}=(0,lt.useSelect)(ct.store);return(0,gt.useCallback)((()=>{const u=l(),d=u?c():[e],p=d.map((e=>(0,st.cloneBlock)(r(e)))),m=a(e),g=(0,st.cloneBlock)(r(m));g.innerBlocks?.length||(g.innerBlocks=[(0,st.createBlock)("core/list")]),g.innerBlocks[g.innerBlocks.length-1].innerBlocks.push(...p);const h=i(),_=s();return t([m,...d],[g]),u?n(p[0].clientId,p[p.length-1].clientId):o(p[0].clientId,_.attributeKey,_.clientId===h.clientId?h.offset:_.offset,_.offset),!0}),[e])}function vg(){const e=(0,lt.useRegistry)(),{moveBlocksToPosition:t,removeBlock:o,insertBlock:n,updateBlockListSettings:r}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:a,getBlockName:i,getBlockOrder:s,getBlockIndex:l,getSelectedBlockClientIds:c,getBlock:u,getBlockListSettings:d}=(0,lt.useSelect)(ct.store);return(0,gt.useCallback)(((p=c())=>{if(Array.isArray(p)||(p=[p]),!p.length)return;const m=p[0];if("core/list-item"!==i(m))return;const g=function(e){const t=a(e),o=a(t);if(o&&"core/list-item"===i(o))return o}(m);if(!g)return;const h=a(m),_=p[p.length-1],x=s(h).slice(l(_)+1);return e.batch((()=>{if(x.length){let e=s(m)[0];if(!e){const t=(0,st.cloneBlock)(u(h),{},[]);e=t.clientId,n(t,0,m,!1),r(e,d(h))}t(x,h,e)}if(t(p,h,a(g),l(g)+1),!s(h).length){o(h,!1)}})),!0}),[])}function kg(e,t){const o=(0,lt.useRegistry)(),{getPreviousBlockClientId:n,getNextBlockClientId:r,getBlockOrder:a,getBlockRootClientId:i,getBlockName:s}=(0,lt.useSelect)(ct.store),{mergeBlocks:l,moveBlocksToPosition:c}=(0,lt.useDispatch)(ct.store),u=vg();function d(e){const t=a(e);return t.length?d(t[t.length-1]):e}function p(e){const t=i(e),o=i(t);if(o&&"core/list-item"===s(o))return o}function m(e){const t=r(e);if(t)return t;const o=p(e);return o?m(o):void 0}function g(e){const t=a(e);return t.length?a(t[0])[0]:m(e)}return r=>{function s(e,t){o.batch((()=>{const[o]=a(t);o&&(n(t)!==e||a(e).length?c(a(o),o,i(e)):c([o],t,e)),l(e,t)}))}if(r){const o=g(e);if(!o)return void t(r);p(o)?u(o):s(e,o)}else{const o=n(e);if(p(e))u(e);else if(o){s(d(o),e)}else t(r)}}}function wg({clientId:e}){const t=yg(e),o=vg(),{canIndent:n,canOutdent:r}=(0,lt.useSelect)((t=>{const{getBlockIndex:o,getBlockRootClientId:n,getBlockName:r}=t(ct.store);return{canIndent:o(e)>0,canOutdent:"core/list-item"===r(n(n(e)))}}),[e]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Fm:Em,title:(0,pt.__)("Outdent"),shortcut:mn.displayShortcut.shift("Tab"),description:(0,pt.__)("Outdent list item"),disabled:!r,onClick:()=>o()}),(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?bg:fg,title:(0,pt.__)("Indent"),shortcut:"Tab",description:(0,pt.__)("Indent list item"),disabled:!n,onClick:()=>t()})]})}const Cg={to:[{type:"block",blocks:["core/paragraph"],transform:(e,t=[])=>[(0,st.createBlock)("core/paragraph",e),...t.map((e=>(0,st.cloneBlock)(e)))]}]};var jg=Cg;const{name:Sg}=xg,Bg={icon:_g,edit:function({attributes:e,setAttributes:t,clientId:o,mergeBlocks:n}){const{placeholder:r,content:a}=e,i=(0,ct.useBlockProps)(),s=(0,ct.useInnerBlocksProps)(i,{renderAppender:!1,__unstableDisableDropZone:!0}),l=function(e){const{replaceBlocks:t,selectionChange:o}=(0,lt.useDispatch)(ct.store),{getBlock:n,getBlockRootClientId:r,getBlockIndex:a,getBlockName:i}=(0,lt.useSelect)(ct.store),s=(0,gt.useRef)(e);s.current=e;const l=vg();return(0,xt.useRefEffect)((e=>{function c(e){if(e.defaultPrevented||e.keyCode!==mn.ENTER)return;const{content:c,clientId:u}=s.current;if(c.length)return;if(e.preventDefault(),"core/list-item"===i(r(r(s.current.clientId))))return void l();const d=n(r(u)),p=a(u),m=(0,st.cloneBlock)({...d,innerBlocks:d.innerBlocks.slice(0,p)}),g=(0,st.createBlock)((0,st.getDefaultBlockName)()),h=[...d.innerBlocks[p].innerBlocks[0]?.innerBlocks||[],...d.innerBlocks.slice(p+1)],_=h.length?[(0,st.cloneBlock)({...d,innerBlocks:h})]:[];t(d.clientId,[m,g,..._],1),o(g.clientId)}return e.addEventListener("keydown",c),()=>{e.removeEventListener("keydown",c)}}),[])}({content:a,clientId:o}),c=function(e){const{getSelectionStart:t,getSelectionEnd:o,getBlockIndex:n}=(0,lt.useSelect)(ct.store),r=yg(e),a=vg();return(0,xt.useRefEffect)((i=>{function s(i){const{keyCode:s,shiftKey:l,altKey:c,metaKey:u,ctrlKey:d}=i;if(i.defaultPrevented||s!==mn.SPACE&&s!==mn.TAB||c||u||d)return;const p=t(),m=o();0===p.offset&&0===m.offset&&(l?s===mn.TAB&&a()&&i.preventDefault():0!==n(e)&&r()&&i.preventDefault())}return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}}),[e,r])}(o),u=kg(o,n);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)("li",{...s,children:[(0,it.jsx)(ct.RichText,{ref:(0,xt.useMergeRefs)([l,c]),identifier:"content",tagName:"div",onChange:e=>t({content:e}),value:a,"aria-label":(0,pt.__)("List text"),placeholder:r||(0,pt.__)("List"),onMerge:u}),s.children]}),(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(wg,{clientId:o})})]})},save:function({attributes:e}){return(0,it.jsxs)("li",{...ct.useBlockProps.save(),children:[(0,it.jsx)(ct.RichText.Content,{value:e.content}),(0,it.jsx)(ct.InnerBlocks.Content,{})]})},merge:(e,t)=>({...e,content:e.content+t.content}),transforms:jg,[jo(ct.privateApis).requiresWrapperOnCopy]:!0},Tg=()=>jt({name:Sg,metadata:xg,settings:Bg});var Ng=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11 14.5l1.1 1.1 3-3 .5-.5-.6-.6-3-3-1 1 1.7 1.7H5v1.5h7.7L11 14.5zM16.8 5h-7c-1.1 0-2 .9-2 2v1.5h1.5V7c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v10c0 .3-.2.5-.5.5h-7c-.3 0-.5-.2-.5-.5v-1.5H7.8V17c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2z"})});const Pg=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/loginout","title":"Login/out","category":"theme","description":"Show login & logout links.","keywords":["login","logout","form"],"textdomain":"default","attributes":{"displayLoginAsForm":{"type":"boolean","default":false},"redirectToCurrent":{"type":"boolean","default":true}},"example":{"viewportWidth":350},"supports":{"className":true,"color":{"background":true,"text":false,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-loginout"}'),{name:Ig}=Pg,Dg={icon:Ng,edit:function({attributes:e,setAttributes:t}){const{displayLoginAsForm:o,redirectToCurrent:n}=e,r=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayLoginAsForm:!1,redirectToCurrent:!0})},dropdownMenuProps:r,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display login as form"),isShownByDefault:!0,hasValue:()=>o,onDeselect:()=>t({displayLoginAsForm:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display login as form"),checked:o,onChange:()=>t({displayLoginAsForm:!o})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Redirect to current URL"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>t({redirectToCurrent:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Redirect to current URL"),checked:n,onChange:()=>t({redirectToCurrent:!n})})})]})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)({className:"logged-in"}),children:(0,it.jsx)("a",{href:"#login-pseudo-link",children:(0,pt.__)("Log out")})})]})}},Mg=()=>jt({name:Ig,metadata:Pg,settings:Dg});var zg=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z"})});const Ag="full",Lg=[["core/paragraph",{placeholder:(0,pt._x)("Content…","content placeholder")}]],Hg=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${100*t.x}% ${100*t.y}%`:"50% 50%"}:{},Rg=(e,t)=>e?{backgroundImage:`url(${e})`,backgroundPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{},Vg=50,Fg=()=>{},Eg=e=>{if(!e.customBackgroundColor)return e;const t={color:{background:e.customBackgroundColor}},{customBackgroundColor:o,...n}=e;return{...n,style:t}},Og=e=>e.align?e:{...e,align:"wide"},Gg={align:{type:"string",default:"wide"},mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:""},mediaPosition:{type:"string",default:"left"},mediaId:{type:"number"},mediaType:{type:"string"},mediaWidth:{type:"number",default:50},isStackedOnMobile:{type:"boolean",default:!1}},$g={...Gg,isStackedOnMobile:{type:"boolean",default:!0},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},mediaSizeSlug:{type:"string"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},Ug={...$g,mediaAlt:{type:"string",source:"attribute",selector:"figure img",attribute:"alt",default:"",role:"content"},mediaId:{type:"number",role:"content"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src",role:"content"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href",role:"content"},mediaType:{type:"string",role:"content"}},qg={...Ug,align:{type:"string",default:"none"},useFeaturedImage:{type:"boolean",default:!1}},Wg={anchor:!0,align:["wide","full"],html:!1,color:{gradients:!0,link:!0}},Zg={...Wg,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}}},Jg={attributes:qg,supports:{...Zg,__experimentalBorder:{color:!0,radius:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,radius:!0,style:!0,width:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},interactivity:{clientNavigation:!0}},usesContext:["postId","postType"],save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Ag,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=a?(0,it.jsx)("img",{src:a,alt:o,className:x||null}):null;p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Rg(a,u):{};let k;i!==Vg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})}},Qg={attributes:Ug,supports:Zg,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Ag,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,it.jsx)("img",{src:a,alt:o,className:x||null});p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Rg(a,u):{};let k;i!==Vg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Og,isEligible(e,t,{block:o}){const{attributes:n}=o;return void 0===e.align&&!!n.className?.includes("alignwide")}},Kg={attributes:$g,supports:Wg,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Ag,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,it.jsx)("img",{src:a,alt:o,className:x||null});p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Hg(a,u):{};let k;i!==Vg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Og},Yg={attributes:$g,supports:Wg,save({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Ag,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r});let b=(0,it.jsx)("img",{src:a,alt:o,className:x||null});p&&(b=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},y=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill":c}),v=c?Hg(a,u):{};let k;i!==Vg&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return(0,it.jsxs)("div",{...ct.useBlockProps.save({className:y,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:v,children:(f[r]||Fg)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},migrate:Og},Xg={attributes:{...Gg,isStackedOnMobile:{type:"boolean",default:!0},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaLink:{type:"string"},linkDestination:{type:"string"},linkTarget:{type:"string",source:"attribute",selector:"figure a",attribute:"target"},href:{type:"string",source:"attribute",selector:"figure a",attribute:"href"},rel:{type:"string",source:"attribute",selector:"figure a",attribute:"rel"},linkClass:{type:"string",source:"attribute",selector:"figure a",attribute:"class"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,xt.compose)(Eg,Og),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p,linkClass:m,href:g,linkTarget:h,rel:_}=e,x=_||void 0;let b=(0,it.jsx)("img",{src:s,alt:r,className:c&&"image"===i?`wp-image-${c}`:null});g&&(b=(0,it.jsx)("a",{className:m,href:g,target:h,rel:x,children:b}));const f={image:()=>b,video:()=>(0,it.jsx)("video",{controls:!0,src:s})},y=(0,ct.getColorClassName)("background-color",t),v=Dt({"has-media-on-the-right":"right"===a,"has-background":y||o,[y]:y,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),k=d?Hg(s,p):{};let w;l!==Vg&&(w="right"===a?`auto ${l}%`:`${l}% auto`);const C={backgroundColor:y?void 0:o,gridTemplateColumns:w};return(0,it.jsxs)("div",{className:v,style:C,children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:k,children:(f[i]||Fg)()}),(0,it.jsx)("div",{className:"wp-block-media-text__content",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})}},eh={attributes:{...Gg,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"},verticalAlignment:{type:"string"},imageFill:{type:"boolean"},focalPoint:{type:"object"}},migrate:(0,xt.compose)(Eg,Og),save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l,mediaId:c,verticalAlignment:u,imageFill:d,focalPoint:p}=e,m={image:()=>(0,it.jsx)("img",{src:s,alt:r,className:c&&"image"===i?`wp-image-${c}`:null}),video:()=>(0,it.jsx)("video",{controls:!0,src:s})},g=(0,ct.getColorClassName)("background-color",t),h=Dt({"has-media-on-the-right":"right"===a,[g]:g,"is-stacked-on-mobile":n,[`is-vertically-aligned-${u}`]:u,"is-image-fill":d}),_=d?Hg(s,p):{};let x;l!==Vg&&(x="right"===a?`auto ${l}%`:`${l}% auto`);const b={backgroundColor:g?void 0:o,gridTemplateColumns:x};return(0,it.jsxs)("div",{className:h,style:b,children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",style:_,children:(m[i]||Fg)()}),(0,it.jsx)("div",{className:"wp-block-media-text__content",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})}},th={attributes:{...Gg,backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},mediaUrl:{type:"string",source:"attribute",selector:"figure video,figure img",attribute:"src"}},migrate:Og,save({attributes:e}){const{backgroundColor:t,customBackgroundColor:o,isStackedOnMobile:n,mediaAlt:r,mediaPosition:a,mediaType:i,mediaUrl:s,mediaWidth:l}=e,c={image:()=>(0,it.jsx)("img",{src:s,alt:r}),video:()=>(0,it.jsx)("video",{controls:!0,src:s})},u=(0,ct.getColorClassName)("background-color",t),d=Dt({"has-media-on-the-right":"right"===a,[u]:u,"is-stacked-on-mobile":n});let p;l!==Vg&&(p="right"===a?`auto ${l}%`:`${l}% auto`);const m={backgroundColor:u?void 0:o,gridTemplateColumns:p};return(0,it.jsxs)("div",{className:d,style:m,children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",children:(c[i]||Fg)()}),(0,it.jsx)("div",{className:"wp-block-media-text__content",children:(0,it.jsx)(ct.InnerBlocks.Content,{})})]})}};var oh=[Jg,Qg,Kg,Yg,Xg,eh,th],nh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 18h6V6H4v12zm9-9.5V10h7V8.5h-7zm0 7h7V14h-7v1.5z"})}),rh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M14 6v12h6V6h-6zM4 10h7V8.5H4V10zm0 5.5h7V14H4v1.5z"})}),ah=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]});function ih(e,t){return e?{objectPosition:t?`${Math.round(100*t.x)}% ${Math.round(100*t.y)}%`:"50% 50%"}:{}}const sh=["image","video"],lh=()=>{},ch=(0,gt.forwardRef)((({isSelected:e,isStackedOnMobile:t,...o},n)=>{const r=(0,xt.useViewportMatch)("small","<");return(0,it.jsx)(mt.ResizableBox,{ref:n,showHandle:e&&(!r||!t),...o})}));function uh({mediaId:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n,useFeaturedImage:r}){return(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:e,mediaURL:t,allowedTypes:sh,accept:"image/*,video/*",onSelect:o,onToggleFeaturedImage:n,useFeaturedImage:r,onReset:()=>o(void 0)})})}function dh({className:e,mediaUrl:t,onSelectMedia:o,toggleUseFeaturedImage:n}){const{createErrorNotice:r}=(0,lt.useDispatch)(bo.store);return(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:ah}),labels:{title:(0,pt.__)("Media area")},className:e,onSelect:o,accept:"image/*,video/*",onToggleFeaturedImage:n,allowedTypes:sh,onError:e=>{r(e,{type:"snackbar"})},disableMediaButtons:t})}var ph=(0,gt.forwardRef)((function(e,t){const{className:o,commitWidthChange:n,focalPoint:r,imageFill:a,isSelected:i,isStackedOnMobile:s,mediaAlt:l,mediaId:c,mediaPosition:u,mediaType:d,mediaUrl:p,mediaWidth:m,onSelectMedia:g,onWidthChange:h,enableResize:_,toggleUseFeaturedImage:x,useFeaturedImage:b,featuredImageURL:f,featuredImageAlt:y,refMedia:v}=e,k=!c&&(0,ht.isBlobURL)(p),{toggleSelection:w}=(0,lt.useDispatch)(ct.store);if(p||f||b){const C=()=>{w(!1)},j=(e,t,o)=>{h(parseInt(o.style.width))},S=(e,t,o)=>{w(!0),n(parseInt(o.style.width))},B={right:_&&"left"===u,left:_&&"right"===u},T="image"===d&&a?ih(p||f,r):{},N={image:()=>b&&f?(0,it.jsx)("img",{ref:v,src:f,alt:y,style:T}):p&&(0,it.jsx)("img",{ref:v,src:p,alt:l,style:T}),video:()=>(0,it.jsx)("video",{controls:!0,ref:v,src:p})};return(0,it.jsxs)(ch,{as:"figure",className:Dt(o,"editor-media-container__resizer",{"is-transient":k}),size:{width:m+"%"},minWidth:"10%",maxWidth:"100%",enable:B,onResizeStart:C,onResize:j,onResizeStop:S,axis:"x",isSelected:i,isStackedOnMobile:s,ref:t,children:[(0,it.jsx)(uh,{onSelectMedia:g,mediaUrl:b&&f?f:p,mediaId:c,toggleUseFeaturedImage:x,useFeaturedImage:b}),(N[d]||lh)(),k&&(0,it.jsx)(mt.Spinner,{}),!b&&(0,it.jsx)(dh,{...e}),!f&&b&&(0,it.jsx)(mt.Placeholder,{className:"wp-block-media-text--placeholder-image",style:T,withIllustration:!0})]})}return(0,it.jsx)(dh,{...e})}));const{ResolutionTool:mh}=jo(ct.privateApis),gh=e=>Math.max(15,Math.min(e,85));function hh(e,t){return e?.media_details?.sizes?.[t]?.source_url}function _h({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const r=n.filter((({slug:t})=>hh(e,t))).map((({name:e,slug:t})=>({value:t,label:e})));return(0,it.jsx)(mh,{value:t,defaultValue:Ag,options:r,onChange:o})}var xh=function({attributes:e,isSelected:t,setAttributes:o,context:{postId:n,postType:r}}){const{focalPoint:a,href:i,imageFill:s,isStackedOnMobile:l,linkClass:c,linkDestination:u,linkTarget:d,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:_,mediaWidth:x,mediaSizeSlug:b,rel:f,verticalAlignment:y,allowedBlocks:v,useFeaturedImage:k}=e,[w]=(0,_t.useEntityProp)("postType",r,"featured_media",n),{featuredImageMedia:C}=(0,lt.useSelect)((e=>({featuredImageMedia:w&&k?e(_t.store).getEntityRecord("postType","attachment",w,{context:"view"}):void 0})),[w,k]),{image:j}=(0,lt.useSelect)((e=>({image:m&&t?e(_t.store).getEntityRecord("postType","attachment",m,{context:"view"}):null})),[t,m]),S=k?C?.source_url:"",B=k?C?.alt_text:"",T=(0,gt.useRef)(),N=e=>{const{style:t}=T.current,{x:o,y:n}=e;t.objectPosition=`${100*o}% ${100*n}%`},[P,I]=(0,gt.useState)(null),D=function({attributes:{linkDestination:e,href:t},setAttributes:o}){return n=>{if(!n||!n.url)return void o({mediaAlt:void 0,mediaId:void 0,mediaType:void 0,mediaUrl:void 0,mediaLink:void 0,href:void 0,focalPoint:void 0,useFeaturedImage:!1});let r,a;(0,ht.isBlobURL)(n.url)&&(n.type=(0,ht.getBlobTypeByURL)(n.url)),r=n.media_type?"image"===n.media_type?"image":"video":n.type,"image"===r&&(a=n.sizes?.large?.url||n.media_details?.sizes?.large?.source_url);let i=t;"media"===e&&(i=n.url),"attachment"===e&&(i=n.link),o({mediaAlt:n.alt,mediaId:n.id,mediaType:r,mediaUrl:a||n.url,mediaLink:n.link||void 0,href:i,focalPoint:void 0,useFeaturedImage:!1})}}({attributes:e,setAttributes:o}),M=e=>{o({mediaWidth:gh(e)}),I(null)},z=Dt({"has-media-on-the-right":"right"===g,"is-selected":t,"is-stacked-on-mobile":l,[`is-vertically-aligned-${y}`]:y,"is-image-fill-element":s}),A=`${P||x}%`,L="right"===g?`1fr ${A}`:`${A} 1fr`,H={gridTemplateColumns:L,msGridColumns:L},R=e=>{const t=hh(j,e);if(!t)return null;o({mediaUrl:t,mediaSizeSlug:e})},V=vt(),F=(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({isStackedOnMobile:!0,imageFill:!1,mediaAlt:"",focalPoint:void 0,mediaWidth:50}),R(Ag)},dropdownMenuProps:V,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Media width"),isShownByDefault:!0,hasValue:()=>50!==x,onDeselect:()=>o({mediaWidth:50}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Media width"),value:P||x,onChange:M,min:15,max:85})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Stack on mobile"),isShownByDefault:!0,hasValue:()=>!l,onDeselect:()=>o({isStackedOnMobile:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Stack on mobile"),checked:l,onChange:()=>o({isStackedOnMobile:!l})})}),"image"===h&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Crop image to fill"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({imageFill:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Crop image to fill"),checked:!!s,onChange:()=>o({imageFill:!s})})}),s&&(_||S)&&"image"===h&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Focal point"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>o({focalPoint:void 0}),children:(0,it.jsx)(mt.FocalPointPicker,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Focal point"),url:k&&S?S:_,value:a,onChange:e=>o({focalPoint:e}),onDragStart:N,onDrag:N})}),"image"===h&&_&&!k&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Alternative text"),isShownByDefault:!0,hasValue:()=>!!p,onDeselect:()=>o({mediaAlt:""}),children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Alternative text"),value:p,onChange:e=>{o({mediaAlt:e})},help:(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.ExternalLink,{href:(0,pt.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,pt.__)("Describe the purpose of the image.")}),(0,it.jsx)("br",{}),(0,pt.__)("Leave empty if decorative.")]})})}),"image"===h&&!k&&(0,it.jsx)(_h,{image:j,value:b,onChange:R})]}),E=(0,ct.useBlockProps)({className:z,style:H}),O=(0,ct.useInnerBlocksProps)({className:"wp-block-media-text__content"},{template:Lg,allowedBlocks:v}),G=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:F}),(0,it.jsxs)(ct.BlockControls,{group:"block",children:["default"===G&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockVerticalAlignmentControl,{onChange:e=>{o({verticalAlignment:e})},value:y}),(0,it.jsx)(mt.ToolbarButton,{icon:nh,title:(0,pt.__)("Show media on left"),isActive:"left"===g,onClick:()=>o({mediaPosition:"left"})}),(0,it.jsx)(mt.ToolbarButton,{icon:rh,title:(0,pt.__)("Show media on right"),isActive:"right"===g,onClick:()=>o({mediaPosition:"right"})})]}),"image"===h&&!k&&(0,it.jsx)(ct.__experimentalImageURLInputUI,{url:i||"",onChangeUrl:e=>{o(e)},linkDestination:u,mediaType:h,mediaUrl:j&&j.source_url,mediaLink:j&&j.link,linkTarget:d,linkClass:c,rel:f})]}),(0,it.jsxs)("div",{...E,children:["right"===g&&(0,it.jsx)("div",{...O}),(0,it.jsx)(ph,{className:"wp-block-media-text__media",onSelectMedia:D,onWidthChange:e=>{I(gh(e))},commitWidthChange:M,refMedia:T,enableResize:"default"===G,toggleUseFeaturedImage:()=>{o({imageFill:!1,mediaType:"image",mediaId:void 0,mediaUrl:void 0,mediaAlt:void 0,mediaLink:void 0,linkDestination:void 0,linkTarget:void 0,linkClass:void 0,rel:void 0,href:void 0,useFeaturedImage:!k})},focalPoint:a,imageFill:s,isSelected:t,isStackedOnMobile:l,mediaAlt:p,mediaId:m,mediaPosition:g,mediaType:h,mediaUrl:_,mediaWidth:x,useFeaturedImage:k,featuredImageURL:S,featuredImageAlt:B}),"right"!==g&&(0,it.jsx)("div",{...O})]})]})};const bh=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/media-text","title":"Media & Text","category":"media","description":"Set media and words side-by-side for a richer layout.","keywords":["image","video"],"textdomain":"default","attributes":{"align":{"type":"string","default":"none"},"mediaAlt":{"type":"string","source":"attribute","selector":"figure img","attribute":"alt","default":"","role":"content"},"mediaPosition":{"type":"string","default":"left"},"mediaId":{"type":"number","role":"content"},"mediaUrl":{"type":"string","source":"attribute","selector":"figure video,figure img","attribute":"src","role":"content"},"mediaLink":{"type":"string"},"linkDestination":{"type":"string"},"linkTarget":{"type":"string","source":"attribute","selector":"figure a","attribute":"target"},"href":{"type":"string","source":"attribute","selector":"figure a","attribute":"href","role":"content"},"rel":{"type":"string","source":"attribute","selector":"figure a","attribute":"rel"},"linkClass":{"type":"string","source":"attribute","selector":"figure a","attribute":"class"},"mediaType":{"type":"string","role":"content"},"mediaWidth":{"type":"number","default":50},"mediaSizeSlug":{"type":"string"},"isStackedOnMobile":{"type":"boolean","default":true},"verticalAlignment":{"type":"string"},"imageFill":{"type":"boolean"},"focalPoint":{"type":"object"},"useFeaturedImage":{"type":"boolean","default":false}},"usesContext":["postId","postType"],"supports":{"anchor":true,"align":["wide","full"],"html":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"editorStyle":"wp-block-media-text-editor","style":"wp-block-media-text"}'),fh=()=>{};const yh={from:[{type:"block",blocks:["core/image"],transform:({alt:e,url:t,id:o,anchor:n})=>(0,st.createBlock)("core/media-text",{mediaAlt:e,mediaId:o,mediaUrl:t,mediaType:"image",anchor:n})},{type:"block",blocks:["core/video"],transform:({src:e,id:t,anchor:o})=>(0,st.createBlock)("core/media-text",{mediaId:t,mediaUrl:e,mediaType:"video",anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,alt:t,anchor:o,backgroundType:n,customGradient:r,customOverlayColor:a,gradient:i,id:s,overlayColor:l,style:c,textColor:u,url:d,useFeaturedImage:p},m)=>{let g={};return r?g={style:{color:{gradient:r}}}:a&&(g={style:{color:{background:a}}}),c?.color?.text&&(g.style={color:{...g.style?.color,text:c.color.text}}),(0,st.createBlock)("core/media-text",{align:e,anchor:o,backgroundColor:l,gradient:i,mediaAlt:t,mediaId:s,mediaType:n,mediaUrl:d,textColor:u,useFeaturedImage:p,...g},m)}}],to:[{type:"block",blocks:["core/image"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"image"===e,transform:({mediaAlt:e,mediaId:t,mediaUrl:o,anchor:n})=>(0,st.createBlock)("core/image",{alt:e,id:t,url:o,anchor:n})},{type:"block",blocks:["core/video"],isMatch:({mediaType:e,mediaUrl:t})=>!t||"video"===e,transform:({mediaId:e,mediaUrl:t,anchor:o})=>(0,st.createBlock)("core/video",{id:e,src:t,anchor:o})},{type:"block",blocks:["core/cover"],transform:({align:e,anchor:t,backgroundColor:o,focalPoint:n,gradient:r,mediaAlt:a,mediaId:i,mediaType:s,mediaUrl:l,style:c,textColor:u,useFeaturedImage:d},p)=>{const m={};c?.color?.gradient?m.customGradient=c.color.gradient:c?.color?.background&&(m.customOverlayColor=c.color.background),c?.color?.text&&(m.style={color:{text:c.color.text}});const g={align:e,alt:a,anchor:t,backgroundType:s,dimRatio:l||d?50:100,focalPoint:n,gradient:r,id:i,overlayColor:o,textColor:u,url:l,useFeaturedImage:d,...m};return(0,st.createBlock)("core/cover",g,p)}}]};var vh=yh;const{name:kh}=bh,wh={icon:zg,example:{viewportWidth:601,attributes:{mediaType:"image",mediaUrl:"https://s.w.org/images/core/5.3/Biologia_Centrali-Americana_-_Cantorchilus_semibadius_1902.jpg"},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("The wren<br>Earns his living<br>Noiselessly.")}},{name:"core/paragraph",attributes:{content:(0,pt.__)("— Kobayashi Issa (一茶)")}}]},transforms:vh,edit:xh,save:function({attributes:e}){const{isStackedOnMobile:t,mediaAlt:o,mediaPosition:n,mediaType:r,mediaUrl:a,mediaWidth:i,mediaId:s,verticalAlignment:l,imageFill:c,focalPoint:u,linkClass:d,href:p,linkTarget:m,rel:g}=e,h=e.mediaSizeSlug||Ag,_=g||void 0,x=Dt({[`wp-image-${s}`]:s&&"image"===r,[`size-${h}`]:s&&"image"===r}),b=c?ih(a,u):{};let f=a?(0,it.jsx)("img",{src:a,alt:o,className:x||null,style:b}):null;p&&(f=(0,it.jsx)("a",{className:d,href:p,target:m,rel:_,children:f}));const y={image:()=>f,video:()=>(0,it.jsx)("video",{controls:!0,src:a})},v=Dt({"has-media-on-the-right":"right"===n,"is-stacked-on-mobile":t,[`is-vertically-aligned-${l}`]:l,"is-image-fill-element":c});let k;50!==i&&(k="right"===n?`auto ${i}%`:`${i}% auto`);const w={gridTemplateColumns:k};return"right"===n?(0,it.jsxs)("div",{...ct.useBlockProps.save({className:v,style:w}),children:[(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})}),(0,it.jsx)("figure",{className:"wp-block-media-text__media",children:(y[r]||fh)()})]}):(0,it.jsxs)("div",{...ct.useBlockProps.save({className:v,style:w}),children:[(0,it.jsx)("figure",{className:"wp-block-media-text__media",children:(y[r]||fh)()}),(0,it.jsx)("div",{...ct.useInnerBlocksProps.save({className:"wp-block-media-text__content"})})]})},deprecated:oh},Ch=()=>jt({name:kh,metadata:bh,settings:wh});const jh=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/missing","title":"Unsupported","category":"text","description":"Your site doesn’t include support for this block.","textdomain":"default","attributes":{"originalName":{"type":"string"},"originalUndelimitedContent":{"type":"string"},"originalContent":{"type":"string","source":"raw"}},"supports":{"className":false,"customClassName":false,"inserter":false,"html":false,"lock":false,"reusable":false,"renaming":false,"blockVisibility":false,"interactivity":{"clientNavigation":true}}}');const{name:Sh}=jh,Bh={name:Sh,__experimentalLabel(e,{context:t}){if("accessibility"===t){const{originalName:t}=e,o=t?(0,st.getBlockType)(t):void 0;return o?o.settings.title||t:""}},edit:function({attributes:e,clientId:t}){const{originalName:o,originalUndelimitedContent:n}=e,r=!!n,{hasFreeformBlock:a,hasHTMLBlock:i}=(0,lt.useSelect)((e=>{const{canInsertBlockType:o,getBlockRootClientId:n}=e(ct.store);return{hasFreeformBlock:o("core/freeform",n(t)),hasHTMLBlock:o("core/html",n(t))}}),[t]),{replaceBlock:s}=(0,lt.useDispatch)(ct.store),l=[];let c;const u=(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:function(){s(t,(0,st.createBlock)("core/html",{content:n}))},variant:"primary",children:(0,pt.__)("Keep as HTML")},"convert");return!r||a||o?r&&i?(c=(0,pt.sprintf)((0,pt.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is, convert it to custom HTML, or remove it.'),o),l.push(u)):c=(0,pt.sprintf)((0,pt.__)('Your site doesn’t include support for the "%s" block. You can leave it as-is or remove it.'),o):i?(c=(0,pt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, convert its content to a Custom HTML block, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),l.push(u)):c=(0,pt.__)("It appears you are trying to use the deprecated Classic block. You can leave this block intact, or remove it entirely. Alternatively, you can refresh the page to use the Classic block."),(0,it.jsxs)("div",{...(0,ct.useBlockProps)({className:"has-warning"}),children:[(0,it.jsx)(ct.Warning,{actions:l,children:c}),(0,it.jsx)(gt.RawHTML,{children:(0,lu.safeHTML)(n)})]})},save:function({attributes:e}){return(0,it.jsx)(gt.RawHTML,{children:e.originalContent})}},Th=()=>jt({name:Sh,metadata:jh,settings:Bh});var Nh=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4 9v1.5h16V9H4zm12 5.5h4V13h-4v1.5zm-6 0h4V13h-4v1.5zm-6 0h4V13H4v1.5z"})});const Ph=(0,pt.__)("Read more");const Ih=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/more","title":"More","category":"design","description":"Content before this block will be shown in the excerpt on your archives page.","keywords":["read more"],"textdomain":"default","attributes":{"customText":{"type":"string","default":"","role":"content"},"noTeaser":{"type":"boolean","default":false}},"supports":{"customClassName":false,"className":false,"html":false,"multiple":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-more-editor"}');var Dh={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/more"===e.dataset.block,transform(e){const{customText:t,noTeaser:o}=e.dataset,n={};return t&&(n.customText=t),""===o&&(n.noTeaser=!0),(0,st.createBlock)("core/more",n)}}]};const{name:Mh}=Ih,zh={icon:Nh,example:{},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;return"list-view"===t&&o?o:"accessibility"===t?e.customText:void 0},transforms:Dh,edit:function({attributes:{customText:e,noTeaser:t},insertBlocksAfter:o,setAttributes:n}){const r=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({noTeaser:!1})},dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Hide excerpt"),isShownByDefault:!0,hasValue:()=>t,onDeselect:()=>n({noTeaser:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Hide the excerpt on the full content page"),checked:!!t,onChange:()=>n({noTeaser:!t}),help:e=>e?(0,pt.__)("The excerpt is hidden."):(0,pt.__)("The excerpt is visible.")})})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)('"Read more" text'),value:e,placeholder:Ph,onChange:e=>n({customText:e}),disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,st.createBlock)((0,st.getDefaultBlockName)()))})})]})},save:function({attributes:{customText:e,noTeaser:t}}){const o=e?`\x3c!--more ${e}--\x3e`:"\x3c!--more--\x3e",n=t?"\x3c!--noteaser--\x3e":"";return(0,it.jsx)(gt.RawHTML,{children:[o,n].filter(Boolean).join("\n")})}},Ah=()=>jt({name:Mh,metadata:Ih,settings:zh});var Lh=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})});const Hh=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation","title":"Navigation","category":"theme","allowedBlocks":["core/navigation-link","core/search","core/social-links","core/page-list","core/spacer","core/home-link","core/site-title","core/site-logo","core/navigation-submenu","core/loginout","core/buttons"],"description":"A collection of blocks that allow visitors to get around your site.","keywords":["menu","navigation","links"],"textdomain":"default","attributes":{"ref":{"type":"number"},"textColor":{"type":"string"},"customTextColor":{"type":"string"},"rgbTextColor":{"type":"string"},"backgroundColor":{"type":"string"},"customBackgroundColor":{"type":"string"},"rgbBackgroundColor":{"type":"string"},"showSubmenuIcon":{"type":"boolean","default":true},"openSubmenusOnClick":{"type":"boolean","default":false},"overlayMenu":{"type":"string","default":"mobile"},"icon":{"type":"string","default":"handle"},"hasIcon":{"type":"boolean","default":true},"__unstableLocation":{"type":"string"},"overlayBackgroundColor":{"type":"string"},"customOverlayBackgroundColor":{"type":"string"},"overlayTextColor":{"type":"string"},"customOverlayTextColor":{"type":"string"},"maxNestingLevel":{"type":"number","default":5},"templateLock":{"type":["string","boolean"],"enum":["all","insert","contentOnly",false]}},"providesContext":{"textColor":"textColor","customTextColor":"customTextColor","backgroundColor":"backgroundColor","customBackgroundColor":"customBackgroundColor","overlayTextColor":"overlayTextColor","customOverlayTextColor":"customOverlayTextColor","overlayBackgroundColor":"overlayBackgroundColor","customOverlayBackgroundColor":"customOverlayBackgroundColor","fontSize":"fontSize","customFontSize":"customFontSize","showSubmenuIcon":"showSubmenuIcon","openSubmenusOnClick":"openSubmenusOnClick","style":"style","maxNestingLevel":"maxNestingLevel"},"supports":{"align":["wide","full"],"ariaLabel":true,"html":false,"inserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalTextTransform":true,"__experimentalFontFamily":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalSkipSerialization":["textDecoration"],"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"blockGap":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"allowSizingOnChildren":true,"default":{"type":"flex"}},"interactivity":true,"renaming":false,"contentRole":true},"editorStyle":"wp-block-navigation-editor","style":"wp-block-navigation"}'),Rh=window.wp.a11y;var Vh=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,it.jsx)(St.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Fh=(0,gt.forwardRef)((({icon:e,size:t=24,...o},n)=>(0,gt.cloneElement)(e,{width:t,height:t,...o,ref:n}))),Eh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z"})});const Oh={name:"core/navigation-link",attributes:{kind:"post-type",type:"page"}},Gh=["core/navigation-link/page","core/navigation-link"],$h={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"},Uh=["postType","wp_navigation",$h];function qh(e){const t=(0,_t.useResourcePermissions)({kind:"postType",name:"wp_navigation",id:e}),{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:r}=(0,lt.useSelect)((t=>function(e,t){if(!t)return{isNavigationMenuResolved:!1,isNavigationMenuMissing:!0};const{getEntityRecord:o,getEditedEntityRecord:n,hasFinishedResolution:r}=e(_t.store),a=["postType","wp_navigation",t],i=o(...a),s=n(...a),l=r("getEditedEntityRecord",a),c="publish"===s.status||"draft"===s.status;return{isNavigationMenuResolved:l,isNavigationMenuMissing:l&&(!i||!c),navigationMenu:c?s:null}}(t,e)),[e]),{canCreate:a,canUpdate:i,canDelete:s,isResolving:l,hasResolved:c}=t,{records:u,isResolving:d,hasResolved:p}=(0,_t.useEntityRecords)("postType","wp_navigation",$h);return{navigationMenu:o,isNavigationMenuResolved:n,isNavigationMenuMissing:r,navigationMenus:u,isResolvingNavigationMenus:d,hasResolvedNavigationMenus:p,canSwitchNavigationMenu:e?u?.length>1:u?.length>0,canUserCreateNavigationMenus:a,isResolvingCanUserCreateNavigationMenus:l,hasResolvedCanUserCreateNavigationMenus:c,canUserUpdateNavigationMenu:i,hasResolvedCanUserUpdateNavigationMenu:e?c:void 0,canUserDeleteNavigationMenu:s,hasResolvedCanUserDeleteNavigationMenu:e?c:void 0}}function Wh(e){const{records:t,isResolving:o,hasResolved:n}=(0,_t.useEntityRecords)("root","menu",{per_page:-1,context:"view"}),{records:r,isResolving:a,hasResolved:i}=(0,_t.useEntityRecords)("postType","page",{parent:0,order:"asc",orderby:"id",per_page:-1,context:"view"}),{records:s,hasResolved:l}=(0,_t.useEntityRecords)("root","menuItem",{menus:e,per_page:-1,context:"view"},{enabled:!!e});return{pages:r,isResolvingPages:a,hasResolvedPages:i,hasPages:!(!i||!r?.length),menus:t,isResolvingMenus:o,hasResolvedMenus:n,hasMenus:!(!n||!t?.length),menuItems:s,hasResolvedMenuItems:l}}var Zh=({isVisible:e=!0})=>(0,it.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__preview",children:(0,it.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,it.jsx)(Fh,{icon:Lh}),(0,pt.__)("Navigation")]})}),Jh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});var Qh=function({currentMenuId:e,onSelectNavigationMenu:t,onSelectClassicMenu:o,onCreateNew:n,actionLabel:r,createNavigationMenuIsSuccess:a,createNavigationMenuIsError:i}){const s=(0,pt.__)("Create from '%s'"),[l,c]=(0,gt.useState)(!1);r=r||s;const{menus:u}=Wh(),{navigationMenus:d,isResolvingNavigationMenus:p,hasResolvedNavigationMenus:m,canUserCreateNavigationMenus:g,canSwitchNavigationMenu:h,isNavigationMenuMissing:_}=qh(e),[x]=(0,_t.useEntityProp)("postType","wp_navigation","title"),b=(0,gt.useMemo)((()=>d?.map((({id:e,title:t,status:o},n)=>{const a=function(e,t,o){return e?"publish"===o?(0,ao.decodeEntities)(e):(0,pt.sprintf)((0,pt.__)("%1$s (%2$s)"),(0,ao.decodeEntities)(e),o):(0,pt.sprintf)((0,pt.__)("(no title %s)"),t)}(t?.rendered,n+1,o);return{value:e,label:a,ariaLabel:(0,pt.sprintf)(r,a),disabled:l||p||!m}}))||[]),[d,r,p,m,l]),f=!!d?.length,y=!!u?.length,v=!!h,k=!!g,w=f&&!e,C=!f&&m,j=m&&null===e,S=e&&_;let B="";return B=p?(0,pt.__)("Loading…"):w||C||j||S?(0,pt.__)("Choose or create a Navigation Menu"):x,(0,gt.useEffect)((()=>{l&&(a||i)&&c(!1)}),[m,a,g,i,l,j,C,w]),(0,it.jsx)(mt.DropdownMenu,{label:B,icon:Jh,toggleProps:{size:"small"},children:({onClose:r})=>(0,it.jsxs)(it.Fragment,{children:[v&&f&&(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Menus"),children:(0,it.jsx)(mt.MenuItemsChoice,{value:e,onSelect:e=>{t(e),r()},choices:b})}),k&&y&&(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Import Classic Menus"),children:u?.map((e=>{const t=(0,ao.decodeEntities)(e.name);return(0,it.jsx)(mt.MenuItem,{onClick:async()=>{c(!0),await o(e),c(!1),r()},"aria-label":(0,pt.sprintf)(s,t),disabled:l||p||!m,children:t},e.id)}))}),g&&(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Tools"),children:(0,it.jsx)(mt.MenuItem,{onClick:async()=>{c(!0),await n(),c(!1),r()},disabled:l||p||!m,children:(0,pt.__)("Create new Menu")})})]})})};function Kh({isSelected:e,currentMenuId:t,clientId:o,canUserCreateNavigationMenus:n=!1,isResolvingCanUserCreateNavigationMenus:r,onSelectNavigationMenu:a,onSelectClassicMenu:i,onCreateEmpty:s}){const{isResolvingMenus:l,hasResolvedMenus:c}=Wh();(0,gt.useEffect)((()=>{e&&(l&&(0,Rh.speak)((0,pt.__)("Loading navigation block setup options…")),c&&(0,Rh.speak)((0,pt.__)("Navigation block setup options ready.")))}),[c,l,e]);const u=l&&r;return(0,it.jsx)(it.Fragment,{children:(0,it.jsxs)(mt.Placeholder,{className:"wp-block-navigation-placeholder",children:[(0,it.jsx)(Zh,{isVisible:!e}),(0,it.jsx)("div",{"aria-hidden":!e||void 0,className:"wp-block-navigation-placeholder__controls",children:(0,it.jsxs)("div",{className:"wp-block-navigation-placeholder__actions",children:[(0,it.jsxs)("div",{className:"wp-block-navigation-placeholder__actions__indicator",children:[(0,it.jsx)(Fh,{icon:Lh})," ",(0,pt.__)("Navigation")]}),(0,it.jsx)("hr",{}),u&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(Qh,{currentMenuId:t,clientId:o,onSelectNavigationMenu:a,onSelectClassicMenu:i}),(0,it.jsx)("hr",{}),n&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,pt.__)("Start empty")})]})})]})})}var Yh=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z"})});function Xh({icon:e}){return"menu"===e?(0,it.jsx)(Fh,{icon:Yh}):(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:[(0,it.jsx)(St.Rect,{x:"4",y:"7.5",width:"16",height:"1.5"}),(0,it.jsx)(St.Rect,{x:"4",y:"15",width:"16",height:"1.5"})]})}function e_({children:e,id:t,isOpen:o,isResponsive:n,onToggle:r,isHiddenByDefault:a,overlayBackgroundColor:i,overlayTextColor:s,hasIcon:l,icon:c}){if(!n)return e;const u=Dt("wp-block-navigation__responsive-container",{"has-text-color":!!s.color||!!s?.class,[(0,ct.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!i.color||i?.class,[(0,ct.getColorClassName)("background-color",i?.slug)]:!!i?.slug,"is-menu-open":o,"hidden-by-default":a}),d={color:!s?.slug&&s?.color,backgroundColor:!i?.slug&&i?.color&&i.color},p=Dt("wp-block-navigation__responsive-container-open",{"always-shown":a}),m=`${t}-modal`,g={className:"wp-block-navigation__responsive-dialog",...o&&{role:"dialog","aria-modal":!0,"aria-label":(0,pt.__)("Menu")}};return(0,it.jsxs)(it.Fragment,{children:[!o&&(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,"aria-haspopup":"true","aria-label":l&&(0,pt.__)("Open menu"),className:p,onClick:()=>r(!0),children:[l&&(0,it.jsx)(Xh,{icon:c}),!l&&(0,pt.__)("Menu")]}),(0,it.jsx)("div",{className:u,style:d,id:m,children:(0,it.jsx)("div",{className:"wp-block-navigation__responsive-close",tabIndex:"-1",children:(0,it.jsxs)("div",{...g,children:[(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation__responsive-container-close","aria-label":l&&(0,pt.__)("Close menu"),onClick:()=>r(!1),children:[l&&(0,it.jsx)(Fh,{icon:Eh}),!l&&(0,pt.__)("Close")]}),(0,it.jsx)("div",{className:"wp-block-navigation__responsive-container-content",id:`${m}-content`,children:e})]})})})]})}function t_({clientId:e,hasCustomPlaceholder:t,orientation:o,templateLock:n}){const{isImmediateParentOfSelectedBlock:r,selectedBlockHasChildren:a,isSelected:i,hasSelectedDescendant:s}=(0,lt.useSelect)((t=>{const{getBlockCount:o,hasSelectedInnerBlock:n,getSelectedBlockClientId:r}=t(ct.store),a=r();return{isImmediateParentOfSelectedBlock:n(e,!1),selectedBlockHasChildren:!!o(a),hasSelectedDescendant:n(e,!0),isSelected:a===e}}),[e]),[l,c,u]=(0,_t.useEntityBlockEditor)("postType","wp_navigation"),d=i||r&&!a,p=(0,gt.useMemo)((()=>(0,it.jsx)(Zh,{})),[]),m=!t&&!!!l?.length&&!i,g=(0,ct.useInnerBlocksProps)({className:"wp-block-navigation__container"},{value:l,onInput:c,onChange:u,prioritizedInserterBlocks:Gh,defaultBlock:Oh,directInsert:!0,orientation:o,templateLock:n,renderAppender:!!(i||r&&!a||s||d)&&ct.InnerBlocks.ButtonBlockAppender,placeholder:m?p:void 0,__experimentalCaptureToolbars:!0,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("div",{...g})}function o_(){const[e,t]=(0,_t.useEntityProp)("postType","wp_navigation","title");return(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Menu name"),value:e,onChange:t})}const n_=(e,t,o)=>{if(e===t)return!0;if("object"==typeof e&&null!=e&&"object"==typeof t&&null!=t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(o&&o(n,e))return!0;if(!n_(e[n],t[n],o))return!1}return!0}return!1},r_={};function a_({blocks:e,createNavigationMenu:t,hasSelection:o}){const n=(0,gt.useRef)();(0,gt.useEffect)((()=>{n?.current||(n.current=e)}),[e]);const r=function(e,t){return!n_(e,t,((e,t)=>{if("core/page-list"===t?.name&&"innerBlocks"===e)return!0}))}(n?.current,e),a=(0,gt.useContext)(mt.Disabled.Context),i=(0,ct.useInnerBlocksProps)({className:"wp-block-navigation__container"},{renderAppender:!!o&&void 0,defaultBlock:Oh,directInsert:!0}),{isSaving:s,hasResolvedAllNavigationMenus:l}=(0,lt.useSelect)((e=>{if(a)return r_;const{hasFinishedResolution:t,isSavingEntityRecord:o}=e(_t.store);return{isSaving:o("postType","wp_navigation"),hasResolvedAllNavigationMenus:t("getEntityRecords",Uh)}}),[a]);(0,gt.useEffect)((()=>{!a&&!s&&l&&o&&r&&t(null,e)}),[e,t,a,s,l,r,o]);const c=s?mt.Disabled:"div";return(0,it.jsx)(c,{...i})}function i_({onDelete:e}){const[t,o]=(0,gt.useState)(!1),n=(0,_t.useEntityId)("postType","wp_navigation"),{deleteEntityRecord:r}=(0,lt.useDispatch)(_t.store);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,className:"wp-block-navigation-delete-menu-button",variant:"secondary",isDestructive:!0,onClick:()=>{o(!0)},children:(0,pt.__)("Delete menu")}),t&&(0,it.jsx)(mt.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{r("postType","wp_navigation",n,{force:!0}),e()},onCancel:()=>{o(!1)},confirmButtonText:(0,pt.__)("Delete"),size:"medium",children:(0,pt.__)("Are you sure you want to delete this Navigation Menu?")})]})}var s_=function({name:e,message:t=""}={}){const o=(0,gt.useRef)(),{createWarningNotice:n,removeNotice:r}=(0,lt.useDispatch)(bo.store);return[(0,gt.useCallback)((r=>{o.current||(o.current=e,n(r||t,{id:o.current,type:"snackbar"}))}),[o,n,t,e]),(0,gt.useCallback)((()=>{o.current&&(r(o.current),o.current=null)}),[o,r])]};function l_({setAttributes:e,hasIcon:t,icon:o}){return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show icon button"),isShownByDefault:!0,hasValue:()=>!t,onDeselect:()=>e({hasIcon:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show icon button"),help:(0,pt.__)("Configure the visual appearance of the button that toggles the overlay menu."),onChange:t=>e({hasIcon:t}),checked:t})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Icon"),isShownByDefault:!0,hasValue:()=>"handle"!==o,onDeselect:()=>e({icon:"handle"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-navigation__overlay-menu-icon-toggle-group",label:(0,pt.__)("Icon"),value:o,onChange:t=>e({icon:t}),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"handle","aria-label":(0,pt.__)("handle"),label:(0,it.jsx)(Xh,{icon:"handle"})}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"menu","aria-label":(0,pt.__)("menu"),label:(0,it.jsx)(Xh,{icon:"menu"})})]})})]})}function c_(e){if(void 0===e)throw new Error('buildNavigationLinkEntityBinding requires a kind parameter. Only "post-type" and "taxonomy" are supported.');if("post-type"!==e&&"taxonomy"!==e)throw new Error(`Invalid kind "${e}" provided to buildNavigationLinkEntityBinding. Only 'post-type' and 'taxonomy' are supported.`);return{url:{source:"taxonomy"===e?"core/term-data":"core/post-data",args:{field:"link"}}}}function u_({clientId:e,attributes:t}){const{updateBlockBindings:o}=(0,ct.useBlockBindingsUtils)(e),{metadata:n,id:r,kind:a}=t,i=!!n?.bindings?.url&&!!r,s="post-type"===a?"core/post-data":"core/term-data";return{hasUrlBinding:i&&n?.bindings?.url?.source===s,clearBinding:(0,gt.useCallback)((()=>{i&&o({url:void 0})}),[o,i,n,r]),createBinding:(0,gt.useCallback)((e=>{const t=e?.kind??a;if(t)try{const e=c_(t);o(e)}catch(e){console.warn("Failed to create entity binding:",e.message)}}),[o,a,r])}}function d_(e){if(!e)return null;const t=p_(function(e,t="id",o="parent"){const n=Object.create(null),r=[];for(const a of e)n[a[t]]={...a,children:[]},a[o]?(n[a[o]]=n[a[o]]||{},n[a[o]].children=n[a[o]].children||[],n[a[o]].children.push(n[a[t]])):r.push(n[a[t]]);return r}(e));return(0,vl.applyFilters)("blocks.navigation.__unstableMenuItemsToBlocks",t,e)}function p_(e,t=0){let o={};const n=[...e].sort(((e,t)=>e.menu_order-t.menu_order)),r=n.map((e=>{if("block"===e.type){const[t]=(0,st.parse)(e.content.raw);return t||(0,st.createBlock)("core/freeform",{content:e.content})}const n=e.children?.length?"core/navigation-submenu":"core/navigation-link",r=function({title:e,xfn:t,classes:o,attr_title:n,object:r,object_id:a,description:i,url:s,type:l,target:c},u,d){r&&"post_tag"===r&&(r="tag");const p=l?.replace("_","-")||"custom";return{label:e?.rendered||"",...r?.length&&{type:r},kind:p,url:s||"",...t?.length&&t.join(" ").trim()&&{rel:t.join(" ").trim()},...o?.length&&o.join(" ").trim()&&{className:o.join(" ").trim()},...n?.length&&{title:n},...a&&("post-type"===p||"taxonomy"===p)&&{id:a,metadata:{bindings:c_(p)}},...i?.length&&{description:i},..."_blank"===c&&{opensInNewTab:!0},..."core/navigation-submenu"===u&&{isTopLevelItem:0===d},..."core/navigation-link"===u&&{isTopLevelLink:0===d}}}(e,n,t),{innerBlocks:a=[],mapping:i={}}=e.children?.length?p_(e.children,t+1):{};o={...o,...i};const s=(0,st.createBlock)(n,r,a);return o[e.id]=s.clientId,s}));return{innerBlocks:r,mapping:o}}const m_="success",g_="error",h_="pending";let __=null;var x_=function(e,{throwOnError:t=!1}={}){const o=(0,lt.useRegistry)(),{editEntityRecord:n}=(0,lt.useDispatch)(_t.store),[r,a]=(0,gt.useState)("idle"),[i,s]=(0,gt.useState)(null),l=(0,gt.useCallback)((async(t,r,a="publish")=>{let i,s;try{s=await o.resolveSelect(_t.store).getMenuItems({menus:t,per_page:-1,context:"view"})}catch(e){throw new Error((0,pt.sprintf)((0,pt.__)('Unable to fetch classic menu "%s" from API.'),r),{cause:e})}if(null===s)throw new Error((0,pt.sprintf)((0,pt.__)('Unable to fetch classic menu "%s" from API.'),r));const{innerBlocks:l}=d_(s);try{i=await e(r,l,a),await n("postType","wp_navigation",i.id,{status:"publish"},{throwOnError:!0})}catch(e){throw new Error((0,pt.sprintf)((0,pt.__)('Unable to create Navigation Menu "%s".'),r),{cause:e})}return i}),[e,n,o]);return{convert:(0,gt.useCallback)((async(e,o,n)=>{if(__!==e)return __=e,e&&o?(a(h_),s(null),await l(e,o,n).then((e=>(a(m_),__=null,e))).catch((e=>{if(s(e?.message),a(g_),__=null,t)throw new Error((0,pt.sprintf)((0,pt.__)('Unable to create Navigation Menu "%s".'),o),{cause:e})}))):(s("Unable to convert menu. Missing menu details."),void a(g_))}),[l,t]),status:r,error:i}};function b_(e,t){return e&&t?e+"//"+t:null}var f_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),y_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),v_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),k_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const w_=e=>"header"===e?f_:"footer"===e?y_:"sidebar"===e?v_:k_;const C_=["postType","wp_navigation",{status:"draft",per_page:-1}],j_=["postType","wp_navigation",{per_page:-1,status:"publish"}];function S_(e){const t=(0,gt.useContext)(mt.Disabled.Context),o=function(e){return(0,lt.useSelect)((t=>{if(!e)return;const{getBlock:o,getBlockParentsByBlockName:n}=t(ct.store),r=n(e,"core/template-part",!0);if(!r?.length)return;const{getCurrentTheme:a,getEditedEntityRecord:i}=t(_t.store),s=a(),l=(s?.default_template_part_areas||[]).map((e=>({...e,icon:w_(e.icon)})));for(const e of r){const t=o(e),{theme:n=s?.stylesheet,slug:r}=t.attributes,a=i("postType","wp_template_part",b_(n,r));if(a?.area)return l.find((e=>"uncategorized"!==e.area&&e.area===a.area))?.label}}),[e])}(t?void 0:e),n=(0,lt.useRegistry)();return(0,gt.useCallback)((async()=>{if(t)return"";const{getEntityRecords:e}=n.resolveSelect(_t.store),[r,a]=await Promise.all([e(...C_),e(...j_)]),i=o?(0,pt.sprintf)((0,pt.__)("%s menu"),o):(0,pt.__)("Menu"),s=[...r,...a].reduce(((e,t)=>t?.title?.raw?.startsWith(i)?e+1:e),0);return(s>0?`${i} ${s+1}`:i)||""}),[t,o,n])}const B_="success",T_="error",N_="pending",P_="idle";const I_=[];function D_(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function M_(e,t,o){if(!e)return;t(D_(e).color);let n=e,r=D_(n).backgroundColor;for(;"rgba(0, 0, 0, 0)"===r&&n.parentNode&&n.parentNode.nodeType===n.parentNode.ELEMENT_NODE;)n=n.parentNode,r=D_(n).backgroundColor;o(r)}function z_(e,t){const{textColor:o,customTextColor:n,backgroundColor:r,customBackgroundColor:a,overlayTextColor:i,customOverlayTextColor:s,overlayBackgroundColor:l,customOverlayBackgroundColor:c,style:u}=e,d={};return t&&s?d.customTextColor=s:t&&i?d.textColor=i:n?d.customTextColor=n:o?d.textColor=o:u?.color?.text&&(d.customTextColor=u.color.text),t&&c?d.customBackgroundColor=c:t&&l?d.backgroundColor=l:a?d.customBackgroundColor=a:r?d.backgroundColor=r:u?.color?.background&&(d.customTextColor=u.color.background),d}function A_(e){return{className:Dt("wp-block-navigation__submenu-container",{"has-text-color":!(!e.textColor&&!e.customTextColor),[`has-${e.textColor}-color`]:!!e.textColor,"has-background":!(!e.backgroundColor&&!e.customBackgroundColor),[`has-${e.backgroundColor}-background-color`]:!!e.backgroundColor}),style:{color:e.customTextColor,backgroundColor:e.customBackgroundColor}}}var L_=({className:e="",disabled:t,isMenuItem:o=!1})=>{let n=mt.Button;return o&&(n=mt.MenuItem),(0,it.jsx)(n,{variant:"link",disabled:t,className:e,href:(0,no.addQueryArgs)("edit.php",{post_type:"wp_navigation"}),children:(0,pt.__)("Manage menus")})};var H_=function({onCreateNew:e,isNotice:t=!1}){const[o,n]=(0,gt.useState)(!1),r=(0,gt.createInterpolateElement)((0,pt.__)("Navigation Menu has been deleted or is unavailable. <button>Create a new Menu?</button>"),{button:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,onClick:()=>{n(!0),e()},variant:"link",disabled:o,accessibleWhenDisabled:!0})});return t?(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:r}):(0,it.jsx)(ct.Warning,{children:r})},R_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M2 12c0 3.6 2.4 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.5 0-4.5-1.5-4.5-4s2-4.5 4.5-4.5h3.5V6H8c-3.6 0-6 2.4-6 6zm19.5-1h-8v1.5h8V11zm0 5h-8v1.5h8V16zm0-10h-8v1.5h8V6z"})}),V_=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})});const F_={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},E_=["core/navigation-link","core/navigation-submenu"];function O_({block:e,onClose:t,expandedState:o,expand:n,setInsertedBlock:r}){const{insertBlock:a,replaceBlock:i,replaceInnerBlocks:s}=(0,lt.useDispatch)(ct.store),l=e.clientId,c=!E_.includes(e.name);return(0,it.jsx)(mt.MenuItem,{icon:R_,disabled:c,onClick:()=>{const c=!1,u=(0,st.createBlock)(Oh.name,Oh.attributes);if("core/navigation-submenu"===e.name)a(u,e.innerBlocks.length,l,c);else{const t=(0,st.createBlock)("core/navigation-submenu",e.attributes,e.innerBlocks);i(l,t),s(t.clientId,[u],c)}r(u),o[e.clientId]||n(e.clientId),t()},children:(0,pt.__)("Add submenu link")})}function G_(e){const{block:t}=e,{clientId:o}=t,{moveBlocksDown:n,moveBlocksUp:r,removeBlocks:a}=(0,lt.useDispatch)(ct.store),i=(0,pt.sprintf)((0,pt.__)("Remove %s"),(0,ct.BlockTitle)({clientId:o,maximumLength:25})),s=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t}=e(ct.store);return t(o)}),[o]);return(0,it.jsx)(mt.DropdownMenu,{icon:Jh,label:(0,pt.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:F_,noIcons:!0,...e,children:({onClose:l})=>(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.MenuGroup,{children:[(0,it.jsx)(mt.MenuItem,{icon:V_,onClick:()=>{r([o],s),l()},children:(0,pt.__)("Move up")}),(0,it.jsx)(mt.MenuItem,{icon:$p,onClick:()=>{n([o],s),l()},children:(0,pt.__)("Move down")}),(0,it.jsx)(O_,{block:t,onClose:l,expandedState:e.expandedState,expand:e.expand,setInsertedBlock:e.setInsertedBlock})]}),(0,it.jsx)(mt.MenuGroup,{children:(0,it.jsx)(mt.MenuItem,{onClick:()=>{a([o],!1),l()},children:i})})]})})}var $_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})}),U_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),q_=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});function W_({className:e,onBack:t}){return(0,it.jsx)(mt.Button,{className:e,icon:(0,pt.isRTL)()?U_:q_,onClick:e=>{e.preventDefault(),t()},size:"small",children:(0,pt.__)("Back")})}var Z_=function e({className:t,title:o,description:n,onBack:r,children:a}){const i=(0,xt.useInstanceId)(e,"link-ui-dialog-title"),s=(0,xt.useInstanceId)(e,"link-ui-dialog-description"),l=(0,xt.useFocusOnMount)("firstElement"),c=`${t}__back`;return(0,it.jsxs)("div",{className:t,role:"dialog","aria-labelledby":i,"aria-describedby":s,ref:l,children:[(0,it.jsxs)(mt.VisuallyHidden,{children:[(0,it.jsx)("h2",{id:i,children:o}),(0,it.jsx)("p",{id:s,children:n})]}),(0,it.jsx)(W_,{className:c,onBack:r}),a]})};function J_({postType:e,onBack:t,onPageCreated:o,initialTitle:n=""}){const[r,a]=(0,gt.useState)(n),[i,s]=(0,gt.useState)(!1),l=r.trim().length>0,{lastError:c,isSaving:u}=(0,lt.useSelect)((t=>({lastError:t(_t.store).getLastEntitySaveError("postType",e),isSaving:t(_t.store).isSavingEntityRecord("postType",e)})),[e]),{saveEntityRecord:d}=(0,lt.useDispatch)(_t.store);const p=u||!l;return(0,it.jsx)(Z_,{className:"link-ui-page-creator",title:(0,pt.__)("Create page"),description:(0,pt.__)("Create a new page to add to your Navigation."),onBack:t,children:(0,it.jsx)(mt.__experimentalVStack,{className:"link-ui-page-creator__inner",spacing:4,children:(0,it.jsx)("form",{onSubmit:async function(t){if(t.preventDefault(),!u&&l)try{const t=await d("postType",e,{title:r,status:i?"publish":"draft"},{throwOnError:!0});if(t){const n={id:t.id,type:e,title:(0,ao.decodeEntities)(t.title.rendered),url:t.link,kind:"post-type"};o(n)}}catch(e){}},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title"),onChange:a,placeholder:(0,pt.__)("No title"),value:r}),(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Publish immediately"),help:(0,pt.__)("If unchecked, the page will be created as a draft."),checked:i,onChange:s}),c&&(0,it.jsx)(mt.Notice,{status:"error",isDismissible:!1,children:c.message}),(0,it.jsxs)(mt.__experimentalHStack,{spacing:2,justify:"flex-end",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:u,accessibleWhenDisabled:!0,children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:u,"aria-disabled":p,children:(0,pt.__)("Create page")})]})]})})})})}const{PrivateQuickInserter:Q_}=jo(ct.privateApis);var K_=function({clientId:e,onBack:t,onBlockInsert:o}){const{rootBlockClientId:n}=(0,lt.useSelect)((t=>{const{getBlockRootClientId:o}=t(ct.store);return{rootBlockClientId:o(e)}}),[e]);return e?(0,it.jsx)(Z_,{className:"link-ui-block-inserter",title:(0,pt.__)("Add block"),description:(0,pt.__)("Choose a block to add to your Navigation."),onBack:t,children:(0,it.jsx)(Q_,{rootClientId:n,clientId:e,isAppender:!1,prioritizePatterns:!1,selectBlockOnInsert:!o,onSelect:o||void 0,hasSearch:!1})}):null};function Y_(e,t){switch(e){case"post":case"page":return{type:"post",subtype:e};case"category":return{type:"term",subtype:"category"};case"tag":return{type:"term",subtype:"post_tag"};case"post_format":return{type:"post-format"};default:return"taxonomy"===t?{type:"term",subtype:e}:"post-type"===t?{type:"post",subtype:e}:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}}}const X_=(0,gt.forwardRef)((function(e,t){const{label:o,url:n,opensInNewTab:r,type:a,kind:i,id:s,metadata:l}=e.link,c=a||"page",[u,d]=(0,gt.useState)(!1),[p,m]=(0,gt.useState)(!1),[g,h]=(0,gt.useState)(!1),[_,x]=(0,gt.useState)(!1),b=(0,_t.useResourcePermissions)({kind:"postType",name:c}),f=("core/post-data"===l?.bindings?.url?.source||"core/term-data"===l?.bindings?.url?.source)&&!!s,y=(0,gt.useMemo)((()=>({url:n,opensInNewTab:r,title:o&&(0,lu.__unstableStripHTML)(o),kind:i,type:a,id:s})),[o,r,n,i,a,s]),v=(0,xt.useInstanceId)(X_,"link-ui-link-control__title"),k=(0,xt.useInstanceId)(X_,"link-ui-link-control__description"),w=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(mt.Popover,{ref:t,placement:"bottom",onClose:e.onClose,anchor:e.anchor,shift:!0,children:[!u&&!p&&(0,it.jsxs)("div",{role:"dialog","aria-labelledby":v,"aria-describedby":k,children:[(0,it.jsxs)(mt.VisuallyHidden,{children:[(0,it.jsx)("h2",{id:v,children:(0,pt.__)("Add link")}),(0,it.jsx)("p",{id:k,children:(0,pt.__)("Search for and add a link to your Navigation.")})]}),(0,it.jsx)(ct.LinkControl,{hasTextControl:!0,hasRichPreviews:!0,value:y,showInitialSuggestions:!0,withCreateSuggestion:!1,noDirectEntry:!!a,noURLSuggestion:!!a,suggestionsQuery:Y_(a,i),onChange:e.onChange,onRemove:e.onRemove,onCancel:e.onCancel,handleEntities:f,renderControlBottom:()=>y?.url?.length?null:(0,it.jsx)(ex,{focusAddBlockButton:g,focusAddPageButton:_,setAddingBlock:()=>{d(!0),h(!1)},setAddingPage:()=>{m(!0),x(!1)},canAddPage:b?.canCreate&&"page"===a,canAddBlock:"default"===w})})]}),u&&(0,it.jsx)(K_,{clientId:e.clientId,onBack:()=>{d(!1),h(!0),x(!1)},onBlockInsert:e?.onBlockInsert}),p&&(0,it.jsx)(J_,{postType:c,onBack:()=>{m(!1),x(!0),h(!1)},onPageCreated:t=>{e.onChange(t),m(!1)},initialTitle:y?.url||""})]})})),ex=({setAddingBlock:e,setAddingPage:t,focusAddBlockButton:o,focusAddPageButton:n,canAddPage:r,canAddBlock:a})=>{const i="listbox",s=(0,gt.useRef)(),l=(0,gt.useRef)();return(0,gt.useEffect)((()=>{o&&s.current?.focus()}),[o]),(0,gt.useEffect)((()=>{n&&l.current?.focus()}),[n]),r||a?(0,it.jsxs)(mt.__experimentalVStack,{spacing:0,className:"link-ui-tools",children:[r&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,ref:l,icon:$_,onClick:e=>{e.preventDefault(),t(!0)},"aria-haspopup":i,children:(0,pt.__)("Create page")}),a&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,ref:s,icon:$_,onClick:t=>{t.preventDefault(),e(!0)},"aria-haspopup":i,children:(0,pt.__)("Add block")})]}):null};const tx=window.wp.escapeHtml,ox=(e={},t,o={})=>{const{label:n="",kind:r="",type:a=""}=o,{title:i="",label:s="",url:l,opensInNewTab:c,id:u,kind:d=r,type:p=a}=e,m=i||s,g=m.replace(/http(s?):\/\//gi,""),h=l?.replace(/http(s?):\/\//gi,"")??"",_=m&&m!==n&&g!==h?(0,tx.escapeHTML)(m):n||(0,tx.escapeHTML)(h),x="post_tag"===p?"tag":p.replace("-","_"),b=["post","page","tag","category"].indexOf(x)>-1,f=!d&&!b||"custom"===d?"custom":d,y={...void 0!==l?{url:l?encodeURI((0,no.safeDecodeURI)(l)):l}:{},..._&&{label:_},...void 0!==c&&{opensInNewTab:c},...f&&{kind:f},...x&&"URL"!==x&&{type:x}};if(l&&!u&&o.id){const e=((e,t)=>{if(!e||!t)return!1;const o=e=>e?e.replace(/\/+$/,""):"",n=(e,t=null)=>{try{const o=t||("undefined"!=typeof window?window.location.origin:"https://wordpress.org");return new URL(e,o)}catch(e){return null}},r=n(e);if(!r)return!0;const a=n(t,e);if(!a)return!0;const i=r.hostname,s=a.hostname,l=o((0,no.getPath)(r.toString())),c=o((0,no.getPath)(a.toString()));if(i!==s||l!==c)return!0;const u=r.searchParams.get("p"),d=a.searchParams.get("p");if(u&&d&&u!==d)return!0;const p=r.searchParams.get("page_id"),m=a.searchParams.get("page_id");return!(!p||!m||p===m)||!!(u&&m||p&&d)})(o.url,l);e&&(y.id=void 0,y.kind="custom",y.type="custom")}else u&&Number.isInteger(u)?y.id=u:o.id&&(y.kind=f,y.type=x);t(y);const v="id"in y?y.id:o.id,k="kind"in y?y.kind:o.kind;return{isEntityLink:!!v&&"custom"!==k,attributes:y}},nx=(0,pt.__)("Switch to '%s'"),rx=["core/navigation-link","core/navigation-submenu"],{PrivateListView:ax}=jo(ct.privateApis);function ix({block:e,insertedBlock:t,setInsertedBlock:o}){const{updateBlockAttributes:n,removeBlock:r}=(0,lt.useDispatch)(ct.store),a=rx?.includes(t?.name),i=t?.clientId===e.clientId,s=a&&i,{createBinding:l,clearBinding:c}=u_({clientId:t?.clientId,attributes:t?.attributes||{}});if(!s)return null;return(0,it.jsx)(X_,{clientId:t?.clientId,link:t?.attributes,onBlockInsert:e=>{t?.clientId&&e&&r(t.clientId,false),o(e)},onClose:()=>{!t?.attributes?.url&&t?.clientId&&r(t.clientId,!1),o(null)},onChange:e=>{const{isEntityLink:r,attributes:a}=ox(e,(i=t?.clientId,e=>{i&&n(i,e)}),t?.attributes);var i;r?l(a):c(a),o(null)}})}const sx=({clientId:e,currentMenuId:t,isLoading:o,isNavigationMenuMissing:n,onCreateNew:r})=>{const a=(0,lt.useSelect)((t=>!!t(ct.store).getBlockCount(e)),[e]),{navigationMenu:i}=qh(t);if(t&&n)return(0,it.jsx)(H_,{onCreateNew:r,isNotice:!0});if(o)return(0,it.jsx)(mt.Spinner,{});const s=i?(0,pt.sprintf)((0,pt.__)("Structure for Navigation Menu: %s"),i?.title||(0,pt.__)("Untitled menu")):(0,pt.__)("You have not yet created any menus. Displaying a list of your Pages");return(0,it.jsxs)("div",{className:"wp-block-navigation__menu-inspector-controls",children:[!a&&(0,it.jsx)("p",{className:"wp-block-navigation__menu-inspector-controls__empty-message",children:(0,pt.__)("This Navigation Menu is empty.")}),(0,it.jsx)(ax,{rootClientId:e,isExpanded:!0,description:s,showAppender:!0,blockSettingsMenu:G_,additionalBlockContent:ix})]})};var lx=e=>{const{createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,currentMenuId:n=null,onCreateNew:r,onSelectClassicMenu:a,onSelectNavigationMenu:i,isManageMenusButtonDisabled:s,blockEditingMode:l}=e;return(0,it.jsx)(ct.InspectorControls,{group:"list",children:(0,it.jsxs)(mt.PanelBody,{title:null,children:[(0,it.jsxs)(mt.__experimentalHStack,{className:"wp-block-navigation-off-canvas-editor__header",children:[(0,it.jsx)(mt.__experimentalHeading,{className:"wp-block-navigation-off-canvas-editor__title",level:2,children:(0,pt.__)("Menu")}),"default"===l&&(0,it.jsx)(Qh,{currentMenuId:n,onSelectClassicMenu:a,onSelectNavigationMenu:i,onCreateNew:r,createNavigationMenuIsSuccess:t,createNavigationMenuIsError:o,actionLabel:nx,isManageMenusButtonDisabled:s})]}),(0,it.jsx)(sx,{...e})]})})};function cx({id:e,children:t}){return(0,it.jsx)(mt.VisuallyHidden,{children:(0,it.jsx)("div",{id:e,className:"wp-block-navigation__description",children:t})})}function ux({id:e}){const[t]=(0,_t.useEntityProp)("postType","wp_navigation","title"),o=(0,pt.sprintf)((0,pt.__)('Navigation Menu: "%s"'),t);return(0,it.jsx)(cx,{id:e,children:o})}function dx({clientId:e}){const{insertBlock:t}=(0,lt.useDispatch)(ct.store),{getBlockCount:o}=(0,lt.useSelect)(ct.store),n=(0,gt.useCallback)((()=>{const n=o(e),r=(0,st.createBlock)(Oh.name,{kind:Oh.attributes.kind,type:Oh.attributes.type});t(r,n,e)}),[e,t,o]);return(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{name:"add-page",icon:Vh,onClick:n,children:(0,pt.__)("Add page")})})})}function px({textColor:e,setTextColor:t,backgroundColor:o,setBackgroundColor:n,overlayTextColor:r,setOverlayTextColor:a,overlayBackgroundColor:i,setOverlayBackgroundColor:s,clientId:l,navRef:c}){const[u,d]=(0,gt.useState)(),[p,m]=(0,gt.useState)(),[g,h]=(0,gt.useState)(),[_,x]=(0,gt.useState)(),b="web"===gt.Platform.OS;(0,gt.useEffect)((()=>{if(!b)return;M_(c.current,m,d);const e=c.current?.querySelector('[data-type="core/navigation-submenu"] [data-type="core/navigation-link"]');e&&(r.color||i.color)&&M_(e,x,h)}),[b,r.color,i.color,c]);const f=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return f.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:e.color,label:(0,pt.__)("Text"),onColorChange:t,resetAllFilter:()=>t(),clearable:!0,enableAlpha:!0},{colorValue:o.color,label:(0,pt.__)("Background"),onColorChange:n,resetAllFilter:()=>n(),clearable:!0,enableAlpha:!0},{colorValue:r.color,label:(0,pt.__)("Submenu & overlay text"),onColorChange:a,resetAllFilter:()=>a(),clearable:!0,enableAlpha:!0},{colorValue:i.color,label:(0,pt.__)("Submenu & overlay background"),onColorChange:s,resetAllFilter:()=>s(),clearable:!0,enableAlpha:!0}],panelId:l,...f,gradients:[],disableCustomGradients:!0}),b&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.ContrastChecker,{backgroundColor:u,textColor:p}),(0,it.jsx)(ct.ContrastChecker,{backgroundColor:g,textColor:_})]})]}):null}var mx=(0,ct.withColors)({textColor:"color"},{backgroundColor:"color"},{overlayBackgroundColor:"color"},{overlayTextColor:"color"})((function({attributes:e,setAttributes:t,clientId:o,isSelected:n,className:r,backgroundColor:a,setBackgroundColor:i,textColor:s,setTextColor:l,overlayBackgroundColor:c,setOverlayBackgroundColor:u,overlayTextColor:d,setOverlayTextColor:p,hasSubmenuIndicatorSetting:m=!0,customPlaceholder:g=null,__unstableLayoutClassNames:h}){const{openSubmenusOnClick:_,overlayMenu:x,showSubmenuIcon:b,templateLock:f,layout:{justifyContent:y,orientation:v="horizontal",flexWrap:k="wrap"}={},hasIcon:w,icon:C="handle"}=e,j=e.ref,S=(0,gt.useCallback)((e=>{t({ref:e})}),[t]),B=`navigationMenu/${j}`,T=(0,ct.useHasRecursion)(B),N=(0,ct.useBlockEditingMode)(),{menus:P}=Wh(),[I,D]=s_({name:"block-library/core/navigation/status"}),[M,z]=s_({name:"block-library/core/navigation/classic-menu-conversion"}),[A,L]=s_({name:"block-library/core/navigation/permissions/update"}),{create:H,status:R,error:V,value:F,isPending:E,isSuccess:O,isError:G}=function(e){const[t,o]=(0,gt.useState)(P_),[n,r]=(0,gt.useState)(null),[a,i]=(0,gt.useState)(null),{saveEntityRecord:s,editEntityRecord:l}=(0,lt.useDispatch)(_t.store),c=S_(e);return{create:(0,gt.useCallback)((async(e=null,t=[],n)=>{if(e&&"string"!=typeof e)throw i("Invalid title supplied when creating Navigation Menu."),o(T_),new Error("Value of supplied title argument was not a string.");o(N_),r(null),i(null),e||(e=await c().catch((e=>{throw i(e?.message),o(T_),new Error("Failed to create title when saving new Navigation Menu.",{cause:e})})));const a={title:e,content:(0,st.serialize)(t),status:n};return s("postType","wp_navigation",a).then((e=>(r(e),o(B_),"publish"!==n&&l("postType","wp_navigation",e.id,{status:"publish"}),e))).catch((e=>{throw i(e?.message),o(T_),new Error("Unable to save new Navigation Menu",{cause:e})}))}),[s,l,c]),status:t,value:n,error:a,isIdle:t===P_,isPending:t===N_,isSuccess:t===B_,isError:t===T_}}(o),$=async()=>{await H("")},{hasUncontrolledInnerBlocks:U,uncontrolledInnerBlocks:q,isInnerBlockSelected:W,innerBlocks:Z}=function(e){return(0,lt.useSelect)((t=>{const{getBlock:o,getBlocks:n,hasSelectedInnerBlock:r}=t(ct.store),a=o(e).innerBlocks,i=!!a?.length,s=i?I_:n(e);return{innerBlocks:i?a:s,hasUncontrolledInnerBlocks:i,uncontrolledInnerBlocks:a,controlledInnerBlocks:s,isInnerBlockSelected:r(e,!0)}}),[e])}(o),J=!!Z.find((e=>"core/navigation-submenu"===e.name)),{replaceInnerBlocks:Q,selectBlock:K,__unstableMarkNextChangeAsNotPersistent:Y}=(0,lt.useDispatch)(ct.store),[X,ee]=(0,gt.useState)(!1),[te,oe]=(0,gt.useState)(!1),{hasResolvedNavigationMenus:ne,isNavigationMenuResolved:re,isNavigationMenuMissing:ae,canUserUpdateNavigationMenu:ie,hasResolvedCanUserUpdateNavigationMenu:se,canUserDeleteNavigationMenu:le,hasResolvedCanUserDeleteNavigationMenu:ce,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,hasResolvedCanUserCreateNavigationMenus:pe}=qh(j),me=ne&&ae,{convert:ge,status:he,error:_e}=x_(H),xe=he===h_,be=(0,gt.useCallback)(((e,t={focusNavigationBlock:!1})=>{const{focusNavigationBlock:n}=t;S(e),n&&K(o)}),[K,o,S]),fe=!ae&&re,ye=U&&!fe,{getNavigationFallbackId:ve}=jo((0,lt.useSelect)(_t.store)),ke=j||ye?null:ve();(0,gt.useEffect)((()=>{j||ye||!ke||(Y(),S(ke))}),[j,S,ye,ke,Y]);const we=(0,gt.useRef)(),Ce="nav",je=!j&&!E&&!xe&&ne&&0===P?.length&&!U,Se=!ne||E||xe||!(!j||fe||xe),Be=e.style?.typography?.textDecoration,Te=(0,lt.useSelect)((e=>e(ct.store).__unstableHasActiveBlockOverlayActive(o)),[o]),Ne="never"!==x,Pe=(0,ct.useBlockProps)({ref:we,className:Dt(r,{"items-justified-right":"right"===y,"items-justified-space-between":"space-between"===y,"items-justified-left":"left"===y,"items-justified-center":"center"===y,"is-vertical":"vertical"===v,"no-wrap":"nowrap"===k,"is-responsive":Ne,"has-text-color":!!s.color||!!s?.class,[(0,ct.getColorClassName)("color",s?.slug)]:!!s?.slug,"has-background":!!a.color||a.class,[(0,ct.getColorClassName)("background-color",a?.slug)]:!!a?.slug,[`has-text-decoration-${Be}`]:Be,"block-editor-block-content-overlay":Te},h),style:{color:!s?.slug&&s?.color,backgroundColor:!a?.slug&&a?.color}}),Ie=async e=>ge(e.id,e.name,"draft"),De=e=>{be(e)};(0,gt.useEffect)((()=>{D(),E&&(0,Rh.speak)((0,pt.__)("Creating Navigation Menu.")),O&&(be(F?.id,{focusNavigationBlock:!0}),I((0,pt.__)("Navigation Menu successfully created."))),G&&I((0,pt.__)("Failed to create Navigation Menu."))}),[R,V,F?.id,G,O,E,be,D,I]),(0,gt.useEffect)((()=>{z(),he===h_&&(0,Rh.speak)((0,pt.__)("Classic menu importing.")),he===m_&&(M((0,pt.__)("Classic menu imported successfully.")),be(F?.id,{focusNavigationBlock:!0})),he===g_&&M((0,pt.__)("Classic menu import failed."))}),[he,_e,z,M,F?.id,be]),(0,gt.useEffect)((()=>{n||W||L(),(n||W)&&(j&&!me&&se&&!ie&&A((0,pt.__)("You do not have permission to edit this Menu. Any changes made will not be saved.")),j||!pe||ue||A((0,pt.__)("You do not have permission to create Navigation Menus.")))}),[n,W,ie,se,ue,pe,j,L,A,me]);const Me=ue||ie,ze=Dt("wp-block-navigation__overlay-menu-preview",{open:te}),Ae=b||_?"":(0,pt.__)('The current menu options offer reduced accessibility for users and are not recommended. Enabling either "Open on Click" or "Show arrow" offers enhanced accessibility by allowing keyboard users to browse submenus selectively.'),Le=(0,gt.useRef)(!0);(0,gt.useEffect)((()=>{!Le.current&&Ae&&(0,Rh.speak)(Ae),Le.current=!1}),[Ae]);const He=(0,xt.useInstanceId)(l_,"overlay-menu-preview"),Re=vt(),Ve=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:m&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Display"),resetAll:()=>{t({showSubmenuIcon:!0,openSubmenusOnClick:!1,overlayMenu:"mobile",hasIcon:!0,icon:"handle"})},dropdownMenuProps:Re,children:[Ne&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(mt.Button,{__next40pxDefaultSize:!0,className:ze,onClick:()=>{oe(!te)},"aria-label":(0,pt.__)("Overlay menu controls"),"aria-controls":He,"aria-expanded":te,children:[w&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(Xh,{icon:C}),(0,it.jsx)(Fh,{icon:Eh})]}),!w&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("span",{children:(0,pt.__)("Menu")}),(0,it.jsx)("span",{children:(0,pt.__)("Close")})]})]}),te&&(0,it.jsx)(mt.__experimentalVStack,{id:He,spacing:4,style:{gridColumn:"span 2"},children:(0,it.jsx)(l_,{setAttributes:t,hasIcon:w,icon:C,hidden:!te})})]}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"mobile"!==x,label:(0,pt.__)("Overlay Menu"),onDeselect:()=>t({overlayMenu:"mobile"}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay Menu"),"aria-label":(0,pt.__)("Configure overlay menu"),value:x,help:(0,pt.__)("Collapses the navigation options in a menu icon opening an overlay."),onChange:e=>t({overlayMenu:e}),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"never",label:(0,pt.__)("Off")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"mobile",label:(0,pt.__)("Mobile")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"always",label:(0,pt.__)("Always")})]})}),J&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("h3",{className:"wp-block-navigation__submenu-header",children:(0,pt.__)("Submenus")}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>_,label:(0,pt.__)("Open on click"),onDeselect:()=>t({openSubmenusOnClick:!1,showSubmenuIcon:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:_,onChange:e=>{t({openSubmenusOnClick:e,...e&&{showSubmenuIcon:!0}})},label:(0,pt.__)("Open on click")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!b,label:(0,pt.__)("Show arrow"),onDeselect:()=>t({showSubmenuIcon:!0}),isDisabled:e.openSubmenusOnClick,isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:b,onChange:e=>{t({showSubmenuIcon:e})},disabled:e.openSubmenusOnClick,label:(0,pt.__)("Show arrow")})}),Ae&&(0,it.jsx)(mt.Notice,{spokenMessage:null,status:"warning",isDismissible:!1,className:"wp-block-navigation__submenu-accessibility-notice",children:Ae})]})]})}),(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(px,{textColor:s,setTextColor:l,backgroundColor:a,setBackgroundColor:i,overlayTextColor:d,setOverlayTextColor:p,overlayBackgroundColor:c,setOverlayBackgroundColor:u,clientId:o,navRef:we})})]}),Fe=`${o}-desc`,Ee="always"===x,Oe=!Me||!ne;if(ye&&!E)return(0,it.jsxs)(Ce,{...Pe,"aria-describedby":je?void 0:Fe,children:[(0,it.jsx)(cx,{id:Fe,children:(0,pt.__)("Unsaved Navigation Menu.")}),(0,it.jsx)(lx,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),"default"===N&&Ve,(0,it.jsx)(e_,{id:o,onToggle:ee,isOpen:X,hasIcon:w,icon:C,isResponsive:Ne,isHiddenByDefault:Ee,overlayBackgroundColor:c,overlayTextColor:d,children:(0,it.jsx)(a_,{createNavigationMenu:H,blocks:q,hasSelection:n||W})})]});if(j&&ae)return(0,it.jsxs)(Ce,{...Pe,children:[(0,it.jsx)(lx,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),(0,it.jsx)(H_,{onCreateNew:$})]});if(fe&&T)return(0,it.jsx)("div",{...Pe,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})});const Ge=g||Kh;return je&&g?(0,it.jsx)(Ce,{...Pe,children:(0,it.jsx)(Ge,{isSelected:n,currentMenuId:j,clientId:o,canUserCreateNavigationMenus:ue,isResolvingCanUserCreateNavigationMenus:de,onSelectNavigationMenu:De,onSelectClassicMenu:Ie,onCreateEmpty:$})}):(0,it.jsx)(_t.EntityProvider,{kind:"postType",type:"wp_navigation",id:j,children:(0,it.jsxs)(ct.RecursionProvider,{uniqueId:B,children:[(0,it.jsx)(lx,{clientId:o,createNavigationMenuIsSuccess:O,createNavigationMenuIsError:G,currentMenuId:j,isNavigationMenuMissing:ae,isManageMenusButtonDisabled:Oe,onCreateNew:$,onSelectClassicMenu:Ie,onSelectNavigationMenu:De,isLoading:Se,blockEditingMode:N}),"default"===N&&Ve,"contentOnly"===N&&fe&&(0,it.jsx)(dx,{clientId:o}),"default"===N&&fe&&(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[se&&ie&&(0,it.jsx)(o_,{}),ce&&le&&(0,it.jsx)(i_,{onDelete:()=>{Q(o,[]),I((0,pt.__)("Navigation Menu successfully deleted."))}}),(0,it.jsx)(L_,{disabled:Oe,className:"wp-block-navigation-manage-menus-button"})]}),(0,it.jsxs)(Ce,{...Pe,"aria-describedby":je||Se?void 0:Fe,children:[Se&&!Ee&&(0,it.jsx)("div",{className:"wp-block-navigation__loading-indicator-container",children:(0,it.jsx)(mt.Spinner,{className:"wp-block-navigation__loading-indicator"})}),(!Se||Ee)&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ux,{id:Fe}),(0,it.jsx)(e_,{id:o,onToggle:ee,hasIcon:w,icon:C,isOpen:X,isResponsive:Ne,isHiddenByDefault:Ee,overlayBackgroundColor:c,overlayTextColor:d,children:fe&&(0,it.jsx)(t_,{clientId:o,hasCustomPlaceholder:!!g,templateLock:f,orientation:v})})]})]})]})})}));const gx={fontStyle:"var:preset|font-style|",fontWeight:"var:preset|font-weight|",textDecoration:"var:preset|text-decoration|",textTransform:"var:preset|text-transform|"},hx=({navigationMenuId:e,...t})=>({...t,ref:e}),_x=e=>{if(e.layout)return e;const{itemsJustification:t,orientation:o,...n}=e;return(t||o)&&Object.assign(n,{layout:{type:"flex",...t&&{justifyContent:t},...o&&{orientation:o}}}),n},xx={attributes:{navigationMenuId:{type:"number"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"mobile"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}},layout:{allowSwitching:!1,allowInheriting:!1,default:{type:"flex"}}},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),isEligible:({navigationMenuId:e})=>!!e,migrate:hx},bx={attributes:{navigationMenuId:{type:"number"},orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),isEligible:({itemsJustification:e,orientation:t})=>!!e||!!t,migrate:(0,xt.compose)(hx,_x)},fx={attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},overlayMenu:{type:"string",default:"never"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},spacing:{blockGap:!0,units:["px","em","rem","vh","vw"],__experimentalDefaultControls:{blockGap:!0}}},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),migrate:(0,xt.compose)(hx,_x,Yo),isEligible:({style:e})=>e?.typography?.fontFamily},yx=[xx,bx,fx,{attributes:{orientation:{type:"string",default:"horizontal"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0},openSubmenusOnClick:{type:"boolean",default:!1},isResponsive:{type:"boolean",default:"false"},__unstableLocation:{type:"string"},overlayBackgroundColor:{type:"string"},customOverlayBackgroundColor:{type:"string"},overlayTextColor:{type:"string"},customOverlayTextColor:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0}},isEligible:e=>e.isResponsive,migrate:(0,xt.compose)(hx,_x,Yo,(function(e){return delete e.isResponsive,{...e,overlayMenu:"mobile"}})),save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})},{attributes:{orientation:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},customBackgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean",default:!0}},supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0,fontSize:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalTextTransform:!0,color:!0,__experimentalFontFamily:!0,__experimentalTextDecoration:!0},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{}),isEligible(e){if(!e.style||!e.style.typography)return!1;for(const t in gx){const o=e.style.typography[t];if(o&&o.startsWith(gx[t]))return!0}return!1},migrate:(0,xt.compose)(hx,_x,Yo,(function(e){return{...e,style:{...e.style,typography:Object.fromEntries(Object.entries(e.style.typography??{}).map((([e,t])=>{const o=gx[e];if(o&&t.startsWith(o)){const n=t.slice(o.length);return"textDecoration"===e&&"strikethrough"===n?[e,"line-through"]:[e,n]}return[e,t]})))}}}))},{attributes:{className:{type:"string"},textColor:{type:"string"},rgbTextColor:{type:"string"},backgroundColor:{type:"string"},rgbBackgroundColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},itemsJustification:{type:"string"},showSubmenuIcon:{type:"boolean"}},isEligible:e=>e.rgbTextColor||e.rgbBackgroundColor,supports:{align:["wide","full"],anchor:!0,html:!1,inserter:!0},migrate:(0,xt.compose)(hx,(e=>{const{rgbTextColor:t,rgbBackgroundColor:o,...n}=e;return{...n,customTextColor:e.textColor?void 0:e.rgbTextColor,customBackgroundColor:e.backgroundColor?void 0:e.rgbBackgroundColor}})),save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})}];var vx=yx;const{name:kx}=Hh,wx={icon:Lh,example:{attributes:{overlayMenu:"never"},innerBlocks:[{name:"core/navigation-link",attributes:{label:(0,pt.__)("Home"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,pt.__)("About"),url:"https://make.wordpress.org/"}},{name:"core/navigation-link",attributes:{label:(0,pt.__)("Contact"),url:"https://make.wordpress.org/"}}]},edit:mx,save:function({attributes:e}){if(!e.ref)return(0,it.jsx)(ct.InnerBlocks.Content,{})},__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,lt.select)(_t.store).getEditedEntityRecord("postType","wp_navigation",e);return t?.title?(0,ao.decodeEntities)(t.title):void 0},deprecated:vx},Cx=()=>jt({name:kx,metadata:Hh,settings:wx}),jx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-link","title":"Custom Link","category":"design","parent":["core/navigation"],"allowedBlocks":["core/navigation-link","core/navigation-submenu","core/page-list"],"description":"Add a page, link, or another item to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelLink":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","style"],"supports":{"reusable":false,"html":false,"__experimentalSlashInserter":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-link-editor","style":"wp-block-navigation-link"}');function Sx({attributes:e,setAttributes:t,clientId:o}){const{label:n,url:r,description:a,rel:i,opensInNewTab:s}=e,l=(0,gt.useRef)(r),c=vt(),u=(0,xt.useInstanceId)(Sx,"link-input"),d=`${u}__help`,{hasUrlBinding:p,clearBinding:m}=u_({clientId:o,attributes:e}),{updateBlockAttributes:g}=(0,lt.useDispatch)(ct.store);return(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({label:"",url:"",description:"",rel:"",opensInNewTab:!1})},dropdownMenuProps:c,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Text"),onDeselect:()=>t({label:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Text"),value:n?(0,lu.__unstableStripHTML)(n):"",onChange:e=>{t({label:e})},autoComplete:"off"})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r,label:(0,pt.__)("Link"),onDeselect:()=>t({url:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.__experimentalInputControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,id:u,label:(0,pt.__)("Link"),value:r?(0,no.safeDecodeURI)(r):"",onChange:e=>{p||t({url:encodeURI((0,no.safeDecodeURI)(e))})},autoComplete:"off",type:"url",disabled:p,onFocus:()=>{p||(l.current=r)},onBlur:()=>{p||ox({url:r||l.current},t,{...e,url:l.current})},help:p&&(0,it.jsx)(Bx,{type:e.type,kind:e.kind}),suffix:p&&(0,it.jsx)(mt.Button,{icon:hn,onClick:()=>{m(),g(o,{url:"",id:void 0})},"aria-describedby":d,showTooltip:!0,label:(0,pt.__)("Unsync and edit"),__next40pxDefaultSize:!0})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Open in new tab"),onDeselect:()=>t({opensInNewTab:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),checked:s,onChange:e=>t({opensInNewTab:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!a,label:(0,pt.__)("Description"),onDeselect:()=>t({description:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextareaControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Description"),value:a||"",onChange:e=>{t({description:e})},help:(0,pt.__)("The description will be displayed in the menu if the current theme supports it.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Rel attribute"),onDeselect:()=>t({rel:""}),isShownByDefault:!0,children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Rel attribute"),value:i||"",onChange:e=>{t({rel:e})},autoComplete:"off",help:(0,pt.__)("The relationship of the linked URL as space-separated link types.")})})]})}function Bx({type:e,kind:t}){const o=function(e,t){if("post-type"===t)switch(e){case"post":return(0,pt.__)("post");case"page":return(0,pt.__)("page");default:return e||(0,pt.__)("post")}if("taxonomy"===t)switch(e){case"category":return(0,pt.__)("category");case"tag":return(0,pt.__)("tag");default:return e||(0,pt.__)("term")}return e||(0,pt.__)("item")}(e,t);return(0,pt.sprintf)((0,pt.__)("Synced with the selected %s."),o)}const Tx={name:"core/navigation-link"},Nx=["core/navigation-link","core/navigation-submenu"];var Px=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),Ix=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4zm.8-4l.7.7 2-2V12h1V9.2l2 2 .7-.7-2-2H12v-1H9.2l2-2-.7-.7-2 2V4h-1v2.8l-2-2-.7.7 2 2H4v1h2.8l-2 2z"})});function Dx(e){switch(e){case"post":return xm;case"page":return Vh;case"tag":return Px;case"category":return Un;default:return Ix}}function Mx(e,t){if("core/navigation-link"!==t)return e;if(e.variations){const t=(e,t)=>e.type===t.type,o=e.variations.map((e=>({...e,...!e.icon&&{icon:Dx(e.name)},...!e.isActive&&{isActive:t}})));return{...e,variations:o}}return e}const zx={from:[{type:"block",blocks:["core/site-logo"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/spacer"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/home-link"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/search"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/page-list"],transform:()=>(0,st.createBlock)("core/navigation-link")},{type:"block",blocks:["core/buttons"],transform:()=>(0,st.createBlock)("core/navigation-link")}],to:[{type:"block",blocks:["core/navigation-submenu"],transform:(e,t)=>(0,st.createBlock)("core/navigation-submenu",e,t)},{type:"block",blocks:["core/spacer"],transform:()=>(0,st.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],transform:()=>(0,st.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],transform:()=>(0,st.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],transform:()=>(0,st.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],transform:()=>(0,st.createBlock)("core/search",{showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"})},{type:"block",blocks:["core/page-list"],transform:()=>(0,st.createBlock)("core/page-list")},{type:"block",blocks:["core/buttons"],transform:({label:e,url:t,rel:o,title:n,opensInNewTab:r})=>(0,st.createBlock)("core/buttons",{},[(0,st.createBlock)("core/button",{text:e,url:t,rel:o,title:n,linkTarget:r?"_blank":void 0})])}]};var Ax=zx;const{name:Lx}=jx,Hx={icon:ed,__experimentalLabel:({label:e})=>e,merge:(e,{label:t=""})=>({...e,label:e.label+t}),edit:function({attributes:e,isSelected:t,setAttributes:o,insertBlocksAfter:n,mergeBlocks:r,onReplace:a,context:i,clientId:s}){const{id:l,label:c,type:u,url:d,description:p,kind:m,metadata:g}=e,{maxNestingLevel:h}=i,{replaceBlock:_,__unstableMarkNextChangeAsNotPersistent:x,selectBlock:b}=(0,lt.useDispatch)(ct.store),[f,y]=(0,gt.useState)(t&&!d),[v,k]=(0,gt.useState)(null),w=(0,gt.useRef)(null),C=(e=>{const[t,o]=(0,gt.useState)(!1);return(0,gt.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function r(){o(!1)}function a(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[e]),t})(w),j=(0,pt.__)("Add label…"),S=(0,gt.useRef)(),B=(0,gt.useRef)(),T=(0,xt.usePrevious)(d),N=(0,gt.useRef)(!d),{isAtMaxNesting:P,isTopLevelLink:I,isParentOfSelectedBlock:D,hasChildren:M,validateLinkStatus:z,parentBlockClientId:A}=(0,lt.useSelect)((e=>{const{getBlockCount:t,getBlockName:o,getBlockRootClientId:n,hasSelectedInnerBlock:r,getBlockParentsByBlockName:a,getSelectedBlockClientId:i}=e(ct.store),l=n(s),c=o(l),u="core/navigation"===c,d=i(),p=u?l:a(s,"core/navigation")[0],m="core/navigation-submenu"===c?l:p,g=d===p||r(p,!0);return{isAtMaxNesting:a(s,Nx).length>=h,isTopLevelLink:u,isParentOfSelectedBlock:r(s,!0),hasChildren:!!t(s),validateLinkStatus:g,parentBlockClientId:m}}),[s,h]),{getBlocks:L}=(0,lt.useSelect)(ct.store),{clearBinding:H,createBinding:R}=u_({clientId:s,attributes:e}),[V,F]=((e,t,o,n)=>{const r="post-type"===e||"post"===t||"page"===t,a=Number.isInteger(o),i=(0,ct.useBlockEditingMode)(),s=(0,lt.useSelect)((e=>{if(!r)return null;if("disabled"===i||!n)return null;const{getEntityRecord:a}=e(_t.store);return a("postType",t,o)?.status}),[r,i,n,t,o]);return[r&&a&&s&&"trash"===s,"draft"===s]})(m,u,l,z),E=(0,gt.useCallback)((()=>{let t=L(s);0===t.length&&(t=[(0,st.createBlock)("core/navigation-link")],b(t[0].clientId));const o=(0,st.createBlock)("core/navigation-submenu",e,t);_(s,o)}),[L,s,b,_,e]);(0,gt.useEffect)((()=>{N.current&&t&&!d&&b(A)}),[]),(0,gt.useEffect)((()=>{M&&(x(),E())}),[M,x,E]),(0,gt.useEffect)((()=>{!T&&d&&f&&(0,no.isURL)((0,no.prependHTTP)(c))&&/^.+\.[a-z]+/.test(c)&&function(){S.current.focus();const{ownerDocument:e}=S.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(S.current),o.removeAllRanges(),o.addRange(n)}()}),[T,d,f,c]);const{textColor:O,customTextColor:G,backgroundColor:$,customBackgroundColor:U}=z_(i,!I),q=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([k,w]),className:Dt("wp-block-navigation-item",{"is-editing":t||D,"is-dragging-within":C,"has-link":!!d,"has-child":M,"has-text-color":!!O||!!G,[(0,ct.getColorClassName)("color",O)]:!!O,"has-background":!!$||U,[(0,ct.getColorClassName)("background-color",$)]:!!$}),style:{color:!O&&G,backgroundColor:!$&&U},onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),y(!0))}}),W=(0,ct.useInnerBlocksProps)({...q,className:"remove-outline"},{defaultBlock:Tx,directInsert:!0,renderAppender:!1});(!d||V||F)&&(q.onClick=()=>{y(!0)});const Z=Dt("wp-block-navigation-item__content",{"wp-block-navigation-link__placeholder":!d||V||F}),J=function(e){let t="";switch(e){case"post":t=(0,pt.__)("Select post");break;case"page":t=(0,pt.__)("Select page");break;case"category":t=(0,pt.__)("Select category");break;case"tag":t=(0,pt.__)("Select tag");break;default:t=(0,pt.__)("Add link")}return t}(u),Q=`(${V?(0,pt.__)("Invalid"):(0,pt.__)("Draft")})`;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:gn,title:(0,pt.__)("Link"),shortcut:mn.displayShortcut.primary("k"),onClick:()=>{y(!0)}}),!P&&(0,it.jsx)(mt.ToolbarButton,{name:"submenu",icon:R_,title:(0,pt.__)("Add submenu"),onClick:E})]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Sx,{attributes:e,setAttributes:o,clientId:s})}),(0,it.jsxs)("div",{...q,children:[(0,it.jsxs)("a",{className:Z,children:[d||g?.bindings?.url?(0,it.jsxs)(it.Fragment,{children:[!V&&!F&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.RichText,{ref:S,identifier:"label",className:"wp-block-navigation-item__label",value:c,onChange:e=>o({label:e}),onMerge:r,onReplace:a,__unstableOnSplitAtEnd:()=>n((0,st.createBlock)("core/navigation-link")),"aria-label":(0,pt.__)("Navigation link text"),placeholder:j,withoutInteractiveFormatting:!0}),p&&(0,it.jsx)("span",{className:"wp-block-navigation-item__description",children:p})]}),(V||F)&&(0,it.jsx)("div",{className:Dt("wp-block-navigation-link__placeholder-text","wp-block-navigation-link__label",{"is-invalid":V,"is-draft":F}),children:(0,it.jsx)("span",{children:`${(0,ao.decodeEntities)(c)} ${V||F?Q:""}`.trim()})})]}):(0,it.jsx)("div",{className:"wp-block-navigation-link__placeholder-text",children:(0,it.jsx)("span",{children:J})}),f&&(0,it.jsx)(X_,{ref:B,clientId:s,link:e,onClose:()=>{y(!1),d?N.current&&b(s):a([])},anchor:v,onRemove:function(){o({url:void 0,label:void 0,id:void 0,kind:void 0,type:void 0,opensInNewTab:!1}),y(!1)},onChange:t=>{const{isEntityLink:n,attributes:r}=ox(t,o,e);n?R(r):H(r)}})]}),(0,it.jsx)("div",{...W})]})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{attributes:{label:(0,pt._x)("Example Link","navigation link preview example"),url:"https://example.com"}},deprecated:[{isEligible:e=>e.nofollow,attributes:{label:{type:"string"},type:{type:"string"},nofollow:{type:"boolean"},description:{type:"string"},id:{type:"number"},opensInNewTab:{type:"boolean",default:!1},url:{type:"string"}},migrate:({nofollow:e,...t})=>({rel:e?"nofollow":"",...t}),save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})}],transforms:Ax},Rx=()=>((0,vl.addFilter)("blocks.registerBlockType","core/navigation-link",Mx),jt({name:Lx,metadata:jx,settings:Hx})),Vx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/navigation-submenu","title":"Submenu","category":"design","parent":["core/navigation"],"description":"Add a submenu to your navigation.","textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"type":{"type":"string"},"description":{"type":"string"},"rel":{"type":"string"},"id":{"type":"number"},"opensInNewTab":{"type":"boolean","default":false},"url":{"type":"string"},"title":{"type":"string"},"kind":{"type":"string"},"isTopLevelItem":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","maxNestingLevel","openSubmenusOnClick","style"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-navigation-submenu-editor","style":"wp-block-navigation-submenu"}');var Fx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m13.955 20.748 8-17.5-.91-.416L19.597 6H13.5v1.5h5.411l-1.6 3.5H13.5v1.5h3.126l-1.6 3.5H13.5l.028 1.5h.812l-1.295 2.832.91.416ZM17.675 16l-.686 1.5h4.539L21.5 16h-3.825Zm2.286-5-.686 1.5H21.5V11h-1.54ZM2 12c0 3.58 2.42 5.5 6 5.5h.5V19l3-2.5-3-2.5v2H8c-2.48 0-4.5-1.52-4.5-4S5.52 7.5 8 7.5h3.5V6H8c-3.58 0-6 2.42-6 6Z"})});const Ex=()=>(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,it.jsx)(mt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})}),Ox=["core/navigation-link","core/navigation-submenu","core/page-list"];const Gx={to:[{type:"block",blocks:["core/navigation-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:e=>(0,st.createBlock)("core/navigation-link",e)},{type:"block",blocks:["core/spacer"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/spacer")},{type:"block",blocks:["core/site-logo"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/site-logo")},{type:"block",blocks:["core/home-link"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/home-link")},{type:"block",blocks:["core/social-links"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/social-links")},{type:"block",blocks:["core/search"],isMatch:(e,t)=>0===t?.innerBlocks?.length,transform:()=>(0,st.createBlock)("core/search")}]};var $x=Gx;const{name:Ux}=Vx,qx={icon:({context:e})=>"list-view"===e?Vh:R_,__experimentalLabel(e,{context:t}){const{label:o}=e,n=e?.metadata?.name;return"list-view"===t&&(n||o)&&e?.metadata?.name||o},edit:function({attributes:e,isSelected:t,setAttributes:o,mergeBlocks:n,onReplace:r,context:a,clientId:i}){const{label:s,url:l,description:c}=e,{showSubmenuIcon:u,maxNestingLevel:d,openSubmenusOnClick:p}=a,m="default"!==(0,ct.useBlockEditingMode)()||p,{clearBinding:g,createBinding:h}=u_({clientId:i,attributes:e}),{__unstableMarkNextChangeAsNotPersistent:_,replaceBlock:x}=(0,lt.useDispatch)(ct.store),[b,f]=(0,gt.useState)(!1),[y,v]=(0,gt.useState)(null),k=(0,gt.useRef)(null),w=(e=>{const[t,o]=(0,gt.useState)(!1);return(0,gt.useEffect)((()=>{const{ownerDocument:t}=e.current;function n(e){a(e)}function r(){o(!1)}function a(t){e.current.contains(t.target)?o(!0):o(!1)}return t.addEventListener("dragstart",n),t.addEventListener("dragend",r),t.addEventListener("dragenter",a),()=>{t.removeEventListener("dragstart",n),t.removeEventListener("dragend",r),t.removeEventListener("dragenter",a)}}),[]),t})(k),C=(0,pt.__)("Add text…"),j=(0,gt.useRef)(),{parentCount:S,isParentOfSelectedBlock:B,isImmediateParentOfSelectedBlock:T,hasChildren:N,selectedBlockHasChildren:P,onlyDescendantIsEmptyLink:I}=(0,lt.useSelect)((e=>{const{hasSelectedInnerBlock:t,getSelectedBlockClientId:o,getBlockParentsByBlockName:n,getBlock:r,getBlockCount:a,getBlockOrder:s}=e(ct.store);let l;const c=s(o());if(1===c?.length){const e=r(c[0]);l="core/navigation-link"===e?.name&&!e?.attributes?.label}return{parentCount:n(i,"core/navigation-submenu").length,isParentOfSelectedBlock:t(i,!0),isImmediateParentOfSelectedBlock:t(i,!1),hasChildren:!!a(i),selectedBlockHasChildren:!!c?.length,onlyDescendantIsEmptyLink:l}}),[i]),D=(0,xt.usePrevious)(N);(0,gt.useEffect)((()=>{m||l||f(!0)}),[]),(0,gt.useEffect)((()=>{t||f(!1)}),[t]),(0,gt.useEffect)((()=>{b&&l&&(0,no.isURL)((0,no.prependHTTP)(s))&&/^.+\.[a-z]+/.test(s)&&function(){j.current.focus();const{ownerDocument:e}=j.current,{defaultView:t}=e,o=t.getSelection(),n=e.createRange();n.selectNodeContents(j.current),o.removeAllRanges(),o.addRange(n)}()}),[l]);const{textColor:M,customTextColor:z,backgroundColor:A,customBackgroundColor:L}=z_(a,S>0),H=(0,ct.useBlockProps)({ref:(0,xt.useMergeRefs)([v,k]),className:Dt("wp-block-navigation-item",{"is-editing":t||B,"is-dragging-within":w,"has-link":!!l,"has-child":N,"has-text-color":!!M||!!z,[(0,ct.getColorClassName)("color",M)]:!!M,"has-background":!!A||L,[(0,ct.getColorClassName)("background-color",A)]:!!A,"open-on-click":m}),style:{color:!M&&z,backgroundColor:!A&&L},onKeyDown:function(e){mn.isKeyboardEvent.primary(e,"k")&&(e.preventDefault(),e.stopPropagation(),f(!0))}}),R=z_(a,!0),V=S>=d?Ox.filter((e=>"core/navigation-submenu"!==e)):Ox,F=A_(R),E=(0,ct.useInnerBlocksProps)(F,{allowedBlocks:V,defaultBlock:Oh,directInsert:!0,__experimentalCaptureToolbars:!0,renderAppender:!!(t||T&&!P||N)&&ct.InnerBlocks.ButtonBlockAppender}),O=m?"button":"a";function G(){const t=(0,st.createBlock)("core/navigation-link",e);x(i,t)}(0,gt.useEffect)((()=>{!N&&D&&(_(),G())}),[N,D]);const $=!P||I;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsxs)(mt.ToolbarGroup,{children:[!m&&(0,it.jsx)(mt.ToolbarButton,{name:"link",icon:gn,title:(0,pt.__)("Link"),shortcut:mn.displayShortcut.primary("k"),onClick:()=>{f(!0)}}),(0,it.jsx)(mt.ToolbarButton,{name:"revert",icon:Fx,title:(0,pt.__)("Convert to Link"),onClick:G,className:"wp-block-navigation__submenu__revert",disabled:!$})]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(Sx,{attributes:e,setAttributes:o,clientId:i})}),(0,it.jsxs)("div",{...H,children:[(0,it.jsxs)(O,{className:"wp-block-navigation-item__content",children:[(0,it.jsx)(ct.RichText,{ref:j,identifier:"label",className:"wp-block-navigation-item__label",value:s,onChange:e=>o({label:e}),onMerge:n,onReplace:r,"aria-label":(0,pt.__)("Navigation link text"),placeholder:C,withoutInteractiveFormatting:!0,onClick:()=>{m||l||f(!0)}}),c&&(0,it.jsx)("span",{className:"wp-block-navigation-item__description",children:c}),!m&&b&&(0,it.jsx)(X_,{clientId:i,link:e,onClose:()=>{f(!1)},anchor:y,onRemove:()=>{o({url:""}),(0,Rh.speak)((0,pt.__)("Link removed."),"assertive")},onChange:t=>{const{isEntityLink:n,attributes:r}=ox(t,o,e);n?h(r):g(r)}})]}),(u||m)&&(0,it.jsx)("span",{className:"wp-block-navigation__submenu-icon",children:(0,it.jsx)(Ex,{})}),(0,it.jsx)("div",{...E})]})]})},example:{attributes:{label:(0,pt._x)("About","Example link text for Navigation Submenu"),type:"page"}},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},transforms:$x},Wx=()=>jt({name:Ux,metadata:Vx,settings:qx});var Zx=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M17.5 9V6a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v3H8V6a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v3h1.5Zm0 6.5V18a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2v-2.5H8V18a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-2.5h1.5ZM4 13h16v-1.5H4V13Z"})});const Jx=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/nextpage","title":"Page Break","category":"design","description":"Separate your content into a multi-page experience.","keywords":["next page","pagination"],"parent":["core/post-content"],"textdomain":"default","supports":{"customClassName":false,"className":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-nextpage-editor"}');var Qx={from:[{type:"raw",schema:{"wp-block":{attributes:["data-block"]}},isMatch:e=>e.dataset&&"core/nextpage"===e.dataset.block,transform:()=>(0,st.createBlock)("core/nextpage",{})}]};const{name:Kx}=Jx,Yx={icon:Zx,example:{},transforms:Qx,edit:function(){return(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)("span",{children:(0,pt.__)("Page break")})})},save:function(){return(0,it.jsx)(gt.RawHTML,{children:"\x3c!--nextpage--\x3e"})}},Xx=()=>jt({name:Kx,metadata:Jx,settings:Yx}),eb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pattern","title":"Pattern Placeholder","category":"theme","description":"Show a block pattern.","supports":{"html":false,"inserter":false,"renaming":false,"blockVisibility":false,"interactivity":{"clientNavigation":true}},"textdomain":"default","attributes":{"slug":{"type":"string"}}}'),tb=new WeakMap;function ob(){const e=(0,lt.useRegistry)();if(!tb.has(e)){const t=new Map;tb.set(e,nb.bind(null,t))}return tb.get(e)}function nb(e,{name:t,blocks:o}){const n=[...o];for(;n.length;){const o=n.shift();for(const e of o.innerBlocks??[])n.unshift(e);"core/pattern"===o.name&&rb(e,t,o.attributes.slug)}}function rb(e,t,o){if(e.has(t)||e.set(t,new Set),e.get(t).add(o),ab(e,t))throw new TypeError(`Pattern ${t} has a circular dependency and cannot be rendered.`)}function ab(e,t,o=new Set,n=new Set){o.add(t),n.add(t);const r=e.get(t)??new Set;for(const t of r)if(o.has(t)){if(n.has(t))return!0}else if(ab(e,t,o,n))return!0;return n.delete(t),!1}var ib=({attributes:e,clientId:t})=>{const o=(0,lt.useRegistry)(),n=(0,lt.useSelect)((t=>t(ct.store).__experimentalGetParsedPattern(e.slug)),[e.slug]),r=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.stylesheet),[]),{replaceBlocks:a,setBlockEditingMode:i,__unstableMarkNextChangeAsNotPersistent:s}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:l,getBlockEditingMode:c}=(0,lt.useSelect)(ct.store),[u,d]=(0,gt.useState)(!1),p=ob();(0,gt.useEffect)((()=>{if(!u&&n?.blocks){try{p(n)}catch(e){return void d(!0)}window.queueMicrotask((()=>{const e=l(t),u=n.blocks.map((e=>(0,st.cloneBlock)(function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=r),e}(e))));1===u.length&&n.categories?.length>0&&(u[0].attributes={...u[0].attributes,metadata:{...u[0].attributes.metadata,categories:n.categories,patternName:n.name,name:u[0].attributes.metadata.name||n.title}});const d=c(e);o.batch((()=>{s(),i(e,"default"),s(),a(t,u),s(),i(e,d)}))}))}}),[t,u,n,s,a,c,i,l]);const m=(0,ct.useBlockProps)();return u?(0,it.jsx)("div",{...m,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)('Pattern "%s" cannot be rendered inside itself.'),n?.name)})}):(0,it.jsx)("div",{...m})};const{name:sb}=eb,lb={edit:ib},cb=()=>jt({name:sb,metadata:eb,settings:lb});var ub=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,it.jsx)(St.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,it.jsx)(St.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]});const db=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list","title":"Page List","category":"widgets","allowedBlocks":["core/page-list-item"],"description":"Display a list of all pages.","keywords":["menu","navigation"],"textdomain":"default","attributes":{"parentPageID":{"type":"integer","default":0},"isNested":{"type":"boolean","default":false}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"color":{"text":true,"background":true,"link":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"contentRole":true},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}');function pb(e,t){for(const o of e){if(o.attributes.id===t)return o;if(o.innerBlocks&&o.innerBlocks.length){const e=pb(o.innerBlocks,t);if(e)return e}}return null}function mb(e=[],t=null){let o=function(e=[]){const t="post-type",o={},n=[];return e.forEach((({id:e,title:r,link:a,type:i,parent:s})=>{const l=o[e]?.innerBlocks??[];o[e]=(0,st.createBlock)("core/navigation-link",{id:e,label:r.rendered,url:a,type:i,kind:t,metadata:{bindings:c_(t)}},l),s?(o[s]||(o[s]={innerBlocks:[]}),o[s].innerBlocks.push(o[e])):n.push(o[e])})),n}(e);if(t){const e=pb(o,t);e&&e.innerBlocks&&(o=e.innerBlocks)}const n=e=>{e.forEach(((e,t,o)=>{const{attributes:r,innerBlocks:a}=e;if(0!==a.length){n(a);const e=(0,st.createBlock)("core/navigation-submenu",r,a);o[t]=e}}))};return n(o),o}function gb({clientId:e,pages:t,parentClientId:o,parentPageID:n}){const{replaceBlock:r,selectBlock:a}=(0,lt.useDispatch)(ct.store);return()=>{const i=mb(t,n);r(e,i),a(o)}}const hb=(0,pt.__)("This Navigation Menu displays your website's pages. Editing it will enable you to add, delete, or reorder pages. However, new pages will no longer be added automatically.");function _b({onClick:e,onClose:t,disabled:o}){return(0,it.jsxs)(mt.Modal,{onRequestClose:t,title:(0,pt.__)("Edit Page List"),className:"wp-block-page-list-modal",aria:{describedby:(0,xt.useInstanceId)(_b,"wp-block-page-list-modal__description")},children:[(0,it.jsx)("p",{id:(0,xt.useInstanceId)(_b,"wp-block-page-list-modal__description"),children:hb}),(0,it.jsxs)("div",{className:"wp-block-page-list-modal-buttons",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:o,onClick:e,children:(0,pt.__)("Edit")})]})]})}const xb=()=>{};function bb({blockProps:e,innerBlocksProps:t,hasResolvedPages:o,blockList:n,pages:r,parentPageID:a}){if(!o)return(0,it.jsx)("div",{...e,children:(0,it.jsx)("div",{className:"wp-block-page-list__loading-indicator-container",children:(0,it.jsx)(mt.Spinner,{className:"wp-block-page-list__loading-indicator"})})});if(null===r)return(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})});if(0===r.length)return(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"info",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})});if(0===n.length){const t=r.find((e=>e.id===a));return t?.title?.rendered?(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)('Page List: "%s" page has no children.'),t.title.rendered)})}):(0,it.jsx)("div",{...e,children:(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Page List: Cannot retrieve Pages.")})})}return r.length>0?(0,it.jsx)("ul",{...t}):void 0}const{name:fb}=db,yb={icon:ub,example:{},edit:function({context:e,clientId:t,attributes:o,setAttributes:n}){const{parentPageID:r}=o,[a,i]=(0,gt.useState)(!1),s=(0,gt.useCallback)((()=>i(!0)),[]),l=vt(),{records:c,hasResolved:u}=(0,_t.useEntityRecords)("postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}),d="showSubmenuIcon"in e&&c?.length>0&&c?.length<=100,p=(0,gt.useMemo)((()=>{if(null===c)return new Map;const e=c.sort(((e,t)=>e.menu_order===t.menu_order?e.title.rendered.localeCompare(t.title.rendered):e.menu_order-t.menu_order));return e.reduce(((e,t)=>{const{parent:o}=t;return e.has(o)?e.get(o).push(t):e.set(o,[t]),e}),new Map)}),[c]),m=(0,ct.useBlockProps)({className:Dt("wp-block-page-list",{"has-text-color":!!e.textColor,[(0,ct.getColorClassName)("color",e.textColor)]:!!e.textColor,"has-background":!!e.backgroundColor,[(0,ct.getColorClassName)("background-color",e.backgroundColor)]:!!e.backgroundColor}),style:{...e.style?.color}}),g=(0,gt.useMemo)((function e(t=0,o=0){const n=p.get(t);return n?.length?n.reduce(((t,n)=>{const r=p.has(n.id),a={value:n.id,label:"— ".repeat(o)+n.title.rendered,rawName:n.title.rendered};return t.push(a),r&&t.push(...e(n.id,o+1)),t}),[]):[]}),[p]),h=(0,gt.useMemo)((function e(t=r){const o=p.get(t);return o?.length?o.reduce(((t,o)=>{const n=p.has(o.id),r={id:o.id,label:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,pt.__)("(no title)"),title:""!==o.title?.rendered?.trim()?o.title?.rendered:(0,pt.__)("(no title)"),link:o.url,hasChildren:n};let a=null;const i=e(o.id);return a=(0,st.createBlock)("core/page-list-item",r,i),t.push(a),t}),[]):[]}),[p,r]),{isNested:_,hasSelectedChild:x,parentClientId:b,hasDraggedChild:f,isChildOfNavigation:y}=(0,lt.useSelect)((e=>{const{getBlockParentsByBlockName:o,hasSelectedInnerBlock:n,hasDraggedInnerBlock:r}=e(ct.store),a=o(t,"core/navigation-submenu",!0),i=o(t,"core/navigation",!0);return{isNested:a.length>0,isChildOfNavigation:i.length>0,hasSelectedChild:n(t,!0),hasDraggedChild:r(t,!0),parentClientId:i[0]}}),[t]),v=gb({clientId:t,pages:c,parentClientId:b,parentPageID:r}),k=(0,ct.useInnerBlocksProps)(m,{renderAppender:!1,__unstableDisableDropZone:!0,templateLock:!y&&"all",onInput:xb,onChange:xb,value:h}),{selectBlock:w}=(0,lt.useDispatch)(ct.store);return(0,gt.useEffect)((()=>{(x||f)&&(s(),w(b))}),[x,f,b,w,s]),(0,gt.useEffect)((()=>{n({isNested:_})}),[_,n]),(0,it.jsxs)(it.Fragment,{children:[(g.length>0||d)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({parentPageID:0})},dropdownMenuProps:l,children:[g.length>0&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Parent Page"),hasValue:()=>0!==r,onDeselect:()=>n({parentPageID:0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,pt.__)("Parent"),value:r,options:g,onChange:e=>n({parentPageID:e??0}),help:(0,pt.__)("Choose a page to show only its subpages.")})}),d&&(0,it.jsxs)("div",{style:{gridColumn:"1 / -1"},children:[(0,it.jsx)("p",{children:hb}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",accessibleWhenDisabled:!0,disabled:!u,onClick:v,children:(0,pt.__)("Edit")})]})]})}),d&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{title:(0,pt.__)("Edit"),onClick:s,children:(0,pt.__)("Edit")})}),a&&(0,it.jsx)(_b,{onClick:v,onClose:()=>i(!1),disabled:!u})]}),(0,it.jsx)(bb,{blockProps:m,innerBlocksProps:k,hasResolvedPages:u,blockList:h,pages:c,parentPageID:r})]})}},vb=()=>jt({name:fb,metadata:db,settings:yb}),kb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/page-list-item","title":"Page List Item","category":"widgets","parent":["core/page-list"],"description":"Displays a page inside a list of all pages.","keywords":["page","menu","navigation"],"textdomain":"default","attributes":{"id":{"type":"number"},"label":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"},"hasChildren":{"type":"boolean"}},"usesContext":["textColor","customTextColor","backgroundColor","customBackgroundColor","overlayTextColor","customOverlayTextColor","overlayBackgroundColor","customOverlayBackgroundColor","fontSize","customFontSize","showSubmenuIcon","style","openSubmenusOnClick"],"supports":{"reusable":false,"html":false,"lock":false,"inserter":false,"__experimentalToolbar":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-page-list-editor","style":"wp-block-page-list"}'),wb=()=>(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:(0,it.jsx)(mt.Path,{d:"M1.50002 4L6.00002 8L10.5 4",strokeWidth:"1.5"})});const{name:Cb}=kb,jb={__experimentalLabel:({label:e})=>e,icon:Vh,example:{},edit:function({context:e,attributes:t}){const{id:o,label:n,link:r,hasChildren:a,title:i}=t,s="showSubmenuIcon"in e,l=(0,lt.useSelect)((e=>{if(!e(_t.store).canUser("read",{kind:"root",name:"site"}))return;const t=e(_t.store).getEntityRecord("root","site");return"page"===t?.show_on_front&&t?.page_on_front}),[]),c=A_(z_(e,!0)),u=(0,ct.useBlockProps)(c,{className:"wp-block-pages-list__item"}),d=(0,ct.useInnerBlocksProps)(u);return(0,it.jsxs)("li",{className:Dt("wp-block-pages-list__item",{"has-child":a,"wp-block-navigation-item":s,"open-on-click":e.openSubmenusOnClick,"open-on-hover-click":!e.openSubmenusOnClick&&e.showSubmenuIcon,"menu-item-home":o===l}),children:[a&&e.openSubmenusOnClick?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("button",{type:"button",className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle","aria-expanded":"false",children:(0,ao.decodeEntities)(n)}),(0,it.jsx)("span",{className:"wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon",children:(0,it.jsx)(wb,{})})]}):(0,it.jsx)("a",{className:Dt("wp-block-pages-list__item__link",{"wp-block-navigation-item__content":s}),href:r,children:(0,ao.decodeEntities)(i)}),a&&(0,it.jsxs)(it.Fragment,{children:[!e.openSubmenusOnClick&&e.showSubmenuIcon&&(0,it.jsx)("button",{className:"wp-block-navigation-item__content wp-block-navigation-submenu__toggle wp-block-page-list__submenu-icon wp-block-navigation__submenu-icon","aria-expanded":"false",type:"button",children:(0,it.jsx)(wb,{})}),(0,it.jsx)("ul",{...d})]})]},o)}},Sb=()=>jt({name:Cb,metadata:kb,settings:jb});var Bb=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m9.99609 14v-.2251l.00391.0001v6.225h1.5v-14.5h2.5v14.5h1.5v-14.5h3v-1.5h-8.50391c-2.76142 0-5 2.23858-5 5 0 2.7614 2.23858 5 5 5z"})});const Tb={className:!1},Nb={align:{type:"string"},content:{type:"string",source:"html",selector:"p",default:""},dropCap:{type:"boolean",default:!1},placeholder:{type:"string"},textColor:{type:"string"},backgroundColor:{type:"string"},fontSize:{type:"string"},direction:{type:"string",enum:["ltr","rtl"]},style:{type:"object"}},Pb=e=>{if(!e.customTextColor&&!e.customBackgroundColor&&!e.customFontSize)return e;const t={};(e.customTextColor||e.customBackgroundColor)&&(t.color={}),e.customTextColor&&(t.color.text=e.customTextColor),e.customBackgroundColor&&(t.color.background=e.customBackgroundColor),e.customFontSize&&(t.typography={fontSize:e.customFontSize});const{customTextColor:o,customBackgroundColor:n,customFontSize:r,...a}=e;return{...a,style:t}},{style:Ib,...Db}=Nb,Mb=[{supports:Tb,attributes:{...Db,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},save({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=Dt({"has-drop-cap":t!==((0,pt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,it.jsx)("p",{...ct.useBlockProps.save({className:a,dir:r}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},{supports:Tb,attributes:{...Db,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Pb,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,ct.getColorClassName)("color",a),p=(0,ct.getColorClassName)("background-color",r),m=(0,ct.getFontSizeClass)(l),g=Dt({"has-text-color":a||s,"has-background":r||i,"has-drop-cap":n,[`has-text-align-${t}`]:t,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c};return(0,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:Tb,attributes:{...Db,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"}},migrate:Pb,save({attributes:e}){const{align:t,content:o,dropCap:n,backgroundColor:r,textColor:a,customBackgroundColor:i,customTextColor:s,fontSize:l,customFontSize:c,direction:u}=e,d=(0,ct.getColorClassName)("color",a),p=(0,ct.getColorClassName)("background-color",r),m=(0,ct.getFontSizeClass)(l),g=Dt({"has-text-color":a||s,"has-background":r||i,"has-drop-cap":n,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:i,color:d?void 0:s,fontSize:m?void 0:c,textAlign:t};return(0,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:o,dir:u})}},{supports:Tb,attributes:{...Db,customTextColor:{type:"string"},customBackgroundColor:{type:"string"},customFontSize:{type:"number"},width:{type:"string"}},migrate:Pb,save({attributes:e}){const{width:t,align:o,content:n,dropCap:r,backgroundColor:a,textColor:i,customBackgroundColor:s,customTextColor:l,fontSize:c,customFontSize:u}=e,d=(0,ct.getColorClassName)("color",i),p=(0,ct.getColorClassName)("background-color",a),m=c&&`is-${c}-text`,g=Dt({[`align${t}`]:t,"has-background":a||s,"has-drop-cap":r,[m]:m,[d]:d,[p]:p}),h={backgroundColor:p?void 0:s,color:d?void 0:l,fontSize:m?void 0:u,textAlign:o};return(0,it.jsx)(ct.RichText.Content,{tagName:"p",style:h,className:g||void 0,value:n})}},{supports:Tb,attributes:{...Db,fontSize:{type:"number"}},save({attributes:e}){const{width:t,align:o,content:n,dropCap:r,backgroundColor:a,textColor:i,fontSize:s}=e,l=Dt({[`align${t}`]:t,"has-background":a,"has-drop-cap":r}),c={backgroundColor:a,color:i,fontSize:s,textAlign:o};return(0,it.jsx)("p",{style:c,className:l||void 0,children:n})},migrate:e=>Pb({...e,customFontSize:Number.isFinite(e.fontSize)?e.fontSize:void 0,customTextColor:e.textColor&&"#"===e.textColor[0]?e.textColor:void 0,customBackgroundColor:e.backgroundColor&&"#"===e.backgroundColor[0]?e.backgroundColor:void 0})},{supports:Tb,attributes:{...Nb,content:{type:"string",source:"html",default:""}},save:({attributes:e})=>(0,it.jsx)(gt.RawHTML,{children:e.content}),migrate:e=>e}];var zb=Mb,Ab=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M3 9c0 2.8 2.2 5 5 5v-.2V20h1.5V5.5H12V20h1.5V5.5h3V4H8C5.2 4 3 6.2 3 9Zm15.9-1-1.1 1 2.6 3-2.6 3 1.1 1 3.4-4-3.4-4Z"})});function Lb(e){const{batch:t}=(0,lt.useRegistry)(),{moveBlocksToPosition:o,replaceInnerBlocks:n,duplicateBlocks:r,insertBlock:a}=(0,lt.useDispatch)(ct.store),{getBlockRootClientId:i,getBlockIndex:s,getBlockOrder:l,getBlockName:c,getBlock:u,getNextBlockClientId:d,canInsertBlockType:p}=(0,lt.useSelect)(ct.store),m=(0,gt.useRef)(e);return m.current=e,(0,xt.useRefEffect)((e=>{function g(e){if(e.defaultPrevented)return;if(e.keyCode!==mn.ENTER)return;const{content:g,clientId:h}=m.current;if(g.length)return;const _=i(h);if(!(0,st.hasBlockSupport)(c(_),"__experimentalOnEnter",!1))return;const x=l(_),b=x.indexOf(h);if(b===x.length-1){let t=_;for(;!p(c(h),i(t));)t=i(t);return void("string"==typeof t&&(e.preventDefault(),o([h],_,i(t),s(t)+1)))}const f=(0,st.getDefaultBlockName)();if(!p(f,i(_)))return;e.preventDefault();const y=u(_);t((()=>{r([_]);const e=s(_);n(_,y.innerBlocks.slice(0,b)),n(d(_),y.innerBlocks.slice(b+1)),a((0,st.createBlock)(f),e+1,i(_),!0)}))}return e.addEventListener("keydown",g),()=>{e.removeEventListener("keydown",g)}}),[])}function Hb({direction:e,setDirection:t}){return(0,pt.isRTL)()&&(0,it.jsx)(mt.ToolbarButton,{icon:Ab,title:(0,pt._x)("Left to right","editor button"),isActive:"ltr"===e,onClick:()=>{t("ltr"===e?void 0:"ltr")}})}function Rb(e){return e===((0,pt.isRTL)()?"left":"right")||"center"===e}function Vb({clientId:e,attributes:t,setAttributes:o,name:n}){const[r]=(0,ct.useSettings)("typography.dropCap");if(!r)return null;const{align:a,dropCap:i}=t;let s;s=Rb(a)?(0,pt.__)("Not available for aligned text."):i?(0,pt.__)("Showing large initial letter."):(0,pt.__)("Show a large initial letter.");const l=(0,st.getBlockSupport)(n,"typography.defaultControls.dropCap",!1);return(0,it.jsx)(ct.InspectorControls,{group:"typography",children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Drop cap"),isShownByDefault:l,onDeselect:()=>o({dropCap:!1}),resetAllFilter:()=>({dropCap:!1}),panelId:e,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Drop cap"),checked:!!i,onChange:()=>o({dropCap:!i}),help:s,disabled:Rb(a)})})})}var Fb=function({attributes:e,mergeBlocks:t,onReplace:o,onRemove:n,setAttributes:r,clientId:a,isSelected:i,name:s}){const{align:l,content:c,direction:u,dropCap:d,placeholder:p}=e,m=(0,ct.useBlockProps)({ref:Lb({clientId:a,content:c}),className:Dt({"has-drop-cap":!Rb(l)&&d,[`has-text-align-${l}`]:l}),style:{direction:u}}),g=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:["default"===g&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:l,onChange:e=>r({align:e,dropCap:!Rb(e)&&d})}),(0,it.jsx)(Hb,{direction:u,setDirection:e=>r({direction:e})})]}),i&&(0,it.jsx)(Vb,{name:s,clientId:a,attributes:e,setAttributes:r}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:"p",...m,value:c,onChange:e=>r({content:e}),onMerge:t,onReplace:o,onRemove:n,"aria-label":ct.RichText.isEmpty(c)?(0,pt.__)("Empty block; start writing or type forward slash to choose a block"):(0,pt.__)("Block: Paragraph"),"data-empty":ct.RichText.isEmpty(c),placeholder:p||(0,pt.__)("Type / to choose a block"),"data-custom-placeholder":!!p||void 0,__unstableEmbedURLOnPaste:!0,__unstableAllowPrefixTransformations:!0})]})};const Eb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/paragraph","title":"Paragraph","category":"text","description":"Start with the basic building block of all narrative.","keywords":["text"],"textdomain":"default","attributes":{"align":{"type":"string"},"content":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"dropCap":{"type":"boolean","default":false},"placeholder":{"type":"string"},"direction":{"type":"string","enum":["ltr","rtl"]}},"supports":{"splitting":true,"anchor":true,"className":false,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"fitText":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalSelector":"p","__unstablePasteTextInline":true,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-paragraph-editor","style":"wp-block-paragraph"}');const Ob={from:[{type:"raw",priority:20,selector:"p",schema:({phrasingContentSchema:e,isPaste:t})=>({p:{children:e,attributes:t?[]:["style","id"]}}),transform(e){const t=(0,st.getBlockAttributes)(Eb.name,e.outerHTML),{textAlign:o}=e.style||{};return"left"!==o&&"center"!==o&&"right"!==o||(t.align=o),(0,st.createBlock)(Eb.name,t)}}]};var Gb=Ob;const{name:$b}=Eb,Ub={icon:Bb,example:{attributes:{content:(0,pt.__)("In a village of La Mancha, the name of which I have no desire to call to mind, there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.")}},__experimentalLabel(e,{context:t}){const o=e?.metadata?.name;if("list-view"===t&&o)return o;if("accessibility"===t){if(o)return o;const{content:t}=e;return t&&0!==t.length?t:(0,pt.__)("Empty")}},transforms:Gb,deprecated:zb,merge:(e,t)=>({content:(e.content||"")+(t.content||"")}),edit:Fb,save:function({attributes:e}){const{align:t,content:o,dropCap:n,direction:r}=e,a=Dt({"has-drop-cap":t!==((0,pt.isRTL)()?"left":"right")&&"center"!==t&&n,[`has-text-align-${t}`]:t});return(0,it.jsx)("p",{...ct.useBlockProps.save({className:a,dir:r}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},qb=()=>jt({name:$b,metadata:Eb,settings:Ub});var Wb=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M10 4.5a1 1 0 11-2 0 1 1 0 012 0zm1.5 0a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm2.25 7.5v-1A2.75 2.75 0 0011 8.25H7A2.75 2.75 0 004.25 11v1h1.5v-1c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v1h1.5zM4 20h9v-1.5H4V20zm16-4H4v-1.5h16V16z",fillRule:"evenodd",clipRule:"evenodd"})});const Zb=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author","title":"Author","category":"theme","description":"Display post author details such as name, avatar, and bio.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"avatarSize":{"type":"number","default":48},"showAvatar":{"type":"boolean","default":true},"showBio":{"type":"boolean"},"byline":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId","queryId"],"supports":{"html":false,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"filter":{"duotone":true}},"selectors":{"filter":{"duotone":".wp-block-post-author .wp-block-post-author__avatar img"}},"editorStyle":"wp-block-post-author-editor","style":"wp-block-post-author"}'),Jb={who:"authors",per_page:100,_fields:"id,name",context:"view"};function Qb({value:e,onChange:t}){const[o,n]=(0,gt.useState)(""),{authors:r,isLoading:a}=(0,lt.useSelect)((e=>{const{getUsers:t,isResolving:n}=e(_t.store),r={...Jb};return o&&(r.search=o,r.search_columns=["name"]),{authors:t(r),isLoading:n("getUsers",[r])}}),[o]),i=(0,gt.useMemo)((()=>{const t=(r??[]).map((e=>({value:e.id,label:(0,ao.decodeEntities)(e.name)}))),o=t.findIndex((t=>e?.id===t.value));let n=[];return o<0&&e?n=[{value:e.id,label:(0,ao.decodeEntities)(e.name)}]:o<0&&!e&&(n=[{value:0,label:(0,pt.__)("(No author)")}]),[...n,...t]}),[r,e]);return(0,it.jsx)(mt.ComboboxControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Author"),options:i,value:e?.id,onFilterValueChange:(0,xt.debounce)(n,300),onChange:t,allowReset:!1,isLoading:a})}var Kb=function({isSelected:e,context:{postType:t,postId:o,queryId:n},attributes:r,setAttributes:a}){const i=Number.isFinite(n),s=vt(),l=yt(),{authorDetails:c,canAssignAuthor:u,supportsAuthor:d}=(0,lt.useSelect)((e=>{const{getEditedEntityRecord:n,getUser:r,getPostType:a}=e(_t.store),i=n("postType",t,o),s=i?.author;return{authorDetails:s?r(s,{context:"view"}):null,supportsAuthor:a(t)?.supports?.author??!1,canAssignAuthor:!!i?._links?.["wp:action-assign-author"]}}),[t,o]),{editEntityRecord:p}=(0,lt.useDispatch)(_t.store),{textAlign:m,showAvatar:g,showBio:h,byline:_,isLink:x,linkTarget:b,avatarSize:f}=r,y=[],v=c?.name||(0,pt.__)("Post Author");c?.avatar_urls&&Object.keys(c.avatar_urls).forEach((e=>{y.push({value:e,label:`${e} x ${e}`})}));const k=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${m}`]:m})}),w=!!o&&!i&&u;return d||void 0===t?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({avatarSize:48,showAvatar:!0,isLink:!1,linkTarget:"_self"})},dropdownMenuProps:s,children:[w&&(0,it.jsx)("div",{style:{gridColumn:"1 / -1"},children:(0,it.jsx)(Qb,{value:c,onChange:e=>{p("postType",t,o,{author:e})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show avatar"),isShownByDefault:!0,hasValue:()=>!g,onDeselect:()=>a({showAvatar:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show avatar"),checked:g,onChange:()=>a({showAvatar:!g})})}),g&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Avatar size"),isShownByDefault:!0,hasValue:()=>48!==f,onDeselect:()=>a({avatarSize:48}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Avatar size"),value:f,options:y,onChange:e=>{a({avatarSize:Number(e)})}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Show bio"),isShownByDefault:!0,hasValue:()=>!!h,onDeselect:()=>a({showBio:void 0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show bio"),checked:!!h,onChange:()=>a({showBio:!h})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link author name to author page"),isShownByDefault:!0,hasValue:()=>!!x,onDeselect:()=>a({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link author name to author page"),checked:x,onChange:()=>a({isLink:!x})})}),x&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link target"),isShownByDefault:!0,hasValue:()=>"_self"!==b,onDeselect:()=>a({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===b})})]})}),(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:m,onChange:e=>{a({textAlign:e})}})}),(0,it.jsxs)("div",{...k,children:[g&&(0,it.jsx)("div",{className:"wp-block-post-author__avatar",children:(0,it.jsx)("img",{width:f,src:c?.avatar_urls?.[f]||l,alt:c?.name||(0,pt.__)("Default Avatar")})}),(0,it.jsxs)("div",{className:"wp-block-post-author__content",children:[(!ct.RichText.isEmpty(_)||e)&&(0,it.jsx)(ct.RichText,{identifier:"byline",className:"wp-block-post-author__byline","aria-label":(0,pt.__)("Post author byline text"),placeholder:(0,pt.__)("Write byline…"),value:_,onChange:e=>a({byline:e})}),(0,it.jsx)("p",{className:"wp-block-post-author__name",children:x?(0,it.jsx)("a",{href:"#post-author-pseudo-link",onClick:e=>e.preventDefault(),children:v}):v}),h&&(0,it.jsx)("p",{className:"wp-block-post-author__bio",dangerouslySetInnerHTML:{__html:c?.description}})]})]})]}):(0,it.jsx)("div",{...k,children:(0,pt.sprintf)((0,pt.__)("This post type (%s) does not support the author."),t)})};const{name:Yb}=Zb,Xb={icon:Wb,example:{viewportWidth:350,attributes:{showBio:!0,byline:(0,pt.__)("Posted by")}},edit:Kb},ef=()=>jt({name:Yb,metadata:Zb,settings:Xb}),tf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-name","title":"Author Name","category":"theme","description":"The author name.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-name"}');var of=function({context:{postType:e,postId:t},attributes:{textAlign:o,isLink:n,linkTarget:r},setAttributes:a}){const{authorName:i,supportsAuthor:s}=(0,lt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r,getPostType:a}=o(_t.store),i=n("postType",e,t)?.author;return{authorName:i?r(i):null,supportsAuthor:a(e)?.supports?.author??!1}}),[e,t]),l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),c=i?.name||(0,pt.__)("Author Name"),u=n?(0,it.jsx)("a",{href:"#author-pseudo-link",onClick:e=>e.preventDefault(),className:"wp-block-post-author-name__link",children:c}):c,d=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{a({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{a({isLink:!1,linkTarget:"_self"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link to author archive"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>a({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link to author archive"),onChange:()=>a({isLink:!n}),checked:n})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==r,onDeselect:()=>a({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>a({linkTarget:e?"_blank":"_self"}),checked:"_blank"===r})})]})}),(0,it.jsx)("div",{...l,children:s||void 0===e?u:(0,pt.sprintf)((0,pt.__)("This post type (%s) does not support the author."),e)})]})};var nf={from:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-author-name",{textAlign:e})}],to:[{type:"block",blocks:["core/post-author"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-author",{textAlign:e})}]};const{name:rf}=tf,af={icon:Wb,transforms:nf,edit:of},sf=()=>jt({name:rf,metadata:tf,settings:af}),lf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-author-biography","title":"Author Biography","category":"theme","description":"The author biography.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postType","postId"],"example":{"viewportWidth":350},"supports":{"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-author-biography"}');var cf=function({context:{postType:e,postId:t},attributes:{textAlign:o},setAttributes:n}){const{authorDetails:r}=(0,lt.useSelect)((o=>{const{getEditedEntityRecord:n,getUser:r}=o(_t.store),a=n("postType",e,t)?.author;return{authorDetails:a?r(a):null}}),[e,t]),a=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),i=r?.description||(0,pt.__)("Author Biography");return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{n({textAlign:e})}})}),(0,it.jsx)("div",{...a,dangerouslySetInnerHTML:{__html:i}})]})};const{name:uf}=lf,df={icon:Wb,edit:cf},pf=()=>jt({name:uf,metadata:lf,settings:df}),mf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":"fse","name":"core/post-comment","title":"Comment (deprecated)","category":"theme","allowedBlocks":["core/avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link"],"description":"This block is deprecated. Please use the Comments block instead.","textdomain":"default","attributes":{"commentId":{"type":"number"}},"providesContext":{"commentId":"commentId"},"supports":{"html":false,"inserter":false,"interactivity":{"clientNavigation":true}}}');var gf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})});const hf=[["core/avatar"],["core/comment-author-name"],["core/comment-date"],["core/comment-content"],["core/comment-reply-link"],["core/comment-edit-link"]];const{name:_f}=mf,xf={icon:pm,edit:function({attributes:{commentId:e},setAttributes:t}){const[o,n]=(0,gt.useState)(e),r=(0,ct.useBlockProps)(),a=(0,ct.useInnerBlocksProps)(r,{template:hf});return e?(0,it.jsx)("div",{...a}):(0,it.jsx)("div",{...r,children:(0,it.jsxs)(mt.Placeholder,{icon:gf,label:(0,pt._x)("Post Comment","block title"),instructions:(0,pt.__)("To show a comment, input the comment ID."),children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,value:e,onChange:e=>n(parseInt(e))}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t({commentId:o})},children:(0,pt.__)("Save")})]})})},save:function(){const e=ct.useBlockProps.save(),t=ct.useInnerBlocksProps.save(e);return(0,it.jsx)("div",{...t})}},bf=()=>jt({name:_f,metadata:mf,settings:xf});var ff=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-2.2 6.6H7l1.6-2.2c.3-.4.5-.7.6-.9.1-.2.2-.4.2-.5 0-.2-.1-.3-.1-.4-.1-.1-.2-.1-.4-.1s-.4 0-.6.1c-.3.1-.5.3-.7.4l-.2.2-.2-1.2.1-.1c.3-.2.5-.3.8-.4.3-.1.6-.1.9-.1.3 0 .6.1.9.2.2.1.4.3.6.5.1.2.2.5.2.7 0 .3-.1.6-.2.9-.1.3-.4.7-.7 1.1l-.5.6h1.6v1.2z"})});const yf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-count","title":"Comments Count","category":"theme","description":"Display a post\'s comments count.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-comments-count"}');var vf={to:[{type:"block",blocks:["core/post-comments-link"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-comments-link",{textAlign:e})}]};const{name:kf}=yf,wf={icon:ff,edit:function({attributes:e,context:t,setAttributes:o}){const{textAlign:n}=e,{postId:r}=t,[a,i]=(0,gt.useState)(),s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});(0,gt.useEffect)((()=>{if(!r)return;const e=r;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:r}),parse:!1}).then((t=>{e===r&&i(t.headers.get("X-WP-Total"))}))}),[r]);const l=r&&void 0!==a,c={...s.style,textDecoration:l?s.style?.textDecoration:void 0};return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,it.jsx)("div",{...s,style:c,children:l?a:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Count block: post not found.")})})]})},transforms:vf},Cf=()=>jt({name:kf,metadata:yf,settings:wf});var jf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 8H4v1.5h9V8zM4 4v1.5h16V4H4zm9 8H5c-.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-1V13c0-.6-.4-1-1-1zm-.5 6.6H6.7l-1.2 1.2v-6.3h7v5.1z"})});const Sf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-form","title":"Comments Form","category":"theme","description":"Display a post\'s comments form.","textdomain":"default","attributes":{"textAlign":{"type":"string"}},"usesContext":["postId","postType"],"supports":{"html":false,"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-comments-form-editor","style":["wp-block-post-comments-form","wp-block-buttons","wp-block-button"],"example":{"attributes":{"textAlign":"center"}}}');const{name:Bf}=Sf,Tf={icon:jf,edit:function e({attributes:t,context:o,setAttributes:n}){const{textAlign:r}=t,{postId:a,postType:i}=o,s=(0,xt.useInstanceId)(e),l=(0,pt.sprintf)("comments-form-edit-%d-desc",s),c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r}),"aria-describedby":l});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{n({textAlign:e})}})}),(0,it.jsxs)("div",{...c,children:[(0,it.jsx)(ea,{postId:a,postType:i}),(0,it.jsx)(mt.VisuallyHidden,{id:l,children:(0,pt.__)("Comments form disabled in editor.")})]})]})}},Nf=()=>jt({name:Bf,metadata:Sf,settings:Tf}),Pf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-comments-link","title":"Comments Link","category":"theme","description":"Displays the link to the current post comments.","textdomain":"default","usesContext":["postType","postId"],"attributes":{"textAlign":{"type":"string"}},"example":{"viewportWidth":350},"supports":{"html":false,"color":{"link":true,"text":false,"__experimentalDefaultControls":{"background":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-comments-link"}');var If=function({context:e,attributes:t,setAttributes:o}){const{textAlign:n}=t,{postType:r,postId:a}=e,[i,s]=(0,gt.useState)(),l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});(0,gt.useEffect)((()=>{if(!a)return;const e=a;Ua()({path:(0,no.addQueryArgs)("/wp/v2/comments",{post:a}),parse:!1}).then((t=>{e===a&&s(t.headers.get("X-WP-Total"))}))}),[a]);const c=(0,lt.useSelect)((e=>e(_t.store).getEditedEntityRecord("postType",r,a)),[r,a]);if(!c)return(0,it.jsx)("div",{...l,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Link block: post not found.")})});const{link:u}=c;let d;if(void 0!==i){const e=parseInt(i);d=0===e?(0,pt.__)("No comments"):(0,pt.sprintf)((0,pt._n)("%s comment","%s comments",e),e.toLocaleString())}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{o({textAlign:e})}})}),(0,it.jsx)("div",{...l,children:u&&void 0!==d?(0,it.jsx)("a",{href:u+"#comments",onClick:e=>e.preventDefault(),children:d}):(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Post Comments Link block: post not found.")})})]})};var Df={to:[{type:"block",blocks:["core/post-comments-count"],transform:({textAlign:e})=>(0,st.createBlock)("core/post-comments-count",{textAlign:e})}]};const{name:Mf}=Pf,zf={edit:If,icon:ff,transforms:Df},Af=()=>jt({name:Mf,metadata:Pf,settings:zf});var Lf=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})});const Hf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-content","title":"Content","category":"theme","description":"Displays the contents of a post or page.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"tagName":{"type":"string","default":"div"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"layout":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"dimensions":{"minHeight":true},"spacing":{"blockGap":true,"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":false,"text":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-content","editorStyle":"wp-block-post-content-editor"}'),{HTMLElementControl:Rf}=jo(ct.privateApis);function Vf({parentLayout:e,layoutClassNames:t,userCanEdit:o,postType:n,postId:r,tagName:a="div"}){const[,,i]=(0,_t.useEntityProp)("postType",n,"content",r),s=(0,ct.useBlockProps)({className:t}),l=(0,gt.useMemo)((()=>i?.raw?(0,st.parse)(i.raw):[]),[i?.raw]),c=(0,ct.__experimentalUseBlockPreview)({blocks:l,props:s,layout:e});return o?(0,it.jsx)("div",{...c}):i?.protected?(0,it.jsx)(a,{...s,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("This content is password protected.")})}):(0,it.jsx)(a,{...s,dangerouslySetInnerHTML:{__html:i?.rendered}})}function Ff({context:e={},tagName:t="div"}){const{postType:o,postId:n}=e,[r,a,i]=(0,_t.useEntityBlockEditor)("postType",o,{id:n}),s=(0,lt.useSelect)((e=>e(_t.store).getEntityRecord("postType",o,n)),[o,n]),l=!!s?.content?.raw||r?.length,c=(0,ct.useInnerBlocksProps)((0,ct.useBlockProps)({className:"entry-content"}),{value:r,onInput:a,onChange:i,template:l?void 0:[["core/paragraph"]]});return(0,it.jsx)(t,{...c})}function Ef(e){const{context:{queryId:t,postType:o,postId:n}={},layoutClassNames:r,tagName:a}=e,i=bt("postType",o,n);if(void 0===i)return null;const s=Number.isFinite(t);return i&&!s?(0,it.jsx)(Ff,{...e}):(0,it.jsx)(Vf,{parentLayout:e.parentLayout,layoutClassNames:r,userCanEdit:i,postType:o,postId:n,tagName:a})}function Of({layoutClassNames:e}){const t=(0,ct.useBlockProps)({className:e});return(0,it.jsxs)("div",{...t,children:[(0,it.jsx)("p",{children:(0,pt.__)("This is the Content block, it will display all the blocks in any single post or page.")}),(0,it.jsx)("p",{children:(0,pt.__)("That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.")}),(0,it.jsx)("p",{children:(0,pt.__)("If there are any Custom Post Types registered at your site, the Content block can display the contents of those entries as well.")})]})}function Gf(){const e=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})})}function $f({tagName:e,onSelectTagName:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(Rf,{tagName:e,onChange:t,clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"}]})})}const{name:Uf}=Hf,qf={icon:Lf,edit:function({context:e,attributes:{tagName:t="div"},setAttributes:o,clientId:n,__unstableLayoutClassNames:r,__unstableParentLayout:a}){const{postId:i,postType:s}=e,l=(0,ct.useHasRecursion)(i);return i&&s&&l?(0,it.jsx)(Gf,{}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)($f,{tagName:t,onSelectTagName:e=>{o({tagName:e})},clientId:n}),(0,it.jsx)(ct.RecursionProvider,{uniqueId:i,children:i&&s?(0,it.jsx)(Ef,{context:e,parentLayout:a,layoutClassNames:r}):(0,it.jsx)(Of,{layoutClassNames:r})})]})}},Wf=()=>jt({name:Uf,metadata:Hf,settings:qf}),Zf=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-date","title":"Date","category":"theme","description":"Display a custom date.","textdomain":"default","attributes":{"datetime":{"type":"string","role":"content"},"textAlign":{"type":"string"},"format":{"type":"string"},"isLink":{"type":"boolean","default":false,"role":"content"}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');function Jf(e){return/(?:^|[^\\])[aAgh]/.test(e)}const Qf={attributes:{datetime:{type:"string",role:"content"},textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save:()=>null,migrate:({metadata:{bindings:{datetime:{source:e,args:{key:t,...o}},...n},...r},...a})=>({metadata:{bindings:{datetime:{source:e,args:{field:t,...o}},...n},...r},...a}),isEligible:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&!!e?.metadata?.bindings?.datetime?.args?.key},Kf={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1,role:"content"},displayType:{type:"string",default:"date"}},supports:{html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0,link:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0}},interactivity:{clientNavigation:!0},__experimentalBorder:{radius:!0,color:!0,width:!0,style:!0,__experimentalDefaultControls:{radius:!0,color:!0,width:!0,style:!0}}},save:()=>null,migrate({className:e,displayType:t,metadata:o,...n}){if("date"===t||"modified"===t)return"modified"===t&&(e=Dt(e,"wp-block-post-date__modified-date")),{...n,className:e,metadata:{...o,bindings:{datetime:{source:"core/post-data",args:{field:t}}}}}},isEligible:e=>!e.datetime&&!e?.metadata?.bindings?.datetime},Yf={attributes:{textAlign:{type:"string"},format:{type:"string"},isLink:{type:"boolean",default:!1}},supports:{html:!1,color:{gradients:!0,link:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Xf=[Qf,Kf,Yf];const ey=[{name:"post-date",title:(0,pt.__)("Post Date"),description:(0,pt.__)("Display a post's publish date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"date"===e?.metadata?.bindings?.datetime?.args?.field},{name:"post-date-modified",title:(0,pt.__)("Modified Date"),description:(0,pt.__)("Display a post's last updated date."),attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"modified"}}}},className:"wp-block-post-date__modified-date"},scope:["inserter","transform"],isActive:e=>"core/post-data"===e?.metadata?.bindings?.datetime?.source&&"modified"===e?.metadata?.bindings?.datetime?.args?.field}];var ty=ey;const{name:oy}=Zf,ny={icon:wa,edit:function({attributes:e,context:{postType:t,queryId:o},setAttributes:n,name:r}){const{datetime:a,textAlign:i,format:s,isLink:l}=e,c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i})}),u=vt(),[d,p]=(0,gt.useState)(null),m=(0,gt.useMemo)((()=>({anchor:d})),[d]),{__unstableMarkNextChangeAsNotPersistent:g}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{void 0===a&&(g(),n({datetime:new Date}))}),[a]);const h=Number.isFinite(o),_=(0,ja.getSettings)(),{postType:x,siteFormat:b=_.formats.date,siteTimeFormat:f=_.formats.time}=(0,lt.useSelect)((e=>{const{getPostType:o,getEntityRecord:n}=e(_t.store),r=n("root","site");return{siteFormat:r?.date_format,siteTimeFormat:r?.time_format,postType:t?o(t):null}}),[t]),y=(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation(r,e)?.name),[r,e]),v=(0,ct.useBlockEditingMode)();let k=(0,it.jsx)("time",{dateTime:(0,ja.dateI18n)("c",a),ref:p,children:"human-diff"===s?(0,ja.humanTimeDiff)(a):(0,ja.dateI18n)(s||b,a)});return l&&a&&(k=(0,it.jsx)("a",{href:"#post-date-pseudo-link",onClick:e=>e.preventDefault(),children:k})),(0,it.jsxs)(it.Fragment,{children:[("default"===v||!h)&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.AlignmentControl,{value:i,onChange:e=>{n({textAlign:e})}}),"post-date-modified"!==y&&(!h||!y)&&(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.Dropdown,{popoverProps:m,renderContent:({onClose:e})=>(0,it.jsx)(ct.__experimentalPublishDateTimePicker,{title:"post-date"===y?(0,pt.__)("Publish Date"):(0,pt.__)("Date"),currentDate:a,onChange:e=>n({datetime:e}),is12Hour:Jf(f),onClose:e,dateOrder:(0,pt._x)("dmy","date order")}),renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-expanded":e,icon:$l,title:(0,pt.__)("Change Date"),onClick:t,onKeyDown:o=>{e||o.keyCode!==mn.DOWN||(o.preventDefault(),t())}})})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({datetime:void 0,format:void 0,isLink:!1})},dropdownMenuProps:u,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Date Format"),onDeselect:()=>n({format:void 0}),isShownByDefault:!0,children:(0,it.jsx)(ct.__experimentalDateFormatPicker,{format:s,defaultFormat:b,onChange:e=>n({format:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==l,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onDeselect:()=>n({isLink:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:x?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),x.labels.singular_name.toLowerCase()):(0,pt.__)("Link to post"),onChange:()=>n({isLink:!l}),checked:l})})]})}),(0,it.jsx)("div",{...c,children:k})]})},deprecated:Xf,variations:ty},ry=()=>jt({name:oy,metadata:Zf,settings:ny});var ay=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})});const iy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-excerpt","title":"Excerpt","category":"theme","description":"Display the excerpt.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"moreText":{"type":"string","role":"content"},"showMoreOnNewLine":{"type":"boolean","default":true},"excerptLength":{"type":"number","default":55}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-post-excerpt-editor","style":"wp-block-post-excerpt"}');var sy={from:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-excerpt")}],to:[{type:"block",blocks:["core/post-content"],transform:()=>(0,st.createBlock)("core/post-content")}]};const{name:ly}=iy,cy={icon:ay,transforms:sy,edit:function({attributes:{textAlign:e,moreText:t,showMoreOnNewLine:o,excerptLength:n},setAttributes:r,isSelected:a,context:{postId:i,postType:s,queryId:l}}){const c="default"===(0,ct.useBlockEditingMode)(),u=Number.isFinite(l),d=bt("postType",s,i),[p,m,{rendered:g,protected:h}={}]=(0,_t.useEntityProp)("postType",s,"excerpt",i),_=vt(),x=(0,lt.useSelect)((e=>"page"===s||!!e(_t.store).getPostType(s)?.supports?.excerpt),[s]),b=d&&!u&&x,f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${e}`]:e})}),y=(0,pt._x)("words","Word count type. Do not translate!"),v=(0,gt.useMemo)((()=>{if(!g)return"";const e=(new window.DOMParser).parseFromString(g,"text/html");return e.body.textContent||e.body.innerText||""}),[g]);if(!s||!i)return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)("div",{...f,children:(0,it.jsx)("p",{children:(0,pt.__)("This block will display the excerpt.")})})]});if(h&&!d)return(0,it.jsx)("div",{...f,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("The content is currently protected and does not have the available excerpt.")})});const k=(0,it.jsx)(ct.RichText,{identifier:"moreText",className:"wp-block-post-excerpt__more-link",tagName:"a","aria-label":(0,pt.__)("“Read more” link text"),placeholder:(0,pt.__)('Add "read more" link text'),value:t,onChange:e=>r({moreText:e}),withoutInteractiveFormatting:!0}),w=Dt("wp-block-post-excerpt__excerpt",{"is-inline":!o}),C=(p||v).trim();let j="";if("words"===y)j=C.split(" ",n).join(" ");else if("characters_excluding_spaces"===y){const e=C.split("",n).join(""),t=e.length-e.replaceAll(" ","").length;j=C.split("",n+t).join("")}else"characters_including_spaces"===y&&(j=C.split("",n).join(""));const S=j!==C,B=b?(0,it.jsx)(ct.RichText,{className:w,"aria-label":(0,pt.__)("Excerpt text"),value:a?C:(S?j+"…":C)||(0,pt.__)("No excerpt found"),onChange:m,tagName:"p"}):(0,it.jsx)("p",{className:w,children:S?j+"…":C||(0,pt.__)("No excerpt found")});return(0,it.jsxs)(it.Fragment,{children:[c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:e,onChange:e=>r({textAlign:e})})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{r({showMoreOnNewLine:!0,excerptLength:55})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==o,label:(0,pt.__)("Show link on new line"),onDeselect:()=>r({showMoreOnNewLine:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show link on new line"),checked:o,onChange:e=>r({showMoreOnNewLine:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>55!==n,label:(0,pt.__)("Max number of words"),onDeselect:()=>r({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Max number of words"),value:n,onChange:e=>{r({excerptLength:e})},min:"10",max:"100"})})]})}),(0,it.jsxs)("div",{...f,children:[B,!o&&" ",o?(0,it.jsx)("p",{className:"wp-block-post-excerpt__more-text",children:k}):k]})]})}},uy=()=>jt({name:ly,metadata:iy,settings:cy});var dy=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z"})});const py=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-featured-image","title":"Featured Image","category":"theme","description":"Display a post\'s featured image.","textdomain":"default","attributes":{"isLink":{"type":"boolean","default":false,"role":"content"},"aspectRatio":{"type":"string"},"width":{"type":"string"},"height":{"type":"string"},"scale":{"type":"string","default":"cover"},"sizeSlug":{"type":"string"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"overlayColor":{"type":"string"},"customOverlayColor":{"type":"string"},"dimRatio":{"type":"number","default":0},"gradient":{"type":"string"},"customGradient":{"type":"string"},"useFirstImageFromPost":{"type":"boolean","default":false}},"usesContext":["postId","postType","queryId"],"example":{"viewportWidth":350},"supports":{"align":["left","right","center","wide","full"],"color":{"text":false,"background":false},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"filter":{"duotone":true},"shadow":{"__experimentalSkipSerialization":true},"html":false,"spacing":{"margin":true,"padding":true},"interactivity":{"clientNavigation":true}},"selectors":{"border":".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay","shadow":".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder","filter":{"duotone":".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"}},"editorStyle":"wp-block-post-featured-image-editor","style":"wp-block-post-featured-image"}'),my=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"cover",label:(0,pt._x)("Cover","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"contain",label:(0,pt._x)("Contain","Scale option for Image dimension control")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"fill",label:(0,pt._x)("Fill","Scale option for Image dimension control")})]}),gy="cover",hy={cover:(0,pt.__)("Image is scaled and cropped to fill the entire space without being distorted."),contain:(0,pt.__)("Image is scaled to fill the space without clipping nor distorting."),fill:(0,pt.__)("Image will be stretched and distorted to completely fill the space.")};var _y=({clientId:e,attributes:{aspectRatio:t,width:o,height:n,scale:r},setAttributes:a})=>{const[i,s,l,c]=(0,ct.useSettings)("spacing.units","dimensions.aspectRatios.default","dimensions.aspectRatios.theme","dimensions.defaultAspectRatios"),u=(0,mt.__experimentalUseCustomUnits)({availableUnits:i||["px","%","vw","em","rem"]}),d=(e,t)=>{const o=parseFloat(t);isNaN(o)&&t||a({[e]:o<0?"0":t})},p=(0,pt._x)("Scale","Image scaling options"),m=n||t&&"auto"!==t,g=l?.map((({name:e,ratio:t})=>({label:e,value:t}))),h=s?.map((({name:e,ratio:t})=>({label:e,value:t}))),_=[{label:(0,pt._x)("Original","Aspect ratio option for dimensions control"),value:"auto"},...c?h:[],...g||[]];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!t,label:(0,pt.__)("Aspect ratio"),onDeselect:()=>a({aspectRatio:void 0}),resetAllFilter:()=>({aspectRatio:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Aspect ratio"),value:t,options:_,onChange:e=>a({aspectRatio:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!n,label:(0,pt.__)("Height"),onDeselect:()=>a({height:void 0}),resetAllFilter:()=>({height:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Height"),labelPosition:"top",value:n||"",min:0,onChange:e=>d("height",e),units:u})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{className:"single-column",hasValue:()=>!!o,label:(0,pt.__)("Width"),onDeselect:()=>a({width:void 0}),resetAllFilter:()=>({width:void 0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Width"),labelPosition:"top",value:o||"",min:0,onChange:e=>d("width",e),units:u})}),m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!r&&r!==gy,label:p,onDeselect:()=>a({scale:gy}),resetAllFilter:()=>({scale:gy}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:p,value:r,help:hy[r],onChange:e=>a({scale:e}),isBlock:!0,children:my})})]})};var xy=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({clientId:e,attributes:t,setAttributes:o,overlayColor:n,setOverlayColor:r})=>{const{dimRatio:a}=t,{gradientValue:i,setGradient:s}=(0,ct.__experimentalUseGradient)(),l=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return l.hasColorsOrGradients?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n.color,gradientValue:i,label:(0,pt.__)("Overlay"),onColorChange:r,onGradientChange:s,isShownByDefault:!0,resetAllFilter:()=>({overlayColor:void 0,customOverlayColor:void 0,gradient:void 0,customGradient:void 0}),clearable:!0}],panelId:e,...l}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>void 0!==a,label:(0,pt.__)("Overlay opacity"),onDeselect:()=>o({dimRatio:0}),resetAllFilter:()=>({dimRatio:0}),isShownByDefault:!0,panelId:e,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Overlay opacity"),value:a,onChange:e=>o({dimRatio:e}),min:0,max:100,step:10,required:!0,__next40pxDefaultSize:!0})})]}):null}));var by=(0,xt.compose)([(0,ct.withColors)({overlayColor:"background-color"})])((({attributes:e,overlayColor:t})=>{const{dimRatio:o}=e,{gradientClass:n,gradientValue:r}=(0,ct.__experimentalUseGradient)(),a=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)(),i=(0,ct.__experimentalUseBorderProps)(e),s={backgroundColor:t.color,backgroundImage:r,...i.style};return a.hasColorsOrGradients&&o?(0,it.jsx)("span",{"aria-hidden":"true",className:Dt("wp-block-post-featured-image__overlay",(l=o,void 0===l?null:"has-background-dim-"+10*Math.round(l/10)),{[t.class]:t.class,"has-background-dim":void 0!==o,"has-background-gradient":r,[n]:n},i.className),style:s}):null;var l}));const fy=["image"],{ResolutionTool:yy}=jo(ct.privateApis),vy="full";function ky({image:e,value:t,onChange:o}){const{imageSizes:n}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{imageSizes:t().imageSizes}}),[]);if(!n?.length)return null;const r=n.filter((({slug:t})=>e?.media_details?.sizes?.[t]?.source_url)).map((({name:e,slug:t})=>({value:t,label:e})));return(0,it.jsx)(yy,{value:t,defaultValue:vy,options:r,onChange:o})}const{name:wy}=py,Cy={icon:dy,edit:function({clientId:e,attributes:t,setAttributes:o,context:{postId:n,postType:r,queryId:a}}){const i=Number.isFinite(a),{isLink:s,aspectRatio:l,height:c,width:u,scale:d,sizeSlug:p,rel:m,linkTarget:g,useFirstImageFromPost:h}=t,[_,x]=(0,gt.useState)(),[b,f]=(0,_t.useEntityProp)("postType",r,"featured_media",n),[y]=(0,_t.useEntityProp)("postType",r,"content",n),v=(0,gt.useMemo)((()=>{if(b)return b;if(!h)return;const e=/<!--\s+wp:(?:core\/)?image\s+(?<attrs>{(?:(?:[^}]+|}+(?=})|(?!}\s+\/?-->).)*)?}\s+)?-->/.exec(y);return e?.groups?.attrs&&JSON.parse(e.groups.attrs)?.id}),[b,h,y]),{media:k,postType:w,postPermalink:C}=(0,lt.useSelect)((e=>{const{getEntityRecord:t,getPostType:o,getEditedEntityRecord:a}=e(_t.store);return{media:v&&t("postType","attachment",v,{context:"view"}),postType:r&&o(r),postPermalink:a("postType",r,n)?.link}}),[v,r,n]),j=k?.media_details?.sizes?.[p]?.source_url||k?.source_url,S=(0,ct.useBlockProps)({style:{width:u,height:c,aspectRatio:l},className:Dt({"is-transient":_})}),B=(0,ct.__experimentalUseBorderProps)(t),T=(0,ct.__experimentalGetShadowClassesAndStyles)(t),N=(0,ct.useBlockEditingMode)(),P=e=>(0,it.jsx)(mt.Placeholder,{className:Dt("block-editor-media-placeholder",B.className),withIllustration:!0,style:{height:!!l&&"100%",width:!!l&&"100%",...B.style,...T.style},children:e}),I=e=>{e?.id&&f(e.id),e?.url&&(0,ht.isBlobURL)(e.url)&&x(e.url)};(0,gt.useEffect)((()=>{j&&_&&x()}),[j,_]);const{createErrorNotice:D}=(0,lt.useDispatch)(bo.store),M=e=>{D(e,{type:"snackbar"}),x()},z=vt(),A="default"===N&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{group:"color",children:(0,it.jsx)(xy,{attributes:t,setAttributes:o,clientId:e})}),(0,it.jsx)(ct.InspectorControls,{group:"dimensions",children:(0,it.jsx)(_y,{clientId:e,attributes:t,setAttributes:o,media:k})}),(v||i||!n)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:vy})},dropdownMenuProps:z,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),isShownByDefault:!0,hasValue:()=>!!s,onDeselect:()=>o({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:w?.labels.singular_name?(0,pt.sprintf)((0,pt.__)("Link to %s"),w.labels.singular_name):(0,pt.__)("Link to post"),onChange:()=>o({isLink:!s}),checked:s})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==g,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===g})}),s&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!m,onDeselect:()=>o({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m,onChange:e=>o({rel:e})})}),!!k&&(0,it.jsx)(ky,{image:k,value:p,onChange:e=>o({sizeSlug:e})})]})})]});let L;if(!v&&(i||!n))return(0,it.jsxs)(it.Fragment,{children:[A,(0,it.jsxs)("div",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:P()}):P(),(0,it.jsx)(by,{attributes:t,setAttributes:o,clientId:e})]})]});const H=(0,pt.__)("Add a featured image"),R={...B.style,...T.style,height:l?"100%":c,width:!!l&&"100%",objectFit:!(!c&&!l)&&d};return L=v||_?k||_?(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{className:B.className,src:_||j,alt:k&&k?.alt_text?(0,pt.sprintf)((0,pt.__)("Featured image: %s"),k.alt_text):(0,pt.__)("Featured image"),style:R}),_&&(0,it.jsx)(mt.Spinner,{})]}):P():(0,it.jsx)(ct.MediaPlaceholder,{onSelect:I,accept:"image/*",allowedTypes:fy,onError:M,placeholder:P,mediaLibraryButton:({open:e})=>(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,icon:Wp,variant:"primary",label:H,showTooltip:!0,tooltipPosition:"top center",onClick:()=>{e()}})}),(0,it.jsxs)(it.Fragment,{children:[!_&&A,!!k&&!i&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:v,mediaURL:j,allowedTypes:fy,accept:"image/*",onSelect:I,onError:M,onReset:()=>{o({isLink:!1,linkTarget:"_self",rel:"",sizeSlug:void 0}),f(0)}})}),(0,it.jsxs)("figure",{...S,children:[s?(0,it.jsx)("a",{href:C,target:g,children:L}):L,(0,it.jsx)(by,{attributes:t,setAttributes:o,clientId:e})]})]})}},jy=()=>jt({name:wy,metadata:py,settings:Cy}),Sy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-navigation-link","title":"Post Navigation Link","category":"theme","description":"Displays the next or previous post link that is adjacent to the current post.","textdomain":"default","attributes":{"textAlign":{"type":"string"},"type":{"type":"string","default":"next"},"label":{"type":"string","role":"content"},"showTitle":{"type":"boolean","default":false},"linkLabel":{"type":"boolean","default":false},"arrow":{"type":"string","default":"none"},"taxonomy":{"type":"string","default":""}},"usesContext":["postType"],"supports":{"reusable":false,"html":false,"color":{"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-post-navigation-link"}');var By=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})}),Ty=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})});const Ny=[{name:"post-previous",title:(0,pt.__)("Previous Post"),description:(0,pt.__)("Displays the post link that precedes the current post."),icon:By,attributes:{type:"previous"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Previous post"),arrow:"arrow"}}},{isDefault:!0,name:"post-next",title:(0,pt.__)("Next Post"),description:(0,pt.__)("Displays the post link that follows the current post."),icon:Ty,attributes:{type:"next"},scope:["inserter","transform"],example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}}];Ny.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Py=Ny;const{name:Iy}=Sy,Dy={edit:function({context:{postType:e},attributes:{type:t,label:o,showTitle:n,textAlign:r,linkLabel:a,arrow:i,taxonomy:s},setAttributes:l}){const c="default"===(0,ct.useBlockEditingMode)(),u="next"===t;let d=u?(0,pt.__)("Next"):(0,pt.__)("Previous");const p={none:"",arrow:u?"→":"←",chevron:u?"»":"«"}[i];n&&(d=u?(0,pt.__)("Next: "):(0,pt.__)("Previous: "));const m=u?(0,pt.__)("Next post"):(0,pt.__)("Previous post"),g=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),h=(0,lt.useSelect)((t=>{const{getTaxonomies:o}=t(_t.store);return o({type:e,per_page:-1})}),[e]),_=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{l({showTitle:!1,linkLabel:!1,arrow:"none"})},dropdownMenuProps:_,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display the title as a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>l({showTitle:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display the title as a link"),help:(0,pt.__)("If you have entered a custom label, it will be prepended before the title."),checked:!!n,onChange:()=>l({showTitle:!n})})}),n&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Include the label as part of the link"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>l({linkLabel:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Include the label as part of the link"),checked:!!a,onChange:()=>l({linkLabel:!a})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Arrow"),isShownByDefault:!0,hasValue:()=>"none"!==i,onDeselect:()=>l({arrow:"none"}),children:(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:i,onChange:e=>{l({arrow:e})},help:(0,pt.__)("A decorative arrow for the next and previous link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Next/Previous link")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Next/Previous link")})]})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Filter by taxonomy"),value:s,options:[{label:(0,pt.__)("Unfiltered"),value:""},...(h??[]).filter((({visibility:e})=>!!e?.publicly_queryable)).map((e=>({value:e.slug,label:e.name})))],onChange:e=>l({taxonomy:e}),help:(0,pt.__)("Only link to posts that have the same taxonomy terms as the current post. For example the same tags or categories.")})}),c&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:r,onChange:e=>{l({textAlign:e})}})}),(0,it.jsxs)("div",{...g,children:[!u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-previous is-arrow-${i}`,children:p}),(0,it.jsx)(ct.RichText,{tagName:"a",identifier:"label","aria-label":m,placeholder:d,value:o,withoutInteractiveFormatting:!0,onChange:e=>l({label:e})}),n&&(0,it.jsx)("a",{href:"#post-navigation-pseudo-link",onClick:e=>e.preventDefault(),children:(0,pt.__)("An example title")}),u&&p&&(0,it.jsx)("span",{className:`wp-block-post-navigation-link__arrow-next is-arrow-${i}`,"aria-hidden":!0,children:p})]})]})},variations:Py,example:{attributes:{label:(0,pt.__)("Next post"),arrow:"arrow"}}},My=()=>jt({name:Iy,metadata:Sy,settings:Dy}),zy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-template","title":"Post Template","category":"theme","ancestor":["core/query"],"description":"Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.","textdomain":"default","usesContext":["queryId","query","displayLayout","templateSlug","previewPostType","enhancedPagination","postType"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-post-template","editorStyle":"wp-block-post-template-editor"}'),Ay=[["core/post-title"],["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}],["core/post-excerpt"]];function Ly({classList:e}){const t=(0,ct.useInnerBlocksProps)({className:Dt("wp-block-post",e)},{template:Ay,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("li",{...t})}const Hy=(0,gt.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ct.__experimentalUseBlockPreview)({blocks:e,props:{className:Dt("wp-block-post",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,it.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const{name:Ry}=zy,Vy={icon:Oa,edit:function({setAttributes:e,clientId:t,context:{query:{perPage:o,offset:n=0,postType:r,order:a,orderBy:i,author:s,search:l,exclude:c,sticky:u,inherit:d,taxQuery:p,parents:m,pages:g,format:h,..._}={},templateSlug:x,previewPostType:b},attributes:{layout:f},__unstableLayoutClassNames:y}){const{type:v,columnCount:k=3}=f||{},[w,C]=(0,gt.useState)(),{posts:j,blocks:S}=(0,lt.useSelect)((e=>{const{getEntityRecords:g,getTaxonomies:f}=e(_t.store),{getBlocks:y}=e(ct.store),v=d&&x?.startsWith("category-")&&g("taxonomy","category",{context:"view",per_page:1,_fields:["id"],slug:x.replace("category-","")}),k=d&&x?.startsWith("tag-")&&g("taxonomy","post_tag",{context:"view",per_page:1,_fields:["id"],slug:x.replace("tag-","")}),w={offset:n||0,order:a,orderby:i};if(p&&!d){const e=f({type:r,per_page:-1,context:"view"}),t=Object.entries(p).reduce(((t,[o,n])=>{const r=e?.find((({slug:e})=>e===o));return r?.rest_base&&(t[r?.rest_base]=n),t}),{});Object.keys(t).length&&Object.assign(w,t)}o&&(w.per_page=o),s&&(w.author=s),l&&(w.search=l),c?.length&&(w.exclude=c),m?.length&&(w.parent=m),h?.length&&(w.format=h),["exclude","only"].includes(u)&&(w.sticky="only"===u),["","ignore"].includes(u)&&(delete w.sticky,w.ignore_sticky="ignore"===u);let C=r;d&&(x?.startsWith("archive-")?(w.postType=x.replace("archive-",""),C=w.postType):v?w.categories=v[0]?.id:k?w.tags=k[0]?.id:x?.startsWith("taxonomy-post_format")&&(w.format=x.replace("taxonomy-post_format-post-format-","")));return{posts:g("postType",b||C,{...w,..._}),blocks:y(t)}}),[o,n,a,i,t,s,l,r,c,u,d,x,p,m,h,_,b]),B=(0,gt.useMemo)((()=>j?.map((e=>({postType:e.type,postId:e.id,classList:e.class_list??""})))),[j]),T=(0,ct.useBlockProps)({className:Dt(y,{[`columns-${k}`]:"grid"===v&&k})});if(!j)return(0,it.jsx)("p",{...T,children:(0,it.jsx)(mt.Spinner,{})});if(!j.length)return(0,it.jsxs)("p",{...T,children:[" ",(0,pt.__)("No results found.")]});const N=t=>e({layout:{...f,...t}}),P=[{icon:jm,title:(0,pt._x)("List view","Post template block display setting"),onClick:()=>N({type:"default"}),isActive:"default"===v||"constrained"===v},{icon:qd,title:(0,pt._x)("Grid view","Post template block display setting"),onClick:()=>N({type:"grid",columnCount:k}),isActive:"grid"===v}];return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:P})}),(0,it.jsx)("ul",{...T,children:B&&B.map((e=>(0,it.jsxs)(ct.BlockContextProvider,{value:e,children:[e.postId===(w||B[0]?.postId)?(0,it.jsx)(Ly,{classList:e.classList}):null,(0,it.jsx)(Hy,{blocks:S,blockContextId:e.postId,classList:e.classList,setActiveBlockContextId:C,isHidden:e.postId===(w||B[0]?.postId)})]},e.postId)))})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})}},Fy=()=>jt({name:Ry,metadata:zy,settings:Vy});var Ey=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M20 4H4v1.5h16V4zm-2 9h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3zM4 9.5h9V8H4v1.5zM9 13H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2zm.5 5c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3z",fillRule:"evenodd",clipRule:"evenodd"})});const Oy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-terms","title":"Post Terms","category":"theme","description":"Post terms.","textdomain":"default","attributes":{"term":{"type":"string"},"textAlign":{"type":"string"},"separator":{"type":"string","default":", "},"prefix":{"type":"string","default":"","role":"content"},"suffix":{"type":"string","default":"","role":"content"}},"usesContext":["postId","postType"],"example":{"viewportWidth":350},"supports":{"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-terms"}'),Gy=[];const $y=["core/bold","core/image","core/italic","core/link","core/strikethrough","core/text-color"];var Uy=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M8.1 12.3c.1.1.3.3.5.3.2.1.4.1.6.1.2 0 .4 0 .6-.1.2-.1.4-.2.5-.3l3-3c.3-.3.5-.7.5-1.1 0-.4-.2-.8-.5-1.1L9.7 3.5c-.1-.2-.3-.3-.5-.3H5c-.4 0-.8.4-.8.8v4.2c0 .2.1.4.2.5l3.7 3.6zM5.8 4.8h3.1l3.4 3.4v.1l-3 3 .5.5-.7-.5-3.3-3.4V4.8zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});const qy={category:Ey,post_tag:Uy};function Wy(e,t){if("core/post-terms"!==t)return e;const o=e.variations.map((e=>({...e,icon:qy[e.name]??Ey})));return{...e,variations:o}}const{name:Zy}=Oy,Jy={icon:Ey,edit:function({attributes:e,clientId:t,context:o,isSelected:n,setAttributes:r,insertBlocksAfter:a}){const{term:i,textAlign:s,separator:l,prefix:c,suffix:u}=e,{postId:d,postType:p}=o,m="default"===(0,ct.useBlockEditingMode)(),g=(0,lt.useSelect)((e=>{if(!i)return{};const{getTaxonomy:t}=e(_t.store),o=t(i);return o?.visibility?.publicly_queryable?o:{}}),[i]),{postTerms:h,hasPostTerms:_,isLoading:x}=function({postId:e,term:t}){const{slug:o}=t;return(0,lt.useSelect)((n=>{const r=t?.visibility?.publicly_queryable;if(!r)return{postTerms:Gy,isLoading:!1,hasPostTerms:!1};const{getEntityRecords:a,isResolving:i}=n(_t.store),s=["taxonomy",o,{post:e,per_page:-1,context:"view"}],l=a(...s);return{postTerms:l,isLoading:i("getEntityRecords",s),hasPostTerms:!!l?.length}}),[e,t?.visibility?.publicly_queryable,o])}({postId:d,term:g}),b=d&&p,f=(0,ct.useBlockDisplayInformation)(t),y=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${s}`]:s,[`taxonomy-${i}`]:i})});return(0,it.jsxs)(it.Fragment,{children:[m&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:s,onChange:e=>{r({textAlign:e})}})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,autoComplete:"off",label:(0,pt.__)("Separator"),value:l||"",onChange:e=>{r({separator:e})},help:(0,pt.__)("Enter character(s) used to separate terms.")})}),(0,it.jsxs)("div",{...y,children:[x&&b&&(0,it.jsx)(mt.Spinner,{}),!x&&(n||c)&&(0,it.jsx)(ct.RichText,{identifier:"prefix",allowedFormats:$y,className:"wp-block-post-terms__prefix","aria-label":(0,pt.__)("Prefix"),placeholder:(0,pt.__)("Prefix")+" ",value:c,onChange:e=>r({prefix:e}),tagName:"span"}),(!b||!i)&&(0,it.jsx)("span",{children:f.title}),b&&!x&&_&&h.map((e=>(0,it.jsx)("a",{href:e.link,onClick:e=>e.preventDefault(),rel:"tag",children:(0,ao.decodeEntities)(e.name)},e.id))).reduce(((e,t)=>(0,it.jsxs)(it.Fragment,{children:[e,(0,it.jsx)("span",{className:"wp-block-post-terms__separator",children:l||" "}),t]}))),b&&!x&&!_&&(g?.labels?.no_terms||(0,pt.__)("Term items not found.")),!x&&(n||u)&&(0,it.jsx)(ct.RichText,{identifier:"suffix",allowedFormats:$y,className:"wp-block-post-terms__suffix","aria-label":(0,pt.__)("Suffix"),placeholder:" "+(0,pt.__)("Suffix"),value:u,onChange:e=>r({suffix:e}),tagName:"span",__unstableOnSplitAtEnd:()=>a((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})]})}},Qy=()=>((0,vl.addFilter)("blocks.registerBlockType","core/template-part",Wy),jt({name:Zy,metadata:Oy,settings:Jy}));var Ky=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 3c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16.5c-4.1 0-7.5-3.4-7.5-7.5S7.9 4.5 12 4.5s7.5 3.4 7.5 7.5-3.4 7.5-7.5 7.5zM12 7l-1 5c0 .3.2.6.4.8l4.2 2.8-2.7-4.1L12 7z"})});const Yy=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-time-to-read","title":"Time to Read","category":"theme","description":"Show minutes required to finish reading the post. Can also show a word count.","textdomain":"default","usesContext":["postId","postType"],"attributes":{"textAlign":{"type":"string"},"displayAsRange":{"type":"boolean","default":true},"displayMode":{"type":"string","default":"time"},"averageReadingSpeed":{"type":"number","default":189}},"supports":{"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"html":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}}}'),Xy=window.wp.wordcount;var ev=function({attributes:e,setAttributes:t,context:o}){const{textAlign:n,displayAsRange:r,displayMode:a,averageReadingSpeed:i}=e,{postId:s,postType:l}=o,c=vt(),[u]=(0,_t.useEntityProp)("postType",l,"content",s),[d]=(0,_t.useEntityBlockEditor)("postType",l,{id:s}),p=(0,gt.useMemo)((()=>{let e;e=u instanceof Function?u({blocks:d}):d?(0,st.__unstableSerializeAndClean)(d):u;const t=(0,pt._x)("words","Word count type. Do not translate!"),o=(0,Xy.count)(e||"",t);if("time"===a){if(r){let e=Math.max(1,Math.round(o/i*1.2));const t=Math.max(1,Math.round(o/i*.8));t===e&&(e+=1);const n=(0,pt._x)("%1$s–%2$s minutes","Range of minutes to read");return(0,pt.sprintf)(n,t,e)}const e=Math.max(1,Math.round(o/i));return(0,pt.sprintf)((0,pt._n)("%s minute","%s minutes",e),e)}if("words"===a)return"words"===t?(0,pt.sprintf)((0,pt._n)("%s word","%s words",o),o.toLocaleString()):(0,pt.sprintf)((0,pt._n)("%s character","%s characters",o),o.toLocaleString())}),[u,d,r,a,i]),m=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{t({textAlign:e})}})}),"time"===a&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({displayAsRange:!0})},dropdownMenuProps:c,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt._x)("Display as range","Turns reading time range display on or off"),hasValue:()=>!r,onDeselect:()=>{t({displayAsRange:!0})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display as range"),checked:!!r,onChange:()=>t({displayAsRange:!r})})})})}),(0,it.jsx)("div",{...m,children:p})]})},tv=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 5c1.1 0 2 .9 2 2v10c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2zM5 6.5c-.3 0-.5.2-.5.5v10c0 .3.2.5.5.5h14c.3 0 .5-.2.5-.5V7c0-.3-.2-.5-.5-.5zM14.734 9q.714 0 1.15.253.437.247.639.84.2.591.2 1.61v1.15q0 .402.036.667.04.258.172.39.138.127.437.127h.104l-.162.828h-.08q-.5 0-.776-.097a.9.9 0 0 1-.414-.283 2 2 0 0 1-.259-.448q-.316.367-.748.598-.43.23-.977.23-.524 0-.914-.213a1.56 1.56 0 0 1-.61-.58 1.65 1.65 0 0 1-.213-.84q0-.477.207-.817.213-.345.564-.568.357-.23.794-.363.437-.139.902-.196.471-.062.902-.068 0-.805-.315-1.053-.316-.247-.915-.247-.316 0-.678.098-.356.097-.805.408l-.15-.84a2.8 2.8 0 0 1 .846-.419A3.4 3.4 0 0 1 14.734 9m-5.877 1.669H9.86l.59-1.531h.689l-.585 1.53h.898l-.249.727h-.922l-.337.866h1.019l-.354.773h-.962l-.681 1.804h-.701l.69-1.804h-.999l-.693 1.804h-.69l.685-1.804H6.3l.34-.773h.915l.333-.866h-.994l.244-.726H8.16l.594-1.531h.693zm6.832 1.264q-.823.029-1.335.16-.506.133-.74.397-.236.265-.236.685 0 .454.241.66.248.202.632.202.414 0 .8-.207.39-.207.637-.552zm-7.441.328h1l.34-.866h-1z"})});const ov=[{name:"time-to-read",title:(0,pt.__)("Time to Read"),description:(0,pt.__)("Show minutes required to finish reading the post."),attributes:{displayMode:"time"},scope:["inserter","transform"],isActive:e=>"time"===e?.displayMode,icon:Ky,isDefault:!0},{name:"word-count",title:(0,pt.__)("Word Count"),description:(0,pt.__)("Show the number of words in the post."),attributes:{displayMode:"words"},scope:["inserter","transform"],isActive:e=>"words"===e?.displayMode,icon:tv}];var nv=ov;const{name:rv}=Yy,av={icon:Ky,edit:ev,variations:nv,example:{}},iv=()=>jt({name:rv,metadata:Yy,settings:av}),sv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/post-title","title":"Title","category":"theme","description":"Displays the title of a post, page, or any other content-type.","textdomain":"default","usesContext":["postId","postType","queryId"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":2},"levelOptions":{"type":"array"},"isLink":{"type":"boolean","default":false,"role":"content"},"rel":{"type":"string","attribute":"rel","default":"","role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":350},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-post-title"}');const lv={attributes:{textAlign:{type:"string"},level:{type:"number",default:2},isLink:{type:"boolean",default:!1},rel:{type:"string",attribute:"rel",default:""},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var cv=[lv];const{name:uv}=sv,dv={icon:ji,edit:function({attributes:{level:e,levelOptions:t,textAlign:o,isLink:n,rel:r,linkTarget:a},setAttributes:i,context:{postType:s,postId:l,queryId:c},insertBlocksAfter:u}){const d=0===e?"p":`h${e}`,p=Number.isFinite(c),m=(0,lt.useSelect)((e=>!p&&e(_t.store).canUser("update",{kind:"postType",name:s,id:l})),[p,s,l]),[g="",h,_]=(0,_t.useEntityProp)("postType",s,"title",l),[x]=(0,_t.useEntityProp)("postType",s,"link",l),b=()=>{u((0,st.createBlock)((0,st.getDefaultBlockName)()))},f=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${o}`]:o})}),y=(0,ct.useBlockEditingMode)(),v=vt();let k=(0,it.jsx)(d,{...f,children:(0,pt.__)("Title")});return s&&l&&(k=m?(0,it.jsx)(ct.PlainText,{tagName:d,placeholder:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b,...f}):(0,it.jsx)(d,{...f,dangerouslySetInnerHTML:{__html:_?.rendered}})),n&&s&&l&&(k=m?(0,it.jsx)(d,{...f,children:(0,it.jsx)(ct.PlainText,{tagName:"a",href:x,target:a,rel:r,placeholder:g.length?null:(0,pt.__)("No title"),value:g,onChange:h,__experimentalVersion:2,__unstableOnSplitAtEnd:b})}):(0,it.jsx)(d,{...f,children:(0,it.jsx)("a",{href:x,target:a,rel:r,onClick:e=>e.preventDefault(),dangerouslySetInnerHTML:{__html:_?.rendered}})})),(0,it.jsxs)(it.Fragment,{children:["default"===y&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:e,options:t,onChange:e=>i({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:o,onChange:e=>{i({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({rel:"",linkTarget:"_self",isLink:!1})},dropdownMenuProps:v,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Make title a link"),isShownByDefault:!0,hasValue:()=>n,onDeselect:()=>i({isLink:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make title a link"),onChange:()=>i({isLink:!n}),checked:n})}),n&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_blank"===a,onDeselect:()=>i({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>i({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Link relation"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>i({rel:""}),children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:r,onChange:e=>i({rel:e})})})]})]})})]}),k]})},deprecated:cv},pv=()=>jt({name:uv,metadata:sv,settings:dv});var mv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 16.5h6V15H7v1.5zm4-4h6V11h-6v1.5zM9 11H7v1.5h2V11zm6 5.5h2V15h-2v1.5z"})});const gv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/preformatted","title":"Preformatted","category":"text","description":"Add text that respects your spacing and tabs, and also allows styling.","textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"}},"supports":{"anchor":true,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-preformatted"}');const hv={from:[{type:"block",blocks:["core/code","core/paragraph","core/verse"],transform:({content:e,anchor:t})=>(0,st.createBlock)("core/preformatted",{content:e,anchor:t})},{type:"raw",isMatch:e=>"PRE"===e.nodeName&&!(1===e.children.length&&"CODE"===e.firstChild.nodeName),schema:({phrasingContentSchema:e})=>({pre:{children:e}})}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/paragraph",e)},{type:"block",blocks:["core/code"],transform:e=>(0,st.createBlock)("core/code",e)},{type:"block",blocks:["core/verse"],transform:e=>(0,st.createBlock)("core/verse",e)}]};var _v=hv;const{name:xv}=gv,bv={icon:mv,example:{attributes:{content:(0,pt.__)("EXT. XANADU - FAINT DAWN - 1940 (MINIATURE)\nWindow, very small in the distance, illuminated.\nAll around this is an almost totally black screen. Now, as the camera moves slowly towards the window which is almost a postage stamp in the frame, other forms appear;")}},transforms:_v,edit:function({attributes:e,mergeBlocks:t,setAttributes:o,onRemove:n,insertBlocksAfter:r,style:a}){const{content:i}=e,s=(0,ct.useBlockProps)({style:a});return(0,it.jsx)(ct.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:i,onChange:e=>{o({content:e})},onRemove:n,"aria-label":(0,pt.__)("Preformatted text"),placeholder:(0,pt.__)("Write preformatted text…"),onMerge:t,...s,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)()))})},save:function({attributes:e}){const{content:t}=e;return(0,it.jsx)("pre",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.RichText.Content,{value:t})})},merge:(e,t)=>({content:e.content+"\n\n"+t.content})},fv=()=>jt({name:xv,metadata:gv,settings:bv});var yv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18 8H6c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2zm.5 6c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-4c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v4zM4 4v1.5h16V4H4zm0 16h16v-1.5H4V20z"})});const vv="is-style-solid-color",kv={value:{type:"string",source:"html",selector:"blockquote",multiline:"p"},citation:{type:"string",source:"html",selector:"cite",default:""},mainColor:{type:"string"},customMainColor:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string"}};function wv(e){if(!e)return;const t=e.match(/border-color:([^;]+)[;]?/);return t&&t[1]?t[1]:void 0}function Cv(e){const t=`</p>${e=e||"<p></p>"}<p>`.split("</p><p>");return t.shift(),t.pop(),t.join("<br>")}const jv={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:n,multiline:!0}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},migrate:({value:e,...t})=>({value:Cv(e),...t})},Sv={attributes:{...kv},save({attributes:e}){const{mainColor:t,customMainColor:o,customTextColor:n,textColor:r,value:a,citation:i,className:s}=e,l=s?.includes(vv);let c,u;if(l){const e=(0,ct.getColorClassName)("background-color",t);c=Dt({"has-background":e||o,[e]:e}),u={backgroundColor:e?void 0:o}}else o&&(u={borderColor:o});const d=(0,ct.getColorClassName)("color",r),p=Dt({"has-text-color":r||n,[d]:d}),m=d?void 0:{color:n};return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:c,style:u}),children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(vv);let s;return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:Cv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},Bv={attributes:{...kv,figureStyle:{source:"attribute",selector:"figure",attribute:"style"}},save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s,figureStyle:l}=e,c=s?.includes(vv);let u,d;if(c){const e=(0,ct.getColorClassName)("background-color",t);u=Dt({"has-background":e||o,[e]:e}),d={backgroundColor:e?void 0:o}}else if(o)d={borderColor:o};else if(t){d={borderColor:wv(l)}}const p=(0,ct.getColorClassName)("color",n),m=(n||r)&&Dt("has-text-color",{[p]:p}),g=p?void 0:{color:r};return(0,it.jsx)("figure",{className:u,style:d,children:(0,it.jsxs)("blockquote",{className:m,style:g,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,figureStyle:o,mainColor:n,customMainColor:r,customTextColor:a,...i}){const s=t?.includes(vv);let l;if(r&&(l=s?{color:{background:r}}:{border:{color:r}}),a&&l&&(l.color={...l.color,text:a}),!s&&n&&o){const n=wv(o);if(n)return{value:Cv(e),...i,className:t,style:{border:{color:n}}}}return{value:Cv(e),className:t,backgroundColor:s?n:void 0,borderColor:s?void 0:n,textAlign:s?"left":void 0,style:l,...i}}},Tv={attributes:kv,save({attributes:e}){const{mainColor:t,customMainColor:o,textColor:n,customTextColor:r,value:a,citation:i,className:s}=e,l=s?.includes(vv);let c,u;if(l)c=(0,ct.getColorClassName)("background-color",t),c||(u={backgroundColor:o});else if(o)u={borderColor:o};else if(t){const e=(0,lt.select)(ct.store).getSettings().colors??[];u={borderColor:(0,ct.getColorObjectByAttributeValues)(e,t).color}}const d=(0,ct.getColorClassName)("color",n),p=n||r?Dt("has-text-color",{[d]:d}):void 0,m=d?void 0:{color:r};return(0,it.jsx)("figure",{className:c,style:u,children:(0,it.jsxs)("blockquote",{className:p,style:m,children:[(0,it.jsx)(ct.RichText.Content,{value:a,multiline:!0}),!ct.RichText.isEmpty(i)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:i})]})})},migrate({value:e,className:t,mainColor:o,customMainColor:n,customTextColor:r,...a}){const i=t?.includes(vv);let s={};return n&&(s=i?{color:{background:n}}:{border:{color:n}}),r&&s&&(s.color={...s.color,text:r}),{value:Cv(e),className:t,backgroundColor:i?o:void 0,borderColor:i?void 0:o,textAlign:i?"left":void 0,style:s,...a}}},Nv={attributes:{...kv},save({attributes:e}){const{value:t,citation:o}=e;return(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},migrate:({value:e,...t})=>({value:Cv(e),...t})},Pv={attributes:{...kv,citation:{type:"string",source:"html",selector:"footer"},align:{type:"string",default:"none"}},save({attributes:e}){const{value:t,citation:o,align:n}=e;return(0,it.jsxs)("blockquote",{className:`align${n}`,children:[(0,it.jsx)(ct.RichText.Content,{value:t,multiline:!0}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"footer",value:o})]})},migrate:({value:e,...t})=>({value:Cv(e),...t})};var Iv=[jv,Sv,Bv,Tv,Nv,Pv];const Dv="web"===gt.Platform.OS;var Mv=function({attributes:e,setAttributes:t,isSelected:o,insertBlocksAfter:n}){const{textAlign:r,citation:a,value:i}=e,s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),l=!ct.RichText.isEmpty(a)||o;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)("figure",{...s,children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText,{identifier:"value",tagName:"p",value:i,onChange:e=>t({value:e}),"aria-label":(0,pt.__)("Pullquote text"),placeholder:(0,pt.__)("Add quote"),textAlign:"center"}),l&&(0,it.jsx)(ct.RichText,{identifier:"citation",tagName:Dv?"cite":void 0,style:{display:"block"},value:a,"aria-label":(0,pt.__)("Pullquote citation text"),placeholder:(0,pt.__)("Add citation"),onChange:e=>t({citation:e}),className:"wp-block-pullquote__citation",__unstableMobileNoFocusOnMount:!0,textAlign:"center",__unstableOnSplitAtEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})})]})};const zv=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/pullquote","title":"Pullquote","category":"text","description":"Give special visual emphasis to a quote from your text.","textdomain":"default","attributes":{"value":{"type":"rich-text","source":"rich-text","selector":"p","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"background":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"__experimentalStyle":{"typography":{"fontSize":"1.5em","lineHeight":"1.6"}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-pullquote-editor","style":"wp-block-pullquote"}');const Av={from:[{type:"block",isMultiBlock:!0,blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/pullquote",{value:(0,Tn.toHTMLString)({value:(0,Tn.join)(e.map((({content:e})=>(0,Tn.create)({html:e}))),"\n")}),anchor:e.anchor})},{type:"block",blocks:["core/heading"],transform:({content:e,anchor:t})=>(0,st.createBlock)("core/pullquote",{value:e,anchor:t})}],to:[{type:"block",blocks:["core/paragraph"],transform:({value:e,citation:t})=>{const o=[];return e&&o.push((0,st.createBlock)("core/paragraph",{content:e})),t&&o.push((0,st.createBlock)("core/paragraph",{content:t})),0===o.length?(0,st.createBlock)("core/paragraph",{content:""}):o}},{type:"block",blocks:["core/heading"],transform:({value:e,citation:t})=>{if(!e)return(0,st.createBlock)("core/heading",{content:t});const o=(0,st.createBlock)("core/heading",{content:e});return t?[o,(0,st.createBlock)("core/heading",{content:t})]:o}}]};var Lv=Av;const{name:Hv}=zv,Rv={icon:yv,example:{attributes:{value:(0,pt.__)("One of the hardest things to do in technology is disrupt yourself."),citation:(0,pt.__)("Matt Mullenweg")}},transforms:Lv,edit:Mv,save:function({attributes:e}){const{textAlign:t,citation:o,value:n}=e,r=!ct.RichText.isEmpty(o);return(0,it.jsx)("figure",{...ct.useBlockProps.save({className:Dt({[`has-text-align-${t}`]:t})}),children:(0,it.jsxs)("blockquote",{children:[(0,it.jsx)(ct.RichText.Content,{tagName:"p",value:n}),r&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})})},deprecated:Iv},Vv=()=>jt({name:Hv,metadata:zv,settings:Rv});var Fv=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18.1823 11.6392C18.1823 13.0804 17.0139 14.2487 15.5727 14.2487C14.3579 14.2487 13.335 13.4179 13.0453 12.2922L13.0377 12.2625L13.0278 12.2335L12.3985 10.377L12.3942 10.3785C11.8571 8.64997 10.246 7.39405 8.33961 7.39405C5.99509 7.39405 4.09448 9.29465 4.09448 11.6392C4.09448 13.9837 5.99509 15.8843 8.33961 15.8843C8.88499 15.8843 9.40822 15.781 9.88943 15.5923L9.29212 14.0697C8.99812 14.185 8.67729 14.2487 8.33961 14.2487C6.89838 14.2487 5.73003 13.0804 5.73003 11.6392C5.73003 10.1979 6.89838 9.02959 8.33961 9.02959C9.55444 9.02959 10.5773 9.86046 10.867 10.9862L10.8772 10.9836L11.4695 12.7311C11.9515 14.546 13.6048 15.8843 15.5727 15.8843C17.9172 15.8843 19.8178 13.9837 19.8178 11.6392C19.8178 9.29465 17.9172 7.39404 15.5727 7.39404C15.0287 7.39404 14.5066 7.4968 14.0264 7.6847L14.6223 9.20781C14.9158 9.093 15.2358 9.02959 15.5727 9.02959C17.0139 9.02959 18.1823 10.1979 18.1823 11.6392Z"})});const Ev=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query","title":"Query Loop","category":"theme","description":"An advanced block that allows displaying post types based on different query parameters and visual configurations.","keywords":["posts","list","blog","blogs","custom post types"],"textdomain":"default","attributes":{"queryId":{"type":"number"},"query":{"type":"object","default":{"perPage":null,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"taxQuery":null,"parents":[],"format":[]}},"tagName":{"type":"string","default":"div"},"namespace":{"type":"string"},"enhancedPagination":{"type":"boolean","default":false}},"usesContext":["templateSlug"],"providesContext":{"queryId":"queryId","query":"query","displayLayout":"displayLayout","enhancedPagination":"enhancedPagination"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true,"contentRole":true},"editorStyle":"wp-block-query-editor"}'),Ov=e=>{const t=e?.reduce(((e,t)=>{const{mapById:o,mapByName:n,names:r}=e;return o[t.id]=t,n[t.name]=t,r.push(t.name),e}),{mapById:{},mapByName:{},names:[]});return{entities:e,...t}},Gv=(e,t)=>{const o=t.split(".");let n=e;return o.forEach((e=>{n=n?.[e]})),n},$v=(e,t)=>(e||[]).map((e=>({...e,name:(0,ao.decodeEntities)(Gv(e,t))}))),Uv=e=>{const t=(0,lt.useSelect)((t=>{const{getTaxonomies:o,getPostType:n}=t(_t.store);return n(e)?.taxonomies?.length>0?o({type:e,per_page:-1}):[]}),[e]);return(0,gt.useMemo)((()=>t?.filter((({visibility:e})=>!!e?.publicly_queryable))),[t])};function qv(e,t){return!e||e.includes(t)}const Wv=e=>(0,lt.useSelect)((t=>{const{getClientIdsOfDescendants:o,getBlockName:n}=t(ct.store);return o(e).some((e=>{const t=n(e),o=Object.is((0,st.getBlockSupport)(t,"interactivity"),!0),r=(0,st.getBlockSupport)(t,"interactivity.clientNavigation");return!o&&!r}))}),[e]);function Zv({enhancedPagination:e,setAttributes:t,clientId:o}){const n=Wv(o);let r=(0,pt.__)("Reload the full page—instead of just the posts list—when visitors navigate between pages.");return n&&(r=(0,pt.__)("Enhancement disabled because there are non-compatible blocks inside the Query block.")),(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Reload full page"),help:r,checked:!e,disabled:n,onChange:e=>{t({enhancedPagination:!e})}})})}const Jv=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];var Qv=function({order:e,orderBy:t,orderByOptions:o=Jv,onChange:n}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Order by"),value:`${t}/${e}`,options:o,onChange:e=>{const[t,o]=e.split("/");n({order:o,orderBy:t})}})};const Kv={who:"authors",per_page:-1,_fields:"id,name",context:"view"};var Yv=function({value:e,onChange:t}){const o=(0,lt.useSelect)((e=>{const{getUsers:t}=e(_t.store);return t(Kv)}),[]);if(!o)return null;const n=Ov(o),r=(e?e.toString().split(","):[]).reduce(((e,t)=>{const o=n.mapById[t];return o&&e.push({id:t,value:o.name}),e}),[]);return(0,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Authors"),value:r,suggestions:n.names,onChange:e=>{const o=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e[t]?.id;if(o)return o})(n.mapByName,t);return o&&e.add(o),e}),new Set));t({author:o.join(",")})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})};const Xv=[],ek={order:"asc",_fields:"id,title",context:"view"};var tk=function({parents:e,postType:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(Xv),[s,l]=(0,gt.useState)(Xv),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:Xv,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["postType",t,{...ek,search:n,orderby:"relevance",exclude:e,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,t,e]),p=(0,lt.useSelect)((o=>{if(!e?.length)return Xv;const{getEntityRecords:n}=o(_t.store);return n("postType",t,{...ek,include:e,per_page:e.length})}),[e,t]);(0,gt.useEffect)((()=>{if(e?.length||i(Xv),!p?.length)return;const t=Ov($v(p,"title.rendered")),o=e.reduce(((e,o)=>{const n=t.mapById[o];return n&&e.push({id:o,value:n.name}),e}),[]);i(o)}),[e,p]);const m=(0,gt.useMemo)((()=>u?.length?Ov($v(u,"title.rendered")):Xv),[u]);return(0,gt.useEffect)((()=>{d&&l(m.names)}),[m.names,d]),(0,it.jsx)(mt.FormTokenField,{__next40pxDefaultSize:!0,label:(0,pt.__)("Parents"),value:a,onInputChange:c,suggestions:s,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>{const o=t?.id||e?.[t]?.id;if(o)return o})(m.mapByName,t);return o&&e.add(o),e}),new Set));l(Xv),o({parents:t})},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0})};const ok=[],nk={order:"asc",_fields:"id,name",context:"view"},rk=(e,t)=>{const o=t?.id||e?.find((e=>e.name===t))?.id;if(o)return o;const n=t.toLocaleLowerCase();return e?.find((e=>e.name.toLocaleLowerCase()===n))?.id};function ak({onChange:e,query:t}){const{postType:o,taxQuery:n}=t,r=Uv(o);return r&&0!==r.length?(0,it.jsx)(mt.__experimentalVStack,{spacing:4,children:r.map((t=>{const o=n?.[t.slug]||[];return(0,it.jsx)(ik,{taxonomy:t,termIds:o,onChange:o=>e({taxQuery:{...n,[t.slug]:o}})},t.slug)}))}):null}function ik({taxonomy:e,termIds:t,onChange:o}){const[n,r]=(0,gt.useState)(""),[a,i]=(0,gt.useState)(ok),[s,l]=(0,gt.useState)(ok),c=(0,xt.useDebounce)(r,250),{searchResults:u,searchHasResolved:d}=(0,lt.useSelect)((o=>{if(!n)return{searchResults:ok,searchHasResolved:!0};const{getEntityRecords:r,hasFinishedResolution:a}=o(_t.store),i=["taxonomy",e.slug,{...nk,search:n,orderby:"name",exclude:t,per_page:20}];return{searchResults:r(...i),searchHasResolved:a("getEntityRecords",i)}}),[n,e.slug,t]),p=(0,lt.useSelect)((o=>{if(!t?.length)return ok;const{getEntityRecords:n}=o(_t.store);return n("taxonomy",e.slug,{...nk,include:t,per_page:t.length})}),[e.slug,t]);(0,gt.useEffect)((()=>{if(t?.length||i(ok),!p?.length)return;const e=t.reduce(((e,t)=>{const o=p.find((e=>e.id===t));return o&&e.push({id:t,value:o.name}),e}),[]);i(e)}),[t,p]),(0,gt.useEffect)((()=>{d&&l(u.map((e=>e.name)))}),[u,d]);return(0,it.jsx)("div",{className:"block-library-query-inspector__taxonomy-control",children:(0,it.jsx)(mt.FormTokenField,{label:e.name,value:a,onInputChange:c,suggestions:s,displayTransform:ao.decodeEntities,onChange:e=>{const t=new Set;for(const o of e){const e=rk(u,o);e&&t.add(e)}l(ok),o(Array.from(t))},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})}const sk=[{value:"aside",label:(0,pt.__)("Aside")},{value:"audio",label:(0,pt.__)("Audio")},{value:"chat",label:(0,pt.__)("Chat")},{value:"gallery",label:(0,pt.__)("Gallery")},{value:"image",label:(0,pt.__)("Image")},{value:"link",label:(0,pt.__)("Link")},{value:"quote",label:(0,pt.__)("Quote")},{value:"standard",label:(0,pt.__)("Standard")},{value:"status",label:(0,pt.__)("Status")},{value:"video",label:(0,pt.__)("Video")}].sort(((e,t)=>{const o=e.label.toUpperCase(),n=t.label.toUpperCase();return o<n?-1:o>n?1:0}));function lk(e,t){return e.map((e=>t.find((t=>t.label.toLocaleLowerCase()===e.toLocaleLowerCase()))?.value)).filter(Boolean)}function ck({onChange:e,query:{format:t}}){const o=Array.isArray(t)?t:[t],{supportedFormats:n}=(0,lt.useSelect)((e=>({supportedFormats:e(_t.store).getThemeSupports().formats})),[]),r=sk.filter((e=>n.includes(e.value))),a=o.map((e=>r.find((t=>t.value===e))?.label)).filter(Boolean),i=r.filter((e=>!o.includes(e.value))).map((e=>e.label));return(0,it.jsx)(mt.FormTokenField,{label:(0,pt.__)("Formats"),value:a,suggestions:i,onChange:t=>{e({format:lk(t,r)})},__experimentalShowHowTo:!1,__experimentalExpandOnFocus:!0,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}const uk=[{label:(0,pt.__)("Include"),value:""},{label:(0,pt.__)("Ignore"),value:"ignore"},{label:(0,pt.__)("Exclude"),value:"exclude"},{label:(0,pt.__)("Only"),value:"only"}];function dk({value:e,onChange:t}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Sticky posts"),options:uk,value:e,onChange:t,help:(0,pt.__)("Sticky posts always appear first, regardless of their publish date.")})}var pk=({perPage:e,offset:t=0,onChange:o})=>(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Items per page"),min:1,max:100,onChange:e=>{isNaN(e)||e<1||e>100||o({perPage:e,offset:t})},value:parseInt(e,10)});var mk=({offset:e=0,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Offset"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||e>100||t({offset:e})}});var gk=({pages:e,onChange:t})=>(0,it.jsx)(mt.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Max pages to show"),value:e,min:0,onChange:e=>{isNaN(e)||e<0||t({pages:e})},help:(0,pt.__)("Limit the pages you want to show, even if the query has more results. To show all pages use 0 (zero).")});function hk(e){const{attributes:t,setQuery:o,isSingular:n}=e,{query:r}=t,{order:a,orderBy:i,author:s,pages:l,postType:c,perPage:u,offset:d,sticky:p,inherit:m,taxQuery:g,parents:h,format:_}=r,x=function(e){return(0,lt.useSelect)((t=>t(st.store).getActiveBlockVariation("core/query",e)?.allowedControls),[e])}(t),b="post"===c,{postTypesTaxonomiesMap:f,postTypesSelectOptions:y,postTypeFormatSupportMap:v}=(()=>{const e=(0,lt.useSelect)((e=>{const{getPostTypes:t}=e(_t.store),o=["attachment"],n=t({per_page:-1})?.filter((({viewable:e,slug:t})=>e&&!o.includes(t)));return n}),[]);return{postTypesTaxonomiesMap:(0,gt.useMemo)((()=>{if(e?.length)return e.reduce(((e,t)=>(e[t.slug]=t.taxonomies,e)),{})}),[e]),postTypesSelectOptions:(0,gt.useMemo)((()=>(e||[]).map((({labels:e,slug:t})=>({label:e.singular_name,value:t})))),[e]),postTypeFormatSupportMap:(0,gt.useMemo)((()=>e?.length?e.reduce(((e,t)=>(e[t.slug]=t.supports?.["post-formats"]||!1,e)),{}):{}),[e])}})(),k=Uv(c),w=function(e){return(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return o?.viewable&&o?.hierarchical}),[e])}(c),C=e=>{const t={postType:e},n=f[e],r=Object.entries(g||{}).reduce(((e,[t,o])=>(n.includes(t)&&(e[t]=o),e)),{});t.taxQuery=Object.keys(r).length?r:void 0,"post"!==e&&(t.sticky=""),t.parents=[];v[e]||(t.format=[]),o(t)},[j,S]=(0,gt.useState)(r.search),B=(0,gt.useMemo)((()=>(0,xt.debounce)((e=>{o({search:e})}),250)),[o]),T=function(e){const t=(0,lt.useSelect)((t=>{const o=t(_t.store).getPostType(e);return!!o?.supports?.["page-attributes"]}),[e]);return(0,gt.useMemo)((()=>{const e=[{label:(0,pt.__)("Newest to oldest"),value:"date/desc"},{label:(0,pt.__)("Oldest to newest"),value:"date/asc"},{label:(0,pt.__)("A → Z"),value:"title/asc"},{label:(0,pt.__)("Z → A"),value:"title/desc"}];return t&&e.push({label:(0,pt.__)("Ascending by order"),value:"menu_order/asc"},{label:(0,pt.__)("Descending by order"),value:"menu_order/desc"}),e}),[t])}(c),N=qv(x,"inherit"),P=!m&&qv(x,"postType"),I=(0,pt.__)("Post type"),D=(0,pt.__)("Select the type of content to display: posts, pages, or custom post types."),M=!m&&qv(x,"order"),z=!m&&b&&qv(x,"sticky"),A=N||P||M||z,L=!!k?.length&&qv(x,"taxQuery"),H=qv(x,"author"),R=qv(x,"search"),V=qv(x,"parents")&&w,F=v[c],E=(0,lt.useSelect)((e=>{if(!F||!qv(x,"format"))return!1;const t=e(_t.store).getThemeSupports();return t.formats&&t.formats.length>0&&t.formats.some((e=>"standard"!==e))}),[x,F]),O=L||H||R||V||E,G=vt(),$=qv(x,"postCount"),U=qv(x,"offset"),q=qv(x,"pages"),W=$||U||q,Z=n&&m;return(0,it.jsxs)(it.Fragment,{children:[A&&(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({postType:"post",order:"desc",orderBy:"date",sticky:"",inherit:!0})},dropdownMenuProps:G,children:[N&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!m,label:(0,pt.__)("Query type"),onDeselect:()=>o({inherit:!0}),isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:4,children:[(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Query type"),isBlock:!0,onChange:e=>{o({inherit:"default"===e})},help:m?(0,pt.__)("Display a list of posts or custom post types based on the current template."):(0,pt.__)("Display a list of posts or custom post types based on specific criteria."),value:m?"default":"custom",children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"default",label:(0,pt.__)("Default")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,pt.__)("Custom")})]}),Z&&(0,it.jsx)(mt.Notice,{status:"warning",isDismissible:!1,children:(0,pt.__)("Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).")})]})}),P&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"post"!==c,label:I,onDeselect:()=>C("post"),isShownByDefault:!0,children:y.length>2?(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:y,value:c,label:I,onChange:C,help:D}):(0,it.jsx)(mt.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,value:c,label:I,onChange:C,help:D,children:y.map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e.value,label:e.label},e.value)))})}),M&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"desc"!==a||"date"!==i,label:(0,pt.__)("Order by"),onDeselect:()=>o({order:"desc",orderBy:"date"}),isShownByDefault:!0,children:(0,it.jsx)(Qv,{order:a,orderBy:i,orderByOptions:T,onChange:o})}),z&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!p,label:(0,pt.__)("Sticky posts"),onDeselect:()=>o({sticky:""}),isShownByDefault:!0,children:(0,it.jsx)(dk,{value:p,onChange:e=>o({sticky:e})})})]}),!m&&W&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__display",label:(0,pt.__)("Display"),resetAll:()=>{o({offset:0,pages:0})},dropdownMenuProps:G,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Items per page"),hasValue:()=>u>0,children:(0,it.jsx)(pk,{perPage:u,offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Offset"),hasValue:()=>d>0,onDeselect:()=>o({offset:0}),children:(0,it.jsx)(mk,{offset:d,onChange:o})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Max pages to show"),hasValue:()=>l>0,onDeselect:()=>o({pages:0}),children:(0,it.jsx)(gk,{pages:l,onChange:o})})]}),!m&&O&&(0,it.jsxs)(mt.__experimentalToolsPanel,{className:"block-library-query-toolspanel__filters",label:(0,pt.__)("Filters"),resetAll:()=>{o({author:"",parents:[],search:"",taxQuery:null,format:[]}),S("")},dropdownMenuProps:G,children:[L&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Taxonomies"),hasValue:()=>Object.values(g||{}).some((e=>!!e.length)),onDeselect:()=>o({taxQuery:null}),children:(0,it.jsx)(ak,{onChange:o,query:r})}),H&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!s,label:(0,pt.__)("Authors"),onDeselect:()=>o({author:""}),children:(0,it.jsx)(Yv,{value:s,onChange:o})}),R&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!j,label:(0,pt.__)("Keyword"),onDeselect:()=>{o({search:""}),S("")},children:(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Keyword"),value:j,onChange:e=>{B(e),S(e)}})}),V&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!h?.length,label:(0,pt.__)("Parents"),onDeselect:()=>o({parents:[]}),children:(0,it.jsx)(tk,{parents:h,postType:c,onChange:o})}),E&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!_?.length,label:(0,pt.__)("Formats"),onDeselect:()=>o({format:[]}),children:(0,it.jsx)(ck,{onChange:o,query:r})})]})]})}const _k="wp-block-query-enhanced-pagination-modal__description";function xk({clientId:e,attributes:{enhancedPagination:t},setAttributes:o}){const[n,r]=(0,gt.useState)(!1),a=Wv(e);(0,gt.useEffect)((()=>{t&&a&&(o({enhancedPagination:!1}),r(!0))}),[t,a,o]);const i=()=>{r(!1)},s=(0,pt.__)("Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.")+" "+(0,pt.__)('If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.');return n&&(0,it.jsx)(mt.Modal,{title:(0,pt.__)("Query block: Reload full page enabled"),className:"wp-block-query__enhanced-pagination-modal",aria:{describedby:_k},role:"alertdialog",focusOnMount:"firstElement",isDismissible:!1,onRequestClose:i,children:(0,it.jsxs)(mt.__experimentalVStack,{alignment:"right",spacing:5,children:[(0,it.jsx)("span",{id:_k,children:s}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:i,children:(0,pt.__)("OK")})]})})}function bk(e=""){return e=(e=su()(e)).trim().toLowerCase()}function fk(e,t){const o=bk(t),n=bk(e.title);let r=0;if(o===n)r+=30;else if(n.startsWith(o))r+=20;else{o.split(" ").every((e=>n.includes(e)))&&(r+=10)}return r}function yk(e=[],t=""){if(!t)return e;const o=e.map((e=>[e,fk(e,t)])).filter((([,e])=>e>0));return o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))}function vk({clientId:e,attributes:t,setIsPatternSelectionModalOpen:o}){return(0,it.jsx)(mt.Modal,{overlayClassName:"block-library-query-pattern__selection-modal",title:(0,pt.__)("Choose a pattern"),onRequestClose:()=>o(!1),isFullScreen:!0,children:(0,it.jsx)(wk,{clientId:e,attributes:t})})}function kk(e,t){const o=function(e,t){return(0,lt.useSelect)((o=>{const n=o(st.store).getActiveBlockVariation("core/query",t)?.name;if(!n)return"core/query";const{getBlockRootClientId:r,getPatternsByBlockTypes:a}=o(ct.store);return a(`core/query/${n}`,r(e)).length>0?`core/query/${n}`:"core/query"}),[e,t])}(e,t),n=((e,t)=>(0,lt.useSelect)((o=>{const{getBlockRootClientId:n,getPatternsByBlockTypes:r}=o(ct.store),a=n(e);return r(t,a)}),[t,e]))(e,o);return(0,gt.useMemo)((()=>n.filter((e=>e.blocks?.[0]?.name===o))),[n,o])}function wk({clientId:e,attributes:t,showTitlesAsTooltip:o=!1,showSearch:n=!0}){const[r,a]=(0,gt.useState)(""),{replaceBlock:i,selectBlock:s}=(0,lt.useDispatch)(ct.store),l=kk(e,t),c=(0,gt.useMemo)((()=>({previewPostType:t.query.postType})),[t.query.postType]),u=(0,gt.useMemo)((()=>yk(l,r)),[l,r]);return(0,it.jsxs)("div",{className:"block-library-query-pattern__selection-content",children:[n&&(0,it.jsx)("div",{className:"block-library-query-pattern__selection-search",children:(0,it.jsx)(mt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:a,value:r,label:(0,pt.__)("Search"),placeholder:(0,pt.__)("Search")})}),(0,it.jsx)(ct.BlockContextProvider,{value:c,children:(0,it.jsx)(ct.__experimentalBlockPatternsList,{blockPatterns:u,onClickPattern:(o,n)=>{const{newBlocks:r,queryClientIds:a}=((e,t)=>{const{query:{postType:o,inherit:n},namespace:r}=t,a=e.map((e=>(0,st.cloneBlock)(e))),i=[],s=[...a];for(;s.length>0;){const e=s.shift();"core/query"===e.name&&(e.attributes.query={...e.attributes.query,postType:o,inherit:n},r&&(e.attributes.namespace=r),i.push(e.clientId)),e.innerBlocks?.forEach((e=>{s.push(e)}))}return{newBlocks:a,queryClientIds:i}})(n,t);i(e,r),a[0]&&s(a[0])},showTitlesAsTooltip:o})})]})}function Ck({clientId:e,attributes:t,hasInnerBlocks:o}){if(!kk(e,t).length)return null;const n=o?(0,pt.__)("Change design"):(0,pt.__)("Choose pattern");return(0,it.jsx)(mt.ToolbarGroup,{className:"wp-block-template-part__block-control-group",children:(0,it.jsx)(mt.__experimentalDropdownContentWrapper,{children:(0,it.jsx)(mt.Dropdown,{contentClassName:"block-editor-block-settings-menu__popover",focusOnMount:"firstElement",expandOnMobile:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{"aria-haspopup":"true","aria-expanded":e,onClick:t,children:n}),renderContent:()=>(0,it.jsx)(wk,{clientId:e,attributes:t,showSearch:!1,showTitlesAsTooltip:!0})})})})}const{HTMLElementControl:jk}=jo(ct.privateApis),Sk=[["core/post-template"]];function Bk({attributes:e,setAttributes:t,clientId:o,context:n,name:r}){const{queryId:a,query:i,enhancedPagination:s,tagName:l="div",query:{inherit:c}={}}=e,{templateSlug:u}=n,{isSingular:d}=function(e){if(!e)return{isSingular:!0};let t=!1,o="wp"===e?"custom":e;const n=e.includes("-")?e.split("-",1)[0]:e;return(e.includes("-")?e.split("-").slice(1).join("-"):"")&&(o=n),t=["404","blank","single","page","custom"].includes(o),{isSingular:t,templateType:o}}(u),{__unstableMarkNextChangeAsNotPersistent:p}=(0,lt.useDispatch)(ct.store),m=(0,xt.useInstanceId)(Bk),g=(0,ct.useBlockProps)(),h=(0,ct.useInnerBlocksProps)(g,{template:Sk}),{postsPerPage:_}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store),{getEntityRecord:o,getEntityRecordEdits:n,canUser:r}=e(_t.store),a=r("read",{kind:"root",name:"site"})?+o("root","site")?.posts_per_page:+t().postsPerPage;return{postsPerPage:+n("root","site")?.posts_per_page||a||3}}),[]),x=(0,gt.useCallback)((e=>t((t=>({query:{...t.query,...e}})))),[t]);return(0,gt.useEffect)((()=>{const e={};(c&&i.perPage!==_||!i.perPage&&_)&&(e.perPage=_),Object.keys(e).length&&(p(),x(e))}),[i.perPage,c,_,p,x]),(0,gt.useEffect)((()=>{Number.isFinite(a)||(p(),t({queryId:m}))}),[a,m,p,t]),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(Ck,{clientId:o,attributes:e,hasInnerBlocks:!0})}),(0,it.jsx)(xk,{attributes:e,setAttributes:t,clientId:o}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(hk,{name:r,attributes:e,setQuery:x,setAttributes:t,clientId:o,isSingular:d})}),(0,it.jsxs)(ct.InspectorControls,{group:"advanced",children:[(0,it.jsx)(jk,{tagName:l,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]}),(0,it.jsx)(Zv,{enhancedPagination:s,setAttributes:t,clientId:o})]}),(0,it.jsx)(l,{...h})]})}function Tk({attributes:e,clientId:t,name:o,openPatternSelectionModal:n}){const[r,a]=(0,gt.useState)(!1),[i,s]=(0,gt.useState)(0),l=(0,xt.useResizeObserver)((([e])=>{s(e.contentRect.width)})),c=i>0&&i<160,{blockType:u,activeBlockVariation:d}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockType:r}=t(st.store);return{blockType:r(o),activeBlockVariation:n(o,e)}}),[o,e]),p=!!kk(t,e).length,m=d?.icon?.src||d?.icon||u?.icon?.src,g=d?.title||u?.title,h=(0,ct.useBlockProps)({ref:l});return r?(0,it.jsx)(Nk,{clientId:t,attributes:e,icon:m,label:g}):(0,it.jsxs)("div",{...h,children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(Ck,{clientId:t,attributes:e,hasInnerBlocks:!1})}),(0,it.jsxs)(mt.Placeholder,{className:"block-editor-media-placeholder",icon:!c&&m,label:!c&&g,instructions:!c&&(0,pt.__)("Choose a pattern for the query loop or start blank."),withIllustration:c,children:[!!p&&!c&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,children:(0,pt.__)("Choose")}),!c&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{a(!0)},children:(0,pt.__)("Start blank")})]})]})}function Nk({clientId:e,attributes:t,icon:o,label:n}){const r=function(e){const{activeVariationName:t,blockVariations:o}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:o,getBlockVariations:n}=t(st.store);return{activeVariationName:o("core/query",e)?.name,blockVariations:n("core/query","block")}}),[e]);return(0,gt.useMemo)((()=>{const e=e=>!e.attributes?.namespace;if(!t)return o.filter(e);const n=o.filter((e=>e.attributes?.namespace?.includes(t)));return n.length?n:o.filter(e)}),[t,o])}(t),{replaceInnerBlocks:a}=(0,lt.useDispatch)(ct.store),i=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...i,children:(0,it.jsx)(ct.__experimentalBlockVariationPicker,{icon:o,label:n,variations:r,onSelect:t=>{t.innerBlocks&&a(e,(0,st.createBlocksFromInnerBlocksTemplate)(t.innerBlocks),!1)}})})}var Pk=e=>{const{clientId:t,attributes:o}=e,[n,r]=(0,gt.useState)(!1),a=(0,lt.useSelect)((e=>!!e(ct.store).getBlocks(t).length),[t])?Bk:Tk;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(a,{...e,openPatternSelectionModal:()=>r(!0)}),n&&(0,it.jsx)(vk,{clientId:t,attributes:o,setIsPatternSelectionModalOpen:r})]})};const Ik=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zM7 26h12v1H7v-1zm34-5H7v3h34v-3zM7 38h12v1H7v-1zm34-5H7v3h34v-3z"})}),Dk=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M41 9H7v3h34V9zm-4 5H7v1h30v-1zm4 3H7v1h34v-1zM7 20h30v1H7v-1zm0 12h30v1H7v-1zm34 3H7v1h34v-1zM7 38h30v1H7v-1zm34-11H7v3h34v-3z"})}),Mk=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M41 9H7v3h34V9zm-22 5H7v1h12v-1zm22 3H7v1h34v-1zM7 20h34v1H7v-1zm0 12h12v1H7v-1zm34 3H7v1h34v-1zM7 38h34v1H7v-1zm34-11H7v3h34v-3z"})}),zk=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M7 9h34v6H7V9zm12 8H7v1h12v-1zm18 3H7v1h30v-1zm0 18H7v1h30v-1zM7 35h12v1H7v-1zm34-8H7v6h34v-6z"})}),Ak=["core/post-date",{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}];var Lk=[{name:"title-date",title:(0,pt.__)("Title & Date"),icon:Ik,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],Ak]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-excerpt",title:(0,pt.__)("Title & Excerpt"),icon:Dk,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"title-date-excerpt",title:(0,pt.__)("Title, Date, & Excerpt"),icon:Mk,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-title"],Ak,["core/post-excerpt"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]},{name:"image-date-title",title:(0,pt.__)("Image, Date, & Title"),icon:zk,attributes:{},innerBlocks:[["core/post-template",{},[["core/post-featured-image"],Ak,["core/post-title"]]],["core/query-pagination"],["core/query-no-results"]],scope:["block"]}];const{cleanEmptyObject:Hk}=jo(ct.privateApis),Rk=e=>{const{query:t}=e,{categoryIds:o,tagIds:n,...r}=t;return(t.categoryIds?.length||t.tagIds?.length)&&(r.taxQuery={category:t.categoryIds?.length?t.categoryIds:void 0,post_tag:t.tagIds?.length?t.tagIds:void 0}),{...e,query:r}},Vk=(e,t)=>{const{style:o,backgroundColor:n,gradient:r,textColor:a,...i}=e;if(!(n||r||a||o?.color||o?.elements?.link))return[e,t];if(o&&(i.style=Hk({...o,color:void 0,elements:{...o.elements,link:void 0}})),Fk(t)){const e=t[0],s=o?.color||o?.elements?.link||e.attributes.style?Hk({...e.attributes.style,color:o?.color,elements:o?.elements?.link?{link:o?.elements?.link}:void 0}):void 0;return[i,[(0,st.createBlock)("core/group",{...e.attributes,backgroundColor:n,gradient:r,textColor:a,style:s},e.innerBlocks)]]}return[i,[(0,st.createBlock)("core/group",{backgroundColor:n,gradient:r,textColor:a,style:Hk({color:o?.color,elements:o?.elements?.link?{link:o?.elements?.link}:void 0})},t)]]},Fk=(e=[])=>1===e.length&&"core/group"===e[0].name,Ek=e=>{const{layout:t=null}=e;if(!t)return e;const{inherit:o=null,contentSize:n=null,...r}=t;return o||n?{...e,layout:{...r,contentSize:n,type:"constrained"}}:e},Ok=(e=[])=>{let t=null;for(const o of e){if("core/post-template"===o.name){t=o;break}o.innerBlocks.length&&(t=Ok(o.innerBlocks))}return t},Gk=(e=[],t)=>(e.forEach(((o,n)=>{"core/post-template"===o.name?e.splice(n,1,t):o.innerBlocks.length&&(o.innerBlocks=Gk(o.innerBlocks,t))})),e),$k=(e,t)=>{const{displayLayout:o=null,...n}=e;if(!o)return[e,t];const r=Ok(t);if(!r)return[e,t];const{type:a,columns:i}=o,s="flex"===a?"grid":"default",l=(0,st.createBlock)("core/post-template",{...r.attributes,layout:{type:s,...i&&{columnCount:i}}},r.innerBlocks);return[n,Gk(t,l)]},Uk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},layout:{type:"object",default:{type:"list"}}},supports:{html:!1},migrate(e,t){const o=Rk(e),{layout:n,...r}=o,a={...r,displayLayout:o.layout};return $k(a,t)},save:()=>(0,it.jsx)(ct.InnerBlocks.Content,{})},qk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",categoryIds:[],tagIds:[],order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},layout:!0},isEligible:({query:{categoryIds:e,tagIds:t}={}})=>e||t,migrate(e,t){const o=Rk(e),[n,r]=Vk(o,t),a=Ek(n);return $k(a,r)},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})}},Wk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},isEligible(e){const{style:t,backgroundColor:o,gradient:n,textColor:r}=e;return o||n||r||t?.color||t?.elements?.link},migrate(e,t){const[o,n]=Vk(e,t),r=Ek(o);return $k(r,n)},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})}},Zk={attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}},layout:!0},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},isEligible:({layout:e})=>e?.inherit||e?.contentSize&&"constrained"!==e?.type,migrate(e,t){const o=Ek(e);return $k(o,t)}};var Jk=[{attributes:{queryId:{type:"number"},query:{type:"object",default:{perPage:null,pages:0,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",exclude:[],sticky:"",inherit:!0,taxQuery:null,parents:[]}},tagName:{type:"string",default:"div"},displayLayout:{type:"object",default:{type:"list"}},namespace:{type:"string"}},supports:{align:["wide","full"],anchor:!0,html:!1,layout:!0},save({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},isEligible:({displayLayout:e})=>!!e,migrate:$k},Zk,Wk,qk,Uk];const{name:Qk}=Ev,Kk={icon:Fv,edit:Pk,example:{viewportWidth:650,attributes:{namespace:"core/posts-list",query:{perPage:4,pages:1,offset:0,postType:"post",order:"desc",orderBy:"date",author:"",search:"",sticky:"exclude",inherit:!1}},innerBlocks:[{name:"core/post-template",attributes:{layout:{type:"grid",columnCount:2}},innerBlocks:[{name:"core/post-title"},{name:"core/post-date",attributes:{metadata:{bindings:{datetime:{source:"core/post-data",args:{field:"date"}}}}}},{name:"core/post-excerpt"}]}]},save:function({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},variations:Lk,deprecated:Jk},Yk=()=>jt({name:Qk,metadata:Ev,settings:Kk}),Xk=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-no-results","title":"No Results","category":"theme","description":"Contains the block elements used to render content when no query results are found.","ancestor":["core/query"],"textdomain":"default","usesContext":["queryId","query"],"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),ew=[["core/paragraph",{placeholder:(0,pt.__)("Add text or blocks that will display when a query returns no results.")}]];const{name:tw}=Xk,ow={icon:Fv,edit:function(){const e=(0,ct.useBlockProps)(),t=(0,ct.useInnerBlocksProps)(e,{template:ew});return(0,it.jsx)("div",{...t})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("No posts were found.")}}]}},nw=()=>jt({name:tw,metadata:Xk,settings:ow}),rw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination","title":"Pagination","category":"theme","ancestor":["core/query"],"allowedBlocks":["core/query-pagination-previous","core/query-pagination-numbers","core/query-pagination-next"],"description":"Displays a paginated navigation to next/previous set of posts, when applicable.","textdomain":"default","attributes":{"paginationArrow":{"type":"string","default":"none"},"showLabel":{"type":"boolean","default":true}},"usesContext":["queryId","query"],"providesContext":{"paginationArrow":"paginationArrow","showLabel":"showLabel"},"supports":{"align":true,"reusable":false,"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"layout":{"allowSwitching":false,"allowInheriting":false,"default":{"type":"flex"}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-editor","style":"wp-block-query-pagination"}');function aw({value:e,onChange:t}){return(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Arrow"),value:e,onChange:t,help:(0,pt.__)("A decorative arrow appended to the next and previous page link."),isBlock:!0,children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"none",label:(0,pt._x)("None","Arrow option for Query Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"arrow",label:(0,pt._x)("Arrow","Arrow option for Query Pagination Next/Previous blocks")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"chevron",label:(0,pt._x)("Chevron","Arrow option for Query Pagination Next/Previous blocks")})]})}function iw({value:e,onChange:t}){return(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show label text"),help:(0,pt.__)('Make label text visible, e.g. "Next Page".'),onChange:t,checked:!0===e})}const sw=[["core/query-pagination-previous"],["core/query-pagination-numbers"],["core/query-pagination-next"]];var lw=[{save:()=>(0,it.jsx)("div",{...ct.useBlockProps.save(),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}];const{name:cw}=rw,uw={icon:ii,edit:function({attributes:{paginationArrow:e,showLabel:t},setAttributes:o,clientId:n}){const r=(0,lt.useSelect)((e=>{const{getBlocks:t}=e(ct.store),o=t(n);return o?.find((e=>["core/query-pagination-next","core/query-pagination-previous"].includes(e.name)))}),[n]),{__unstableMarkNextChangeAsNotPersistent:a}=(0,lt.useDispatch)(ct.store),i=vt(),s=(0,ct.useBlockProps)(),l=(0,ct.useInnerBlocksProps)(s,{template:sw});return(0,gt.useEffect)((()=>{"none"!==e||t||(a(),o({showLabel:!0}))}),[e,o,t,a]),(0,it.jsxs)(it.Fragment,{children:[r&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({paginationArrow:"none",showLabel:!0})},dropdownMenuProps:i,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"none"!==e,label:(0,pt.__)("Pagination arrow"),onDeselect:()=>o({paginationArrow:"none"}),isShownByDefault:!0,children:(0,it.jsx)(aw,{value:e,onChange:e=>{o({paginationArrow:e})}})}),"none"!==e&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!t,label:(0,pt.__)("Show text"),onDeselect:()=>o({showLabel:!0}),isShownByDefault:!0,children:(0,it.jsx)(iw,{value:t,onChange:e=>{o({showLabel:e})}})})]})}),(0,it.jsx)("nav",{...l})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},deprecated:lw},dw=()=>jt({name:cw,metadata:rw,settings:uw}),pw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-next","title":"Next Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the next posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),mw={none:"",arrow:"→",chevron:"»"};const{name:gw}=pw,hw={icon:mi,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:o,showLabel:n}}){const r=mw[o];return(0,it.jsxs)("a",{href:"#pagination-next-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[n&&(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Next page link"),placeholder:(0,pt.__)("Next Page"),value:e,onChange:e=>t({label:e})}),r&&(0,it.jsx)("span",{className:`wp-block-query-pagination-next-arrow is-arrow-${o}`,"aria-hidden":!0,children:r})]})}},_w=()=>jt({name:gw,metadata:pw,settings:hw}),xw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-numbers","title":"Page Numbers","category":"theme","parent":["core/query-pagination"],"description":"Displays a list of page numbers for pagination.","textdomain":"default","attributes":{"midSize":{"type":"number","default":2}},"usesContext":["queryId","query","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-query-pagination-numbers-editor"}'),bw=(e,t="a",o="")=>(0,it.jsx)(t,{className:`page-numbers ${o}`,children:e},e);const{name:fw}=xw,yw={icon:fi,edit:function({attributes:e,setAttributes:t}){const{midSize:o}=e,n=(e=>{const t=[];for(let o=1;o<=e;o++)t.push(bw(o));t.push(bw(e+1,"span","current"));for(let o=1;o<=e;o++)t.push(bw(e+1+o));return t.push(bw("...","span","dots")),t.push(bw(2*e+3)),(0,it.jsx)(it.Fragment,{children:t})})(parseInt(o,10)),r=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>t({midSize:2}),dropdownMenuProps:r,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Number of links"),hasValue:()=>2!==o,onDeselect:()=>t({midSize:2}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Number of links"),help:(0,pt.__)("Specify how many links can appear before and after the current page number. Links to the first, current and last page are always visible."),value:o,onChange:e=>{t({midSize:parseInt(e,10)})},min:0,max:5,withInputField:!1})})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:n})]})},example:{}},vw=()=>jt({name:fw,metadata:xw,settings:yw}),kw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-pagination-previous","title":"Previous Page","category":"theme","parent":["core/query-pagination"],"description":"Displays the previous posts page link.","textdomain":"default","attributes":{"label":{"type":"string"}},"usesContext":["queryId","query","paginationArrow","showLabel","enhancedPagination"],"supports":{"reusable":false,"html":false,"color":{"gradients":true,"text":false,"__experimentalDefaultControls":{"background":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}}}'),ww={none:"",arrow:"←",chevron:"«"};const{name:Cw}=kw,jw={icon:ei,edit:function({attributes:{label:e},setAttributes:t,context:{paginationArrow:o,showLabel:n}}){const r=ww[o];return(0,it.jsxs)("a",{href:"#pagination-previous-pseudo-link",onClick:e=>e.preventDefault(),...(0,ct.useBlockProps)(),children:[r&&(0,it.jsx)("span",{className:`wp-block-query-pagination-previous-arrow is-arrow-${o}`,"aria-hidden":!0,children:r}),n&&(0,it.jsx)(ct.PlainText,{__experimentalVersion:2,tagName:"span","aria-label":(0,pt.__)("Previous page link"),placeholder:(0,pt.__)("Previous Page"),value:e,onChange:e=>t({label:e})})]})}},Sw=()=>jt({name:Cw,metadata:kw,settings:jw}),Bw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-title","title":"Query Title","category":"theme","description":"Display the query title.","textdomain":"default","attributes":{"type":{"type":"string"},"textAlign":{"type":"string"},"level":{"type":"number","default":1},"levelOptions":{"type":"array"},"showPrefix":{"type":"boolean","default":true},"showSearchTerm":{"type":"boolean","default":true}},"example":{"attributes":{"type":"search"}},"usesContext":["query"],"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-query-title"}');const Tw=["archive","search","post-type"];const Nw=[{isDefault:!0,name:"archive-title",title:(0,pt.__)("Archive Title"),description:(0,pt.__)("Display the archive title based on the queried object."),icon:ji,attributes:{type:"archive"},scope:["inserter"]},{isDefault:!1,name:"search-title",title:(0,pt.__)("Search Results Title"),description:(0,pt.__)("Display the search results title based on the queried object."),icon:ji,attributes:{type:"search"},scope:["inserter"]},{isDefault:!1,name:"post-type-label",title:(0,pt.__)("Post Type Label"),description:(0,pt.__)("Display the post type label based on the queried object."),icon:ji,attributes:{type:"post-type"},scope:["inserter"]}];Nw.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.type===t.type)}));var Pw=Nw;const Iw={attributes:{type:{type:"string"},textAlign:{type:"string"},level:{type:"number",default:1}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Dw=[Iw];const{name:Mw}=Bw,zw={icon:ji,edit:function({attributes:{type:e,level:t,levelOptions:o,textAlign:n,showPrefix:r,showSearchTerm:a},setAttributes:i,context:{query:s}}){const{archiveTypeLabel:l,archiveNameLabel:c}=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n,r,a=!1;if(t)t[1]?o=t[2]?t[2]:t[1]:t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o;else{const t=e?.match(/^(author)$|^author-(.+)$/);t&&(a=!0,t[2]&&(r=t[2]))}return(0,lt.useSelect)((e=>{const{getEntityRecords:t,getTaxonomy:i,getAuthors:s}=e(_t.store);let l,c;if(o&&(l=i(o)?.labels?.singular_name),n){const e=t("taxonomy",o,{slug:n,per_page:1});e&&e[0]&&(c=e[0].name)}if(a&&(l="Author",r)){const e=s({slug:r});e&&e[0]&&(c=e[0].name)}return{archiveTypeLabel:l,archiveNameLabel:c}}),[r,a,o,n])}(),{postTypeLabel:u}=function(e){const t=(0,lt.useSelect)((e=>{const{getCurrentPostType:t}=e("core/editor");return t()}),[]);return(0,lt.useSelect)((o=>{const{getPostType:n}=o(_t.store),r=n(e||t);return{postTypeLabel:r?r.labels.singular_name:""}}),[e,t])}(s?.postType),d=vt(),p=0===t?"p":`h${t}`,m=(0,ct.useBlockProps)({className:Dt("wp-block-query-title__placeholder",{[`has-text-align-${n}`]:n})});if(!Tw.includes(e))return(0,it.jsx)("div",{...m,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Provided type is not supported.")})});let g;if("archive"===e){let e;e=l?r?c?(0,pt.sprintf)((0,pt._x)("%1$s: %2$s","archive label"),l,c):(0,pt.sprintf)((0,pt.__)("%s: Name"),l):c||(0,pt.sprintf)((0,pt.__)("%s name"),l):r?(0,pt.__)("Archive type: Name"):(0,pt.__)("Archive title"),g=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>i({showPrefix:!0}),dropdownMenuProps:d,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,pt.__)("Show archive type in title"),onDeselect:()=>i({showPrefix:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show archive type in title"),onChange:()=>i({showPrefix:!r}),checked:r})})})}),(0,it.jsx)(p,{...m,children:e})]})}if("search"===e&&(g=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>i({showSearchTerm:!0}),dropdownMenuProps:d,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!a,label:(0,pt.__)("Show search term in title"),onDeselect:()=>i({showSearchTerm:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show search term in title"),onChange:()=>i({showSearchTerm:!a}),checked:a})})})}),(0,it.jsx)(p,{...m,children:a?(0,pt.__)("Search results for: “search term”"):(0,pt.__)("Search results")})]})),"post-type"===e){let e;e=u?r?(0,pt.sprintf)((0,pt.__)('Post Type: "%s"'),u):u:r?(0,pt.__)("Post Type: Name"):(0,pt.__)("Name"),g=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>i({showPrefix:!0}),dropdownMenuProps:d,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!r,label:(0,pt.__)("Show post type label"),onDeselect:()=>i({showPrefix:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show post type label"),onChange:()=>i({showPrefix:!r}),checked:r})})})}),(0,it.jsx)(p,{...m,children:e})]})}return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:t,options:o,onChange:e=>i({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:n,onChange:e=>{i({textAlign:e})}})]}),g]})},variations:Pw,deprecated:Dw},Aw=()=>jt({name:Mw,metadata:Bw,settings:zw}),Lw=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/query-total","title":"Query Total","category":"theme","ancestor":["core/query"],"description":"Display the total number of results in a query.","textdomain":"default","attributes":{"displayType":{"type":"string","default":"total-results"}},"usesContext":["queryId","query"],"supports":{"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true},"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-query-total"}'),Hw=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,it.jsx)(mt.Path,{d:"M4 11h4v2H4v-2zm6 0h6v2h-6v-2zm8 0h2v2h-2v-2z"})}),Rw=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,it.jsx)(mt.Path,{d:"M4 13h2v-2H4v2zm4 0h10v-2H8v2zm12 0h2v-2h-2v2z"})}),Vw=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,it.jsx)(mt.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2Zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12Zm-7-6-4.1 5h8.8v-3h-1.5v1.5h-4.2l2.9-3.5-2.9-3.5h4.2V10h1.5V7H7.4l4.1 5Z"})});const{name:Fw}=Lw,Ew={icon:Vw,edit:function({attributes:e,setAttributes:t}){const{displayType:o}=e,n=(0,ct.useBlockProps)(),r=[{role:"menuitemradio",title:(0,pt.__)("Total results"),isActive:"total-results"===o,icon:Hw,onClick:()=>{t({displayType:"total-results"})}},{role:"menuitemradio",title:(0,pt.__)("Range display"),isActive:"range-display"===o,icon:Rw,onClick:()=>{t({displayType:"range-display"})}}],a=(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:(()=>{switch(o){case"total-results":return Hw;case"range-display":return Rw}})(),label:(0,pt.__)("Change display type"),controls:r})})});return(0,it.jsxs)("div",{...n,children:[a,"total-results"===o?(0,it.jsx)(it.Fragment,{children:(0,pt.__)("12 results found")}):"range-display"===o?(0,it.jsx)(it.Fragment,{children:(0,pt.__)("Displaying 1 – 10 of 12")}):null]})}},Ow=()=>jt({name:Fw,metadata:Lw,settings:Ew});var Gw=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M13 6v6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H13zm-9 6h5.2v4c0 .8-.2 1.4-.5 1.7-.6.6-1.6.6-2.5.5h-.3v1.5h.5c1 0 2.3-.1 3.3-1 .6-.6 1-1.6 1-2.8V6H4v6z"})});const $w=e=>{const{value:t,...o}=e;return[{...o},t?(0,st.parseWithAttributeSchema)(t,{type:"array",source:"query",selector:"p",query:{content:{type:"string",source:"html"}}}).map((({content:e})=>(0,st.createBlock)("core/paragraph",{content:e}))):(0,st.createBlock)("core/paragraph")]},Uw=["left","right","center"],qw=(e,t)=>{const{align:o,...n}=e;return[Uw.includes(o)?{...n,textAlign:o}:e,t]},Ww={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},align:{type:"string"}},supports:{anchor:!0,html:!1,__experimentalOnEnter:!0,__experimentalOnMerge:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontWeight:!0,__experimentalFontStyle:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalLetterSpacing:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}},color:{gradients:!0,heading:!0,link:!0,__experimentalDefaultControls:{background:!0,text:!0}}},isEligible:({align:e})=>Uw.includes(e),save({attributes:e}){const{align:t,citation:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsxs)("blockquote",{...ct.useBlockProps.save({className:n}),children:[(0,it.jsx)(ct.InnerBlocks.Content,{}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},migrate:qw},Zw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:"",role:"content"},citation:{type:"string",source:"html",selector:"cite",default:"",role:"content"},align:{type:"string"}},supports:{anchor:!0,__experimentalSlashInserter:!0,typography:{fontSize:!0,lineHeight:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0,fontAppearance:!0}}},save({attributes:e}){const{align:t,value:o,citation:n}=e,r=Dt({[`has-text-align-${t}`]:t});return(0,it.jsxs)("blockquote",{...ct.useBlockProps.save({className:r}),children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:n})]})},migrate:e=>qw(...$w(e))},Jw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"}},migrate:e=>qw(...$w(e)),save({attributes:e}){const{align:t,value:o,citation:n}=e;return(0,it.jsxs)("blockquote",{style:{textAlign:t||null},children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:n})]})}},Qw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"cite",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(2===e.style){const{style:t,...o}=e;return qw(...((e,t)=>[{...e,className:e.className?e.className+" is-style-large":"is-style-large"},t])(...$w(o)))}return qw(...$w(e))},save({attributes:e}){const{align:t,value:o,citation:n,style:r}=e;return(0,it.jsxs)("blockquote",{className:2===r?"is-large":"",style:{textAlign:t||null},children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:n})]})}},Kw={attributes:{value:{type:"string",source:"html",selector:"blockquote",multiline:"p",default:""},citation:{type:"string",source:"html",selector:"footer",default:""},align:{type:"string"},style:{type:"number",default:1}},migrate(e){if(!isNaN(parseInt(e.style))){const{style:t,...o}=e;return qw(...$w(o))}return qw(...$w(e))},save({attributes:e}){const{align:t,value:o,citation:n,style:r}=e;return(0,it.jsxs)("blockquote",{className:`blocks-quote-style-${r}`,style:{textAlign:t||null},children:[(0,it.jsx)(ct.RichText.Content,{multiline:!0,value:o}),!ct.RichText.isEmpty(n)&&(0,it.jsx)(ct.RichText.Content,{tagName:"footer",value:n})]})}};var Yw=[Ww,Zw,Jw,Qw,Kw],Xw=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});const eC="web"===gt.Platform.OS,tC=[["core/paragraph",{}]];const oC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/quote","title":"Quote","category":"text","description":"Give quoted text visual emphasis. \\"In quoting others, we cite ourselves.\\" — Julio Cortázar","keywords":["blockquote","cite"],"textdomain":"default","attributes":{"value":{"type":"string","source":"html","selector":"blockquote","multiline":"p","default":"","role":"content"},"citation":{"type":"rich-text","source":"rich-text","selector":"cite","role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"align":["left","right","wide","full"],"html":false,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"__experimentalOnEnter":true,"__experimentalOnMerge":true,"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"gradients":true,"heading":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"layout":{"allowEditing":false},"spacing":{"blockGap":true,"padding":true,"margin":true},"interactivity":{"clientNavigation":true},"allowedBlocks":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"plain","label":"Plain"}],"editorStyle":"wp-block-quote-editor","style":"wp-block-quote"}');const nC={from:[{type:"block",blocks:["core/pullquote"],transform:({value:e,align:t,citation:o,anchor:n,fontSize:r,style:a})=>(0,st.createBlock)("core/quote",{align:t,citation:o,anchor:n,fontSize:r,style:a},[(0,st.createBlock)("core/paragraph",{content:e})])},{type:"prefix",prefix:">",transform:e=>(0,st.createBlock)("core/quote",{},[(0,st.createBlock)("core/paragraph",{content:e})])},{type:"raw",schema:()=>({blockquote:{children:"*"}}),selector:"blockquote",transform:(e,t)=>(0,st.createBlock)("core/quote",{},t({HTML:e.innerHTML,mode:"BLOCKS"}))},{type:"block",isMultiBlock:!0,blocks:["*"],isMatch:({},e)=>1===e.length?["core/paragraph","core/heading","core/list","core/pullquote"].includes(e[0].name):!e.some((({name:e})=>"core/quote"===e)),__experimentalConvert:e=>(0,st.createBlock)("core/quote",{},e.map((e=>(0,st.createBlock)(e.name,e.attributes,e.innerBlocks))))}],to:[{type:"block",blocks:["core/pullquote"],isMatch:({},e)=>e.innerBlocks.every((({name:e})=>"core/paragraph"===e)),transform:({align:e,citation:t,anchor:o,fontSize:n,style:r},a)=>{const i=a.map((({attributes:e})=>`${e.content}`)).join("<br>");return(0,st.createBlock)("core/pullquote",{value:i,align:e,citation:t,anchor:o,fontSize:n,style:r})}},{type:"block",blocks:["core/paragraph"],transform:({citation:e},t)=>ct.RichText.isEmpty(e)?t:[...t,(0,st.createBlock)("core/paragraph",{content:e})]},{type:"block",blocks:["core/group"],transform:({citation:e,anchor:t},o)=>(0,st.createBlock)("core/group",{anchor:t},ct.RichText.isEmpty(e)?o:[...o,(0,st.createBlock)("core/paragraph",{content:e})])}],ungroup:({citation:e},t)=>ct.RichText.isEmpty(e)?t:[...t,(0,st.createBlock)("core/paragraph",{content:e})]};var rC=nC;const{name:aC}=oC,iC={icon:Gw,example:{attributes:{citation:(0,pt.__)("Julio Cortázar")},innerBlocks:[{name:"core/paragraph",attributes:{content:(0,pt.__)("In quoting others, we cite ourselves.")}}]},transforms:rC,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:o,clientId:n,className:r,style:a,isSelected:i}){const{textAlign:s,allowedBlocks:l}=e;((e,t)=>{const o=(0,lt.useRegistry)(),{updateBlockAttributes:n,replaceInnerBlocks:r}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{if(!e.value)return;const[a,i]=$w(e);Wm()("Value attribute on the quote block",{since:"6.0",version:"6.5",alternative:"inner blocks"}),o.batch((()=>{n(t,a),r(t,i)}))}),[e.value])})(e,n);const c=(0,ct.useBlockProps)({className:Dt(r,{[`has-text-align-${s}`]:s}),...!eC&&{style:a}}),u=(0,ct.useInnerBlocksProps)(c,{template:tC,templateInsertUpdatesSelection:!0,__experimentalCaptureToolbars:!0,renderAppender:!1,allowedBlocks:l});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:s,onChange:e=>{t({textAlign:e})}})}),(0,it.jsxs)(mt.BlockQuotation,{...u,children:[u.children,(0,it.jsx)(zo,{attributeKey:"citation",tagName:eC?"cite":"p",style:eC&&{display:"block"},isSelected:i,attributes:e,setAttributes:t,__unstableMobileNoFocusOnMount:!0,icon:Xw,label:(0,pt.__)("Quote citation"),placeholder:(0,pt.__)("Add citation"),addLabel:(0,pt.__)("Add citation"),removeLabel:(0,pt.__)("Remove citation"),excludeElementClassName:!0,className:"wp-block-quote__citation",insertBlocksAfter:o,...eC?{}:{textAlign:s}})]})]})},save:function({attributes:e}){const{textAlign:t,citation:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsxs)("blockquote",{...ct.useBlockProps.save({className:n}),children:[(0,it.jsx)(ct.InnerBlocks.Content,{}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"cite",value:o})]})},deprecated:Yw},sC=()=>jt({name:aC,metadata:oC,settings:iC});var lC=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});const cC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/block","title":"Pattern","category":"reusable","description":"Reuse this design across your site.","keywords":["reusable"],"textdomain":"default","attributes":{"ref":{"type":"number"},"content":{"type":"object","default":{}}},"providesContext":{"pattern/overrides":"content"},"supports":{"customClassName":false,"html":false,"inserter":false,"renaming":false,"interactivity":{"clientNavigation":true}}}'),uC=window.wp.patterns,{useLayoutClasses:dC}=jo(ct.privateApis),{hasOverridableBlocks:pC}=jo(uC.privateApis),mC=["full","wide","left","right"];function gC(){const e=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...e,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})})}const hC=()=>{};function _C({recordId:e,canOverrideBlocks:t,hasContent:o,handleEditOriginal:n,resetContent:r}){const a=(0,lt.useSelect)((t=>!!t(_t.store).canUser("update",{kind:"postType",name:"wp_block",id:e})),[e]);return(0,it.jsxs)(it.Fragment,{children:[a&&!!n&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:n,children:(0,pt.__)("Edit original")})})}),t&&(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:r,disabled:!o,children:(0,pt.__)("Reset")})})})]})}function xC({name:e,attributes:{ref:t,content:o},__unstableParentLayout:n,setAttributes:r}){const{record:a,hasResolved:i}=(0,_t.useEntityRecord)("postType","wp_block",t),[s]=(0,_t.useEntityBlockEditor)("postType","wp_block",{id:t}),l=i&&!a,{__unstableMarkLastChangeAsPersistent:c}=(0,lt.useDispatch)(ct.store),{onNavigateToEntityRecord:u,hasPatternOverridesSource:d}=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,hasPatternOverridesSource:!!(0,st.getBlockBindingsSource)("core/pattern-overrides")}}),[]),p=(0,gt.useMemo)((()=>d&&pC(s)),[d,s]),{alignment:m,layout:g}=((e,t)=>{const o=(0,gt.useRef)();return(0,gt.useMemo)((()=>{if(!e?.length)return{};let n=o.current;if(void 0===n){const r="constrained"===t?.type,a=e.some((e=>mC.includes(e.attributes.align)));n=r&&a?"full":null,o.current=n}return{alignment:n,layout:n?t:void 0}}),[e,t])})(s,n),h=dC({layout:g},e),_=(0,ct.useBlockProps)({className:Dt("block-library-block__reusable-block-container",g&&h,{[`align${m}`]:m})}),x=(0,ct.useInnerBlocksProps)(_,{layout:g,value:s,onInput:hC,onChange:hC,renderAppender:s?.length?void 0:ct.InnerBlocks.ButtonBlockAppender});let b=null;return l&&(b=(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block has been deleted or is unavailable.")})),i||(b=(0,it.jsx)(mt.Placeholder,{children:(0,it.jsx)(mt.Spinner,{})})),(0,it.jsxs)(it.Fragment,{children:[i&&!l&&(0,it.jsx)(_C,{recordId:t,canOverrideBlocks:p,hasContent:!!o,handleEditOriginal:u?()=>{u({postId:t,postType:"wp_block"})}:void 0,resetContent:()=>{o&&(c(),r({content:void 0}))}}),null===b?(0,it.jsx)("div",{...x}):(0,it.jsx)("div",{..._,children:b})]})}const bC={attributes:{ref:{type:"number"},content:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({content:e})=>!!e&&Object.keys(e).every((t=>{return e[t].values&&("object"==typeof(o=e[t].values)&&!Array.isArray(o)&&null!==o);var o})),migrate(e){const{content:t,...o}=e;if(t&&Object.keys(t).length){const e={...t};for(const o in t)e[o]=t[o].values;return{...o,content:e}}return e}},fC={attributes:{ref:{type:"number"},overrides:{type:"object"}},supports:{customClassName:!1,html:!1,inserter:!1,renaming:!1},isEligible:({overrides:e})=>!!e,migrate(e){const{overrides:t,...o}=e,n={};return Object.keys(t).forEach((e=>{n[e]=t[e]})),{...o,content:n}}};var yC=[bC,fC];const{name:vC}=cC,kC={deprecated:yC,edit:function(e){const{ref:t}=e.attributes;return(0,ct.useHasRecursion)(t)?(0,it.jsx)(gC,{}):(0,it.jsx)(ct.RecursionProvider,{uniqueId:t,children:(0,it.jsx)(xC,{...e})})},icon:lC,__experimentalLabel:({ref:e})=>{if(!e)return;const t=(0,lt.select)(_t.store).getEditedEntityRecord("postType","wp_block",e);return t?.title?(0,ao.decodeEntities)(t.title):void 0}},wC=()=>jt({name:vC,metadata:cC,settings:kC}),CC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/read-more","title":"Read More","category":"theme","description":"Displays the link of a post, page, or any other content-type.","textdomain":"default","attributes":{"content":{"type":"string","role":"content"},"linkTarget":{"type":"string","default":"_self"}},"usesContext":["postId"],"supports":{"html":false,"color":{"gradients":true,"text":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true,"textDecoration":true}},"spacing":{"margin":["top","bottom"],"padding":true,"__experimentalDefaultControls":{"padding":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalDefaultControls":{"width":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-read-more"}');const{name:jC}=CC,SC={icon:gn,edit:function({attributes:{content:e,linkTarget:t},setAttributes:o,insertBlocksAfter:n}){const r=(0,ct.useBlockProps)(),a=vt();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>o({linkTarget:"_self"}),dropdownMenuProps:a,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open in new tab"),isShownByDefault:!0,hasValue:()=>"_self"!==t,onDeselect:()=>o({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>o({linkTarget:e?"_blank":"_self"}),checked:"_blank"===t})})})}),(0,it.jsx)(ct.RichText,{identifier:"content",tagName:"a","aria-label":(0,pt.__)("“Read more” link text"),placeholder:(0,pt.__)("Read more"),value:e,onChange:e=>o({content:e}),__unstableOnSplitAtEnd:()=>n((0,st.createBlock)((0,st.getDefaultBlockName)())),withoutInteractiveFormatting:!0,...r})]})},example:{attributes:{content:(0,pt.__)("Read more")}}},BC=()=>jt({name:jC,metadata:CC,settings:SC});var TC=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M5 10.2h-.8v1.5H5c1.9 0 3.8.8 5.1 2.1 1.4 1.4 2.1 3.2 2.1 5.1v.8h1.5V19c0-2.3-.9-4.5-2.6-6.2-1.6-1.6-3.8-2.6-6.1-2.6zm10.4-1.6C12.6 5.8 8.9 4.2 5 4.2h-.8v1.5H5c3.5 0 6.9 1.4 9.4 3.9s3.9 5.8 3.9 9.4v.8h1.5V19c0-3.9-1.6-7.6-4.4-10.4zM4 20h3v-3H4v3z"})});const NC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/rss","title":"RSS","category":"widgets","description":"Display entries from any RSS or Atom feed.","keywords":["atom","feed"],"textdomain":"default","attributes":{"columns":{"type":"number","default":2},"blockLayout":{"type":"string","default":"list"},"feedURL":{"type":"string","default":"","role":"content"},"itemsToShow":{"type":"number","default":5},"displayExcerpt":{"type":"boolean","default":false},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":false},"excerptLength":{"type":"number","default":55},"openInNewTab":{"type":"boolean","default":false},"rel":{"type":"string"}},"supports":{"align":true,"html":false,"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"padding":false,"margin":false}},"color":{"background":true,"text":true,"gradients":true,"link":true}},"editorStyle":"wp-block-rss-editor","style":"wp-block-rss"}');const{name:PC}=NC,IC={icon:TC,example:{attributes:{feedURL:"https://wordpress.org"}},edit:function({attributes:e,setAttributes:t}){const[o,n]=(0,gt.useState)(!e.feedURL),{blockLayout:r,columns:a,displayAuthor:i,displayDate:s,displayExcerpt:l,excerptLength:c,feedURL:u,itemsToShow:d,openInNewTab:p,rel:m}=e,g=vt();function h(o){return()=>{const n=e[o];t({[o]:!n})}}const _=(0,ct.useBlockProps)(),x=(0,pt.__)("RSS URL");if(o)return(0,it.jsx)("div",{..._,children:(0,it.jsx)(mt.Placeholder,{icon:TC,label:x,instructions:(0,pt.__)("Display entries from any RSS or Atom feed."),children:(0,it.jsxs)("form",{onSubmit:function(e){e.preventDefault(),u&&(t({feedURL:(0,no.prependHTTP)(u)}),n(!1))},className:"wp-block-rss__placeholder-form",children:[(0,it.jsx)(mt.__experimentalInputControl,{__next40pxDefaultSize:!0,label:x,type:"url",hideLabelFromVision:!0,placeholder:(0,pt.__)("Enter URL here…"),value:u,onChange:e=>t({feedURL:e}),className:"wp-block-rss__placeholder-input"}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,pt.__)("Apply")})]})})});const b=[{icon:$l,title:(0,pt.__)("Edit RSS URL"),onClick:()=>n(!0)},{icon:jm,title:(0,pt._x)("List view","RSS block display setting"),onClick:()=>t({blockLayout:"list"}),isActive:"list"===r},{icon:qd,title:(0,pt._x)("Grid view","RSS block display setting"),onClick:()=>t({blockLayout:"grid"}),isActive:"grid"===r}],f={...e,style:{...e?.style,border:void 0,spacing:void 0}};return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:b})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({itemsToShow:5,displayAuthor:!1,displayDate:!1,displayExcerpt:!1,excerptLength:55,columns:2,openInNewTab:!1})},dropdownMenuProps:g,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Number of items"),hasValue:()=>5!==d,onDeselect:()=>t({itemsToShow:5}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Number of items"),value:d,onChange:e=>t({itemsToShow:e}),min:1,max:20,required:!0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display author"),hasValue:()=>!!i,onDeselect:()=>t({displayAuthor:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display author"),checked:i,onChange:h("displayAuthor")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display date"),hasValue:()=>!!s,onDeselect:()=>t({displayDate:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display date"),checked:s,onChange:h("displayDate")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Display excerpt"),hasValue:()=>!!l,onDeselect:()=>t({displayExcerpt:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Display excerpt"),checked:l,onChange:h("displayExcerpt")})}),l&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Max number of words in excerpt"),hasValue:()=>55!==c,onDeselect:()=>t({excerptLength:55}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Max number of words in excerpt"),value:c,onChange:e=>t({excerptLength:e}),min:10,max:100,required:!0})}),"grid"===r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Columns"),hasValue:()=>2!==a,onDeselect:()=>t({columns:2}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:a,onChange:e=>t({columns:e}),min:2,max:6,required:!0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Open links in new tab"),hasValue:()=>!!p,onDeselect:()=>t({openInNewTab:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open links in new tab"),checked:p,onChange:e=>t({openInNewTab:e})})})]})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:m||"",onChange:e=>t({rel:e})})}),(0,it.jsx)("div",{..._,children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{block:"core/rss",attributes:f})})})]})}},DC=()=>jt({name:PC,metadata:NC,settings:IC});var MC=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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"})});const zC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/search","title":"Search","category":"widgets","description":"Help visitors find your content.","keywords":["find"],"textdomain":"default","attributes":{"label":{"type":"string","role":"content"},"showLabel":{"type":"boolean","default":true},"placeholder":{"type":"string","default":"","role":"content"},"width":{"type":"number"},"widthUnit":{"type":"string"},"buttonText":{"type":"string","role":"content"},"buttonPosition":{"type":"string","default":"button-outside"},"buttonUseIcon":{"type":"boolean","default":false},"query":{"type":"object","default":{}},"isSearchFieldHidden":{"type":"boolean","default":false}},"supports":{"align":["left","center","right"],"color":{"gradients":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"background":true,"text":true}},"interactivity":true,"typography":{"__experimentalSkipSerialization":true,"__experimentalSelector":".wp-block-search__label, .wp-block-search__input, .wp-block-search__button","fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"color":true,"radius":true,"width":true,"__experimentalSkipSerialization":true,"__experimentalDefaultControls":{"color":true,"radius":true,"width":true}},"spacing":{"margin":true},"html":false},"editorStyle":"wp-block-search-editor","style":"wp-block-search"}');function AC(e){return"%"===e}const LC=[25,50,75,100];var HC=[{name:"default",isDefault:!0,attributes:{buttonText:(0,pt.__)("Search"),label:(0,pt.__)("Search")}}];const{name:RC}=zC,VC={icon:MC,example:{attributes:{buttonText:(0,pt.__)("Search"),label:(0,pt.__)("Search")},viewportWidth:400},variations:HC,edit:function({className:e,attributes:t,setAttributes:o,toggleSelection:n,isSelected:r,clientId:a}){const{label:i,showLabel:s,placeholder:l,width:c,widthUnit:u,align:d,buttonText:p,buttonPosition:m,buttonUseIcon:g,isSearchFieldHidden:h,style:_}=t,x=(0,lt.useSelect)((e=>{const{getBlockParentsByBlockName:t,wasBlockJustInserted:o}=e(ct.store);return!!t(a,"core/navigation")?.length&&o(a)}),[a]),{__unstableMarkNextChangeAsNotPersistent:b}=(0,lt.useDispatch)(ct.store);(0,gt.useEffect)((()=>{x&&(b(),o({showLabel:!1,buttonUseIcon:!0,buttonPosition:"button-inside"}))}),[b,x,o]);const f=_?.border?.radius;let y=(0,ct.__experimentalUseBorderProps)(t);"number"==typeof f&&(y={...y,style:{...y.style,borderRadius:`${f}px`}});const v=(0,ct.__experimentalUseColorProps)(t),[k,w]=(0,ct.useSettings)("typography.fluid","layout"),C=(0,ct.getTypographyClassesAndStyles)(t,{typography:{fluid:k},layout:{wideSize:w?.wideSize}}),j=`wp-block-search__width-${(0,xt.useInstanceId)(mt.__experimentalUnitControl)}`,S="button-inside"===m,B="button-outside"===m,T="no-button"===m,N="button-only"===m,P=(0,gt.useRef)(),I=(0,gt.useRef)(),D=(0,mt.__experimentalUseCustomUnits)({availableUnits:["%","px"],defaultValues:{"%":50,px:350}});(0,gt.useEffect)((()=>{N&&!r&&o({isSearchFieldHidden:!0})}),[N,r,o]),(0,gt.useEffect)((()=>{N&&r&&o({isSearchFieldHidden:!1})}),[N,r,o,c]);const M=[{label:(0,pt.__)("Button outside"),value:"button-outside"},{label:(0,pt.__)("Button inside"),value:"button-inside"},{label:(0,pt.__)("No button"),value:"no-button"},{label:(0,pt.__)("Button only"),value:"button-only"}],z=()=>{const e=Dt("wp-block-search__input",S?void 0:y.className,C.className),t={...S?{borderRadius:y.style?.borderRadius,borderTopLeftRadius:y.style?.borderTopLeftRadius,borderTopRightRadius:y.style?.borderTopRightRadius,borderBottomLeftRadius:y.style?.borderBottomLeftRadius,borderBottomRightRadius:y.style?.borderBottomRightRadius}:y.style,...C.style,textDecoration:void 0};return(0,it.jsx)("input",{type:"search",className:e,style:t,"aria-label":(0,pt.__)("Optional placeholder text"),placeholder:l?void 0:(0,pt.__)("Optional placeholder…"),value:l,onChange:e=>o({placeholder:e.target.value}),ref:P})},A=vt(),L=(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({width:void 0,widthUnit:void 0,showLabel:!0,buttonUseIcon:!1,buttonPosition:"button-outside",isSearchFieldHidden:!1})},dropdownMenuProps:A,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!s,label:(0,pt.__)("Show label"),onDeselect:()=>{o({showLabel:!0})},isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:s,label:(0,pt.__)("Show label"),onChange:e=>o({showLabel:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"button-outside"!==m,label:(0,pt.__)("Button position"),onDeselect:()=>{o({buttonPosition:"button-outside",isSearchFieldHidden:!1})},isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{value:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Button position"),onChange:e=>{o({buttonPosition:e,isSearchFieldHidden:"button-only"===e})},options:M})}),"no-button"!==m&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!g,label:(0,pt.__)("Use button with icon"),onDeselect:()=>{o({buttonUseIcon:!1})},isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:g,label:(0,pt.__)("Use button with icon"),onChange:e=>o({buttonUseIcon:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!c,label:(0,pt.__)("Width"),onDeselect:()=>{o({width:void 0,widthUnit:void 0})},isShownByDefault:!0,children:(0,it.jsxs)(mt.__experimentalVStack,{children:[(0,it.jsx)(mt.__experimentalUnitControl,{__next40pxDefaultSize:!0,label:(0,pt.__)("Width"),id:j,min:AC(u)?0:220,max:AC(u)?100:void 0,step:1,onChange:e=>{const t=""===e?void 0:parseInt(e,10);o({width:t})},onUnitChange:e=>{o({width:"%"===e?50:350,widthUnit:e})},__unstableInputWidth:"80px",value:`${c}${u}`,units:D}),(0,it.jsx)(mt.__experimentalToggleGroupControl,{label:(0,pt.__)("Percentage Width"),value:LC.includes(c)&&"%"===u?c:void 0,hideLabelFromVision:!0,onChange:e=>{o({width:e,widthUnit:"%"})},isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:LC.map((e=>(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:e,label:(0,pt.sprintf)((0,pt.__)("%d%%"),e)},e)))})]})})]})})}),H=e=>(e=>void 0!==e&&0!==parseInt(e,10))(e)?`calc(${e} + 4px)`:void 0,R=(0,ct.useBlockProps)({className:Dt(e,S?"wp-block-search__button-inside":void 0,B?"wp-block-search__button-outside":void 0,T?"wp-block-search__no-button":void 0,N?"wp-block-search__button-only":void 0,g||T?void 0:"wp-block-search__text-button",g&&!T?"wp-block-search__icon-button":void 0,N&&h?"wp-block-search__searchfield-hidden":void 0),style:{...C.style,textDecoration:void 0}}),V=Dt("wp-block-search__label",C.className);return(0,it.jsxs)("div",{...R,children:[L,s&&(0,it.jsx)(ct.RichText,{identifier:"label",className:V,"aria-label":(0,pt.__)("Label text"),placeholder:(0,pt.__)("Add label…"),withoutInteractiveFormatting:!0,value:i,onChange:e=>o({label:e}),style:C.style}),(0,it.jsxs)(mt.ResizableBox,{size:{width:void 0===c?"auto":`${c}${u}`,height:"auto"},className:Dt("wp-block-search__inside-wrapper",S?y.className:void 0),style:(()=>{const e=S?y.style:{borderRadius:y.style?.borderRadius,borderTopLeftRadius:y.style?.borderTopLeftRadius,borderTopRightRadius:y.style?.borderTopRightRadius,borderBottomLeftRadius:y.style?.borderBottomLeftRadius,borderBottomRightRadius:y.style?.borderBottomRightRadius};if(S){if("object"==typeof f){const{borderTopLeftRadius:t,borderTopRightRadius:o,borderBottomLeftRadius:n,borderBottomRightRadius:r}=y.style;return{...e,borderTopLeftRadius:H(t),borderTopRightRadius:H(o),borderBottomLeftRadius:H(n),borderBottomRightRadius:H(r)}}const t=Number.isInteger(f)?`${f}px`:f;e.borderRadius=`calc(${t} + 4px)`}return e})(),minWidth:220,enable:N?{}:{right:"right"!==d,left:"right"===d},onResizeStart:(e,t,r)=>{o({width:parseInt(r.offsetWidth,10),widthUnit:"px"}),n(!1)},onResizeStop:(e,t,r,a)=>{o({width:parseInt(c+a.width,10)}),n(!0)},showHandle:r,children:[(S||B||N)&&(0,it.jsxs)(it.Fragment,{children:[z(),(()=>{const e=Dt("wp-block-search__button",v.className,C.className,S?void 0:y.className,g?"has-icon":void 0,(0,ct.__experimentalGetElementClassName)("button")),t={...v.style,...C.style,...S?{borderRadius:y.style?.borderRadius,borderTopLeftRadius:y.style?.borderTopLeftRadius,borderTopRightRadius:y.style?.borderTopRightRadius,borderBottomLeftRadius:y.style?.borderBottomLeftRadius,borderBottomRightRadius:y.style?.borderBottomRightRadius}:y.style},n=()=>{N&&o({isSearchFieldHidden:!h})};return(0,it.jsxs)(it.Fragment,{children:[g&&(0,it.jsx)("button",{type:"button",className:e,style:t,"aria-label":p?(0,lu.__unstableStripHTML)(p):(0,pt.__)("Search"),onClick:n,ref:I,children:(0,it.jsx)(Fh,{icon:MC})}),!g&&(0,it.jsx)(ct.RichText,{identifier:"buttonText",className:e,style:t,"aria-label":(0,pt.__)("Button text"),placeholder:(0,pt.__)("Add button text…"),withoutInteractiveFormatting:!0,value:p,onChange:e=>o({buttonText:e}),onClick:n})]})})()]}),T&&z()]})]})}},FC=()=>jt({name:RC,metadata:zC,settings:VC});var EC=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M4.5 12.5v4H3V7h1.5v3.987h15V7H21v9.5h-1.5v-4h-15Z"})});const OC=({tagName:e,setAttributes:t})=>(0,it.jsx)(mt.SelectControl,{label:(0,pt.__)("HTML element"),value:e,onChange:e=>t({tagName:e}),options:[{label:(0,pt.__)("Default (<hr>)"),value:"hr"},{label:"<div>",value:"div"}],help:"hr"===e?(0,pt.__)("Only select <hr> if the separator conveys important information and should be announced by screen readers."):(0,pt.__)("The <div> element should only be used if the block is a design element with no semantic meaning."),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0});const GC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/separator","title":"Separator","category":"design","description":"Create a break between ideas or sections with a horizontal separator.","keywords":["horizontal-line","hr","divider"],"textdomain":"default","attributes":{"opacity":{"type":"string","default":"alpha-channel"},"tagName":{"type":"string","enum":["hr","div"],"default":"hr"}},"supports":{"anchor":true,"align":["center","wide","full"],"color":{"enableContrastChecker":false,"__experimentalSkipSerialization":true,"gradients":true,"background":true,"text":false,"__experimentalDefaultControls":{"background":true}},"spacing":{"margin":["top","bottom"]},"interactivity":{"clientNavigation":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"wide","label":"Wide Line"},{"name":"dots","label":"Dots"}],"editorStyle":"wp-block-separator-editor","style":"wp-block-separator"}');var $C={from:[{type:"enter",regExp:/^-{3,}$/,transform:()=>(0,st.createBlock)("core/separator")},{type:"raw",selector:"hr",schema:{hr:{}}}],to:[{type:"block",blocks:["core/spacer"],transform:({anchor:e})=>(0,st.createBlock)("core/spacer",{anchor:e||""})}]};const UC={attributes:{color:{type:"string"},customColor:{type:"string"}},save({attributes:e}){const{color:t,customColor:o}=e,n=(0,ct.getColorClassName)("background-color",t),r=(0,ct.getColorClassName)("color",t),a=Dt({"has-text-color has-background":t||o,[n]:n,[r]:r}),i={backgroundColor:n?void 0:o,color:r?void 0:o};return(0,it.jsx)("hr",{...ct.useBlockProps.save({className:a,style:i})})},migrate(e){const{color:t,customColor:o,...n}=e;return{...n,backgroundColor:t||void 0,opacity:"css",style:o?{color:{background:o}}:void 0,tagName:"hr"}}};var qC=[UC];const{name:WC}=GC,ZC={icon:EC,example:{attributes:{customColor:"#065174",className:"is-style-wide"}},transforms:$C,edit:function({attributes:e,setAttributes:t}){const{backgroundColor:o,opacity:n,style:r,tagName:a}=e,i=(0,ct.__experimentalUseColorProps)(e),s=i?.style?.backgroundColor,l=!!r?.color?.background;!function(e,t,o){const[n,r]=(0,gt.useState)(!1),a=(0,xt.usePrevious)(t);(0,gt.useEffect)((()=>{"css"!==e||t||a||r(!0)}),[t,a,e]),(0,gt.useEffect)((()=>{"css"===e&&(n&&t||a&&t!==a)&&(o({opacity:"alpha-channel"}),r(!1))}),[n,t,a])}(n,s,t);const c=(0,ct.getColorClassName)("color",o),u=Dt({"has-text-color":o||s,[c]:c,"has-css-opacity":"css"===n,"has-alpha-channel-opacity":"alpha-channel"===n},i.className),d={color:s,backgroundColor:s},p="hr"===a?mt.HorizontalRule:a;return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(OC,{tagName:a,setAttributes:t})}),(0,it.jsx)(p,{...(0,ct.useBlockProps)({className:u,style:l?d:void 0})})]})},save:function({attributes:e}){const{backgroundColor:t,style:o,opacity:n,tagName:r}=e,a=o?.color?.background,i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.getColorClassName)("color",t),l=Dt({"has-text-color":t||a,[s]:s,"has-css-opacity":"css"===n,"has-alpha-channel-opacity":"alpha-channel"===n},i.className),c={backgroundColor:i?.style?.backgroundColor,color:s?void 0:a};return(0,it.jsx)(r,{...ct.useBlockProps.save({className:l,style:c})})},deprecated:qC},JC=()=>jt({name:WC,metadata:GC,settings:ZC});var QC=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M16 4.2v1.5h2.5v12.5H16v1.5h4V4.2h-4zM4.2 19.8h4v-1.5H5.8V5.8h2.5V4.2h-4l-.1 15.6zm5.1-3.1l1.4.6 4-10-1.4-.6-4 10z"})});const KC=window.wp.autop;var YC={from:[{type:"shortcode",tag:"[a-z][a-z0-9_-]*",attributes:{text:{type:"string",shortcode:(e,{content:t})=>(0,KC.removep)((0,KC.autop)(t))}},priority:20}]};const XC=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/shortcode","title":"Shortcode","category":"widgets","description":"Insert additional custom elements with a WordPress shortcode.","textdomain":"default","attributes":{"text":{"type":"string","source":"raw","role":"content"}},"supports":{"className":false,"customClassName":false,"html":false},"editorStyle":"wp-block-shortcode-editor"}'),{name:ej}=XC,tj={icon:QC,transforms:YC,edit:function e({attributes:t,setAttributes:o}){const n=`blocks-shortcode-input-${(0,xt.useInstanceId)(e)}`;return(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Placeholder,{icon:QC,label:(0,pt.__)("Shortcode"),children:(0,it.jsx)(ct.PlainText,{className:"blocks-shortcode__textarea",id:n,value:t.text,"aria-label":(0,pt.__)("Shortcode text"),placeholder:(0,pt.__)("Write shortcode here…"),onChange:e=>o({text:e})})})})},save:function({attributes:e}){return(0,it.jsx)(gt.RawHTML,{children:e.text})}},oj=()=>jt({name:ej,metadata:XC,settings:tj});var nj=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm0 1.5c3.4 0 6.2 2.7 6.5 6l-1.2-.6-.8-.4c-.1 0-.2 0-.3-.1H16c-.1-.2-.4-.2-.7 0l-2.9 2.1L9 11.3h-.7L5.5 13v-1.1c0-3.6 2.9-6.5 6.5-6.5Zm0 13c-2.7 0-5-1.7-6-4l2.8-1.7 3.5 1.2h.4s.2 0 .4-.2l2.9-2.1.4.2c.6.3 1.4.7 2.1 1.1-.5 3.1-3.2 5.4-6.4 5.4Z"})});const rj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-logo","title":"Site Logo","category":"theme","description":"Display an image to represent this site. Update this block and the changes apply everywhere.","textdomain":"default","attributes":{"width":{"type":"number"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"},"shouldSyncIcon":{"type":"boolean"}},"example":{"viewportWidth":500,"attributes":{"width":350,"className":"block-editor-block-types-list__site-logo-example"}},"supports":{"html":false,"align":true,"alignWide":false,"color":{"text":false,"background":false},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true},"filter":{"duotone":true}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"rounded","label":"Rounded"}],"selectors":{"filter":{"duotone":".wp-block-site-logo img, .wp-block-site-logo .components-placeholder__illustration, .wp-block-site-logo .components-placeholder::before"}},"editorStyle":"wp-block-site-logo-editor","style":"wp-block-site-logo"}'),aj=["image"],ij="image/*",sj=({alt:e,attributes:{align:t,width:o,height:n,isLink:r,linkTarget:a,shouldSyncIcon:i},isSelected:s,setAttributes:l,setLogo:c,logoUrl:u,siteUrl:d,logoId:p,iconId:m,setIcon:g,canUserEdit:h})=>{const _=(0,xt.useViewportMatch)("medium"),x=!["wide","full"].includes(t)&&_,[{naturalWidth:b,naturalHeight:f},y]=(0,gt.useState)({}),[v,k]=(0,gt.useState)(!1),{toggleSelection:w}=(0,lt.useDispatch)(ct.store),C=vt(),j="contentOnly"===(0,ct.useBlockEditingMode)(),{imageEditing:S,maxWidth:B,title:T}=(0,lt.useSelect)((e=>{const t=e(ct.store).getSettings(),o=e(_t.store).getEntityRecord("root","__unstableBase");return{title:o?.name,imageEditing:t.imageEditing,maxWidth:t.maxWidth}}),[]);(0,gt.useEffect)((()=>{i&&p!==m&&l({shouldSyncIcon:!1})}),[]),(0,gt.useEffect)((()=>{s||k(!1)}),[s]);const N=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("img",{className:"custom-logo",src:u,alt:e,onLoad:e=>{y({naturalWidth:e.target.naturalWidth,naturalHeight:e.target.naturalHeight})}}),(0,ht.isBlobURL)(u)&&(0,it.jsx)(mt.Spinner,{})]});let P=N;if(r&&(P=(0,it.jsx)("a",{href:d,className:"custom-logo-link",rel:"home",title:T,onClick:e=>e.preventDefault(),children:N})),!x||!b||!f)return(0,it.jsx)("div",{style:{width:o,height:n},children:P});const I=o||120,D=b/f,M=I/D,z=b<f?ad:Math.ceil(ad*D),A=f<b?ad:Math.ceil(ad/D),L=2.5*B;let H=!1,R=!1;"center"===t?(H=!0,R=!0):(0,pt.isRTL)()?"left"===t?H=!0:R=!0:"right"===t?R=!0:H=!0;const V=p&&b&&f&&S,F=!j;let E;E=V&&v?(0,it.jsx)(ct.__experimentalImageEditor,{id:p,url:u,width:I,height:M,naturalHeight:f,naturalWidth:b,onSaveImage:e=>{c(e.id)},onFinishEditing:()=>{k(!1)}}):(0,it.jsx)(mt.ResizableBox,{size:{width:I,height:M},showHandle:s&&F,minWidth:z,maxWidth:L,minHeight:A,maxHeight:L/D,lockAspectRatio:!0,enable:{top:!1,right:H,bottom:!0,left:R},onResizeStart:function(){w(!1)},onResizeStop:(e,t,o,n)=>{w(!0),l({width:parseInt(I+n.width,10),height:parseInt(M+n.height,10)})},children:P});const O=!window?.__experimentalUseCustomizerSiteLogoUrl?d+"/wp-admin/options-general.php":d+"/wp-admin/customize.php?autofocus[section]=title_tagline",G=(0,gt.createInterpolateElement)((0,pt.__)("Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>."),{a:(0,it.jsx)("a",{href:O,target:"_blank",rel:"noopener noreferrer"})});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),dropdownMenuProps:C,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!o,label:(0,pt.__)("Image width"),onDeselect:()=>l({width:void 0}),children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Image width"),onChange:e=>l({width:e}),min:z,max:L,initialPosition:Math.min(120,L),value:o||"",disabled:!x})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!r,label:(0,pt.__)("Link image to home"),onDeselect:()=>l({isLink:!0}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link image to home"),onChange:()=>l({isLink:!r}),checked:r})}),r&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>"_blank"===a,label:(0,pt.__)("Open in new tab"),onDeselect:()=>l({linkTarget:"_self"}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>l({linkTarget:e?"_blank":"_self"}),checked:"_blank"===a})}),h&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!i,label:(0,pt.__)("Use as Site Icon"),onDeselect:()=>{l({shouldSyncIcon:!1}),g(void 0)},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Use as Site Icon"),onChange:e=>{l({shouldSyncIcon:e}),g(e?p:void 0)},checked:!!i,help:G})})]})}),V&&!v&&F&&(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>k(!0),icon:Up,label:(0,pt.__)("Crop")})}),E]})};function lj({mediaURL:e,...t}){return(0,it.jsx)(ct.MediaReplaceFlow,{...t,mediaURL:e,allowedTypes:aj,accept:ij})}const cj=({media:e,itemGroupProps:t})=>{const{alt_text:o,source_url:n,slug:r,media_details:a}=e??{},i=a?.sizes?.full?.file||r;return(0,it.jsx)(mt.__experimentalItemGroup,{...t,as:"span",children:(0,it.jsxs)(mt.__experimentalHStack,{justify:"flex-start",as:"span",children:[(0,it.jsx)("img",{src:n,alt:o}),(0,it.jsx)(mt.FlexItem,{as:"span",children:(0,it.jsx)(mt.__experimentalTruncate,{numberOfLines:1,className:"block-library-site-logo__inspector-media-replace-title",children:i})})]})})};var uj={to:[{type:"block",blocks:["core/site-title"],transform:({isLink:e,linkTarget:t})=>(0,st.createBlock)("core/site-title",{isLink:e,linkTarget:t})}]};const{name:dj}=rj,pj={icon:nj,example:{},edit:function({attributes:e,className:t,setAttributes:o,isSelected:n}){const{width:r,shouldSyncIcon:a}=e,{siteLogoId:i,canUserEdit:s,url:l,siteIconId:c,mediaItemData:u,isRequestingMediaItem:d}=(0,lt.useSelect)((e=>{const{canUser:t,getEntityRecord:o,getEditedEntityRecord:n}=e(_t.store),r=t("update",{kind:"root",name:"site"}),a=r?n("root","site"):void 0,i=o("root","__unstableBase"),s=r?a?.site_logo:i?.site_logo,l=a?.site_icon,c=s&&e(_t.store).getEntityRecord("postType","attachment",s,{context:"view"}),u=!!s&&!e(_t.store).hasFinishedResolution("getEntityRecord",["postType","attachment",s,{context:"view"}]);return{siteLogoId:s,canUserEdit:r,url:i?.home,mediaItemData:c,isRequestingMediaItem:u,siteIconId:l}}),[]),{getSettings:p}=(0,lt.useSelect)(ct.store),[m,g]=(0,gt.useState)(),h=vt(),{editEntityRecord:_}=(0,lt.useDispatch)(_t.store),x=(e,t=!1)=>{(a||t)&&b(e),_("root","site",void 0,{site_logo:e})},b=e=>_("root","site",void 0,{site_icon:e??null}),{alt_text:f,source_url:y}=u??{},v=e=>{if(void 0===a){const t=!c;return o({shouldSyncIcon:t}),void k(e,t)}k(e)},k=(e,t=!1)=>{if(e)return!e.id&&e.url?(g(e.url),void x(void 0)):void x(e.id,t)},{createErrorNotice:w}=(0,lt.useDispatch)(bo.store),C=e=>{w(e,{type:"snackbar"}),g()},j=e=>{p().mediaUpload({allowedTypes:aj,filesList:e,onFileChange([e]){(0,ht.isBlobURL)(e?.url)?g(e.url):v(e)},onError:C,multiple:!1})},S={mediaURL:y,name:y?(0,pt.__)("Replace"):(0,pt.__)("Choose logo"),onSelect:k,onError:C,onReset:()=>{x(null),o({width:void 0})}},B=s&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(lj,{...S})});let T;const N=void 0===i||d;N&&(T=(0,it.jsx)(mt.Spinner,{})),(0,gt.useEffect)((()=>{y&&m&&g()}),[y,m]),(y||m)&&(T=(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(sj,{alt:f,attributes:e,className:t,isSelected:n,setAttributes:o,logoUrl:m||y,setLogo:x,logoId:u?.id||i,siteUrl:l,setIcon:b,iconId:c,canUserEdit:s}),s&&(0,it.jsx)(mt.DropZone,{onFilesDrop:j})]}));const P=Dt(t,{"is-default-size":!r,"is-transient":m}),I=(0,ct.useBlockProps)({className:P}),D=(s||y)&&(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Media"),dropdownMenuProps:h,children:s?(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!y,label:(0,pt.__)("Logo"),isShownByDefault:!0,children:(0,it.jsxs)("div",{className:"block-library-site-logo__inspector-media-replace-container",children:[(0,it.jsx)(lj,{...S,name:y?(0,it.jsx)(cj,{media:u}):(0,pt.__)("Choose logo"),renderToggle:e=>(0,it.jsx)(mt.Button,{...e,__next40pxDefaultSize:!0,children:m?(0,it.jsx)(mt.Spinner,{}):e.children})}),(0,it.jsx)(mt.DropZone,{onFilesDrop:j})]})}):(0,it.jsx)("div",{className:"block-library-site-logo__inspector-media-replace-container",style:{gridColumn:"1 / -1"},children:(0,it.jsx)(cj,{media:u,itemGroupProps:{isBordered:!0,className:"block-library-site-logo__inspector-readonly-logo-preview"}})})})});return(0,it.jsxs)("div",{...I,children:[B,D,(!!y||!!m)&&T,(N||!m&&!y&&!s)&&(0,it.jsx)(mt.Placeholder,{className:"site-logo_placeholder",withIllustration:!0,children:N&&(0,it.jsx)("span",{className:"components-placeholder__preview",children:(0,it.jsx)(mt.Spinner,{})})}),!N&&!m&&!y&&s&&(0,it.jsx)(ct.MediaPlaceholder,{onSelect:v,accept:ij,allowedTypes:aj,onError:C,placeholder:e=>{const o=Dt("block-editor-media-placeholder",t);return(0,it.jsx)(mt.Placeholder,{className:o,preview:T,withIllustration:!0,style:{width:r},children:e})},mediaLibraryButton:({open:e})=>(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,icon:Wp,variant:"primary",label:(0,pt.__)("Choose logo"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{e()}})})]})},transforms:uj},mj=()=>jt({name:dj,metadata:rj,settings:pj}),gj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-tagline","title":"Site Tagline","category":"theme","description":"Describe in a few words what this site is about. This is important for search results, sharing on social media, and gives overall clarity to visitors.","keywords":["description"],"textdomain":"default","attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]}},"example":{"viewportWidth":350,"attributes":{"textAlign":"center"}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"contentRole":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-tagline-editor","style":"wp-block-site-tagline"}');var hj=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:(0,it.jsx)(mt.Path,{d:"M4 10.5h16V9H4v1.5ZM4 15h9v-1.5H4V15Z"})});const _j={attributes:{textAlign:{type:"string"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var xj=[_j];const{name:bj}=gj,fj={icon:hj,edit:function({attributes:e,setAttributes:t,insertBlocksAfter:o}){const{textAlign:n,level:r,levelOptions:a}=e,{canUserEdit:i,tagline:s}=(0,lt.useSelect)((e=>{const{canUser:t,getEntityRecord:o,getEditedEntityRecord:n}=e(_t.store),r=t("update",{kind:"root",name:"site"}),a=r?n("root","site"):{},i=o("root","__unstableBase");return{canUserEdit:r,tagline:r?a?.description:i?.description}}),[]),l=0===r?"p":`h${r}`,{editEntityRecord:c}=(0,lt.useDispatch)(_t.store),u=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${n}`]:n,"wp-block-site-tagline__placeholder":!i&&!s})}),d=i?(0,it.jsx)(ct.RichText,{allowedFormats:[],onChange:function(e){c("root","site",void 0,{description:e})},"aria-label":(0,pt.__)("Site tagline text"),placeholder:(0,pt.__)("Write site tagline…"),tagName:l,value:s,disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,st.createBlock)((0,st.getDefaultBlockName)())),...u}):(0,it.jsx)(l,{...u,children:s||(0,pt.__)("Site Tagline placeholder")});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:r,options:a,onChange:e=>t({level:e})}),(0,it.jsx)(ct.AlignmentControl,{onChange:e=>t({textAlign:e}),value:n})]}),d]})},deprecated:xj},yj=()=>jt({name:bj,metadata:gj,settings:fj});var vj=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M12 9c-.8 0-1.5.7-1.5 1.5S11.2 12 12 12s1.5-.7 1.5-1.5S12.8 9 12 9zm0-5c-3.6 0-6.5 2.8-6.5 6.2 0 .8.3 1.8.9 3.1.5 1.1 1.2 2.3 2 3.6.7 1 3 3.8 3.2 3.9l.4.5.4-.5c.2-.2 2.6-2.9 3.2-3.9.8-1.2 1.5-2.5 2-3.6.6-1.3.9-2.3.9-3.1C18.5 6.8 15.6 4 12 4zm4.3 8.7c-.5 1-1.1 2.2-1.9 3.4-.5.7-1.7 2.2-2.4 3-.7-.8-1.9-2.3-2.4-3-.8-1.2-1.4-2.3-1.9-3.3-.6-1.4-.7-2.2-.7-2.5 0-2.6 2.2-4.7 5-4.7s5 2.1 5 4.7c0 .2-.1 1-.7 2.4z"})});const kj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/site-title","title":"Site Title","category":"theme","description":"Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.","textdomain":"default","attributes":{"level":{"type":"number","default":1},"levelOptions":{"type":"array","default":[0,1,2,3,4,5,6]},"textAlign":{"type":"string"},"isLink":{"type":"boolean","default":true,"role":"content"},"linkTarget":{"type":"string","default":"_self","role":"content"}},"example":{"viewportWidth":500},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"editorStyle":"wp-block-site-title-editor","style":"wp-block-site-title"}');const wj={attributes:{level:{type:"number",default:1},textAlign:{type:"string"},isLink:{type:"boolean",default:!0},linkTarget:{type:"string",default:"_self"}},supports:{align:["wide","full"],html:!1,color:{gradients:!0,link:!0},spacing:{padding:!0,margin:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0}},save:()=>null,migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var Cj=[wj];var jj={to:[{type:"block",blocks:["core/site-logo"],transform:({isLink:e,linkTarget:t})=>(0,st.createBlock)("core/site-logo",{isLink:e,linkTarget:t})}]};const{name:Sj}=kj,Bj={icon:vj,example:{viewportWidth:350,attributes:{textAlign:"center"}},edit:function({attributes:e,setAttributes:t,insertBlocksAfter:o}){const{level:n,levelOptions:r,textAlign:a,isLink:i,linkTarget:s}=e,{canUserEdit:l,title:c}=(0,lt.useSelect)((e=>{const{canUser:t,getEntityRecord:o,getEditedEntityRecord:n}=e(_t.store),r=t("update",{kind:"root",name:"site"}),a=r?n("root","site"):{},i=o("root","__unstableBase");return{canUserEdit:r,title:r?a?.title:i?.name}}),[]),{editEntityRecord:u}=(0,lt.useDispatch)(_t.store),d=vt(),p=(0,ct.useBlockEditingMode)(),m=0===n?"p":`h${n}`,g=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${a}`]:a,"wp-block-site-title__placeholder":!l&&!c})}),h=l?(0,it.jsx)(m,{...g,children:(0,it.jsx)(ct.RichText,{tagName:i?"a":"span",href:i?"#site-title-pseudo-link":void 0,"aria-label":(0,pt.__)("Site title text"),placeholder:(0,pt.__)("Write site title…"),value:c,onChange:function(e){u("root","site",void 0,{title:e.trim()})},allowedFormats:[],disableLineBreaks:!0,__unstableOnSplitAtEnd:()=>o((0,st.createBlock)((0,st.getDefaultBlockName)()))})}):(0,it.jsx)(m,{...g,children:i?(0,it.jsx)("a",{href:"#site-title-pseudo-link",onClick:e=>e.preventDefault(),children:(0,ao.decodeEntities)(c)||(0,pt.__)("Site Title placeholder")}):(0,it.jsx)("span",{children:(0,ao.decodeEntities)(c)||(0,pt.__)("Site Title placeholder")})});return(0,it.jsxs)(it.Fragment,{children:["default"===p&&(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:n,options:r,onChange:e=>t({level:e})}),(0,it.jsx)(ct.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({isLink:!0,linkTarget:"_self"})},dropdownMenuProps:d,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!i,label:(0,pt.__)("Make title link to home"),onDeselect:()=>t({isLink:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make title link to home"),onChange:()=>t({isLink:!i}),checked:i})}),i&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"_self"!==s,label:(0,pt.__)("Open in new tab"),onDeselect:()=>t({linkTarget:"_self"}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open in new tab"),onChange:e=>t({linkTarget:e?"_blank":"_self"}),checked:"_blank"===s})})]})}),h]})},transforms:jj,deprecated:Cj},Tj=()=>jt({name:Sj,metadata:kj,settings:Bj});var Nj=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M9 11.8l6.1-4.5c.1.4.4.7.9.7h2c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1h-2c-.6 0-1 .4-1 1v.4l-6.4 4.8c-.2-.1-.4-.2-.6-.2H6c-.6 0-1 .4-1 1v2c0 .6.4 1 1 1h2c.2 0 .4-.1.6-.2l6.4 4.8v.4c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-2c0-.6-.4-1-1-1h-2c-.5 0-.8.3-.9.7L9 12.2v-.4z"})}),Pj=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})});const Ij=()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"})});const Dj=({url:e,setAttributes:t,setPopover:o,popoverAnchor:n,clientId:r})=>{const{removeBlock:a}=(0,lt.useDispatch)(ct.store);return(0,it.jsx)(ct.URLPopover,{anchor:n,"aria-label":(0,pt.__)("Edit social link"),onClose:()=>{o(!1),n?.focus()},children:(0,it.jsx)("form",{className:"block-editor-url-popover__link-editor",onSubmit:e=>{e.preventDefault(),o(!1),n?.focus()},children:(0,it.jsx)("div",{className:"block-editor-url-input",children:(0,it.jsx)(ct.URLInput,{value:e,onChange:e=>t({url:e}),placeholder:(0,pt.__)("Enter social link"),label:(0,pt.__)("Enter social link"),hideLabelFromVision:!0,disableSuggestions:!0,onKeyDown:t=>{e||t.defaultPrevented||![mn.BACKSPACE,mn.DELETE].includes(t.keyCode)||a(r)},suffix:(0,it.jsx)(mt.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,it.jsx)(mt.Button,{icon:Pj,label:(0,pt.__)("Apply"),type:"submit",size:"small"})})})})})})};var Mj=({attributes:e,context:t,isSelected:o,setAttributes:n,clientId:r,name:a})=>{const{url:i,service:s,label:l="",rel:c}=e,u=vt(),{showLabels:d,iconColor:p,iconColorValue:m,iconBackgroundColor:g,iconBackgroundColorValue:h}=t,[_,x]=(0,gt.useState)(!1),b=Dt("wp-social-link","wp-block-social-link","wp-social-link-"+s,{"wp-social-link__is-incomplete":!i,[`has-${p}-color`]:p,[`has-${g}-background-color`]:g}),[f,y]=(0,gt.useState)(null),v="contentOnly"===(0,ct.useBlockEditingMode)(),{activeVariation:k}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:o}=t(st.store);return{activeVariation:o(a,e)}}),[a,e]),{icon:w,label:C}=(j=k,j?.name?{icon:j?.icon??Ij,label:j?.title??(0,pt.__)("Social Icon")}:{icon:Ij,label:(0,pt.__)("Social Icon")});var j;const S=""===l.trim()?C:l,B=(0,gt.useRef)(),T=(0,ct.useBlockProps)({className:"wp-block-social-link-anchor",ref:(0,xt.useMergeRefs)([y,B]),onClick:()=>x(!0),onKeyDown:e=>{e.keyCode===mn.ENTER&&(e.preventDefault(),x(!0))}});return(0,it.jsxs)(it.Fragment,{children:[v&&d&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarButton,{onClick:t,"aria-haspopup":"true","aria-expanded":e,children:(0,pt.__)("Text")}),renderContent:()=>(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"wp-block-social-link__toolbar_content_text",label:(0,pt.__)("Text"),help:(0,pt.__)("Provide a text label or use the default."),value:l,onChange:e=>n({label:e}),placeholder:C})})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({label:void 0})},dropdownMenuProps:u,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Text"),hasValue:()=>!!l,onDeselect:()=>{n({label:void 0})},children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Text"),help:(0,pt.__)("The text is visible when enabled from the parent Social Icons block."),value:l,onChange:e=>n({label:e}),placeholder:C})})})}),(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Link relation"),help:(0,gt.createInterpolateElement)((0,pt.__)("The <a>Link Relation</a> attribute defines the relationship between a linked resource and the current document."),{a:(0,it.jsx)(mt.ExternalLink,{href:"https://developer.mozilla.org/docs/Web/HTML/Attributes/rel"})}),value:c||"",onChange:e=>n({rel:e})})}),(0,it.jsxs)("li",{role:"presentation",className:b,style:{color:m,backgroundColor:h},children:[(0,it.jsxs)("button",{"aria-haspopup":"dialog",...T,role:"button",children:[(0,it.jsx)(mt.Icon,{icon:w}),(0,it.jsx)("span",{className:Dt("wp-block-social-link-label",{"screen-reader-text":!d}),children:S})]}),o&&_&&(0,it.jsx)(Dj,{url:i,setAttributes:n,setPopover:x,popoverAnchor:f,clientId:r})]})]})};const zj=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-link","title":"Social Icon","category":"widgets","parent":["core/social-links"],"description":"Display an icon linking to a social profile or site.","textdomain":"default","attributes":{"url":{"type":"string","role":"content"},"service":{"type":"string"},"label":{"type":"string","role":"content"},"rel":{"type":"string"}},"usesContext":["openInNewTab","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue"],"supports":{"reusable":false,"html":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-social-link-editor"}'),Aj=[{isDefault:!0,name:"wordpress",attributes:{service:"wordpress"},title:(0,pt._x)("WordPress","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M12.158,12.786L9.46,20.625c0.806,0.237,1.657,0.366,2.54,0.366c1.047,0,2.051-0.181,2.986-0.51 c-0.024-0.038-0.046-0.079-0.065-0.124L12.158,12.786z M3.009,12c0,3.559,2.068,6.634,5.067,8.092L3.788,8.341 C3.289,9.459,3.009,10.696,3.009,12z M18.069,11.546c0-1.112-0.399-1.881-0.741-2.48c-0.456-0.741-0.883-1.368-0.883-2.109 c0-0.826,0.627-1.596,1.51-1.596c0.04,0,0.078,0.005,0.116,0.007C16.472,3.904,14.34,3.009,12,3.009 c-3.141,0-5.904,1.612-7.512,4.052c0.211,0.007,0.41,0.011,0.579,0.011c0.94,0,2.396-0.114,2.396-0.114 C7.947,6.93,8.004,7.642,7.52,7.699c0,0-0.487,0.057-1.029,0.085l3.274,9.739l1.968-5.901l-1.401-3.838 C9.848,7.756,9.389,7.699,9.389,7.699C8.904,7.67,8.961,6.93,9.446,6.958c0,0,1.484,0.114,2.368,0.114 c0.94,0,2.397-0.114,2.397-0.114c0.485-0.028,0.542,0.684,0.057,0.741c0,0-0.488,0.057-1.029,0.085l3.249,9.665l0.897-2.996 C17.841,13.284,18.069,12.316,18.069,11.546z M19.889,7.686c0.039,0.286,0.06,0.593,0.06,0.924c0,0.912-0.171,1.938-0.684,3.22 l-2.746,7.94c2.673-1.558,4.47-4.454,4.47-7.771C20.991,10.436,20.591,8.967,19.889,7.686z M12,22C6.486,22,2,17.514,2,12 C2,6.486,6.486,2,12,2c5.514,0,10,4.486,10,10C22,17.514,17.514,22,12,22z"})})},{name:"fivehundredpx",attributes:{service:"fivehundredpx"},title:(0,pt._x)("500px","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"})})},{name:"amazon",attributes:{service:"amazon"},title:(0,pt._x)("Amazon","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M13.582,8.182C11.934,8.367,9.78,8.49,8.238,9.166c-1.781,0.769-3.03,2.337-3.03,4.644 c0,2.953,1.86,4.429,4.253,4.429c2.02,0,3.125-0.477,4.685-2.065c0.516,0.747,0.685,1.109,1.629,1.894 c0.212,0.114,0.483,0.103,0.672-0.066l0.006,0.006c0.567-0.505,1.599-1.401,2.18-1.888c0.231-0.188,0.19-0.496,0.009-0.754 c-0.52-0.718-1.072-1.303-1.072-2.634V8.305c0-1.876,0.133-3.599-1.249-4.891C15.23,2.369,13.422,2,12.04,2 C9.336,2,6.318,3.01,5.686,6.351C5.618,6.706,5.877,6.893,6.109,6.945l2.754,0.298C9.121,7.23,9.308,6.977,9.357,6.72 c0.236-1.151,1.2-1.706,2.284-1.706c0.584,0,1.249,0.215,1.595,0.738c0.398,0.584,0.346,1.384,0.346,2.061V8.182z M13.049,14.088 c-0.451,0.8-1.169,1.291-1.967,1.291c-1.09,0-1.728-0.83-1.728-2.061c0-2.42,2.171-2.86,4.227-2.86v0.615 C13.582,12.181,13.608,13.104,13.049,14.088z M20.683,19.339C18.329,21.076,14.917,22,11.979,22c-4.118,0-7.826-1.522-10.632-4.057 c-0.22-0.199-0.024-0.471,0.241-0.317c3.027,1.762,6.771,2.823,10.639,2.823c2.608,0,5.476-0.541,8.115-1.66 C20.739,18.62,21.072,19.051,20.683,19.339z M21.336,21.043c-0.194,0.163-0.379,0.076-0.293-0.139 c0.284-0.71,0.92-2.298,0.619-2.684c-0.301-0.386-1.99-0.183-2.749-0.092c-0.23,0.027-0.266-0.173-0.059-0.319 c1.348-0.946,3.555-0.673,3.811-0.356C22.925,17.773,22.599,19.986,21.336,21.043z"})})},{name:"bandcamp",attributes:{service:"bandcamp"},title:(0,pt._x)("Bandcamp","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M15.27 17.289 3 17.289 8.73 6.711 21 6.711 15.27 17.289"})})},{name:"behance",attributes:{service:"behance"},title:(0,pt._x)("Behance","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"})})},{name:"bluesky",attributes:{service:"bluesky"},title:(0,pt._x)("Bluesky","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M6.3,4.2c2.3,1.7,4.8,5.3,5.7,7.2.9-1.9,3.4-5.4,5.7-7.2,1.7-1.3,4.3-2.2,4.3.9s-.4,5.2-.6,5.9c-.7,2.6-3.3,3.2-5.6,2.8,4,.7,5.1,3,2.9,5.3-5,5.2-6.7-2.8-6.7-2.8,0,0-1.7,8-6.7,2.8-2.2-2.3-1.2-4.6,2.9-5.3-2.3.4-4.9-.3-5.6-2.8-.2-.7-.6-5.3-.6-5.9,0-3.1,2.7-2.1,4.3-.9h0Z"})})},{name:"chain",attributes:{service:"chain"},title:(0,pt._x)("Link","social link block variation name"),icon:Ij},{name:"codepen",attributes:{service:"codepen"},title:(0,pt._x)("CodePen","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22.016,8.84c-0.002-0.013-0.005-0.025-0.007-0.037c-0.005-0.025-0.008-0.048-0.015-0.072 c-0.003-0.015-0.01-0.028-0.013-0.042c-0.008-0.02-0.015-0.04-0.023-0.062c-0.007-0.015-0.013-0.028-0.02-0.042 c-0.008-0.02-0.018-0.037-0.03-0.057c-0.007-0.013-0.017-0.027-0.025-0.038c-0.012-0.018-0.023-0.035-0.035-0.052 c-0.01-0.013-0.02-0.025-0.03-0.037c-0.015-0.017-0.028-0.032-0.043-0.045c-0.01-0.012-0.022-0.023-0.035-0.035 c-0.015-0.015-0.032-0.028-0.048-0.04c-0.012-0.01-0.025-0.02-0.037-0.03c-0.005-0.003-0.01-0.008-0.015-0.012l-9.161-6.096 c-0.289-0.192-0.666-0.192-0.955,0L2.359,8.237C2.354,8.24,2.349,8.245,2.344,8.249L2.306,8.277 c-0.017,0.013-0.033,0.027-0.048,0.04C2.246,8.331,2.234,8.342,2.222,8.352c-0.015,0.015-0.028,0.03-0.042,0.047 c-0.012,0.013-0.022,0.023-0.03,0.037C2.139,8.453,2.125,8.471,2.115,8.488C2.107,8.501,2.099,8.514,2.09,8.526 C2.079,8.548,2.069,8.565,2.06,8.585C2.054,8.6,2.047,8.613,2.04,8.626C2.032,8.648,2.025,8.67,2.019,8.69 c-0.005,0.013-0.01,0.027-0.013,0.042C1.999,8.755,1.995,8.778,1.99,8.803C1.989,8.817,1.985,8.828,1.984,8.84 C1.978,8.879,1.975,8.915,1.975,8.954v6.093c0,0.037,0.003,0.075,0.008,0.112c0.002,0.012,0.005,0.025,0.007,0.038 c0.005,0.023,0.008,0.047,0.015,0.072c0.003,0.015,0.008,0.028,0.013,0.04c0.007,0.022,0.013,0.042,0.022,0.063 c0.007,0.015,0.013,0.028,0.02,0.04c0.008,0.02,0.018,0.038,0.03,0.058c0.007,0.013,0.015,0.027,0.025,0.038 c0.012,0.018,0.023,0.035,0.035,0.052c0.01,0.013,0.02,0.025,0.03,0.037c0.013,0.015,0.028,0.032,0.042,0.045 c0.012,0.012,0.023,0.023,0.035,0.035c0.015,0.013,0.032,0.028,0.048,0.04l0.038,0.03c0.005,0.003,0.01,0.007,0.013,0.01 l9.163,6.095C11.668,21.953,11.833,22,12,22c0.167,0,0.332-0.047,0.478-0.144l9.163-6.095l0.015-0.01 c0.013-0.01,0.027-0.02,0.037-0.03c0.018-0.013,0.035-0.028,0.048-0.04c0.013-0.012,0.025-0.023,0.035-0.035 c0.017-0.015,0.03-0.032,0.043-0.045c0.01-0.013,0.02-0.025,0.03-0.037c0.013-0.018,0.025-0.035,0.035-0.052 c0.008-0.013,0.018-0.027,0.025-0.038c0.012-0.02,0.022-0.038,0.03-0.058c0.007-0.013,0.013-0.027,0.02-0.04 c0.008-0.022,0.015-0.042,0.023-0.063c0.003-0.013,0.01-0.027,0.013-0.04c0.007-0.025,0.01-0.048,0.015-0.072 c0.002-0.013,0.005-0.027,0.007-0.037c0.003-0.042,0.007-0.079,0.007-0.117V8.954C22.025,8.915,22.022,8.879,22.016,8.84z M12.862,4.464l6.751,4.49l-3.016,2.013l-3.735-2.492V4.464z M11.138,4.464v4.009l-3.735,2.494L4.389,8.954L11.138,4.464z M3.699,10.562L5.853,12l-2.155,1.438V10.562z M11.138,19.536l-6.749-4.491l3.015-2.011l3.735,2.492V19.536z M12,14.035L8.953,12 L12,9.966L15.047,12L12,14.035z M12.862,19.536v-4.009l3.735-2.492l3.016,2.011L12.862,19.536z M20.303,13.438L18.147,12 l2.156-1.438L20.303,13.438z"})})},{name:"deviantart",attributes:{service:"deviantart"},title:(0,pt._x)("DeviantArt","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M 18.19 5.636 18.19 2 18.188 2 14.553 2 14.19 2.366 12.474 5.636 11.935 6 5.81 6 5.81 10.994 9.177 10.994 9.477 11.357 5.81 18.363 5.81 22 5.811 22 9.447 22 9.81 21.634 11.526 18.364 12.065 18 18.19 18 18.19 13.006 14.823 13.006 14.523 12.641 18.19 5.636z"})})},{name:"discord",attributes:{service:"discord"},title:(0,pt._x)("Discord","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M20.317 4.369A19.88 19.88 0 0 0 15.894 3a14.145 14.145 0 0 0-.719 1.518 19.205 19.205 0 0 0-5.351 0A14.183 14.183 0 0 0 9.104 3 19.896 19.896 0 0 0 4.682 4.369a18.921 18.921 0 0 0-3.012 12.52 19.929 19.929 0 0 0 6.081 3.097c.487-.65.922-1.339 1.3-2.061a12.445 12.445 0 0 1-1.958-.896c.165-.12.326-.246.483-.374a12.445 12.445 0 0 0 8.946 0c.157.128.318.253.483.374-.627.371-1.281.683-1.958.896.379.722.813 1.41 1.3 2.061a19.94 19.94 0 0 0 6.081-3.097 18.921 18.921 0 0 0-3.012-12.52ZM8.12 15.233c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Zm7.757 0c-1.202 0-2.184-1.09-2.184-2.431 0-1.34.97-2.431 2.184-2.431 1.213 0 2.202 1.09 2.184 2.431 0 1.341-.97 2.431-2.184 2.431Z"})})},{name:"dribbble",attributes:{service:"dribbble"},title:(0,pt._x)("Dribbble","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,22C6.486,22,2,17.514,2,12S6.486,2,12,2c5.514,0,10,4.486,10,10S17.514,22,12,22z M20.434,13.369 c-0.292-0.092-2.644-0.794-5.32-0.365c1.117,3.07,1.572,5.57,1.659,6.09C18.689,17.798,20.053,15.745,20.434,13.369z M15.336,19.876c-0.127-0.749-0.623-3.361-1.822-6.477c-0.019,0.006-0.038,0.013-0.056,0.019c-4.818,1.679-6.547,5.02-6.701,5.334 c1.448,1.129,3.268,1.803,5.243,1.803C13.183,20.555,14.311,20.313,15.336,19.876z M5.654,17.724 c0.193-0.331,2.538-4.213,6.943-5.637c0.111-0.036,0.224-0.07,0.337-0.102c-0.214-0.485-0.448-0.971-0.692-1.45 c-4.266,1.277-8.405,1.223-8.778,1.216c-0.003,0.087-0.004,0.174-0.004,0.261C3.458,14.207,4.29,16.21,5.654,17.724z M3.639,10.264 c0.382,0.005,3.901,0.02,7.897-1.041c-1.415-2.516-2.942-4.631-3.167-4.94C5.979,5.41,4.193,7.613,3.639,10.264z M9.998,3.709 c0.236,0.316,1.787,2.429,3.187,5c3.037-1.138,4.323-2.867,4.477-3.085C16.154,4.286,14.17,3.471,12,3.471 C11.311,3.471,10.641,3.554,9.998,3.709z M18.612,6.612C18.432,6.855,17,8.69,13.842,9.979c0.199,0.407,0.389,0.821,0.567,1.237 c0.063,0.148,0.124,0.295,0.184,0.441c2.842-0.357,5.666,0.215,5.948,0.275C20.522,9.916,19.801,8.065,18.612,6.612z"})})},{name:"dropbox",attributes:{service:"dropbox"},title:(0,pt._x)("Dropbox","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,6.134L6.069,9.797L2,6.54l5.883-3.843L12,6.134z M2,13.054l5.883,3.843L12,13.459L6.069,9.797L2,13.054z M12,13.459 l4.116,3.439L22,13.054l-4.069-3.257L12,13.459z M22,6.54l-5.884-3.843L12,6.134l5.931,3.663L22,6.54z M12.011,14.2l-4.129,3.426 l-1.767-1.153v1.291l5.896,3.539l5.897-3.539v-1.291l-1.769,1.153L12.011,14.2z"})})},{name:"etsy",attributes:{service:"etsy"},title:(0,pt._x)("Etsy","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M9.16033,4.038c0-.27174.02717-.43478.48913-.43478h6.22283c1.087,0,1.68478.92391,2.11957,2.663l.35326,1.38587h1.05978C19.59511,3.712,19.75815,2,19.75815,2s-2.663.29891-4.23913.29891h-7.962L3.29076,2.163v1.1413L4.731,3.57609c1.00543.19022,1.25.40761,1.33152,1.33152,0,0,.08152,2.71739.08152,7.20109s-.08152,7.17391-.08152,7.17391c0,.81522-.32609,1.11413-1.33152,1.30435l-1.44022.27174V22l4.2663-.13587h7.11957c1.60326,0,5.32609.13587,5.32609.13587.08152-.97826.625-5.40761.70652-5.89674H19.7038L18.644,18.52174c-.84239,1.90217-2.06522,2.038-3.42391,2.038H11.1712c-1.3587,0-2.01087-.54348-2.01087-1.712V12.65217s3.0163,0,3.99457.08152c.76087.05435,1.22283.27174,1.46739,1.33152l.32609,1.413h1.16848l-.08152-3.55978.163-3.587H15.02989l-.38043,1.57609c-.24457,1.03261-.40761,1.22283-1.46739,1.33152-1.38587.13587-4.02174.1087-4.02174.1087Z"})})},{name:"facebook",attributes:{service:"facebook"},title:(0,pt._x)("Facebook","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12 2C6.5 2 2 6.5 2 12c0 5 3.7 9.1 8.4 9.9v-7H7.9V12h2.5V9.8c0-2.5 1.5-3.9 3.8-3.9 1.1 0 2.2.2 2.2.2v2.5h-1.3c-1.2 0-1.6.8-1.6 1.6V12h2.8l-.4 2.9h-2.3v7C18.3 21.1 22 17 22 12c0-5.5-4.5-10-10-10z"})})},{name:"feed",attributes:{service:"feed"},title:(0,pt._x)("RSS Feed","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M2,8.667V12c5.515,0,10,4.485,10,10h3.333C15.333,14.637,9.363,8.667,2,8.667z M2,2v3.333 c9.19,0,16.667,7.477,16.667,16.667H22C22,10.955,13.045,2,2,2z M4.5,17C3.118,17,2,18.12,2,19.5S3.118,22,4.5,22S7,20.88,7,19.5 S5.882,17,4.5,17z"})})},{name:"flickr",attributes:{service:"flickr"},title:(0,pt._x)("Flickr","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M6.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5S9.25,7,6.5,7z M17.5,7c-2.75,0-5,2.25-5,5s2.25,5,5,5s5-2.25,5-5 S20.25,7,17.5,7z"})})},{name:"foursquare",attributes:{service:"foursquare"},title:(0,pt._x)("Foursquare","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M17.573,2c0,0-9.197,0-10.668,0S5,3.107,5,3.805s0,16.948,0,16.948c0,0.785,0.422,1.077,0.66,1.172 c0.238,0.097,0.892,0.177,1.285-0.275c0,0,5.035-5.843,5.122-5.93c0.132-0.132,0.132-0.132,0.262-0.132h3.26 c1.368,0,1.588-0.977,1.732-1.552c0.078-0.318,0.692-3.428,1.225-6.122l0.675-3.368C19.56,2.893,19.14,2,17.573,2z M16.495,7.22 c-0.053,0.252-0.372,0.518-0.665,0.518c-0.293,0-4.157,0-4.157,0c-0.467,0-0.802,0.318-0.802,0.787v0.508 c0,0.467,0.337,0.798,0.805,0.798c0,0,3.197,0,3.528,0s0.655,0.362,0.583,0.715c-0.072,0.353-0.407,2.102-0.448,2.295 c-0.04,0.193-0.262,0.523-0.655,0.523c-0.33,0-2.88,0-2.88,0c-0.523,0-0.683,0.068-1.033,0.503 c-0.35,0.437-3.505,4.223-3.505,4.223c-0.032,0.035-0.063,0.027-0.063-0.015V4.852c0-0.298,0.26-0.648,0.648-0.648 c0,0,8.228,0,8.562,0c0.315,0,0.61,0.297,0.528,0.683L16.495,7.22z"})})},{name:"goodreads",attributes:{service:"goodreads"},title:(0,pt._x)("Goodreads","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M17.3,17.5c-0.2,0.8-0.5,1.4-1,1.9c-0.4,0.5-1,0.9-1.7,1.2C13.9,20.9,13.1,21,12,21c-0.6,0-1.3-0.1-1.9-0.2 c-0.6-0.1-1.1-0.4-1.6-0.7c-0.5-0.3-0.9-0.7-1.2-1.2c-0.3-0.5-0.5-1.1-0.5-1.7h1.5c0.1,0.5,0.2,0.9,0.5,1.2 c0.2,0.3,0.5,0.6,0.9,0.8c0.3,0.2,0.7,0.3,1.1,0.4c0.4,0.1,0.8,0.1,1.2,0.1c1.4,0,2.5-0.4,3.1-1.2c0.6-0.8,1-2,1-3.5v-1.7h0 c-0.4,0.8-0.9,1.4-1.6,1.9c-0.7,0.5-1.5,0.7-2.4,0.7c-1,0-1.9-0.2-2.6-0.5C8.7,15,8.1,14.5,7.7,14c-0.5-0.6-0.8-1.3-1-2.1 c-0.2-0.8-0.3-1.6-0.3-2.5c0-0.9,0.1-1.7,0.4-2.5c0.3-0.8,0.6-1.5,1.1-2c0.5-0.6,1.1-1,1.8-1.4C10.3,3.2,11.1,3,12,3 c0.5,0,0.9,0.1,1.3,0.2c0.4,0.1,0.8,0.3,1.1,0.5c0.3,0.2,0.6,0.5,0.9,0.8c0.3,0.3,0.5,0.6,0.6,1h0V3.4h1.5V15 C17.6,15.9,17.5,16.7,17.3,17.5z M13.8,14.1c0.5-0.3,0.9-0.7,1.3-1.1c0.3-0.5,0.6-1,0.8-1.6c0.2-0.6,0.3-1.2,0.3-1.9 c0-0.6-0.1-1.2-0.2-1.9c-0.1-0.6-0.4-1.2-0.7-1.7c-0.3-0.5-0.7-0.9-1.3-1.2c-0.5-0.3-1.1-0.5-1.9-0.5s-1.4,0.2-1.9,0.5 c-0.5,0.3-1,0.7-1.3,1.2C8.5,6.4,8.3,7,8.1,7.6C8,8.2,7.9,8.9,7.9,9.5c0,0.6,0.1,1.3,0.2,1.9C8.3,12,8.6,12.5,8.9,13 c0.3,0.5,0.8,0.8,1.3,1.1c0.5,0.3,1.1,0.4,1.9,0.4C12.7,14.5,13.3,14.4,13.8,14.1z"})})},{name:"google",attributes:{service:"google"},title:(0,pt._x)("Google","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.02,10.18v3.72v0.01h5.51c-0.26,1.57-1.67,4.22-5.5,4.22c-3.31,0-6.01-2.75-6.01-6.12s2.7-6.12,6.01-6.12 c1.87,0,3.13,0.8,3.85,1.48l2.84-2.76C16.99,2.99,14.73,2,12.03,2c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.77,0,9.6-4.06,9.6-9.77 c0-0.83-0.11-1.42-0.25-2.05H12.02z"})})},{name:"github",attributes:{service:"github"},title:(0,pt._x)("GitHub","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,4.419,2.865,8.166,6.839,9.489c0.5,0.09,0.682-0.218,0.682-0.484 c0-0.236-0.009-0.866-0.014-1.699c-2.782,0.602-3.369-1.34-3.369-1.34c-0.455-1.157-1.11-1.465-1.11-1.465 c-0.909-0.62,0.069-0.608,0.069-0.608c1.004,0.071,1.532,1.03,1.532,1.03c0.891,1.529,2.341,1.089,2.91,0.833 c0.091-0.647,0.349-1.086,0.635-1.337c-2.22-0.251-4.555-1.111-4.555-4.943c0-1.091,0.39-1.984,1.03-2.682 C6.546,8.54,6.202,7.524,6.746,6.148c0,0,0.84-0.269,2.75,1.025C10.295,6.95,11.15,6.84,12,6.836 c0.85,0.004,1.705,0.114,2.504,0.336c1.909-1.294,2.748-1.025,2.748-1.025c0.546,1.376,0.202,2.394,0.1,2.646 c0.64,0.699,1.026,1.591,1.026,2.682c0,3.841-2.337,4.687-4.565,4.935c0.359,0.307,0.679,0.917,0.679,1.852 c0,1.335-0.012,2.415-0.012,2.741c0,0.269,0.18,0.579,0.688,0.481C19.138,20.161,22,16.416,22,12C22,6.477,17.523,2,12,2z"})})},{name:"gravatar",attributes:{service:"gravatar"},title:(0,pt._x)("Gravatar","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M10.8001 4.69937V10.6494C10.8001 11.1001 10.9791 11.5323 11.2978 11.851C11.6165 12.1697 12.0487 12.3487 12.4994 12.3487C12.9501 12.3487 13.3824 12.1697 13.7011 11.851C14.0198 11.5323 14.1988 11.1001 14.1988 10.6494V6.69089C15.2418 7.05861 16.1371 7.75537 16.7496 8.67617C17.3622 9.59698 17.6589 10.6919 17.595 11.796C17.5311 12.9001 17.1101 13.9535 16.3954 14.7975C15.6807 15.6415 14.711 16.2303 13.6325 16.4753C12.5541 16.7202 11.4252 16.608 10.4161 16.1555C9.40691 15.703 8.57217 14.9348 8.03763 13.9667C7.50308 12.9985 7.29769 11.8828 7.45242 10.7877C7.60714 9.69266 8.11359 8.67755 8.89545 7.89537C9.20904 7.57521 9.38364 7.14426 9.38132 6.69611C9.37899 6.24797 9.19994 5.81884 8.88305 5.50195C8.56616 5.18506 8.13704 5.00601 7.68889 5.00369C7.24075 5.00137 6.80979 5.17597 6.48964 5.48956C5.09907 6.8801 4.23369 8.7098 4.04094 10.6669C3.84819 12.624 4.34 14.5873 5.43257 16.2224C6.52515 17.8575 8.15088 19.0632 10.0328 19.634C11.9146 20.2049 13.9362 20.1055 15.753 19.3529C17.5699 18.6003 19.0695 17.241 19.9965 15.5066C20.9234 13.7722 21.2203 11.7701 20.8366 9.84133C20.4528 7.91259 19.4122 6.17658 17.892 4.92911C16.3717 3.68163 14.466 2.99987 12.4994 3C12.0487 3 11.6165 3.17904 11.2978 3.49773C10.9791 3.81643 10.8001 4.24867 10.8001 4.69937Z"})})},{name:"instagram",attributes:{service:"instagram"},title:(0,pt._x)("Instagram","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,4.622c2.403,0,2.688,0.009,3.637,0.052c0.877,0.04,1.354,0.187,1.671,0.31c0.42,0.163,0.72,0.358,1.035,0.673 c0.315,0.315,0.51,0.615,0.673,1.035c0.123,0.317,0.27,0.794,0.31,1.671c0.043,0.949,0.052,1.234,0.052,3.637 s-0.009,2.688-0.052,3.637c-0.04,0.877-0.187,1.354-0.31,1.671c-0.163,0.42-0.358,0.72-0.673,1.035 c-0.315,0.315-0.615,0.51-1.035,0.673c-0.317,0.123-0.794,0.27-1.671,0.31c-0.949,0.043-1.233,0.052-3.637,0.052 s-2.688-0.009-3.637-0.052c-0.877-0.04-1.354-0.187-1.671-0.31c-0.42-0.163-0.72-0.358-1.035-0.673 c-0.315-0.315-0.51-0.615-0.673-1.035c-0.123-0.317-0.27-0.794-0.31-1.671C4.631,14.688,4.622,14.403,4.622,12 s0.009-2.688,0.052-3.637c0.04-0.877,0.187-1.354,0.31-1.671c0.163-0.42,0.358-0.72,0.673-1.035 c0.315-0.315,0.615-0.51,1.035-0.673c0.317-0.123,0.794-0.27,1.671-0.31C9.312,4.631,9.597,4.622,12,4.622 M12,3 C9.556,3,9.249,3.01,8.289,3.054C7.331,3.098,6.677,3.25,6.105,3.472C5.513,3.702,5.011,4.01,4.511,4.511 c-0.5,0.5-0.808,1.002-1.038,1.594C3.25,6.677,3.098,7.331,3.054,8.289C3.01,9.249,3,9.556,3,12c0,2.444,0.01,2.751,0.054,3.711 c0.044,0.958,0.196,1.612,0.418,2.185c0.23,0.592,0.538,1.094,1.038,1.594c0.5,0.5,1.002,0.808,1.594,1.038 c0.572,0.222,1.227,0.375,2.185,0.418C9.249,20.99,9.556,21,12,21s2.751-0.01,3.711-0.054c0.958-0.044,1.612-0.196,2.185-0.418 c0.592-0.23,1.094-0.538,1.594-1.038c0.5-0.5,0.808-1.002,1.038-1.594c0.222-0.572,0.375-1.227,0.418-2.185 C20.99,14.751,21,14.444,21,12s-0.01-2.751-0.054-3.711c-0.044-0.958-0.196-1.612-0.418-2.185c-0.23-0.592-0.538-1.094-1.038-1.594 c-0.5-0.5-1.002-0.808-1.594-1.038c-0.572-0.222-1.227-0.375-2.185-0.418C14.751,3.01,14.444,3,12,3L12,3z M12,7.378 c-2.552,0-4.622,2.069-4.622,4.622S9.448,16.622,12,16.622s4.622-2.069,4.622-4.622S14.552,7.378,12,7.378z M12,15 c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S13.657,15,12,15z M16.804,6.116c-0.596,0-1.08,0.484-1.08,1.08 s0.484,1.08,1.08,1.08c0.596,0,1.08-0.484,1.08-1.08S17.401,6.116,16.804,6.116z"})})},{name:"lastfm",attributes:{service:"lastfm"},title:(0,pt._x)("Last.fm","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M 12.0002 1.5 C 6.2006 1.5 1.5 6.2011 1.5 11.9998 C 1.5 17.799 6.2006 22.5 12.0002 22.5 C 17.799 22.5 22.5 17.799 22.5 11.9998 C 22.5 6.2011 17.799 1.5 12.0002 1.5 Z M 16.1974 16.2204 C 14.8164 16.2152 13.9346 15.587 13.3345 14.1859 L 13.1816 13.8451 L 11.8541 10.8101 C 11.4271 9.7688 10.3526 9.0712 9.1801 9.0712 C 7.5695 9.0712 6.2593 10.3851 6.2593 12.001 C 6.2593 13.6165 7.5695 14.9303 9.1801 14.9303 C 10.272 14.9303 11.2651 14.3275 11.772 13.3567 C 11.7893 13.3235 11.8239 13.302 11.863 13.3038 C 11.9007 13.3054 11.9353 13.3288 11.9504 13.3632 L 12.4865 14.6046 C 12.5016 14.639 12.4956 14.6778 12.4723 14.7069 C 11.6605 15.6995 10.4602 16.2683 9.1801 16.2683 C 6.8331 16.2683 4.9234 14.3536 4.9234 12.001 C 4.9234 9.6468 6.833 7.732 9.1801 7.732 C 10.9572 7.732 12.3909 8.6907 13.1138 10.3636 C 13.1206 10.3802 13.8412 12.0708 14.4744 13.5191 C 14.8486 14.374 15.1462 14.896 16.1288 14.9292 C 17.0663 14.9613 17.7538 14.4122 17.7538 13.6485 C 17.7538 12.9691 17.3321 12.8004 16.3803 12.4822 C 14.7365 11.9398 13.845 11.3861 13.845 10.0182 C 13.845 8.6809 14.7667 7.8162 16.192 7.8162 C 17.1288 7.8162 17.8155 8.2287 18.2921 9.0768 C 18.305 9.1006 18.3079 9.1281 18.3004 9.1542 C 18.2929 9.1803 18.2748 9.2021 18.2507 9.2138 L 17.3614 9.669 C 17.3178 9.692 17.2643 9.6781 17.2356 9.6385 C 16.9329 9.2135 16.5956 9.0251 16.1423 9.0251 C 15.5512 9.0251 15.122 9.429 15.122 9.9865 C 15.122 10.6738 15.6529 10.8414 16.5339 11.1192 C 16.6491 11.1558 16.7696 11.194 16.8939 11.2343 C 18.2763 11.6865 19.0768 12.2311 19.0768 13.6836 C 19.0769 15.1297 17.8389 16.2204 16.1974 16.2204 Z"})})},{name:"linkedin",attributes:{service:"linkedin"},title:(0,pt._x)("LinkedIn","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"})})},{name:"mail",attributes:{service:"mail"},title:(0,pt._x)("Mail","social link block variation name"),keywords:["email","e-mail"],icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V9.8l7.5 5.6 7.5-5.6V17zm0-9.1L12 13.6 4.5 7.9V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v.9z"})})},{name:"mastodon",attributes:{service:"mastodon"},title:(0,pt._x)("Mastodon","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"})})},{name:"meetup",attributes:{service:"meetup"},title:(0,pt._x)("Meetup","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M19.24775,14.722a3.57032,3.57032,0,0,1-2.94457,3.52073,3.61886,3.61886,0,0,1-.64652.05634c-.07314-.0008-.10187.02846-.12507.09547A2.38881,2.38881,0,0,1,13.49453,20.094a2.33092,2.33092,0,0,1-1.827-.50716.13635.13635,0,0,0-.19878-.00408,3.191,3.191,0,0,1-2.104.60248,3.26309,3.26309,0,0,1-3.00324-2.71993,2.19076,2.19076,0,0,1-.03512-.30865c-.00156-.08579-.03413-.1189-.11608-.13493a2.86421,2.86421,0,0,1-1.23189-.56111,2.945,2.945,0,0,1-1.166-2.05749,2.97484,2.97484,0,0,1,.87524-2.50774.112.112,0,0,0,.02091-.16107,2.7213,2.7213,0,0,1-.36648-1.48A2.81256,2.81256,0,0,1,6.57673,7.58838a.35764.35764,0,0,0,.28869-.22819,4.2208,4.2208,0,0,1,6.02892-1.90111.25161.25161,0,0,0,.22023.0243,3.65608,3.65608,0,0,1,3.76031.90678A3.57244,3.57244,0,0,1,17.95918,8.626a2.97339,2.97339,0,0,1,.01829.57356.10637.10637,0,0,0,.0853.12792,1.97669,1.97669,0,0,1,1.27939,1.33733,2.00266,2.00266,0,0,1-.57112,2.12652c-.05284.05166-.04168.08328-.01173.13489A3.51189,3.51189,0,0,1,19.24775,14.722Zm-6.35959-.27836a1.6984,1.6984,0,0,0,1.14556,1.61113,3.82039,3.82039,0,0,0,1.036.17935,1.46888,1.46888,0,0,0,.73509-.12255.44082.44082,0,0,0,.26057-.44274.45312.45312,0,0,0-.29211-.43375.97191.97191,0,0,0-.20678-.063c-.21326-.03806-.42754-.0701-.63973-.11215a.54787.54787,0,0,1-.50172-.60926,2.75864,2.75864,0,0,1,.1773-.901c.1763-.535.414-1.045.64183-1.55913A12.686,12.686,0,0,0,15.85,10.47863a1.58461,1.58461,0,0,0,.04861-.87208,1.04531,1.04531,0,0,0-.85432-.83981,1.60658,1.60658,0,0,0-1.23654.16594.27593.27593,0,0,1-.36286-.03413c-.085-.0747-.16594-.15379-.24918-.23055a.98682.98682,0,0,0-1.33577-.04933,6.1468,6.1468,0,0,1-.4989.41615.47762.47762,0,0,1-.51535.03566c-.17448-.09307-.35512-.175-.53531-.25665a1.74949,1.74949,0,0,0-.56476-.2016,1.69943,1.69943,0,0,0-1.61654.91787,8.05815,8.05815,0,0,0-.32952.80126c-.45471,1.2557-.82507,2.53825-1.20838,3.81639a1.24151,1.24151,0,0,0,.51532,1.44389,1.42659,1.42659,0,0,0,1.22008.17166,1.09728,1.09728,0,0,0,.66994-.69764c.44145-1.04111.839-2.09989,1.25981-3.14926.11581-.28876.22792-.57874.35078-.86438a.44548.44548,0,0,1,.69189-.19539.50521.50521,0,0,1,.15044.43836,1.75625,1.75625,0,0,1-.14731.50453c-.27379.69219-.55265,1.38236-.82766,2.074a2.0836,2.0836,0,0,0-.14038.42876.50719.50719,0,0,0,.27082.57722.87236.87236,0,0,0,.66145.02739.99137.99137,0,0,0,.53406-.532q.61571-1.20914,1.228-2.42031.28423-.55863.57585-1.1133a.87189.87189,0,0,1,.29055-.35253.34987.34987,0,0,1,.37634-.01265.30291.30291,0,0,1,.12434.31459.56716.56716,0,0,1-.04655.1915c-.05318.12739-.10286.25669-.16183.38156-.34118.71775-.68754,1.43273-1.02568,2.152A2.00213,2.00213,0,0,0,12.88816,14.44366Zm4.78568,5.28972a.88573.88573,0,0,0-1.77139.00465.8857.8857,0,0,0,1.77139-.00465Zm-14.83838-7.296a.84329.84329,0,1,0,.00827-1.68655.8433.8433,0,0,0-.00827,1.68655Zm10.366-9.43673a.83506.83506,0,1,0-.0091,1.67.83505.83505,0,0,0,.0091-1.67Zm6.85014,5.22a.71651.71651,0,0,0-1.433.0093.71656.71656,0,0,0,1.433-.0093ZM5.37528,6.17908A.63823.63823,0,1,0,6.015,5.54483.62292.62292,0,0,0,5.37528,6.17908Zm6.68214,14.80843a.54949.54949,0,1,0-.55052.541A.54556.54556,0,0,0,12.05742,20.98752Zm8.53235-8.49689a.54777.54777,0,0,0-.54027.54023.53327.53327,0,0,0,.532.52293.51548.51548,0,0,0,.53272-.5237A.53187.53187,0,0,0,20.58977,12.49063ZM7.82846,2.4715a.44927.44927,0,1,0,.44484.44766A.43821.43821,0,0,0,7.82846,2.4715Zm13.775,7.60492a.41186.41186,0,0,0-.40065.39623.40178.40178,0,0,0,.40168.40168A.38994.38994,0,0,0,22,10.48172.39946.39946,0,0,0,21.60349,10.07642ZM5.79193,17.96207a.40469.40469,0,0,0-.397-.39646.399.399,0,0,0-.396.405.39234.39234,0,0,0,.39939.389A.39857.39857,0,0,0,5.79193,17.96207Z"})})},{name:"medium",attributes:{service:"medium"},title:(0,pt._x)("Medium","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"})})},{name:"patreon",attributes:{service:"patreon"},title:(0,pt._x)("Patreon","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M20 8.40755C19.9969 6.10922 18.2543 4.22555 16.2097 3.54588C13.6708 2.70188 10.3222 2.82421 7.89775 3.99921C4.95932 5.42355 4.03626 8.54355 4.00186 11.6552C3.97363 14.2136 4.2222 20.9517 7.92225 20.9997C10.6715 21.0356 11.0809 17.3967 12.3529 15.6442C13.258 14.3974 14.4233 14.0452 15.8578 13.6806C18.3233 13.0537 20.0036 11.0551 20 8.40755Z"})})},{name:"pinterest",attributes:{service:"pinterest"},title:(0,pt._x)("Pinterest","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"})})},{name:"pocket",attributes:{service:"pocket"},title:(0,pt._x)("Pocket","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M21.927,4.194C21.667,3.48,20.982,3,20.222,3h-0.01h-1.721H3.839C3.092,3,2.411,3.47,2.145,4.17 C2.066,4.378,2.026,4.594,2.026,4.814v6.035l0.069,1.2c0.29,2.73,1.707,5.115,3.899,6.778c0.039,0.03,0.079,0.059,0.119,0.089 l0.025,0.018c1.175,0.859,2.491,1.441,3.91,1.727c0.655,0.132,1.325,0.2,1.991,0.2c0.615,0,1.232-0.057,1.839-0.17 c0.073-0.014,0.145-0.028,0.219-0.044c0.02-0.004,0.042-0.012,0.064-0.023c1.359-0.297,2.621-0.864,3.753-1.691l0.025-0.018 c0.04-0.029,0.08-0.058,0.119-0.089c2.192-1.664,3.609-4.049,3.898-6.778l0.069-1.2V4.814C22.026,4.605,22,4.398,21.927,4.194z M17.692,10.481l-4.704,4.512c-0.266,0.254-0.608,0.382-0.949,0.382c-0.342,0-0.684-0.128-0.949-0.382l-4.705-4.512 C5.838,9.957,5.82,9.089,6.344,8.542c0.524-0.547,1.392-0.565,1.939-0.04l3.756,3.601l3.755-3.601 c0.547-0.524,1.415-0.506,1.939,0.04C18.256,9.089,18.238,9.956,17.692,10.481z"})})},{name:"reddit",attributes:{service:"reddit"},title:(0,pt._x)("Reddit","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"})})},{name:"skype",attributes:{service:"skype"},title:(0,pt._x)("Skype","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M10.113,2.699c0.033-0.006,0.067-0.013,0.1-0.02c0.033,0.017,0.066,0.033,0.098,0.051L10.113,2.699z M2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223z M21.275,13.771 c0.007-0.035,0.011-0.071,0.018-0.106c-0.018-0.031-0.033-0.064-0.052-0.095L21.275,13.771z M13.563,21.199 c0.032,0.019,0.065,0.035,0.096,0.053c0.036-0.006,0.071-0.011,0.105-0.017L13.563,21.199z M22,16.386 c0,1.494-0.581,2.898-1.637,3.953c-1.056,1.057-2.459,1.637-3.953,1.637c-0.967,0-1.914-0.251-2.75-0.725 c0.036-0.006,0.071-0.011,0.105-0.017l-0.202-0.035c0.032,0.019,0.065,0.035,0.096,0.053c-0.543,0.096-1.099,0.147-1.654,0.147 c-1.275,0-2.512-0.25-3.676-0.743c-1.125-0.474-2.135-1.156-3.002-2.023c-0.867-0.867-1.548-1.877-2.023-3.002 c-0.493-1.164-0.743-2.401-0.743-3.676c0-0.546,0.049-1.093,0.142-1.628c0.018,0.032,0.033,0.064,0.051,0.095L2.72,10.223 c-0.006,0.034-0.011,0.069-0.017,0.103C2.244,9.5,2,8.566,2,7.615c0-1.493,0.582-2.898,1.637-3.953 c1.056-1.056,2.46-1.638,3.953-1.638c0.915,0,1.818,0.228,2.622,0.655c-0.033,0.007-0.067,0.013-0.1,0.02l0.199,0.031 c-0.032-0.018-0.066-0.034-0.098-0.051c0.002,0,0.003-0.001,0.004-0.001c0.586-0.112,1.187-0.169,1.788-0.169 c1.275,0,2.512,0.249,3.676,0.742c1.124,0.476,2.135,1.156,3.002,2.024c0.868,0.867,1.548,1.877,2.024,3.002 c0.493,1.164,0.743,2.401,0.743,3.676c0,0.575-0.054,1.15-0.157,1.712c-0.018-0.031-0.033-0.064-0.052-0.095l0.034,0.201 c0.007-0.035,0.011-0.071,0.018-0.106C21.754,14.494,22,15.432,22,16.386z M16.817,14.138c0-1.331-0.613-2.743-3.033-3.282 l-2.209-0.49c-0.84-0.192-1.807-0.444-1.807-1.237c0-0.794,0.679-1.348,1.903-1.348c2.468,0,2.243,1.696,3.468,1.696 c0.645,0,1.209-0.379,1.209-1.031c0-1.521-2.435-2.663-4.5-2.663c-2.242,0-4.63,0.952-4.63,3.488c0,1.221,0.436,2.521,2.839,3.123 l2.984,0.745c0.903,0.223,1.129,0.731,1.129,1.189c0,0.762-0.758,1.507-2.129,1.507c-2.679,0-2.307-2.062-3.743-2.062 c-0.645,0-1.113,0.444-1.113,1.078c0,1.236,1.501,2.886,4.856,2.886C15.236,17.737,16.817,16.199,16.817,14.138z"})}),scope:[]},{name:"snapchat",attributes:{service:"snapchat"},title:(0,pt._x)("Snapchat","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.065,2a5.526,5.526,0,0,1,3.132.892A5.854,5.854,0,0,1,17.326,5.4a5.821,5.821,0,0,1,.351,2.33q0,.612-.117,2.487a.809.809,0,0,0,.365.091,1.93,1.93,0,0,0,.664-.176,1.93,1.93,0,0,1,.664-.176,1.3,1.3,0,0,1,.729.234.7.7,0,0,1,.351.6.839.839,0,0,1-.41.7,2.732,2.732,0,0,1-.9.41,3.192,3.192,0,0,0-.9.378.728.728,0,0,0-.41.618,1.575,1.575,0,0,0,.156.56,6.9,6.9,0,0,0,1.334,1.953,5.6,5.6,0,0,0,1.881,1.315,5.875,5.875,0,0,0,1.042.3.42.42,0,0,1,.365.456q0,.911-2.852,1.341a1.379,1.379,0,0,0-.143.507,1.8,1.8,0,0,1-.182.605.451.451,0,0,1-.429.241,5.878,5.878,0,0,1-.807-.085,5.917,5.917,0,0,0-.833-.085,4.217,4.217,0,0,0-.807.065,2.42,2.42,0,0,0-.82.293,6.682,6.682,0,0,0-.755.5q-.351.267-.755.527a3.886,3.886,0,0,1-.989.436A4.471,4.471,0,0,1,11.831,22a4.307,4.307,0,0,1-1.256-.176,3.784,3.784,0,0,1-.976-.436q-.4-.26-.749-.527a6.682,6.682,0,0,0-.755-.5,2.422,2.422,0,0,0-.807-.293,4.432,4.432,0,0,0-.82-.065,5.089,5.089,0,0,0-.853.1,5,5,0,0,1-.762.1.474.474,0,0,1-.456-.241,1.819,1.819,0,0,1-.182-.618,1.411,1.411,0,0,0-.143-.521q-2.852-.429-2.852-1.341a.42.42,0,0,1,.365-.456,5.793,5.793,0,0,0,1.042-.3,5.524,5.524,0,0,0,1.881-1.315,6.789,6.789,0,0,0,1.334-1.953A1.575,1.575,0,0,0,6,12.9a.728.728,0,0,0-.41-.618,3.323,3.323,0,0,0-.9-.384,2.912,2.912,0,0,1-.9-.41.814.814,0,0,1-.41-.684.71.71,0,0,1,.338-.593,1.208,1.208,0,0,1,.716-.241,1.976,1.976,0,0,1,.625.169,2.008,2.008,0,0,0,.69.169.919.919,0,0,0,.416-.091q-.117-1.849-.117-2.474A5.861,5.861,0,0,1,6.385,5.4,5.516,5.516,0,0,1,8.625,2.819,7.075,7.075,0,0,1,12.062,2Z"})})},{name:"soundcloud",attributes:{service:"soundcloud"},title:(0,pt._x)("SoundCloud","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M23.994 14.552a3.36 3.36 0 01-3.401 3.171h-8.176a.685.685 0 01-.679-.681V8.238a.749.749 0 01.452-.716S12.942 7 14.526 7a5.357 5.357 0 012.748.755 5.44 5.44 0 012.56 3.546c.282-.08.574-.12.868-.119a3.273 3.273 0 013.292 3.37zM10.718 8.795a.266.266 0 10-.528 0c-.224 2.96-.397 5.735 0 8.685a.265.265 0 00.528 0c.425-2.976.246-5.7 0-8.685zM9.066 9.82a.278.278 0 00-.553 0 33.183 33.183 0 000 7.663.278.278 0 00.55 0c.33-2.544.332-5.12.003-7.664zM7.406 9.56a.269.269 0 00-.535 0c-.253 2.7-.38 5.222 0 7.917a.266.266 0 10.531 0c.394-2.73.272-5.181.004-7.917zM5.754 10.331a.275.275 0 10-.55 0 28.035 28.035 0 000 7.155.272.272 0 00.54 0c.332-2.373.335-4.78.01-7.155zM4.087 12.12a.272.272 0 00-.544 0c-.393 1.843-.208 3.52.016 5.386a.26.26 0 00.512 0c.247-1.892.435-3.53.016-5.386zM2.433 11.838a.282.282 0 00-.56 0c-.349 1.882-.234 3.54.01 5.418.025.285.508.282.54 0 .269-1.907.394-3.517.01-5.418zM.762 12.76a.282.282 0 00-.56 0c-.32 1.264-.22 2.31.023 3.578a.262.262 0 00.521 0c.282-1.293.42-2.317.016-3.578z"})})},{name:"spotify",attributes:{service:"spotify"},title:(0,pt._x)("Spotify","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12,2C6.477,2,2,6.477,2,12c0,5.523,4.477,10,10,10c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2 M16.586,16.424 c-0.18,0.295-0.563,0.387-0.857,0.207c-2.348-1.435-5.304-1.76-8.785-0.964c-0.335,0.077-0.67-0.133-0.746-0.469 c-0.077-0.335,0.132-0.67,0.469-0.746c3.809-0.871,7.077-0.496,9.713,1.115C16.673,15.746,16.766,16.13,16.586,16.424 M17.81,13.7 c-0.226,0.367-0.706,0.482-1.072,0.257c-2.687-1.652-6.785-2.131-9.965-1.166C6.36,12.917,5.925,12.684,5.8,12.273 C5.675,11.86,5.908,11.425,6.32,11.3c3.632-1.102,8.147-0.568,11.234,1.328C17.92,12.854,18.035,13.335,17.81,13.7 M17.915,10.865 c-3.223-1.914-8.54-2.09-11.618-1.156C5.804,9.859,5.281,9.58,5.131,9.086C4.982,8.591,5.26,8.069,5.755,7.919 c3.532-1.072,9.404-0.865,13.115,1.338c0.445,0.264,0.59,0.838,0.327,1.282C18.933,10.983,18.359,11.129,17.915,10.865"})})},{name:"telegram",attributes:{service:"telegram"},title:(0,pt._x)("Telegram","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 128 128",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M28.9700376,63.3244248 C47.6273373,55.1957357 60.0684594,49.8368063 66.2934036,47.2476366 C84.0668845,39.855031 87.7600616,38.5708563 90.1672227,38.528 C90.6966555,38.5191258 91.8804274,38.6503351 92.6472251,39.2725385 C93.294694,39.7979149 93.4728387,40.5076237 93.5580865,41.0057381 C93.6433345,41.5038525 93.7494885,42.63857 93.6651041,43.5252052 C92.7019529,53.6451182 88.5344133,78.2034783 86.4142057,89.5379542 C85.5170662,94.3339958 83.750571,95.9420841 82.0403991,96.0994568 C78.3237996,96.4414641 75.5015827,93.6432685 71.9018743,91.2836143 C66.2690414,87.5912212 63.0868492,85.2926952 57.6192095,81.6896017 C51.3004058,77.5256038 55.3966232,75.2369981 58.9976911,71.4967761 C59.9401076,70.5179421 76.3155302,55.6232293 76.6324771,54.2720454 C76.6721165,54.1030573 76.7089039,53.4731496 76.3346867,53.1405352 C75.9604695,52.8079208 75.4081573,52.921662 75.0095933,53.0121213 C74.444641,53.1403447 65.4461175,59.0880351 48.0140228,70.8551922 C45.4598218,72.6091037 43.1463059,73.4636682 41.0734751,73.4188859 C38.7883453,73.3695169 34.3926725,72.1268388 31.1249416,71.0646282 C27.1169366,69.7617838 23.931454,69.0729605 24.208838,66.8603276 C24.3533167,65.7078514 25.9403832,64.5292172 28.9700376,63.3244248 Z"})})},{name:"threads",attributes:{service:"threads"},title:(0,pt._x)("Threads","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M16.3 11.3c-.1 0-.2-.1-.2-.1-.1-2.6-1.5-4-3.9-4-1.4 0-2.6.6-3.3 1.7l1.3.9c.5-.8 1.4-1 2-1 .8 0 1.4.2 1.7.7.3.3.5.8.5 1.3-.7-.1-1.4-.2-2.2-.1-2.2.1-3.7 1.4-3.6 3.2 0 .9.5 1.7 1.3 2.2.7.4 1.5.6 2.4.6 1.2-.1 2.1-.5 2.7-1.3.5-.6.8-1.4.9-2.4.6.3 1 .8 1.2 1.3.4.9.4 2.4-.8 3.6-1.1 1.1-2.3 1.5-4.3 1.5-2.1 0-3.8-.7-4.8-2S5.7 14.3 5.7 12c0-2.3.5-4.1 1.5-5.4 1.1-1.3 2.7-2 4.8-2 2.2 0 3.8.7 4.9 2 .5.7.9 1.5 1.2 2.5l1.5-.4c-.3-1.2-.8-2.2-1.5-3.1-1.3-1.7-3.3-2.6-6-2.6-2.6 0-4.7.9-6 2.6C4.9 7.2 4.3 9.3 4.3 12s.6 4.8 1.9 6.4c1.4 1.7 3.4 2.6 6 2.6 2.3 0 4-.6 5.3-2 1.8-1.8 1.7-4 1.1-5.4-.4-.9-1.2-1.7-2.3-2.3zm-4 3.8c-1 .1-2-.4-2-1.3 0-.7.5-1.5 2.1-1.6h.5c.6 0 1.1.1 1.6.2-.2 2.3-1.3 2.7-2.2 2.7z"})})},{name:"tiktok",attributes:{service:"tiktok"},title:(0,pt._x)("TikTok","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.4044 3.01519C13.4086 3 14.4072 3.009 15.4045 3C15.465 4.14812 15.8874 5.31762 16.7472 6.12935C17.6053 6.96134 18.819 7.34217 20 7.47099V10.4912C18.8933 10.4558 17.7814 10.2308 16.7771 9.76499C16.3397 9.57148 15.9323 9.32227 15.5334 9.06745C15.5283 11.2591 15.5426 13.4479 15.5191 15.6305C15.4592 16.679 15.1053 17.7225 14.4814 18.5866C13.4777 20.025 11.7356 20.9627 9.94635 20.992C8.84885 21.0533 7.7525 20.7608 6.81729 20.2219C5.26743 19.3286 4.17683 17.6933 4.01799 15.9382C3.99957 15.563 3.99324 15.1883 4.00878 14.8221C4.14691 13.395 4.86917 12.0297 5.99027 11.101C7.26101 10.0192 9.04107 9.50397 10.7078 9.80886C10.7233 10.9199 10.6778 12.0297 10.6778 13.1407C9.91643 12.9 9.02668 12.9675 8.36139 13.4192C7.87566 13.7269 7.50675 14.1983 7.31453 14.7316C7.15569 15.1118 7.20116 15.5343 7.21036 15.9382C7.3928 17.169 8.60368 18.2035 9.89628 18.0916C10.7532 18.0826 11.5745 17.5965 12.0211 16.8849C12.1655 16.6357 12.3273 16.3809 12.3359 16.0878C12.4113 14.7462 12.3814 13.4102 12.3906 12.0685C12.3969 9.04495 12.3814 6.02979 12.4049 3.01575L12.4044 3.01519Z"})})},{name:"tumblr",attributes:{service:"tumblr"},title:(0,pt._x)("Tumblr","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M17.04 21.28h-3.28c-2.84 0-4.94-1.37-4.94-5.02v-5.67H6.08V7.5c2.93-.73 4.11-3.3 4.3-5.48h3.01v4.93h3.47v3.65H13.4v4.93c0 1.47.73 2.01 1.92 2.01h1.73v3.75z"})})},{name:"twitch",attributes:{service:"twitch"},title:(0,pt._x)("Twitch","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M16.499,8.089h-1.636v4.91h1.636V8.089z M12,8.089h-1.637v4.91H12V8.089z M4.228,3.178L3,6.451v13.092h4.499V22h2.456 l2.454-2.456h3.681L21,14.636V3.178H4.228z M19.364,13.816l-2.864,2.865H12l-2.453,2.453V16.68H5.863V4.814h13.501V13.816z"})})},{name:"twitter",attributes:{service:"twitter"},title:(0,pt._x)("Twitter","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22.23,5.924c-0.736,0.326-1.527,0.547-2.357,0.646c0.847-0.508,1.498-1.312,1.804-2.27 c-0.793,0.47-1.671,0.812-2.606,0.996C18.324,4.498,17.257,4,16.077,4c-2.266,0-4.103,1.837-4.103,4.103 c0,0.322,0.036,0.635,0.106,0.935C8.67,8.867,5.647,7.234,3.623,4.751C3.27,5.357,3.067,6.062,3.067,6.814 c0,1.424,0.724,2.679,1.825,3.415c-0.673-0.021-1.305-0.206-1.859-0.513c0,0.017,0,0.034,0,0.052c0,1.988,1.414,3.647,3.292,4.023 c-0.344,0.094-0.707,0.144-1.081,0.144c-0.264,0-0.521-0.026-0.772-0.074c0.522,1.63,2.038,2.816,3.833,2.85 c-1.404,1.1-3.174,1.756-5.096,1.756c-0.331,0-0.658-0.019-0.979-0.057c1.816,1.164,3.973,1.843,6.29,1.843 c7.547,0,11.675-6.252,11.675-11.675c0-0.178-0.004-0.355-0.012-0.531C20.985,7.47,21.68,6.747,22.23,5.924z"})})},{name:"vimeo",attributes:{service:"vimeo"},title:(0,pt._x)("Vimeo","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22.396,7.164c-0.093,2.026-1.507,4.799-4.245,8.32C15.322,19.161,12.928,21,10.97,21c-1.214,0-2.24-1.119-3.079-3.359 c-0.56-2.053-1.119-4.106-1.68-6.159C5.588,9.243,4.921,8.122,4.206,8.122c-0.156,0-0.701,0.328-1.634,0.98L1.594,7.841 c1.027-0.902,2.04-1.805,3.037-2.708C6.001,3.95,7.03,3.327,7.715,3.264c1.619-0.156,2.616,0.951,2.99,3.321 c0.404,2.557,0.685,4.147,0.841,4.769c0.467,2.121,0.981,3.181,1.542,3.181c0.435,0,1.09-0.688,1.963-2.065 c0.871-1.376,1.338-2.422,1.401-3.142c0.125-1.187-0.343-1.782-1.401-1.782c-0.498,0-1.012,0.115-1.541,0.341 c1.023-3.35,2.977-4.977,5.862-4.884C21.511,3.066,22.52,4.453,22.396,7.164z"})})},{name:"vk",attributes:{service:"vk"},title:(0,pt._x)("VK","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"})})},{name:"whatsapp",attributes:{service:"whatsapp"},title:(0,pt._x)("WhatsApp","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"})})},{name:"x",attributes:{service:"x"},keywords:["twitter"],title:(0,pt._x)("X","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M13.982 10.622 20.54 3h-1.554l-5.693 6.618L8.745 3H3.5l6.876 10.007L3.5 21h1.554l6.012-6.989L15.868 21h5.245l-7.131-10.378Zm-2.128 2.474-.697-.997-5.543-7.93H8l4.474 6.4.697.996 5.815 8.318h-2.387l-4.745-6.787Z"})})},{name:"yelp",attributes:{service:"yelp"},title:(0,pt._x)("Yelp","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M12.271,16.718v1.417q-.011,3.257-.067,3.4a.707.707,0,0,1-.569.446,4.637,4.637,0,0,1-2.024-.424A4.609,4.609,0,0,1,7.8,20.565a.844.844,0,0,1-.19-.4.692.692,0,0,1,.044-.29,3.181,3.181,0,0,1,.379-.524q.335-.412,2.019-2.409.011,0,.669-.781a.757.757,0,0,1,.44-.274.965.965,0,0,1,.552.039.945.945,0,0,1,.418.324.732.732,0,0,1,.139.468Zm-1.662-2.8a.783.783,0,0,1-.58.781l-1.339.435q-3.067.981-3.257.981a.711.711,0,0,1-.6-.4,2.636,2.636,0,0,1-.19-.836,9.134,9.134,0,0,1,.011-1.857,3.559,3.559,0,0,1,.335-1.389.659.659,0,0,1,.625-.357,22.629,22.629,0,0,1,2.253.859q.781.324,1.283.524l.937.379a.771.771,0,0,1,.4.34A.982.982,0,0,1,10.609,13.917Zm9.213,3.313a4.467,4.467,0,0,1-1.021,1.8,4.559,4.559,0,0,1-1.512,1.417.671.671,0,0,1-.7-.078q-.156-.112-2.052-3.2l-.524-.859a.761.761,0,0,1-.128-.513.957.957,0,0,1,.217-.513.774.774,0,0,1,.926-.29q.011.011,1.327.446,2.264.736,2.7.887a2.082,2.082,0,0,1,.524.229.673.673,0,0,1,.245.68Zm-7.5-7.049q.056,1.137-.6,1.361-.647.19-1.272-.792L6.237,4.08a.7.7,0,0,1,.212-.691,5.788,5.788,0,0,1,2.314-1,5.928,5.928,0,0,1,2.5-.352.681.681,0,0,1,.547.5q.034.2.245,3.407T12.327,10.181Zm7.384,1.2a.679.679,0,0,1-.29.658q-.167.112-3.67.959-.747.167-1.015.257l.011-.022a.769.769,0,0,1-.513-.044.914.914,0,0,1-.413-.357.786.786,0,0,1,0-.971q.011-.011.836-1.137,1.394-1.908,1.673-2.275a2.423,2.423,0,0,1,.379-.435A.7.7,0,0,1,17.435,8a4.482,4.482,0,0,1,1.372,1.489,4.81,4.81,0,0,1,.9,1.868v.034Z"})})},{name:"youtube",attributes:{service:"youtube"},title:(0,pt._x)("YouTube","social link block variation name"),icon:()=>(0,it.jsx)(St.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",version:"1.1",children:(0,it.jsx)(St.Path,{d:"M21.8,8.001c0,0-0.195-1.378-0.795-1.985c-0.76-0.797-1.613-0.801-2.004-0.847c-2.799-0.202-6.997-0.202-6.997-0.202 h-0.009c0,0-4.198,0-6.997,0.202C4.608,5.216,3.756,5.22,2.995,6.016C2.395,6.623,2.2,8.001,2.2,8.001S2,9.62,2,11.238v1.517 c0,1.618,0.2,3.237,0.2,3.237s0.195,1.378,0.795,1.985c0.761,0.797,1.76,0.771,2.205,0.855c1.6,0.153,6.8,0.201,6.8,0.201 s4.203-0.006,7.001-0.209c0.391-0.047,1.243-0.051,2.004-0.847c0.6-0.607,0.795-1.985,0.795-1.985s0.2-1.618,0.2-3.237v-1.517 C22,9.62,21.8,8.001,21.8,8.001z M9.935,14.594l-0.001-5.62l5.404,2.82L9.935,14.594z"})})}];Aj.forEach((e=>{e.isActive||(e.isActive=(e,t)=>e.service===t.service)}));var Lj=Aj;const{name:Hj}=zj,Rj={icon:Nj,edit:Mj,variations:Lj},Vj=()=>jt({name:Hj,metadata:zj,settings:Rj}),Fj=[{attributes:{iconColor:{type:"string"},customIconColor:{type:"string"},iconColorValue:{type:"string"},iconBackgroundColor:{type:"string"},customIconBackgroundColor:{type:"string"},iconBackgroundColorValue:{type:"string"},openInNewTab:{type:"boolean",default:!1},size:{type:"string"}},providesContext:{openInNewTab:"openInNewTab"},supports:{align:["left","center","right"],anchor:!0},migrate:e=>{if(e.layout)return e;const{className:t}=e,o="items-justified-",n=new RegExp(`\\b${o}[^ ]*[ ]?\\b`,"g"),r={...e,className:t?.replace(n,"").trim()},a=t?.match(n)?.[0]?.trim();return a&&Object.assign(r,{layout:{type:"flex",justifyContent:a.slice(16)}}),r},save:e=>{const{attributes:{iconBackgroundColorValue:t,iconColorValue:o,itemsJustification:n,size:r}}=e,a=Dt(r,{"has-icon-color":o,"has-icon-background-color":t,[`items-justified-${n}`]:n}),i={"--wp--social-links--icon-color":o,"--wp--social-links--icon-background-color":t};return(0,it.jsx)("ul",{...ct.useBlockProps.save({className:a,style:i}),children:(0,it.jsx)(ct.InnerBlocks.Content,{})})}}];var Ej=Fj;const Oj=[{label:(0,pt.__)("Default"),value:""},{label:(0,pt.__)("Small"),value:"has-small-icon-size"},{label:(0,pt.__)("Normal"),value:"has-normal-icon-size"},{label:(0,pt.__)("Large"),value:"has-large-icon-size"},{label:(0,pt.__)("Huge"),value:"has-huge-icon-size"}];var Gj=(0,ct.withColors)({iconColor:"icon-color",iconBackgroundColor:"icon-background-color"})((function(e){const{clientId:t,attributes:o,iconBackgroundColor:n,iconColor:r,isSelected:a,setAttributes:i,setIconBackgroundColor:s,setIconColor:l}=e,{iconBackgroundColorValue:c,iconColorValue:u,openInNewTab:d,showLabels:p,size:m}=o,{hasSocialIcons:g,hasSelectedChild:h}=(0,lt.useSelect)((e=>{const{getBlockCount:o,hasSelectedInnerBlock:n}=e(ct.store);return{hasSocialIcons:o(t)>0,hasSelectedChild:n(t)}}),[t]),_=a||h,x=o.className?.includes("is-style-logos-only"),b=vt();(0,gt.useEffect)((()=>{if(x){let e;return i((t=>(e={iconBackgroundColor:t.iconBackgroundColor,iconBackgroundColorValue:t.iconBackgroundColorValue,customIconBackgroundColor:t.customIconBackgroundColor},{iconBackgroundColor:void 0,iconBackgroundColorValue:void 0,customIconBackgroundColor:void 0}))),()=>i({...e})}}),[x,i]);const f=Dt(m,{"has-visible-labels":p,"has-icon-color":r.color||u,"has-icon-background-color":n.color||c}),y=(0,ct.useBlockProps)({className:f}),v=(0,ct.useInnerBlocksProps)(y,{templateLock:!1,orientation:o.layout?.orientation??"horizontal",__experimentalAppenderTagName:"li",renderAppender:!g||_?ct.InnerBlocks.ButtonBlockAppender:void 0}),k=[{value:r.color||u,onChange:e=>{l(e),i({iconColorValue:e})},label:(0,pt.__)("Icon color"),resetAllFilter:()=>{l(void 0),i({iconColorValue:void 0})}}];x||k.push({value:n.color||c,onChange:e=>{s(e),i({iconBackgroundColorValue:e})},label:(0,pt.__)("Icon background"),resetAllFilter:()=>{s(void 0),i({iconBackgroundColorValue:void 0})}});const w=(0,ct.__experimentalUseMultipleOriginColorsAndGradients)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({openInNewTab:!1,showLabels:!1,size:void 0})},dropdownMenuProps:b,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,hasValue:()=>!!m,label:(0,pt.__)("Icon size"),onDeselect:()=>i({size:void 0}),children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Icon Size"),onChange:e=>{i({size:""===e?void 0:e})},value:m??"",options:Oj})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Show text"),hasValue:()=>!!p,onDeselect:()=>i({showLabels:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show text"),checked:p,onChange:()=>i({showLabels:!p})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{isShownByDefault:!0,label:(0,pt.__)("Open links in new tab"),hasValue:()=>!!d,onDeselect:()=>i({openInNewTab:!1}),children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Open links in new tab"),checked:d,onChange:()=>i({openInNewTab:!d})})})]})}),w.hasColorsOrGradients&&(0,it.jsxs)(ct.InspectorControls,{group:"color",children:[k.map((({onChange:e,label:o,value:n,resetAllFilter:r})=>(0,it.jsx)(ct.__experimentalColorGradientSettingsDropdown,{__experimentalIsRenderedInSidebar:!0,settings:[{colorValue:n,label:o,onColorChange:e,isShownByDefault:!0,resetAllFilter:r,enableAlpha:!0,clearable:!0}],panelId:t,...w},`social-links-color-${o}`))),!x&&(0,it.jsx)(ct.ContrastChecker,{textColor:u,backgroundColor:c,isLargeText:!1})]}),(0,it.jsx)("ul",{...v})]})}));const $j=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/social-links","title":"Social Icons","category":"widgets","allowedBlocks":["core/social-link"],"description":"Display icons linking to your social profiles or sites.","keywords":["links"],"textdomain":"default","attributes":{"iconColor":{"type":"string"},"customIconColor":{"type":"string"},"iconColorValue":{"type":"string"},"iconBackgroundColor":{"type":"string"},"customIconBackgroundColor":{"type":"string"},"iconBackgroundColorValue":{"type":"string"},"openInNewTab":{"type":"boolean","default":false},"showLabels":{"type":"boolean","default":false},"size":{"type":"string"}},"providesContext":{"openInNewTab":"openInNewTab","showLabels":"showLabels","iconColor":"iconColor","iconColorValue":"iconColorValue","iconBackgroundColor":"iconBackgroundColor","iconBackgroundColorValue":"iconBackgroundColorValue"},"supports":{"align":["left","center","right"],"anchor":true,"html":false,"__experimentalExposeControlsToChildren":true,"layout":{"allowSwitching":false,"allowInheriting":false,"allowVerticalAlignment":false,"default":{"type":"flex"}},"color":{"enableContrastChecker":false,"background":true,"gradients":true,"text":false,"__experimentalDefaultControls":{"background":false}},"spacing":{"blockGap":["horizontal","vertical"],"margin":true,"padding":true,"units":["px","em","rem","vh","vw"],"__experimentalDefaultControls":{"blockGap":true,"margin":true,"padding":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}},"contentRole":true},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"logos-only","label":"Logos Only"},{"name":"pill-shape","label":"Pill Shape"}],"editorStyle":"wp-block-social-links-editor","style":"wp-block-social-links"}');const{name:Uj}=$j,qj={example:{innerBlocks:[{name:"core/social-link",attributes:{service:"wordpress",url:"https://wordpress.org"}},{name:"core/social-link",attributes:{service:"facebook",url:"https://www.facebook.com/WordPress/"}},{name:"core/social-link",attributes:{service:"twitter",url:"https://twitter.com/WordPress"}}]},icon:Nj,edit:Gj,save:function(e){const{attributes:{iconBackgroundColorValue:t,iconColorValue:o,showLabels:n,size:r}}=e,a=Dt(r,{"has-visible-labels":n,"has-icon-color":o,"has-icon-background-color":t}),i=ct.useBlockProps.save({className:a}),s=ct.useInnerBlocksProps.save(i);return(0,it.jsx)("ul",{...s})},deprecated:Ej},Wj=()=>jt({name:Uj,metadata:$j,settings:qj});var Zj=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M7 18h4.5v1.5h-7v-7H6V17L17 6h-4.5V4.5h7v7H18V7L7 18Z"})});const Jj=[{attributes:{height:{type:"number",default:100},width:{type:"number"}},migrate(e){const{height:t,width:o}=e;return{...e,width:void 0!==o?`${o}px`:void 0,height:void 0!==t?`${t}px`:void 0}},save:({attributes:e})=>(0,it.jsx)("div",{...ct.useBlockProps.save({style:{height:e.height,width:e.width},"aria-hidden":!0})})}];var Qj=Jj;const{useSpacingSizes:Kj}=jo(ct.privateApis);function Yj({label:e,onChange:t,isResizing:o,value:n=""}){const r=(0,xt.useInstanceId)(mt.__experimentalUnitControl,"block-spacer-height-input"),a=Kj(),[i]=(0,ct.useSettings)("spacing.units"),s=i?i.filter((e=>"%"!==e)):["px","em","rem","vw","vh"],l=(0,mt.__experimentalUseCustomUnits)({availableUnits:s,defaultValues:{px:100,em:10,rem:10,vw:10,vh:25}}),[c,u]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(n),d=(0,ct.isValueSpacingPreset)(n)?n:[c,o?"px":u].join("");return(0,it.jsx)(it.Fragment,{children:a?.length<2?(0,it.jsx)(mt.__experimentalUnitControl,{id:r,isResetValueOnUnitChange:!0,min:0,onChange:t,value:d,units:l,label:e,__next40pxDefaultSize:!0}):(0,it.jsx)(St.View,{className:"tools-panel-item-spacing",children:(0,it.jsx)(ct.__experimentalSpacingSizesControl,{values:{all:d},onChange:({all:e})=>{t(e)},label:e,sides:["all"],units:l,allowReset:!1,splitOnAxis:!1,showSideInLabel:!1})})})}function Xj({setAttributes:e,orientation:t,height:o,width:n,isResizing:r}){const a=vt();return(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{e({width:void 0,height:"100px"})},dropdownMenuProps:a,children:["horizontal"===t&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Width"),isShownByDefault:!0,hasValue:()=>void 0!==n,onDeselect:()=>e({width:void 0}),children:(0,it.jsx)(Yj,{label:(0,pt.__)("Width"),value:n,onChange:t=>e({width:t}),isResizing:r})}),"horizontal"!==t&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Height"),isShownByDefault:!0,hasValue:()=>"100px"!==o,onDeselect:()=>e({height:"100px"}),children:(0,it.jsx)(Yj,{label:(0,pt.__)("Height"),value:o,onChange:t=>e({height:t}),isResizing:r})})]})})}const{useSpacingSizes:eS}=jo(ct.privateApis),tS=({orientation:e,onResizeStart:t,onResize:o,onResizeStop:n,isSelected:r,isResizing:a,setIsResizing:i,...s})=>{const l=t=>"horizontal"===e?t.clientWidth:t.clientHeight,c=e=>`${l(e)}px`;return(0,it.jsx)(mt.ResizableBox,{className:Dt("block-library-spacer__resize-container",{"resize-horizontal":"horizontal"===e,"is-resizing":a,"is-selected":r}),onResizeStart:(e,n,r)=>{const a=c(r);t(a),o(a)},onResize:(e,t,n)=>{o(c(n)),a||i(!0)},onResizeStop:(e,t,o)=>{const r=l(o);n(`${r}px`),i(!1)},__experimentalShowTooltip:!0,__experimentalTooltipProps:{axis:"horizontal"===e?"x":"y",position:"corner",isVisible:a},showHandle:r,...s})};var oS=({attributes:e,isSelected:t,setAttributes:o,toggleSelection:n,context:r,__unstableParentLayout:a,className:i})=>{const s=(0,lt.useSelect)((e=>{const t=e(ct.store).getSettings();return t?.disableCustomSpacingSizes})),{orientation:l}=r,{orientation:c,type:u,default:{type:d}={}}=a||{},p="flex"===u||!u&&"flex"===d,m=!c&&p?"horizontal":c||l,{height:g,width:h,style:_={}}=e,{layout:x={}}=_,{selfStretch:b,flexSize:f}=x,y=eS(),[v,k]=(0,gt.useState)(!1),[w,C]=(0,gt.useState)(null),[j,S]=(0,gt.useState)(null),B=()=>n(!1),T=()=>n(!0),{__unstableMarkNextChangeAsNotPersistent:N}=(0,lt.useDispatch)(ct.store),P=e=>{T(),p&&o({style:{..._,layout:{...x,flexSize:e,selfStretch:"fixed"}}}),o({height:e}),C(null)},I=e=>{T(),p&&o({style:{..._,layout:{...x,flexSize:e,selfStretch:"fixed"}}}),o({width:e}),S(null)},D="horizontal"===m?j||f:w||f,M={height:"horizontal"===m?24:(()=>{if(!p)return w||(0,ct.getSpacingPresetCssVar)(g)||void 0})(),width:"horizontal"===m?(()=>{if(!p)return j||(0,ct.getSpacingPresetCssVar)(h)||void 0})():void 0,minWidth:"vertical"===m&&p?48:void 0,flexBasis:p?D:void 0,flexGrow:p&&v?0:void 0};(0,gt.useEffect)((()=>{const e=e=>{N(),o(e)};if(p&&"fill"!==b&&"fit"!==b&&void 0===f)if("horizontal"===m){const t=(0,ct.getCustomValueFromPreset)(h,y)||(0,ct.getCustomValueFromPreset)(g,y)||"100px";e({width:"0px",style:{..._,layout:{...x,flexSize:t,selfStretch:"fixed"}}})}else{const t=(0,ct.getCustomValueFromPreset)(g,y)||(0,ct.getCustomValueFromPreset)(h,y)||"100px";e({height:"0px",style:{..._,layout:{...x,flexSize:t,selfStretch:"fixed"}}})}else!p||"fill"!==b&&"fit"!==b?p||!b&&!f||e({..."horizontal"===m?{width:f}:{height:f},style:{..._,layout:{...x,flexSize:void 0,selfStretch:void 0}}}):e("horizontal"===m?{width:void 0}:{height:void 0})}),[_,f,g,m,p,x,b,o,y,h,N]);const z=(0,ct.useBlockEditingMode)();return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(St.View,{...(0,ct.useBlockProps)({style:M,className:Dt(i,{"custom-sizes-disabled":s})}),children:"default"===z&&(A=m,"horizontal"===A?(0,it.jsx)(tS,{minWidth:0,enable:{top:!1,right:!0,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:A,onResizeStart:B,onResize:S,onResizeStop:I,isSelected:t,isResizing:v,setIsResizing:k}):(0,it.jsx)(it.Fragment,{children:(0,it.jsx)(tS,{minHeight:0,enable:{top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},orientation:A,onResizeStart:B,onResize:C,onResizeStop:P,isSelected:t,isResizing:v,setIsResizing:k})}))}),!p&&(0,it.jsx)(Xj,{setAttributes:o,height:w||g,width:j||h,orientation:m,isResizing:v})]});var A};const nS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/spacer","title":"Spacer","category":"design","description":"Add white space between blocks and customize its height.","textdomain":"default","attributes":{"height":{"type":"string","default":"100px"},"width":{"type":"string"}},"usesContext":["orientation"],"supports":{"anchor":true,"spacing":{"margin":["top","bottom"],"__experimentalDefaultControls":{"margin":true}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-spacer-editor","style":"wp-block-spacer"}');var rS={to:[{type:"block",blocks:["core/separator"],transform:({anchor:e})=>(0,st.createBlock)("core/separator",{anchor:e||""})}]};const{name:aS}=nS,iS={icon:Zj,transforms:rS,edit:oS,save:function({attributes:e}){const{height:t,width:o,style:n}=e,{layout:{selfStretch:r}={}}=n||{},a="fill"===r||"fit"===r?void 0:t;return(0,it.jsx)("div",{...ct.useBlockProps.save({style:{height:(0,ct.getSpacingPresetCssVar)(a),width:(0,ct.getSpacingPresetCssVar)(o)},"aria-hidden":!0})})},deprecated:Qj},sS=()=>jt({name:aS,metadata:nS,settings:iS});var lS=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})});const cS={"subtle-light-gray":"#f3f4f5","subtle-pale-green":"#e9fbe5","subtle-pale-blue":"#e7f5fe","subtle-pale-pink":"#fcf0ef"},uS={content:{type:"rich-text",source:"rich-text"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"},colspan:{type:"string",source:"attribute",attribute:"colspan"},rowspan:{type:"string",source:"attribute",attribute:"rowspan"}},dS={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"rich-text",source:"rich-text",selector:"figcaption"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:uS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:uS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:uS}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0,__experimentalDefaultControls:{margin:!1,padding:!1}},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table",interactivity:{clientNavigation:!0}},save({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,caption:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.__experimentalGetBorderClassesAndStyles)(e),l=Dt(i.className,s.className,{"has-fixed-layout":t}),c=!ct.RichText.isEmpty(a),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n,colspan:r,rowspan:a},i)=>{const s=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:s||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0,colSpan:r,rowSpan:a},i)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,style:{...i.style,...s.style},children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:a,className:(0,ct.__experimentalGetElementClassName)("caption")})]})}},pS={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}},mS={attributes:{hasFixedLayout:{type:"boolean",default:!1},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:pS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:pS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:pS}}}},supports:{anchor:!0,align:!0,color:{__experimentalSkipSerialization:!0,gradients:!0,__experimentalDefaultControls:{background:!0,text:!0}},spacing:{margin:!0,padding:!0},typography:{fontSize:!0,lineHeight:!0,__experimentalFontFamily:!0,__experimentalFontStyle:!0,__experimentalFontWeight:!0,__experimentalLetterSpacing:!0,__experimentalTextTransform:!0,__experimentalTextDecoration:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{__experimentalSkipSerialization:!0,color:!0,style:!0,width:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}},__experimentalSelector:".wp-block-table > table"},save({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,caption:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.__experimentalGetBorderClassesAndStyles)(e),l=Dt(i.className,s.className,{"has-fixed-layout":t}),c=!ct.RichText.isEmpty(a),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n},r)=>{const a=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:a||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0},r)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,style:{...i.style,...s.style},children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:a})]})}},gS={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"},align:{type:"string",source:"attribute",attribute:"data-align"}},hS={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},caption:{type:"string",source:"html",selector:"figcaption",default:""},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:gS}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:gS}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:gS}}}},supports:{anchor:!0,align:!0,__experimentalSelector:".wp-block-table > table"},save:({attributes:e})=>{const{hasFixedLayout:t,head:o,body:n,foot:r,backgroundColor:a,caption:i}=e;if(!o.length&&!n.length&&!r.length)return null;const s=(0,ct.getColorClassName)("background-color",a),l=Dt(s,{"has-fixed-layout":t,"has-background":!!s}),c=!ct.RichText.isEmpty(i),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n},r)=>{const a=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:a||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0},r)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:i})]})},isEligible:e=>e.backgroundColor&&e.backgroundColor in cS&&!e.style,migrate:e=>({...e,backgroundColor:void 0,style:{color:{background:cS[e.backgroundColor]}}})},_S={content:{type:"string",source:"html"},tag:{type:"string",default:"td",source:"tag"},scope:{type:"string",source:"attribute",attribute:"scope"}},xS={attributes:{hasFixedLayout:{type:"boolean",default:!1},backgroundColor:{type:"string"},head:{type:"array",default:[],source:"query",selector:"thead tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:_S}}},body:{type:"array",default:[],source:"query",selector:"tbody tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:_S}}},foot:{type:"array",default:[],source:"query",selector:"tfoot tr",query:{cells:{type:"array",default:[],source:"query",selector:"td,th",query:_S}}}},supports:{align:!0},save({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,backgroundColor:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.getColorClassName)("background-color",a),s=Dt(i,{"has-fixed-layout":t,"has-background":!!i}),l=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o},n)=>(0,it.jsx)(ct.RichText.Content,{tagName:t,value:e,scope:"th"===t?o:void 0},n)))},t)))})};return(0,it.jsxs)("table",{className:s,children:[(0,it.jsx)(l,{type:"head",rows:o}),(0,it.jsx)(l,{type:"body",rows:n}),(0,it.jsx)(l,{type:"foot",rows:r})]})}};var bS=[dS,mS,hS,xS],fS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M13 5.5H4V4h9v1.5Zm7 7H4V11h16v1.5Zm-7 7H4V18h9v1.5Z"})}),yS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M7.5 5.5h9V4h-9v1.5Zm-3.5 7h16V11H4v1.5Zm3.5 7h9V18h-9v1.5Z"})}),vS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M11.111 5.5H20V4h-8.889v1.5ZM4 12.5h16V11H4v1.5Zm7.111 7H20V18h-8.889v1.5Z"})}),kS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M21 5c0-1.1-.9-2-2-2H5c-1 0-1.9.8-2 1.8V19.2c.1.9.9 1.7 1.8 1.8H19c1.1 0 2-.9 2-2V5ZM4.5 14V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v9h-15Zm4 5.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm5.5 0h-4v-4h4v4Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19ZM11.2 10h-3V8.5h3v-3h1.5v3h3V10h-3v3h-1.5v-3Z"})}),wS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm-9 1.5h4v4h-4v-4ZM4.5 5c0-.3.2-.5.5-.5h3.5v4h-4V5Zm15 14c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-8.3 10h1.5v-3h3V14h-3v-3h-1.5v3h-3v1.5h3v3Z"})}),CS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H4.8c-.9.1-1.7.9-1.8 1.8V19.2c.1 1 1 1.8 2 1.8h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2Zm.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-9h15v9Zm0-10.5h-15V5c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v3.5Zm-9.6 9.4 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1 2.1-2.1-1.1-1.1-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1Z"})}),jS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1 .8 1.9 1.8 2H19.2c.9-.1 1.7-.9 1.8-1.8V5c0-1.1-.9-2-2-2Zm-5 16.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h9v15Zm5.5-.5c0 .3-.2.5-.5.5h-3.5v-4h4V19Zm0-5h-4v-4h4v4Zm0-5.5h-4v-4H19c.3 0 .5.2.5.5v3.5Zm-11 7.3H10v-3h3v-1.5h-3v-3H8.5v3h-3v1.5h3v3Z"})}),SS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5v-3.5h4v4Zm0-5.5h-4v-4h4v4Zm0-5.5h-4V5c0-.3.2-.5.5-.5h3.5v4Zm11 10.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14Zm-4-10.8H14v3h-3v1.5h3v3h1.5v-3h3v-1.5h-3v-3Z"})}),BS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14.2c.1.9.9 1.7 1.8 1.8H19.2c1-.1 1.8-1 1.8-2V5c0-1.1-.9-2-2-2ZM8.5 19.5H5c-.3 0-.5-.2-.5-.5V5c0-.3.2-.5.5-.5h3.5v15Zm11-.5c0 .3-.2.5-.5.5h-9v-15h9c.3 0 .5.2.5.5v14ZM16.9 8.8l-2.1 2.1-2.1-2.1-1.1 1.1 2.1 2.1-2.1 2.1 1.1 1.1 2.1-2.1 2.1 2.1 1.1-1.1-2.1-2.1L18 9.9l-1.1-1.1Z"})}),TS=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.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 2v6.2h-6.8V4.4h6.2c.3 0 .5.2.5.5ZM5 4.5h6.2v6.8H4.4V5.1c0-.3.2-.5.5-.5ZM4.5 19v-6.2h6.8v6.8H5.1c-.3 0-.5-.2-.5-.5Zm14.5.5h-6.2v-6.8h6.8v6.2c0 .3-.2.5-.5.5Z"})});const NS=["align"];function PS(e,t,o){if(!t)return e;const n=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e)))),{sectionName:r,rowIndex:a}=t;return Object.fromEntries(Object.entries(n).map((([e,n])=>r&&r!==e?[e,n]:[e,n.map(((n,r)=>a&&a!==r?n:{cells:n.cells.map(((n,a)=>function(e,t){if(!e||!t)return!1;switch(t.type){case"column":return"column"===t.type&&e.columnIndex===t.columnIndex;case"cell":return"cell"===t.type&&e.sectionName===t.sectionName&&e.columnIndex===t.columnIndex&&e.rowIndex===t.rowIndex}}({sectionName:e,columnIndex:a,rowIndex:r},t)?o(n):n))}))])))}function IS(e,{sectionName:t,rowIndex:o,columnCount:n}){const r=function(e){return MS(e.head)?MS(e.body)?MS(e.foot)?void 0:e.foot[0]:e.body[0]:e.head[0]}(e),a=void 0===n?r?.cells?.length:n;return a?{[t]:[...e[t].slice(0,o),{cells:Array.from({length:a}).map(((e,o)=>{const n=r?.cells?.[o]??{};return{...Object.fromEntries(Object.entries(n).filter((([e])=>NS.includes(e)))),content:"",tag:"head"===t?"th":"td"}}))},...e[t].slice(o)]}:e}function DS(e,t){if(!MS(e[t]))return{[t]:[]};return IS(e,{sectionName:t,rowIndex:0,columnCount:e.body?.[0]?.cells?.length??1})}function MS(e){return!e||!e.length||e.every(zS)}function zS(e){return!(e.cells&&e.cells.length)}const AS=[{icon:fS,title:(0,pt.__)("Align column left"),align:"left"},{icon:yS,title:(0,pt.__)("Align column center"),align:"center"},{icon:vS,title:(0,pt.__)("Align column right"),align:"right"}],LS={head:(0,pt.__)("Header cell text"),body:(0,pt.__)("Body cell text"),foot:(0,pt.__)("Footer cell text")},HS={head:(0,pt.__)("Header label"),foot:(0,pt.__)("Footer label")};function RS({name:e,...t}){const o=`t${e}`;return(0,it.jsx)(o,{...t})}var VS=function({attributes:e,setAttributes:t,insertBlocksAfter:o,isSelected:n}){const{hasFixedLayout:r,head:a,foot:i}=e,[s,l]=(0,gt.useState)(2),[c,u]=(0,gt.useState)(2),[d,p]=(0,gt.useState)(),m=(0,ct.__experimentalUseColorProps)(e),g=(0,ct.__experimentalUseBorderProps)(e),h=(0,ct.useBlockEditingMode)(),_=(0,gt.useRef)(),[x,b]=(0,gt.useState)(!1),f=vt();function y(o){d&&t(PS(e,d,(e=>({...e,content:o}))))}function v(o){if(!d)return;const{sectionName:n,rowIndex:r}=d,a=r+o;t(IS(e,{sectionName:n,rowIndex:a})),p({sectionName:n,rowIndex:a,columnIndex:0,type:"cell"})}function k(o=0){if(!d)return;const{columnIndex:n}=d,r=n+o;t(function(e,{columnIndex:t}){const o=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(o).map((([e,o])=>MS(o)?[e,o]:[e,o.map((o=>zS(o)||o.cells.length<t?o:{cells:[...o.cells.slice(0,t),{content:"",tag:"head"===e?"th":"td"},...o.cells.slice(t)]}))])))}(e,{columnIndex:r})),p({rowIndex:0,columnIndex:r,type:"cell"})}(0,gt.useEffect)((()=>{n||p()}),[n]),(0,gt.useEffect)((()=>{x&&(_?.current?.querySelector('td div[contentEditable="true"]')?.focus(),b(!1))}),[x]);const w=["head","body","foot"].filter((t=>!MS(e[t]))),C=[{icon:kS,title:(0,pt.__)("Insert row before"),isDisabled:!d,onClick:function(){v(0)}},{icon:wS,title:(0,pt.__)("Insert row after"),isDisabled:!d,onClick:function(){v(1)}},{icon:CS,title:(0,pt.__)("Delete row"),isDisabled:!d,onClick:function(){if(!d)return;const{sectionName:o,rowIndex:n}=d;p(),t(function(e,{sectionName:t,rowIndex:o}){return{[t]:e[t].filter(((e,t)=>t!==o))}}(e,{sectionName:o,rowIndex:n}))}},{icon:jS,title:(0,pt.__)("Insert column before"),isDisabled:!d,onClick:function(){k(0)}},{icon:SS,title:(0,pt.__)("Insert column after"),isDisabled:!d,onClick:function(){k(1)}},{icon:BS,title:(0,pt.__)("Delete column"),isDisabled:!d,onClick:function(){if(!d)return;const{sectionName:o,columnIndex:n}=d;p(),t(function(e,{columnIndex:t}){const o=Object.fromEntries(Object.entries(e).filter((([e])=>["head","body","foot"].includes(e))));return Object.fromEntries(Object.entries(o).map((([e,o])=>MS(o)?[e,o]:[e,o.map((e=>({cells:e.cells.length>=t?e.cells.filter(((e,o)=>o!==t)):e.cells}))).filter((e=>e.cells.length))])))}(e,{sectionName:o,columnIndex:n}))}}],j=w.map((t=>(0,it.jsx)(RS,{name:t,children:e[t].map((({cells:e},o)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:n,scope:r,align:a,colspan:i,rowspan:s},l)=>(0,it.jsx)(n,{scope:"th"===n?r:void 0,colSpan:i,rowSpan:s,className:Dt({[`has-text-align-${a}`]:a},"wp-block-table__cell-content"),children:(0,it.jsx)(ct.RichText,{value:e,onChange:y,onFocus:()=>{p({sectionName:t,rowIndex:o,columnIndex:l,type:"cell"})},"aria-label":LS[t],placeholder:HS[t]})},l)))},o)))},t))),S=!w.length;return(0,it.jsxs)("figure",{...(0,ct.useBlockProps)({ref:_}),children:[!S&&"default"===h&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{label:(0,pt.__)("Change column alignment"),alignmentControls:AS,value:function(){if(d)return function(e,t,o){const{sectionName:n,rowIndex:r,columnIndex:a}=t;return e[n]?.[r]?.cells?.[a]?.[o]}(e,d,"align")}(),onChange:o=>function(o){if(!d)return;const n={type:"column",columnIndex:d.columnIndex},r=PS(e,n,(e=>({...e,align:o})));t(r)}(o)})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:TS,label:(0,pt.__)("Edit table"),controls:C})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({hasFixedLayout:!0,head:[],foot:[]})},dropdownMenuProps:f,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==r,label:(0,pt.__)("Fixed width table cells"),onDeselect:()=>t({hasFixedLayout:!0}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Fixed width table cells"),checked:!!r,onChange:function(){t({hasFixedLayout:!r})}})}),!S&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>a&&a.length,label:(0,pt.__)("Header section"),onDeselect:()=>t({head:[]}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Header section"),checked:!(!a||!a.length),onChange:function(){t(DS(e,"head"))}})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>i&&i.length,label:(0,pt.__)("Footer section"),onDeselect:()=>t({foot:[]}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Footer section"),checked:!(!i||!i.length),onChange:function(){t(DS(e,"foot"))}})})]})]})}),!S&&(0,it.jsx)("table",{className:Dt(m.className,g.className,{"has-fixed-layout":r,"has-individual-borders":(0,mt.__experimentalHasSplitBorders)(e?.style?.border)}),style:{...m.style,...g.style},children:j}),S?(0,it.jsx)(mt.Placeholder,{label:(0,pt.__)("Table"),icon:(0,it.jsx)(ct.BlockIcon,{icon:lS,showColors:!0}),instructions:(0,pt.__)("Insert a table for sharing data."),children:(0,it.jsxs)("form",{className:"blocks-table__placeholder-form",onSubmit:function(e){e.preventDefault(),t(function({rowCount:e,columnCount:t}){return{body:Array.from({length:e}).map((()=>({cells:Array.from({length:t}).map((()=>({content:"",tag:"td"})))})))}}({rowCount:parseInt(s,10)||2,columnCount:parseInt(c,10)||2})),b(!0)},children:[(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,pt.__)("Column count"),value:c,onChange:function(e){u(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,it.jsx)(mt.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"number",label:(0,pt.__)("Row count"),value:s,onChange:function(e){l(e)},min:"1",className:"blocks-table__placeholder-input"}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,pt.__)("Create Table")})]})}):(0,it.jsx)(zo,{attributes:e,setAttributes:t,isSelected:n,insertBlocksAfter:o,label:(0,pt.__)("Table caption text"),showToolbarButton:n&&"default"===h})]})};const FS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/table","title":"Table","category":"text","description":"Create structured content in rows and columns to display information.","textdomain":"default","attributes":{"hasFixedLayout":{"type":"boolean","default":true},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"head":{"type":"array","default":[],"source":"query","selector":"thead tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"body":{"type":"array","default":[],"source":"query","selector":"tbody tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}},"foot":{"type":"array","default":[],"source":"query","selector":"tfoot tr","query":{"cells":{"type":"array","default":[],"source":"query","selector":"td,th","query":{"content":{"type":"rich-text","source":"rich-text","role":"content"},"tag":{"type":"string","default":"td","source":"tag"},"scope":{"type":"string","source":"attribute","attribute":"scope"},"align":{"type":"string","source":"attribute","attribute":"data-align"},"colspan":{"type":"string","source":"attribute","attribute":"colspan"},"rowspan":{"type":"string","source":"attribute","attribute":"rowspan"}}}}}},"supports":{"anchor":true,"align":true,"color":{"__experimentalSkipSerialization":true,"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalDefaultControls":{"fontSize":true}},"__experimentalBorder":{"__experimentalSkipSerialization":true,"color":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"style":true,"width":true}},"interactivity":{"clientNavigation":true}},"selectors":{"root":".wp-block-table > table","spacing":".wp-block-table"},"styles":[{"name":"regular","label":"Default","isDefault":true},{"name":"stripes","label":"Stripes"}],"editorStyle":"wp-block-table-editor","style":"wp-block-table"}');function ES(e){const t=parseInt(e,10);if(Number.isInteger(t))return t<0||1===t?void 0:t.toString()}const OS=({phrasingContentSchema:e})=>({tr:{allowEmpty:!0,children:{th:{allowEmpty:!0,children:e,attributes:["scope","colspan","rowspan","style"]},td:{allowEmpty:!0,children:e,attributes:["colspan","rowspan","style"]}}}}),GS={from:[{type:"raw",selector:"table",schema:e=>({table:{children:{thead:{allowEmpty:!0,children:OS(e)},tfoot:{allowEmpty:!0,children:OS(e)},tbody:{allowEmpty:!0,children:OS(e)}}}}),transform:e=>{const t=Array.from(e.children).reduce(((e,t)=>{if(!t.children.length)return e;const o=t.nodeName.toLowerCase().slice(1),n=Array.from(t.children).reduce(((e,t)=>{if(!t.children.length)return e;const o=Array.from(t.children).reduce(((e,t)=>{const o=ES(t.getAttribute("rowspan")),n=ES(t.getAttribute("colspan")),{textAlign:r}=t.style||{};let a;return"left"!==r&&"center"!==r&&"right"!==r||(a=r),e.push({tag:t.nodeName.toLowerCase(),content:t.innerHTML,rowspan:o,colspan:n,align:a}),e}),[]);return e.push({cells:o}),e}),[]);return e[o]=n,e}),{});return(0,st.createBlock)("core/table",t)}}]};var $S=GS;const{name:US}=FS,qS={icon:lS,example:{attributes:{head:[{cells:[{content:(0,pt.__)("Version"),tag:"th"},{content:(0,pt.__)("Jazz Musician"),tag:"th"},{content:(0,pt.__)("Release Date"),tag:"th"}]}],body:[{cells:[{content:"5.2",tag:"td"},{content:(0,pt.__)("Jaco Pastorius"),tag:"td"},{content:(0,pt.__)("May 7, 2019"),tag:"td"}]},{cells:[{content:"5.1",tag:"td"},{content:(0,pt.__)("Betty Carter"),tag:"td"},{content:(0,pt.__)("February 21, 2019"),tag:"td"}]},{cells:[{content:"5.0",tag:"td"},{content:(0,pt.__)("Bebo Valdés"),tag:"td"},{content:(0,pt.__)("December 6, 2018"),tag:"td"}]}]},viewportWidth:450},transforms:$S,edit:VS,save:function({attributes:e}){const{hasFixedLayout:t,head:o,body:n,foot:r,caption:a}=e;if(!o.length&&!n.length&&!r.length)return null;const i=(0,ct.__experimentalGetColorClassesAndStyles)(e),s=(0,ct.__experimentalGetBorderClassesAndStyles)(e),l=Dt(i.className,s.className,{"has-fixed-layout":t}),c=!ct.RichText.isEmpty(a),u=({type:e,rows:t})=>{if(!t.length)return null;const o=`t${e}`;return(0,it.jsx)(o,{children:t.map((({cells:e},t)=>(0,it.jsx)("tr",{children:e.map((({content:e,tag:t,scope:o,align:n,colspan:r,rowspan:a},i)=>{const s=Dt({[`has-text-align-${n}`]:n});return(0,it.jsx)(ct.RichText.Content,{className:s||void 0,"data-align":n,tagName:t,value:e,scope:"th"===t?o:void 0,colSpan:r,rowSpan:a},i)}))},t)))})};return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[(0,it.jsxs)("table",{className:""===l?void 0:l,style:{...i.style,...s.style},children:[(0,it.jsx)(u,{type:"head",rows:o}),(0,it.jsx)(u,{type:"body",rows:n}),(0,it.jsx)(u,{type:"foot",rows:r})]}),c&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:a,className:(0,ct.__experimentalGetElementClassName)("caption")})]})},deprecated:bS},WS=()=>jt({name:US,metadata:FS,settings:qS});var ZS=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 9.484h-8.889v-1.5H20v1.5Zm0 7h-4.889v-1.5H20v1.5Zm-14 .032a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"}),(0,it.jsx)(St.Path,{d:"M13 15.516a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM8 8.484a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z"})]});const JS=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"__experimental":true,"name":"core/table-of-contents","title":"Table of Contents","category":"design","description":"Summarize your post with a list of headings. Add HTML anchors to Heading blocks to link them here.","keywords":["document outline","summary"],"textdomain":"default","attributes":{"headings":{"type":"array","items":{"type":"object"},"default":[]},"onlyIncludeCurrentPage":{"type":"boolean","default":false},"maxLevel":{"type":"number"},"ordered":{"type":"boolean","default":true}},"supports":{"ariaLabel":true,"html":false,"color":{"text":true,"background":true,"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"style":"wp-block-table-of-contents"}'),QS="wp-block-table-of-contents__entry";function KS({nestedHeadingList:e,disableLinkActivation:t,onClick:o,ordered:n=!0}){return(0,it.jsx)(it.Fragment,{children:e.map(((e,r)=>{const{content:a,link:i}=e.heading,s=i?(0,it.jsx)("a",{className:QS,href:i,"aria-disabled":t||void 0,onClick:t&&"function"==typeof o?o:void 0,children:a}):(0,it.jsx)("span",{className:QS,children:a}),l=n?"ol":"ul";return(0,it.jsxs)("li",{children:[s,e.children?(0,it.jsx)(l,{children:(0,it.jsx)(KS,{nestedHeadingList:e.children,disableLinkActivation:t,onClick:t&&"function"==typeof o?o:void 0,ordered:n})}):null]},r)}))})}function YS(e){const t=[];return e.forEach(((o,n)=>{if(""!==o.content&&o.level===e[0].level)if(e[n+1]?.level>o.level){let r=e.length;for(let t=n+1;t<e.length;t++)if(e[t].level===o.level){r=t;break}t.push({heading:o,children:YS(e.slice(n+1,r))})}else t.push({heading:o,children:null})})),t}var XS=r(7734),eB=r.n(XS);function tB(e,t,o){const{getBlockAttributes:n}=e(ct.store),{updateBlockAttributes:r,__unstableMarkNextChangeAsNotPersistent:a}=t(ct.store),i=n(o);if(null===i)return;const s=function(e,t){const{getBlockAttributes:o,getBlockName:n,getBlocksByName:r,getClientIdsOfDescendants:a}=e(ct.store),i=e("core/editor").getPermalink()??null,s=0!==r("core/nextpage").length,{onlyIncludeCurrentPage:l,maxLevel:c}=o(t)??{},[u=""]=r("core/post-content"),d=a(u);let p=1;if(s&&l){const e=d.indexOf(t);for(const[t,o]of d.entries()){if(t>=e)break;"core/nextpage"===n(o)&&p++}}const m=[];let g=1,h=null;"string"==typeof i&&(h=s?(0,no.addQueryArgs)(i,{page:g}):i);for(const e of d){const t=n(e);if("core/nextpage"===t){if(g++,l&&g>p)break;"string"==typeof i&&(h=(0,no.addQueryArgs)((0,no.removeQueryArgs)(i,["page"]),{page:g}))}else if((!l||g===p)&&"core/heading"===t){const t=o(e);if(c&&t.level>c)continue;const n="string"==typeof h&&"string"==typeof t.anchor&&""!==t.anchor;m.push({content:(0,lu.__unstableStripHTML)(t.content.replace(/(<br *\/?>)+/g," ")),level:t.level,link:n?`${h}#${t.anchor}`:null})}}return m}(e,o);eB()(s,i.headings)||window.queueMicrotask((()=>{a(),r(o,{headings:s})}))}const{name:oB}=JS,nB={icon:ZS,edit:function e({attributes:{headings:t=[],onlyIncludeCurrentPage:o,maxLevel:n,ordered:r=!0},clientId:a,setAttributes:i}){!function(e){const t=(0,lt.useRegistry)();(0,gt.useEffect)((()=>t.subscribe((()=>tB(t.select,t.dispatch,e)))),[t,e])}(a);const s=(0,ct.useBlockProps)(),l=(0,xt.useInstanceId)(e,"table-of-contents"),{createWarningNotice:c}=(0,lt.useDispatch)(bo.store),u=(0,lt.useSelect)((e=>{const{getBlockRootClientId:t,canInsertBlockType:o}=e(ct.store);return o("core/list",t(a))}),[a]),{replaceBlocks:d}=(0,lt.useDispatch)(ct.store),p=vt(),m=YS(t),g=(0,it.jsxs)(ct.BlockControls,{children:[(0,it.jsxs)(mt.ToolbarGroup,{children:[(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?Om:Gm,title:(0,pt.__)("Unordered"),description:(0,pt.__)("Convert to unordered list"),onClick:()=>i({ordered:!1}),isActive:!1===r}),(0,it.jsx)(mt.ToolbarButton,{icon:(0,pt.isRTL)()?$m:Um,title:(0,pt.__)("Ordered"),description:(0,pt.__)("Convert to ordered list"),onClick:()=>i({ordered:!0}),isActive:!0===r})]}),u&&(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>d(a,(0,st.createBlock)("core/list",{ordered:r,values:(0,gt.renderToString)((0,it.jsx)(KS,{nestedHeadingList:m,ordered:r}))})),children:(0,pt.__)("Convert to static list")})})]}),h=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{i({onlyIncludeCurrentPage:!1,maxLevel:void 0,ordered:!0})},dropdownMenuProps:p,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!o,label:(0,pt.__)("Only include current page"),onDeselect:()=>i({onlyIncludeCurrentPage:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Only include current page"),checked:o,onChange:e=>i({onlyIncludeCurrentPage:e}),help:o?(0,pt.__)("Only including headings from the current page (if the post is paginated)."):(0,pt.__)("Include headings from all pages (if the post is paginated).")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!n,label:(0,pt.__)("Limit heading levels"),onDeselect:()=>i({maxLevel:void 0}),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Include headings down to level"),value:n||"",options:[{value:"",label:(0,pt.__)("All levels")},{value:"1",label:(0,pt.__)("Heading 1")},{value:"2",label:(0,pt.__)("Heading 2")},{value:"3",label:(0,pt.__)("Heading 3")},{value:"4",label:(0,pt.__)("Heading 4")},{value:"5",label:(0,pt.__)("Heading 5")},{value:"6",label:(0,pt.__)("Heading 6")}],onChange:e=>i({maxLevel:e?parseInt(e):void 0}),help:n?(0,pt.__)("Only include headings up to and including this level."):(0,pt.__)("Including all heading levels in the table of contents.")})})]})});if(0===t.length)return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{...s,children:(0,it.jsx)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:ZS}),label:(0,pt.__)("Table of Contents"),instructions:(0,pt.__)("Start adding Heading blocks to create a table of contents. Headings with HTML anchors will be linked here.")})}),h]});const _=r?"ol":"ul";return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("nav",{...s,children:(0,it.jsx)(_,{children:(0,it.jsx)(KS,{nestedHeadingList:m,disableLinkActivation:!0,onClick:e=>{e.preventDefault(),c((0,pt.__)("Links are disabled in the editor."),{id:`block-library/core/table-of-contents/redirection-prevented/${l}`,type:"snackbar"})},ordered:r})})}),g,h]})},save:function({attributes:{headings:e=[],ordered:t=!0}}){if(0===e.length)return null;const o=t?"ol":"ul";return(0,it.jsx)("nav",{...ct.useBlockProps.save(),children:(0,it.jsx)(o,{children:(0,it.jsx)(KS,{nestedHeadingList:YS(e),ordered:t})})})},example:{innerBlocks:[{name:"core/heading",attributes:{level:2,content:(0,pt.__)("Heading")}},{name:"core/heading",attributes:{level:3,content:(0,pt.__)("Subheading")}},{name:"core/heading",attributes:{level:2,content:(0,pt.__)("Heading")}},{name:"core/heading",attributes:{level:3,content:(0,pt.__)("Subheading")}}],attributes:{headings:[{content:(0,pt.__)("Heading"),level:2},{content:(0,pt.__)("Subheading"),level:3},{content:(0,pt.__)("Heading"),level:2},{content:(0,pt.__)("Subheading"),level:3}]}}},rB=()=>jt({name:oB,metadata:JS,settings:nB});var aB={from:[{type:"block",blocks:["core/categories"],transform:()=>(0,st.createBlock)("core/tag-cloud")}],to:[{type:"block",blocks:["core/categories"],transform:()=>(0,st.createBlock)("core/categories")}]};const iB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/tag-cloud","title":"Tag Cloud","category":"widgets","description":"A cloud of popular keywords, each sized by how often it appears.","textdomain":"default","attributes":{"numberOfTags":{"type":"number","default":45,"minimum":1,"maximum":100},"taxonomy":{"type":"string","default":"post_tag"},"showTagCounts":{"type":"boolean","default":false},"smallestFontSize":{"type":"string","default":"8pt"},"largestFontSize":{"type":"string","default":"22pt"}},"styles":[{"name":"default","label":"Default","isDefault":true},{"name":"outline","label":"Outline"}],"supports":{"html":false,"align":true,"spacing":{"margin":true,"padding":true},"typography":{"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalLetterSpacing":true},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}},"editorStyle":"wp-block-tag-cloud-editor"}');var sB=function({attributes:e,setAttributes:t}){const{taxonomy:o,showTagCounts:n,numberOfTags:r,smallestFontSize:a,largestFontSize:i}=e,[s]=(0,ct.useSettings)("spacing.units"),l=vt(),c=(0,mt.__experimentalUseCustomUnits)({availableUnits:s?[...s,"pt"]:["%","px","em","rem","pt"]}),u=(0,lt.useSelect)((e=>e(_t.store).getTaxonomies({per_page:-1})),[]),d=(e,o)=>{const[n,r]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(o);if(!Number.isFinite(n))return;const s={[e]:o};Object.entries({smallestFontSize:a,largestFontSize:i}).forEach((([t,o])=>{const[n,a]=(0,mt.__experimentalParseQuantityAndUnitFromRawValue)(o);t!==e&&a!==r&&(s[t]=`${n}${r}`)})),t(s)},p={...e,style:{...e?.style,border:void 0}},m=(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({taxonomy:"post_tag",showTagCounts:!1,numberOfTags:45,smallestFontSize:"8pt",largestFontSize:"22pt"})},dropdownMenuProps:l,children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"post_tag"!==o,label:(0,pt.__)("Taxonomy"),onDeselect:()=>t({taxonomy:"post_tag"}),isShownByDefault:!0,children:(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Taxonomy"),options:[{label:(0,pt.__)("- Select -"),value:"",disabled:!0},...(u??[]).filter((e=>!!e.show_cloud)).map((e=>({value:e.slug,label:e.name})))],value:o,onChange:e=>t({taxonomy:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"8pt"!==a||"22pt"!==i,label:(0,pt.__)("Font size"),onDeselect:()=>t({smallestFontSize:"8pt",largestFontSize:"22pt"}),isShownByDefault:!0,children:(0,it.jsxs)(mt.Flex,{gap:4,children:[(0,it.jsx)(mt.FlexItem,{isBlock:!0,children:(0,it.jsx)(mt.__experimentalUnitControl,{label:(0,pt.__)("Smallest size"),value:a,onChange:e=>{d("smallestFontSize",e)},units:c,min:.1,max:100,size:"__unstable-large"})}),(0,it.jsx)(mt.FlexItem,{isBlock:!0,children:(0,it.jsx)(mt.__experimentalUnitControl,{label:(0,pt.__)("Largest size"),value:i,onChange:e=>{d("largestFontSize",e)},units:c,min:.1,max:100,size:"__unstable-large"})})]})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>45!==r,label:(0,pt.__)("Number of tags"),onDeselect:()=>t({numberOfTags:45}),isShownByDefault:!0,children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Number of tags"),value:r,onChange:e=>t({numberOfTags:e}),min:1,max:100,required:!0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==n,label:(0,pt.__)("Show tag counts"),onDeselect:()=>t({showTagCounts:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Show tag counts"),checked:n,onChange:()=>t({showTagCounts:!n})})})]})});return(0,it.jsxs)(it.Fragment,{children:[m,(0,it.jsx)("div",{...(0,ct.useBlockProps)(),children:(0,it.jsx)(mt.Disabled,{children:(0,it.jsx)(dt(),{skipBlockSupportAttributes:!0,block:"core/tag-cloud",attributes:p})})})]})};const{name:lB}=iB,cB={icon:Px,example:{},edit:sB,transforms:aB},uB=()=>jt({name:lB,metadata:iB,settings:cB});var dB=function(){return dB=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},dB.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function pB(e){return e.toLowerCase()}var mB=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],gB=/[^A-Z0-9]+/gi;function hB(e,t){void 0===t&&(t={});for(var o=t.splitRegexp,n=void 0===o?mB:o,r=t.stripRegexp,a=void 0===r?gB:r,i=t.transform,s=void 0===i?pB:i,l=t.delimiter,c=void 0===l?" ":l,u=_B(_B(e,n,"$1\0$2"),a,"\0"),d=0,p=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(p-1);)p--;return u.slice(d,p).split("\0").map(s).join(c)}function _B(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce((function(e,t){return e.replace(t,o)}),e)}function xB(e){return function(e){return e.charAt(0).toUpperCase()+e.substr(1)}(e.toLowerCase())}const bB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/template-part","title":"Template Part","category":"theme","description":"Edit the different global regions of your site, like the header, footer, sidebar, or create your own.","textdomain":"default","attributes":{"slug":{"type":"string"},"theme":{"type":"string"},"tagName":{"type":"string"},"area":{"type":"string"}},"supports":{"align":true,"html":false,"reusable":false,"renaming":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-template-part-editor"}');function fB(e,t){return void 0===t&&(t={}),function(e,t){return void 0===t&&(t={}),hB(e,dB({delimiter:"."},t))}(e,dB({delimiter:"-"},t))}function yB(e,t){const{templateParts:o,isResolving:n}=(0,lt.useSelect)((e=>{const{getEntityRecords:t,isResolving:o}=e(_t.store),n={per_page:-1};return{templateParts:t("postType","wp_template_part",n),isResolving:o("getEntityRecords",["postType","wp_template_part",n])}}),[]);return{templateParts:(0,gt.useMemo)((()=>o&&o.filter((o=>b_(o.theme,o.slug)!==t&&(!e||"uncategorized"===e||o.area===e)))||[]),[o,e,t]),isResolving:n}}function vB(e,t){return(0,lt.useSelect)((o=>{const n=e?`core/template-part/${e}`:"core/template-part",{getBlockRootClientId:r,getPatternsByBlockTypes:a}=o(ct.store);return a(n,r(t))}),[e,t])}function kB(e,t){const{saveEntityRecord:o}=(0,lt.useDispatch)(_t.store);return async(n=[],r=(0,pt.__)("Untitled Template Part"))=>{const a={title:r,slug:fB(r).replace(/[^\w-]+/g,"")||"wp-custom-part",content:(0,st.serialize)(n),area:e},i=await o("postType","wp_template_part",a);t({slug:i.slug,theme:i.theme,area:void 0})}}function wB(e){return(0,lt.useSelect)((t=>{const o=t(_t.store).getCurrentTheme()?.default_template_part_areas||[],n=o.find((t=>t.area===e)),r=o.find((e=>"uncategorized"===e.area));return{icon:n?.icon||r?.icon,label:n?.label||(0,pt.__)("Template Part"),tagName:n?.area_tag??"div"}}),[e])}function CB({areaLabel:e,onClose:t,onSubmit:o}){const[n,r]=(0,gt.useState)("");return(0,it.jsx)(mt.Modal,{title:(0,pt.sprintf)((0,pt.__)("Create new %s"),e.toLowerCase()),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,it.jsx)("form",{onSubmit:e=>{e.preventDefault(),o(n)},children:(0,it.jsxs)(mt.__experimentalVStack,{spacing:"5",children:[(0,it.jsx)(mt.TextControl,{label:(0,pt.__)("Name"),value:n,onChange:r,placeholder:(0,pt.__)("Custom Template Part"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,it.jsxs)(mt.__experimentalHStack,{justify:"right",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t(),r("")},children:(0,pt.__)("Cancel")}),(0,it.jsx)(mt.Button,{variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!n.length,__next40pxDefaultSize:!0,children:(0,pt.__)("Create")})]})]})})})}function jB({area:e,clientId:t,templatePartId:o,onOpenSelectionModal:n,setAttributes:r}){const{templateParts:a,isResolving:i}=yB(e,o),s=vB(e,t),{isBlockBasedTheme:l,canCreateTemplatePart:c}=(0,lt.useSelect)((e=>{const{getCurrentTheme:t,canUser:o}=e(_t.store);return{isBlockBasedTheme:t()?.is_block_theme,canCreateTemplatePart:o("create",{kind:"postType",name:"wp_template_part"})}}),[]),[u,d]=(0,gt.useState)(!1),p=wB(e),m=kB(e,r);return(0,it.jsxs)(mt.Placeholder,{icon:w_(p.icon),label:p.label,instructions:l?(0,pt.sprintf)((0,pt.__)("Choose an existing %s or create a new one."),p.label.toLowerCase()):(0,pt.sprintf)((0,pt.__)("Choose an existing %s."),p.label.toLowerCase()),children:[i&&(0,it.jsx)(mt.Spinner,{}),!i&&!(!a.length&&!s.length)&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:n,children:(0,pt.__)("Choose")}),!i&&l&&c&&(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:()=>{d(!0)},children:(0,pt.__)("Start blank")}),u&&(0,it.jsx)(CB,{areaLabel:p.label,onClose:()=>d(!1),onSubmit:e=>{m([],e)}})]})}function SB({setAttributes:e,onClose:t,templatePartId:o=null,area:n,clientId:r}){const[a,i]=(0,gt.useState)(""),{templateParts:s}=yB(n,o),l=(0,gt.useMemo)((()=>yk(s.map((e=>function(e){return{name:b_(e.theme,e.slug),title:e.title.rendered,blocks:(0,st.parse)(e.content.raw),templatePart:e}}(e))),a)),[s,a]),c=vB(n,r),u=(0,gt.useMemo)((()=>yk(c,a)),[c,a]),{createSuccessNotice:d}=(0,lt.useDispatch)(bo.store),p=!!l.length,m=!!u.length;return(0,it.jsxs)("div",{className:"block-library-template-part__selection-content",children:[(0,it.jsx)("div",{className:"block-library-template-part__selection-search",children:(0,it.jsx)(mt.SearchControl,{__nextHasNoMarginBottom:!0,onChange:i,value:a,label:(0,pt.__)("Search"),placeholder:(0,pt.__)("Search")})}),p&&(0,it.jsxs)("div",{children:[(0,it.jsx)("h2",{children:(0,pt.__)("Existing template parts")}),(0,it.jsx)(ct.__experimentalBlockPatternsList,{blockPatterns:l,onClickPattern:o=>{var n;n=o.templatePart,e({slug:n.slug,theme:n.theme,area:void 0}),d((0,pt.sprintf)((0,pt.__)('Template Part "%s" inserted.'),n.title?.rendered||n.slug),{type:"snackbar"}),t()}})]}),!p&&!m&&(0,it.jsx)(mt.__experimentalHStack,{alignment:"center",children:(0,it.jsx)("p",{children:(0,pt.__)("No results found.")})})]})}function BB(e){const t=(0,st.getPossibleBlockTransformations)([e]).filter((e=>{if(!e.transforms)return!0;const t=e.transforms?.from?.find((e=>e.blocks&&e.blocks.includes("*"))),o=e.transforms?.to?.find((e=>e.blocks&&e.blocks.includes("*")));return!t&&!o}));if(t.length)return(0,st.switchToBlockType)(e,t[0].name)}function TB(e=[]){return e.flatMap((e=>"core/legacy-widget"===e.name?BB(e):(0,st.createBlock)(e.name,e.attributes,TB(e.innerBlocks)))).filter((e=>!!e))}const NB={per_page:-1,_fields:"id,name,description,status,widgets"};function PB({area:e,setAttributes:t}){const[o,n]=(0,gt.useState)(""),[r,a]=(0,gt.useState)(!1),i=(0,lt.useRegistry)(),{sidebars:s,hasResolved:l}=(0,lt.useSelect)((e=>{const{getSidebars:t,hasFinishedResolution:o}=e(_t.store);return{sidebars:t(NB),hasResolved:o("getSidebars",[NB])}}),[]),{createErrorNotice:c}=(0,lt.useDispatch)(bo.store),u=kB(e,t),d=(0,gt.useMemo)((()=>{const e=(s??[]).filter((e=>"wp_inactive_widgets"!==e.id&&e.widgets.length>0)).map((e=>({value:e.id,label:e.name})));return e.length?[{value:"",label:(0,pt.__)("Select widget area")},...e]:[]}),[s]);if(!l)return(0,it.jsx)(mt.__experimentalSpacer,{marginBottom:"0"});if(l&&!d.length)return null;return(0,it.jsx)(mt.__experimentalSpacer,{marginBottom:"4",children:(0,it.jsxs)(mt.__experimentalHStack,{as:"form",onSubmit:async function(e){if(e.preventDefault(),r||!o)return;a(!0);const t=d.find((({value:e})=>e===o)),{getWidgets:n}=i.resolveSelect(_t.store),s=await n({sidebar:t.value,_embed:"about"}),l=new Set,p=s.flatMap((e=>{const t=function(e){if("block"!==e.id_base){let t;return t=e._embedded.about[0].is_multi?{idBase:e.id_base,instance:e.instance}:{id:e.id},BB((0,st.createBlock)("core/legacy-widget",t))}const t=(0,st.parse)(e.instance.raw.content,{__unstableSkipAutop:!0});if(!t.length)return;const o=t[0];return"core/widget-group"===o.name?(0,st.createBlock)((0,st.getGroupingBlockName)(),void 0,TB(o.innerBlocks)):o.innerBlocks.length>0?(0,st.cloneBlock)(o,void 0,TB(o.innerBlocks)):o}(e);return t||(l.add(e.id_base),[])}));await u(p,(0,pt.sprintf)((0,pt.__)("Widget area: %s"),t.label)),l.size&&c((0,pt.sprintf)((0,pt.__)("Unable to import the following widgets: %s."),Array.from(l).join(", ")),{type:"snackbar"}),a(!1)},children:[(0,it.jsx)(mt.FlexBlock,{children:(0,it.jsx)(mt.SelectControl,{label:(0,pt.__)("Import widget area"),value:o,options:d,onChange:e=>n(e),disabled:!d.length,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),(0,it.jsx)(mt.FlexItem,{style:{marginBottom:"8px",marginTop:"auto"},children:(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r||!o,children:(0,pt._x)("Import","button label")})})]})})}const{HTMLElementControl:IB}=jo(ct.privateApis);function DB({tagName:e,setAttributes:t,isEntityAvailable:o,templatePartId:n,defaultWrapper:r,hasInnerBlocks:a,clientId:i}){const[s,l]=(0,_t.useEntityProp)("postType","wp_template_part","area",n),[c,u]=(0,_t.useEntityProp)("postType","wp_template_part","title",n),d=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.default_template_part_areas||[]),[]).map((({label:e,area:t})=>({label:e,value:t})));return(0,it.jsxs)(it.Fragment,{children:[o&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Title"),value:c,onChange:e=>{u(e)},onFocus:e=>e.target.select()}),(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Area"),labelPosition:"top",options:d,value:s,onChange:l})]}),(0,it.jsx)(IB,{tagName:e||"",onChange:e=>t({tagName:e}),clientId:i,options:[{label:(0,pt.sprintf)((0,pt.__)("Default based on area (%s)"),`<${r}>`),value:""},{label:"<header>",value:"header"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<article>",value:"article"},{label:"<aside>",value:"aside"},{label:"<footer>",value:"footer"},{label:"<div>",value:"div"}]}),!a&&(0,it.jsx)(PB,{area:s,setAttributes:t})]})}function MB(e){return"contentOnly"!==(0,ct.useBlockEditingMode)()&&(e?void 0:ct.InnerBlocks.ButtonBlockAppender)}function zB(e){const t=(0,lt.useSelect)((e=>{const{getSettings:t}=e(ct.store);return t()?.supportsLayout}),[]),[o]=(0,ct.useSettings)("layout");if(t)return e?.inherit?o||{}:e}function AB({postId:e,layout:t,tagName:o,blockProps:n}){(0,ct.useBlockEditingMode)("disabled");const{content:r,editedBlocks:a}=(0,lt.useSelect)((t=>{if(!e)return{};const{getEditedEntityRecord:o}=t(_t.store),n=o("postType","wp_template_part",e,{context:"view"});return{editedBlocks:n.blocks,content:n.content}}),[e]),i=(0,gt.useMemo)((()=>{if(e)return a||(r&&"string"==typeof r?(0,st.parse)(r):[])}),[e,a,r]),s=(0,ct.useInnerBlocksProps)(n,{value:i,onInput:()=>{},onChange:()=>{},renderAppender:!1,layout:zB(t)});return(0,it.jsx)(o,{...s})}function LB({postId:e,hasInnerBlocks:t,layout:o,tagName:n,blockProps:r}){const a=(0,lt.useSelect)((e=>e(ct.store).getSettings().onNavigateToEntityRecord),[]),[i,s,l]=(0,_t.useEntityBlockEditor)("postType","wp_template_part",{id:e}),c=(0,ct.useInnerBlocksProps)(r,{value:i,onInput:s,onChange:l,renderAppender:MB(t),layout:zB(o)}),u="contentOnly"===(0,ct.useBlockEditingMode)()&&a?{onDoubleClick:()=>a({postId:e,postType:"wp_template_part"})}:{};return(0,it.jsx)(n,{...c,...u})}function HB({postId:e,hasInnerBlocks:t,layout:o,tagName:n,blockProps:r}){const{canViewTemplatePart:a,canEditTemplatePart:i}=(0,lt.useSelect)((t=>({canViewTemplatePart:!!t(_t.store).canUser("read",{kind:"postType",name:"wp_template_part",id:e}),canEditTemplatePart:!!t(_t.store).canUser("update",{kind:"postType",name:"wp_template_part",id:e})})),[e]);if(!a)return null;const s=i?LB:AB;return(0,it.jsx)(s,{postId:e,hasInnerBlocks:t,layout:o,tagName:n,blockProps:r})}function RB({isEntityAvailable:e,area:t,templatePartId:o,isTemplatePartSelectionOpen:n,setIsTemplatePartSelectionOpen:r}){const{templateParts:a}=yB(t,o),i=!!a.length;return e&&i&&("header"===t||"footer"===t)?(0,it.jsx)(mt.MenuItem,{onClick:()=>{r(!0)},"aria-expanded":n,"aria-haspopup":"dialog",children:(0,pt.__)("Replace")}):null}function VB({area:e,clientId:t,isEntityAvailable:o,onSelect:n}){const r=vB(e,t);return o&&!!r.length&&("header"===e||"footer"===e)?(0,it.jsx)(mt.PanelBody,{title:(0,pt.__)("Design"),children:(0,it.jsx)(ct.__experimentalBlockPatternsList,{label:(0,pt.__)("Templates"),blockPatterns:r,onClickPattern:n,showTitlesAsTooltip:!0})}):null}function FB(e,t){if("core/template-part"!==t)return e;if(e.variations){const t=(e,t)=>{const{area:o,theme:n,slug:r}=e;if(o)return o===t.area;if(!r)return!1;const{getCurrentTheme:a,getEntityRecord:i}=(0,lt.select)(_t.store),s=i("postType","wp_template_part",`${n||a()?.stylesheet}//${r}`);return s?.slug?s.slug===t.slug:s?.area===t.area},o=e.variations.map((e=>({...e,...!e.isActive&&{isActive:t},..."string"==typeof e.icon&&{icon:w_(e.icon)}})));return{...e,variations:o}}return e}const{name:EB}=bB,OB={icon:k_,__experimentalLabel:({slug:e,theme:t})=>{if(!e)return;const{getCurrentTheme:o,getEditedEntityRecord:n}=(0,lt.select)(_t.store),r=n("postType","wp_template_part",(t||o()?.stylesheet)+"//"+e);return r?(0,ao.decodeEntities)(r.title)||function(e,t){return void 0===t&&(t={}),hB(e,dB({delimiter:" ",transform:xB},t))}(r.slug||""):void 0},edit:function({attributes:e,setAttributes:t,clientId:o}){const{createSuccessNotice:n}=(0,lt.useDispatch)(bo.store),{editEntityRecord:r}=(0,lt.useDispatch)(_t.store),a=(0,lt.useSelect)((e=>e(_t.store).getCurrentTheme()?.stylesheet),[]),{slug:i,theme:s=a,tagName:l,layout:c={}}=e,u=b_(s,i),d=(0,ct.useHasRecursion)(u),[p,m]=(0,gt.useState)(!1),{isResolved:g,hasInnerBlocks:h,isMissing:_,area:x,onNavigateToEntityRecord:b,title:f,canUserEdit:y}=(0,lt.useSelect)((t=>{const{getEditedEntityRecord:n,hasFinishedResolution:r}=t(_t.store),{getBlockCount:a,getSettings:i}=t(ct.store),s=["postType","wp_template_part",u],l=u?n(...s):null,c=l?.area||e.area,d=!!u&&r("getEditedEntityRecord",s),p=!!d&&t(_t.store).canUser("update",{kind:"postType",name:"wp_template_part",id:u});return{hasInnerBlocks:a(o)>0,isResolved:d,isMissing:d&&(!l||0===Object.keys(l).length),area:c,onNavigateToEntityRecord:i().onNavigateToEntityRecord,title:l?.title,canUserEdit:!!p}}),[u,e.area,o]),v=wB(x),k=(0,ct.useBlockProps)(),w=!i,C=!w&&!_&&g,j=l||v.tagName;return!h&&(i&&!s||i&&_)?(0,it.jsx)(j,{...k,children:(0,it.jsx)(ct.Warning,{children:(0,pt.sprintf)((0,pt.__)("Template part has been deleted or is unavailable: %s"),i)})}):C&&d?(0,it.jsx)(j,{...k,children:(0,it.jsx)(ct.Warning,{children:(0,pt.__)("Block cannot be rendered inside itself.")})}):(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.RecursionProvider,{uniqueId:u,children:[C&&b&&y&&(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(mt.ToolbarButton,{onClick:()=>b({postId:u,postType:"wp_template_part"}),children:(0,pt.__)("Edit")})}),y&&(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(DB,{tagName:l,setAttributes:t,isEntityAvailable:C,templatePartId:u,defaultWrapper:v.tagName,hasInnerBlocks:h,clientId:o})}),w&&(0,it.jsx)(j,{...k,children:(0,it.jsx)(jB,{area:e.area,templatePartId:u,clientId:o,setAttributes:t,onOpenSelectionModal:()=>m(!0)})}),(0,it.jsx)(ct.BlockSettingsMenuControls,{children:({selectedClientIds:e})=>1!==e.length||o!==e[0]?null:(0,it.jsx)(RB,{isEntityAvailable:C,area:x,clientId:o,templatePartId:u,isTemplatePartSelectionOpen:p,setIsTemplatePartSelectionOpen:m})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(VB,{area:x,clientId:o,isEntityAvailable:C,onSelect:e=>(async e=>{await r("postType","wp_template_part",u,{blocks:e.blocks,content:(0,st.serialize)(e.blocks)}),n((0,pt.sprintf)((0,pt.__)('Template Part "%s" updated.'),f||i),{type:"snackbar"})})(e)})}),C&&(0,it.jsx)(HB,{tagName:j,blockProps:k,postId:u,hasInnerBlocks:h,layout:c}),!w&&!g&&(0,it.jsx)(j,{...k,children:(0,it.jsx)(mt.Spinner,{})})]}),p&&(0,it.jsx)(mt.Modal,{overlayClassName:"block-editor-template-part__selection-modal",title:(0,pt.sprintf)((0,pt.__)("Choose a %s"),v.label.toLowerCase()),onRequestClose:()=>m(!1),isFullScreen:!0,children:(0,it.jsx)(SB,{templatePartId:u,clientId:o,area:x,setAttributes:t,onClose:()=>m(!1)})})]})}},GB=()=>{(0,vl.addFilter)("blocks.registerBlockType","core/template-part",FB);const e=["core/post-template","core/post-content"];return(0,vl.addFilter)("blockEditor.__unstableCanInsertBlockType","core/block-library/removeTemplatePartsFromPostTemplates",((t,o,n,{getBlock:r,getBlockParentsByBlockName:a})=>{if("core/template-part"!==o.name)return t;for(const t of e){if(r(n)?.name===t||a(n,t).length)return!1}return!0})),jt({name:EB,metadata:bB,settings:OB})};var $B=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"M 12.841306,16.677917 12.001264,12.71529 Q 11.835801,11.930402 11.695793,11.417042 11.560029,10.89944 11.398809,10.568514 11.237588,10.237588 11,10 10.635133,9.6351329 10.219354,9.6351329 9.8078183,9.6308902 9.4387086,10 8.9932313,10.445477 8.8574668,11.022476 8.7259449,11.595233 8.7259449,12.155262 L 7.4955791,11.196425 Q 7.5719467,10.509117 7.8307477,9.9109045 8.0937915,9.3084495 8.6410921,8.7611489 9.1799075,8.2223335 9.7569066,8.086569 q 0.5812414,-0.1400071 1.1242994,0.046669 0.543058,0.1866762 0.975808,0.6194255 0.335168,0.3351686 0.581242,0.767918 0.24183,0.4285067 0.436992,1.0564174 0.195161,0.619426 0.381837,1.527351 l 0.364867,1.756453 1.883733,-1.883732 1.018234,1.018233 z"}),(0,it.jsx)(St.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]});const UB=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-count","title":"Term Count","category":"theme","description":"Displays the post count of a taxonomy term.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"bracketType":{"type":"string","enum":["none","round","square","curly","angle"],"default":"round"}},"supports":{"html":false,"color":{"gradients":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-count"}'),qB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 10 6 L 9.609375 9 L 7 9 L 7 10.5 L 9.4121094 10.5 L 9.0878906 13 L 7 13 L 7 14.5 L 8.890625 14.5 L 8.5 17.5 L 10 17.5 L 10.390625 14.5 L 12.890625 14.5 L 12.5 17.5 L 14 17.5 L 14.390625 14.5 L 17 14.5 L 17 13 L 14.587891 13 L 14.912109 10.5 L 17 10.5 L 17 9 L 15.109375 9 L 15.5 6 L 14 6 L 13.609375 9 L 11.109375 9 L 11.5 6 L 10 6 z M 10.912109 10.5 L 13.412109 10.5 L 13.087891 13 L 10.587891 13 L 10.912109 10.5 z"})}),WB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,3 c 0,0 1.5,4.004036 1.5,9 0,4.995964 -1.5,9 -1.5,9 H 20 c 0,0 1.5,-4.004036 1.5,-9 C 21.5,7.004036 20,3 20,3 Z M 5.5,21 C 5.5,21 4,16.995964 4,12 4,7.0040356 5.5,3 5.5,3 H 4 c 0,0 -1.5,4.004036 -1.5,9 0,4.995964 1.5,9 1.5,9 z"})}),ZB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 21.5,21 V 3 H 18 v 1.5 h 2 v 15 H 18 V 21 Z M 2.5,3 V 21 H 6 V 19.5 H 4 V 4.5 H 6 V 3 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z"})}),JB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z M 18.5,21 c 1.104567,0 2,-0.895433 2,-2 v -4 c 0,-1.104567 0.895433,-2 2,-2 v -2 c -1.104567,0 -2,-0.895433 -2,-2 V 5 c 0,-1.104567 -0.895433,-2 -2,-2 H 17 v 1.5 h 1.5 A 0.5,0.5 0 0 1 19,5 v 5 c 0,1.104567 0.895433,2 2,2 -1.104567,0 -2,0.895433 -2,2 v 5 c 0,0.276142 -0.223858,0.5 -0.5,0.5 H 17 V 21 Z M 5.5,3 c -1.1045668,0 -2,0.8954327 -2,2 v 4 c 0,1.104567 -0.8954332,2 -2,2 v 2 c 1.1045668,0 2,0.895433 2,2 v 4 c 0,1.104567 0.8954332,2 2,2 H 7 V 19.5 H 5.5 A 0.5,0.5 0 0 1 5,19 V 14 C 5,12.895433 4.1045668,12 3,12 4.1045668,12 5,11.104567 5,10 V 5 C 5,4.7238579 5.2238579,4.5 5.5,4.5 H 7 V 3 Z"})}),QB=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(mt.Path,{d:"M 18.970703,16.53125 23.5,12 18.970703,7.46875 17.910156,8.53125 21.378906,12 17.910156,15.46875 Z M 5.0292969,7.46875 0.5,12 5.0292969,16.53125 6.0898438,15.46875 2.6210938,12 6.0898438,8.53125 Z M 10,6 9.609375,9 H 7 v 1.5 H 9.4121094 L 9.0878906,13 H 7 v 1.5 H 8.890625 L 8.5,17.5 H 10 l 0.390625,-3 h 2.5 L 12.5,17.5 H 14 l 0.390625,-3 H 17 V 13 h -2.412109 l 0.324218,-2.5 H 17 V 9 H 15.109375 L 15.5,6 H 14 l -0.390625,3 h -2.5 L 11.5,6 Z m 0.912109,4.5 h 2.5 L 13.087891,13 h -2.5 z"})});function KB(e,t){const[o]=(0,_t.useEntityProp)("taxonomy",t,"count",e),n=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n;t&&(t[1]?o=t[2]?t[2]:t[1]:t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o);return(0,lt.useSelect)((e=>{if(!o||!n)return"";const{getEntityRecords:t}=e(_t.store),r=t("taxonomy",o,{slug:n,per_page:1});return r&&r[0]&&r[0].count||""}),[o,n])}(),r=Boolean(e&&t);return{hasContext:r,termCount:r?o||"":n}}const YB={none:{label:(0,pt.__)("No brackets"),icon:qB},round:{label:(0,pt.__)("Round brackets"),icon:WB,before:"(",after:")"},square:{label:(0,pt.__)("Square brackets"),icon:ZB,before:"[",after:"]"},curly:{label:(0,pt.__)("Curly brackets"),icon:JB,before:"{",after:"}"},angle:{label:(0,pt.__)("Angle brackets"),icon:QB,before:"<",after:">"}};const{name:XB}=UB,eT={icon:$B,edit:function({attributes:e,setAttributes:t,context:{termId:o,taxonomy:n}}){const{bracketType:r}=e,a=KB(o,n),i=a?.termCount||0,s=(0,ct.useBlockProps)(),l=Object.entries(YB).map((([e,{label:o,icon:n}])=>({role:"menuitemradio",title:o,isActive:r===e,icon:n,onClick:()=>{t({bracketType:e})}})));return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(mt.ToolbarDropdownMenu,{icon:YB[r]?.icon??qB,label:(0,pt.__)("Change bracket type"),controls:l})}),(0,it.jsx)("div",{...s,children:((e,t)=>{const{before:o="",after:n=""}=YB[t]||{};return`${o}${e}${n}`})(i,r)})]})}},tT=()=>jt({name:XB,metadata:UB,settings:eT});var oT=(0,it.jsx)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,it.jsx)(St.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})});const nT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-description","title":"Term Description","category":"theme","description":"Display the description of categories, tags and custom taxonomies when viewing an archive.","textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"}},"supports":{"align":["wide","full"],"html":false,"color":{"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":true,"color":true,"width":true,"style":true}}}}');function rT(e,t){const[o,n,r]=(0,_t.useEntityProp)("taxonomy",t,"description",e),a=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n;t&&(t[1]?o=t[2]?t[2]:t[1]:t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o);return(0,lt.useSelect)((e=>{if(!o||!n)return"";const{getEntityRecords:t}=e(_t.store),r=t("taxonomy",o,{slug:n,per_page:1});return r&&r[0]&&r[0].description||""}),[o,n])}(),i=Boolean(e&&t);return{hasContext:i,setDescription:n,termDescription:i?r?.rendered||o||"":a}}const{name:aT}=nT,iT={icon:oT,edit:function({attributes:e,setAttributes:t,mergedStyle:o,context:{termId:n,taxonomy:r}}){const{textAlign:a}=e,{termDescription:i}=rT(n,r),s=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${a}`]:a}),style:o});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{group:"block",children:(0,it.jsx)(ct.AlignmentControl,{value:a,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)("div",{...s,children:i?(0,it.jsx)("div",{dangerouslySetInnerHTML:{__html:i}}):(0,it.jsx)("div",{className:"wp-block-term-description__placeholder",children:(0,it.jsx)("span",{children:(0,pt.__)("Term Description")})})})]})},example:{}},sT=()=>jt({name:aT,metadata:nT,settings:iT});var lT=(0,it.jsxs)(St.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,it.jsx)(St.Path,{d:"m14.95 13.889-1.061 1.061-5.552-5.553 1.06-1.06 5.552 5.552Z"}),(0,it.jsx)(St.Path,{d:"M12.574 4a.75.75 0 0 1 .53.22l6.723 6.724a2.315 2.315 0 0 1 0 3.264l-.532-.528.531.53-5.61 5.611a2.31 2.31 0 0 1-3.276.001l-6.72-6.716a.75.75 0 0 1-.22-.53V4.75A.75.75 0 0 1 4.75 4h7.824ZM5.5 5.5v6.764l6.501 6.497a.817.817 0 0 0 .889.178.816.816 0 0 0 .264-.178l5.61-5.61a.816.816 0 0 0-.001-1.149l-6.5-6.502H5.5Z"})]});const cT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-name","title":"Term Name","category":"theme","description":"Displays the name of a taxonomy term.","keywords":["term title"],"textdomain":"default","usesContext":["termId","taxonomy"],"attributes":{"textAlign":{"type":"string"},"level":{"type":"number","default":0},"isLink":{"type":"boolean","default":false}},"supports":{"align":["wide","full"],"html":false,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true,"link":true}},"spacing":{"padding":true},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"color":true,"width":true,"style":true}}},"style":"wp-block-term-name"}');function uT(e,t){const o=(0,lt.useSelect)((o=>e&&t?o(_t.store).getEntityRecord("taxonomy",t,e):null),[e,t]),n=function(){const e=(0,lt.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:o,getCurrentTemplateId:n}=e("core/editor"),r=o(),a=n()||("wp_template"===r?t():null);return a?e(_t.store).getEditedEntityRecord("postType","wp_template",a)?.slug:null}),[]),t=e?.match(/^(category|tag|taxonomy-([^-]+))$|^(((category|tag)|taxonomy-([^-]+))-(.+))$/);let o,n;t&&(t[3]&&(o=t[6]?t[6]:t[4],n=t[7]),o="tag"===o?"post_tag":o);return(0,lt.useSelect)((e=>{if(!o||!n)return null;const{getEntityRecords:t}=e(_t.store),r=t("taxonomy",o,{slug:n,per_page:1});return r&&r[0]?r[0]:null}),[o,n])}(),r=Boolean(e&&t);return{hasContext:r,term:r?o:n}}const{name:dT}=cT,pT={icon:lT,edit:function({attributes:e,setAttributes:t,context:{termId:o,taxonomy:n}}){const{textAlign:r,level:a=0,isLink:i}=e,{term:s}=uT(o,n),l=s?.name?(0,ao.decodeEntities)(s.name):(0,pt.__)("Term Name"),c=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${r}`]:r})}),u=vt(),d=0===a?"p":`h${a}`;let p=l;return i&&(p=(0,it.jsx)("a",{href:"#term-name-pseudo-link",onClick:e=>e.preventDefault(),children:l})),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsxs)(ct.BlockControls,{group:"block",children:[(0,it.jsx)(ct.HeadingLevelDropdown,{value:a,options:[0,1,2,3,4,5,6],onChange:e=>{t({level:e})}}),(0,it.jsx)(ct.AlignmentControl,{value:r,onChange:e=>{t({textAlign:e})}})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{t({isLink:!1})},dropdownMenuProps:u,children:(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!i,label:(0,pt.__)("Make term name a link"),onDeselect:()=>t({isLink:!1}),isShownByDefault:!0,children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Make term name a link"),onChange:()=>t({isLink:!i}),checked:i})})})}),(0,it.jsx)(d,{...c,children:p})]})}},mT=()=>jt({name:dT,metadata:cT,settings:pT}),gT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/terms-query","title":"Terms Query","category":"theme","description":"An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.","keywords":["terms","taxonomy","categories","tags","list"],"textdomain":"default","attributes":{"termQuery":{"type":"object","default":{"perPage":10,"taxonomy":"category","order":"asc","orderBy":"name","include":[],"hideEmpty":true,"showNested":false,"inherit":false}},"tagName":{"type":"string","default":"div"}},"usesContext":["templateSlug"],"providesContext":{"termQuery":"termQuery"},"supports":{"align":["wide","full"],"html":false,"layout":true,"interactivity":true}}');function hT(){const e=(0,lt.useSelect)((e=>e(_t.store).getTaxonomies({per_page:-1})),[]);return(0,gt.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))||[]),[e])}function _T({value:e,onChange:t,...o}){const n=hT().map((e=>({label:e.name,value:e.slug})));return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:n,value:e,onChange:t,...o})}function xT({orderBy:e,order:t,onChange:o,...n}){return(0,it.jsx)(mt.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,options:[{label:(0,pt.__)("Name: A → Z"),value:"name/asc"},{label:(0,pt.__)("Name: Z → A"),value:"name/desc"},{label:(0,pt.__)("Count, high to low"),value:"count/desc"},{label:(0,pt.__)("Count, low to high"),value:"count/asc"}],value:e+"/"+t,onChange:e=>{const[t,n]=e.split("/");o(t,n)},...n})}function bT({value:e,onChange:t,...o}){return(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:!e,onChange:e=>t(!e),...o})}function fT({value:e,onChange:t,...o}){return(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,checked:e,onChange:t,...o})}function yT({value:e,onChange:t,label:o}){return(0,it.jsxs)(mt.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:o,isBlock:!0,onChange:e=>{t({inherit:"default"===e})},help:e?(0,pt.__)("Display terms based on the current taxonomy archive. For hierarchical taxonomies, shows children of the current term. For non-hierarchical taxonomies, shows all terms."):(0,pt.__)("Display terms based on specific criteria."),value:e?"default":"custom",children:[(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"default",label:(0,pt.__)("Default")}),(0,it.jsx)(mt.__experimentalToggleGroupControlOption,{value:"custom",label:(0,pt.__)("Custom")})]})}function vT({value:e,onChange:t,...o}){return(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:e,min:0,max:100,onChange:t,help:(0,pt.__)("Limit the number of terms you want to show. To show all terms, use 0 (zero)."),...o})}const{HTMLElementControl:kT}=jo(ct.privateApis);function wT({TagName:e,setAttributes:t,clientId:o}){return(0,it.jsx)(ct.InspectorControls,{group:"advanced",children:(0,it.jsx)(kT,{tagName:e,onChange:e=>t({tagName:e}),clientId:o,options:[{label:(0,pt.__)("Default (<div>)"),value:"div"},{label:"<main>",value:"main"},{label:"<section>",value:"section"},{label:"<aside>",value:"aside"}]})})}const CT=[],jT={order:"asc",_fields:"id,name",context:"view"};function ST({value:e,taxonomy:t,onChange:o,...n}){const[r,a]=(0,gt.useState)(""),[i,s]=(0,gt.useState)(CT),[l,c]=(0,gt.useState)(CT),u=(0,xt.useDebounce)(a,250),{searchResults:d,searchHasResolved:p}=(0,lt.useSelect)((o=>{if(!r)return{searchResults:CT,searchHasResolved:!0};const{getEntityRecords:n,hasFinishedResolution:a}=o(_t.store),i=["taxonomy",t,{...jT,search:r,orderby:"name",exclude:e,per_page:20}];return{searchResults:n(...i),searchHasResolved:a("getEntityRecords",i)}}),[r,t,e]),m=(0,lt.useSelect)((o=>{if(!e?.length)return CT;const{getEntityRecords:n}=o(_t.store);return n("taxonomy",t,{...jT,include:e,per_page:e.length})}),[e,t]);(0,gt.useEffect)((()=>{if(e?.length||s(CT),!m?.length)return;const t=e.reduce(((e,t)=>{const o=m.find((e=>e.id===t));return o&&e.push({id:t,value:(0,ao.decodeEntities)(o.name)}),e}),[]);s(t)}),[e,m]);const g=(0,gt.useMemo)((()=>{if(!d?.length)return{names:CT,mapByName:{}};const e=[],t={};return d.forEach((o=>{const n=(0,ao.decodeEntities)(o.name);e.push(n),t[n]=o})),{names:e,mapByName:t}}),[d]);(0,gt.useEffect)((()=>{p&&c(g.names)}),[g.names,p]);return(0,it.jsx)(mt.FormTokenField,{__next40pxDefaultSize:!0,value:i,onInputChange:u,suggestions:l,onChange:e=>{const t=Array.from(e.reduce(((e,t)=>{const o=((e,t)=>t?.id||e?.[t]?.id)(g.mapByName,t);return o&&e.add(o),e}),new Set));c(CT),o(t)},__experimentalShowHowTo:!1,__nextHasNoMarginBottom:!0,...n})}function BT({attributes:e,setQuery:t,setAttributes:o,clientId:n,templateSlug:r}){const{termQuery:a,tagName:i}=e,{taxonomy:s,orderBy:l,order:c,hideEmpty:u,inherit:d,showNested:p,perPage:m,include:g}=a,h=vt(),_=hT(),x=_.find((e=>e.slug===s))?.hierarchical,b=!!d,f=["taxonomy","category","tag","archive"].includes(r)||r?.startsWith("taxonomy-")||r?.startsWith("category-")||r?.startsWith("tag-"),y=x,v=!!g?.length,k=(0,pt.__)("Query type"),w=(0,pt.__)("Taxonomy"),C=(0,pt.__)("Order by"),j=(0,pt.__)("Show empty terms"),S=(0,pt.__)("Show nested terms"),B=(0,pt.__)("Max terms"),T=(0,pt.__)("Selected terms");return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{o({termQuery:{taxonomy:"category",order:"asc",orderBy:"name",include:[],hideEmpty:!0,showNested:!1,inherit:!1,perPage:10}})},dropdownMenuProps:h,children:[f&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==d,label:k,onDeselect:()=>t({inherit:!1}),isShownByDefault:!0,children:(0,it.jsx)(yT,{label:k,value:d,onChange:t})}),!b&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"category"!==s,label:w,onDeselect:()=>{t({taxonomy:"category"})},isShownByDefault:!0,children:(0,it.jsx)(_T,{label:w,value:s,onChange:e=>t({taxonomy:e,include:[]})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>"name"!==l||"asc"!==c,label:C,onDeselect:()=>t({orderBy:"name",order:"asc"}),isShownByDefault:!0,children:(0,it.jsx)(xT,{label:C,orderBy:l,order:c,onChange:(e,o)=>{t({orderBy:e,order:o})},disabled:v,help:v?(0,pt.__)("When specific terms are selected, the order is based on their selection order."):void 0})}),!b&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!!g?.length,label:T,onDeselect:()=>t({include:[],orderBy:"name",order:"asc"}),isShownByDefault:!0,children:(0,it.jsx)(ST,{label:T,taxonomy:s,value:g,onChange:e=>t({include:e})})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!0!==u,label:j,onDeselect:()=>t({hideEmpty:!0}),isShownByDefault:!0,children:(0,it.jsx)(bT,{label:j,value:u,onChange:e=>t({hideEmpty:e})})}),y&&(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>!1!==p,label:S,onDeselect:()=>t({showNested:!1}),isShownByDefault:!0,children:(0,it.jsx)(fT,{label:S,value:p,onChange:e=>t({showNested:e}),disabled:v,help:v?(0,pt.__)("When specific terms are selected, only those are displayed."):void 0})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{hasValue:()=>10!==m,label:B,onDeselect:()=>t({perPage:10}),isShownByDefault:!0,children:(0,it.jsx)(vT,{label:B,value:m,onChange:e=>t({perPage:e})})})]})}),(0,it.jsx)(wT,{TagName:i,setAttributes:o,clientId:n})]})}const TT=[["core/term-template"]];function NT({attributes:e,setAttributes:t,clientId:o,context:n}){const{tagName:r}=e,a=(0,ct.useBlockProps)(),i=(0,ct.useInnerBlocksProps)(a,{template:TT}),s=(0,gt.useCallback)((e=>t((t=>({termQuery:{...t.termQuery,...e}})))),[t]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(BT,{attributes:e,setQuery:s,setAttributes:t,clientId:o,templateSlug:n?.templateSlug}),(0,it.jsx)(r,{...i})]})}function PT({attributes:e,clientId:t,name:o}){const{blockType:n,activeBlockVariation:r,scopeVariations:a}=(0,lt.useSelect)((t=>{const{getActiveBlockVariation:n,getBlockType:r,getBlockVariations:a}=t(st.store);return{blockType:r(o),activeBlockVariation:n(o,e),scopeVariations:a(o,"block")}}),[o,e]),i=r?.icon?.src||r?.icon||n?.icon?.src,s=r?.title||n?.title,{replaceInnerBlocks:l}=(0,lt.useDispatch)(ct.store),c=(0,ct.useBlockProps)();return(0,it.jsx)("div",{...c,children:(0,it.jsx)(ct.__experimentalBlockVariationPicker,{icon:i,label:s,variations:a,onSelect:e=>{e.innerBlocks&&l(t,(0,st.createBlocksFromInnerBlocksTemplate)(e.innerBlocks),!1)}})})}var IT=e=>{const t=(0,lt.useSelect)((t=>!!t(ct.store).getBlocks(e.clientId).length),[e.clientId])?NT:PT;return(0,it.jsx)(t,{...e})};const DT=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z"})}),MT=(0,it.jsx)(mt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",children:(0,it.jsx)(mt.Path,{d:"m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z"})}),zT=["core/term-name",{isLink:!0}];var AT=[{name:"name",title:(0,pt.__)("Name"),description:(0,pt.__)("Display the terms' names."),attributes:{},icon:DT,scope:["block"],innerBlocks:[["core/term-template",{},[zT]]]},{name:"name-count",title:(0,pt.__)("Name & Count"),description:(0,pt.__)("Display the terms' names and number of posts assigned to each term."),attributes:{},icon:MT,scope:["block"],innerBlocks:[["core/term-template",{},[["core/group",{layout:{type:"flex",flexWrap:"nowrap"}},[zT,["core/term-count"]]]]]]}];const{name:LT}=gT,HT={icon:Fv,edit:IT,save:function({attributes:{tagName:e="div"}}){const t=ct.useBlockProps.save(),o=ct.useInnerBlocksProps.save(t);return(0,it.jsx)(e,{...o})},example:{},variations:AT},RT=()=>jt({name:LT,metadata:gT,settings:HT}),VT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/term-template","title":"Term Template","category":"theme","ancestor":["core/terms-query"],"description":"Contains the block elements used to render a taxonomy term, like the name, description, and more.","textdomain":"default","usesContext":["termQuery"],"supports":{"reusable":false,"html":false,"align":["wide","full"],"layout":true,"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalFontWeight":true,"__experimentalFontStyle":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalLetterSpacing":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"blockGap":{"__experimentalDefault":"1.25em"},"__experimentalDefaultControls":{"blockGap":true,"padding":false,"margin":false}},"interactivity":{"clientNavigation":true},"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true}},"style":"wp-block-term-template","editorStyle":"wp-block-term-template-editor"}'),FT=[["core/term-name"]];function ET({classList:e}){const t=(0,ct.useInnerBlocksProps)({className:Dt("wp-block-term",e)},{template:FT,__unstableDisableLayoutClassNames:!0});return(0,it.jsx)("li",{...t})}const OT=(0,gt.memo)((function({blocks:e,blockContextId:t,classList:o,isHidden:n,setActiveBlockContextId:r}){const a=(0,ct.__experimentalUseBlockPreview)({blocks:e,props:{className:Dt("wp-block-term",o)}}),i=()=>{r(t)},s={display:n?"none":void 0};return(0,it.jsx)("li",{...a,tabIndex:0,role:"button",onClick:i,onKeyPress:i,style:s})}));const{name:GT}=VT,$T={icon:Oa,edit:function({clientId:e,attributes:{layout:t},setAttributes:o,context:{termQuery:{taxonomy:n,order:r,orderBy:a,hideEmpty:i,showNested:s=!1,perPage:l,include:c}={}},__unstableLayoutClassNames:u}){const{type:d,columnCount:p=3}=t||{},[m,g]=(0,gt.useState)(),h={hide_empty:i,order:r,orderby:a,per_page:l||-1};s||c?.length||(h.parent=0),c?.length&&(h.include=c,h.orderby="include",h.order="asc");const{records:_}=(0,_t.useEntityRecords)("taxonomy",n,h),x=(0,lt.useSelect)((t=>t(ct.store).getBlocks(e)),[e]),b=(0,ct.useBlockProps)({className:u}),f=(0,gt.useMemo)((()=>_?.map((e=>({taxonomy:n,termId:e.id,classList:`term-${e.id}`,termData:e})))),[_,n]);if(!_)return(0,it.jsx)("ul",{...b,children:(0,it.jsx)("li",{className:"wp-block-term term-loading",children:(0,it.jsx)("div",{className:"term-loading-placeholder"})})});if(!_.length)return(0,it.jsxs)("p",{...b,children:[" ",(0,pt.__)("No terms found.")]});const y=e=>o((t=>({layout:{...t.layout,...e}})));return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(mt.ToolbarGroup,{controls:[{icon:jm,title:(0,pt._x)("List view","Term template block display setting"),onClick:()=>y({type:"default"}),isActive:"default"===d||"constrained"===d},{icon:qd,title:(0,pt._x)("Grid view","Term template block display setting"),onClick:()=>y({type:"grid",columnCount:p}),isActive:"grid"===d}]})}),(0,it.jsx)("ul",{...b,children:f?.map((e=>(0,it.jsxs)(ct.BlockContextProvider,{value:e,children:[e.termId===(m||f[0]?.termId)?(0,it.jsx)(ET,{classList:e.classList}):null,(0,it.jsx)(OT,{blocks:x,blockContextId:e.termId,classList:e.classList,setActiveBlockContextId:g,isHidden:e.termId===(m||f[0]?.termId)})]},e.termId)))})]})},save:function(){return(0,it.jsx)(ct.InnerBlocks.Content,{})},example:{}},UT=()=>jt({name:GT,metadata:VT,settings:$T});const qT=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/text-columns","title":"Text Columns (deprecated)","icon":"columns","category":"design","description":"This block is deprecated. Please use the Columns block instead.","textdomain":"default","attributes":{"content":{"type":"array","source":"query","selector":"p","query":{"children":{"type":"string","source":"html"}},"default":[{},{}]},"columns":{"type":"number","default":2},"width":{"type":"string"}},"supports":{"inserter":false,"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-text-columns-editor","style":"wp-block-text-columns"}');var WT={to:[{type:"block",blocks:["core/columns"],transform:({className:e,columns:t,content:o,width:n})=>(0,st.createBlock)("core/columns",{align:"wide"===n||"full"===n?n:void 0,className:e,columns:t},o.map((({children:e})=>(0,st.createBlock)("core/column",{},[(0,st.createBlock)("core/paragraph",{content:e})]))))}]};const{name:ZT}=qT,JT={transforms:WT,getEditWrapperProps(e){const{width:t}=e;if("wide"===t||"full"===t)return{"data-align":t}},edit:function({attributes:e,setAttributes:t}){const{width:o,content:n,columns:r}=e;return Wm()("The Text Columns block",{since:"5.3",alternative:"the Columns block"}),(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.BlockAlignmentToolbar,{value:o,onChange:e=>t({width:e}),controls:["center","wide","full"]})}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsx)(mt.PanelBody,{children:(0,it.jsx)(mt.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,pt.__)("Columns"),value:r,onChange:e=>t({columns:e}),min:2,max:4,required:!0})})}),(0,it.jsx)("div",{...(0,ct.useBlockProps)({className:`align${o} columns-${r}`}),children:Array.from({length:r}).map(((e,o)=>(0,it.jsx)("div",{className:"wp-block-column",children:(0,it.jsx)(ct.RichText,{tagName:"p",value:n?.[o]?.children,onChange:e=>{t({content:[...n.slice(0,o),{children:e},...n.slice(o+1)]})},"aria-label":(0,pt.sprintf)((0,pt.__)("Column %d text"),o+1),placeholder:(0,pt.__)("New Column")})},`column-${o}`)))})]})},save:function({attributes:e}){const{width:t,content:o,columns:n}=e;return(0,it.jsx)("div",{...ct.useBlockProps.save({className:`align${t} columns-${n}`}),children:Array.from({length:n}).map(((e,t)=>(0,it.jsx)("div",{className:"wp-block-column",children:(0,it.jsx)(ct.RichText.Content,{tagName:"p",value:o?.[t]?.children})},`column-${t}`)))})}},QT=()=>jt({name:ZT,metadata:qT,settings:JT}),KT={attributes:{content:{type:"string",source:"html",selector:"pre",default:""},textAlign:{type:"string"}},save({attributes:e}){const{textAlign:t,content:o}=e;return(0,it.jsx)(ct.RichText.Content,{tagName:"pre",style:{textAlign:t},value:o})}},YT={attributes:{content:{type:"string",source:"html",selector:"pre",default:"",__unstablePreserveWhiteSpace:!0,role:"content"},textAlign:{type:"string"}},supports:{anchor:!0,color:{gradients:!0,link:!0},typography:{fontSize:!0,__experimentalFontFamily:!0},spacing:{padding:!0}},save({attributes:e}){const{textAlign:t,content:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)("pre",{...ct.useBlockProps.save({className:n}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})},migrate:Yo,isEligible:({style:e})=>e?.typography?.fontFamily};var XT=[YT,KT];const eN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/verse","title":"Verse","category":"text","description":"Insert poetry. Use special spacing formats. Or quote song lyrics.","keywords":["poetry","poem"],"textdomain":"default","attributes":{"content":{"type":"rich-text","source":"rich-text","selector":"pre","__unstablePreserveWhiteSpace":true,"role":"content"},"textAlign":{"type":"string"}},"supports":{"anchor":true,"background":{"backgroundImage":true,"backgroundSize":true,"__experimentalDefaultControls":{"backgroundImage":true}},"color":{"gradients":true,"link":true,"__experimentalDefaultControls":{"background":true,"text":true}},"dimensions":{"minHeight":true,"__experimentalDefaultControls":{"minHeight":false}},"typography":{"fontSize":true,"__experimentalFontFamily":true,"lineHeight":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalTextDecoration":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"__experimentalBorder":{"radius":true,"width":true,"color":true,"style":true},"interactivity":{"clientNavigation":true}},"style":"wp-block-verse","editorStyle":"wp-block-verse-editor"}');const tN={from:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/verse",e)}],to:[{type:"block",blocks:["core/paragraph"],transform:e=>(0,st.createBlock)("core/paragraph",e)}]};var oN=tN;const{name:nN}=eN,rN={icon:Xw,example:{attributes:{content:(0,pt.__)("WHAT was he doing, the great god Pan,\n\tDown in the reeds by the river?\nSpreading ruin and scattering ban,\nSplashing and paddling with hoofs of a goat,\nAnd breaking the golden lilies afloat\n With the dragon-fly on the river.")}},transforms:oN,deprecated:XT,merge:(e,t)=>({content:e.content+"\n\n"+t.content}),edit:function({attributes:e,setAttributes:t,mergeBlocks:o,onRemove:n,insertBlocksAfter:r,style:a}){const{textAlign:i,content:s}=e,l=(0,ct.useBlockProps)({className:Dt({[`has-text-align-${i}`]:i}),style:a});return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(ct.AlignmentToolbar,{value:i,onChange:e=>{t({textAlign:e})}})}),(0,it.jsx)(ct.RichText,{tagName:"pre",identifier:"content",preserveWhiteSpace:!0,value:s,onChange:e=>{t({content:e})},"aria-label":(0,pt.__)("Verse text"),placeholder:(0,pt.__)("Write verse…"),onRemove:n,onMerge:o,textAlign:i,...l,__unstablePastePlainText:!0,__unstableOnSplitAtDoubleLineEnd:()=>r((0,st.createBlock)((0,st.getDefaultBlockName)()))})]})},save:function({attributes:e}){const{textAlign:t,content:o}=e,n=Dt({[`has-text-align-${t}`]:t});return(0,it.jsx)("pre",{...ct.useBlockProps.save({className:n}),children:(0,it.jsx)(ct.RichText.Content,{value:o})})}},aN=()=>jt({name:nN,metadata:eN,settings:rN});var iN=(0,it.jsx)(St.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,it.jsx)(St.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})});const sN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/video","title":"Video","category":"media","description":"Embed a video from your media library or upload a new one.","keywords":["movie"],"textdomain":"default","attributes":{"autoplay":{"type":"boolean","source":"attribute","selector":"video","attribute":"autoplay"},"caption":{"type":"rich-text","source":"rich-text","selector":"figcaption","role":"content"},"controls":{"type":"boolean","source":"attribute","selector":"video","attribute":"controls","default":true},"id":{"type":"number","role":"content"},"loop":{"type":"boolean","source":"attribute","selector":"video","attribute":"loop"},"muted":{"type":"boolean","source":"attribute","selector":"video","attribute":"muted"},"poster":{"type":"string","source":"attribute","selector":"video","attribute":"poster"},"preload":{"type":"string","source":"attribute","selector":"video","attribute":"preload","default":"metadata"},"blob":{"type":"string","role":"local"},"src":{"type":"string","source":"attribute","selector":"video","attribute":"src","role":"content"},"playsInline":{"type":"boolean","source":"attribute","selector":"video","attribute":"playsinline"},"tracks":{"role":"content","type":"array","items":{"type":"object"},"default":[]}},"supports":{"anchor":true,"align":true,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"interactivity":{"clientNavigation":true}},"editorStyle":"wp-block-video-editor","style":"wp-block-video"}');function lN({tracks:e=[]}){return e.map((e=>{const{id:t,...o}=e;return(0,it.jsx)("track",{...o},t??o.src)}))}const{attributes:cN}=sN,uN={attributes:cN,save({attributes:e}){const{autoplay:t,caption:o,controls:n,loop:r,muted:a,poster:i,preload:s,src:l,playsInline:c,tracks:u}=e;return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)("video",{autoPlay:t,controls:n,loop:r,muted:a,poster:i,preload:"metadata"!==s?s:void 0,src:l,playsInline:c,children:(0,it.jsx)(lN,{tracks:u})}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{tagName:"figcaption",value:o})]})}};var dN=[uN];const pN=[{value:"auto",label:(0,pt.__)("Auto")},{value:"metadata",label:(0,pt.__)("Metadata")},{value:"none",label:(0,pt._x)("None","Preload value")}];var mN=({setAttributes:e,attributes:t})=>{const{autoplay:o,controls:n,loop:r,muted:a,playsInline:i,preload:s}=t,l=(0,pt.__)("Autoplay may cause usability issues for some users."),c=gt.Platform.select({web:(0,gt.useCallback)((e=>e?l:null),[]),native:l}),u=(0,gt.useMemo)((()=>{const t=t=>o=>{e({[t]:o,..."autoplay"===t&&{muted:o,playsInline:o}})};return{autoplay:t("autoplay"),loop:t("loop"),muted:t("muted"),controls:t("controls"),playsInline:t("playsInline")}}),[]),d=(0,gt.useCallback)((t=>{e({preload:t})}),[]);return(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Autoplay"),isShownByDefault:!0,hasValue:()=>!!o,onDeselect:()=>{e({autoplay:!1,muted:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Autoplay"),onChange:u.autoplay,checked:!!o,help:c})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Loop"),isShownByDefault:!0,hasValue:()=>!!r,onDeselect:()=>{e({loop:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Loop"),onChange:u.loop,checked:!!r})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Muted"),isShownByDefault:!0,hasValue:()=>!!a,onDeselect:()=>{e({muted:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Muted"),onChange:u.muted,checked:!!a,disabled:o,help:o?(0,pt.__)("Muted because of Autoplay."):null})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Playback controls"),isShownByDefault:!0,hasValue:()=>!n,onDeselect:()=>{e({controls:!0})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Playback controls"),onChange:u.controls,checked:!!n})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Play inline"),isShownByDefault:!0,hasValue:()=>!!i,onDeselect:()=>{e({playsInline:!1})},children:(0,it.jsx)(mt.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,pt.__)("Play inline"),onChange:u.playsInline,checked:!!i,disabled:o,help:o?(0,pt.__)("Play inline enabled because of Autoplay."):(0,pt.__)("When enabled, videos will play directly within the webpage on mobile browsers, instead of opening in a fullscreen player.")})}),(0,it.jsx)(mt.__experimentalToolsPanelItem,{label:(0,pt.__)("Preload"),isShownByDefault:!0,hasValue:()=>"metadata"!==s,onDeselect:()=>{e({preload:"metadata"})},children:(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Preload"),value:s,onChange:d,options:pN,hideCancelButton:!0})})]})};const{Badge:gN}=jo(mt.privateApis),hN=["text/vtt"],_N=[{label:(0,pt.__)("Subtitles"),value:"subtitles"},{label:(0,pt.__)("Captions"),value:"captions"},{label:(0,pt.__)("Descriptions"),value:"descriptions"},{label:(0,pt.__)("Chapters"),value:"chapters"},{label:(0,pt.__)("Metadata"),value:"metadata"}],xN={src:"",label:"",srcLang:"en",kind:"subtitles",default:!1};function bN({tracks:e,onEditPress:t}){const o=e.map(((e,o)=>(0,it.jsxs)(mt.__experimentalHStack,{className:"block-library-video-tracks-editor__track-list-track",children:[(0,it.jsx)("span",{children:e.label}),(0,it.jsxs)(mt.__experimentalHStack,{justify:"flex-end",children:[e.default&&(0,it.jsx)(gN,{children:(0,pt.__)("Default")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t(o),"aria-label":(0,pt.sprintf)((0,pt._x)("Edit %s","text tracks"),e.label),children:(0,pt.__)("Edit")})]})]},e.id??e.src)));return(0,it.jsx)(mt.MenuGroup,{label:(0,pt.__)("Text tracks"),className:"block-library-video-tracks-editor__track-list",children:o})}function fN({track:e,onChange:t,onClose:o,onRemove:n,allowSettingDefault:r}){const[a,i]=(0,gt.useState)({...xN,...e}),{src:s,label:l,srcLang:c,kind:u,default:d}=a,p=s.startsWith("blob:")?"":(0,no.getFilename)(s)||"";return(0,it.jsxs)(mt.__experimentalVStack,{className:"block-library-video-tracks-editor__single-track-editor",spacing:"4",children:[(0,it.jsx)("span",{className:"block-library-video-tracks-editor__single-track-editor-edit-track-label",children:(0,pt.__)("Edit track")}),(0,it.jsxs)("span",{children:[(0,pt.__)("File"),": ",(0,it.jsx)("b",{children:p})]}),(0,it.jsxs)(mt.__experimentalGrid,{columns:2,gap:4,children:[(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>i((t=>({...t,label:e}))),label:(0,pt.__)("Label"),value:l,help:(0,pt.__)("Title of track")}),(0,it.jsx)(mt.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,onChange:e=>i((t=>({...t,srcLang:e}))),label:(0,pt.__)("Source language"),value:c,help:(0,pt.__)("Language tag (en, fr, etc.)")})]}),(0,it.jsxs)(mt.__experimentalVStack,{spacing:"4",children:[(0,it.jsx)(mt.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"block-library-video-tracks-editor__single-track-editor-kind-select",options:_N,value:u,label:(0,pt.__)("Kind"),onChange:e=>i((t=>({...t,kind:e})))}),(0,it.jsx)(mt.ToggleControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,pt.__)("Set as default track"),checked:d,disabled:!r,onChange:e=>i((t=>({...t,default:e})))}),(0,it.jsxs)(mt.__experimentalHStack,{className:"block-library-video-tracks-editor__single-track-editor-buttons-container",children:[(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"link",onClick:n,children:(0,pt.__)("Remove track")}),(0,it.jsx)(mt.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{t(a),o()},children:(0,pt.__)("Apply")})]})]})]})}function yN({tracks:e=[],onChange:t}){const o=(0,lt.useSelect)((e=>e(ct.store).getSettings().mediaUpload),[]),[n,r]=(0,gt.useState)(null),a=(0,gt.useRef)(),i=(o=[],n=!1)=>{const r=new Map(e.map((e=>[e.id,e]))),a=o.map((({id:e,title:t,url:o})=>r.has(e)?r.get(e):{...xN,id:e,label:t||"",src:o}));0!==a.length&&t([...n?e:[],...a])};function s(e){const t=e.target.files;o({allowedTypes:hN,filesList:t,onFileChange:e=>{if(!Array.isArray(e))return;const t=e.filter((e=>!!e?.id));t.length&&i(t,!0)}})}return(0,gt.useEffect)((()=>{a.current?.focus()}),[n]),o?(0,it.jsx)(mt.Dropdown,{contentClassName:"block-library-video-tracks-editor",focusOnMount:!0,popoverProps:{ref:a},renderToggle:({isOpen:e,onToggle:t})=>(0,it.jsx)(mt.ToolbarGroup,{children:(0,it.jsx)(mt.ToolbarButton,{"aria-expanded":e,"aria-haspopup":"true",onClick:()=>{e||r(null),t()},children:(0,pt.__)("Text tracks")})}),renderContent:()=>null!==n?(0,it.jsx)(fN,{track:e[n],onChange:o=>{const r=[...e];r[n]=o,t(r)},onClose:()=>r(null),onRemove:()=>{t(e.filter(((e,t)=>t!==n))),r(null)},allowSettingDefault:!e.some((e=>e.default))||e[n].default}):(0,it.jsxs)(it.Fragment,{children:[0===e.length&&(0,it.jsxs)("div",{className:"block-library-video-tracks-editor__tracks-informative-message",children:[(0,it.jsx)("h2",{className:"block-library-video-tracks-editor__tracks-informative-message-title",children:(0,pt.__)("Text tracks")}),(0,it.jsx)("p",{className:"block-library-video-tracks-editor__tracks-informative-message-description",children:(0,pt.__)("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.")})]}),(0,it.jsxs)(mt.NavigableMenu,{children:[(0,it.jsx)(bN,{tracks:e,onEditPress:r}),(0,it.jsx)(mt.MenuGroup,{className:"block-library-video-tracks-editor__add-tracks-container",label:(0,pt.__)("Add tracks"),children:(0,it.jsxs)(ct.MediaUploadCheck,{children:[(0,it.jsx)(ct.MediaUpload,{onSelect:i,allowedTypes:hN,value:e.map((({id:e})=>e)),multiple:!0,render:({open:e})=>(0,it.jsx)(mt.MenuItem,{icon:ah,onClick:e,children:(0,pt.__)("Open Media Library")})}),(0,it.jsx)(mt.FormFileUpload,{onChange:s,accept:".vtt,text/vtt",multiple:!0,render:({openFileDialog:e})=>(0,it.jsx)(mt.MenuItem,{icon:Wp,onClick:e,children:(0,pt._x)("Upload","verb")})})]})})]})]})}):null}const vN=["video"];var kN=function({isSelected:e,attributes:t,className:o,setAttributes:n,insertBlocksAfter:r,onReplace:a}){const i=(0,gt.useRef)(),{id:s,controls:l,poster:c,src:u,tracks:d}=t,[p,m]=(0,gt.useState)(t.blob),g=vt(),h="default"===(0,ct.useBlockEditingMode)();function _(e){if(!e||!e.url)return n({src:void 0,id:void 0,poster:void 0,caption:void 0,blob:void 0}),void m();(0,ht.isBlobURL)(e.url)?m(e.url):(n({blob:void 0,src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0,caption:e.caption}),m())}function x(e){if(e!==u){const t=No({attributes:{url:e}});if(void 0!==t&&a)return void a(t);n({blob:void 0,src:e,id:void 0,poster:void 0}),m()}}ft({url:p,allowedTypes:vN,onChange:_,onError:f}),(0,gt.useEffect)((()=>{i.current&&i.current.load()}),[c]);const{createErrorNotice:b}=(0,lt.useDispatch)(bo.store);function f(e){b(e,{type:"snackbar"})}const y=t=>(0,it.jsx)(mt.Placeholder,{className:"block-editor-media-placeholder",withIllustration:!e,icon:iN,label:(0,pt.__)("Video"),instructions:(0,pt.__)("Drag and drop a video, upload, or choose from your library."),children:t}),v=Dt(o,{"is-transient":!!p}),k=(0,ct.useBlockProps)({className:v});return u||p?(0,it.jsxs)(it.Fragment,{children:[e&&(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)(ct.BlockControls,{children:(0,it.jsx)(yN,{tracks:d,onChange:e=>{n({tracks:e})}})}),(0,it.jsx)(ct.BlockControls,{group:"other",children:(0,it.jsx)(ct.MediaReplaceFlow,{mediaId:s,mediaURL:u,allowedTypes:vN,accept:"video/*",onSelect:_,onSelectURL:x,onError:f,onReset:()=>_(void 0)})})]}),(0,it.jsx)(ct.InspectorControls,{children:(0,it.jsxs)(mt.__experimentalToolsPanel,{label:(0,pt.__)("Settings"),resetAll:()=>{n({autoplay:!1,controls:!0,loop:!1,muted:!1,playsInline:!1,preload:"metadata",poster:void 0})},dropdownMenuProps:g,children:[(0,it.jsx)(mN,{setAttributes:n,attributes:t}),(0,it.jsx)(_s,{poster:c,onChange:e=>n({poster:e?.url})})]})}),(0,it.jsxs)("figure",{...k,children:[(0,it.jsx)(mt.Disabled,{isDisabled:!e,children:(0,it.jsx)("video",{controls:l,poster:c,src:u||p,ref:i,children:(0,it.jsx)(lN,{tracks:d})})}),!!p&&(0,it.jsx)(mt.Spinner,{}),(0,it.jsx)(zo,{attributes:t,setAttributes:n,isSelected:e,insertBlocksAfter:r,label:(0,pt.__)("Video caption text"),showToolbarButton:e&&h})]})]}):(0,it.jsx)("div",{...k,children:(0,it.jsx)(ct.MediaPlaceholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:iN}),onSelect:_,onSelectURL:x,accept:"video/*",allowedTypes:vN,value:t,onError:f,placeholder:y})})};const wN={from:[{type:"files",isMatch:e=>1===e.length&&0===e[0].type.indexOf("video/"),transform(e){const t=e[0];return(0,st.createBlock)("core/video",{blob:(0,ht.createBlobURL)(t)})}},{type:"shortcode",tag:"video",attributes:{src:{type:"string",shortcode:({named:{src:e,mp4:t,m4v:o,webm:n,ogv:r,flv:a}})=>e||t||o||n||r||a},poster:{type:"string",shortcode:({named:{poster:e}})=>e},loop:{type:"string",shortcode:({named:{loop:e}})=>e},autoplay:{type:"string",shortcode:({named:{autoplay:e}})=>e},preload:{type:"string",shortcode:({named:{preload:e}})=>e}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&1===e.children.length&&"VIDEO"===e.firstChild.nodeName,transform:e=>{const t=e.firstChild,o={autoplay:!!t.hasAttribute("autoplay")||void 0,controls:!!t.hasAttribute("controls")&&void 0,loop:!!t.hasAttribute("loop")||void 0,muted:!!t.hasAttribute("muted")||void 0,preload:t.getAttribute("preload")||void 0,playsInline:!!t.hasAttribute("playsinline")||void 0,poster:t.getAttribute("poster")||void 0,src:t.getAttribute("src")||void 0};return(0,ht.isBlobURL)(o.src)&&(o.blob=o.src,delete o.src),(0,st.createBlock)("core/video",o)}}]};var CN=wN;const{name:jN}=sN,SN={icon:iN,example:{attributes:{src:"https://upload.wikimedia.org/wikipedia/commons/c/ca/Wood_thrush_in_Central_Park_switch_sides_%2816510%29.webm",caption:(0,pt.__)("Wood thrush singing in Central Park, NYC.")}},transforms:CN,deprecated:dN,edit:kN,save:function({attributes:e}){const{autoplay:t,caption:o,controls:n,loop:r,muted:a,poster:i,preload:s,src:l,playsInline:c,tracks:u}=e;return(0,it.jsxs)("figure",{...ct.useBlockProps.save(),children:[l&&(0,it.jsx)("video",{autoPlay:t,controls:n,loop:r,muted:a,poster:i,preload:"metadata"!==s?s:void 0,src:l,playsInline:c,children:(0,it.jsx)(lN,{tracks:u})}),!ct.RichText.isEmpty(o)&&(0,it.jsx)(ct.RichText.Content,{className:(0,ct.__experimentalGetElementClassName)("caption"),tagName:"figcaption",value:o})]})}},BN=()=>jt({name:jN,metadata:sN,settings:SN});const TN=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"core/footnotes","title":"Footnotes","category":"text","description":"Display footnotes added to the page.","keywords":["references"],"textdomain":"default","usesContext":["postId","postType"],"supports":{"__experimentalBorder":{"radius":true,"color":true,"width":true,"style":true,"__experimentalDefaultControls":{"radius":false,"color":false,"width":false,"style":false}},"color":{"background":true,"link":true,"text":true,"__experimentalDefaultControls":{"link":true,"text":true}},"html":false,"multiple":false,"reusable":false,"inserter":false,"spacing":{"margin":true,"padding":true,"__experimentalDefaultControls":{"margin":false,"padding":false}},"typography":{"fontSize":true,"lineHeight":true,"__experimentalFontFamily":true,"__experimentalTextDecoration":true,"__experimentalFontStyle":true,"__experimentalFontWeight":true,"__experimentalLetterSpacing":true,"__experimentalTextTransform":true,"__experimentalWritingMode":true,"__experimentalDefaultControls":{"fontSize":true}},"interactivity":{"clientNavigation":true}},"style":"wp-block-footnotes"}'),NN={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let PN;const IN=new Uint8Array(16);function DN(){if(!PN&&(PN="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!PN))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return PN(IN)}const MN=[];for(let e=0;e<256;++e)MN.push((e+256).toString(16).slice(1));function zN(e,t=0){return MN[e[t+0]]+MN[e[t+1]]+MN[e[t+2]]+MN[e[t+3]]+"-"+MN[e[t+4]]+MN[e[t+5]]+"-"+MN[e[t+6]]+MN[e[t+7]]+"-"+MN[e[t+8]]+MN[e[t+9]]+"-"+MN[e[t+10]]+MN[e[t+11]]+MN[e[t+12]]+MN[e[t+13]]+MN[e[t+14]]+MN[e[t+15]]}const AN=function(e,t,o){if(NN.randomUUID&&!t&&!e)return NN.randomUUID();const n=(e=e||{}).random||(e.rng||DN)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){o=o||0;for(let e=0;e<16;++e)t[o+e]=n[e];return t}return zN(n)},{usesContextKey:LN}=jo(ct.privateApis),HN="core/footnote",RN="core/post-content",VN={title:(0,pt.__)("Footnote"),tagName:"sup",className:"fn",attributes:{"data-fn":"data-fn"},interactive:!0,contentEditable:!1,[LN]:["postType","postId"],edit:function({value:e,onChange:t,isObjectActive:o,context:{postType:n,postId:r}}){const a=(0,lt.useRegistry)(),{getSelectedBlockClientId:i,getBlocks:s,getBlockRootClientId:l,getBlockName:c,getBlockParentsByBlockName:u}=a.select(ct.store),d=(0,lt.useSelect)((e=>{if(!e(st.store).getBlockType("core/footnotes"))return!1;const t=e(ct.store).getSettings().allowedBlockTypes;if(!1===t||Array.isArray(t)&&!t.includes("core/footnotes"))return!1;const o=e(_t.store).getEntityRecord("postType",n,r);if("string"!=typeof o?.meta?.footnotes)return!1;const{getBlockParentsByBlockName:a,getSelectedBlockClientId:i}=e(ct.store),s=a(i(),"core/block");return!s||0===s.length}),[n,r]),{selectionChange:p,insertBlock:m}=(0,lt.useDispatch)(ct.store);if(!d)return null;return(0,it.jsx)(ct.RichTextToolbarButton,{icon:Um,title:(0,pt.__)("Footnote"),onClick:function(){a.batch((()=>{let n;if(o){const t=e.replacements[e.start];n=t?.attributes?.["data-fn"]}else{n=AN();const o=(0,Tn.insertObject)(e,{type:HN,attributes:{"data-fn":n},innerHTML:`<a href="#${n}" id="${n}-link">*</a>`},e.end,e.end);o.start=o.end-1,t(o)}const r=i(),a=u(r,RN);let d=null;{const e=[...a.length?s(a[0]):s()];for(;e.length;){const t=e.shift();if("core/footnotes"===t.name){d=t;break}e.push(...t.innerBlocks)}}if(!d){let e=l(r);for(;e&&c(e)!==RN;)e=l(e);d=(0,st.createBlock)("core/footnotes"),m(d,void 0,e)}p(d.clientId,n,0,0)}))},isActive:o})}},{name:FN}=TN,EN={icon:Um,edit:function({context:{postType:e,postId:t}}){const[o,n]=(0,_t.useEntityProp)("postType",e,"meta",t),r="string"==typeof o?.footnotes,a=o?.footnotes?JSON.parse(o.footnotes):[],i=(0,ct.useBlockProps)();return r?a.length?(0,it.jsx)("ol",{...i,children:a.map((({id:e,content:t})=>(0,it.jsxs)("li",{onMouseDown:e=>{e.target===e.currentTarget&&(e.target.firstElementChild.focus(),e.preventDefault())},children:[(0,it.jsx)(ct.RichText,{id:e,tagName:"span",value:t,identifier:e,onFocus:e=>{e.target.textContent.trim()||e.target.scrollIntoView()},onChange:t=>{n({...o,footnotes:JSON.stringify(a.map((o=>o.id===e?{content:t,id:e}:o)))})}})," ",(0,it.jsx)("a",{href:`#${e}-link`,children:"↩︎"})]},e)))}):(0,it.jsx)("div",{...i,children:(0,it.jsx)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Um}),label:(0,pt.__)("Footnotes"),instructions:(0,pt.__)("Footnotes found in blocks within this document will be displayed here.")})}):(0,it.jsx)("div",{...i,children:(0,it.jsx)(mt.Placeholder,{icon:(0,it.jsx)(ct.BlockIcon,{icon:Um}),label:(0,pt.__)("Footnotes"),instructions:(0,pt.__)("Footnotes are not supported here. Add this block to post or page content.")})})}},ON=()=>{(0,Tn.registerFormatType)(HN,VN),jt({name:FN,metadata:TN,settings:EN})};var GN,$N,UN=Object.getOwnPropertyNames;const qN=(GN={"packages/block-library/src/utils/is-block-metadata-experimental.js"(e,t){t.exports=function(e){return e&&"__experimental"in e&&!1!==e.__experimental}}},function(){return $N||(0,GN[UN(GN)[0]])(($N={exports:{}}).exports,$N),$N.exports})(),WN=window.wp.keyboardShortcuts;var ZN=function(){const{registerShortcut:e}=(0,lt.useDispatch)(WN.store),{replaceBlocks:t}=(0,lt.useDispatch)(ct.store),{getBlockName:o,getSelectedBlockClientId:n,getBlockAttributes:r}=(0,lt.useSelect)(ct.store),a=(e,a)=>{e.preventDefault();const i=n();if(null===i)return;const s=o(i),l="core/paragraph"===s,c="core/heading"===s;if(!l&&!c)return;const u=0===a?"core/paragraph":"core/heading",d=r(i);if(l&&0===a||c&&d.level===a)return;const p="core/paragraph"===s?"align":"textAlign",m="core/paragraph"===u?"align":"textAlign";t(i,(0,st.createBlock)(u,{level:a,content:d.content,[m]:d[p]}))};return(0,gt.useEffect)((()=>{e({name:"core/block-editor/transform-heading-to-paragraph",category:"block-library",description:(0,pt.__)("Transform heading to paragraph."),keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}]}),[1,2,3,4,5,6].forEach((t=>{e({name:`core/block-editor/transform-paragraph-to-heading-${t}`,category:"block-library",description:(0,pt.__)("Transform paragraph to heading."),keyCombination:{modifier:"access",character:`${t}`}})}))}),[e]),(0,WN.useShortcut)("core/block-editor/transform-heading-to-paragraph",(e=>a(e,0))),(0,WN.useShortcut)("core/block-editor/transform-paragraph-to-heading-1",(e=>a(e,1))),(0,WN.useShortcut)("core/block-editor/transform-paragraph-to-heading-2",(e=>a(e,2))),(0,WN.useShortcut)("core/block-editor/transform-paragraph-to-heading-3",(e=>a(e,3))),(0,WN.useShortcut)("core/block-editor/transform-paragraph-to-heading-4",(e=>a(e,4))),(0,WN.useShortcut)("core/block-editor/transform-paragraph-to-heading-5",(e=>a(e,5))),(0,WN.useShortcut)("core/block-editor/transform-paragraph-to-heading-6",(e=>a(e,6))),null};const JN={};Co(JN,{BlockKeyboardShortcuts:ZN});const QN=()=>(()=>{const r=[se,$,E,V,W,J,ze,e,t,o,n,i,l,u,d,p,m,h,_,x,f,I,D,M,z,F,G,Z,U,q,K,Y,X,ne,ae,ie,re,Ce,je,Ae,He,Re,Ve,Fe,$e,Ue,qe,We,Je,ot,nt,rt,at,ee,te,oe,Ee,Ge,Oe,Se,Qe,s,we,xe,be,he,le,ce,de,pe,ge,_e,ve,fe,ye,ke,Te,Ne,Pe,Ie,Be,Me,Le,b,y,v,k,w,C,j,P,B,T,N,S,me,Ze,O,Q,Ke,Ye,Xe,et,tt,De,ue];return window?.__experimentalEnableBlockExperiments&&r.push(c),window?.__experimentalEnableFormBlocks&&(r.push(A),r.push(L),r.push(H),r.push(R)),window?.wp?.oldEditor&&(window?.wp?.needsClassicBlock||!window?.__experimentalDisableTinymce||new URLSearchParams(window?.location?.search).get("requiresTinymce"))&&r.push(g),r.filter(Boolean)})().filter((({metadata:e})=>!qN(e))),KN=(e=QN())=>{e.forEach((({init:e})=>e())),window.__unstableAutoRegisterBlocks&&window.__unstableAutoRegisterBlocks.forEach((e=>{const t=jo((0,lt.select)(st.store)).getBootstrappedBlockType(e).apiVersion;(0,st.registerBlockType)(e,{title:e,...t<3&&{apiVersion:3},edit:function({attributes:t}){const o=(0,ct.useBlockProps)(),{content:n,status:r,error:a}=(0,ut.useServerSideRender)({block:e,attributes:t});return"loading"===r?(0,it.jsx)("div",{...o,children:(0,pt.__)("Loading…")}):"error"===r?(0,it.jsx)("div",{...o,children:(0,pt.sprintf)((0,pt.__)("Error loading block: %s"),a)}):(0,it.jsx)("div",{...o,dangerouslySetInnerHTML:{__html:n||""}})},save:()=>null})})),(0,st.setDefaultBlockName)($b),window.wp&&window.wp.oldEditor&&e.some((({name:e})=>e===lr))&&(0,st.setFreeformContentHandlerName)(lr),(0,st.setUnregisteredTypeHandlerName)(Sh),(0,st.setGroupingBlockName)(Jd)},YN=void 0})(),(window.wp=window.wp||{}).blockLibrary=a})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/core-commands.js b/wp-includes/js/dist/core-commands.js
index 4fc522bcbb..6ae00d44c7 100644
--- a/wp-includes/js/dist/core-commands.js
+++ b/wp-includes/js/dist/core-commands.js
@@ -301,9 +301,6 @@ const getNavigationCommandLoaderPerPostType = (postType) => function useNavigati
[delayedSearch]
);
const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (window.location.pathname.startsWith("/wp-admin/network/")) {
- return [];
- }
return (records ?? []).map((record) => {
const command = {
name: postType + "-" + record.id,
@@ -383,9 +380,6 @@ const getNavigationCommandLoaderPerTemplate = (templateType) => function useNavi
return orderEntityRecordsBySearch(records, search).slice(0, 10);
}, [records, search]);
const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (window.location.pathname.startsWith("/wp-admin/network/")) {
- return [];
- }
if (!canCreateTemplate || !isBlockBasedTheme && !templateType === "wp_template_part") {
return [];
}
@@ -469,9 +463,6 @@ const getSiteEditorBasicNavigationCommands = () => function useSiteEditorBasicNa
};
}, []);
const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (window.location.pathname.startsWith("/wp-admin/network/")) {
- return [];
- }
const result = [];
if (canCreateTemplate && isBlockBasedTheme) {
result.push({
@@ -580,9 +571,6 @@ const getGlobalStylesOpenCssCommands = () => function useGlobalStylesOpenCssComm
};
}, []);
const commands = (0,external_wp_element_namespaceObject.useMemo)(() => {
- if (window.location.pathname.includes("/wp-admin/network/")) {
- return [];
- }
if (!canEditCSS) {
return [];
}
@@ -613,31 +601,37 @@ const getGlobalStylesOpenCssCommands = () => function useGlobalStylesOpenCssComm
commands
};
};
-function useSiteEditorNavigationCommands() {
+function useSiteEditorNavigationCommands(isNetworkAdmin) {
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: "core/edit-site/navigate-pages",
- hook: getNavigationCommandLoaderPerPostType("page")
+ hook: getNavigationCommandLoaderPerPostType("page"),
+ disabled: isNetworkAdmin
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: "core/edit-site/navigate-posts",
- hook: getNavigationCommandLoaderPerPostType("post")
+ hook: getNavigationCommandLoaderPerPostType("post"),
+ disabled: isNetworkAdmin
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: "core/edit-site/navigate-templates",
- hook: getNavigationCommandLoaderPerTemplate("wp_template")
+ hook: getNavigationCommandLoaderPerTemplate("wp_template"),
+ disabled: isNetworkAdmin
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: "core/edit-site/navigate-template-parts",
- hook: getNavigationCommandLoaderPerTemplate("wp_template_part")
+ hook: getNavigationCommandLoaderPerTemplate("wp_template_part"),
+ disabled: isNetworkAdmin
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: "core/edit-site/basic-navigation",
hook: getSiteEditorBasicNavigationCommands(),
- context: "site-editor"
+ context: "site-editor",
+ disabled: isNetworkAdmin
});
(0,external_wp_commands_namespaceObject.useCommandLoader)({
name: "core/edit-site/global-styles-css",
- hook: getGlobalStylesOpenCssCommands()
+ hook: getGlobalStylesOpenCssCommands(),
+ disabled: isNetworkAdmin
});
}
@@ -667,9 +661,9 @@ lock(privateApis, {
const { RouterProvider } = unlock(external_wp_router_namespaceObject.privateApis);
function CommandPalette({ settings }) {
- const { menu_commands: menuCommands } = settings;
+ const { menu_commands: menuCommands, is_network_admin: isNetworkAdmin } = settings;
useAdminNavigationCommands(menuCommands);
- useSiteEditorNavigationCommands();
+ useSiteEditorNavigationCommands(isNetworkAdmin);
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(RouterProvider, { pathArg: "p", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_commands_namespaceObject.CommandMenu, {}) });
}
function initializeCommandPalette(settings) {
diff --git a/wp-includes/js/dist/core-commands.min.js b/wp-includes/js/dist/core-commands.min.js
index e8e5b204d1..09592f5eb2 100644
--- a/wp-includes/js/dist/core-commands.min.js
+++ b/wp-includes/js/dist/core-commands.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-(()=>{"use strict";var e={d:(t,o)=>{for(var a in o)e.o(o,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:o[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{initializeCommandPalette:()=>E,privateApis:()=>A});const o=window.ReactJSXRuntime,a=window.wp.element,n=window.wp.router,s=window.wp.commands,i=window.wp.i18n,r=window.wp.primitives;var c=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const l=window.wp.coreData,d=window.wp.data,p=()=>function(){const e=(0,d.useSelect)((e=>e(l.store).getEntityRecord("root","__unstableBase")?.home),[]);return{isLoading:!1,commands:(0,a.useMemo)((()=>e?[{name:"core/view-site",label:(0,i.__)("View site"),icon:c,callback:({close:t})=>{t(),window.open(e,"_blank")}}]:[]),[e])}};function m(e){const t=(0,a.useMemo)((()=>(e??[]).map((e=>{const t=(0,i.sprintf)((0,i.__)("Go to: %s"),e.label);return{name:e.name,label:t,searchLabel:t,callback:({close:t})=>{document.location=e.url,t()}}}))),[e]);(0,s.useCommands)(t),(0,s.useCommandLoader)({name:"core/view-site",hook:p()})}var w=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),h=(0,o.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,o.jsx)(r.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,o.jsx)(r.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),u=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),g=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),v=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),_=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),y=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),b=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})});const x=window.wp.url,k=window.wp.compose,f=window.wp.htmlEntities,S=window.wp.privateApis,{lock:L,unlock:C}=(0,S.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-commands");const{useHistory:T}=C(n.privateApis),j={post:w,page:h,wp_template:u,wp_template_part:g};const M=e=>function({search:t}){const o=T(),{isBlockBasedTheme:n,canCreateTemplate:s}=(0,d.useSelect)((e=>({isBlockBasedTheme:e(l.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:e(l.store).canUser("create",{kind:"postType",name:"wp_template"})})),[]),r=function(e){const[t,o]=(0,a.useState)(""),n=(0,k.useDebounce)(o,250);return(0,a.useEffect)((()=>(n(e),()=>n.cancel())),[n,e]),t}(t),{records:c,isLoading:p}=(0,d.useSelect)((t=>{if(!r)return{isLoading:!1};const o={search:r,per_page:10,orderby:"relevance",status:["publish","future","draft","pending","private"]};return{records:t(l.store).getEntityRecords("postType",e,o),isLoading:!t(l.store).hasFinishedResolution("getEntityRecords",["postType",e,o])}}),[r]);return{commands:(0,a.useMemo)((()=>window.location.pathname.startsWith("/wp-admin/network/")?[]:(c??[]).map((t=>{const a={name:e+"-"+t.id,searchLabel:t.title?.rendered+" "+t.id,label:t.title?.rendered?(0,f.decodeEntities)(t.title?.rendered):(0,i.__)("(no title)"),icon:j[e]};if(!s||"post"===e||"page"===e&&!n)return{...a,callback:({close:e})=>{const o={post:t.id,action:"edit"},a=(0,x.addQueryArgs)("post.php",o);document.location=a,e()}};const r=(0,x.getPath)(window.location.href)?.includes("site-editor.php");return{...a,callback:({close:a})=>{r?o.navigate(`/${e}/${t.id}?canvas=edit`):document.location=(0,x.addQueryArgs)("site-editor.php",{p:`/${e}/${t.id}`,canvas:"edit"}),a()}}}))),[s,c,n,o]),isLoading:p}},P=e=>function({search:t}){const o=T(),{isBlockBasedTheme:n,canCreateTemplate:s}=(0,d.useSelect)((t=>({isBlockBasedTheme:t(l.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:t(l.store).canUser("create",{kind:"postType",name:e})})),[]),{records:r,isLoading:c}=(0,d.useSelect)((t=>{const{getEntityRecords:o}=t(l.store),a={per_page:-1};return{records:o("postType",e,a),isLoading:!t(l.store).hasFinishedResolution("getEntityRecords",["postType",e,a])}}),[]),p=(0,a.useMemo)((()=>function(e=[],t=""){if(!Array.isArray(e)||!e.length)return[];if(!t)return e;const o=[],a=[];for(let n=0;n<e.length;n++){const s=e[n];s?.title?.raw?.toLowerCase()?.includes(t?.toLowerCase())?o.push(s):a.push(s)}return o.concat(a)}(r,t).slice(0,10)),[r,t]);return{commands:(0,a.useMemo)((()=>{if(window.location.pathname.startsWith("/wp-admin/network/"))return[];if(!s||!n&&"wp_template_part"===!e)return[];const t=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),a=[];return a.push(...p.map((a=>({name:e+"-"+a.id,searchLabel:a.title?.rendered+" "+a.id,label:a.title?.rendered?a.title?.rendered:(0,i.__)("(no title)"),icon:j[e],callback:({close:n})=>{t?o.navigate(`/${e}/${a.id}?canvas=edit`):document.location=(0,x.addQueryArgs)("site-editor.php",{p:`/${e}/${a.id}`,canvas:"edit"}),n()}})))),p?.length>0&&"wp_template_part"===e&&a.push({name:"core/edit-site/open-template-parts",label:(0,i.__)("Go to: Template parts"),icon:g,callback:({close:e})=>{t?o.navigate("/pattern?postType=wp_template_part&categoryId=all-parts"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/pattern",postType:"wp_template_part",categoryId:"all-parts"}),e()}}),a}),[s,n,p,o]),isLoading:c}},V=()=>function(){const e=T(),t=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),{isBlockBasedTheme:o,canCreateTemplate:n,canCreatePatterns:s}=(0,d.useSelect)((e=>({isBlockBasedTheme:e(l.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:e(l.store).canUser("create",{kind:"postType",name:"wp_template"}),canCreatePatterns:e(l.store).canUser("create",{kind:"postType",name:"wp_block"})})),[]);return{commands:(0,a.useMemo)((()=>{if(window.location.pathname.startsWith("/wp-admin/network/"))return[];const a=[];return n&&o&&(a.push({name:"core/edit-site/open-styles",label:(0,i.__)("Go to: Styles"),icon:v,callback:({close:o})=>{t?e.navigate("/styles"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/styles"}),o()}}),a.push({name:"core/edit-site/open-navigation",label:(0,i.__)("Go to: Navigation"),icon:_,callback:({close:o})=>{t?e.navigate("/navigation"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/navigation"}),o()}}),a.push({name:"core/edit-site/open-templates",label:(0,i.__)("Go to: Templates"),icon:u,callback:({close:o})=>{t?e.navigate("/template"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/template"}),o()}})),s&&a.push({name:"core/edit-site/open-patterns",label:(0,i.__)("Go to: Patterns"),icon:y,callback:({close:o})=>{n?(t?e.navigate("/pattern"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/pattern"}),o()):document.location.href="edit.php?post_type=wp_block"}}),a}),[e,t,n,s,o]),isLoading:!1}},B=()=>function(){const e=T(),t=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),{canEditCSS:o}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:o}=e(l.store),a=o(),n=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!n?._links?.["wp:action-edit-css"]}}),[]);return{isLoading:!1,commands:(0,a.useMemo)((()=>window.location.pathname.includes("/wp-admin/network/")?[]:o?[{name:"core/open-styles-css",label:(0,i.__)("Open custom CSS"),icon:b,callback:({close:o})=>{o(),t?e.navigate("/styles?section=/css"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/styles",section:"/css"})}}]:[]),[e,o,t])}};function z(){(0,s.useCommandLoader)({name:"core/edit-site/navigate-pages",hook:M("page")}),(0,s.useCommandLoader)({name:"core/edit-site/navigate-posts",hook:M("post")}),(0,s.useCommandLoader)({name:"core/edit-site/navigate-templates",hook:P("wp_template")}),(0,s.useCommandLoader)({name:"core/edit-site/navigate-template-parts",hook:P("wp_template_part")}),(0,s.useCommandLoader)({name:"core/edit-site/basic-navigation",hook:V(),context:"site-editor"}),(0,s.useCommandLoader)({name:"core/edit-site/global-styles-css",hook:B()})}const A={};L(A,{useCommands:function(){m(),z()}});const{RouterProvider:G}=C(n.privateApis);function R({settings:e}){const{menu_commands:t}=e;return m(t),z(),(0,o.jsx)(G,{pathArg:"p",children:(0,o.jsx)(s.CommandMenu,{})})}function E(e){const t=document.createElement("div");document.body.appendChild(t),(0,a.createRoot)(t).render((0,o.jsx)(a.StrictMode,{children:(0,o.jsx)(R,{settings:e})}))}(window.wp=window.wp||{}).coreCommands=t})();
\ No newline at end of file
+(()=>{"use strict";var e={d:(t,o)=>{for(var a in o)e.o(o,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:o[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{initializeCommandPalette:()=>E,privateApis:()=>A});const o=window.ReactJSXRuntime,a=window.wp.element,s=window.wp.router,n=window.wp.commands,i=window.wp.i18n,r=window.wp.primitives;var c=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});const l=window.wp.coreData,d=window.wp.data,p=()=>function(){const e=(0,d.useSelect)((e=>e(l.store).getEntityRecord("root","__unstableBase")?.home),[]);return{isLoading:!1,commands:(0,a.useMemo)((()=>e?[{name:"core/view-site",label:(0,i.__)("View site"),icon:c,callback:({close:t})=>{t(),window.open(e,"_blank")}}]:[]),[e])}};function m(e){const t=(0,a.useMemo)((()=>(e??[]).map((e=>{const t=(0,i.sprintf)((0,i.__)("Go to: %s"),e.label);return{name:e.name,label:t,searchLabel:t,callback:({close:t})=>{document.location=e.url,t()}}}))),[e]);(0,n.useCommands)(t),(0,n.useCommandLoader)({name:"core/view-site",hook:p()})}var u=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})}),h=(0,o.jsxs)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,o.jsx)(r.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,o.jsx)(r.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),w=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),g=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),v=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),_=(0,o.jsx)(r.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(r.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),b=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),y=(0,o.jsx)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,o.jsx)(r.Path,{d:"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z"})});const x=window.wp.url,k=window.wp.compose,f=window.wp.htmlEntities,S=window.wp.privateApis,{lock:L,unlock:C}=(0,S.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/core-commands");const{useHistory:T}=C(s.privateApis),j={post:u,page:h,wp_template:w,wp_template_part:g};const M=e=>function({search:t}){const o=T(),{isBlockBasedTheme:s,canCreateTemplate:n}=(0,d.useSelect)((e=>({isBlockBasedTheme:e(l.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:e(l.store).canUser("create",{kind:"postType",name:"wp_template"})})),[]),r=function(e){const[t,o]=(0,a.useState)(""),s=(0,k.useDebounce)(o,250);return(0,a.useEffect)((()=>(s(e),()=>s.cancel())),[s,e]),t}(t),{records:c,isLoading:p}=(0,d.useSelect)((t=>{if(!r)return{isLoading:!1};const o={search:r,per_page:10,orderby:"relevance",status:["publish","future","draft","pending","private"]};return{records:t(l.store).getEntityRecords("postType",e,o),isLoading:!t(l.store).hasFinishedResolution("getEntityRecords",["postType",e,o])}}),[r]);return{commands:(0,a.useMemo)((()=>(c??[]).map((t=>{const a={name:e+"-"+t.id,searchLabel:t.title?.rendered+" "+t.id,label:t.title?.rendered?(0,f.decodeEntities)(t.title?.rendered):(0,i.__)("(no title)"),icon:j[e]};if(!n||"post"===e||"page"===e&&!s)return{...a,callback:({close:e})=>{const o={post:t.id,action:"edit"},a=(0,x.addQueryArgs)("post.php",o);document.location=a,e()}};const r=(0,x.getPath)(window.location.href)?.includes("site-editor.php");return{...a,callback:({close:a})=>{r?o.navigate(`/${e}/${t.id}?canvas=edit`):document.location=(0,x.addQueryArgs)("site-editor.php",{p:`/${e}/${t.id}`,canvas:"edit"}),a()}}}))),[n,c,s,o]),isLoading:p}},P=e=>function({search:t}){const o=T(),{isBlockBasedTheme:s,canCreateTemplate:n}=(0,d.useSelect)((t=>({isBlockBasedTheme:t(l.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:t(l.store).canUser("create",{kind:"postType",name:e})})),[]),{records:r,isLoading:c}=(0,d.useSelect)((t=>{const{getEntityRecords:o}=t(l.store),a={per_page:-1};return{records:o("postType",e,a),isLoading:!t(l.store).hasFinishedResolution("getEntityRecords",["postType",e,a])}}),[]),p=(0,a.useMemo)((()=>function(e=[],t=""){if(!Array.isArray(e)||!e.length)return[];if(!t)return e;const o=[],a=[];for(let s=0;s<e.length;s++){const n=e[s];n?.title?.raw?.toLowerCase()?.includes(t?.toLowerCase())?o.push(n):a.push(n)}return o.concat(a)}(r,t).slice(0,10)),[r,t]);return{commands:(0,a.useMemo)((()=>{if(!n||!s&&"wp_template_part"===!e)return[];const t=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),a=[];return a.push(...p.map((a=>({name:e+"-"+a.id,searchLabel:a.title?.rendered+" "+a.id,label:a.title?.rendered?a.title?.rendered:(0,i.__)("(no title)"),icon:j[e],callback:({close:s})=>{t?o.navigate(`/${e}/${a.id}?canvas=edit`):document.location=(0,x.addQueryArgs)("site-editor.php",{p:`/${e}/${a.id}`,canvas:"edit"}),s()}})))),p?.length>0&&"wp_template_part"===e&&a.push({name:"core/edit-site/open-template-parts",label:(0,i.__)("Go to: Template parts"),icon:g,callback:({close:e})=>{t?o.navigate("/pattern?postType=wp_template_part&categoryId=all-parts"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/pattern",postType:"wp_template_part",categoryId:"all-parts"}),e()}}),a}),[n,s,p,o]),isLoading:c}},V=()=>function(){const e=T(),t=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),{isBlockBasedTheme:o,canCreateTemplate:s,canCreatePatterns:n}=(0,d.useSelect)((e=>({isBlockBasedTheme:e(l.store).getCurrentTheme()?.is_block_theme,canCreateTemplate:e(l.store).canUser("create",{kind:"postType",name:"wp_template"}),canCreatePatterns:e(l.store).canUser("create",{kind:"postType",name:"wp_block"})})),[]);return{commands:(0,a.useMemo)((()=>{const a=[];return s&&o&&(a.push({name:"core/edit-site/open-styles",label:(0,i.__)("Go to: Styles"),icon:v,callback:({close:o})=>{t?e.navigate("/styles"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/styles"}),o()}}),a.push({name:"core/edit-site/open-navigation",label:(0,i.__)("Go to: Navigation"),icon:_,callback:({close:o})=>{t?e.navigate("/navigation"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/navigation"}),o()}}),a.push({name:"core/edit-site/open-templates",label:(0,i.__)("Go to: Templates"),icon:w,callback:({close:o})=>{t?e.navigate("/template"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/template"}),o()}})),n&&a.push({name:"core/edit-site/open-patterns",label:(0,i.__)("Go to: Patterns"),icon:b,callback:({close:o})=>{s?(t?e.navigate("/pattern"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/pattern"}),o()):document.location.href="edit.php?post_type=wp_block"}}),a}),[e,t,s,n,o]),isLoading:!1}},B=()=>function(){const e=T(),t=(0,x.getPath)(window.location.href)?.includes("site-editor.php"),{canEditCSS:o}=(0,d.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:o}=e(l.store),a=o(),s=a?t("root","globalStyles",a):void 0;return{canEditCSS:!!s?._links?.["wp:action-edit-css"]}}),[]);return{isLoading:!1,commands:(0,a.useMemo)((()=>o?[{name:"core/open-styles-css",label:(0,i.__)("Open custom CSS"),icon:y,callback:({close:o})=>{o(),t?e.navigate("/styles?section=/css"):document.location=(0,x.addQueryArgs)("site-editor.php",{p:"/styles",section:"/css"})}}]:[]),[e,o,t])}};function z(e){(0,n.useCommandLoader)({name:"core/edit-site/navigate-pages",hook:M("page"),disabled:e}),(0,n.useCommandLoader)({name:"core/edit-site/navigate-posts",hook:M("post"),disabled:e}),(0,n.useCommandLoader)({name:"core/edit-site/navigate-templates",hook:P("wp_template"),disabled:e}),(0,n.useCommandLoader)({name:"core/edit-site/navigate-template-parts",hook:P("wp_template_part"),disabled:e}),(0,n.useCommandLoader)({name:"core/edit-site/basic-navigation",hook:V(),context:"site-editor",disabled:e}),(0,n.useCommandLoader)({name:"core/edit-site/global-styles-css",hook:B(),disabled:e})}const A={};L(A,{useCommands:function(){m(),z()}});const{RouterProvider:G}=C(s.privateApis);function R({settings:e}){const{menu_commands:t,is_network_admin:a}=e;return m(t),z(a),(0,o.jsx)(G,{pathArg:"p",children:(0,o.jsx)(n.CommandMenu,{})})}function E(e){const t=document.createElement("div");document.body.appendChild(t),(0,a.createRoot)(t).render((0,o.jsx)(a.StrictMode,{children:(0,o.jsx)(R,{settings:e})}))}(window.wp=window.wp||{}).coreCommands=t})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/edit-post.js b/wp-includes/js/dist/edit-post.js
index db7d45effc..749f1144b8 100644
--- a/wp-includes/js/dist/edit-post.js
+++ b/wp-includes/js/dist/edit-post.js
@@ -1826,9 +1826,9 @@ function usePaddingAppender(enabled) {
}
}
const { ownerDocument } = node;
- ownerDocument.addEventListener("mousedown", onMouseDown);
+ ownerDocument.addEventListener("pointerdown", onMouseDown);
return () => {
- ownerDocument.removeEventListener("mousedown", onMouseDown);
+ ownerDocument.removeEventListener("pointerdown", onMouseDown);
};
},
[registry]
diff --git a/wp-includes/js/dist/edit-post.min.js b/wp-includes/js/dist/edit-post.min.js
index e3dc75947e..70f8d8a4e2 100644
--- a/wp-includes/js/dist/edit-post.min.js
+++ b/wp-includes/js/dist/edit-post.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var o in s)e.o(s,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:s[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{PluginBlockSettingsMenuItem:()=>Gt,PluginDocumentSettingPanel:()=>Ht,PluginMoreMenuItem:()=>Ut,PluginPostPublishPanel:()=>Wt,PluginPostStatusInfo:()=>Qt,PluginPrePublishPanel:()=>qt,PluginSidebar:()=>Xt,PluginSidebarMoreMenuItem:()=>Zt,__experimentalFullscreenModeClose:()=>D,__experimentalMainDashboardButton:()=>Yt,__experimentalPluginPostExcerpt:()=>$t,initializeEditor:()=>Jt,reinitializeEditor:()=>es,store:()=>ot});var s={};e.r(s),e.d(s,{__experimentalSetPreviewDeviceType:()=>_e,__unstableCreateTemplate:()=>ve,closeGeneralSidebar:()=>K,closeModal:()=>ee,closePublishSidebar:()=>se,hideBlockTypes:()=>ue,initializeMetaBoxes:()=>Se,metaBoxUpdatesFailure:()=>we,metaBoxUpdatesSuccess:()=>he,openGeneralSidebar:()=>Y,openModal:()=>J,openPublishSidebar:()=>te,removeEditorPanel:()=>ne,requestMetaBoxUpdates:()=>me,setAvailableMetaBoxesPerLocation:()=>ge,setIsEditingTemplate:()=>ye,setIsInserterOpened:()=>fe,setIsListViewOpened:()=>xe,showBlockTypes:()=>pe,switchEditorMode:()=>ce,toggleDistractionFree:()=>Pe,toggleEditorPanelEnabled:()=>ie,toggleEditorPanelOpened:()=>re,toggleFeature:()=>ae,toggleFullscreenMode:()=>Ee,togglePinnedPluginItem:()=>le,togglePublishSidebar:()=>oe,updatePreferredStyleVariations:()=>de});var o={};e.r(o),e.d(o,{__experimentalGetInsertionPoint:()=>Ke,__experimentalGetPreviewDeviceType:()=>$e,areMetaBoxesInitialized:()=>tt,getActiveGeneralSidebarName:()=>Ae,getActiveMetaBoxLocations:()=>He,getAllMetaBoxes:()=>Qe,getEditedPostTemplate:()=>st,getEditorMode:()=>ke,getHiddenBlockTypes:()=>De,getMetaBoxesPerLocation:()=>We,getPreference:()=>Ce,getPreferences:()=>Re,hasMetaBoxes:()=>Xe,isEditingTemplate:()=>et,isEditorPanelEnabled:()=>Le,isEditorPanelOpened:()=>Fe,isEditorPanelRemoved:()=>Ne,isEditorSidebarOpened:()=>Be,isFeatureActive:()=>ze,isInserterOpened:()=>Ye,isListViewOpened:()=>Je,isMetaBoxLocationActive:()=>qe,isMetaBoxLocationVisible:()=>Ue,isModalActive:()=>Ve,isPluginItemPinned:()=>Ge,isPluginSidebarOpened:()=>Ie,isPublishSidebarOpened:()=>Oe,isSavingMetaBoxes:()=>Ze});const i=window.ReactJSXRuntime,r=window.wp.blocks,n=window.wp.blockLibrary,a=window.wp.deprecated;var c=e.n(a);const l=window.wp.element,d=window.wp.data,p=window.wp.preferences,u=window.wp.widgets,g=window.wp.editor;function m(e){var t,s,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(s=m(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}const h=function(){for(var e,t,s=0,o="",i=arguments.length;s<i;s++)(e=arguments[s])&&(t=m(e))&&(o&&(o+=" "),o+=t);return o},w=(0,l.forwardRef)((({children:e,className:t,ariaLabel:s,as:o="div",...r},n)=>(0,i.jsx)(o,{ref:n,className:h("admin-ui-navigable-region",t),"aria-label":s,role:"region",tabIndex:"-1",...r,children:e})));w.displayName="NavigableRegion";var _=w;const f=window.wp.blockEditor,x=window.wp.plugins,y=window.wp.i18n,v=window.wp.primitives;var b=(0,i.jsx)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(v.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),S=(0,i.jsx)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(v.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});const P=window.wp.notices,E=window.wp.commands,M=window.wp.url,j=window.wp.htmlEntities,T=window.wp.coreData,k=window.wp.components,B=window.wp.compose;var I=(0,i.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,i.jsx)(v.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})}),A=(0,i.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(v.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});const R={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}},C={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}};var D=function({showTooltip:e,icon:t,href:s,initialPost:o}){const{isRequestingSiteIcon:r,postType:n,siteIconUrl:a}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(g.store),{getEntityRecord:s,getPostType:i,isResolving:r}=e(T.store),n=s("root","__unstableBase",void 0)||{},a=o?.type||t();return{isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),postType:i(a),siteIconUrl:n.site_icon_url}}),[o?.type]),c=(0,B.useReducedMotion)(),l={duration:c?0:.2};if(!n)return null;let p;p=r&&!a?(0,i.jsx)("div",{className:"edit-post-fullscreen-mode-close-site-icon__image"}):a?(0,i.jsx)("img",{className:"edit-post-fullscreen-mode-close-site-icon__image",alt:(0,y.__)("Site Icon"),src:a}):(0,i.jsx)(k.Icon,{className:"edit-post-fullscreen-mode-close-site-icon__icon",icon:I,size:48});const u=t?(0,i.jsx)(k.Icon,{size:"36px",icon:t}):(0,i.jsx)("div",{className:"edit-post-fullscreen-mode-close-site-icon",children:p}),m=h("edit-post-fullscreen-mode-close",{"has-icon":a}),w=s??(0,M.addQueryArgs)("edit.php",{post_type:n.slug}),_=n?.labels?.view_items??(0,y.__)("Back");return(0,i.jsxs)(k.__unstableMotion.div,{className:"edit-post-fullscreen-mode-close__view-mode-toggle",animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",transition:l,children:[(0,i.jsx)(k.Button,{__next40pxDefaultSize:!0,className:m,href:w,label:_,showTooltip:e,tooltipPosition:"middle right",children:(0,i.jsx)(k.__unstableMotion.div,{variants:!c&&R,children:(0,i.jsx)("div",{className:"edit-post-fullscreen-mode-close__view-mode-toggle-icon",children:u})})}),(0,i.jsx)(k.__unstableMotion.div,{className:h("edit-post-fullscreen-mode-close__back-icon",{"has-site-icon":a}),variants:!c&&C,children:(0,i.jsx)(k.Icon,{icon:A})})]})};const O=window.wp.privateApis,{lock:N,unlock:L}=(0,O.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-post"),{BackButton:F}=L(g.privateApis),V={hidden:{x:"-100%"},distractionFreeInactive:{x:0},hover:{x:0,transition:{type:"tween",delay:.2}}};var z=function({initialPost:e}){return(0,i.jsx)(F,{children:({length:t})=>t<=1&&(0,i.jsx)(k.__unstableMotion.div,{variants:V,transition:{type:"tween",delay:.8},children:(0,i.jsx)(D,{showTooltip:!0,initialPost:e})})})};function G(){return(()=>{const{isViewable:e,newPermalink:t}=(0,d.useSelect)((e=>{const{getPostType:t}=e(T.store),{getCurrentPost:s,getEditedPostAttribute:o}=e(g.store),i=t(o("type"));return{isViewable:i?.viewable,newPermalink:s().link}}),[]),s=(0,l.useRef)();(0,l.useEffect)((()=>{s.current=document.querySelector("#wp-admin-bar-preview a")||document.querySelector("#wp-admin-bar-view a")}),[]),(0,l.useEffect)((()=>{t&&s.current&&(e?(s.current.style.display="",s.current.setAttribute("href",t)):s.current.style.display="none")}),[t,e])})(),null}const H=window.wp.keyboardShortcuts;function U(e=[],t){const s=[...e];for(const e of t){const t=s.findIndex((t=>t.id===e.id));-1!==t?s[t]=e:s.push(e)}return s}const q=(0,d.combineReducers)({isSaving:function(e=!1,t){switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":case"META_BOX_UPDATES_FAILURE":return!1;default:return e}},locations:function(e={},t){if("SET_META_BOXES_PER_LOCATIONS"===t.type){const s={...e};for(const[e,o]of Object.entries(t.metaBoxesPerLocation))s[e]=U(s[e],o);return s}return e},initialized:function(e=!1,t){return"META_BOXES_INITIALIZED"===t.type||e}});var W=(0,d.combineReducers)({metaBoxes:q});const Q=window.wp.apiFetch;var X=e.n(Q);const Z=window.wp.hooks,{interfaceStore:$}=L(g.privateApis),Y=e=>({registry:t})=>{t.dispatch($).enableComplementaryArea("core",e)},K=()=>({registry:e})=>e.dispatch($).disableComplementaryArea("core"),J=e=>({registry:t})=>(c()("select( 'core/edit-post' ).openModal( name )",{since:"6.3",alternative:"select( 'core/interface').openModal( name )"}),t.dispatch($).openModal(e)),ee=()=>({registry:e})=>(c()("select( 'core/edit-post' ).closeModal()",{since:"6.3",alternative:"select( 'core/interface').closeModal()"}),e.dispatch($).closeModal()),te=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).openPublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').openPublishSidebar"}),e.dispatch(g.store).openPublishSidebar()},se=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).closePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').closePublishSidebar"}),e.dispatch(g.store).closePublishSidebar()},oe=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).togglePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').togglePublishSidebar"}),e.dispatch(g.store).togglePublishSidebar()},ie=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelEnabled"}),t.dispatch(g.store).toggleEditorPanelEnabled(e)},re=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).toggleEditorPanelOpened",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelOpened"}),t.dispatch(g.store).toggleEditorPanelOpened(e)},ne=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).removeEditorPanel",{since:"6.5",alternative:"dispatch( 'core/editor').removeEditorPanel"}),t.dispatch(g.store).removeEditorPanel(e)},ae=e=>({registry:t})=>t.dispatch(p.store).toggle("core/edit-post",e),ce=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(g.store).switchEditorMode(e)},le=e=>({registry:t})=>{const s=t.select($).isItemPinned("core",e);t.dispatch($)[s?"unpinItem":"pinItem"]("core",e)};function de(){return c()("dispatch( 'core/edit-post' ).updatePreferredStyleVariations",{since:"6.6",hint:"Preferred Style Variations are not supported anymore."}),{type:"NOTHING"}}const pe=e=>({registry:t})=>{L(t.dispatch(g.store)).showBlockTypes(e)},ue=e=>({registry:t})=>{L(t.dispatch(g.store)).hideBlockTypes(e)};function ge(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}const me=()=>async({registry:e,select:t,dispatch:s})=>{s({type:"REQUEST_META_BOX_UPDATES"}),window.tinyMCE&&window.tinyMCE.triggerSave();const o=new window.FormData(document.querySelector(".metabox-base-form")),i=o.get("post_ID"),r=o.get("post_type"),n=e.select(T.store).getEditedEntityRecord("postType",r,i),a=[!!n.comment_status&&["comment_status",n.comment_status],!!n.ping_status&&["ping_status",n.ping_status],!!n.sticky&&["sticky",n.sticky],!!n.author&&["post_author",n.author]].filter(Boolean),c=[o,...t.getActiveMetaBoxLocations().map((e=>new window.FormData((e=>{const t=document.querySelector(`.edit-post-meta-boxes-area.is-${e} .metabox-location-${e}`);return t||document.querySelector("#metaboxes .metabox-location-"+e)})(e))))].reduce(((e,t)=>{for(const[s,o]of t)e.append(s,o);return e}),new window.FormData);a.forEach((([e,t])=>c.append(e,t)));try{await X()({url:window._wpMetaBoxUrl,method:"POST",body:c,parse:!1}),s.metaBoxUpdatesSuccess()}catch{s.metaBoxUpdatesFailure()}};function he(){return{type:"META_BOX_UPDATES_SUCCESS"}}function we(){return{type:"META_BOX_UPDATES_FAILURE"}}const _e=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(g.store).setDeviceType(e)},fe=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(g.store).setIsInserterOpened(e)},xe=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(g.store).setIsListViewOpened(e)};function ye(){return c()("dispatch( 'core/edit-post' ).setIsEditingTemplate",{since:"6.5",alternative:"dispatch( 'core/editor').setRenderingMode"}),{type:"NOTHING"}}function ve(){return c()("dispatch( 'core/edit-post' ).__unstableCreateTemplate",{since:"6.5"}),{type:"NOTHING"}}let be=!1;const Se=()=>({registry:e,select:t,dispatch:s})=>{if(!e.select(g.store).__unstableIsEditorReady())return;if(be)return;const o=e.select(g.store).getCurrentPostType();window.postboxes.page!==o&&window.postboxes.add_postbox_toggles(o),be=!0,(0,Z.addAction)("editor.savePost","core/edit-post/save-metaboxes",(async(e,o)=>{!o.isAutosave&&t.hasMetaBoxes()&&await s.requestMetaBoxUpdates()})),s({type:"META_BOXES_INITIALIZED"})},Pe=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(g.store).toggleDistractionFree()},Ee=()=>({registry:e})=>{const t=e.select(p.store).get("core/edit-post","fullscreenMode");e.dispatch(p.store).toggle("core/edit-post","fullscreenMode"),e.dispatch(P.store).createInfoNotice(t?(0,y.__)("Fullscreen mode deactivated."):(0,y.__)("Fullscreen mode activated."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,y.__)("Undo"),onClick:()=>{e.dispatch(p.store).toggle("core/edit-post","fullscreenMode")}}]})},{interfaceStore:Me}=L(g.privateApis),je=[],Te={},ke=(0,d.createRegistrySelector)((e=>()=>e(p.store).get("core","editorMode")??"visual")),Be=(0,d.createRegistrySelector)((e=>()=>{const t=e(Me).getActiveComplementaryArea("core");return["edit-post/document","edit-post/block"].includes(t)})),Ie=(0,d.createRegistrySelector)((e=>()=>{const t=e(Me).getActiveComplementaryArea("core");return!!t&&!["edit-post/document","edit-post/block"].includes(t)})),Ae=(0,d.createRegistrySelector)((e=>()=>e(Me).getActiveComplementaryArea("core")));const Re=(0,d.createRegistrySelector)((e=>()=>{c()("select( 'core/edit-post' ).getPreferences",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const t=["editorMode","hiddenBlockTypes"].reduce(((t,s)=>{const o=e(p.store).get("core",s);return{...t,[s]:o}}),{}),s=function(e,t){const s=e?.reduce(((e,t)=>({...e,[t]:{enabled:!1}})),{}),o=t?.reduce(((e,t)=>{const s=e?.[t];return{...e,[t]:{...s,opened:!0}}}),s??{});return o??s??Te}(e(p.store).get("core","inactivePanels"),e(p.store).get("core","openPanels"));return{...t,panels:s}}));function Ce(e,t,s){c()("select( 'core/edit-post' ).getPreference",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const o=Re(e)[t];return void 0===o?s:o}const De=(0,d.createRegistrySelector)((e=>()=>e(p.store).get("core","hiddenBlockTypes")??je)),Oe=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isPublishSidebarOpened",{since:"6.6",alternative:"select( 'core/editor' ).isPublishSidebarOpened"}),e(g.store).isPublishSidebarOpened()))),Ne=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelRemoved",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelRemoved"}),e(g.store).isEditorPanelRemoved(s)))),Le=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelEnabled",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelEnabled"}),e(g.store).isEditorPanelEnabled(s)))),Fe=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelOpened",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelOpened"}),e(g.store).isEditorPanelOpened(s)))),Ve=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isModalActive",{since:"6.3",alternative:"select( 'core/interface' ).isModalActive"}),!!e(Me).isModalActive(s)))),ze=(0,d.createRegistrySelector)((e=>(t,s)=>!!e(p.store).get("core/edit-post",s))),Ge=(0,d.createRegistrySelector)((e=>(t,s)=>e(Me).isItemPinned("core",s))),He=(0,d.createSelector)((e=>Object.keys(e.metaBoxes.locations).filter((t=>qe(e,t)))),(e=>[e.metaBoxes.locations])),Ue=(0,d.createRegistrySelector)((e=>(t,s)=>qe(t,s)&&We(t,s)?.some((({id:t})=>e(g.store).isEditorPanelEnabled(`meta-box-${t}`)))));function qe(e,t){const s=We(e,t);return!!s&&0!==s.length}function We(e,t){return e.metaBoxes.locations[t]}const Qe=(0,d.createSelector)((e=>Object.values(e.metaBoxes.locations).flat()),(e=>[e.metaBoxes.locations]));function Xe(e){return He(e).length>0}function Ze(e){return e.metaBoxes.isSaving}const $e=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(g.store).getDeviceType()))),Ye=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(g.store).isInserterOpened()))),Ke=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),L(e(g.store)).getInserter()))),Je=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(g.store).isListViewOpened()))),et=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isEditingTemplate",{since:"6.5",alternative:"select( 'core/editor' ).getRenderingMode"}),"wp_template"===e(g.store).getCurrentPostType())));function tt(e){return e.metaBoxes.initialized}const st=(0,d.createRegistrySelector)((e=>()=>{const{id:t,type:s}=e(g.store).getCurrentPost(),o=L(e(T.store)).getTemplateId(s,t);if(o)return e(T.store).getEditedEntityRecord("postType","wp_template",o)})),ot=(0,d.createReduxStore)("core/edit-post",{reducer:W,actions:s,selectors:o});(0,d.register)(ot);var it=function(){const{toggleFullscreenMode:e}=(0,d.useDispatch)(ot),{registerShortcut:t}=(0,d.useDispatch)(H.store);return(0,l.useEffect)((()=>{t({name:"core/edit-post/toggle-fullscreen",category:"global",description:(0,y.__)("Enable or disable fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}})}),[]),(0,H.useShortcut)("core/edit-post/toggle-fullscreen",(()=>{e()})),null};function rt(){const{editPost:e}=(0,d.useDispatch)(g.store),[t,s]=(0,l.useState)(void 0),[o,r]=(0,l.useState)(""),{postType:n,isNewPost:a}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:s}=e(g.store);return{postType:t("type"),isNewPost:s()}}),[]),[c,p]=(0,l.useState)((()=>a&&"wp_block"===n));return"wp_block"===n&&a?(0,i.jsx)(i.Fragment,{children:c&&(0,i.jsx)(k.Modal,{title:(0,y.__)("Create pattern"),onRequestClose:()=>{p(!1)},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,i.jsx)("form",{onSubmit:s=>{s.preventDefault(),p(!1),e({title:o,meta:{wp_pattern_sync_status:t}})},children:(0,i.jsxs)(k.__experimentalVStack,{spacing:"5",children:[(0,i.jsx)(k.TextControl,{label:(0,y.__)("Name"),value:o,onChange:r,placeholder:(0,y.__)("My pattern"),className:"patterns-create-modal__name-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,i.jsx)(k.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,y._x)("Synced","pattern (singular)"),help:(0,y.__)("Sync this pattern across multiple locations."),checked:!t,onChange:()=>{s(t?void 0:"unsynced")}}),(0,i.jsx)(k.__experimentalHStack,{justify:"right",children:(0,i.jsx)(k.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:!o,accessibleWhenDisabled:!0,children:(0,y.__)("Create")})})]})})})}):null}function nt(){const[e,t]=(0,l.useState)(null),{postId:s,postStatus:o}=(0,d.useSelect)((e=>{const{getCurrentPost:t}=e(g.store),s=t();let{id:o,status:i,type:r}=s;return["wp_template","wp_template_part"].includes(r)&&(o=s.wp_id),{postId:o,postStatus:i}}),[]);return(0,l.useEffect)((()=>{s&&s!==e&&"auto-draft"!==o&&(window.history.replaceState({id:s},"Post "+s,function(e){return(0,M.addQueryArgs)("post.php",{post:e,action:"edit"})}(s)),t(s))}),[s,o,e]),null}var at=function({location:e}){const t=(0,l.useRef)(null),s=(0,l.useRef)(null);(0,l.useEffect)((()=>(s.current=document.querySelector(".metabox-location-"+e),s.current&&t.current.appendChild(s.current),()=>{s.current&&document.querySelector("#metaboxes").appendChild(s.current)})),[e]);const o=(0,d.useSelect)((e=>e(ot).isSavingMetaBoxes()),[]),r=h("edit-post-meta-boxes-area",`is-${e}`,{"is-loading":o});return(0,i.jsxs)("div",{className:r,children:[o&&(0,i.jsx)(k.Spinner,{}),(0,i.jsx)("div",{className:"edit-post-meta-boxes-area__container",ref:t}),(0,i.jsx)("div",{className:"edit-post-meta-boxes-area__clear"})]})};function ct({id:e}){const t=(0,d.useSelect)((t=>t(g.store).isEditorPanelEnabled(`meta-box-${e}`)),[e]);return(0,l.useEffect)((()=>{const s=document.getElementById(e);s&&(t?s.classList.remove("is-hidden"):s.classList.add("is-hidden"))}),[e,t]),null}function lt({location:e}){const t=(0,d.useSelect)((t=>t(ot).getMetaBoxesPerLocation(e)),[e]);return(0,i.jsxs)(i.Fragment,{children:[(t??[]).map((({id:e})=>(0,i.jsx)(ct,{id:e},e))),(0,i.jsx)(at,{location:e})]})}const dt=window.wp.keycodes;var pt=function(){const e=(0,d.useSelect)((e=>{const{canUser:t}=e(T.store),s=(0,M.addQueryArgs)("edit.php",{post_type:"wp_block"}),o=(0,M.addQueryArgs)("site-editor.php",{p:"/pattern"});return t("create",{kind:"postType",name:"wp_template"})?o:s}),[]);return(0,i.jsx)(k.MenuItem,{role:"menuitem",href:e,children:(0,y.__)("Manage patterns")})};function ut(){const e=(0,d.useSelect)((e=>"wp_template"===e(g.store).getCurrentPostType()),[]);return(0,i.jsx)(p.PreferenceToggleMenuItem,{scope:"core/edit-post",name:e?"welcomeGuideTemplate":"welcomeGuide",label:(0,y.__)("Welcome Guide")})}const{PreferenceBaseOption:gt}=L(p.privateApis);function mt({willEnable:e}){const[t,s]=(0,l.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"edit-post-preferences-modal__custom-fields-confirmation-message",children:(0,y.__)("A page reload is required for this change. Make sure your content is saved before reloading.")}),(0,i.jsx)(k.Button,{__next40pxDefaultSize:!0,variant:"secondary",isBusy:t,accessibleWhenDisabled:!0,disabled:t,onClick:()=>{s(!0),function(){const e=document.getElementById("toggle-custom-fields-form");e.querySelector('[name="_wp_http_referer"]').setAttribute("value",(0,M.getPathAndQueryString)(window.location.href)),e.submit()}()},children:e?(0,y.__)("Show & Reload Page"):(0,y.__)("Hide & Reload Page")})]})}function ht({label:e}){const t=(0,d.useSelect)((e=>!!e(g.store).getEditorSettings().enableCustomFields),[]),[s,o]=(0,l.useState)(t);return(0,i.jsx)(gt,{label:e,isChecked:s,onChange:o,children:s!==t&&(0,i.jsx)(mt,{willEnable:s})})}const{PreferenceBaseOption:wt}=L(p.privateApis);function _t(e){const{toggleEditorPanelEnabled:t}=(0,d.useDispatch)(g.store),{isChecked:s,isRemoved:o}=(0,d.useSelect)((t=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:o}=t(g.store);return{isChecked:s(e.panelName),isRemoved:o(e.panelName)}}),[e.panelName]);return o?null:(0,i.jsx)(wt,{isChecked:s,onChange:()=>t(e.panelName),...e})}const{PreferencesModalSection:ft}=L(p.privateApis);var xt=(0,d.withSelect)((e=>{const{getEditorSettings:t}=e(g.store),{getAllMetaBoxes:s}=e(ot);return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:s()}}))((function({areCustomFieldsRegistered:e,metaBoxes:t,...s}){const o=t.filter((({id:e})=>"postcustom"!==e));return e||0!==o.length?(0,i.jsxs)(ft,{...s,children:[e&&(0,i.jsx)(ht,{label:(0,y.__)("Custom fields")}),o.map((({id:e,title:t})=>(0,i.jsx)(_t,{label:t,panelName:`meta-box-${e}`},e)))]}):null}));const{PreferenceToggleControl:yt}=L(p.privateApis),{PreferencesModal:vt}=L(g.privateApis);function bt(){const e={general:(0,i.jsx)(xt,{title:(0,y.__)("Advanced")}),appearance:(0,i.jsx)(yt,{scope:"core/edit-post",featureName:"themeStyles",help:(0,y.__)("Make the editor look like your theme."),label:(0,y.__)("Use theme styles")})};return(0,i.jsx)(vt,{extraSections:e})}const{ToolsMoreMenuGroup:St,ViewMoreMenuGroup:Pt}=L(g.privateApis);var Et=()=>{const e=(0,B.useViewportMatch)("large");return(0,i.jsxs)(i.Fragment,{children:[e&&(0,i.jsx)(Pt,{children:(0,i.jsx)(p.PreferenceToggleMenuItem,{scope:"core/edit-post",name:"fullscreenMode",label:(0,y.__)("Fullscreen mode"),info:(0,y.__)("Show and hide the admin user interface"),messageActivated:(0,y.__)("Fullscreen mode activated."),messageDeactivated:(0,y.__)("Fullscreen mode deactivated."),shortcut:dt.displayShortcut.secondary("f")})}),(0,i.jsxs)(St,{children:[(0,i.jsx)(pt,{}),(0,i.jsx)(ut,{})]}),(0,i.jsx)(bt,{})]})};function Mt({nonAnimatedSrc:e,animatedSrc:t}){return(0,i.jsxs)("picture",{className:"edit-post-welcome-guide__image",children:[(0,i.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,i.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function jt(){const{toggleFeature:e}=(0,d.useDispatch)(ot);return(0,i.jsx)(k.Guide,{className:"edit-post-welcome-guide",contentLabel:(0,y.__)("Welcome to the editor"),finishButtonText:(0,y.__)("Get started"),onFinish:()=>e("welcomeGuide"),pages:[{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Welcome to the editor")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,y.__)("In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.")})]})},{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Customize each block")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,y.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")})]})},{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Explore all blocks")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,l.createInterpolateElement)((0,y.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,i.jsx)("img",{alt:(0,y.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})})]})},{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Learn more")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,l.createInterpolateElement)((0,y.__)("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"),{a:(0,i.jsx)(k.ExternalLink,{href:(0,y.__)("https://wordpress.org/documentation/article/wordpress-block-editor/")})})})]})}]})}function Tt(){const{toggleFeature:e}=(0,d.useDispatch)(ot);return(0,i.jsx)(k.Guide,{className:"edit-template-welcome-guide",contentLabel:(0,y.__)("Welcome to the template editor"),finishButtonText:(0,y.__)("Get started"),onFinish:()=>e("welcomeGuideTemplate"),pages:[{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Welcome to the template editor")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,y.__)("Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.")})]})}]})}function kt({postType:e}){const{isActive:t,isEditingTemplate:s}=(0,d.useSelect)((t=>{const{isFeatureActive:s}=t(ot),o="wp_template"===e;return{isActive:s(o?"welcomeGuideTemplate":"welcomeGuide"),isEditingTemplate:o}}),[e]);return t?s?(0,i.jsx)(Tt,{}):(0,i.jsx)(jt,{}):null}var Bt=(0,i.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(v.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"})});const{getLayoutStyles:It}=L(f.privateApis),{useCommandContext:At}=L(E.privateApis),{Editor:Rt,FullscreenMode:Ct}=L(g.privateApis),{BlockKeyboardShortcuts:Dt}=L(n.privateApis),Ot=["wp_template","wp_template_part","wp_block","wp_navigation"];function Nt({isLegacy:e}){const[t,s,o]=(0,d.useSelect)((e=>{const{get:t}=e(p.store),{isMetaBoxLocationVisible:s}=e(ot);return[!!t("core/edit-post","metaBoxesMainIsOpen"),t("core/edit-post","metaBoxesMainOpenHeight"),s("normal")||s("advanced")||s("side")]}),[]),{set:r}=(0,d.useDispatch)(p.store),n=(0,l.useRef)(),a=(0,B.useMediaQuery)("(max-height: 549px)"),[{min:c,max:u},g]=(0,l.useState)((()=>({}))),m=(0,B.useRefEffect)((e=>{const t=e.closest(".interface-interface-skeleton__content");if(!t)return;const s=t.querySelectorAll(":scope > .components-notice-list"),o=t.querySelector(".edit-post-meta-boxes-main__presenter"),i=new window.ResizeObserver((()=>{let e=t.offsetHeight;for(const t of s)e-=t.offsetHeight;const i=o.offsetHeight;g({min:i,max:e})}));i.observe(t);for(const e of s)i.observe(e);return()=>i.disconnect()}),[]),h=(0,l.useRef)({}),w=(0,l.useRef)(),f=(0,l.useId)(),x=(e="auto",t,s)=>{"auto"===e?t=!1:e=Math.min(u,Math.max(c,e)),t?r("core/edit-post","metaBoxesMainOpenHeight",e):a||(w.current.ariaValueNow=M(e)),s&&n.current.updateSize({height:e,width:"auto"})},v=(0,B.useEvent)((()=>({isOpen:t,openHeight:s,min:c})));if((0,l.useEffect)((()=>{const e=v();if(void 0!==e.min&&n.current){const t=a?"auto":e.openHeight,s=e.isOpen?t:e.min;x(s,!1,!0)}}),[a]),!o)return;const P=(0,i.jsxs)("div",{className:"edit-post-layout__metaboxes edit-post-meta-boxes-main__liner",hidden:!e&&!t,children:[(0,i.jsx)(lt,{location:"normal"}),(0,i.jsx)(lt,{location:"advanced"})]});if(e)return P;const E=void 0===s,M=e=>Math.round((e-c)/(u-c)*100),j=void 0===u||E?50:M(s),T=(e=!t)=>r("core/edit-post","metaBoxesMainIsOpen",e),I=(0,y.__)("Meta Boxes"),A=(0,i.jsxs)("button",{"aria-expanded":t,onClick:({detail:e})=>{const{isToggleInferred:o}=h.current;if(a||!e||o){T();x(t?c:a?"auto":s,!1,!0)}},...a&&{onMouseDown:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation()},children:[I,(0,i.jsx)(k.Icon,{icon:t?b:S})]}),R=!a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.Tooltip,{text:(0,y.__)("Drag to resize"),children:(0,i.jsx)("button",{ref:w,role:"separator","aria-valuenow":j,"aria-label":(0,y.__)("Drag to resize"),"aria-describedby":f,onKeyDown:e=>{const t={ArrowUp:20,ArrowDown:-20}[e.key];if(t){const o=n.current.resizable,i=t+(E?o.offsetHeight:s);x(i,!0,!0),T(i>c),e.preventDefault()}}})}),(0,i.jsx)(k.VisuallyHidden,{id:f,children:(0,y.__)("Use up and down arrow keys to resize the meta box panel.")})]}),C={as:_,ref:n,className:"edit-post-meta-boxes-main",defaultSize:{height:t?s:0},minHeight:c,maxHeight:u,enable:{top:!0},handleClasses:{top:"edit-post-meta-boxes-main__presenter"},handleComponent:{top:(0,i.jsxs)(i.Fragment,{children:[A,R]})},onPointerDown:({pointerId:e,target:t})=>{w.current?.parentElement.contains(t)&&t.setPointerCapture(e)},onResizeStart:({timeStamp:e},t,s)=>{E&&x(s.offsetHeight,!1,!0),s.classList.add("is-resizing"),h.current={timeStamp:e,maxDelta:0}},onResize:(e,t,s,o)=>{const{maxDelta:i}=h.current,r=Math.abs(o.height);h.current.maxDelta=Math.max(i,r),x(n.current.state.height)},onResizeStop:(e,t,s)=>{s.classList.remove("is-resizing");const o=e.timeStamp-h.current.timeStamp,i=e.target===w.current,{maxDelta:r}=h.current;if(a||!i&&(r<1||o<144&&r<5))h.current.isToggleInferred=!0;else{const{height:e}=n.current.state,t=e>c;T(t),t&&x(e,!0)}}};return(0,i.jsxs)(k.ResizableBox,{"aria-label":I,...C,children:[(0,i.jsx)("meta",{ref:m}),P]})}var Lt=function({postId:e,postType:t,settings:s,initialEdits:o}){!function(){const{isFullscreen:e}=(0,d.useSelect)((e=>{const{get:t}=e(p.store);return{isFullscreen:t("core/edit-post","fullscreenMode")}}),[]),{toggle:t}=(0,d.useDispatch)(p.store),{createInfoNotice:s}=(0,d.useDispatch)(P.store);(0,E.useCommand)({name:"core/toggle-fullscreen-mode",label:e?(0,y.__)("Exit fullscreen"):(0,y.__)("Enter fullscreen"),icon:Bt,callback:({close:o})=>{t("core/edit-post","fullscreenMode"),o(),s(e?(0,y.__)("Fullscreen off."):(0,y.__)("Fullscreen on."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,y.__)("Undo"),onClick:()=>{t("core/edit-post","fullscreenMode")}}]})}})}();const n=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentPostType:s,getDeviceType:o}=e(g.store);return"Desktop"!==o()||["wp_template","wp_block"].includes(s())||L(e(f.store)).isZoomOut()||e(r.store).getBlockTypes().every((e=>e.apiVersion>=3))}),[]),{createErrorNotice:a}=(0,d.useDispatch)(P.store),{currentPost:{postId:c,postType:u},onNavigateToEntityRecord:m,onNavigateToPreviousEntityRecord:w}=function(e,t,s){const[o,i]=(0,l.useReducer)(((e,{type:t,post:s,previousRenderingMode:o})=>"push"===t?[...e,{post:s,previousRenderingMode:o}]:"pop"===t&&e.length>1?e.slice(0,-1):e),[{post:{postId:e,postType:t}}]),{post:r,previousRenderingMode:n}=o[o.length-1],{getRenderingMode:a}=(0,d.useSelect)(g.store),{setRenderingMode:c}=(0,d.useDispatch)(g.store),p=(0,l.useCallback)((e=>{i({type:"push",post:{postId:e.postId,postType:e.postType},previousRenderingMode:a()}),c(s)}),[a,c,s]),u=(0,l.useCallback)((()=>{i({type:"pop"}),n&&c(n)}),[c,n]);return{currentPost:r,onNavigateToEntityRecord:p,onNavigateToPreviousEntityRecord:o.length>1?u:void 0}}(e,t,"post-only"),_="wp_template"===u,{mode:v,isFullscreenActive:b,hasResolvedMode:S,hasActiveMetaboxes:I,hasBlockSelected:A,showIconLabels:R,isDistractionFree:C,showMetaBoxes:D,isWelcomeGuideVisible:O,templateId:N,enablePaddingAppender:F,isDevicePreview:V}=(0,d.useSelect)((e=>{const{get:t}=e(p.store),{isFeatureActive:o,hasMetaBoxes:i}=e(ot),{canUser:r,getPostType:n,getTemplateId:a}=L(e(T.store)),l=s.supportsTemplateMode,d=n(u)?.viewable??!1,m=r("read",{kind:"postType",name:"wp_template"}),{getBlockSelectionStart:h,isZoomOut:x}=L(e(f.store)),{getEditorMode:y,getRenderingMode:v,getDefaultRenderingMode:b,getDeviceType:S}=L(e(g.store)),P="post-only"===v(),E=!Ot.includes(u),M="wp_block"===u&&!w,j=a(u,c),k=b(u);return{mode:y(),isFullscreenActive:o("fullscreenMode"),hasActiveMetaboxes:i(),hasResolvedMode:"template-locked"===k?!!j:void 0!==k,hasBlockSelected:!!h(),showIconLabels:t("core","showIconLabels"),isDistractionFree:t("core","distractionFree"),showMetaBoxes:E&&!x()||M,isWelcomeGuideVisible:o("welcomeGuide"),templateId:l&&d&&m&&!_?j:null,enablePaddingAppender:!x()&&P&&E,isDevicePreview:"Desktop"!==S()}}),[u,c,_,s.supportsTemplateMode,w]);(e=>{const t=(0,d.useSelect)((t=>e&&t(g.store).__unstableIsEditorReady()),[e]),{initializeMetaBoxes:s}=(0,d.useDispatch)(ot);(0,l.useEffect)((()=>{t&&s()}),[t,s])})(I&&S);const[H,U]=function(e){const t=(0,d.useRegistry)(),s=(0,B.useRefEffect)((e=>{function s(s){if(s.target!==e&&s.target!==e.parentElement)return;const o=e.lastElementChild;if(!o)return;const i=o.getBoundingClientRect();if(s.clientY<i.bottom)return;s.preventDefault();const n=t.select(f.store).getBlockOrder(""),a=n[n.length-1],c=t.select(f.store).getBlock(a),{selectBlock:l,insertDefaultBlock:d}=t.dispatch(f.store);c&&(0,r.isUnmodifiedDefaultBlock)(c)?l(a):d()}const{ownerDocument:o}=e;return o.addEventListener("mousedown",s),()=>{o.removeEventListener("mousedown",s)}}),[t]);return e?[s,':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}']:[]}(F);At(A?"block-selection-edit":"entity-edit");const q=(0,l.useMemo)((()=>({...s,onNavigateToEntityRecord:m,onNavigateToPreviousEntityRecord:w,defaultRenderingMode:"post-only"})),[s,m,w]),W=function(...e){const{hasThemeStyleSupport:t,editorSettings:s}=(0,d.useSelect)((e=>({hasThemeStyleSupport:e(ot).isFeatureActive("themeStyles"),editorSettings:e(g.store).getEditorSettings()})),[]),o=e.join("\n");return(0,l.useMemo)((()=>{const e=s.styles?.filter((e=>e.__unstableType&&"theme"!==e.__unstableType))??[],i=[...s?.defaultEditorStyles??[],...e],r=t&&e.length!==(s.styles?.length??0);s.disableLayoutStyles||r||i.push({css:It({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})});const n=r?s.styles??[]:i;return o?[...n,{css:o}]:n}),[s.defaultEditorStyles,s.disableLayoutStyles,s.styles,t,o])}(U);R?document.body.classList.add("show-icon-labels"):document.body.classList.remove("show-icon-labels");const Q=(0,k.__unstableUseNavigateRegions)(),X=h("edit-post-layout","is-mode-"+v,{"has-metaboxes":I}),{createSuccessNotice:Z}=(0,d.useDispatch)(P.store),$=(0,l.useCallback)(((e,t)=>{switch(e){case"move-to-trash":document.location.href=(0,M.addQueryArgs)("edit.php",{trashed:1,post_type:t[0].type,ids:t[0].id});break;case"duplicate-post":{const e=t[0],s="string"==typeof e.title?e.title:e.title?.rendered;Z((0,y.sprintf)((0,y.__)('"%s" successfully created.'),(0,j.decodeEntities)(s)||(0,y.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,y.__)("Edit"),onClick:()=>{const t=e.id;document.location.href=(0,M.addQueryArgs)("post.php",{post:t,action:"edit"})}}]})}}}),[Z]),Y=(0,l.useMemo)((()=>({type:t,id:e})),[t,e]),K=(0,B.useViewportMatch)("medium")&&b?(0,i.jsx)(z,{initialPost:Y}):null;return(0,i.jsx)(k.SlotFillProvider,{children:(0,i.jsxs)(g.ErrorBoundary,{canCopyContent:!0,children:[(0,i.jsx)(kt,{postType:u}),(0,i.jsx)("div",{className:Q.className,...Q,ref:Q.ref,children:(0,i.jsxs)(Rt,{settings:q,initialEdits:o,postType:u,postId:c,templateId:N,className:X,styles:W,forceIsDirty:I,contentRef:H,disableIframe:!n,autoFocus:!O,onActionPerformed:$,extraSidebarPanels:D&&(0,i.jsx)(lt,{location:"side"}),extraContent:!C&&D&&(0,i.jsx)(Nt,{isLegacy:!n||V}),children:[(0,i.jsx)(g.PostLockedModal,{}),(0,i.jsx)(G,{}),(0,i.jsx)(Ct,{isActive:b}),(0,i.jsx)(nt,{}),(0,i.jsx)(g.UnsavedChangesWarning,{}),(0,i.jsx)(g.AutosaveMonitor,{}),(0,i.jsx)(g.LocalAutosaveMonitor,{}),(0,i.jsx)(it,{}),(0,i.jsx)(g.EditorKeyboardShortcutsRegister,{}),(0,i.jsx)(Dt,{}),(0,i.jsx)(rt,{}),(0,i.jsx)(x.PluginArea,{onError:function(e){a((0,y.sprintf)((0,y.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,i.jsx)(Et,{}),K,(0,i.jsx)(g.EditorSnackbars,{})]})})]})})};const{PluginPostExcerpt:Ft}=L(g.privateApis),Vt=(0,M.getPath)(window.location.href)?.includes("site-editor.php"),zt=e=>{c()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function Gt(e){return Vt?null:(zt("PluginBlockSettingsMenuItem"),(0,i.jsx)(g.PluginBlockSettingsMenuItem,{...e}))}function Ht(e){return Vt?null:(zt("PluginDocumentSettingPanel"),(0,i.jsx)(g.PluginDocumentSettingPanel,{...e}))}function Ut(e){return Vt?null:(zt("PluginMoreMenuItem"),(0,i.jsx)(g.PluginMoreMenuItem,{...e}))}function qt(e){return Vt?null:(zt("PluginPrePublishPanel"),(0,i.jsx)(g.PluginPrePublishPanel,{...e}))}function Wt(e){return Vt?null:(zt("PluginPostPublishPanel"),(0,i.jsx)(g.PluginPostPublishPanel,{...e}))}function Qt(e){return Vt?null:(zt("PluginPostStatusInfo"),(0,i.jsx)(g.PluginPostStatusInfo,{...e}))}function Xt(e){return Vt?null:(zt("PluginSidebar"),(0,i.jsx)(g.PluginSidebar,{...e}))}function Zt(e){return Vt?null:(zt("PluginSidebarMoreMenuItem"),(0,i.jsx)(g.PluginSidebarMoreMenuItem,{...e}))}function $t(){return Vt?null:(c()("wp.editPost.__experimentalPluginPostExcerpt",{since:"6.6",hint:"Core and custom panels can be access programmatically using their panel name.",link:"https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"}),Ft)}const{BackButton:Yt,registerCoreBlockBindingsSources:Kt}=L(g.privateApis);function Jt(e,t,s,o,a){const c=window.matchMedia("(min-width: 782px)").matches,m=document.getElementById(e),h=(0,l.createRoot)(m);(0,d.dispatch)(p.store).setDefaults("core/edit-post",{fullscreenMode:!0,themeStyles:!0,welcomeGuide:!0,welcomeGuideTemplate:!0}),(0,d.dispatch)(p.store).setDefaults("core",{allowRightClickOverrides:!0,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,hiddenBlockTypes:[],inactivePanels:[],openPanels:["post-status"],showBlockBreadcrumbs:!0,showIconLabels:!1,showListViewByDefault:!1,enableChoosePatternModal:!0,isPublishSidebarEnabled:!0}),window.__experimentalMediaProcessing&&(0,d.dispatch)(p.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,d.dispatch)(r.store).reapplyBlockTypeFilters(),c&&(0,d.select)(p.store).get("core","showListViewByDefault")&&!(0,d.select)(p.store).get("core","distractionFree")&&(0,d.dispatch)(g.store).setIsListViewOpened(!0),(0,n.registerCoreBlocks)(),Kt(),(0,u.registerLegacyWidgetBlock)({inserter:!1}),(0,u.registerWidgetGroupBlock)({inserter:!1});"Standards"!==("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.");return-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",(e=>{const t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))})),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),h.render((0,i.jsx)(l.StrictMode,{children:(0,i.jsx)(Lt,{settings:o,postId:s,postType:t,initialEdits:a})})),h}function es(){c()("wp.editPost.reinitializeEditor",{since:"6.2",version:"6.3"})}(window.wp=window.wp||{}).editPost=t})();
\ No newline at end of file
+(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var o in s)e.o(s,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:s[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{PluginBlockSettingsMenuItem:()=>Gt,PluginDocumentSettingPanel:()=>Ht,PluginMoreMenuItem:()=>Ut,PluginPostPublishPanel:()=>Wt,PluginPostStatusInfo:()=>Qt,PluginPrePublishPanel:()=>qt,PluginSidebar:()=>Xt,PluginSidebarMoreMenuItem:()=>Zt,__experimentalFullscreenModeClose:()=>D,__experimentalMainDashboardButton:()=>Yt,__experimentalPluginPostExcerpt:()=>$t,initializeEditor:()=>Jt,reinitializeEditor:()=>es,store:()=>ot});var s={};e.r(s),e.d(s,{__experimentalSetPreviewDeviceType:()=>_e,__unstableCreateTemplate:()=>ve,closeGeneralSidebar:()=>K,closeModal:()=>ee,closePublishSidebar:()=>se,hideBlockTypes:()=>ue,initializeMetaBoxes:()=>Se,metaBoxUpdatesFailure:()=>we,metaBoxUpdatesSuccess:()=>he,openGeneralSidebar:()=>Y,openModal:()=>J,openPublishSidebar:()=>te,removeEditorPanel:()=>ne,requestMetaBoxUpdates:()=>me,setAvailableMetaBoxesPerLocation:()=>ge,setIsEditingTemplate:()=>ye,setIsInserterOpened:()=>fe,setIsListViewOpened:()=>xe,showBlockTypes:()=>pe,switchEditorMode:()=>ce,toggleDistractionFree:()=>Pe,toggleEditorPanelEnabled:()=>ie,toggleEditorPanelOpened:()=>re,toggleFeature:()=>ae,toggleFullscreenMode:()=>Ee,togglePinnedPluginItem:()=>le,togglePublishSidebar:()=>oe,updatePreferredStyleVariations:()=>de});var o={};e.r(o),e.d(o,{__experimentalGetInsertionPoint:()=>Ke,__experimentalGetPreviewDeviceType:()=>$e,areMetaBoxesInitialized:()=>tt,getActiveGeneralSidebarName:()=>Ae,getActiveMetaBoxLocations:()=>He,getAllMetaBoxes:()=>Qe,getEditedPostTemplate:()=>st,getEditorMode:()=>ke,getHiddenBlockTypes:()=>De,getMetaBoxesPerLocation:()=>We,getPreference:()=>Ce,getPreferences:()=>Re,hasMetaBoxes:()=>Xe,isEditingTemplate:()=>et,isEditorPanelEnabled:()=>Le,isEditorPanelOpened:()=>Fe,isEditorPanelRemoved:()=>Ne,isEditorSidebarOpened:()=>Be,isFeatureActive:()=>ze,isInserterOpened:()=>Ye,isListViewOpened:()=>Je,isMetaBoxLocationActive:()=>qe,isMetaBoxLocationVisible:()=>Ue,isModalActive:()=>Ve,isPluginItemPinned:()=>Ge,isPluginSidebarOpened:()=>Ie,isPublishSidebarOpened:()=>Oe,isSavingMetaBoxes:()=>Ze});const i=window.ReactJSXRuntime,r=window.wp.blocks,n=window.wp.blockLibrary,a=window.wp.deprecated;var c=e.n(a);const l=window.wp.element,d=window.wp.data,p=window.wp.preferences,u=window.wp.widgets,g=window.wp.editor;function m(e){var t,s,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(s=m(e[t]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}const h=function(){for(var e,t,s=0,o="",i=arguments.length;s<i;s++)(e=arguments[s])&&(t=m(e))&&(o&&(o+=" "),o+=t);return o},w=(0,l.forwardRef)((({children:e,className:t,ariaLabel:s,as:o="div",...r},n)=>(0,i.jsx)(o,{ref:n,className:h("admin-ui-navigable-region",t),"aria-label":s,role:"region",tabIndex:"-1",...r,children:e})));w.displayName="NavigableRegion";var _=w;const f=window.wp.blockEditor,x=window.wp.plugins,y=window.wp.i18n,v=window.wp.primitives;var b=(0,i.jsx)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(v.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),S=(0,i.jsx)(v.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(v.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});const P=window.wp.notices,E=window.wp.commands,M=window.wp.url,j=window.wp.htmlEntities,T=window.wp.coreData,k=window.wp.components,B=window.wp.compose;var I=(0,i.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,i.jsx)(v.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})}),A=(0,i.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(v.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});const R={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}},C={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}};var D=function({showTooltip:e,icon:t,href:s,initialPost:o}){const{isRequestingSiteIcon:r,postType:n,siteIconUrl:a}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(g.store),{getEntityRecord:s,getPostType:i,isResolving:r}=e(T.store),n=s("root","__unstableBase",void 0)||{},a=o?.type||t();return{isRequestingSiteIcon:r("getEntityRecord",["root","__unstableBase",void 0]),postType:i(a),siteIconUrl:n.site_icon_url}}),[o?.type]),c=(0,B.useReducedMotion)(),l={duration:c?0:.2};if(!n)return null;let p;p=r&&!a?(0,i.jsx)("div",{className:"edit-post-fullscreen-mode-close-site-icon__image"}):a?(0,i.jsx)("img",{className:"edit-post-fullscreen-mode-close-site-icon__image",alt:(0,y.__)("Site Icon"),src:a}):(0,i.jsx)(k.Icon,{className:"edit-post-fullscreen-mode-close-site-icon__icon",icon:I,size:48});const u=t?(0,i.jsx)(k.Icon,{size:"36px",icon:t}):(0,i.jsx)("div",{className:"edit-post-fullscreen-mode-close-site-icon",children:p}),m=h("edit-post-fullscreen-mode-close",{"has-icon":a}),w=s??(0,M.addQueryArgs)("edit.php",{post_type:n.slug}),_=n?.labels?.view_items??(0,y.__)("Back");return(0,i.jsxs)(k.__unstableMotion.div,{className:"edit-post-fullscreen-mode-close__view-mode-toggle",animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",transition:l,children:[(0,i.jsx)(k.Button,{__next40pxDefaultSize:!0,className:m,href:w,label:_,showTooltip:e,tooltipPosition:"middle right",children:(0,i.jsx)(k.__unstableMotion.div,{variants:!c&&R,children:(0,i.jsx)("div",{className:"edit-post-fullscreen-mode-close__view-mode-toggle-icon",children:u})})}),(0,i.jsx)(k.__unstableMotion.div,{className:h("edit-post-fullscreen-mode-close__back-icon",{"has-site-icon":a}),variants:!c&&C,children:(0,i.jsx)(k.Icon,{icon:A})})]})};const O=window.wp.privateApis,{lock:N,unlock:L}=(0,O.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-post"),{BackButton:F}=L(g.privateApis),V={hidden:{x:"-100%"},distractionFreeInactive:{x:0},hover:{x:0,transition:{type:"tween",delay:.2}}};var z=function({initialPost:e}){return(0,i.jsx)(F,{children:({length:t})=>t<=1&&(0,i.jsx)(k.__unstableMotion.div,{variants:V,transition:{type:"tween",delay:.8},children:(0,i.jsx)(D,{showTooltip:!0,initialPost:e})})})};function G(){return(()=>{const{isViewable:e,newPermalink:t}=(0,d.useSelect)((e=>{const{getPostType:t}=e(T.store),{getCurrentPost:s,getEditedPostAttribute:o}=e(g.store),i=t(o("type"));return{isViewable:i?.viewable,newPermalink:s().link}}),[]),s=(0,l.useRef)();(0,l.useEffect)((()=>{s.current=document.querySelector("#wp-admin-bar-preview a")||document.querySelector("#wp-admin-bar-view a")}),[]),(0,l.useEffect)((()=>{t&&s.current&&(e?(s.current.style.display="",s.current.setAttribute("href",t)):s.current.style.display="none")}),[t,e])})(),null}const H=window.wp.keyboardShortcuts;function U(e=[],t){const s=[...e];for(const e of t){const t=s.findIndex((t=>t.id===e.id));-1!==t?s[t]=e:s.push(e)}return s}const q=(0,d.combineReducers)({isSaving:function(e=!1,t){switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":case"META_BOX_UPDATES_FAILURE":return!1;default:return e}},locations:function(e={},t){if("SET_META_BOXES_PER_LOCATIONS"===t.type){const s={...e};for(const[e,o]of Object.entries(t.metaBoxesPerLocation))s[e]=U(s[e],o);return s}return e},initialized:function(e=!1,t){return"META_BOXES_INITIALIZED"===t.type||e}});var W=(0,d.combineReducers)({metaBoxes:q});const Q=window.wp.apiFetch;var X=e.n(Q);const Z=window.wp.hooks,{interfaceStore:$}=L(g.privateApis),Y=e=>({registry:t})=>{t.dispatch($).enableComplementaryArea("core",e)},K=()=>({registry:e})=>e.dispatch($).disableComplementaryArea("core"),J=e=>({registry:t})=>(c()("select( 'core/edit-post' ).openModal( name )",{since:"6.3",alternative:"select( 'core/interface').openModal( name )"}),t.dispatch($).openModal(e)),ee=()=>({registry:e})=>(c()("select( 'core/edit-post' ).closeModal()",{since:"6.3",alternative:"select( 'core/interface').closeModal()"}),e.dispatch($).closeModal()),te=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).openPublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').openPublishSidebar"}),e.dispatch(g.store).openPublishSidebar()},se=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).closePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').closePublishSidebar"}),e.dispatch(g.store).closePublishSidebar()},oe=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).togglePublishSidebar",{since:"6.6",alternative:"dispatch( 'core/editor').togglePublishSidebar"}),e.dispatch(g.store).togglePublishSidebar()},ie=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelEnabled"}),t.dispatch(g.store).toggleEditorPanelEnabled(e)},re=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).toggleEditorPanelOpened",{since:"6.5",alternative:"dispatch( 'core/editor').toggleEditorPanelOpened"}),t.dispatch(g.store).toggleEditorPanelOpened(e)},ne=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).removeEditorPanel",{since:"6.5",alternative:"dispatch( 'core/editor').removeEditorPanel"}),t.dispatch(g.store).removeEditorPanel(e)},ae=e=>({registry:t})=>t.dispatch(p.store).toggle("core/edit-post",e),ce=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(g.store).switchEditorMode(e)},le=e=>({registry:t})=>{const s=t.select($).isItemPinned("core",e);t.dispatch($)[s?"unpinItem":"pinItem"]("core",e)};function de(){return c()("dispatch( 'core/edit-post' ).updatePreferredStyleVariations",{since:"6.6",hint:"Preferred Style Variations are not supported anymore."}),{type:"NOTHING"}}const pe=e=>({registry:t})=>{L(t.dispatch(g.store)).showBlockTypes(e)},ue=e=>({registry:t})=>{L(t.dispatch(g.store)).hideBlockTypes(e)};function ge(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}const me=()=>async({registry:e,select:t,dispatch:s})=>{s({type:"REQUEST_META_BOX_UPDATES"}),window.tinyMCE&&window.tinyMCE.triggerSave();const o=new window.FormData(document.querySelector(".metabox-base-form")),i=o.get("post_ID"),r=o.get("post_type"),n=e.select(T.store).getEditedEntityRecord("postType",r,i),a=[!!n.comment_status&&["comment_status",n.comment_status],!!n.ping_status&&["ping_status",n.ping_status],!!n.sticky&&["sticky",n.sticky],!!n.author&&["post_author",n.author]].filter(Boolean),c=[o,...t.getActiveMetaBoxLocations().map((e=>new window.FormData((e=>{const t=document.querySelector(`.edit-post-meta-boxes-area.is-${e} .metabox-location-${e}`);return t||document.querySelector("#metaboxes .metabox-location-"+e)})(e))))].reduce(((e,t)=>{for(const[s,o]of t)e.append(s,o);return e}),new window.FormData);a.forEach((([e,t])=>c.append(e,t)));try{await X()({url:window._wpMetaBoxUrl,method:"POST",body:c,parse:!1}),s.metaBoxUpdatesSuccess()}catch{s.metaBoxUpdatesFailure()}};function he(){return{type:"META_BOX_UPDATES_SUCCESS"}}function we(){return{type:"META_BOX_UPDATES_FAILURE"}}const _e=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(g.store).setDeviceType(e)},fe=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(g.store).setIsInserterOpened(e)},xe=e=>({registry:t})=>{c()("dispatch( 'core/edit-post' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(g.store).setIsListViewOpened(e)};function ye(){return c()("dispatch( 'core/edit-post' ).setIsEditingTemplate",{since:"6.5",alternative:"dispatch( 'core/editor').setRenderingMode"}),{type:"NOTHING"}}function ve(){return c()("dispatch( 'core/edit-post' ).__unstableCreateTemplate",{since:"6.5"}),{type:"NOTHING"}}let be=!1;const Se=()=>({registry:e,select:t,dispatch:s})=>{if(!e.select(g.store).__unstableIsEditorReady())return;if(be)return;const o=e.select(g.store).getCurrentPostType();window.postboxes.page!==o&&window.postboxes.add_postbox_toggles(o),be=!0,(0,Z.addAction)("editor.savePost","core/edit-post/save-metaboxes",(async(e,o)=>{!o.isAutosave&&t.hasMetaBoxes()&&await s.requestMetaBoxUpdates()})),s({type:"META_BOXES_INITIALIZED"})},Pe=()=>({registry:e})=>{c()("dispatch( 'core/edit-post' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(g.store).toggleDistractionFree()},Ee=()=>({registry:e})=>{const t=e.select(p.store).get("core/edit-post","fullscreenMode");e.dispatch(p.store).toggle("core/edit-post","fullscreenMode"),e.dispatch(P.store).createInfoNotice(t?(0,y.__)("Fullscreen mode deactivated."):(0,y.__)("Fullscreen mode activated."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,y.__)("Undo"),onClick:()=>{e.dispatch(p.store).toggle("core/edit-post","fullscreenMode")}}]})},{interfaceStore:Me}=L(g.privateApis),je=[],Te={},ke=(0,d.createRegistrySelector)((e=>()=>e(p.store).get("core","editorMode")??"visual")),Be=(0,d.createRegistrySelector)((e=>()=>{const t=e(Me).getActiveComplementaryArea("core");return["edit-post/document","edit-post/block"].includes(t)})),Ie=(0,d.createRegistrySelector)((e=>()=>{const t=e(Me).getActiveComplementaryArea("core");return!!t&&!["edit-post/document","edit-post/block"].includes(t)})),Ae=(0,d.createRegistrySelector)((e=>()=>e(Me).getActiveComplementaryArea("core")));const Re=(0,d.createRegistrySelector)((e=>()=>{c()("select( 'core/edit-post' ).getPreferences",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const t=["editorMode","hiddenBlockTypes"].reduce(((t,s)=>{const o=e(p.store).get("core",s);return{...t,[s]:o}}),{}),s=function(e,t){const s=e?.reduce(((e,t)=>({...e,[t]:{enabled:!1}})),{}),o=t?.reduce(((e,t)=>{const s=e?.[t];return{...e,[t]:{...s,opened:!0}}}),s??{});return o??s??Te}(e(p.store).get("core","inactivePanels"),e(p.store).get("core","openPanels"));return{...t,panels:s}}));function Ce(e,t,s){c()("select( 'core/edit-post' ).getPreference",{since:"6.0",alternative:"select( 'core/preferences' ).get"});const o=Re(e)[t];return void 0===o?s:o}const De=(0,d.createRegistrySelector)((e=>()=>e(p.store).get("core","hiddenBlockTypes")??je)),Oe=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isPublishSidebarOpened",{since:"6.6",alternative:"select( 'core/editor' ).isPublishSidebarOpened"}),e(g.store).isPublishSidebarOpened()))),Ne=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelRemoved",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelRemoved"}),e(g.store).isEditorPanelRemoved(s)))),Le=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelEnabled",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelEnabled"}),e(g.store).isEditorPanelEnabled(s)))),Fe=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isEditorPanelOpened",{since:"6.5",alternative:"select( 'core/editor' ).isEditorPanelOpened"}),e(g.store).isEditorPanelOpened(s)))),Ve=(0,d.createRegistrySelector)((e=>(t,s)=>(c()("select( 'core/edit-post' ).isModalActive",{since:"6.3",alternative:"select( 'core/interface' ).isModalActive"}),!!e(Me).isModalActive(s)))),ze=(0,d.createRegistrySelector)((e=>(t,s)=>!!e(p.store).get("core/edit-post",s))),Ge=(0,d.createRegistrySelector)((e=>(t,s)=>e(Me).isItemPinned("core",s))),He=(0,d.createSelector)((e=>Object.keys(e.metaBoxes.locations).filter((t=>qe(e,t)))),(e=>[e.metaBoxes.locations])),Ue=(0,d.createRegistrySelector)((e=>(t,s)=>qe(t,s)&&We(t,s)?.some((({id:t})=>e(g.store).isEditorPanelEnabled(`meta-box-${t}`)))));function qe(e,t){const s=We(e,t);return!!s&&0!==s.length}function We(e,t){return e.metaBoxes.locations[t]}const Qe=(0,d.createSelector)((e=>Object.values(e.metaBoxes.locations).flat()),(e=>[e.metaBoxes.locations]));function Xe(e){return He(e).length>0}function Ze(e){return e.metaBoxes.isSaving}const $e=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(g.store).getDeviceType()))),Ye=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(g.store).isInserterOpened()))),Ke=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),L(e(g.store)).getInserter()))),Je=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(g.store).isListViewOpened()))),et=(0,d.createRegistrySelector)((e=>()=>(c()("select( 'core/edit-post' ).isEditingTemplate",{since:"6.5",alternative:"select( 'core/editor' ).getRenderingMode"}),"wp_template"===e(g.store).getCurrentPostType())));function tt(e){return e.metaBoxes.initialized}const st=(0,d.createRegistrySelector)((e=>()=>{const{id:t,type:s}=e(g.store).getCurrentPost(),o=L(e(T.store)).getTemplateId(s,t);if(o)return e(T.store).getEditedEntityRecord("postType","wp_template",o)})),ot=(0,d.createReduxStore)("core/edit-post",{reducer:W,actions:s,selectors:o});(0,d.register)(ot);var it=function(){const{toggleFullscreenMode:e}=(0,d.useDispatch)(ot),{registerShortcut:t}=(0,d.useDispatch)(H.store);return(0,l.useEffect)((()=>{t({name:"core/edit-post/toggle-fullscreen",category:"global",description:(0,y.__)("Enable or disable fullscreen mode."),keyCombination:{modifier:"secondary",character:"f"}})}),[]),(0,H.useShortcut)("core/edit-post/toggle-fullscreen",(()=>{e()})),null};function rt(){const{editPost:e}=(0,d.useDispatch)(g.store),[t,s]=(0,l.useState)(void 0),[o,r]=(0,l.useState)(""),{postType:n,isNewPost:a}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isCleanNewPost:s}=e(g.store);return{postType:t("type"),isNewPost:s()}}),[]),[c,p]=(0,l.useState)((()=>a&&"wp_block"===n));return"wp_block"===n&&a?(0,i.jsx)(i.Fragment,{children:c&&(0,i.jsx)(k.Modal,{title:(0,y.__)("Create pattern"),onRequestClose:()=>{p(!1)},overlayClassName:"reusable-blocks-menu-items__convert-modal",children:(0,i.jsx)("form",{onSubmit:s=>{s.preventDefault(),p(!1),e({title:o,meta:{wp_pattern_sync_status:t}})},children:(0,i.jsxs)(k.__experimentalVStack,{spacing:"5",children:[(0,i.jsx)(k.TextControl,{label:(0,y.__)("Name"),value:o,onChange:r,placeholder:(0,y.__)("My pattern"),className:"patterns-create-modal__name-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,i.jsx)(k.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,y._x)("Synced","pattern (singular)"),help:(0,y.__)("Sync this pattern across multiple locations."),checked:!t,onChange:()=>{s(t?void 0:"unsynced")}}),(0,i.jsx)(k.__experimentalHStack,{justify:"right",children:(0,i.jsx)(k.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:!o,accessibleWhenDisabled:!0,children:(0,y.__)("Create")})})]})})})}):null}function nt(){const[e,t]=(0,l.useState)(null),{postId:s,postStatus:o}=(0,d.useSelect)((e=>{const{getCurrentPost:t}=e(g.store),s=t();let{id:o,status:i,type:r}=s;return["wp_template","wp_template_part"].includes(r)&&(o=s.wp_id),{postId:o,postStatus:i}}),[]);return(0,l.useEffect)((()=>{s&&s!==e&&"auto-draft"!==o&&(window.history.replaceState({id:s},"Post "+s,function(e){return(0,M.addQueryArgs)("post.php",{post:e,action:"edit"})}(s)),t(s))}),[s,o,e]),null}var at=function({location:e}){const t=(0,l.useRef)(null),s=(0,l.useRef)(null);(0,l.useEffect)((()=>(s.current=document.querySelector(".metabox-location-"+e),s.current&&t.current.appendChild(s.current),()=>{s.current&&document.querySelector("#metaboxes").appendChild(s.current)})),[e]);const o=(0,d.useSelect)((e=>e(ot).isSavingMetaBoxes()),[]),r=h("edit-post-meta-boxes-area",`is-${e}`,{"is-loading":o});return(0,i.jsxs)("div",{className:r,children:[o&&(0,i.jsx)(k.Spinner,{}),(0,i.jsx)("div",{className:"edit-post-meta-boxes-area__container",ref:t}),(0,i.jsx)("div",{className:"edit-post-meta-boxes-area__clear"})]})};function ct({id:e}){const t=(0,d.useSelect)((t=>t(g.store).isEditorPanelEnabled(`meta-box-${e}`)),[e]);return(0,l.useEffect)((()=>{const s=document.getElementById(e);s&&(t?s.classList.remove("is-hidden"):s.classList.add("is-hidden"))}),[e,t]),null}function lt({location:e}){const t=(0,d.useSelect)((t=>t(ot).getMetaBoxesPerLocation(e)),[e]);return(0,i.jsxs)(i.Fragment,{children:[(t??[]).map((({id:e})=>(0,i.jsx)(ct,{id:e},e))),(0,i.jsx)(at,{location:e})]})}const dt=window.wp.keycodes;var pt=function(){const e=(0,d.useSelect)((e=>{const{canUser:t}=e(T.store),s=(0,M.addQueryArgs)("edit.php",{post_type:"wp_block"}),o=(0,M.addQueryArgs)("site-editor.php",{p:"/pattern"});return t("create",{kind:"postType",name:"wp_template"})?o:s}),[]);return(0,i.jsx)(k.MenuItem,{role:"menuitem",href:e,children:(0,y.__)("Manage patterns")})};function ut(){const e=(0,d.useSelect)((e=>"wp_template"===e(g.store).getCurrentPostType()),[]);return(0,i.jsx)(p.PreferenceToggleMenuItem,{scope:"core/edit-post",name:e?"welcomeGuideTemplate":"welcomeGuide",label:(0,y.__)("Welcome Guide")})}const{PreferenceBaseOption:gt}=L(p.privateApis);function mt({willEnable:e}){const[t,s]=(0,l.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{className:"edit-post-preferences-modal__custom-fields-confirmation-message",children:(0,y.__)("A page reload is required for this change. Make sure your content is saved before reloading.")}),(0,i.jsx)(k.Button,{__next40pxDefaultSize:!0,variant:"secondary",isBusy:t,accessibleWhenDisabled:!0,disabled:t,onClick:()=>{s(!0),function(){const e=document.getElementById("toggle-custom-fields-form");e.querySelector('[name="_wp_http_referer"]').setAttribute("value",(0,M.getPathAndQueryString)(window.location.href)),e.submit()}()},children:e?(0,y.__)("Show & Reload Page"):(0,y.__)("Hide & Reload Page")})]})}function ht({label:e}){const t=(0,d.useSelect)((e=>!!e(g.store).getEditorSettings().enableCustomFields),[]),[s,o]=(0,l.useState)(t);return(0,i.jsx)(gt,{label:e,isChecked:s,onChange:o,children:s!==t&&(0,i.jsx)(mt,{willEnable:s})})}const{PreferenceBaseOption:wt}=L(p.privateApis);function _t(e){const{toggleEditorPanelEnabled:t}=(0,d.useDispatch)(g.store),{isChecked:s,isRemoved:o}=(0,d.useSelect)((t=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:o}=t(g.store);return{isChecked:s(e.panelName),isRemoved:o(e.panelName)}}),[e.panelName]);return o?null:(0,i.jsx)(wt,{isChecked:s,onChange:()=>t(e.panelName),...e})}const{PreferencesModalSection:ft}=L(p.privateApis);var xt=(0,d.withSelect)((e=>{const{getEditorSettings:t}=e(g.store),{getAllMetaBoxes:s}=e(ot);return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:s()}}))((function({areCustomFieldsRegistered:e,metaBoxes:t,...s}){const o=t.filter((({id:e})=>"postcustom"!==e));return e||0!==o.length?(0,i.jsxs)(ft,{...s,children:[e&&(0,i.jsx)(ht,{label:(0,y.__)("Custom fields")}),o.map((({id:e,title:t})=>(0,i.jsx)(_t,{label:t,panelName:`meta-box-${e}`},e)))]}):null}));const{PreferenceToggleControl:yt}=L(p.privateApis),{PreferencesModal:vt}=L(g.privateApis);function bt(){const e={general:(0,i.jsx)(xt,{title:(0,y.__)("Advanced")}),appearance:(0,i.jsx)(yt,{scope:"core/edit-post",featureName:"themeStyles",help:(0,y.__)("Make the editor look like your theme."),label:(0,y.__)("Use theme styles")})};return(0,i.jsx)(vt,{extraSections:e})}const{ToolsMoreMenuGroup:St,ViewMoreMenuGroup:Pt}=L(g.privateApis);var Et=()=>{const e=(0,B.useViewportMatch)("large");return(0,i.jsxs)(i.Fragment,{children:[e&&(0,i.jsx)(Pt,{children:(0,i.jsx)(p.PreferenceToggleMenuItem,{scope:"core/edit-post",name:"fullscreenMode",label:(0,y.__)("Fullscreen mode"),info:(0,y.__)("Show and hide the admin user interface"),messageActivated:(0,y.__)("Fullscreen mode activated."),messageDeactivated:(0,y.__)("Fullscreen mode deactivated."),shortcut:dt.displayShortcut.secondary("f")})}),(0,i.jsxs)(St,{children:[(0,i.jsx)(pt,{}),(0,i.jsx)(ut,{})]}),(0,i.jsx)(bt,{})]})};function Mt({nonAnimatedSrc:e,animatedSrc:t}){return(0,i.jsxs)("picture",{className:"edit-post-welcome-guide__image",children:[(0,i.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,i.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function jt(){const{toggleFeature:e}=(0,d.useDispatch)(ot);return(0,i.jsx)(k.Guide,{className:"edit-post-welcome-guide",contentLabel:(0,y.__)("Welcome to the editor"),finishButtonText:(0,y.__)("Get started"),onFinish:()=>e("welcomeGuide"),pages:[{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-canvas.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Welcome to the editor")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,y.__)("In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.")})]})},{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-editor.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Customize each block")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,y.__)("Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.")})]})},{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-library.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-library.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Explore all blocks")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,l.createInterpolateElement)((0,y.__)("All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon."),{InserterIconImage:(0,i.jsx)("img",{alt:(0,y.__)("inserter"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"})})})]})},{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Learn more")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,l.createInterpolateElement)((0,y.__)("New to the block editor? Want to learn more about using it? <a>Here's a detailed guide.</a>"),{a:(0,i.jsx)(k.ExternalLink,{href:(0,y.__)("https://wordpress.org/documentation/article/wordpress-block-editor/")})})})]})}]})}function Tt(){const{toggleFeature:e}=(0,d.useDispatch)(ot);return(0,i.jsx)(k.Guide,{className:"edit-template-welcome-guide",contentLabel:(0,y.__)("Welcome to the template editor"),finishButtonText:(0,y.__)("Get started"),onFinish:()=>e("welcomeGuideTemplate"),pages:[{image:(0,i.jsx)(Mt,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-template-editor.gif"}),content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("h1",{className:"edit-post-welcome-guide__heading",children:(0,y.__)("Welcome to the template editor")}),(0,i.jsx)("p",{className:"edit-post-welcome-guide__text",children:(0,y.__)("Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.")})]})}]})}function kt({postType:e}){const{isActive:t,isEditingTemplate:s}=(0,d.useSelect)((t=>{const{isFeatureActive:s}=t(ot),o="wp_template"===e;return{isActive:s(o?"welcomeGuideTemplate":"welcomeGuide"),isEditingTemplate:o}}),[e]);return t?s?(0,i.jsx)(Tt,{}):(0,i.jsx)(jt,{}):null}var Bt=(0,i.jsx)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,i.jsx)(v.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"})});const{getLayoutStyles:It}=L(f.privateApis),{useCommandContext:At}=L(E.privateApis),{Editor:Rt,FullscreenMode:Ct}=L(g.privateApis),{BlockKeyboardShortcuts:Dt}=L(n.privateApis),Ot=["wp_template","wp_template_part","wp_block","wp_navigation"];function Nt({isLegacy:e}){const[t,s,o]=(0,d.useSelect)((e=>{const{get:t}=e(p.store),{isMetaBoxLocationVisible:s}=e(ot);return[!!t("core/edit-post","metaBoxesMainIsOpen"),t("core/edit-post","metaBoxesMainOpenHeight"),s("normal")||s("advanced")||s("side")]}),[]),{set:r}=(0,d.useDispatch)(p.store),n=(0,l.useRef)(),a=(0,B.useMediaQuery)("(max-height: 549px)"),[{min:c,max:u},g]=(0,l.useState)((()=>({}))),m=(0,B.useRefEffect)((e=>{const t=e.closest(".interface-interface-skeleton__content");if(!t)return;const s=t.querySelectorAll(":scope > .components-notice-list"),o=t.querySelector(".edit-post-meta-boxes-main__presenter"),i=new window.ResizeObserver((()=>{let e=t.offsetHeight;for(const t of s)e-=t.offsetHeight;const i=o.offsetHeight;g({min:i,max:e})}));i.observe(t);for(const e of s)i.observe(e);return()=>i.disconnect()}),[]),h=(0,l.useRef)({}),w=(0,l.useRef)(),f=(0,l.useId)(),x=(e="auto",t,s)=>{"auto"===e?t=!1:e=Math.min(u,Math.max(c,e)),t?r("core/edit-post","metaBoxesMainOpenHeight",e):a||(w.current.ariaValueNow=M(e)),s&&n.current.updateSize({height:e,width:"auto"})},v=(0,B.useEvent)((()=>({isOpen:t,openHeight:s,min:c})));if((0,l.useEffect)((()=>{const e=v();if(void 0!==e.min&&n.current){const t=a?"auto":e.openHeight,s=e.isOpen?t:e.min;x(s,!1,!0)}}),[a]),!o)return;const P=(0,i.jsxs)("div",{className:"edit-post-layout__metaboxes edit-post-meta-boxes-main__liner",hidden:!e&&!t,children:[(0,i.jsx)(lt,{location:"normal"}),(0,i.jsx)(lt,{location:"advanced"})]});if(e)return P;const E=void 0===s,M=e=>Math.round((e-c)/(u-c)*100),j=void 0===u||E?50:M(s),T=(e=!t)=>r("core/edit-post","metaBoxesMainIsOpen",e),I=(0,y.__)("Meta Boxes"),A=(0,i.jsxs)("button",{"aria-expanded":t,onClick:({detail:e})=>{const{isToggleInferred:o}=h.current;if(a||!e||o){T();x(t?c:a?"auto":s,!1,!0)}},...a&&{onMouseDown:e=>e.stopPropagation(),onTouchStart:e=>e.stopPropagation()},children:[I,(0,i.jsx)(k.Icon,{icon:t?b:S})]}),R=!a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k.Tooltip,{text:(0,y.__)("Drag to resize"),children:(0,i.jsx)("button",{ref:w,role:"separator","aria-valuenow":j,"aria-label":(0,y.__)("Drag to resize"),"aria-describedby":f,onKeyDown:e=>{const t={ArrowUp:20,ArrowDown:-20}[e.key];if(t){const o=n.current.resizable,i=t+(E?o.offsetHeight:s);x(i,!0,!0),T(i>c),e.preventDefault()}}})}),(0,i.jsx)(k.VisuallyHidden,{id:f,children:(0,y.__)("Use up and down arrow keys to resize the meta box panel.")})]}),C={as:_,ref:n,className:"edit-post-meta-boxes-main",defaultSize:{height:t?s:0},minHeight:c,maxHeight:u,enable:{top:!0},handleClasses:{top:"edit-post-meta-boxes-main__presenter"},handleComponent:{top:(0,i.jsxs)(i.Fragment,{children:[A,R]})},onPointerDown:({pointerId:e,target:t})=>{w.current?.parentElement.contains(t)&&t.setPointerCapture(e)},onResizeStart:({timeStamp:e},t,s)=>{E&&x(s.offsetHeight,!1,!0),s.classList.add("is-resizing"),h.current={timeStamp:e,maxDelta:0}},onResize:(e,t,s,o)=>{const{maxDelta:i}=h.current,r=Math.abs(o.height);h.current.maxDelta=Math.max(i,r),x(n.current.state.height)},onResizeStop:(e,t,s)=>{s.classList.remove("is-resizing");const o=e.timeStamp-h.current.timeStamp,i=e.target===w.current,{maxDelta:r}=h.current;if(a||!i&&(r<1||o<144&&r<5))h.current.isToggleInferred=!0;else{const{height:e}=n.current.state,t=e>c;T(t),t&&x(e,!0)}}};return(0,i.jsxs)(k.ResizableBox,{"aria-label":I,...C,children:[(0,i.jsx)("meta",{ref:m}),P]})}var Lt=function({postId:e,postType:t,settings:s,initialEdits:o}){!function(){const{isFullscreen:e}=(0,d.useSelect)((e=>{const{get:t}=e(p.store);return{isFullscreen:t("core/edit-post","fullscreenMode")}}),[]),{toggle:t}=(0,d.useDispatch)(p.store),{createInfoNotice:s}=(0,d.useDispatch)(P.store);(0,E.useCommand)({name:"core/toggle-fullscreen-mode",label:e?(0,y.__)("Exit fullscreen"):(0,y.__)("Enter fullscreen"),icon:Bt,callback:({close:o})=>{t("core/edit-post","fullscreenMode"),o(),s(e?(0,y.__)("Fullscreen off."):(0,y.__)("Fullscreen on."),{id:"core/edit-post/toggle-fullscreen-mode/notice",type:"snackbar",actions:[{label:(0,y.__)("Undo"),onClick:()=>{t("core/edit-post","fullscreenMode")}}]})}})}();const n=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentPostType:s,getDeviceType:o}=e(g.store);return"Desktop"!==o()||["wp_template","wp_block"].includes(s())||L(e(f.store)).isZoomOut()||e(r.store).getBlockTypes().every((e=>e.apiVersion>=3))}),[]),{createErrorNotice:a}=(0,d.useDispatch)(P.store),{currentPost:{postId:c,postType:u},onNavigateToEntityRecord:m,onNavigateToPreviousEntityRecord:w}=function(e,t,s){const[o,i]=(0,l.useReducer)(((e,{type:t,post:s,previousRenderingMode:o})=>"push"===t?[...e,{post:s,previousRenderingMode:o}]:"pop"===t&&e.length>1?e.slice(0,-1):e),[{post:{postId:e,postType:t}}]),{post:r,previousRenderingMode:n}=o[o.length-1],{getRenderingMode:a}=(0,d.useSelect)(g.store),{setRenderingMode:c}=(0,d.useDispatch)(g.store),p=(0,l.useCallback)((e=>{i({type:"push",post:{postId:e.postId,postType:e.postType},previousRenderingMode:a()}),c(s)}),[a,c,s]),u=(0,l.useCallback)((()=>{i({type:"pop"}),n&&c(n)}),[c,n]);return{currentPost:r,onNavigateToEntityRecord:p,onNavigateToPreviousEntityRecord:o.length>1?u:void 0}}(e,t,"post-only"),_="wp_template"===u,{mode:v,isFullscreenActive:b,hasResolvedMode:S,hasActiveMetaboxes:I,hasBlockSelected:A,showIconLabels:R,isDistractionFree:C,showMetaBoxes:D,isWelcomeGuideVisible:O,templateId:N,enablePaddingAppender:F,isDevicePreview:V}=(0,d.useSelect)((e=>{const{get:t}=e(p.store),{isFeatureActive:o,hasMetaBoxes:i}=e(ot),{canUser:r,getPostType:n,getTemplateId:a}=L(e(T.store)),l=s.supportsTemplateMode,d=n(u)?.viewable??!1,m=r("read",{kind:"postType",name:"wp_template"}),{getBlockSelectionStart:h,isZoomOut:x}=L(e(f.store)),{getEditorMode:y,getRenderingMode:v,getDefaultRenderingMode:b,getDeviceType:S}=L(e(g.store)),P="post-only"===v(),E=!Ot.includes(u),M="wp_block"===u&&!w,j=a(u,c),k=b(u);return{mode:y(),isFullscreenActive:o("fullscreenMode"),hasActiveMetaboxes:i(),hasResolvedMode:"template-locked"===k?!!j:void 0!==k,hasBlockSelected:!!h(),showIconLabels:t("core","showIconLabels"),isDistractionFree:t("core","distractionFree"),showMetaBoxes:E&&!x()||M,isWelcomeGuideVisible:o("welcomeGuide"),templateId:l&&d&&m&&!_?j:null,enablePaddingAppender:!x()&&P&&E,isDevicePreview:"Desktop"!==S()}}),[u,c,_,s.supportsTemplateMode,w]);(e=>{const t=(0,d.useSelect)((t=>e&&t(g.store).__unstableIsEditorReady()),[e]),{initializeMetaBoxes:s}=(0,d.useDispatch)(ot);(0,l.useEffect)((()=>{t&&s()}),[t,s])})(I&&S);const[H,U]=function(e){const t=(0,d.useRegistry)(),s=(0,B.useRefEffect)((e=>{function s(s){if(s.target!==e&&s.target!==e.parentElement)return;const o=e.lastElementChild;if(!o)return;const i=o.getBoundingClientRect();if(s.clientY<i.bottom)return;s.preventDefault();const n=t.select(f.store).getBlockOrder(""),a=n[n.length-1],c=t.select(f.store).getBlock(a),{selectBlock:l,insertDefaultBlock:d}=t.dispatch(f.store);c&&(0,r.isUnmodifiedDefaultBlock)(c)?l(a):d()}const{ownerDocument:o}=e;return o.addEventListener("pointerdown",s),()=>{o.removeEventListener("pointerdown",s)}}),[t]);return e?[s,':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}']:[]}(F);At(A?"block-selection-edit":"entity-edit");const q=(0,l.useMemo)((()=>({...s,onNavigateToEntityRecord:m,onNavigateToPreviousEntityRecord:w,defaultRenderingMode:"post-only"})),[s,m,w]),W=function(...e){const{hasThemeStyleSupport:t,editorSettings:s}=(0,d.useSelect)((e=>({hasThemeStyleSupport:e(ot).isFeatureActive("themeStyles"),editorSettings:e(g.store).getEditorSettings()})),[]),o=e.join("\n");return(0,l.useMemo)((()=>{const e=s.styles?.filter((e=>e.__unstableType&&"theme"!==e.__unstableType))??[],i=[...s?.defaultEditorStyles??[],...e],r=t&&e.length!==(s.styles?.length??0);s.disableLayoutStyles||r||i.push({css:It({style:{},selector:"body",hasBlockGapSupport:!1,hasFallbackGapSupport:!0,fallbackGapValue:"0.5em"})});const n=r?s.styles??[]:i;return o?[...n,{css:o}]:n}),[s.defaultEditorStyles,s.disableLayoutStyles,s.styles,t,o])}(U);R?document.body.classList.add("show-icon-labels"):document.body.classList.remove("show-icon-labels");const Q=(0,k.__unstableUseNavigateRegions)(),X=h("edit-post-layout","is-mode-"+v,{"has-metaboxes":I}),{createSuccessNotice:Z}=(0,d.useDispatch)(P.store),$=(0,l.useCallback)(((e,t)=>{switch(e){case"move-to-trash":document.location.href=(0,M.addQueryArgs)("edit.php",{trashed:1,post_type:t[0].type,ids:t[0].id});break;case"duplicate-post":{const e=t[0],s="string"==typeof e.title?e.title:e.title?.rendered;Z((0,y.sprintf)((0,y.__)('"%s" successfully created.'),(0,j.decodeEntities)(s)||(0,y.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,y.__)("Edit"),onClick:()=>{const t=e.id;document.location.href=(0,M.addQueryArgs)("post.php",{post:t,action:"edit"})}}]})}}}),[Z]),Y=(0,l.useMemo)((()=>({type:t,id:e})),[t,e]),K=(0,B.useViewportMatch)("medium")&&b?(0,i.jsx)(z,{initialPost:Y}):null;return(0,i.jsx)(k.SlotFillProvider,{children:(0,i.jsxs)(g.ErrorBoundary,{canCopyContent:!0,children:[(0,i.jsx)(kt,{postType:u}),(0,i.jsx)("div",{className:Q.className,...Q,ref:Q.ref,children:(0,i.jsxs)(Rt,{settings:q,initialEdits:o,postType:u,postId:c,templateId:N,className:X,styles:W,forceIsDirty:I,contentRef:H,disableIframe:!n,autoFocus:!O,onActionPerformed:$,extraSidebarPanels:D&&(0,i.jsx)(lt,{location:"side"}),extraContent:!C&&D&&(0,i.jsx)(Nt,{isLegacy:!n||V}),children:[(0,i.jsx)(g.PostLockedModal,{}),(0,i.jsx)(G,{}),(0,i.jsx)(Ct,{isActive:b}),(0,i.jsx)(nt,{}),(0,i.jsx)(g.UnsavedChangesWarning,{}),(0,i.jsx)(g.AutosaveMonitor,{}),(0,i.jsx)(g.LocalAutosaveMonitor,{}),(0,i.jsx)(it,{}),(0,i.jsx)(g.EditorKeyboardShortcutsRegister,{}),(0,i.jsx)(Dt,{}),(0,i.jsx)(rt,{}),(0,i.jsx)(x.PluginArea,{onError:function(e){a((0,y.sprintf)((0,y.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,i.jsx)(Et,{}),K,(0,i.jsx)(g.EditorSnackbars,{})]})})]})})};const{PluginPostExcerpt:Ft}=L(g.privateApis),Vt=(0,M.getPath)(window.location.href)?.includes("site-editor.php"),zt=e=>{c()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function Gt(e){return Vt?null:(zt("PluginBlockSettingsMenuItem"),(0,i.jsx)(g.PluginBlockSettingsMenuItem,{...e}))}function Ht(e){return Vt?null:(zt("PluginDocumentSettingPanel"),(0,i.jsx)(g.PluginDocumentSettingPanel,{...e}))}function Ut(e){return Vt?null:(zt("PluginMoreMenuItem"),(0,i.jsx)(g.PluginMoreMenuItem,{...e}))}function qt(e){return Vt?null:(zt("PluginPrePublishPanel"),(0,i.jsx)(g.PluginPrePublishPanel,{...e}))}function Wt(e){return Vt?null:(zt("PluginPostPublishPanel"),(0,i.jsx)(g.PluginPostPublishPanel,{...e}))}function Qt(e){return Vt?null:(zt("PluginPostStatusInfo"),(0,i.jsx)(g.PluginPostStatusInfo,{...e}))}function Xt(e){return Vt?null:(zt("PluginSidebar"),(0,i.jsx)(g.PluginSidebar,{...e}))}function Zt(e){return Vt?null:(zt("PluginSidebarMoreMenuItem"),(0,i.jsx)(g.PluginSidebarMoreMenuItem,{...e}))}function $t(){return Vt?null:(c()("wp.editPost.__experimentalPluginPostExcerpt",{since:"6.6",hint:"Core and custom panels can be access programmatically using their panel name.",link:"https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically"}),Ft)}const{BackButton:Yt,registerCoreBlockBindingsSources:Kt}=L(g.privateApis);function Jt(e,t,s,o,a){const c=window.matchMedia("(min-width: 782px)").matches,m=document.getElementById(e),h=(0,l.createRoot)(m);(0,d.dispatch)(p.store).setDefaults("core/edit-post",{fullscreenMode:!0,themeStyles:!0,welcomeGuide:!0,welcomeGuideTemplate:!0}),(0,d.dispatch)(p.store).setDefaults("core",{allowRightClickOverrides:!0,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,hiddenBlockTypes:[],inactivePanels:[],openPanels:["post-status"],showBlockBreadcrumbs:!0,showIconLabels:!1,showListViewByDefault:!1,enableChoosePatternModal:!0,isPublishSidebarEnabled:!0}),window.__experimentalMediaProcessing&&(0,d.dispatch)(p.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,d.dispatch)(r.store).reapplyBlockTypeFilters(),c&&(0,d.select)(p.store).get("core","showListViewByDefault")&&!(0,d.select)(p.store).get("core","distractionFree")&&(0,d.dispatch)(g.store).setIsListViewOpened(!0),(0,n.registerCoreBlocks)(),Kt(),(0,u.registerLegacyWidgetBlock)({inserter:!1}),(0,u.registerWidgetGroupBlock)({inserter:!1});"Standards"!==("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.");return-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",(e=>{const t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))})),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),h.render((0,i.jsx)(l.StrictMode,{children:(0,i.jsx)(Lt,{settings:o,postId:s,postType:t,initialEdits:a})})),h}function es(){c()("wp.editPost.reinitializeEditor",{since:"6.2",version:"6.3"})}(window.wp=window.wp||{}).editPost=t})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/edit-site.js b/wp-includes/js/dist/edit-site.js
index b989849b9b..78e97a8095 100644
--- a/wp-includes/js/dist/edit-site.js
+++ b/wp-includes/js/dist/edit-site.js
@@ -32854,6 +32854,7 @@ function PrimaryActions({
+
function ActionWithModal({
action,
items,
@@ -32940,6 +32941,21 @@ function ActionTrigger({
items
}) {
const label = typeof action.label === "string" ? action.label : action.label(items);
+ const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium", "<");
+ if (isMobile) {
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.Button,
+ {
+ disabled: isBusy,
+ accessibleWhenDisabled: true,
+ label,
+ icon: action.icon,
+ size: "compact",
+ onClick,
+ isBusy
+ }
+ );
+ }
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.Button,
{
@@ -33077,6 +33093,7 @@ function FooterContent({
null
);
const footerContentRef = (0,external_wp_element_.useRef)(null);
+ const isMobile = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium", "<");
const bulkActions = (0,external_wp_element_.useMemo)(
() => actions.filter((action) => action.supportsBulk),
[actions]
@@ -33095,11 +33112,11 @@ function FooterContent({
}, [selection, data, getItemId, selectableItems]);
const actionsToShow = (0,external_wp_element_.useMemo)(
() => actions.filter((action) => {
- return action.supportsBulk && selectedItems.some(
+ return action.supportsBulk && (!isMobile || action.icon) && selectedItems.some(
(item) => !action.isEligible || action.isEligible(item)
);
}),
- [actions, selectedItems]
+ [actions, selectedItems, isMobile]
);
if (!actionInProgress) {
if (footerContentRef.current) {
@@ -34427,10 +34444,10 @@ function PrimaryActionGridCell({
{
disabled: !!primaryAction.disabled,
accessibleWhenDisabled: true,
+ text: label,
size: "small",
onClick: () => setIsModalOpen(true),
- variant: "link",
- children: label
+ variant: "link"
}
),
children: isModalOpen && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
@@ -43918,6 +43935,19 @@ const templatePartItemRoute = {
};
+;// ./node_modules/@wordpress/icons/build-module/library/published.js
+
+
+var published_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_primitives_namespaceObject.Path,
+ {
+ fillRule: "evenodd",
+ clipRule: "evenodd",
+ d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"
+ }
+) });
+
+
;// ./node_modules/@wordpress/edit-site/build-module/components/sidebar-navigation-screen-templates-browse/content.js
@@ -43969,7 +43999,7 @@ function DataviewsTemplatesSidebarContent() {
SidebarNavigationItem,
{
to: "/template",
- icon: layout_default,
+ icon: published_default,
"aria-current": activeView === "active",
children: (0,external_wp_i18n_namespaceObject.__)("Active templates")
}
@@ -43978,7 +44008,7 @@ function DataviewsTemplatesSidebarContent() {
SidebarNavigationItem,
{
to: (0,external_wp_url_namespaceObject.addQueryArgs)("/template", { activeView: "user" }),
- icon: layout_default,
+ icon: comment_author_avatar_default,
"aria-current": activeView === "user",
// Let's avoid calling them "custom templates" to avoid
// confusion. "Created" is closest to meaning database
@@ -45970,10 +46000,10 @@ const activeField = {
type: "boolean",
getValue: ({ item }) => item._isActive,
render: function Render({ item }) {
- const activeLabel = item._isCustom ? (0,external_wp_i18n_namespaceObject.__)("Active when used") : (0,external_wp_i18n_namespaceObject.__)("Active");
+ const activeLabel = item._isCustom ? (0,external_wp_i18n_namespaceObject._x)("Active when used", "template") : (0,external_wp_i18n_namespaceObject._x)("Active", "template");
const activeIntent = item._isCustom ? "info" : "success";
const isActive = item._isActive;
- return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(fields_Badge, { intent: isActive ? activeIntent : "default", children: isActive ? activeLabel : (0,external_wp_i18n_namespaceObject.__)("Inactive") });
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(fields_Badge, { intent: isActive ? activeIntent : "default", children: isActive ? activeLabel : (0,external_wp_i18n_namespaceObject._x)("Inactive", "template") });
}
};
const useThemeField = () => {
@@ -46038,6 +46068,10 @@ const view_utils_DEFAULT_VIEW = {
function getDefaultView(activeView) {
return {
...view_utils_DEFAULT_VIEW,
+ sort: activeView === "user" ? {
+ field: "date",
+ direction: "desc"
+ } : view_utils_DEFAULT_VIEW.sort,
filters: !["active", "user"].includes(activeView) ? [
{
field: "author",
@@ -46071,7 +46105,7 @@ function getDefaultView(activeView) {
-const { usePostActions: page_templates_usePostActions, templateTitleField } = unlock(external_wp_editor_namespaceObject.privateApis);
+const { usePostActions: page_templates_usePostActions, usePostFields, templateTitleField } = unlock(external_wp_editor_namespaceObject.privateApis);
const { useHistory: page_templates_useHistory, useLocation: page_templates_useLocation } = unlock(external_wp_router_namespaceObject.privateApis);
const { useEntityRecordsWithPermissions: page_templates_useEntityRecordsWithPermissions } = unlock(external_wp_coreData_namespaceObject.privateApis);
function PageTemplates() {
@@ -46214,6 +46248,10 @@ function PageTemplates() {
},
[history, path, view?.type]
);
+ const postTypeFields = usePostFields({
+ postType: TEMPLATE_POST_TYPE
+ });
+ const dateField = postTypeFields.find((field) => field.id === "date");
const themeField = useThemeField();
const fields = (0,external_wp_element_.useMemo)(() => {
const _fields = [
@@ -46225,6 +46263,9 @@ function PageTemplates() {
];
if (activeView === "user") {
_fields.push(themeField);
+ if (dateField) {
+ _fields.push(dateField);
+ }
}
const elements = [];
for (const author in users) {
@@ -46238,7 +46279,7 @@ function PageTemplates() {
elements
});
return _fields;
- }, [users, activeView, themeField]);
+ }, [users, activeView, themeField, dateField]);
const { data, paginationInfo } = (0,external_wp_element_.useMemo)(() => {
return filterSortAndPaginate(records, view, fields);
}, [records, view, fields]);
@@ -46250,6 +46291,7 @@ function PageTemplates() {
{
const newItem = items[0];
const _title = typeof newItem.title === "string" ? newItem.title : newItem.title?.rendered;
+ history.navigate(`/template?activeView=user`);
createSuccessNotice(
(0,external_wp_i18n_namespaceObject.sprintf)(
// translators: %s: Title of the created post or template, e.g: "Hello world".
@@ -46353,12 +46395,7 @@ function PageTemplates() {
duplicateAction.RenderModal,
{
items: [selectedRegisteredTemplate],
- closeModal: () => setSelectedRegisteredTemplate(),
- onActionPerformed: ([item]) => {
- history.navigate(
- `/${item.type}/${item.id}?canvas=edit`
- );
- }
+ closeModal: () => setSelectedRegisteredTemplate()
}
)
}
@@ -46506,19 +46543,6 @@ var pages_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.
] });
-;// ./node_modules/@wordpress/icons/build-module/library/published.js
-
-
-var published_default = /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_primitives_namespaceObject.Path,
- {
- fillRule: "evenodd",
- clipRule: "evenodd",
- d: "M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"
- }
-) });
-
-
;// ./node_modules/@wordpress/icons/build-module/library/scheduled.js
@@ -46912,7 +46936,7 @@ function AddNewPostModal({ postType, onSave, onClose }) {
-const { usePostActions: post_list_usePostActions, usePostFields } = unlock(external_wp_editor_namespaceObject.privateApis);
+const { usePostActions: post_list_usePostActions, usePostFields: post_list_usePostFields } = unlock(external_wp_editor_namespaceObject.privateApis);
const { useLocation: post_list_useLocation, useHistory: post_list_useHistory } = unlock(external_wp_router_namespaceObject.privateApis);
const { useEntityRecordsWithPermissions: post_list_useEntityRecordsWithPermissions } = unlock(external_wp_coreData_namespaceObject.privateApis);
const post_list_EMPTY_ARRAY = [];
@@ -46971,7 +46995,7 @@ function PostList({ postType }) {
},
[path, history]
);
- const fields = usePostFields({
+ const fields = post_list_usePostFields({
postType
});
const queryArgs = (0,external_wp_element_.useMemo)(() => {
diff --git a/wp-includes/js/dist/edit-site.min.js b/wp-includes/js/dist/edit-site.min.js
index 8c519c1a18..325f330212 100644
--- a/wp-includes/js/dist/edit-site.min.js
+++ b/wp-includes/js/dist/edit-site.min.js
@@ -8,4 +8,4 @@
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
- */var s=n(1609);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=s.useState,a=s.useEffect,o=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=r({inst:{value:n,getSnapshot:t}}),i=s[0].inst,u=s[1];return o((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),a((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(83)},1233:e=>{"use strict";e.exports=window.wp.preferences},1609:e=>{"use strict";e.exports=window.React},4660:e=>{e.exports=function(){function e(t,n,s){function i(a,o){if(!n[a]){if(!t[a]){if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,s)}return n[a].exports}for(var r=void 0,a=0;a<s.length;a++)i(s[a]);return i}return e}()({1:[function(e,t,n){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var s in n)i(n,s)&&(e[s]=n[s])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,s,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+s),i);else for(var r=0;r<s;r++)e[i+r]=t[n+r]},flattenChunks:function(e){var t,n,s,i,r,a;for(s=0,t=0,n=e.length;t<n;t++)s+=e[t].length;for(a=new Uint8Array(s),i=0,t=0,n=e.length;t<n;t++)r=e[t],a.set(r,i),i+=r.length;return a}},a={arraySet:function(e,t,n,s,i){for(var r=0;r<s;r++)e[i+r]=t[n+r]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,r)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(s)},{}],2:[function(e,t,n){"use strict";var s=e("./common"),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var a=new s.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,i,r,a,o=e.length,l=0;for(r=0;r<o;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new s.Buf8(l),a=0,r=0;a<l;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,s,i,r,o=t||e.length,c=new Array(2*o);for(s=0,n=0;n<o;)if((i=e[n++])<128)c[s++]=i;else if((r=a[i])>4)c[s++]=65533,n+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&n<o;)i=i<<6|63&e[n++],r--;r>1?c[s++]=65533:i<65536?c[s++]=i:(i-=65536,c[s++]=55296|i>>10&1023,c[s++]=56320|1023&i)}return l(c,s)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function s(e,t,n,s){for(var i=65535&e,r=e>>>16&65535,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{r=r+(i=i+t[s++]|0)|0}while(--a);i%=65521,r%=65521}return i|r<<16}t.exports=s},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";function s(){for(var e,t=[],n=0;n<256;n++){e=n;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var i=s();function r(e,t,n,s){var r=i,a=s+n;e^=-1;for(var o=s;o<a;o++)e=e>>>8^r[255&(e^t[o])];return~e}t.exports=r},{}],6:[function(e,t,n){"use strict";function s(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=s},{}],7:[function(e,t,n){"use strict";var s=30,i=12;t.exports=function(e,t){var n,r,a,o,l,c,u,d,h,p,f,m,g,v,y,x,b,w,_,j,S,C,k,E,P;n=e.state,r=e.next_in,E=e.input,a=r+(e.avail_in-5),o=e.next_out,P=e.output,l=o-(t-e.avail_out),c=o+(e.avail_out-257),u=n.dmax,d=n.wsize,h=n.whave,p=n.wnext,f=n.window,m=n.hold,g=n.bits,v=n.lencode,y=n.distcode,x=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=v[m&x];t:for(;;){if(m>>>=_=w>>>24,g-=_,0==(_=w>>>16&255))P[o++]=65535&w;else{if(!(16&_)){if(64&_){if(32&_){n.mode=i;break e}e.msg="invalid literal/length code",n.mode=s;break e}w=v[(65535&w)+(m&(1<<_)-1)];continue t}for(j=65535&w,(_&=15)&&(g<_&&(m+=E[r++]<<g,g+=8),j+=m&(1<<_)-1,m>>>=_,g-=_),g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=y[m&b];;){if(m>>>=_=w>>>24,g-=_,16&(_=w>>>16&255)){if(S=65535&w,g<(_&=15)&&(m+=E[r++]<<g,(g+=8)<_&&(m+=E[r++]<<g,g+=8)),(S+=m&(1<<_)-1)>u){e.msg="invalid distance too far back",n.mode=s;break e}if(m>>>=_,g-=_,S>(_=o-l)){if((_=S-_)>h&&n.sane){e.msg="invalid distance too far back",n.mode=s;break e}if(C=0,k=f,0===p){if(C+=d-_,_<j){j-=_;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}}else if(p<_){if(C+=d+p-_,(_-=p)<j){j-=_;do{P[o++]=f[C++]}while(--_);if(C=0,p<j){j-=_=p;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}}}else if(C+=p-_,_<j){j-=_;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}for(;j>2;)P[o++]=k[C++],P[o++]=k[C++],P[o++]=k[C++],j-=3;j&&(P[o++]=k[C++],j>1&&(P[o++]=k[C++]))}else{C=o-S;do{P[o++]=P[C++],P[o++]=P[C++],P[o++]=P[C++],j-=3}while(j>2);j&&(P[o++]=P[C++],j>1&&(P[o++]=P[C++]))}break}if(64&_){e.msg="invalid distance code",n.mode=s;break e}w=y[(65535&w)+(m&(1<<_)-1)]}}break}}while(r<a&&o<c);r-=j=g>>3,m&=(1<<(g-=j<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<a?a-r+5:5-(r-a),e.avail_out=o<c?c-o+257:257-(o-c),n.hold=m,n.bits=g}},{}],8:[function(e,t,n){"use strict";var s=e("../utils/common"),i=e("./adler32"),r=e("./crc32"),a=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,h=5,p=6,f=0,m=1,g=2,v=-2,y=-3,x=-4,b=-5,w=8,_=1,j=2,S=3,C=4,k=5,E=6,P=7,I=8,V=9,T=10,O=11,A=12,N=13,F=14,M=15,B=16,D=17,R=18,L=19,z=20,H=21,G=22,W=23,U=24,q=25,Z=26,Y=27,K=28,X=29,Q=30,J=31,$=852,ee=592,te=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function se(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ie(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new s.Buf32($),t.distcode=t.distdyn=new s.Buf32(ee),t.sane=1,t.back=-1,f):v}function re(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ie(e)):v}function ae(e,t){var n,s;return e&&e.state?(s=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=n,s.wbits=t,re(e))):v}function oe(e,t){var n,s;return e?(s=new se,e.state=s,s.window=null,(n=ae(e,t))!==f&&(e.state=null),n):v}function le(e){return oe(e,te)}var ce,ue,de=!0;function he(e){if(de){var t;for(ce=new s.Buf32(512),ue=new s.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(u,e.lens,0,32,ue,0,e.work,{bits:5}),de=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function pe(e,t,n,i){var r,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new s.Buf8(a.wsize)),i>=a.wsize?(s.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((r=a.wsize-a.wnext)>i&&(r=i),s.arraySet(a.window,t,n-i,r,a.wnext),(i-=r)?(s.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}function fe(e,t){var n,$,ee,te,se,ie,re,ae,oe,le,ce,ue,de,fe,me,ge,ve,ye,xe,be,we,_e,je,Se,Ce=0,ke=new s.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===A&&(n.mode=N),se=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,ae=n.hold,oe=n.bits,le=ie,ce=re,_e=f;e:for(;;)switch(n.mode){case _:if(0===n.wrap){n.mode=N;break}for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ae){n.check=0,ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0),ae=0,oe=0,n.mode=j;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",n.mode=Q;break}if((15&ae)!==w){e.msg="unknown compression method",n.mode=Q;break}if(oe-=4,we=8+(15&(ae>>>=4)),0===n.wbits)n.wbits=we;else if(we>n.wbits){e.msg="invalid window size",n.mode=Q;break}n.dmax=1<<we,e.adler=n.check=1,n.mode=512&ae?T:A,ae=0,oe=0;break;case j:for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(n.flags=ae,(255&n.flags)!==w){e.msg="unknown compression method",n.mode=Q;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Q;break}n.head&&(n.head.text=ae>>8&1),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0,n.mode=S;case S:for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,ke[2]=ae>>>16&255,ke[3]=ae>>>24&255,n.check=r(n.check,ke,4,0)),ae=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ae,n.head.os=ae>>8),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.length=ae,n.head&&(n.head.extra_len=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0}else n.head&&(n.head.extra=null);n.mode=E;case E:if(1024&n.flags&&((ue=n.length)>ie&&(ue=ie),ue&&(n.head&&(we=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),s.arraySet(n.head.extra,$,te,ue,we)),512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=P;case P:if(2048&n.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],n.head&&we&&n.length<65536&&(n.head.name+=String.fromCharCode(we))}while(we&&ue<ie);if(512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I;case I:if(4096&n.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],n.head&&we&&n.length<65536&&(n.head.comment+=String.fromCharCode(we))}while(we&&ue<ie);if(512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else n.head&&(n.head.comment=null);n.mode=V;case V:if(512&n.flags){for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Q;break}ae=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=A;break;case T:for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ae),ae=0,oe=0,n.mode=O;case O:if(0===n.havedict)return e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,g;e.adler=n.check=1,n.mode=A;case A:if(t===h||t===p)break e;case N:if(n.last){ae>>>=7&oe,oe-=7&oe,n.mode=Y;break}for(;oe<3;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}switch(n.last=1&ae,oe-=1,3&(ae>>>=1)){case 0:n.mode=F;break;case 1:if(he(n),n.mode=z,t===p){ae>>>=2,oe-=2;break e}break;case 2:n.mode=D;break;case 3:e.msg="invalid block type",n.mode=Q}ae>>>=2,oe-=2;break;case F:for(ae>>>=7&oe,oe-=7&oe;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Q;break}if(n.length=65535&ae,ae=0,oe=0,n.mode=M,t===p)break e;case M:n.mode=B;case B:if(ue=n.length){if(ue>ie&&(ue=ie),ue>re&&(ue=re),0===ue)break e;s.arraySet(ee,$,te,ue,se),ie-=ue,te+=ue,re-=ue,se+=ue,n.length-=ue;break}n.mode=A;break;case D:for(;oe<14;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ae),ae>>>=5,oe-=5,n.ndist=1+(31&ae),ae>>>=5,oe-=5,n.ncode=4+(15&ae),ae>>>=4,oe-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Q;break}n.have=0,n.mode=R;case R:for(;n.have<n.ncode;){for(;oe<3;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.lens[Ee[n.have++]]=7&ae,ae>>>=3,oe-=3}for(;n.have<19;)n.lens[Ee[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,je={bits:n.lenbits},_e=o(l,n.lens,0,19,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid code lengths set",n.mode=Q;break}n.have=0,n.mode=L;case L:for(;n.have<n.nlen+n.ndist;){for(;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ve<16)ae>>>=me,oe-=me,n.lens[n.have++]=ve;else{if(16===ve){for(Se=me+2;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae>>>=me,oe-=me,0===n.have){e.msg="invalid bit length repeat",n.mode=Q;break}we=n.lens[n.have-1],ue=3+(3&ae),ae>>>=2,oe-=2}else if(17===ve){for(Se=me+3;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}oe-=me,we=0,ue=3+(7&(ae>>>=me)),ae>>>=3,oe-=3}else{for(Se=me+7;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}oe-=me,we=0,ue=11+(127&(ae>>>=me)),ae>>>=7,oe-=7}if(n.have+ue>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Q;break}for(;ue--;)n.lens[n.have++]=we}}if(n.mode===Q)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Q;break}if(n.lenbits=9,je={bits:n.lenbits},_e=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid literal/lengths set",n.mode=Q;break}if(n.distbits=6,n.distcode=n.distdyn,je={bits:n.distbits},_e=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,je),n.distbits=je.bits,_e){e.msg="invalid distances set",n.mode=Q;break}if(n.mode=z,t===p)break e;case z:n.mode=H;case H:if(ie>=6&&re>=258){e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,a(e,ce),se=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,ae=n.hold,oe=n.bits,n.mode===A&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ge&&!(240&ge)){for(ye=me,xe=ge,be=ve;ge=(Ce=n.lencode[be+((ae&(1<<ye+xe)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=me,oe-=me,n.back+=me,n.length=ve,0===ge){n.mode=Z;break}if(32&ge){n.back=-1,n.mode=A;break}if(64&ge){e.msg="invalid literal/length code",n.mode=Q;break}n.extra=15&ge,n.mode=G;case G:if(n.extra){for(Se=n.extra;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.length+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;ge=(Ce=n.distcode[ae&(1<<n.distbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(!(240&ge)){for(ye=me,xe=ge,be=ve;ge=(Ce=n.distcode[be+((ae&(1<<ye+xe)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=me,oe-=me,n.back+=me,64&ge){e.msg="invalid distance code",n.mode=Q;break}n.offset=ve,n.extra=15&ge,n.mode=U;case U:if(n.extra){for(Se=n.extra;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.offset+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Q;break}n.mode=q;case q:if(0===re)break e;if(ue=ce-re,n.offset>ue){if((ue=n.offset-ue)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Q;break}ue>n.wnext?(ue-=n.wnext,de=n.wsize-ue):de=n.wnext-ue,ue>n.length&&(ue=n.length),fe=n.window}else fe=ee,de=se-n.offset,ue=n.length;ue>re&&(ue=re),re-=ue,n.length-=ue;do{ee[se++]=fe[de++]}while(--ue);0===n.length&&(n.mode=H);break;case Z:if(0===re)break e;ee[se++]=n.length,re--,n.mode=H;break;case Y:if(n.wrap){for(;oe<32;){if(0===ie)break e;ie--,ae|=$[te++]<<oe,oe+=8}if(ce-=re,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?r(n.check,ee,ce,se-ce):i(n.check,ee,ce,se-ce)),ce=re,(n.flags?ae:ne(ae))!==n.check){e.msg="incorrect data check",n.mode=Q;break}ae=0,oe=0}n.mode=K;case K:if(n.wrap&&n.flags){for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Q;break}ae=0,oe=0}n.mode=X;case X:_e=m;break e;case Q:_e=y;break e;case J:return x;default:return v}return e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<Q&&(n.mode<Y||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=J,x):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?r(n.check,ee,ce,e.next_out-ce):i(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===A?128:0)+(n.mode===z||n.mode===M?256:0),(0===le&&0===ce||t===d)&&_e===f&&(_e=b),_e)}function me(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,f}function ge(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?(n.head=t,t.done=!1,f):v}function ve(e,t){var n,s=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==O?v:n.mode===O&&i(1,t,s,0)!==n.check?y:pe(e,t,s,s)?(n.mode=J,x):(n.havedict=1,f):v}n.inflateReset=re,n.inflateReset2=ae,n.inflateResetKeep=ie,n.inflateInit=le,n.inflateInit2=oe,n.inflate=fe,n.inflateEnd=me,n.inflateGetHeader=ge,n.inflateSetDictionary=ve,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var s=e("../utils/common"),i=15,r=852,a=592,o=0,l=1,c=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,f,m,g,v,y){var x,b,w,_,j,S,C,k,E,P=y.bits,I=0,V=0,T=0,O=0,A=0,N=0,F=0,M=0,B=0,D=0,R=null,L=0,z=new s.Buf16(i+1),H=new s.Buf16(i+1),G=null,W=0;for(I=0;I<=i;I++)z[I]=0;for(V=0;V<f;V++)z[t[n+V]]++;for(A=P,O=i;O>=1&&0===z[O];O--);if(A>O&&(A=O),0===O)return m[g++]=20971520,m[g++]=20971520,y.bits=1,0;for(T=1;T<O&&0===z[T];T++);for(A<T&&(A=T),M=1,I=1;I<=i;I++)if(M<<=1,(M-=z[I])<0)return-1;if(M>0&&(e===o||1!==O))return-1;for(H[1]=0,I=1;I<i;I++)H[I+1]=H[I]+z[I];for(V=0;V<f;V++)0!==t[n+V]&&(v[H[t[n+V]]++]=V);if(e===o?(R=G=v,S=19):e===l?(R=u,L-=257,G=d,W-=257,S=256):(R=h,G=p,S=-1),D=0,V=0,I=T,j=g,N=A,F=0,w=-1,_=(B=1<<A)-1,e===l&&B>r||e===c&&B>a)return 1;for(;;){C=I-F,v[V]<S?(k=0,E=v[V]):v[V]>S?(k=G[W+v[V]],E=R[L+v[V]]):(k=96,E=0),x=1<<I-F,T=b=1<<N;do{m[j+(D>>F)+(b-=x)]=C<<24|k<<16|E}while(0!==b);for(x=1<<I-1;D&x;)x>>=1;if(0!==x?(D&=x-1,D+=x):D=0,V++,0==--z[I]){if(I===O)break;I=t[n+v[V]]}if(I>A&&(D&_)!==w){for(0===F&&(F=A),j+=T,M=1<<(N=I-F);N+F<O&&!((M-=z[N+F])<=0);)N++,M<<=1;if(B+=1<<N,e===l&&B>r||e===c&&B>a)return 1;m[w=D&_]=A<<24|N<<16|j-g}}return 0!==D&&(m[j+D]=I-F<<24|64<<16),y.bits=A,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=s},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var s=e("./zlib/inflate"),i=e("./utils/common"),r=e("./utils/strings"),a=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=s.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(o[n]);if(this.header=new c,s.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=s.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(o[n])}function h(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}function p(e,t){return(t=t||{}).raw=!0,h(e,t)}d.prototype.push=function(e,t){var n,o,l,c,d,h=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?h.input=r.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(n=s.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&f&&(n=s.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==a.Z_STREAM_END&&(0!==h.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(h.output,h.next_out),c=h.next_out-l,d=r.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(n=s.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=h,n.inflateRaw=p,n.ungzip=h},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},6087:e=>{"use strict";e.exports=window.wp.element},7143:e=>{"use strict";e.exports=window.wp.data},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,i,r;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(i=s;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((s=t.length)!=n.length)return!1;for(i=s;0!=i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,r[i]))return!1;for(i=s;0!=i--;){var a=r[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},7951:(e,t,n)=>{"use strict";n.d(t,{loadView:()=>d,useView:()=>u});var s=Object.prototype.hasOwnProperty;function i(e,t,n){for(n of e.keys())if(r(n,t))return n}function r(e,t){var n,a,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((a=e.length)===t.length)for(;a--&&r(e[a],t[a]););return-1===a}if(n===Set){if(e.size!==t.size)return!1;for(a of e){if((o=a)&&"object"==typeof o&&!(o=i(t,o)))return!1;if(!t.has(o))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(a of e){if((o=a[0])&&"object"==typeof o&&!(o=i(t,o)))return!1;if(!r(a[1],t.get(o)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((a=e.byteLength)===t.byteLength)for(;a--&&e.getInt8(a)===t.getInt8(a););return-1===a}if(ArrayBuffer.isView(e)){if((a=e.byteLength)===t.byteLength)for(;a--&&e[a]===t[a];);return-1===a}if(!n||"object"==typeof e){for(n in a=0,e){if(s.call(e,n)&&++a&&!s.call(t,n))return!1;if(!(n in t)||!r(e[n],t[n]))return!1}return Object.keys(t).length===a}}return e!=e&&t!=t}function a(e,t,n){return`dataviews-${e}-${t}-${n}`}var o=n(6087),l=n(7143),c=n(1233);function u(e){const{kind:t,name:n,slug:s,defaultView:i,queryParams:u,onChangeQueryParams:d}=e,h=a(t,n,s),p=(0,l.useSelect)((e=>e(c.store).get("core/views",h)),[h]),{set:f}=(0,l.useDispatch)(c.store),m=p??i,g=u?.page??m.page??1,v=u?.search??m.search??"";return{view:(0,o.useMemo)((()=>({...m,page:g,search:v})),[m,g,v]),isModified:!!p,updateView:(0,o.useCallback)((e=>{const t={page:e?.page,search:e?.search},n=function(e,t){const n={...e};for(const e of t)delete n[e];return n}(e,["page","search"]);d&&!r(t,{page:g,search:v})&&d(t),r(m,n)||(r(n,i)?f("core/views",h,void 0):f("core/views",h,n))}),[d,g,v,m,i,f,h]),resetToDefault:(0,o.useCallback)((()=>{f("core/views",h,void 0)}),[h,f])}}async function d(e){const{kind:t,name:n,slug:s,defaultView:i,queryParams:r}=e,o=a(t,n,s);return{...(0,l.select)(c.store).get("core/views",o)??i,page:r?.page??1,search:r?.search??""}}},8572:e=>{e.exports=function(){function e(t,n,s){function i(a,o){if(!n[a]){if(!t[a]){if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,s)}return n[a].exports}for(var r=void 0,a=0;a<s.length;a++)i(s[a]);return i}return e}()({1:[function(e,t,n){var s=4096,i=2*s+32,r=2*s-1,a=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function o(e){this.buf_=new Uint8Array(i),this.input_=e,this.reset()}o.READ_SIZE=s,o.IBUF_MASK=r,o.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,s);if(t<0)throw new Error("Unexpected end of input");if(t<s){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[(s<<1)+n]=this.buf_[n];this.buf_ptr_=s}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},o.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&r]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&a[e];return this.bit_pos_+=e,t},t.exports=o},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var s=e("./streams").BrotliInput,i=e("./streams").BrotliOutput,r=e("./bit_reader"),a=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),h=8,p=16,f=256,m=704,g=26,v=6,y=2,x=8,b=255,w=1080,_=18,j=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),S=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),E=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function P(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function I(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function V(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function T(e){var t,n,s,i=new V;if(i.input_end=e.readBits(1),i.input_end&&e.readBits(1))return i;if(7===(t=e.readBits(2)+4)){if(i.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return i;for(s=0;s<n;s++){var r=e.readBits(8);if(s+1===n&&n>1&&0===r)throw new Error("Invalid size byte");i.meta_block_length|=r<<8*s}}else for(s=0;s<t;++s){var a=e.readBits(4);if(s+1===t&&t>4&&0===a)throw new Error("Invalid size nibble");i.meta_block_length|=a<<4*s}return++i.meta_block_length,i.input_end||i.is_metadata||(i.is_uncompressed=e.readBits(1)),i}function O(e,t,n){var s;return n.fillBitWindow(),(s=e[t+=n.val_>>>n.bit_pos_&b].bits-x)>0&&(n.bit_pos_+=x,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<s)-1),n.bit_pos_+=e[t].bits,e[t].value}function A(e,t,n,s){for(var i=0,r=h,a=0,c=0,u=32768,d=[],f=0;f<32;f++)d.push(new o(0,0));for(l(d,0,5,e,_);i<t&&u>0;){var m,g=0;if(s.readMoreInput(),s.fillBitWindow(),g+=s.val_>>>s.bit_pos_&31,s.bit_pos_+=d[g].bits,(m=255&d[g].value)<p)a=0,n[i++]=m,0!==m&&(r=m,u-=32768>>m);else{var v,y,x=m-14,b=0;if(m===p&&(b=r),c!==b&&(a=0,c=b),v=a,a>0&&(a-=2,a<<=x),i+(y=(a+=s.readBits(x)+3)-v)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var w=0;w<y;w++)n[i+w]=c;i+=y,0!==c&&(u-=y<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;i<t;i++)n[i]=0}function N(e,t,n,s){var i,r=0,a=new Uint8Array(e);if(s.readMoreInput(),1===(i=s.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),h=s.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<h;++p)d[p]=s.readBits(u)%e,a[d[p]]=2;switch(a[d[0]]=1,h){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");a[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");s.readBits(1)?(a[d[2]]=3,a[d[3]]=3):a[d[0]]=2}}else{var p,f=new Uint8Array(_),m=32,g=0,v=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(p=i;p<_&&m>0;++p){var y,b=j[p],w=0;s.fillBitWindow(),w+=s.val_>>>s.bit_pos_&15,s.bit_pos_+=v[w].bits,y=v[w].value,f[b]=y,0!==y&&(m-=32>>y,++g)}if(1!==g&&0!==m)throw new Error("[ReadHuffmanCode] invalid num_codes or space");A(f,e,a,s)}if(0===(r=l(t,n,x,a,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return r}function F(e,t,n){var s,i;return s=O(e,t,n),i=u.kBlockLengthPrefixCode[s].nbits,u.kBlockLengthPrefixCode[s].offset+n.readBits(i)}function M(e,t,n){var s;return e<S?(n+=C[e],s=t[n&=3]+k[e]):s=e-S+1,s}function B(e,t){for(var n=e[t],s=t;s;--s)e[s]=e[s-1];e[0]=n}function D(e,t){var n,s=new Uint8Array(256);for(n=0;n<256;++n)s[n]=n;for(n=0;n<t;++n){var i=e[n];e[n]=s[i],i&&B(s,i)}}function R(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*E[e+31>>>5]),this.htrees=new Uint32Array(t)}function L(e,t){var n,s,i={num_htrees:null,context_map:null},r=0;t.readMoreInput();var a=i.num_htrees=I(t)+1,l=i.context_map=new Uint8Array(e);if(a<=1)return i;for(t.readBits(1)&&(r=t.readBits(4)+1),n=[],s=0;s<w;s++)n[s]=new o(0,0);for(N(a+r,n,0,t),s=0;s<e;){var c;if(t.readMoreInput(),0===(c=O(n,0,t)))l[s]=0,++s;else if(c<=r)for(var u=1+(1<<c)+t.readBits(c);--u;){if(s>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[s]=0,++s}else l[s]=c-r,++s}return t.readBits(1)&&D(l,e),i}function z(e,t,n,s,i,r,a){var o,l=2*n,c=n,u=O(t,n*w,a);(o=0===u?i[l+(1&r[c])]:1===u?i[l+(r[c]-1&1)]+1:u-2)>=e&&(o-=e),s[n]=o,i[l+(1&r[c])]=o,++r[c]}function H(e,t,n,s,i,a){var o,l=i+1,c=n&i,u=a.pos_&r.IBUF_MASK;if(t<8||a.bit_pos_+(t<<3)<a.bit_end_pos_)for(;t-- >0;)a.readMoreInput(),s[c++]=a.readBits(8),c===l&&(e.write(s,l),c=0);else{if(a.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;a.bit_pos_<32;)s[c]=a.val_>>>a.bit_pos_,a.bit_pos_+=8,++c,--t;if(u+(o=a.bit_end_pos_-a.bit_pos_>>3)>r.IBUF_MASK){for(var d=r.IBUF_MASK+1-u,h=0;h<d;h++)s[c+h]=a.buf_[u+h];o-=d,c+=d,t-=d,u=0}for(h=0;h<o;h++)s[c+h]=a.buf_[u+h];if(t-=o,(c+=o)>=l)for(e.write(s,l),c-=l,h=0;h<c;h++)s[h]=s[l+h];for(;c+t>=l;){if(o=l-c,a.input_.read(s,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(s,l),t-=o,c=0}if(a.input_.read(s,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");a.reset()}}function G(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function W(e){var t=new s(e),n=new r(t);return P(n),T(n).meta_block_length}function U(e,t){var n=new s(e);null==t&&(t=W(e));var r=new Uint8Array(t),a=new i(r);return q(n,a),a.pos<a.buffer.length&&(a.buffer=a.buffer.subarray(0,a.pos)),a.buffer}function q(e,t){var n,s,i,l,h,p,x,b,_,j=0,C=0,k=0,E=0,V=[16,15,11,4],A=0,B=0,D=0,W=[new R(0,0),new R(0,0),new R(0,0)],U=128+r.READ_SIZE;s=(1<<(k=P(_=new r(e))))-16,l=(i=1<<k)-1,h=new Uint8Array(i+U+a.maxDictionaryWordLength),p=i,x=[],b=[];for(var q=0;q<3*w;q++)x[q]=new o(0,0),b[q]=new o(0,0);for(;!C;){var Z,Y,K,X,Q,J,$,ee,te,ne=0,se=[1<<28,1<<28,1<<28],ie=[0],re=[1,1,1],ae=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,he=0,pe=null,fe=0,me=0,ge=0;for(n=0;n<3;++n)W[n].codes=null,W[n].htrees=null;_.readMoreInput();var ve=T(_);if(j+(ne=ve.meta_block_length)>t.buffer.length){var ye=new Uint8Array(j+ne);ye.set(t.buffer),t.buffer=ye}if(C=ve.input_end,Z=ve.is_uncompressed,ve.is_metadata)for(G(_);ne>0;--ne)_.readMoreInput(),_.readBits(8);else if(0!==ne)if(Z)_.bit_pos_=_.bit_pos_+7&-8,H(t,ne,j,h,l,_),j+=ne;else{for(n=0;n<3;++n)re[n]=I(_)+1,re[n]>=2&&(N(re[n]+2,x,n*w,_),N(g,b,n*w,_),se[n]=F(b,n*w,_),oe[n]=1);for(_.readMoreInput(),X=(1<<(Y=_.readBits(2)))-1,Q=(K=S+(_.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(re[0]),n=0;n<re[0];++n)_.readMoreInput(),ce[n]=_.readBits(2)<<1;var xe=L(re[0]<<v,_);J=xe.num_htrees,le=xe.context_map;var be=L(re[2]<<y,_);for($=be.num_htrees,ue=be.context_map,W[0]=new R(f,J),W[1]=new R(m,re[1]),W[2]=new R(Q,$),n=0;n<3;++n)W[n].decode(_);for(de=0,pe=0,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var we,_e,je,Se,Ce,ke,Ee,Pe,Ie,Ve,Te,Oe;for(_.readMoreInput(),0===se[1]&&(z(re[1],x,1,ie,ae,oe,_),se[1]=F(b,w,_),te=W[1].htrees[ie[1]]),--se[1],(_e=(we=O(W[1].codes,te,_))>>6)>=2?(_e-=2,Ee=-1):Ee=0,je=u.kInsertRangeLut[_e]+(we>>3&7),Se=u.kCopyRangeLut[_e]+(7&we),Ce=u.kInsertLengthPrefixCode[je].offset+_.readBits(u.kInsertLengthPrefixCode[je].nbits),ke=u.kCopyLengthPrefixCode[Se].offset+_.readBits(u.kCopyLengthPrefixCode[Se].nbits),B=h[j-1&l],D=h[j-2&l],Ie=0;Ie<Ce;++Ie)_.readMoreInput(),0===se[0]&&(z(re[0],x,0,ie,ae,oe,_),se[0]=F(b,0,_),de=ie[0]<<v,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),he=le[de+(c.lookup[me+B]|c.lookup[ge+D])],--se[0],D=B,B=O(W[0].codes,W[0].htrees[he],_),h[j&l]=B,(j&l)===l&&t.write(h,i),++j;if((ne-=Ce)<=0)break;if(Ee<0&&(_.readMoreInput(),0===se[2]&&(z(re[2],x,2,ie,ae,oe,_),se[2]=F(b,2*w,_),pe=ie[2]<<y),--se[2],fe=ue[pe+(255&(ke>4?3:ke-2))],(Ee=O(W[2].codes,W[2].htrees[fe],_))>=K&&(Oe=(Ee-=K)&X,Ee=K+((Ae=(2+(1&(Ee>>=Y))<<(Te=1+(Ee>>1)))-4)+_.readBits(Te)<<Y)+Oe)),(Pe=M(Ee,V,A))<0)throw new Error("[BrotliDecompress] invalid distance");if(Ve=j&l,Pe>(E=j<s&&E!==s?j:s)){if(!(ke>=a.minDictionaryWordLength&&ke<=a.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ae=a.offsetsByLength[ke],Ne=Pe-E-1,Fe=a.sizeBitsByLength[ke],Me=Ne>>Fe;if(Ae+=(Ne&(1<<Fe)-1)*ke,!(Me<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Be=d.transformDictionaryWord(h,Ve,Ae,ke,Me);if(j+=Be,ne-=Be,(Ve+=Be)>=p){t.write(h,i);for(var De=0;De<Ve-p;De++)h[De]=h[p+De]}}else{if(Ee>0&&(V[3&A]=Pe,++A),ke>ne)throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Ie=0;Ie<ke;++Ie)h[j&l]=h[j-Pe&l],(j&l)===l&&t.write(h,i),++j,--ne}B=h[j-1&l],D=h[j-2&l]}j&=1073741823}}t.write(h,j&l)}R.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=N(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=W,n.BrotliDecompressBuffer=U,n.BrotliDecompress=q,a.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var s=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(s.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var s=e("./dictionary-browser");n.init=function(){n.dictionary=s.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function s(e,t){this.bits=e,this.value=t}n.HuffmanCode=s;var i=15;function r(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function a(e,t,n,i,r){do{e[t+(i-=n)]=new s(r.bits,r.value)}while(i>0)}function o(e,t,n){for(var s=1<<t-n;t<i&&!((s-=e[t])<=0);)++t,s<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,h,p,f,m,g,v,y,x,b=t,w=new Int32Array(i+1),_=new Int32Array(i+1);for(x=new Int32Array(c),d=0;d<c;d++)w[l[d]]++;for(_[1]=0,u=1;u<i;u++)_[u+1]=_[u]+w[u];for(d=0;d<c;d++)0!==l[d]&&(x[_[l[d]]++]=d);if(y=v=1<<(g=n),1===_[i]){for(h=0;h<y;++h)e[t+h]=new s(0,65535&x[0]);return y}for(h=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;w[u]>0;--w[u])a(e,t+h,p,v,new s(255&u,65535&x[d++])),h=r(h,u);for(m=y-1,f=-1,u=n+1,p=2;u<=i;++u,p<<=1)for(;w[u]>0;--w[u])(h&m)!==f&&(t+=v,y+=v=1<<(g=o(w,u,n)),e[b+(f=h&m)]=new s(g+n&255,t-b-f&65535)),a(e,t+(h>>n),p,v,new s(u-n&255,65535&x[d++])),h=r(h,u);return y}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=h,n.fromByteArray=m;for(var s=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)s[o]=a[o],i[a.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){var t=c(e),n=t[0],s=t[1];return 3*(n+s)/4-s}function d(e,t,n){return 3*(t+n)/4-n}function h(e){for(var t,n=c(e),s=n[0],a=n[1],o=new r(d(e,s,a)),l=0,u=a>0?s-4:s,h=0;h<u;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,o[l++]=255&t),1===a&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function f(e,t,n){for(var s,i=[],r=t;r<n;r+=3)s=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),i.push(p(s));return i.join("")}function m(e){for(var t,n=e.length,i=n%3,r=[],a=16383,o=0,l=n-i;o<l;o+=a)r.push(f(e,o,o+a>l?l:o+a));return 1===i?(t=e[n-1],r.push(s[t>>2]+s[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function s(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new s(1,2),new s(5,2),new s(9,2),new s(13,2),new s(17,3),new s(25,3),new s(33,3),new s(41,3),new s(49,4),new s(65,4),new s(81,4),new s(97,4),new s(113,5),new s(145,5),new s(177,5),new s(209,5),new s(241,6),new s(305,6),new s(369,7),new s(497,8),new s(753,9),new s(1265,10),new s(2289,11),new s(4337,12),new s(8433,13),new s(16625,24)],n.kInsertLengthPrefixCode=[new s(0,0),new s(1,0),new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,1),new s(8,1),new s(10,2),new s(14,2),new s(18,3),new s(26,3),new s(34,4),new s(50,4),new s(66,5),new s(98,5),new s(130,6),new s(194,7),new s(322,8),new s(578,9),new s(1090,10),new s(2114,12),new s(6210,14),new s(22594,24)],n.kCopyLengthPrefixCode=[new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,0),new s(7,0),new s(8,0),new s(9,0),new s(10,1),new s(12,1),new s(14,2),new s(18,2),new s(22,3),new s(30,3),new s(38,4),new s(54,4),new s(70,5),new s(102,5),new s(134,6),new s(198,7),new s(326,8),new s(582,9),new s(1094,10),new s(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function s(e){this.buffer=e,this.pos=0}function i(e){this.buffer=e,this.pos=0}s.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var s=0;s<n;s++)e[t+s]=this.buffer[this.pos+s];return this.pos+=n,n},n.BrotliInput=s,i.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=i},{}],11:[function(e,t,n){var s=e("./dictionary"),i=0,r=1,a=2,o=3,l=4,c=5,u=6,d=7,h=8,p=9,f=10,m=11,g=12,v=13,y=14,x=15,b=16,w=17,_=18,j=20;function S(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var s=0;s<e.length;s++)this.prefix[s]=e.charCodeAt(s);for(s=0;s<n.length;s++)this.suffix[s]=n.charCodeAt(s)}var C=[new S("",i,""),new S("",i," "),new S(" ",i," "),new S("",g,""),new S("",f," "),new S("",i," the "),new S(" ",i,""),new S("s ",i," "),new S("",i," of "),new S("",f,""),new S("",i," and "),new S("",v,""),new S("",r,""),new S(", ",i," "),new S("",i,", "),new S(" ",f," "),new S("",i," in "),new S("",i," to "),new S("e ",i," "),new S("",i,'"'),new S("",i,"."),new S("",i,'">'),new S("",i,"\n"),new S("",o,""),new S("",i,"]"),new S("",i," for "),new S("",y,""),new S("",a,""),new S("",i," a "),new S("",i," that "),new S(" ",f,""),new S("",i,". "),new S(".",i,""),new S(" ",i,", "),new S("",x,""),new S("",i," with "),new S("",i,"'"),new S("",i," from "),new S("",i," by "),new S("",b,""),new S("",w,""),new S(" the ",i,""),new S("",l,""),new S("",i,". The "),new S("",m,""),new S("",i," on "),new S("",i," as "),new S("",i," is "),new S("",d,""),new S("",r,"ing "),new S("",i,"\n\t"),new S("",i,":"),new S(" ",i,". "),new S("",i,"ed "),new S("",j,""),new S("",_,""),new S("",u,""),new S("",i,"("),new S("",f,", "),new S("",h,""),new S("",i," at "),new S("",i,"ly "),new S(" the ",i," of "),new S("",c,""),new S("",p,""),new S(" ",f,", "),new S("",f,'"'),new S(".",i,"("),new S("",m," "),new S("",f,'">'),new S("",i,'="'),new S(" ",i,"."),new S(".com/",i,""),new S(" the ",i," of the "),new S("",f,"'"),new S("",i,". This "),new S("",i,","),new S(".",i," "),new S("",f,"("),new S("",f,"."),new S("",i," not "),new S(" ",i,'="'),new S("",i,"er "),new S(" ",m," "),new S("",i,"al "),new S(" ",m,""),new S("",i,"='"),new S("",m,'"'),new S("",f,". "),new S(" ",i,"("),new S("",i,"ful "),new S(" ",f,". "),new S("",i,"ive "),new S("",i,"less "),new S("",m,"'"),new S("",i,"est "),new S(" ",f,"."),new S("",m,'">'),new S(" ",i,"='"),new S("",f,","),new S("",i,"ize "),new S("",m,"."),new S(" ",i,""),new S(" ",i,","),new S("",f,'="'),new S("",m,'="'),new S("",i,"ous "),new S("",m,", "),new S("",f,"='"),new S(" ",f,","),new S(" ",m,'="'),new S(" ",m,", "),new S("",m,","),new S("",m,"("),new S("",m,". "),new S(" ",m,"."),new S("",m,"='"),new S(" ",m,". "),new S(" ",f,'="'),new S(" ",m,"='"),new S(" ",f,"='")];function k(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=C,n.kNumTransforms=C.length,n.transformDictionaryWord=function(e,t,n,i,r){var a,o=C[r].prefix,l=C[r].suffix,c=C[r].transform,u=c<g?0:c-(g-1),d=0,h=t;u>i&&(u=i);for(var v=0;v<o.length;)e[t++]=o[v++];for(n+=u,i-=u,c<=p&&(i-=c),d=0;d<i;d++)e[t++]=s.dictionary[n+d];if(a=t-i,c===f)k(e,a);else if(c===m)for(;i>0;){var y=k(e,a);a+=y,i-=y}for(var x=0;x<l.length;)e[t++]=l[x++];return t-h}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),s=new RegExp(n,"g"),i=new RegExp(n,"");function r(e){return t[e]}var a=function(e){return e.replace(s,r)};e.exports=a,e.exports.has=function(e){return!!e.match(i)},e.exports.remove=a}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);i.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,i.d(r,a),r},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";i.r(r),i.d(r,{PluginMoreMenuItem:()=>HV,PluginSidebar:()=>GV,PluginSidebarMoreMenuItem:()=>WV,PluginTemplateSettingPanel:()=>Oo,initializeEditor:()=>JV,initializePostsDashboard:()=>XV,reinitializeEditor:()=>$V,store:()=>Rt});var e={};i.r(e),i.d(e,{__experimentalSetPreviewDeviceType:()=>ze,addTemplate:()=>Ge,closeGeneralSidebar:()=>at,openGeneralSidebar:()=>rt,openNavigationPanelToMenu:()=>Je,removeTemplate:()=>We,revertTemplate:()=>it,setEditedEntity:()=>Ze,setEditedPostContext:()=>Ke,setHasPageContentFocus:()=>lt,setHomeTemplateId:()=>Ye,setIsInserterOpened:()=>et,setIsListViewOpened:()=>tt,setIsNavigationPanelOpened:()=>$e,setIsSaveViewOpened:()=>st,setNavigationMenu:()=>qe,setNavigationPanelActiveMenu:()=>Qe,setPage:()=>Xe,setTemplate:()=>He,setTemplatePart:()=>Ue,switchEditorMode:()=>ot,toggleDistractionFree:()=>ct,toggleFeature:()=>Le,updateSettings:()=>nt});var t={};i.r(t),i.d(t,{registerRoute:()=>dt,setEditorCanvasContainerView:()=>ut,unregisterRoute:()=>ht});var n={};i.r(n),i.d(n,{__experimentalGetInsertionPoint:()=>Ct,__experimentalGetPreviewDeviceType:()=>mt,getCanUserCreateMedia:()=>gt,getCurrentTemplateNavigationPanelSubMenu:()=>Tt,getCurrentTemplateTemplateParts:()=>It,getEditedPostContext:()=>_t,getEditedPostId:()=>wt,getEditedPostType:()=>bt,getEditorMode:()=>Vt,getHomeTemplateId:()=>xt,getNavigationPanelActiveMenu:()=>Ot,getPage:()=>jt,getReusableBlocks:()=>vt,getSettings:()=>yt,hasPageContentFocus:()=>Ft,isFeatureActive:()=>ft,isInserterOpened:()=>St,isListViewOpened:()=>kt,isNavigationOpened:()=>At,isPage:()=>Nt,isSaveViewOpened:()=>Et});var s={};i.r(s),i.d(s,{getEditorCanvasContainerView:()=>Mt,getRoutes:()=>Bt});const a=window.ReactJSXRuntime,o=window.wp.blocks,l=window.wp.blockLibrary;var c=i(7143);const u=window.wp.deprecated;var d=i.n(u),h=i(6087);const f=window.wp.editor;var m=i(1233);const g=window.wp.widgets,v=window.wp.hooks,y=window.wp.compose,x=window.wp.blockEditor,b=window.wp.components,w=window.wp.i18n,_=window.wp.notices,j=window.wp.coreData;var S={grad:.9,turn:360,rad:360/(2*Math.PI)},C=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},k=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},E=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},P=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},I=function(e){return{r:E(e.r,0,255),g:E(e.g,0,255),b:E(e.b,0,255),a:E(e.a)}},V=function(e){return{r:k(e.r),g:k(e.g),b:k(e.b),a:k(e.a,3)}},T=/^#([0-9a-f]{3,8})$/i,O=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},A=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,r=Math.max(t,n,s),a=r-Math.min(t,n,s),o=a?r===t?(n-s)/a:r===n?2+(s-t)/a:4+(t-n)/a:0;return{h:60*(o<0?o+6:o),s:r?a/r*100:0,v:r/255*100,a:i}},N=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var r=Math.floor(t),a=s*(1-n),o=s*(1-(t-r)*n),l=s*(1-(1-t+r)*n),c=r%6;return{r:255*[s,o,a,a,l,s][c],g:255*[l,s,s,o,a,a][c],b:255*[a,a,l,s,s,o][c],a:i}},F=function(e){return{h:P(e.h),s:E(e.s,0,100),l:E(e.l,0,100),a:E(e.a)}},M=function(e){return{h:k(e.h),s:k(e.s),l:k(e.l),a:k(e.a,3)}},B=function(e){return N((n=(t=e).s,{h:t.h,s:(n*=((s=t.l)<50?s:100-s)/100)>0?2*n/(s+n)*100:0,v:s+n,a:t.a}));var t,n,s},D=function(e){return{h:(t=A(e)).h,s:(i=(200-(n=t.s))*(s=t.v)/100)>0&&i<200?n*s/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,s,i},R=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,L=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,H=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,G={string:[[function(e){var t=T.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?k(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?k(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=z.exec(e)||H.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:I({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=R.exec(e)||L.exec(e);if(!t)return null;var n,s,i=F({h:(n=t[1],s=t[2],void 0===s&&(s="deg"),Number(n)*(S[s]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return B(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,s=e.b,i=e.a,r=void 0===i?1:i;return C(t)&&C(n)&&C(s)?I({r:Number(t),g:Number(n),b:Number(s),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,s=e.l,i=e.a,r=void 0===i?1:i;if(!C(t)||!C(n)||!C(s))return null;var a=F({h:Number(t),s:Number(n),l:Number(s),a:Number(r)});return B(a)},"hsl"],[function(e){var t=e.h,n=e.s,s=e.v,i=e.a,r=void 0===i?1:i;if(!C(t)||!C(n)||!C(s))return null;var a=function(e){return{h:P(e.h),s:E(e.s,0,100),v:E(e.v,0,100),a:E(e.a)}}({h:Number(t),s:Number(n),v:Number(s),a:Number(r)});return N(a)},"hsv"]]},W=function(e,t){for(var n=0;n<t.length;n++){var s=t[n][0](e);if(s)return[s,t[n][1]]}return[null,void 0]},U=function(e){return"string"==typeof e?W(e.trim(),G.string):"object"==typeof e&&null!==e?W(e,G.object):[null,void 0]},q=function(e,t){var n=D(e);return{h:n.h,s:E(n.s+100*t,0,100),l:n.l,a:n.a}},Z=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Y=function(e,t){var n=D(e);return{h:n.h,s:n.s,l:E(n.l+100*t,0,100),a:n.a}},K=function(){function e(e){this.parsed=U(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return k(Z(this.rgba),2)},e.prototype.isDark=function(){return Z(this.rgba)<.5},e.prototype.isLight=function(){return Z(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=V(this.rgba)).r,n=e.g,s=e.b,r=(i=e.a)<1?O(k(255*i)):"","#"+O(t)+O(n)+O(s)+r;var e,t,n,s,i,r},e.prototype.toRgb=function(){return V(this.rgba)},e.prototype.toRgbString=function(){return t=(e=V(this.rgba)).r,n=e.g,s=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+s+", "+i+")":"rgb("+t+", "+n+", "+s+")";var e,t,n,s,i},e.prototype.toHsl=function(){return M(D(this.rgba))},e.prototype.toHslString=function(){return t=(e=M(D(this.rgba))).h,n=e.s,s=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+s+"%, "+i+")":"hsl("+t+", "+n+"%, "+s+"%)";var e,t,n,s,i},e.prototype.toHsv=function(){return e=A(this.rgba),{h:k(e.h),s:k(e.s),v:k(e.v),a:k(e.a,3)};var e},e.prototype.invert=function(){return X({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),X(q(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),X(q(this.rgba,-e))},e.prototype.grayscale=function(){return X(q(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),X(Y(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),X(Y(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?X({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):k(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=D(this.rgba);return"number"==typeof e?X({h:e,s:t.s,l:t.l,a:t.a}):k(t.h)},e.prototype.isEqual=function(e){return this.toHex()===X(e).toHex()},e}(),X=function(e){return e instanceof K?e:new K(e)},Q=[],J=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},$=function(e){return.2126*J(e.r)+.7152*J(e.g)+.0722*J(e.b)};const ee=window.wp.privateApis,{lock:te,unlock:ne}=(0,ee.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:se,useGlobalStyle:ie}=ne(x.privateApis);function re(){const[e="black"]=ie("color.text"),[t="white"]=ie("color.background"),[n=e]=ie("elements.h1.color.text"),[s=n]=ie("elements.link.color.text"),[i=s]=ie("elements.button.color.background"),[r]=se("color.palette.core"),[a]=se("color.palette.theme"),[o]=se("color.palette.custom"),l=(a??[]).concat(o??[]).concat(r??[]),c=l.filter((({color:t})=>t===e)),u=l.filter((({color:e})=>e===i));return{paletteColors:l,highlightedColors:c.concat(u).concat(l).filter((({color:e})=>e!==t)).slice(0,2)}}function ae(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,s,i)=>(void 0===e[s]&&(Number.isInteger(t[i+1])?e[s]=[]:e[s]={}),i===t.length-1&&(e[s]=n),e[s])),e),e):e}!function(e){e.forEach((function(e){Q.indexOf(e)<0&&(e(K,G),Q.push(e))}))}([function(e){e.prototype.luminance=function(){return e=$(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,s,i,r,a,o,l,c=t instanceof e?t:new e(t);return r=this.rgba,a=c.toRgb(),n=(o=$(r))>(l=$(a))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(s=2)&&(s=0),void 0===i&&(i=Math.pow(10,s)),Math.floor(i*n)/i+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(r=(n=t).size)?"normal":r,"AAA"===(i=void 0===(s=n.level)?"AA":s)&&"normal"===a?7:"AA"===i&&"large"===a?3:4.5);var n,s,i,r,a}}]);const{cleanEmptyObject:oe,GlobalStylesContext:le}=ne(x.privateApis),ce={...o.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ue={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},de={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},he=["border","color","spacing","typography"],pe=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},fe=["borderColor","borderWidth","borderStyle"],me=["top","right","bottom","left"];function ge(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:s,style:i,width:r}=t[e];return!(s||r)||i?[]:[{path:["border",e,"style"],value:"solid"}]}function ve(e,t,n){const s=function(e,t){const{supportedPanels:n}=(0,c.useSelect)((n=>({supportedPanels:ne(n(o.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),i=n?.styles?.blocks?.[e];return(0,h.useMemo)((()=>{const e=s.flatMap((e=>{if(!ce[e])return[];const{value:n}=ce[e],s=n.join("."),i=t[de[s]],r=i?`var:preset|${ue[s]}|${i}`:pe(t.style,n);if("linkColor"===e){const e=r?[{path:n,value:r}]:[],s=["elements","link",":hover","color","text"],i=pe(t.style,s);return i&&e.push({path:s,value:i}),e}if(fe.includes(e)&&r){const e=[{path:n,value:r}];return me.forEach((t=>{const s=[...n];s.splice(-1,0,t),e.push({path:s,value:r})})),e}return r?[{path:n,value:r}]:[]}));return function(e,t,n){if(!e&&!t)return[];const s=[...ge("top",e,n),...ge("right",e,n),...ge("bottom",e,n),...ge("left",e,n)],{color:i,style:r,width:a}=e||{};return(t||i||a)&&!r&&me.forEach((e=>{n?.[e]?.style||s.push({path:["border",e,"style"],value:"solid"})})),s}(t.style?.border,t.borderColor,i?.border).forEach((t=>e.push(t))),e}),[s,t,i])}function ye({name:e,attributes:t,setAttributes:n}){const{user:s,setUserConfig:i}=(0,h.useContext)(le),r=ve(e,t,s),{__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(x.store),{createSuccessNotice:u}=(0,c.useDispatch)(_.store),d=(0,h.useCallback)((()=>{if(0!==r.length&&r.length>0){const{style:a}=t,c=structuredClone(a),d=structuredClone(s);for(const{path:t,value:n}of r)ae(c,t,void 0),ae(d,["styles","blocks",e,...t],n);const h={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:oe(c)};l(),n(h),i(d,{undoIgnore:!0}),u((0,w.sprintf)((0,w.__)("%s styles applied."),(0,o.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,w.__)("Undo"),onClick(){l(),n(t),i(s,{undoIgnore:!0})}}]})}}),[l,t,r,u,e,n,i,s]);return(0,a.jsxs)(b.BaseControl,{__nextHasNoMarginBottom:!0,className:"edit-site-push-changes-to-global-styles-control",help:(0,w.sprintf)((0,w.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,o.getBlockType)(e).title),children:[(0,a.jsx)(b.BaseControl.VisualLabel,{children:(0,w.__)("Styles")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:0===r.length,onClick:d,children:(0,w.__)("Apply globally")})]})}function xe(e){const t=(0,x.useBlockEditingMode)(),n=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.is_block_theme),[]),s=he.some((t=>(0,o.hasBlockSupport)(e.name,t)));return"default"===t&&s&&n?(0,a.jsx)(x.InspectorAdvancedControls,{children:(0,a.jsx)(ye,{...e})}):null}const be=(0,y.createHigherOrderComponent)((e=>t=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e,{...t},"edit"),t.isSelected&&(0,a.jsx)(xe,{...t})]})));(0,v.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",be);var we=(0,c.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){return"SET_IS_SAVE_VIEW_OPENED"===t.type?t.isOpen:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e},routes:function(e=[],t){switch(t.type){case"REGISTER_ROUTE":return[...e,t.route];case"UNREGISTER_ROUTE":return e.filter((e=>e.name!==t.name))}return e}});const _e=window.wp.patterns,je="wp_navigation",Se="wp_template",Ce="wp_template_part",ke="custom",Ee="uncategorized",Pe="all-parts",{PATTERN_TYPES:Ie,PATTERN_DEFAULT_CATEGORY:Ve,PATTERN_USER_CATEGORY:Te,EXCLUDED_PATTERN_SOURCES:Oe,PATTERN_SYNC_TYPES:Ae}=ne(_e.privateApis),Ne=[Ce,je,Ie.user],Fe={[Se]:(0,w.__)("Template"),[Ce]:(0,w.__)("Template part"),[Ie.user]:(0,w.__)("Pattern"),[je]:(0,w.__)("Navigation")},Me="grid",Be="table",De="isAny",{interfaceStore:Re}=ne(f.privateApis);function Le(e){return function({registry:t}){d()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(m.store).toggle("core/edit-site",e)}}const ze=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(f.store).setDeviceType(e)};function He(){return d()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const Ge=e=>async({dispatch:t,registry:n})=>{d()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const s=await n.dispatch(j.store).saveEntityRecord("postType",Se,e);e.content&&n.dispatch(j.store).editEntityRecord("postType",Se,s.id,{blocks:(0,o.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Se,id:s.id})},We=e=>({registry:t})=>ne(t.dispatch(f.store)).removeTemplates([e]);function Ue(e){return d()("dispatch( 'core/edit-site' ).setTemplatePart",{since:"6.8"}),{type:"SET_EDITED_POST",postType:Ce,id:e}}function qe(e){return d()("dispatch( 'core/edit-site' ).setNavigationMenu",{since:"6.8"}),{type:"SET_EDITED_POST",postType:je,id:e}}function Ze(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function Ye(){return d()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Ke(e){return d()("dispatch( 'core/edit-site' ).setEditedPostContext",{since:"6.8"}),{type:"SET_EDITED_POST_CONTEXT",context:e}}function Xe(){return d()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function Qe(){return d()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Je(){return d()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function $e(){return d()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const et=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(f.store).setIsInserterOpened(e)},tt=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(f.store).setIsListViewOpened(e)};function nt(e){return{type:"UPDATE_SETTINGS",settings:e}}function st(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const it=(e,t)=>({registry:n})=>ne(n.dispatch(f.store)).revertTemplate(e,t),rt=e=>({registry:t})=>{t.dispatch(Re).enableComplementaryArea("core",e)},at=()=>({registry:e})=>{e.dispatch(Re).disableComplementaryArea("core")},ot=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(f.store).switchEditorMode(e)},lt=e=>({dispatch:t,registry:n})=>{d()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(x.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},ct=()=>({registry:e})=>{d()("dispatch( 'core/edit-site' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(f.store).toggleDistractionFree()},ut=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})};function dt(e){return{type:"REGISTER_ROUTE",route:e}}function ht(e){return{type:"UNREGISTER_ROUTE",name:e}}const pt=[];const ft=(0,c.createRegistrySelector)((e=>(t,n)=>(d()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(m.store).get("core/edit-site",n)))),mt=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(f.store).getDeviceType()))),gt=(0,c.createRegistrySelector)((e=>()=>(d()("wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )"}),e(j.store).canUser("create","media")))),vt=(0,c.createRegistrySelector)((e=>()=>{d()("select( 'core/edit-site' ).getReusableBlocks()",{since:"6.5",version:"6.8",alternative:"select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )"});return"web"===h.Platform.OS?e(j.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function yt(e){return e.settings}function xt(){d()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function bt(e){return d()("select( 'core/edit-site' ).getEditedPostType",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),e.editedPost.postType}function wt(e){return d()("select( 'core/edit-site' ).getEditedPostId",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostId"}),e.editedPost.id}function _t(e){return d()("select( 'core/edit-site' ).getEditedPostContext",{since:"6.8"}),e.editedPost.context}function jt(e){return d()("select( 'core/edit-site' ).getPage",{since:"6.8"}),{context:e.editedPost.context}}const St=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(f.store).isInserterOpened()))),Ct=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),ne(e(f.store)).getInserter()))),kt=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(f.store).isListViewOpened())));function Et(e){return e.saveViewPanel}function Pt(e){const t=e(j.store).getEntityRecords("postType",Ce,{per_page:-1}),{getBlocksByName:n,getBlocksByClientId:s}=e(x.store);return[s(n("core/template-part")),t]}const It=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((()=>(d()("select( 'core/edit-site' ).getCurrentTemplateTemplateParts()",{since:"6.7",version:"6.9",alternative:"select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )"}),function(e=pt,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},s=[],i=[...e];for(;i.length;){const{innerBlocks:e,...t}=i.shift();if(i.unshift(...e),(0,o.isTemplatePart)(t)){const{attributes:{theme:e,slug:i}}=t,r=n[`${e}//${i}`];r&&s.push({templatePart:r,block:t})}}return s}(...Pt(e)))),(()=>Pt(e))))),Vt=(0,c.createRegistrySelector)((e=>()=>e(m.store).get("core","editorMode")));function Tt(){d()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Ot(){d()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function At(){d()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Nt(e){return d()("select( 'core/edit-site' ).isPage",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),!!e.editedPost.context?.postId}function Ft(){return d()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Mt(e){return e.editorCanvasContainerView}function Bt(e){return e.routes}const Dt={reducer:we,actions:e,selectors:n},Rt=(0,c.createReduxStore)("core/edit-site",Dt);(0,c.register)(Rt),ne(Rt).registerPrivateSelectors(s),ne(Rt).registerPrivateActions(t);const Lt=window.wp.router;function zt(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zt(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}const Ht=function(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zt(e))&&(s&&(s+=" "),s+=t);return s},Gt=(0,h.forwardRef)((({children:e,className:t,ariaLabel:n,as:s="div",...i},r)=>(0,a.jsx)(s,{ref:r,className:Ht("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...i,children:e})));Gt.displayName="NavigableRegion";var Wt=Gt;const Ut=window.wp.plugins,qt=window.wp.htmlEntities,Zt=window.wp.primitives;var Yt=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const Kt=window.wp.commands,Xt=window.wp.keycodes,Qt=window.wp.url;var Jt=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,a.jsx)(Zt.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});var $t=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(j.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,a.jsx)("div",{className:"edit-site-site-icon__image"});const s=n?(0,a.jsx)("img",{className:"edit-site-site-icon__image",alt:(0,w.__)("Site Icon"),src:n}):(0,a.jsx)(b.Icon,{className:"edit-site-site-icon__icon",icon:Jt,size:48});return(0,a.jsx)("div",{className:Ht(e,"edit-site-site-icon"),children:s})};const en=window.wp.dom,tn=(0,h.createContext)((()=>{}));function nn(){let e={direction:null,focusSelector:null};return{get:()=>e,navigate(t,n=null){e={direction:t,focusSelector:"forward"===t&&n?n:e.focusSelector}}}}function sn({children:e,shouldAnimate:t}){const n=(0,h.useContext)(tn),s=(0,h.useRef)(),[i,r]=(0,h.useState)(null);(0,h.useLayoutEffect)((()=>{const{direction:e,focusSelector:t}=n.get();!function(e,t,n){let s;if("back"===t&&n&&(s=e.querySelector(n)),null!==t&&!s){const[t]=en.focus.tabbable.find(e);s=t??e}s?.focus()}(s.current,e,t),r(e)}),[n]);const o=Ht("edit-site-sidebar__screen-wrapper",t?{"slide-from-left":"back"===i,"slide-from-right":"forward"===i}:{});return(0,a.jsx)("div",{ref:s,className:o,children:e})}function rn({children:e}){const[t]=(0,h.useState)(nn);return(0,a.jsx)(tn.Provider,{value:t,children:e})}function an({routeKey:e,shouldAnimate:t,children:n}){return(0,a.jsx)("div",{className:"edit-site-sidebar__content",children:(0,a.jsx)(sn,{shouldAnimate:t,children:n},e)})}tn.displayName="SidebarNavigationContext";const{useLocation:on,useHistory:ln}=ne(Lt.privateApis),cn=(0,h.memo)((0,h.forwardRef)((({isTransparent:e},t)=>{const{dashboardLink:n,homeUrl:s,siteTitle:i}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),{getEntityRecord:n}=e(j.store),s=n("root","site");return{dashboardLink:t().__experimentalDashboardLink,homeUrl:n("root","__unstableBase")?.home,siteTitle:!s?.title&&s?.url?(0,Qt.filterURLForDisplay)(s?.url):s?.title}}),[]),{open:r}=(0,c.useDispatch)(Kt.store);return(0,a.jsx)("div",{className:"edit-site-site-hub",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,a.jsx)("div",{className:Ht("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,ref:t,href:n,label:(0,w.__)("Go to the Dashboard"),className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5333) translateX(-4px)",borderRadius:4},children:(0,a.jsx)($t,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)("div",{className:"edit-site-site-hub__title",children:(0,a.jsxs)(b.Button,{__next40pxDefaultSize:!0,variant:"link",href:s,target:"_blank",children:[(0,qt.decodeEntities)(i),(0,a.jsx)(b.VisuallyHidden,{as:"span",children:(0,w.__)("(opens in a new tab)")})]})}),(0,a.jsx)(b.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,a.jsx)(b.Button,{size:"compact",className:"edit-site-site-hub_toggle-command-center",icon:Yt,onClick:()=>r(),label:(0,w.__)("Open command palette"),shortcut:Xt.displayShortcut.primary("k")})})]})]})})})));var un=cn;const dn=(0,h.memo)((0,h.forwardRef)((({isTransparent:e},t)=>{const{path:n}=on(),s=ln(),{navigate:i}=(0,h.useContext)(tn),{dashboardLink:r,homeUrl:o,siteTitle:l,isBlockTheme:u,isClassicThemeWithStyleBookSupport:d}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),{getEntityRecord:n,getCurrentTheme:s}=e(j.store),i=n("root","site"),r=s(),a=t(),o=r.theme_supports["editor-styles"],l=a.supportsLayout;return{dashboardLink:a.__experimentalDashboardLink,homeUrl:n("root","__unstableBase")?.home,siteTitle:!i?.title&&i?.url?(0,Qt.filterURLForDisplay)(i?.url):i?.title,isBlockTheme:r?.is_block_theme,isClassicThemeWithStyleBookSupport:!r?.is_block_theme&&(o||l)}}),[]),{open:p}=(0,c.useDispatch)(Kt.store);let f;"/"!==n&&(u||d?f="/":"/pattern"!==n&&(f="/pattern"));const m={href:f?void 0:r,label:f?(0,w.__)("Go to Site Editor"):(0,w.__)("Go to the Dashboard"),onClick:f?()=>{s.navigate(f),i("back")}:void 0};return(0,a.jsx)("div",{className:"edit-site-site-hub",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,a.jsx)("div",{className:Ht("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,ref:t,className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5)",borderRadius:4},...m,children:(0,a.jsx)($t,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)("div",{className:"edit-site-site-hub__title",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"link",href:o,target:"_blank",label:(0,w.__)("View site (opens in a new tab)"),children:(0,qt.decodeEntities)(l)})}),(0,a.jsx)(b.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:"edit-site-site-hub_toggle-command-center",icon:Yt,onClick:()=>p(),label:(0,w.__)("Open command palette"),shortcut:Xt.displayShortcut.primary("k")})})]})]})})}))),{useLocation:hn,useHistory:pn}=ne(Lt.privateApis),fn={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},mn=320,gn=9/19.5,vn={width:"100%",height:"100%"};function yn(e,t){const n=1-Math.max(0,Math.min(1,(e-mn)/980)),s=((e,t,n)=>e+(t-e)*n)(t,gn,n);return e/s}var xn=function e({isFullWidth:t,isOversized:n,setIsOversized:s,isReady:i,children:r,defaultSize:o,innerContentStyle:l}){const u=pn(),{path:d,query:p}=hn(),{canvas:f="view"}=p,m=(0,y.useReducedMotion)(),[g,v]=(0,h.useState)(vn),[x,_]=(0,h.useState)(),[S,C]=(0,h.useState)(!1),[k,E]=(0,h.useState)(!1),[P,I]=(0,h.useState)(1),V={type:"tween",duration:S?0:.5},T=(0,h.useRef)(null),O=(0,y.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),A=o.width/o.height,N=(0,c.useSelect)((e=>{const{getCurrentTheme:t}=e(j.store);return t()?.is_block_theme}),[]),F={default:{flexGrow:0,height:g.height},fullWidth:{flexGrow:1,height:g.height}},M={hidden:{opacity:0,...(0,w.isRTL)()?{right:0}:{left:0}},visible:{opacity:1,...(0,w.isRTL)()?{right:-14}:{left:-14}},active:{opacity:1,...(0,w.isRTL)()?{right:-14}:{left:-14},scaleY:1.3}},B=S?"active":k?"visible":"hidden";return(0,a.jsx)(b.ResizableBox,{as:b.__unstableMotion.div,ref:T,initial:!1,variants:F,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&v({width:"100%",height:"100%"})},whileHover:"view"===f&&N?{scale:1.005,transition:{duration:m?0:.5,ease:"easeOut"}}:{},transition:V,size:g,enable:{top:!1,bottom:!1,...(0,w.isRTL)()?{right:i,left:!1}:{left:i,right:!1},topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:P,handleClasses:void 0,handleStyles:{left:fn,right:fn},minWidth:mn,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>E(!0),onBlur:()=>E(!1),onMouseOver:()=>E(!0),onMouseOut:()=>E(!1),handleComponent:{[(0,w.isRTL)()?"right":"left"]:"view"===f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Tooltip,{text:(0,w.__)("Drag to resize"),children:(0,a.jsx)(b.__unstableMotion.button,{role:"separator","aria-orientation":"vertical",className:Ht("edit-site-resizable-frame__handle",{"is-resizing":S}),variants:M,animate:B,"aria-label":(0,w.__)("Drag to resize"),"aria-describedby":O,"aria-valuenow":T.current?.resizable?.offsetWidth||void 0,"aria-valuemin":mn,"aria-valuemax":o.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1)*((0,w.isRTL)()?-1:1),n=Math.min(Math.max(mn,T.current.resizable.offsetWidth+t),o.width);v({width:n,height:yn(n,A)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"},"handle")}),(0,a.jsx)("div",{hidden:!0,id:O,children:(0,w.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")})]})},onResizeStart:(e,t,n)=>{_(n.offsetWidth),C(!0)},onResize:(e,t,i,r)=>{const a=r.width/P,l=Math.abs(a),c=r.width<0?l:(o.width-x)/2,u=Math.min(l,c),d=0===l?0:u/l;I(1-d+2*d);const h=x+r.width;s(h>o.width),v({height:n?"100%":yn(h,A)})},onResizeStop:(e,t,i)=>{if(C(!1),!n)return;s(!1);i.ownerDocument.documentElement.offsetWidth-i.offsetWidth>200||!N?v(vn):u.navigate((0,Qt.addQueryArgs)(d,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"})},className:Ht("edit-site-resizable-frame__inner",{"is-resizing":S}),showHandle:!1,children:(0,a.jsx)("div",{className:"edit-site-resizable-frame__inner-content",style:l,children:r})})};const bn=window.wp.keyboardShortcuts,wn="core/edit-site/save";function _n(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,c.useSelect)(j.store),{hasNonPostEntityChanges:n,isPostSavingLocked:s}=(0,c.useSelect)(f.store),{savePost:i}=(0,c.useDispatch)(f.store),{setIsSaveViewOpened:r}=(0,c.useDispatch)(Rt),{registerShortcut:a,unregisterShortcut:o}=(0,c.useDispatch)(bn.store);return(0,h.useEffect)((()=>(a({name:wn,category:"global",description:(0,w.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{o(wn)})),[a,o]),(0,bn.useShortcut)("core/edit-site/save",(a=>{a.preventDefault();const o=e(),l=!!o.length,c=o.some((e=>t(e.kind,e.name,e.key)));l&&!c&&(n()?r(!0):s()||i())})),null}const jn=1e4;function Sn(){const[e,t]=(0,h.useState)(!1),n=(0,c.useSelect)((t=>{const n=t(j.store).hasResolvingSelectors();return!e&&!n}),[e]);return(0,h.useEffect)((()=>{let n;return e||(n=setTimeout((()=>{t(!0)}),jn)),()=>{clearTimeout(n)}}),[e]),(0,h.useEffect)((()=>{if(n){const e=setTimeout((()=>{t(!0)}),100);return()=>{clearTimeout(e)}}}),[n]),!e}var Cn=zn(),kn=e=>Bn(e,Cn),En=zn();kn.write=e=>Bn(e,En);var Pn=zn();kn.onStart=e=>Bn(e,Pn);var In=zn();kn.onFrame=e=>Bn(e,In);var Vn=zn();kn.onFinish=e=>Bn(e,Vn);var Tn=[];kn.setTimeout=(e,t)=>{let n=kn.now()+t,s=()=>{let e=Tn.findIndex((e=>e.cancel==s));~e&&Tn.splice(e,1),Fn-=~e?1:0},i={time:n,handler:e,cancel:s};return Tn.splice(On(n),0,i),Fn+=1,Dn(),i};var On=e=>~(~Tn.findIndex((t=>t.time>e))||~Tn.length);kn.cancel=e=>{Pn.delete(e),In.delete(e),Vn.delete(e),Cn.delete(e),En.delete(e)},kn.sync=e=>{Mn=!0,kn.batchedUpdates(e),Mn=!1},kn.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function s(...e){t=e,kn.onStart(n)}return s.handler=e,s.cancel=()=>{Pn.delete(n),t=null},s};var An=typeof window<"u"?window.requestAnimationFrame:()=>{};kn.use=e=>An=e,kn.now=typeof performance<"u"?()=>performance.now():Date.now,kn.batchedUpdates=e=>e(),kn.catch=console.error,kn.frameLoop="always",kn.advance=()=>{"demand"!==kn.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ln()};var Nn=-1,Fn=0,Mn=!1;function Bn(e,t){Mn?(t.delete(e),e(0)):(t.add(e),Dn())}function Dn(){Nn<0&&(Nn=0,"demand"!==kn.frameLoop&&An(Rn))}function Rn(){~Nn&&(An(Rn),kn.batchedUpdates(Ln))}function Ln(){let e=Nn;Nn=kn.now();let t=On(Nn);t&&(Hn(Tn.splice(0,t),(e=>e.handler())),Fn-=t),Fn?(Pn.flush(),Cn.flush(e?Math.min(64,Nn-e):16.667),In.flush(),En.flush(),Vn.flush()):Nn=-1}function zn(){let e=new Set,t=e;return{add(n){Fn+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Fn-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Fn-=t.size,Hn(t,(t=>t(n)&&e.add(t))),Fn+=e.size,t=e)}}}function Hn(e,t){e.forEach((e=>{try{t(e)}catch(e){kn.catch(e)}}))}var Gn=i(1609),Wn=i.t(Gn,2),Un=Object.defineProperty,qn={};function Zn(){}((e,t)=>{for(var n in t)Un(e,n,{get:t[n],enumerable:!0})})(qn,{assign:()=>os,colors:()=>is,createStringInterpolator:()=>es,skipAnimation:()=>rs,to:()=>ts,willAdvance:()=>as});var Yn={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Kn(e,t){if(Yn.arr(e)){if(!Yn.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Xn=(e,t)=>e.forEach(t);function Qn(e,t,n){if(Yn.arr(e))for(let s=0;s<e.length;s++)t.call(n,e[s],`${s}`);else for(let s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s)}var Jn=e=>Yn.und(e)?[]:Yn.arr(e)?e:[e];function $n(e,t){if(e.size){let n=Array.from(e);e.clear(),Xn(n,t)}}var es,ts,ns=(e,...t)=>$n(e,(e=>e(...t))),ss=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),is=null,rs=!1,as=Zn,os=e=>{e.to&&(ts=e.to),e.now&&(kn.now=e.now),void 0!==e.colors&&(is=e.colors),null!=e.skipAnimation&&(rs=e.skipAnimation),e.createStringInterpolator&&(es=e.createStringInterpolator),e.requestAnimationFrame&&kn.use(e.requestAnimationFrame),e.batchedUpdates&&(kn.batchedUpdates=e.batchedUpdates),e.willAdvance&&(as=e.willAdvance),e.frameLoop&&(kn.frameLoop=e.frameLoop)},ls=new Set,cs=[],us=[],ds=0,hs={get idle(){return!ls.size&&!cs.length},start(e){ds>e.priority?(ls.add(e),kn.onStart(ps)):(fs(e),kn(gs))},advance:gs,sort(e){if(ds)kn.onFrame((()=>hs.sort(e)));else{let t=cs.indexOf(e);~t&&(cs.splice(t,1),ms(e))}},clear(){cs=[],ls.clear()}};function ps(){ls.forEach(fs),ls.clear(),kn(gs)}function fs(e){cs.includes(e)||ms(e)}function ms(e){cs.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(cs,(t=>t.priority>e.priority)),0,e)}function gs(e){let t=us;for(let n=0;n<cs.length;n++){let s=cs[n];ds=s.priority,s.idle||(as(s),s.advance(e),s.idle||t.push(s))}return ds=0,(us=cs).length=0,(cs=t).length>0}var vs="[-+]?\\d*\\.?\\d+",ys=vs+"%";function xs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var bs=new RegExp("rgb"+xs(vs,vs,vs)),ws=new RegExp("rgba"+xs(vs,vs,vs,vs)),_s=new RegExp("hsl"+xs(vs,ys,ys)),js=new RegExp("hsla"+xs(vs,ys,ys,vs)),Ss=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ks=/^#([0-9a-fA-F]{6})$/,Es=/^#([0-9a-fA-F]{8})$/;function Ps(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Is(e,t,n){let s=n<.5?n*(1+t):n+t-n*t,i=2*n-s,r=Ps(i,s,e+1/3),a=Ps(i,s,e),o=Ps(i,s,e-1/3);return Math.round(255*r)<<24|Math.round(255*a)<<16|Math.round(255*o)<<8}function Vs(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ts(e){return(parseFloat(e)%360+360)%360/360}function Os(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function As(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ns(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ks.exec(e))?parseInt(t[1]+"ff",16)>>>0:is&&void 0!==is[e]?is[e]:(t=bs.exec(e))?(Vs(t[1])<<24|Vs(t[2])<<16|Vs(t[3])<<8|255)>>>0:(t=ws.exec(e))?(Vs(t[1])<<24|Vs(t[2])<<16|Vs(t[3])<<8|Os(t[4]))>>>0:(t=Ss.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Es.exec(e))?parseInt(t[1],16)>>>0:(t=Cs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_s.exec(e))?(255|Is(Ts(t[1]),As(t[2]),As(t[3])))>>>0:(t=js.exec(e))?(Is(Ts(t[1]),As(t[2]),As(t[3]))|Os(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var Fs=(e,t,n)=>{if(Yn.fun(e))return e;if(Yn.arr(e))return Fs({range:e,output:t,extrapolate:n});if(Yn.str(e.output[0]))return es(e);let s=e,i=s.output,r=s.range||[0,1],a=s.extrapolateLeft||s.extrapolate||"extend",o=s.extrapolateRight||s.extrapolate||"extend",l=s.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,r);return function(e,t,n,s,i,r,a,o,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===o)return c;"clamp"===o&&(c=n)}return s===i?s:t===n?e<=t?s:i:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=r(c),s===-1/0?c=-c:i===1/0?c+=s:c=c*(i-s)+s,c)}(e,r[t],r[t+1],i[t],i[t+1],l,a,o,s.map)}};var Ms=1.70158,Bs=1.525*Ms,Ds=Ms+1,Rs=2*Math.PI/3,Ls=2*Math.PI/4.5,zs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ds*e*e*e-Ms*e*e,easeOutBack:e=>1+Ds*Math.pow(e-1,3)+Ms*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Bs+1)*e-Bs)/2:(Math.pow(2*e-2,2)*((Bs+1)*(2*e-2)+Bs)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Rs),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Rs)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ls)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ls)/2+1,easeInBounce:e=>1-zs(1-e),easeOutBounce:zs,easeInOutBounce:e=>e<.5?(1-zs(1-2*e))/2:(1+zs(2*e-1))/2,steps:(e,t="end")=>n=>{let s=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(s):Math.ceil(s))/e)}},Gs=Symbol.for("FluidValue.get"),Ws=Symbol.for("FluidValue.observers"),Us=e=>Boolean(e&&e[Gs]),qs=e=>e&&e[Gs]?e[Gs]():e,Zs=e=>e[Ws]||null;function Ys(e,t){let n=e[Ws];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Ks=class{[Gs];[Ws];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Xs(this,e)}},Xs=(e,t)=>ei(e,Gs,t);function Qs(e,t){if(e[Gs]){let n=e[Ws];n||ei(e,Ws,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Js(e,t){let n=e[Ws];if(n&&n.has(t)){let s=n.size-1;s?n.delete(t):e[Ws]=null,e.observerRemoved&&e.observerRemoved(s,t)}}var $s,ei=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ti=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ni=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,si=new RegExp(`(${ti.source})(%|[a-z]+)`,"i"),ii=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ri=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ai=e=>{let[t,n]=oi(e);if(!t||ss())return e;let s=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(s)return s.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&ri.test(n)?ai(n):n||e},oi=e=>{let t=ri.exec(e);if(!t)return[,];let[,n,s]=t;return[n,s]},li=(e,t,n,s,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,ci=e=>{$s||($s=is?new RegExp(`(${Object.keys(is).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>qs(e).replace(ri,ai).replace(ni,Ns).replace($s,Ns))),n=t.map((e=>e.match(ti).map(Number))),s=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Fs({...e,output:t})));return e=>{let n=!si.test(t[0])&&t.find((e=>si.test(e)))?.replace(ti,""),i=0;return t[0].replace(ti,(()=>`${s[i++](e)}${n||""}`)).replace(ii,li)}},ui="react-spring: ",di=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${ui}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},hi=di(console.warn);di(console.warn);function pi(e){return Yn.str(e)&&("#"==e[0]||/\d/.test(e)||!ss()&&ri.test(e)||e in(is||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var fi=ss()?Gn.useEffect:Gn.useLayoutEffect;function mi(){let e=(0,Gn.useState)()[1],t=(()=>{let e=(0,Gn.useRef)(!1);return fi((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var gi=[];var vi=Symbol.for("Animated:node"),yi=e=>e&&e[vi],xi=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,vi,t),bi=e=>e&&e[vi]&&e[vi].getPayload(),wi=class{payload;constructor(){xi(this,this)}getPayload(){return this.payload||[]}},_i=class extends wi{constructor(e){super(),this._value=e,Yn.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new _i(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Yn.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Yn.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ji=class extends _i{_string=null;_toString;constructor(e){super(0),this._toString=Fs({output:[e,e]})}static create(e){return new ji(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Yn.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Fs({output:[this.getValue(),e]})),this._value=0,super.reset()}},Si={dependencies:null},Ci=class extends wi{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Qn(this.source,((n,s)=>{(e=>!!e&&e[vi]===e)(n)?t[s]=n.getValue(e):Us(n)?t[s]=qs(n):e||(t[s]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Xn(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Qn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Si.dependencies&&Us(e)&&Si.dependencies.add(e);let t=bi(e);t&&Xn(t,(e=>this.add(e)))}},ki=class extends Ci{constructor(e){super(e)}static create(e){return new ki(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Ei)),!0)}};function Ei(e){return(pi(e)?ji:_i).create(e)}function Pi(e){let t=yi(e);return t?t.constructor:Yn.arr(e)?ki:pi(e)?ji:_i}var Ii=(e,t)=>{let n=!Yn.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Gn.forwardRef)(((s,i)=>{let r=(0,Gn.useRef)(null),a=n&&(0,Gn.useCallback)((e=>{r.current=function(e,t){return e&&(Yn.fun(e)?e(t):e.current=t),t}(i,e)}),[i]),[o,l]=function(e,t){let n=new Set;return Si.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ci(e),Si.dependencies=null,[e,n]}(s,t),c=mi(),u=()=>{let e=r.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,o.getValue(!0)))&&c()},d=new Vi(u,l),h=(0,Gn.useRef)();fi((()=>(h.current=d,Xn(l,(e=>Qs(e,d))),()=>{h.current&&(Xn(h.current.deps,(e=>Js(e,h.current))),kn.cancel(h.current.update))}))),(0,Gn.useEffect)(u,[]),(e=>{(0,Gn.useEffect)(e,gi)})((()=>()=>{let e=h.current;Xn(e.deps,(t=>Js(t,e)))}));let p=t.getComponentProps(o.getValue());return Gn.createElement(e,{...p,ref:a})}))},Vi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&kn.write(this.update)}};var Ti=Symbol.for("AnimatedComponent"),Oi=e=>Yn.str(e)?e:e&&Yn.str(e.displayName)?e.displayName:Yn.fun(e)&&e.name||null;function Ai(e,...t){return Yn.fun(e)?e(...t):e}var Ni=(e,t)=>!0===e||!!(t&&e&&(Yn.fun(e)?e(t):Jn(e).includes(t))),Fi=(e,t)=>Yn.obj(e)?t&&e[t]:e,Mi=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Bi=e=>e,Di=(e,t=Bi)=>{let n=Ri;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let s={};for(let i of n){let n=t(e[i],i);Yn.und(n)||(s[i]=n)}return s},Ri=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Li={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function zi(e){let t=function(e){let t={},n=0;if(Qn(e,((e,s)=>{Li[s]||(t[s]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Qn(e,((e,s)=>s in t||(n[s]=e))),n}return{...e}}function Hi(e){return e=qs(e),Yn.arr(e)?e.map(Hi):pi(e)?qn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Gi(e){return Yn.fun(e)||Yn.arr(e)&&Yn.obj(e[0])}var Wi={tension:170,friction:26,mass:1,damping:1,easing:Hs.linear,clamp:!1},Ui=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Wi)}};function qi(e,t){if(Yn.und(t.decay)){let n=!Yn.und(t.tension)||!Yn.und(t.friction);(n||!Yn.und(t.frequency)||!Yn.und(t.damping)||!Yn.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Zi=[],Yi=class{changed=!1;values=Zi;toValues=null;fromValues=Zi;to;from;config=new Ui;immediate=!1};function Ki(e,{key:t,props:n,defaultProps:s,state:i,actions:r}){return new Promise(((a,o)=>{let l,c,u=Ni(n.cancel??s?.cancel,t);if(u)p();else{Yn.und(n.pause)||(i.paused=Ni(n.pause,t));let e=s?.pause;!0!==e&&(e=i.paused||Ni(e,t)),l=Ai(n.delay||0,t),e?(i.resumeQueue.add(h),r.pause()):(r.resume(),h())}function d(){i.resumeQueue.add(h),i.timeouts.delete(c),c.cancel(),l=c.time-kn.now()}function h(){l>0&&!qn.skipAnimation?(i.delayed=!0,c=kn.setTimeout(p,l),i.pauseQueue.add(d),i.timeouts.add(c)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{r.start({...n,callId:e,cancel:u},a)}catch(e){o(e)}}}))}var Xi=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?$i(e.get()):t.every((e=>e.noop))?Qi(e.get()):Ji(e.get(),t.every((e=>e.finished))),Qi=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ji=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),$i=e=>({value:e,cancelled:!0,finished:!1});function er(e,t,n,s){let{callId:i,parentId:r,onRest:a}=t,{asyncTo:o,promise:l}=n;return r||e!==o||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let c,u,d,h=Di(t,((e,t)=>"onRest"===t?void 0:e)),p=new Promise(((e,t)=>(c=e,u=t))),f=e=>{let t=i<=(n.cancelId||0)&&$i(s)||i!==n.asyncId&&Ji(s,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let r=new nr,a=new sr;return(async()=>{if(qn.skipAnimation)throw tr(n),a.result=Ji(s,!1),u(a),a;f(r);let o=Yn.obj(e)?{...e}:{...t,to:e};o.parentId=i,Qn(h,((e,t)=>{Yn.und(o[t])&&(o[t]=e)}));let l=await s.start(o);return f(r),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};if(qn.skipAnimation)return tr(n),Ji(s,!1);try{let t;t=Yn.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,s.stop.bind(s))),await Promise.all([t.then(c),p]),d=Ji(s.get(),!0,!1)}catch(e){if(e instanceof nr)d=e.result;else{if(!(e instanceof sr))throw e;d=e.result}}finally{i==n.asyncId&&(n.asyncId=r,n.asyncTo=r?o:void 0,n.promise=r?l:void 0)}return Yn.fun(a)&&kn.batchedUpdates((()=>{a(d,s,s.item)})),d})():l}function tr(e,t){$n(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var nr=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},sr=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ir=e=>e instanceof ar,rr=1,ar=class extends Ks{id=rr++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yi(this);return e&&e.getValue()}to(...e){return qn.to(this,e)}interpolate(...e){return hi(`${ui}The "interpolate" function is deprecated in v9 (use "to" instead)`),qn.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ys(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||hs.sort(this),Ys(this,{type:"priority",parent:this,priority:e})}},or=Symbol.for("SpringPhase"),lr=e=>(1&e[or])>0,cr=e=>(2&e[or])>0,ur=e=>(4&e[or])>0,dr=(e,t)=>t?e[or]|=3:e[or]&=-3,hr=(e,t)=>t?e[or]|=4:e[or]&=-5,pr=class extends ar{key;animation=new Yi;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Yn.und(e)||!Yn.und(t)){let n=Yn.obj(e)?{...e}:{...t,from:e};Yn.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(cr(this)||this._state.asyncTo)||ur(this)}get goal(){return qs(this.animation.to)}get velocity(){let e=yi(this);return e instanceof _i?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return lr(this)}get isAnimating(){return cr(this)}get isPaused(){return ur(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,s=this.animation,{config:i,toValues:r}=s,a=bi(s.to);!a&&Us(s.to)&&(r=Jn(qs(s.to))),s.values.forEach(((o,l)=>{if(o.done)return;let c=o.constructor==ji?1:a?a[l].lastPosition:r[l],u=s.immediate,d=c;if(!u){if(d=o.lastPosition,i.tension<=0)return void(o.done=!0);let t,n=o.elapsedTime+=e,r=s.fromValues[l],a=null!=o.v0?o.v0:o.v0=Yn.arr(i.velocity)?i.velocity[l]:i.velocity,h=i.precision||(r==c?.005:Math.min(1,.001*Math.abs(c-r)));if(Yn.und(i.duration))if(i.decay){let e=!0===i.decay?.998:i.decay,s=Math.exp(-(1-e)*n);d=r+a/(1-e)*(1-s),u=Math.abs(o.lastPosition-d)<=h,t=a*s}else{t=null==o.lastVelocity?a:o.lastVelocity;let n,s=i.restVelocity||h/10,l=i.clamp?0:i.bounce,p=!Yn.und(l),f=r==c?o.v0>0:r<c,m=!1,g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(n=Math.abs(t)>s,n||(u=Math.abs(c-d)<=h,!u));++e){p&&(m=d==c||d>c==f,m&&(t=-t*l,d=c)),t+=(1e-6*-i.tension*(d-c)+.001*-i.friction*t)/i.mass*g,d+=t*g}}else{let s=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,o.durationProgress>0&&(o.elapsedTime=i.duration*o.durationProgress,n=o.elapsedTime+=e)),s=(i.progress||0)+n/this._memoizedDuration,s=s>1?1:s<0?0:s,o.durationProgress=s),d=r+i.easing(s)*(c-r),t=(d-o.lastPosition)/e,u=1==s}o.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?o.done=!0:t=!1,o.setValue(d,i.round)&&(n=!0)}));let o=yi(this),l=o.getValue();if(t){let e=qs(s.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return kn.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cr(this)){let{to:e,config:t}=this.animation;kn.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Yn.und(e)?(n=this.queue||[],this.queue=[]):n=[Yn.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Xi(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),tr(this._state,e&&this._lastCallId),kn.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:s}=e;n=Yn.obj(n)?n[t]:n,(null==n||Gi(n))&&(n=void 0),s=Yn.obj(s)?s[t]:s,null==s&&(s=void 0);let i={to:n,from:s};return lr(this)||(e.reverse&&([n,s]=[s,n]),s=qs(s),Yn.und(s)?yi(this)||this._set(n):this._set(s)),i}_update({...e},t){let{key:n,defaultProps:s}=this;e.default&&Object.assign(s,Di(e,((e,t)=>/^on/.test(t)?Fi(e,n):e))),xr(this,e,"onProps"),br(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let r=this._state;return Ki(++this._lastCallId,{key:n,props:e,defaultProps:s,state:r,actions:{pause:()=>{ur(this)||(hr(this,!0),ns(r.pauseQueue),br(this,"onPause",Ji(this,fr(this,this.animation.to)),this))},resume:()=>{ur(this)&&(hr(this,!1),cr(this)&&this._resume(),ns(r.resumeQueue),br(this,"onResume",Ji(this,fr(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=mr(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n($i(this));let s=!Yn.und(e.to),i=!Yn.und(e.from);if(s||i){if(!(t.callId>this._lastToId))return n($i(this));this._lastToId=t.callId}let{key:r,defaultProps:a,animation:o}=this,{to:l,from:c}=o,{to:u=l,from:d=c}=e;i&&!s&&(!t.default||Yn.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let h=!Kn(d,c);h&&(o.from=d),d=qs(d);let p=!Kn(u,l);p&&this._focus(u);let f=Gi(t.to),{config:m}=o,{decay:g,velocity:v}=m;(s||i)&&(m.velocity=0),t.config&&!f&&function(e,t,n){n&&(qi(n={...n},t),t={...n,...t}),qi(e,t),Object.assign(e,t);for(let t in Wi)null==e[t]&&(e[t]=Wi[t]);let{mass:s,frequency:i,damping:r}=e;Yn.und(i)||(i<.01&&(i=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/i,2)*s,e.friction=4*Math.PI*r*s/i)}(m,Ai(t.config,r),t.config!==a.config?Ai(a.config,r):void 0);let y=yi(this);if(!y||Yn.und(u))return n(Ji(this,!0));let x=Yn.und(t.reset)?i&&!t.default:!Yn.und(d)&&Ni(t.reset,r),b=x?d:this.get(),w=Hi(u),_=Yn.num(w)||Yn.arr(w)||pi(w),j=!f&&(!_||Ni(a.immediate||t.immediate,r));if(p){let e=Pi(u);if(e!==y.constructor){if(!j)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(w)}}let S=y.constructor,C=Us(u),k=!1;if(!C){let e=x||!lr(this)&&h;(p||e)&&(k=Kn(Hi(b),w),C=!k),(!Kn(o.immediate,j)&&!j||!Kn(m.decay,g)||!Kn(m.velocity,v))&&(C=!0)}if(k&&cr(this)&&(o.changed&&!x?C=!0:C||this._stop(l)),!f&&((C||Us(l))&&(o.values=y.getPayload(),o.toValues=Us(u)?null:S==ji?[1]:Jn(w)),o.immediate!=j&&(o.immediate=j,!j&&!x&&this._set(l)),C)){let{onRest:e}=o;Xn(yr,(e=>xr(this,t,e)));let s=Ji(this,fr(this,l));ns(this._pendingCalls,s),this._pendingCalls.add(n),o.changed&&kn.batchedUpdates((()=>{o.changed=!x,e?.(s,this),x?Ai(a.onRest,s):o.onStart?.(s,this)}))}x&&this._set(b),f?n(er(t.to,t,this._state,this)):C?this._start():cr(this)&&!p?this._pendingCalls.add(n):n(Qi(b))}_focus(e){let t=this.animation;e!==t.to&&(Zs(this)&&this._detach(),t.to=e,Zs(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Us(t)&&(Qs(t,this),ir(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Us(e)&&Js(e,this)}_set(e,t=!0){let n=qs(e);if(!Yn.und(n)){let e=yi(this);if(!e||!Kn(n,e.getValue())){let s=Pi(n);e&&e.constructor==s?e.setValue(n):xi(this,s.create(n)),e&&kn.batchedUpdates((()=>{this._onChange(n,t)}))}}return yi(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,br(this,"onStart",Ji(this,fr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ai(this.animation.onChange,e,this)),Ai(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yi(this).reset(qs(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),cr(this)||(dr(this,!0),ur(this)||this._resume())}_resume(){qn.skipAnimation?this.finish():hs.start(this)}_stop(e,t){if(cr(this)){dr(this,!1);let n=this.animation;Xn(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ys(this,{type:"idle",parent:this});let s=t?$i(this.get()):Ji(this.get(),fr(this,e??n.to));ns(this._pendingCalls,s),n.changed&&(n.changed=!1,br(this,"onRest",s,this))}}};function fr(e,t){let n=Hi(t);return Kn(Hi(e.get()),n)}function mr(e,t=e.loop,n=e.to){let s=Ai(t);if(s){let i=!0!==s&&zi(s),r=(i||e).reverse,a=!i||i.reset;return gr({...e,loop:t,default:!1,pause:void 0,to:!r||Gi(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function gr(e){let{to:t,from:n}=e=zi(e),s=new Set;return Yn.obj(t)&&vr(t,s),Yn.obj(n)&&vr(n,s),e.keys=s.size?Array.from(s):null,e}function vr(e,t){Qn(e,((e,n)=>null!=e&&t.add(n)))}var yr=["onStart","onRest","onChange","onPause","onResume"];function xr(e,t,n){e.animation[n]=t[n]!==Mi(t,n)?Fi(t[n],e.key):void 0}function br(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var wr=["onStart","onChange","onRest"],_r=1,jr=class{id=_r++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Yn.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(gr(e)),this}start(e){let{queue:t}=this;return e?t=Jn(e).map(gr):this.queue=[],this._flush?this._flush(this,t):(Pr(this,t),Sr(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Xn(Jn(t),(t=>n[t].stop(!!e)))}else tr(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Yn.und(e))this.start({pause:!0});else{let t=this.springs;Xn(Jn(e),(e=>t[e].pause()))}return this}resume(e){if(Yn.und(e))this.start({pause:!1});else{let t=this.springs;Xn(Jn(e),(e=>t[e].resume()))}return this}each(e){Qn(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,s=this._active.size>0,i=this._changed.size>0;(s&&!this._started||i&&!this._started)&&(this._started=!0,$n(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let r=!s&&this._started,a=i||r&&n.size?this.get():null;i&&t.size&&$n(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),r&&(this._started=!1,$n(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}kn.onFrame(this._onFrame)}};function Sr(e,t){return Promise.all(t.map((t=>Cr(e,t)))).then((t=>Xi(e,t)))}async function Cr(e,t,n){let{keys:s,to:i,from:r,loop:a,onRest:o,onResolve:l}=t,c=Yn.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===r&&(t.from=null);let u=Yn.arr(i)||Yn.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Xn(wr,(n=>{let s=t[n];if(Yn.fun(s)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(s);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(s,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,ns(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let h=(s||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Mi(t,"cancel");(u||p&&d.asyncId)&&h.push(Ki(++e._lastAsyncId,{props:t,state:d,actions:{pause:Zn,resume:Zn,start(t,n){p?(tr(d,e._lastAsyncId),n($i(e))):(t.onRest=o,n(er(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let f=Xi(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){let n=mr(t,a,i);if(n)return Pr(e,[n]),Cr(e,n,!0)}return l&&kn.batchedUpdates((()=>l(f,e,e.item))),f}function kr(e,t){let n=new pr;return n.key=e,t&&Qs(n,t),n}function Er(e,t,n){t.keys&&Xn(t.keys,(s=>{(e[s]||(e[s]=n(s)))._prepareNode(t)}))}function Pr(e,t){Xn(t,(t=>{Er(e.springs,t,(t=>kr(t,e)))}))}var Ir=({children:e,...t})=>{let n=(0,Gn.useContext)(Vr),s=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Gn.useState)((()=>({inputs:t,result:e()}))),s=(0,Gn.useRef)(),i=s.current,r=i;return r?Boolean(t&&r.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,r.inputs))||(r={inputs:t,result:e()}):r=n,(0,Gn.useEffect)((()=>{s.current=r,i==n&&(n.inputs=n.result=void 0)}),[r]),r.result}((()=>({pause:s,immediate:i})),[s,i]);let{Provider:r}=Vr;return Gn.createElement(r,{value:t},e)},Vr=function(e,t){return Object.assign(e,Gn.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Ir,{});Ir.Provider=Vr.Provider,Ir.Consumer=Vr.Consumer;var Tr=class extends ar{constructor(e,t){super(),this.source=e,this.calc=Fs(...t);let n=this._get(),s=Pi(n);xi(this,s.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Kn(t,this.get())||(yi(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ar(this._active)&&Nr(this)}_get(){let e=Yn.arr(this.source)?this.source.map(qs):Jn(qs(this.source));return this.calc(...e)}_start(){this.idle&&!Ar(this._active)&&(this.idle=!1,Xn(bi(this),(e=>{e.done=!1})),qn.skipAnimation?(kn.batchedUpdates((()=>this.advance())),Nr(this)):hs.start(this))}_attach(){let e=1;Xn(Jn(this.source),(t=>{Us(t)&&Qs(t,this),ir(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Xn(Jn(this.source),(e=>{Us(e)&&Js(e,this)})),this._active.clear(),Nr(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Jn(this.source).reduce(((e,t)=>Math.max(e,(ir(t)?t.priority:0)+1)),0))}};function Or(e){return!1!==e.idle}function Ar(e){return!e.size||Array.from(e).every(Or)}function Nr(e){e.idle||(e.idle=!0,Xn(bi(e),(e=>{e.done=!0})),Ys(e,{type:"idle",parent:e}))}qn.assign({createStringInterpolator:ci,to:(e,t)=>new Tr(e,t)});hs.advance;const Fr=window.ReactDOM;var Mr=/^--/;function Br(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Mr.test(e)||Rr.hasOwnProperty(e)&&Rr[e]?(""+t).trim():t+"px"}var Dr={};var Rr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lr=["Webkit","Ms","Moz","O"];Rr=Object.keys(Rr).reduce(((e,t)=>(Lr.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Rr);var zr=/^(matrix|translate|scale|rotate|skew)/,Hr=/^(translate)/,Gr=/^(rotate|skew)/,Wr=(e,t)=>Yn.num(e)&&0!==e?e+t:e,Ur=(e,t)=>Yn.arr(e)?e.every((e=>Ur(e,t))):Yn.num(e)?e===t:parseFloat(e)===t,qr=class extends Ci{constructor({x:e,y:t,z:n,...s}){let i=[],r=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),r.push((e=>[`translate3d(${e.map((e=>Wr(e,"px"))).join(",")})`,Ur(e,0)]))),Qn(s,((e,t)=>{if("transform"===t)i.push([e||""]),r.push((e=>[e,""===e]));else if(zr.test(t)){if(delete s[t],Yn.und(e))return;let n=Hr.test(t)?"px":Gr.test(t)?"deg":"";i.push(Jn(e)),r.push("rotate3d"===t?([e,t,s,i])=>[`rotate3d(${e},${t},${s},${Wr(i,n)})`,Ur(i,0)]:e=>[`${t}(${e.map((e=>Wr(e,n))).join(",")})`,Ur(e,t.startsWith("scale")?1:0)])}})),i.length&&(s.transform=new Zr(i,r)),super(s)}},Zr=class extends Ks{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Xn(this.inputs,((n,s)=>{let i=qs(n[0]),[r,a]=this.transforms[s](Yn.arr(i)?i:n.map(qs));e+=" "+r,t=t&&a})),t?"none":e}observerAdded(e){1==e&&Xn(this.inputs,(e=>Xn(e,(e=>Us(e)&&Qs(e,this)))))}observerRemoved(e){0==e&&Xn(this.inputs,(e=>Xn(e,(e=>Us(e)&&Js(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ys(this,e)}};qn.assign({batchedUpdates:Fr.unstable_batchedUpdates,createStringInterpolator:ci,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Yr=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ci(e),getComponentProps:s=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:s},r=e=>{let t=Oi(e)||"Anonymous";return(e=Yn.str(e)?r[e]||(r[e]=Ii(e,i)):e[Ti]||(e[Ti]=Ii(e,i))).displayName=`Animated(${t})`,e};return Qn(e,((t,n)=>{Yn.arr(e)&&(n=Oi(t)),r[n]=r(t)})),{animated:r}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:s,children:i,scrollTop:r,scrollLeft:a,viewBox:o,...l}=t,c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:Dr[t]||(Dr[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(let t in s)if(s.hasOwnProperty(t)){let n=Br(t,s[t]);Mr.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==r&&(e.scrollTop=r),void 0!==a&&(e.scrollLeft=a),void 0!==o&&e.setAttribute("viewBox",o)},createAnimatedStyle:e=>new qr(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n});Yr.animated;var Kr=function({triggerAnimationOnChange:e}){const t=(0,h.useRef)(),{previous:n,prevRect:s}=(0,h.useMemo)((()=>{return{previous:t.current&&(e=t.current,{top:e.offsetTop,left:e.offsetLeft}),prevRect:t.current&&t.current.getBoundingClientRect()};var e}),[e]);return(0,h.useLayoutEffect)((()=>{if(!n||!t.current)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=new jr({x:0,y:0,width:s.width,height:s.height,config:{duration:400,easing:Hs.easeInOutQuint},onChange({value:e}){if(!t.current)return;let{x:n,y:s,width:i,height:r}=e;n=Math.round(n),s=Math.round(s),i=Math.round(i),r=Math.round(r);const a=0===n&&0===s;t.current.style.transformOrigin="center center",t.current.style.transform=a?null:`translate3d(${n}px,${s}px,0)`,t.current.style.width=a?null:`${i}px`,t.current.style.height=a?null:`${r}px`}});t.current.style.transform=void 0;const i=t.current.getBoundingClientRect(),r=Math.round(s.left-i.left),a=Math.round(s.top-i.top),o=i.width,l=i.height;return e.start({x:0,y:0,width:o,height:l,from:{x:r,y:a,width:s.width,height:s.height}}),()=>{e.stop(),e.set({x:0,y:0,width:s.width,height:s.height})}}),[n,s]),t},Xr=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});function Qr(){return!!(0,Qt.getQueryArg)(window.location.href,"wp_theme_preview")}function Jr(){return Qr()?(0,Qt.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useLocation:$r}=ne(Lt.privateApis);function ea({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,showReviewMessage:s,icon:i,size:r,__next40pxDefaultSize:o=!1}){const{params:l}=$r(),{setIsSaveViewOpened:u}=(0,c.useDispatch)(Rt),{saveDirtyEntities:d}=ne((0,c.useDispatch)(f.store)),{dirtyEntityRecords:h}=(0,f.useEntitiesSavedStatesIsDirty)(),{isSaving:p,isSaveViewOpen:m,previewingThemeName:g}=(0,c.useSelect)((e=>{const{isSavingEntityRecord:t,isResolving:n}=e(j.store),{isSaveViewOpened:s}=e(Rt),i=n("activateTheme"),r=Jr();return{isSaving:h.some((e=>t(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:r?e(j.store).getTheme(r)?.name?.rendered:void 0}}),[h]),v=!!h.length;let y;1===h.length&&(l.postId?y=`${h[0].key}`===l.postId&&h[0].name===l.postType:l.path?.includes("wp_global_styles")&&(y="globalStyles"===h[0].name));const x=p||!v&&!Qr(),_=Qr()?p?(0,w.sprintf)((0,w.__)("Activating %s"),g):x?(0,w.__)("Saved"):v?(0,w.sprintf)((0,w.__)("Activate %s & Save"),g):(0,w.sprintf)((0,w.__)("Activate %s"),g):p?(0,w.__)("Saving"):x?(0,w.__)("Saved"):!y&&s?(0,w.sprintf)((0,w._n)("Review %d change…","Review %d changes…",h.length),h.length):(0,w.__)("Save"),S=y?()=>d({dirtyEntityRecords:h}):()=>u(!0);return(0,a.jsx)(b.Button,{variant:t,className:e,"aria-disabled":x,"aria-expanded":m,isBusy:p,onClick:x?void 0:S,label:_,shortcut:x?void 0:Xt.displayShortcut.primary("s"),showTooltip:n,icon:i,__next40pxDefaultSize:o,size:r,children:_})}function ta(){const{isDisabled:e,isSaving:t}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(j.store),s=t(),i=s.some((e=>n(e.kind,e.name,e.key)));return{isSaving:i,isDisabled:i||!s.length&&!Qr()}}),[]);return(0,a.jsx)(b.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4,children:(0,a.jsx)(ea,{className:"edit-site-save-hub__button",variant:e?null:"primary",showTooltip:!1,icon:e&&!t?Xr:null,showReviewMessage:!0,__next40pxDefaultSize:!0})})}const{useHistory:na,useLocation:sa}=ne(Lt.privateApis);const ia=window.wp.apiFetch;var ra=i.n(ia);const{EntitiesSavedStatesExtensible:aa}=ne(f.privateApis),{useLocation:oa}=ne(Lt.privateApis),la=({onClose:e,renderDialog:t,variant:n})=>{const s=(0,f.useEntitiesSavedStatesIsDirty)();let i;i=s.isDirty?(0,w.__)("Activate & Save"):(0,w.__)("Activate");const r=function(){const[e,t]=(0,h.useState)();return(0,h.useEffect)((()=>{const e=(0,Qt.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});ra()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),o=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()),[]),l=(0,a.jsx)("p",{children:(0,w.sprintf)((0,w.__)("Saving your changes will change your active theme from %1$s to %2$s."),r?.name?.rendered??"...",o?.name?.rendered??"...")}),u=function(){const e=na(),{path:t}=sa(),{startResolution:n,finishResolution:s}=(0,c.useDispatch)(j.store);return async()=>{if(Qr()){const i="themes.php?action=activate&stylesheet="+Jr()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(i),s("activateTheme"),e.navigate((0,Qt.addQueryArgs)(t,{wp_theme_preview:""}))}}}();return(0,a.jsx)(aa,{...{...s,additionalPrompt:l,close:e,onSave:async e=>(await u(),e),saveEnabled:!0,saveLabel:i,renderDialog:t,variant:n}})},ca=({onClose:e,renderDialog:t,variant:n})=>Qr()?(0,a.jsx)(la,{onClose:e,renderDialog:t,variant:n}):(0,a.jsx)(f.EntitiesSavedStates,{close:e,renderDialog:t,variant:n});function ua(){const{query:e}=oa(),{canvas:t="view"}=e,{isSaveViewOpen:n,isDirty:s,isSaving:i}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:s}=e(j.store),i=t(),r=s("activateTheme"),{isSaveViewOpened:a}=ne(e(Rt));return{isSaveViewOpen:a(),isDirty:i.length>0,isSaving:i.some((e=>n(e.kind,e.name,e.key)))||r}}),[]),{setIsSaveViewOpened:r}=(0,c.useDispatch)(Rt),o=()=>r(!1);if((0,h.useEffect)((()=>{r(!1)}),[t,r]),"view"===t)return n?(0,a.jsx)(b.Modal,{className:"edit-site-save-panel__modal",onRequestClose:o,title:(0,w.__)("Review changes"),size:"small",children:(0,a.jsx)(ca,{onClose:o,variant:"inline"})}):null;const l=Qr()||s,u=i||!l;return(0,a.jsxs)(Wt,{className:Ht("edit-site-layout__actions",{"is-entity-save-view-open":n}),ariaLabel:(0,w.__)("Save panel"),children:[(0,a.jsx)("div",{className:Ht("edit-site-editor__toggle-save-panel",{"screen-reader-text":n}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>r(!0),"aria-haspopup":"dialog",disabled:u,accessibleWhenDisabled:!0,children:(0,w.__)("Open save panel")})}),n&&(0,a.jsx)(ca,{onClose:o,renderDialog:!0})]})}const{useGlobalStyle:da}=ne(x.privateApis),{GlobalStylesProvider:ha}=ne(f.privateApis),{useLocation:pa}=ne(Lt.privateApis),fa=.3;function ma(){const{query:e,name:t,areas:n,widths:s}=pa(),{canvas:i="view"}=e,r=(0,y.useViewportMatch)("medium","<"),o=(0,h.useRef)(),l=(0,b.__unstableUseNavigateRegions)(),u=(0,y.useReducedMotion)(),[d,p]=(0,y.useResizeObserver)(),g=Sn(),[v,x]=(0,h.useState)(!1),_=Kr({triggerAnimationOnChange:t+"-"+i}),{showIconLabels:j}=(0,c.useSelect)((e=>({showIconLabels:e(m.store).get("core","showIconLabels")}))),[S]=da("color.background"),[C]=da("color.gradient"),k=(0,y.usePrevious)(i);return(0,h.useEffect)((()=>{"edit"===k&&o.current?.focus()}),[i]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.UnsavedChangesWarning,{}),"view"===i&&(0,a.jsx)(_n,{}),(0,a.jsx)("div",{...l,ref:l.ref,className:Ht("edit-site-layout",l.className,{"is-full-canvas":"edit"===i,"show-icon-labels":j}),children:(0,a.jsxs)("div",{className:"edit-site-layout__content",children:[(!r||!n.mobile)&&(0,a.jsx)(Wt,{ariaLabel:(0,w.__)("Navigation"),className:"edit-site-layout__sidebar-region",children:(0,a.jsx)(b.__unstableAnimatePresence,{children:"view"===i&&(0,a.jsxs)(b.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:u||r?0:fa,ease:"easeOut"},className:"edit-site-layout__sidebar",children:[(0,a.jsx)(un,{ref:o,isTransparent:v}),(0,a.jsx)(rn,{children:(0,a.jsx)(an,{shouldAnimate:"styles"!==t,routeKey:t,children:(0,a.jsx)(f.ErrorBoundary,{children:n.sidebar})})}),(0,a.jsx)(ta,{}),(0,a.jsx)(ua,{})]})})}),(0,a.jsx)(f.EditorSnackbars,{}),r&&n.mobile&&(0,a.jsx)("div",{className:"edit-site-layout__mobile",children:(0,a.jsx)(rn,{children:"edit"!==i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(dn,{ref:o,isTransparent:v}),(0,a.jsx)(an,{routeKey:t,children:(0,a.jsx)(f.ErrorBoundary,{children:n.mobile})}),(0,a.jsx)(ta,{}),(0,a.jsx)(ua,{})]}):(0,a.jsx)(f.ErrorBoundary,{children:n.mobile})})}),!r&&n.content&&"edit"!==i&&(0,a.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:s?.content},children:(0,a.jsx)(f.ErrorBoundary,{children:n.content})}),!r&&n.edit&&"edit"!==i&&(0,a.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:s?.edit},children:(0,a.jsx)(f.ErrorBoundary,{children:n.edit})}),!r&&n.preview&&(0,a.jsxs)("div",{className:"edit-site-layout__canvas-container",children:[d,!!p.width&&(0,a.jsx)("div",{className:Ht("edit-site-layout__canvas",{"is-right-aligned":v}),ref:_,children:(0,a.jsx)(f.ErrorBoundary,{children:(0,a.jsx)(xn,{isReady:!g,isFullWidth:"edit"===i,defaultSize:{width:p.width-24,height:p.height},isOversized:v,setIsOversized:x,innerContentStyle:{background:C??S},children:n.preview})})})]})]})})]})}function ga(e){const{createErrorNotice:t}=(0,c.useDispatch)(_.store);return(0,a.jsx)(b.SlotFillProvider,{children:(0,a.jsxs)(ha,{children:[(0,a.jsx)(Ut.PluginArea,{onError:function(e){t((0,w.sprintf)((0,w.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,a.jsx)(ma,{...e})]})})}var va=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})}),ya=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})}),xa=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})}),ba=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});const{useGlobalStylesReset:wa}=ne(x.privateApis),{useHistory:_a,useLocation:ja}=ne(Lt.privateApis),Sa=()=>function(){const{openGeneralSidebar:e}=ne((0,c.useDispatch)(Rt)),{params:t}=ja(),{canvas:n="view"}=t,{set:s}=(0,c.useDispatch)(m.store),i=_a(),r=(0,c.useSelect)((e=>e(j.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>r?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,w.__)("Learn about styles"),callback:({close:t})=>{t(),"edit"!==n&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:va}]:[]),[i,e,n,r,s])}},Ca=()=>function(){const[e,t]=wa();return{isLoading:!1,commands:(0,h.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,w.__)("Reset styles"),icon:(0,w.isRTL)()?ya:xa,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}},ka=()=>function(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t}=ne((0,c.useDispatch)(Rt)),{params:n}=ja(),{canvas:s="view"}=n,i=_a(),r=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return!!i?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>r?[{name:"core/edit-site/open-styles-revisions",label:(0,w.__)("Open style revisions"),icon:ba,callback:({close:n})=>{n(),"edit"!==s&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[i,e,t,r,s])}};var Ea=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const{EditorContentSlotFill:Pa,ResizableEditor:Ia}=ne(f.privateApis);function Va(e){switch(e){case"style-book":return(0,w.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,w.__)("Style Revisions");default:return""}}function Ta(){const e=(0,b.__experimentalUseSlotFills)(Pa.name);return!!e?.length}var Oa=function({children:e,closeButtonLabel:t,onClose:n,enableResizing:s=!1}){const{editorCanvasContainerView:i,showListViewByDefault:r}=(0,c.useSelect)((e=>({editorCanvasContainerView:ne(e(Rt)).getEditorCanvasContainerView(),showListViewByDefault:e(m.store).get("core","showListViewByDefault")})),[]),[o,l]=(0,h.useState)(!1),{setEditorCanvasContainerView:u}=ne((0,c.useDispatch)(Rt)),{setIsListViewOpened:d}=(0,c.useDispatch)(f.store),p=(0,y.useFocusOnMount)("firstElement"),g=(0,y.useFocusReturn)();function v(){d(r),u(void 0),l(!0),"function"==typeof n&&n()}const x=Array.isArray(e)?h.Children.map(e,((e,t)=>0===t?(0,h.cloneElement)(e,{ref:g}):e)):(0,h.cloneElement)(e,{ref:g});if(o)return null;const _=Va(i),j=n||t;return(0,a.jsx)(Pa.Fill,{children:(0,a.jsx)("div",{className:"edit-site-editor-canvas-container",children:(0,a.jsx)(Ia,{enableResizing:s,children:(0,a.jsxs)("section",{className:"edit-site-editor-canvas-container__section",ref:j?p:null,onKeyDown:function(e){e.keyCode!==Xt.ESCAPE||e.defaultPrevented||(e.preventDefault(),v())},"aria-label":_,children:[j&&(0,a.jsx)(b.Button,{size:"compact",className:"edit-site-editor-canvas-container__close-button",icon:Ea,label:t||(0,w.__)("Close"),onClick:v}),x]})})})})};const{useCommandContext:Aa}=ne(Kt.privateApis),{useLocation:Na}=ne(Lt.privateApis);var Fa=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),Ma=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Ba=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,a.jsx)(Zt.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Da=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),Ra=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),La=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),za=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});function Ha(e){return(0,a.jsx)(b.Button,{size:"compact",...e,className:Ht("edit-site-sidebar-button",e.className)})}const{useHistory:Ga,useLocation:Wa}=ne(Lt.privateApis);function Ua({isRoot:e,title:t,actions:n,content:s,footer:i,description:r,backPath:o}){const{dashboardLink:l,dashboardLinkText:u,previewingThemeName:d}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),n=Jr();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(j.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=Wa(),f=Ga(),{navigate:m}=(0,h.useContext)(tn),g=o??p.state?.backPath,v=(0,w.isRTL)()?La:za;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalVStack,{className:Ht("edit-site-sidebar-navigation-screen__main",{"has-footer":!!i}),spacing:0,justify:"flex-start",children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:3,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon",children:[!e&&(0,a.jsx)(Ha,{onClick:()=>{f.navigate(g),m("back")},icon:v,label:(0,w.__)("Back"),showTooltip:!1}),e&&(0,a.jsx)(Ha,{icon:v,label:u||(0,w.__)("Go to the Dashboard"),href:l}),(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20,children:Qr()?(0,w.sprintf)((0,w.__)("Previewing %1$s: %2$s"),d,t):t}),n&&(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen__actions",children:n})]}),(0,a.jsxs)("div",{className:"edit-site-sidebar-navigation-screen__content",children:[r&&(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen__description",children:r}),s]})]}),i&&(0,a.jsx)("footer",{className:"edit-site-sidebar-navigation-screen__footer",children:i})]})}var qa=(0,h.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,h.cloneElement)(e,{width:t,height:t,...n,ref:s}))),Za=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ya=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});const{useHistory:Ka,useLink:Xa}=ne(Lt.privateApis);function Qa({className:e,icon:t,withChevron:n=!1,suffix:s,uid:i,to:r,onClick:o,children:l,...c}){const u=Ka(),{navigate:d}=(0,h.useContext)(tn);const p=Xa(r);return(0,a.jsx)(b.__experimentalItem,{className:Ht("edit-site-sidebar-navigation-item",{"with-suffix":!n&&s},e),id:i,onClick:function(e){o?(o(e),d("forward")):r&&(e.preventDefault(),u.navigate(r),d("forward",`[id="${i}"]`))},href:r?p.href:void 0,...c,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[t&&(0,a.jsx)(qa,{style:{fill:"currentcolor"},icon:t,size:24}),(0,a.jsx)(b.FlexBlock,{children:l}),n&&(0,a.jsx)(qa,{icon:(0,w.isRTL)()?Za:Ya,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&s]})})}const Ja={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},$a={per_page:100,page:1},eo=[],{GlobalStylesContext:to}=ne(x.privateApis);function no({query:e}={}){const{user:t}=(0,h.useContext)(to),n={...$a,...e},{authors:s,currentUser:i,isDirty:r,revisions:a,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getCurrentUser:s,getUsers:i,getRevisions:r,__experimentalGetCurrentGlobalStylesId:a,getEntityRecord:o,isResolving:l}=e(j.store),c=t(),u=s(),d=c.length>0,h=a(),p=h?o("root","globalStyles",h):void 0,f=p?._links?.["version-history"]?.[0]?.count??0,m=r("root","globalStyles",h,n)||eo;return{authors:i(Ja)||eo,currentUser:u,isDirty:d,revisions:m,isLoadingGlobalStylesRevisions:l("getRevisions",["root","globalStyles",h,n]),revisionsCount:f}}),[e]);return(0,h.useMemo)((()=>{if(!s.length||o)return{revisions:eo,hasUnsavedChanges:r,isLoading:!0,revisionsCount:l};const e=a.map((e=>({...e,author:s.find((t=>t.id===e.author))})));if(a.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),r&&t&&Object.keys(t).length>0&&i&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:i?.name,avatar_urls:i?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:r,isLoading:!1,revisionsCount:l}}),[r,a,i,s,t,o])}function so({record:e,revisionsCount:t,...n}){const s={},i=e?._links?.["predecessor-version"]?.[0]?.id??null;return t=t||e?._links?.["version-history"]?.[0]?.count||0,i&&t>1&&(s.href=(0,Qt.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),s.as="a"),(0,a.jsx)(b.__experimentalItemGroup,{size:"large",className:"edit-site-sidebar-navigation-screen-details-footer",children:(0,a.jsx)(Qa,{icon:ba,...s,...n,children:(0,w.sprintf)((0,w._n)("%d Revision","%d Revisions",t),t)})})}const{useLocation:io,useHistory:ro}=ne(Lt.privateApis);function ao(e){const{name:t}=io();return(0,a.jsx)(Qa,{...e,"aria-current":"styles"===t})}function oo(){const e=ro(),{path:t}=io(),{revisions:n,isLoading:s,revisionsCount:i}=no(),{openGeneralSidebar:r}=(0,c.useDispatch)(Rt),{setEditorCanvasContainerView:o}=ne((0,c.useDispatch)(Rt)),{set:l}=(0,c.useDispatch)(m.store),u=(0,h.useCallback)((async()=>(e.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),Promise.all([l("core","distractionFree",!1),r("edit-site/global-styles")]))),[t,e,r,l]),d=(0,h.useCallback)((async()=>{await u(),o("global-styles-revisions")}),[u,o]),p=!!i&&!s;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Ua,{title:(0,w.__)("Design"),isRoot:!0,description:(0,w.__)("Customize the appearance of your website using the block editor."),content:(0,a.jsx)(lo,{activeItem:"styles-navigation-item"}),footer:p&&(0,a.jsx)(so,{record:n?.[0],revisionsCount:i,onClick:d})})})}function lo({isBlockBasedTheme:e=!0}){return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-main",children:[e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ao,{to:"/styles",uid:"global-styles-navigation-item",icon:Fa,children:(0,w.__)("Styles")}),(0,a.jsx)(Qa,{uid:"navigation-navigation-item",to:"/navigation",withChevron:!0,icon:Ma,children:(0,w.__)("Navigation")}),(0,a.jsx)(Qa,{uid:"page-navigation-item",to:"/page",withChevron:!0,icon:Ba,children:(0,w.__)("Pages")}),(0,a.jsx)(Qa,{uid:"template-navigation-item",to:"/template",withChevron:!0,icon:Da,children:(0,w.__)("Templates")})]}),!e&&(0,a.jsx)(Qa,{uid:"stylebook-navigation-item",to:"/stylebook",withChevron:!0,icon:Fa,children:(0,w.__)("Styles")}),(0,a.jsx)(Qa,{uid:"patterns-navigation-item",to:"/pattern",withChevron:!0,icon:Ra,children:(0,w.__)("Patterns")})]})}function co({customDescription:e}){const t=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.is_block_theme),[]),{setEditorCanvasContainerView:n}=ne((0,c.useDispatch)(Rt));let s;return(0,h.useEffect)((()=>{n(void 0)}),[n]),s=e||(t?(0,w.__)("Customize the appearance of your website using the block editor."):(0,w.__)("Explore block styles and patterns to refine your site.")),(0,a.jsx)(Ua,{isRoot:!0,title:(0,w.__)("Design"),description:s,content:(0,a.jsx)(lo,{isBlockBasedTheme:t})})}function uo(){return(0,a.jsx)(b.__experimentalSpacer,{padding:3,children:(0,a.jsx)(b.Notice,{status:"warning",isDismissible:!1,children:(0,w.__)("The theme you are currently using does not support this screen.")})})}var ho=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});function po({nonAnimatedSrc:e,animatedSrc:t}){return(0,a.jsxs)("picture",{className:"edit-site-welcome-guide__image",children:[(0,a.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,a.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function fo(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,isBlockBasedTheme:n}=(0,c.useSelect)((e=>({isActive:!!e(m.store).get("core/edit-site","welcomeGuide"),isBlockBasedTheme:e(j.store).getCurrentTheme()?.is_block_theme})),[]);return t&&n?(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,w.__)("Welcome to the site editor"),finishButtonText:(0,w.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Edit your site")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Design everything on your site — from the header right down to the footer — using blocks.")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,h.createInterpolateElement)((0,w.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,a.jsx)("img",{alt:(0,w.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath 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' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})})]})}]}):null}const{interfaceStore:mo}=ne(f.privateApis);function go(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,isStylesOpen:n}=(0,c.useSelect)((e=>{const t=e(mo).getActiveComplementaryArea("core");return{isActive:!!e(m.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const s=(0,w.__)("Welcome to Styles");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:s,finishButtonText:(0,w.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Set the design")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Personalize blocks")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Learn more")}),(0,a.jsxs)("p",{className:"edit-site-welcome-guide__text",children:[(0,w.__)("New to block themes and styling your site?")," ",(0,a.jsx)(b.ExternalLink,{href:(0,w.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,w.__)("Here’s a detailed guide to learn how to make the most of it.")})]})]})}]})}function vo(){const{toggle:e}=(0,c.useDispatch)(m.store);if(!(0,c.useSelect)((e=>{const t=!!e(m.store).get("core/edit-site","welcomeGuidePage"),n=!!e(m.store).get("core/edit-site","welcomeGuide");return t&&!n}),[]))return null;const t=(0,w.__)("Editing a page");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:t,finishButtonText:(0,w.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,a.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,a.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:t}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")})]})}]})}function yo(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,hasPreviousEntity:n}=(0,c.useSelect)((e=>{const{getEditorSettings:t}=e(f.store),{get:n}=e(m.store);return{isActive:n("core/edit-site","welcomeGuideTemplate"),hasPreviousEntity:!!t().onNavigateToPreviousEntityRecord}}),[]);if(!(t&&n))return null;const s=(0,w.__)("Editing a template");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:s,finishButtonText:(0,w.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,a.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,a.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")})]})}]})}function xo({postType:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(fo,{}),(0,a.jsx)(go,{}),"page"===e&&(0,a.jsx)(vo,{}),"wp_template"===e&&(0,a.jsx)(yo,{})]})}const{useGlobalStylesOutput:bo}=ne(x.privateApis);function wo({disableRootPadding:e}){return function(e){const[t,n]=bo(e),{getSettings:s}=(0,c.useSelect)(Rt),{updateSettings:i}=(0,c.useDispatch)(Rt);(0,h.useEffect)((()=>{if(!t||!n)return;const e=s(),r=Object.values(e.styles??[]).filter((e=>!e.isGlobalStyles));i({...e,styles:[...r,...t],__experimentalFeatures:n})}),[t,n,i,s])}(e),null}const{Theme:_o}=ne(b.privateApis),{useGlobalStyle:jo}=ne(x.privateApis);function So({id:e}){const[t]=jo("color.text"),[n]=jo("color.background"),{highlightedColors:s}=re(),i=s[0]?.color??t,{elapsed:r,total:o}=(0,c.useSelect)((e=>{const t=e(j.store).countSelectorsByStatus(),n=t.resolving??0,s=t.finished??0;return{elapsed:s,total:s+n}}),[]);return(0,a.jsx)("div",{className:"edit-site-canvas-loader",children:(0,a.jsx)(_o,{accent:i,background:n,children:(0,a.jsx)(b.ProgressBar,{id:e,max:o,value:r})})})}const{useHistory:Co}=ne(Lt.privateApis);const{useLocation:ko,useHistory:Eo}=ne(Lt.privateApis);function Po(){const{query:e}=ko(),{canvas:t="view"}=e,n=function(){const e=Co();return(0,h.useCallback)((t=>{e.navigate(`/${t.postType}/${t.postId}?canvas=edit&focusMode=true`)}),[e])}(),{settings:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(Rt);return{settings:t()}}),[]),i=function(){const e=ko(),t=(0,y.usePrevious)(e),n=Eo();return(0,h.useMemo)((()=>{const s=e.query.focusMode||e?.params?.postId&&Ne.includes(e?.params?.postType),i="edit"===t?.query.canvas;return s&&i?()=>n.back():void 0}),[e,n])}();return(0,h.useMemo)((()=>({...s,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==t,onNavigateToEntityRecord:n,onNavigateToPreviousEntityRecord:i,isPreviewMode:"view"===t})),[s,t,n,i])}const{Fill:Io,Slot:Vo}=(0,b.createSlotFill)("PluginTemplateSettingPanel"),To=({children:e})=>{d()("wp.editSite.PluginTemplateSettingPanel",{since:"6.6",version:"6.8",alternative:"wp.editor.PluginDocumentSettingPanel"});return(0,c.useSelect)((e=>"wp_template"===e(f.store).getCurrentPostType()),[])?(0,a.jsx)(Io,{children:e}):null};To.Slot=Vo;var Oo=To,Ao=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),No=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});function Fo({className:e,...t}){return(0,a.jsx)(b.Icon,{className:Ht(e,"edit-site-global-styles-icon-with-current-color"),...t})}function Mo({icon:e,children:t,...n}){return(0,a.jsxs)(b.__experimentalItem,{...n,children:[e&&(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(Fo,{icon:e,size:24}),(0,a.jsx)(b.FlexItem,{children:t})]}),!e&&t]})}function Bo(e){return(0,a.jsx)(b.Navigator.Button,{as:Mo,...e})}var Do=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})}),Ro=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})}),Lo=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})}),zo=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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"})});const{useHasDimensionsPanel:Ho,useHasTypographyPanel:Go,useHasColorPanel:Wo,useGlobalSetting:Uo,useSettingsForBlockElement:qo,useHasBackgroundPanel:Zo}=ne(x.privateApis);var Yo=function(){const[e]=Uo(""),t=qo(e),n=Zo(e),s=Go(t),i=Wo(t),r=Ho(t);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(b.__experimentalItemGroup,{children:[s&&(0,a.jsx)(Bo,{icon:Do,path:"/typography",children:(0,w.__)("Typography")}),i&&(0,a.jsx)(Bo,{icon:Ro,path:"/colors",children:(0,w.__)("Colors")}),n&&(0,a.jsx)(Bo,{icon:Lo,path:"/background","aria-label":(0,w.__)("Background styles"),children:(0,w.__)("Background")}),(0,a.jsx)(Bo,{icon:zo,path:"/shadows",children:(0,w.__)("Shadows")}),r&&(0,a.jsx)(Bo,{icon:Da,path:"/layout",children:(0,w.__)("Layout")})]})})};function Ko(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,n=e.trim(),s=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return n.includes(",")?n.split(",").map(s).filter((e=>""!==e)).join(", "):s(n)}function Xo(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=t.split(",").find((e=>""!==e.trim())).trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Qo(e){const t={fontFamily:Ko(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const i=e.fontFace.filter((e=>e?.fontStyle&&"normal"===e.fontStyle.toLowerCase()));if(i.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),s=parseInt(n[1]);for(let n=e;n<=s;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(i),r=(n=400,0===(s=e).length?null:(s.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),s[0]));t.fontWeight=String(r)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n,s;return t}function Jo(e){return e?`is-style-${e}`:""}function $o(e,t){const n=new RegExp(`^${t}([\\d]+)$`);return e.reduce(((e,t)=>{if("string"==typeof t?.slug){const s=t?.slug.match(n);if(s){const t=parseInt(s[1],10);if(t>e)return t}}return e}),0)+1}function el(e,t){if(!Array.isArray(e)||!t)return null;const n=t.replace("var(","").replace(")",""),s=n?.split("--").slice(-1)[0];return e.find((e=>e.slug===s))}const{useGlobalStyle:tl,GlobalStylesContext:nl}=ne(x.privateApis),{mergeBaseAndUserConfigs:sl}=ne(f.privateApis);function il({fontSize:e,variation:t}){const{base:n}=(0,h.useContext)(nl);let s=n;t&&(s=sl(n,t));const[i]=tl("color.text"),[r,o]=function(e){const t=e?.settings?.typography?.fontFamilies?.theme,n=e?.settings?.typography?.fontFamilies?.custom;let s=[];t&&n?s=[...t,...n]:t?s=t:n&&(s=n);const i=e?.styles?.typography?.fontFamily,r=el(s,i),a=e?.styles?.elements?.heading?.typography?.fontFamily;let o;return o=a?el(s,e?.styles?.elements?.heading?.typography?.fontFamily):r,[r,o]}(s),l=r?Qo(r):{},c=o?Qo(o):{};return i&&(l.color=i,c.color=i),e&&(l.fontSize=e,c.fontSize=e),(0,a.jsxs)(b.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,a.jsx)("span",{style:c,children:(0,w._x)("A","Uppercase letter A")}),(0,a.jsx)("span",{style:l,children:(0,w._x)("a","Lowercase letter A")})]})}function rl({normalizedColorSwatchSize:e,ratio:t}){const{highlightedColors:n}=re(),s=e*t;return n.map((({slug:e,color:t},n)=>(0,a.jsx)(b.__unstableMotion.div,{style:{height:s,width:s,background:t,borderRadius:s/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}},`${e}-${n}`)))}const{useGlobalStyle:al}=ne(x.privateApis),ol={leading:!0,trailing:!0};function ll({children:e,label:t,isFocused:n,withHoverView:s}){const[i="white"]=al("color.background"),[r]=al("color.gradient"),o=(0,y.useReducedMotion)(),[l,c]=(0,h.useState)(!1),[u,{width:d}]=(0,y.useResizeObserver)(),[p,f]=(0,h.useState)(d),[m,g]=(0,h.useState)(),v=(0,y.useThrottle)(f,250,ol);(0,h.useLayoutEffect)((()=>{d&&v(d)}),[d,v]),(0,h.useLayoutEffect)((()=>{const e=p?p/248:1,t=e-(m||0);!(Math.abs(t)>.1)&&m||g(e)}),[p,m]);const x=m||(d?d/248:1),w=!!d;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{position:"relative"},children:u}),w&&(0,a.jsx)("div",{className:"edit-site-global-styles-preview__wrapper",style:{height:152*x},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,a.jsx)(b.__unstableMotion.div,{style:{height:152*x,width:"100%",background:r??i,cursor:s?"pointer":void 0},initial:"start",animate:(l||n)&&!o&&t?"hover":"start",children:[].concat(e).map(((e,t)=>e({ratio:x,key:t})))})})]})}const{useGlobalStyle:cl}=ne(x.privateApis),ul={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},dl={hover:{opacity:1},start:{opacity:.5}},hl={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};var pl=({label:e,isFocused:t,withHoverView:n,variation:s})=>{const[i]=cl("typography.fontWeight"),[r="serif"]=cl("typography.fontFamily"),[o=r]=cl("elements.h1.typography.fontFamily"),[l=i]=cl("elements.h1.typography.fontWeight"),[c="black"]=cl("color.text"),[u=c]=cl("elements.h1.color.text"),{paletteColors:d}=re();return(0,a.jsxs)(ll,{label:e,isFocused:t,withHoverView:n,children:[({ratio:e,key:t})=>(0,a.jsx)(b.__unstableMotion.div,{variants:ul,style:{height:"100%",overflow:"hidden"},children:(0,a.jsxs)(b.__experimentalHStack,{spacing:10*e,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,a.jsx)(il,{fontSize:65*e,variation:s}),(0,a.jsx)(b.__experimentalVStack,{spacing:4*e,children:(0,a.jsx)(rl,{normalizedColorSwatchSize:32,ratio:e})})]})},t),({key:e})=>(0,a.jsx)(b.__unstableMotion.div,{variants:n&&dl,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,a.jsx)(b.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map((({color:e},t)=>(0,a.jsx)("div",{style:{height:"100%",background:e,flexGrow:1}},t)))})},e),({ratio:t,key:n})=>(0,a.jsx)(b.__unstableMotion.div,{variants:hl,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,a.jsx)(b.__experimentalVStack,{spacing:3*t,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*t,boxSizing:"border-box"},children:e&&(0,a.jsx)("div",{style:{fontSize:40*t,fontFamily:o,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},n)]})};var fl=function(){const e=(0,c.useSelect)((e=>{const{__experimentalGetCurrentThemeGlobalStylesVariations:t}=e(j.store);return!!t()?.length}),[]);return(0,a.jsxs)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-root",isRounded:!1,children:[(0,a.jsx)(b.CardBody,{children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.Card,{className:"edit-site-global-styles-screen-root__active-style-tile",children:(0,a.jsx)(b.CardMedia,{className:"edit-site-global-styles-screen-root__active-style-tile-preview",children:(0,a.jsx)(pl,{})})}),e&&(0,a.jsx)(b.__experimentalItemGroup,{children:(0,a.jsx)(Bo,{path:"/variations",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Browse styles")}),(0,a.jsx)(Fo,{icon:(0,w.isRTL)()?za:La})]})})}),(0,a.jsx)(Yo,{})]})}),(0,a.jsx)(b.CardDivider,{}),(0,a.jsxs)(b.CardBody,{children:[(0,a.jsx)(b.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:2,children:(0,w.__)("Customize the appearance of specific blocks for the whole site.")}),(0,a.jsx)(b.__experimentalItemGroup,{children:(0,a.jsx)(Bo,{path:"/blocks",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Blocks")}),(0,a.jsx)(Fo,{icon:(0,w.isRTL)()?za:La})]})})})]})]})};const ml=window.wp.a11y,{useGlobalStyle:gl}=ne(x.privateApis);function vl(e){const t=(0,c.useSelect)((t=>{const{getBlockStyles:n}=t(o.store);return n(e)}),[e]),[n]=gl("variations",e);return function(e,t){return e?.filter((e=>"block"===e.source||t.includes(e.name)))}(t,Object.keys(n??{}))}function yl({name:e}){const t=vl(e);return(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(((t,n)=>t?.isDefault?null:(0,a.jsx)(Bo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),children:t.label},n)))})}var xl=function({title:e,description:t,onBack:n}){return(0,a.jsxs)(b.__experimentalVStack,{spacing:0,children:[(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",label:(0,w.__)("Back"),onClick:n}),(0,a.jsx)(b.__experimentalSpacer,{children:(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13,children:e})})]})})}),t&&(0,a.jsx)("p",{className:"edit-site-global-styles-header__description",children:t})]})};const{useHasDimensionsPanel:bl,useHasTypographyPanel:wl,useHasBorderPanel:_l,useGlobalSetting:jl,useSettingsForBlockElement:Sl,useHasColorPanel:Cl}=ne(x.privateApis);function kl(e){const[t]=jl("",e),n=Sl(t,e),s=wl(n),i=Cl(n),r=_l(n),a=bl(n),o=r||a,l=!!vl(e)?.length;return s||i||o||l}function El({block:e}){return kl(e.name)?(0,a.jsx)(Bo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(x.BlockIcon,{icon:e.icon}),(0,a.jsx)(b.FlexItem,{children:e.title})]})}):null}const Pl=(0,h.memo)((function({filterValue:e}){const t=function(){const e=(0,c.useSelect)((e=>e(o.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:s}=e;return(t.name.startsWith("core/")?n:s).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,y.useDebounce)(ml.speak,500),{isMatchingSearchTerm:s}=(0,c.useSelect)(o.store),i=e?t.filter((t=>s(t,e))):t,r=(0,h.useRef)();return(0,h.useEffect)((()=>{if(!e)return;const t=r.current.childElementCount,s=(0,w.sprintf)((0,w._n)("%d result found.","%d results found.",t),t);n(s,t)}),[e,n]),(0,a.jsx)("div",{ref:r,className:"edit-site-block-types-item-list",role:"list",children:0===i.length?(0,a.jsx)(b.__experimentalText,{align:"center",as:"p",children:(0,w.__)("No blocks found.")}):i.map((e=>(0,a.jsx)(El,{block:e},"menu-itemblock-"+e.name)))})}));var Il=function(){const[e,t]=(0,h.useState)(""),n=(0,h.useDeferredValue)(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Blocks"),description:(0,w.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,a.jsx)(b.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,w.__)("Search"),placeholder:(0,w.__)("Search")}),(0,a.jsx)(Pl,{filterValue:n})]})};var Vl=({name:e,variation:t=""})=>{const n=(0,o.getBlockType)(e)?.example,s=(0,h.useMemo)((()=>{if(!n)return null;const s={...n,attributes:{...n.attributes,style:void 0,className:t?Jo(t):n.attributes?.className}};return(0,o.getBlockFromExample)(e,s)}),[e,n,t]),i=n?.viewportWidth??500,r=144,l=235/i,c=0!==l&&l<1?r/l:r;return n?(0,a.jsx)(b.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,a.jsx)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:r,boxSizing:"initial"},children:(0,a.jsx)(x.BlockPreview,{blocks:s,viewportWidth:i,minHeight:r,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\tmin-height:${Math.round(c)}px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t`}]})})}):null};var Tl=function({children:e,level:t}){return(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:t??2,children:e})};const Ol={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Al(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:Nl,useHasTypographyPanel:Fl,useHasBorderPanel:Ml,useGlobalSetting:Bl,useSettingsForBlockElement:Dl,useHasColorPanel:Rl,useHasFiltersPanel:Ll,useHasImageSettingsPanel:zl,useGlobalStyle:Hl,useHasBackgroundPanel:Gl,BackgroundPanel:Wl,BorderPanel:Ul,ColorPanel:ql,TypographyPanel:Zl,DimensionsPanel:Yl,FiltersPanel:Kl,ImageSettingsPanel:Xl,AdvancedPanel:Ql}=ne(x.privateApis);var Jl=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const s=n.join("."),[i]=Hl(s,e,"user",{shouldDecodeEncode:!1}),[r,l]=Hl(s,e,"all",{shouldDecodeEncode:!1}),[u]=Bl("",e,"user"),[d,p]=Bl("",e),f=Dl(d,e),m=(0,o.getBlockType)(e);let g=!1;f?.spacing?.blockGap&&m?.supports?.spacing?.blockGap&&(!0===m?.supports?.spacing?.__experimentalSkipSerialization||m?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(g=!0);let v=!1;f?.dimensions?.aspectRatio&&"core/group"===e&&(v=!0);const y=(0,h.useMemo)((()=>{const e=structuredClone(f);return g&&(e.spacing.blockGap=!1),v&&(e.dimensions.aspectRatio=!1),e}),[f,g,v]),x=vl(e),_=Gl(y),S=Fl(y),C=Rl(y),k=Ml(y),E=Nl(y),P=Ll(y),I=zl(e,u,y),V=!!x?.length&&!t,{canEditCSS:T}=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),O=t?x.find((e=>e.name===t)):null,A=(0,h.useMemo)((()=>({...r,layout:y.layout})),[r,y.layout]),N=(0,h.useMemo)((()=>({...i,layout:u.layout})),[i,u.layout]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:t?O?.label:m.title}),(0,a.jsx)(Vl,{name:e,variation:t}),V&&(0,a.jsx)("div",{className:"edit-site-global-styles-screen-variations",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Tl,{children:(0,w.__)("Style Variations")}),(0,a.jsx)(yl,{name:e})]})}),C&&(0,a.jsx)(ql,{inheritedValue:r,value:i,onChange:l,settings:y}),_&&(0,a.jsx)(Wl,{inheritedValue:r,value:i,onChange:l,settings:y,defaultValues:Ol}),S&&(0,a.jsx)(Zl,{inheritedValue:r,value:i,onChange:l,settings:y}),E&&(0,a.jsx)(Yl,{inheritedValue:A,value:N,onChange:e=>{const t={...e};delete t.layout,l(t),e.layout!==u.layout&&p({...u,layout:e.layout})},settings:y,includeLayoutControls:!0}),k&&(0,a.jsx)(Ul,{inheritedValue:r,value:i,onChange:e=>{if(!e?.border)return void l(e);const{radius:t,...n}=e.border,s=function(e){return e?(0,b.__experimentalHasSplitBorders)(e)?{top:Al(e.top),right:Al(e.right),bottom:Al(e.bottom),left:Al(e.left)}:Al(e):e}(n),i=(0,b.__experimentalHasSplitBorders)(s)?{color:null,style:null,width:null,...s}:{top:s,right:s,bottom:s,left:s};l({...e,border:{...i,radius:t}})},settings:y}),P&&(0,a.jsx)(Kl,{inheritedValue:A,value:N,onChange:l,settings:y,includeLayoutControls:!0}),I&&(0,a.jsx)(Xl,{onChange:e=>{p(void 0===e?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...e}})},value:u,inheritedValue:y}),T&&(0,a.jsxs)(b.PanelBody,{title:(0,w.__)("Advanced"),initialOpen:!1,children:[(0,a.jsx)("p",{children:(0,w.sprintf)((0,w.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),m?.title)}),(0,a.jsx)(Ql,{value:i,onChange:l,inheritedValue:r})]})]})};const{useGlobalStyle:$l}=ne(x.privateApis);function ec({parentMenu:e,element:t,label:n}){const s="text"!==t&&t?`elements.${t}.`:"",i="link"===t?{textDecoration:"underline"}:{},[r]=$l(s+"typography.fontFamily"),[o]=$l(s+"typography.fontStyle"),[l]=$l(s+"typography.fontWeight"),[c]=$l(s+"color.background"),[u]=$l("color.background"),[d]=$l(s+"color.gradient"),[h]=$l(s+"color.text");return(0,a.jsx)(Bo,{path:e+"/typography/"+t,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:r??"serif",background:d??c??u,color:h,fontStyle:o,fontWeight:l,...i},"aria-hidden":"true",children:(0,w.__)("Aa")}),(0,a.jsx)(b.FlexItem,{children:n})]})})}var tc=function(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Elements")}),(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,a.jsx)(ec,{parentMenu:"",element:"text",label:(0,w.__)("Text")}),(0,a.jsx)(ec,{parentMenu:"",element:"link",label:(0,w.__)("Links")}),(0,a.jsx)(ec,{parentMenu:"",element:"heading",label:(0,w.__)("Headings")}),(0,a.jsx)(ec,{parentMenu:"",element:"caption",label:(0,w.__)("Captions")}),(0,a.jsx)(ec,{parentMenu:"",element:"button",label:(0,w.__)("Buttons")})]})]})};var nc=({variation:e,isFocused:t,withHoverView:n})=>(0,a.jsx)(ll,{label:e.title,isFocused:t,withHoverView:n,children:({ratio:t,key:n})=>(0,a.jsx)(b.__experimentalHStack,{spacing:10*t,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(il,{variation:e,fontSize:85*t})},n)});const sc=[],{GlobalStylesContext:ic,areGlobalStyleConfigsEqual:rc}=ne(x.privateApis),{mergeBaseAndUserConfigs:ac}=ne(f.privateApis);function oc(e,t){if(!t?.length)return e;if("object"!=typeof e||!e||!Object.keys(e).length)return e;for(const n in e)t.includes(n)?delete e[n]:"object"==typeof e[n]&&oc(e[n],t);return e}function lc({title:e,settings:t,styles:n}){return e===(0,w.__)("Default")||Object.keys(t).length>0||Object.keys(n).length>0}function cc(e=[]){const{variationsFromTheme:t}=(0,c.useSelect)((e=>({variationsFromTheme:e(j.store).__experimentalGetCurrentThemeGlobalStylesVariations()||sc})),[]),{user:n}=(0,h.useContext)(ic),s=e.toString();return(0,h.useMemo)((()=>{const s=oc(structuredClone(n),e);s.title=(0,w.__)("Default");const i=t.filter((t=>dc(t,e))).map((e=>ac(s,e))),r=[s,...i];return r?.length?r.filter(lc):[]}),[s,n,t])}const uc=(e,t)=>{if(!e||!t?.length)return{};const n={};return Object.keys(e).forEach((s=>{if(t.includes(s))n[s]=e[s];else if("object"==typeof e[s]){const i=uc(e[s],t);Object.keys(i).length&&(n[s]=i)}})),n};function dc(e,t){const n=uc(structuredClone(e),t);return rc(n,e)}const{mergeBaseAndUserConfigs:hc}=ne(f.privateApis),{GlobalStylesContext:pc,areGlobalStyleConfigsEqual:fc}=ne(x.privateApis);function mc({variation:e,children:t,isPill:n,properties:s,showTooltip:i}){const[r,o]=(0,h.useState)(!1),{base:l,user:c,setUserConfig:u}=(0,h.useContext)(pc),d=(0,h.useMemo)((()=>{let t=hc(l,e);return s&&(t=uc(t,s)),{user:e,base:l,merged:t,setUserConfig:()=>{}}}),[e,l,s]),p=()=>u(e),f=(0,h.useMemo)((()=>fc(c,e)),[c,e]);let m=e?.title;e?.description&&(m=(0,w.sprintf)((0,w._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));const g=(0,a.jsx)("div",{className:Ht("edit-site-global-styles-variations_item",{"is-active":f}),role:"button",onClick:p,onKeyDown:e=>{e.keyCode===Xt.ENTER&&(e.preventDefault(),p())},tabIndex:"0","aria-label":m,"aria-current":f,onFocus:()=>o(!0),onBlur:()=>o(!1),children:(0,a.jsx)("div",{className:Ht("edit-site-global-styles-variations_item-preview",{"is-pill":n}),children:t(r)})});return(0,a.jsx)(pc.Provider,{value:d,children:i?(0,a.jsx)(b.Tooltip,{text:e?.title,children:g}):g})}function gc({title:e,gap:t=2}){const n=["typography"],s=cc(n);return s?.length<=1?null:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[e&&(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsx)(b.__experimentalGrid,{columns:3,gap:t,className:"edit-site-global-styles-style-variations-container",children:s.map(((e,t)=>(0,a.jsx)(mc,{variation:e,properties:n,showTooltip:!0,children:()=>(0,a.jsx)(nc,{variation:e})},t)))})]})}var vc=function(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"space-between",children:(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Font Sizes")})}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,a.jsx)(Bo,{path:"/typography/font-sizes",children:(0,a.jsxs)(b.__experimentalHStack,{direction:"row",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Font size presets")}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})})]})},yc=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.jsx)(Zt.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});const xc="/wp/v2/font-families",bc="/wp/v2/font-collections";async function wc(e){const t={path:xc,method:"POST",body:e},n=await ra()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}async function _c(e,t){const n={path:`${xc}/${e}/font-faces`,method:"POST",body:t},s=await ra()(n);return{id:s.id,...s.font_face_settings}}async function jc(e){const t={path:`${xc}?slug=${e}&_embed=true`,method:"GET"},n=await ra()(t);if(!n||0===n.length)return null;const s=n[0];return{id:s.id,...s.font_family_settings,fontFace:s?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function Sc(e){const t={path:`${xc}/${e}?force=true`,method:"DELETE"};return await ra()(t)}const Cc=["otf","ttf","woff","woff2"],kc={100:(0,w._x)("Thin","font weight"),200:(0,w._x)("Extra-light","font weight"),300:(0,w._x)("Light","font weight"),400:(0,w._x)("Normal","font weight"),500:(0,w._x)("Medium","font weight"),600:(0,w._x)("Semi-bold","font weight"),700:(0,w._x)("Bold","font weight"),800:(0,w._x)("Extra-bold","font weight"),900:(0,w._x)("Black","font weight")},Ec={normal:(0,w._x)("Normal","font style"),italic:(0,w._x)("Italic","font style")},{File:Pc}=window,{kebabCase:Ic}=ne(b.privateApis);function Vc(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function Tc(e){return`${kc[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":Ec[e.fontStyle]||e.fontStyle}`}function Oc(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}function Ac(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...s}=e,i=Oc(n.get(e.slug).fontFace,t);n.set(e.slug,{...s,fontFace:i})}else n.set(e.slug,{...e});return Array.from(n.values())}async function Nc(e,t,n="all"){let s;if("string"==typeof t)s=`url(${t})`;else{if(!(t instanceof Pc))return;s=await t.arrayBuffer()}const i=new window.FontFace(Xo(e.fontFamily),s,{style:e.fontStyle,weight:e.fontWeight}),r=await i.load();if("document"!==n&&"all"!==n||document.fonts.add(r),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(r)}}function Fc(e,t="all"){const n=t=>{t.forEach((n=>{n.family===Xo(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&t.delete(n)}))};if("document"!==t&&"all"!==t||n(document.fonts),"iframe"===t||"all"===t){n(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function Mc(e){if(!e)return;let t;var n;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(n=t)||n===decodeURIComponent(n))&&(t=encodeURI(t)),t)}function Bc(e){const t=new FormData,{fontFace:n,category:s,...i}=e,r={...i,slug:Ic(e.slug)};return t.append("font_family_settings",JSON.stringify(r)),t}function Dc(e){if(e?.fontFace){return e.fontFace.map(((e,t)=>{const n={...e},s=new FormData;if(n.file){const e=Array.isArray(n.file)?n.file:[n.file],i=[];e.forEach(((e,n)=>{const r=`file-${t}-${n}`;s.append(r,e,e.name),i.push(r)})),n.src=1===i.length?i[0]:i,delete n.file,s.append("font_face_settings",JSON.stringify(n))}else s.append("font_face_settings",JSON.stringify(n));return s}))}}async function Rc(e,t){const n=[];for(const s of t)try{const t=await _c(e,s);n.push({status:"fulfilled",value:t})}catch(e){n.push({status:"rejected",reason:e})}const s={errors:[],successes:[]};return n.forEach(((e,n)=>{if("fulfilled"===e.status){const i=e.value;i.id?s.successes.push(i):s.errors.push({data:t[n],message:`Error: ${i.message}`})}else s.errors.push({data:t[n],message:e.reason.message})})),s}function Lc(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function zc(e,t,n){const s=t=>t.slug===e.slug,i=n.find(s);return t?(i=>{const r=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!i)return[...n,{...e,fontFace:[t]}];let a=i.fontFace||[];return a=a.find(r)?a.filter((e=>!r(e))):[...a,t],0===a.length?n.filter((e=>!s(e))):n.map((e=>s(e)?{...e,fontFace:a}:e))})(i):i?n.filter((e=>!s(e))):[...n,e]}const{useGlobalSetting:Hc}=ne(x.privateApis),Gc=(0,h.createContext)({});Gc.displayName="FontLibraryContext";var Wc=function({children:e}){const{saveEntityRecord:t}=(0,c.useDispatch)(j.store),{globalStylesId:n}=(0,c.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(j.store);return{globalStylesId:t()}})),s=(0,j.useEntityRecord)("root","globalStyles",n),[i,r]=(0,h.useState)(!1),[o,l]=(0,h.useState)(0),u=()=>{l(Date.now())},{records:d=[],isResolving:p}=(0,j.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),f=(d||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[m,g]=Hc("typography.fontFamilies"),v=async e=>{const n=s.record;ae(n,["settings","typography","fontFamilies"],e),await t("root","globalStyles",n)},[y,x]=(0,h.useState)(!1),[b,_]=(0,h.useState)(null),S=m?.theme?m.theme.map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],C=m?.custom?m.custom.map((e=>Vc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=f?f.map((e=>Vc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,h.useEffect)((()=>{y||_(null)}),[y]);const[E]=(0,h.useState)(new Set),P=e=>e.reduce(((e,t)=>{const n=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),I=e=>P("theme"===e?S:C),V=(e,t,n,s)=>t||n?!!I(s)[e]?.includes(t+n):!!I(s)[e],T=e=>{const t=(m?.[e.source]??[]).filter((t=>t.slug!==e.slug)),n={...m,[e.source]:t};return g(n),e.fontFace&&e.fontFace.forEach((e=>{Fc(e,"all")})),n},O=e=>{const t=A(e),n={...m,custom:Ac(m?.custom,t)};return g(n),N(t),n},A=e=>e.map((({id:e,fontFace:t,...n})=>({...n,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}}))),N=e=>{e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{Nc(e,Mc(e.src),"all")}))}))},[F,M]=(0,h.useState)([]),B=async()=>{const e=await async function(){const e={path:`${bc}?_fields=slug,name,description`,method:"GET"};return await ra()(e)}();M(e)};return(0,h.useEffect)((()=>{B()}),[]),(0,a.jsx)(Gc.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:e=>{if(!e)return void _(null);const t=("theme"===e.source?S:k).find((t=>t.slug===e.slug));_({...t||e,source:e.source})},fontFamilies:m,baseCustomFonts:k,isFontActivated:V,getFontFacesActivated:(e,t)=>I(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=Mc(e.src);t&&!E.has(t)&&(Nc(e,t,"document"),E.add(t))},installFonts:async function(e){r(!0);try{const t=[];let n=[];for(const s of e){let e=!1,i=await jc(s.slug);i||(e=!0,i=await wc(Bc(s)));const r=i.fontFace&&s.fontFace?i.fontFace.filter((e=>Lc(e,s.fontFace))):[];i.fontFace&&s.fontFace&&(s.fontFace=s.fontFace.filter((e=>!Lc(e,i.fontFace))));let a=[],o=[];if(s?.fontFace?.length>0){const e=await Rc(i.id,Dc(s));a=e?.successes,o=e?.errors}(a?.length>0||r?.length>0)&&(i.fontFace=[...a],t.push(i)),i&&!s?.fontFace?.length&&t.push(i),e&&s?.fontFace?.length>0&&0===a?.length&&await Sc(i.id),n=n.concat(o)}if(n=n.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),t.length>0){const e=O(t);await v(e),u()}if(n.length>0){const e=new Error((0,w.__)("There was an error installing fonts."));throw e.installationErrors=n,e}}finally{r(!1)}},uninstallFontFamily:async function(e){try{const t=await Sc(e.id);if(t.deleted){const t=T(e);await v(t)}return u(),t}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{const n=zc(e,t,m?.[e.source]??[]);g({...m,[e.source]:n});V(e.slug,t?.fontStyle,t?.fontWeight,e.source)?Fc(t,"all"):Nc(t,Mc(t?.src),"all")},getAvailableFontsOutline:P,modalTabOpen:y,setModalTabOpen:x,refreshLibrary:u,saveFontFamilies:v,isResolvingLibrary:p,isInstalling:i,collections:F,getFontCollection:async e=>{try{if(!!F.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${bc}/${e}`,method:"GET"};return await ra()(t)}(e),n=F.map((n=>n.slug===e?{...n,...t}:n));M(n)}catch(e){throw console.error(e),e}}},children:e})};var Uc=function({font:e,text:t}){const n=(0,h.useRef)(null),s=function(e){return e.fontStyle||e.fontWeight?e:e.fontFace&&e.fontFace.length?e.fontFace.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0}}(e),i=Qo(e);t=t||e.name;const r=e.preview,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),{loadFontFaceAsset:d}=(0,h.useContext)(Gc),p=r??function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(s),f=p&&p.match(/\.(png|jpg|jpeg|gif|svg)$/i);var m;const g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...i,...{fontFamily:Ko((m=s).fontFamily),fontStyle:m.fontStyle||"normal",fontWeight:m.fontWeight||"400"}};return(0,h.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{l(e.isIntersecting)}),{});return e.observe(n.current),()=>e.disconnect()}),[n]),(0,h.useEffect)((()=>{(async()=>{o&&(!f&&s.src&&await d(s),u(!0))})()}),[s,o,d,f]),(0,a.jsx)("div",{ref:n,children:f?(0,a.jsx)("img",{src:p,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,a.jsx)(b.__experimentalText,{style:g,className:"font-library-modal__font-variant_demo-text",children:t})})};var qc=function({font:e,onClick:t,variantsText:n,navigatorPath:s}){const i=e.fontFace?.length||1,r={cursor:t?"pointer":"default"},o=(0,b.useNavigator)();return(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),s&&o.goTo(s)},style:r,className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"space-between",wrap:!1,children:[(0,a.jsx)(Uc,{font:e}),(0,a.jsxs)(b.Flex,{justify:"flex-end",children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalText,{className:"font-library-modal__font-card__count",children:n||(0,w.sprintf)((0,w._n)("%d variant","%d variants",i),i)})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Icon,{icon:(0,w.isRTL)()?za:La})})]})]})})};var Zc=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:s}=(0,h.useContext)(Gc),i=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),r=()=>{t?.fontFace?.length>0?s(t,e):s(t)},o=t.name+" "+Tc(e),l=(0,h.useId)();return(0,a.jsx)("div",{className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,a.jsx)(b.CheckboxControl,{checked:i,onChange:r,__nextHasNoMarginBottom:!0,id:l}),(0,a.jsx)("label",{htmlFor:l,children:(0,a.jsx)(Uc,{font:e,text:o,onClick:r})})]})})};function Yc(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function Kc(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Yc(e.fontWeight)-Yc(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{useGlobalSetting:Xc}=ne(x.privateApis);function Qc({font:e,isOpen:t,setIsOpen:n,setNotice:s,uninstallFontFamily:i,handleSetLibraryFontSelected:r}){const o=(0,b.useNavigator)();return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:(0,w.__)("Delete"),onCancel:()=>{n(!1)},onConfirm:async()=>{s(null),n(!1);try{await i(e),o.goBack(),r(null),s({type:"success",message:(0,w.__)("Font family uninstalled successfully.")})}catch(e){s({type:"error",message:(0,w.__)("There was an error uninstalling the font family.")+e.message})}},size:"medium",children:e&&(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var Jc=function(){const{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:n,refreshLibrary:s,uninstallFontFamily:i,isResolvingLibrary:r,isInstalling:o,saveFontFamilies:l,getFontFacesActivated:u}=(0,h.useContext)(Gc),[d,p]=Xc("typography.fontFamilies"),[f,m]=(0,h.useState)(!1),[g,v]=(0,h.useState)(!1),[y]=Xc("typography.fontFamilies",void 0,"base"),x=(0,c.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(j.store);return t()})),_=(0,j.useEntityRecord)("root","globalStyles",x),S=!!_?.edits?.settings?.typography?.fontFamilies,C=d?.theme?d.theme.map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=new Set(C.map((e=>e.slug))),E=y?.theme?C.concat(y.theme.filter((e=>!k.has(e.slug))).map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],P="custom"===t?.source&&t?.id,I=(0,c.useSelect)((e=>{const{canUser:t}=e(j.store);return P&&t("delete",{kind:"postType",name:"wp_font_family",id:P})}),[P]),V=!!t&&"theme"!==t?.source&&I,T=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,n=u(e.slug,e.source).length;return(0,w.sprintf)((0,w.__)("%1$s/%2$s variants active"),n,t)};(0,h.useEffect)((()=>{n(t),s()}),[]);const O=t?u(t.slug,t.source).length:0,A=t?.fontFace?.length??(t?.fontFamily?1:0),N=O>0&&O!==A,F=O===A,M=E.length>0||e.length>0;return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[r&&(0,a.jsx)("div",{className:"font-library-modal__loading",children:(0,a.jsx)(b.ProgressBar,{})}),!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,a.jsx)(b.Navigator.Screen,{path:"/",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"8",children:[g&&(0,a.jsx)(b.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!M&&(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("No fonts installed.")}),E.length>0&&(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,w._x)("Theme","font source")}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:E.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e,navigatorPath:"/fontFamily",variantsText:T(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]}),e.length>0&&(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,w._x)("Custom","font source")}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:e.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e,navigatorPath:"/fontFamily",variantsText:T(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]})]})}),(0,a.jsxs)(b.Navigator.Screen,{path:"/fontFamily",children:[(0,a.jsx)(Qc,{font:t,isOpen:f,setIsOpen:m,setNotice:v,uninstallFontFamily:i,handleSetLibraryFontSelected:n}),(0,a.jsxs)(b.Flex,{justify:"flex-start",children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",onClick:()=>{n(null),v(null)},label:(0,w.__)("Back")}),(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:t?.name})]}),g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalSpacer,{margin:1}),(0,a.jsx)(b.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,a.jsx)(b.__experimentalSpacer,{margin:1})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsxs)(b.__experimentalVStack,{spacing:0,children:[(0,a.jsx)(b.CheckboxControl,{className:"font-library-modal__select-all",label:(0,w.__)("Select all"),checked:F,onChange:()=>{const e=d?.[t.source]?.filter((e=>e.slug!==t.slug))??[],n=F?e:[...e,t];p({...d,[t.source]:n}),t.fontFace&&t.fontFace.forEach((e=>{F?Fc(e,"all"):Nc(e,Mc(e?.src),"all")}))},indeterminate:N,__nextHasNoMarginBottom:!0}),(0,a.jsx)(b.__experimentalSpacer,{margin:8}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(e=>e?e.fontFace&&e.fontFace.length?Kc(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(t).map(((e,n)=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(Zc,{font:t,face:e},`face${n}`)},`face${n}`)))})]})]})]}),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__footer",children:[o&&(0,a.jsx)(b.ProgressBar,{}),V&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{m(!0)},children:(0,w.__)("Delete")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{v(null);try{await l(d),v({type:"success",message:(0,w.__)("Font family updated successfully.")})}catch(e){v({type:"error",message:(0,w.sprintf)((0,w.__)("There was an error updating the font family. %s"),e.message)})}},disabled:!S,accessibleWhenDisabled:!0,children:(0,w.__)("Update")})]})]})]})},$c=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),eu=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});function tu(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}var nu=function(){return(0,a.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,a.jsx)(b.Card,{children:(0,a.jsxs)(b.CardBody,{children:[(0,a.jsx)(b.__experimentalHeading,{level:2,children:(0,w.__)("Connect to Google Fonts")}),(0,a.jsx)(b.__experimentalSpacer,{margin:6}),(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:3}),(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("You can alternatively upload files directly on the Upload tab.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:6}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))},children:(0,w.__)("Allow access to Google Fonts")})]})})})};var su=function({face:e,font:t,handleToggleVariant:n,selected:s}){const i=()=>{t?.fontFace?n(t,e):n(t)},r=t.name+" "+Tc(e),o=(0,h.useId)();return(0,a.jsx)("div",{className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,a.jsx)(b.CheckboxControl,{checked:s,onChange:i,__nextHasNoMarginBottom:!0,id:o}),(0,a.jsx)("label",{htmlFor:o,children:(0,a.jsx)(Uc,{font:e,text:r,onClick:i})})]})})};const iu={slug:"all",name:(0,w._x)("All","font categories")},ru="wp-font-library-google-fonts-permission";var au=function({slug:e}){const t="google-fonts"===e,n=()=>"true"===window.localStorage.getItem(ru),[s,i]=(0,h.useState)(null),[r,o]=(0,h.useState)(!1),[l,c]=(0,h.useState)([]),[u,d]=(0,h.useState)(1),[p,f]=(0,h.useState)({}),[m,g]=(0,h.useState)(t&&!n()),{collections:v,getFontCollection:x,installFonts:_,isInstalling:j}=(0,h.useContext)(Gc),S=v.find((t=>t.slug===e));(0,h.useEffect)((()=>{const e=()=>{g(t&&!n())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,t]);const C=()=>{window.localStorage.setItem(ru,"false"),window.dispatchEvent(new Event("storage"))};(0,h.useEffect)((()=>{(async()=>{try{await x(e),B()}catch(e){r||o({type:"error",message:e?.message})}})()}),[e,x,o,r]),(0,h.useEffect)((()=>{i(null)}),[e]),(0,h.useEffect)((()=>{c([])}),[s]);const k=(0,h.useMemo)((()=>S?.font_families??[]),[S]),E=[iu,...S?.categories??[]],P=(0,h.useMemo)((()=>function(e,t){const{category:n,search:s}=t;let i=e||[];return n&&"all"!==n&&(i=i.filter((e=>-1!==e.categories.indexOf(n)))),s&&(i=i.filter((e=>e.font_family_settings.name.toLowerCase().includes(s.toLowerCase())))),i}(k,p)),[k,p]),I=!S?.font_families&&!r,V=Math.max(window.innerHeight,500),T=Math.floor((V-417)/61),O=Math.ceil(P.length/T),A=(u-1)*T,N=u*T,F=P.slice(A,N),M=(0,y.debounce)((e=>{f({...p,search:e}),d(1)}),300),B=()=>{f({}),d(1)},D=(e,t)=>{const n=zc(e,t,l);c(n)},R=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(l),L=l.length>0?l[0]?.fontFace?.length:0,z=L>0&&L!==s?.fontFace?.length,H=L===s?.fontFace?.length;if(m)return(0,a.jsx)(nu,{});const G=()=>"google-fonts"!==e||m||s?null:(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,w.__)("Revoke access to Google Fonts"),onClick:C}]});return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[I&&(0,a.jsx)("div",{className:"font-library-modal__loading",children:(0,a.jsx)(b.ProgressBar,{})}),!I&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Navigator,{initialPath:"/",className:"font-library-modal__tabpanel-layout",children:[(0,a.jsxs)(b.Navigator.Screen,{path:"/",children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:S.name}),(0,a.jsx)(b.__experimentalText,{children:S.description})]}),(0,a.jsx)(G,{})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsxs)(b.Flex,{children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.SearchControl,{className:"font-library-modal__search",value:p.search,placeholder:(0,w.__)("Font name…"),label:(0,w.__)("Search"),onChange:M,__nextHasNoMarginBottom:!0,hideLabelFromVision:!1})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,w.__)("Category"),value:p.category,onChange:e=>{f({...p,category:e}),d(1)},children:E&&E.map((e=>(0,a.jsx)("option",{value:e.slug,children:e.name},e.slug)))})})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),!!S?.font_families?.length&&!P.length&&(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("No fonts found. Try with a different search term.")}),(0,a.jsx)("div",{className:"font-library-modal__fonts-grid__main",children:(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:F.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{i(e.font_family_settings)}})},e.font_family_settings.slug)))})})]}),(0,a.jsxs)(b.Navigator.Screen,{path:"/fontFamily",children:[(0,a.jsxs)(b.Flex,{justify:"flex-start",children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",onClick:()=>{i(null),o(null)},label:(0,w.__)("Back")}),(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:s?.name})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalSpacer,{margin:1}),(0,a.jsx)(b.Notice,{status:r.type,onRemove:()=>o(null),children:r.message}),(0,a.jsx)(b.__experimentalSpacer,{margin:1})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Select font variants to install.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.CheckboxControl,{className:"font-library-modal__select-all",label:(0,w.__)("Select all"),checked:H,onChange:()=>{c(H?[]:[s])},indeterminate:z,__nextHasNoMarginBottom:!0}),(0,a.jsx)(b.__experimentalVStack,{spacing:0,children:(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(W=s,W?W.fontFace&&W.fontFace.length?Kc(W.fontFace):[{fontFamily:W.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(su,{font:s,face:e,handleToggleVariant:D,selected:tu(s.slug,s.fontFace?e:null,R)})},`face${t}`)))})}),(0,a.jsx)(b.__experimentalSpacer,{margin:16})]})]}),s&&(0,a.jsx)(b.Flex,{justify:"flex-end",className:"font-library-modal__footer",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(null);const e=l[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){e=Array.isArray(e)?e:[e];const t=await Promise.all(e.map((async e=>fetch(new Request(e)).then((t=>{if(!t.ok)throw new Error(`Error downloading font face asset from ${e}. Server responded with status: ${t.status}`);return t.blob()})).then((t=>{const n=e.split("/").pop();return new Pc([t],n,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void o({type:"error",message:(0,w.__)("Error installing the fonts, could not be downloaded.")})}try{await _([e]),o({type:"success",message:(0,w.__)("Fonts were installed successfully.")})}catch(e){o({type:"error",message:e.message})}c([])},isBusy:j,disabled:0===l.length||j,accessibleWhenDisabled:!0,children:(0,w.__)("Install")})}),!s&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"font-library-modal__footer",justify:"end",spacing:6,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library-modal__page-selection",children:(0,h.createInterpolateElement)((0,w.sprintf)((0,w._x)("<div>Page</div>%1$s<div>of %2$s</div>","paging"),"<CurrentPage />",O),{div:(0,a.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,a.jsx)(b.SelectControl,{"aria-label":(0,w.__)("Current page"),value:u,options:[...Array(O)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>d(parseInt(e)),size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{onClick:()=>d(u-1),disabled:1===u,accessibleWhenDisabled:!0,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?$c:eu,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.jsx)(b.Button,{onClick:()=>d(u+1),disabled:u===O,accessibleWhenDisabled:!0,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?eu:$c,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]});var W},ou=i(8572),lu=i.n(ou),cu=i(4660),uu=i.n(cu);globalThis.fetch;class du{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class hu{constructor(){this.listeners={}}addEventListener(e,t,n){let s=this.listeners[e]||[];n?s.unshift(t):s.push(t),this.listeners[e]=s}removeEventListener(e,t){let n=this.listeners[e]||[],s=n.findIndex((e=>e===t));s>-1&&(n.splice(s,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,s=t.length;n<s&&e.__mayPropagate;n++)t[n](e)}}const pu=new Date("1904-01-01T00:00:00+0000").getTime();class fu{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(pu+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,s=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const i=`${s?"":"u"}int${n}`,r=[];for(;e--;)r.push(this[i]);return r}}class mu{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,s={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",s)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class gu extends mu{constructor(e,t,n){const{parser:s,start:i}=super(new fu(e,t,n)),r={enumerable:!1,get:()=>s};Object.defineProperty(this,"p",r);const a={enumerable:!1,get:()=>i};Object.defineProperty(this,"tableStart",a)}}function vu(e,t,n){let s;Object.defineProperty(e,t,{get:()=>s||(s=n(),s),enumerable:!0})}class yu extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:12},t,"sfnt");this.version=s.uint32,this.numTables=s.uint16,this.searchRange=s.uint16,this.entrySelector=s.uint16,this.rangeShift=s.uint16,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new xu(s))),this.tables={},this.directory.forEach((e=>{vu(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class xu{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const bu=uu().inflate||void 0;let wu;class _u extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:44},t,"woff");this.signature=s.tag,this.flavor=s.uint32,this.length=s.uint32,this.numTables=s.uint16,s.uint16,this.totalSfntSize=s.uint32,this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.metaOffset=s.uint32,this.metaLength=s.uint32,this.metaOrigLength=s.uint32,this.privOffset=s.uint32,this.privLength=s.uint32,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new ju(s))),Su(this,t,n)}}class ju{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function Su(e,t,n){e.tables={},e.directory.forEach((s=>{vu(e.tables,s.tag.trim(),(()=>{let i=0,r=t;if(s.compLength!==s.origLength){const e=t.buffer.slice(s.offset,s.offset+s.compLength);let n;if(bu)n=bu(new Uint8Array(e));else{if(!wu){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=wu(new Uint8Array(e))}r=new DataView(n.buffer)}else i=s.offset;return n(e.tables,{tag:s.tag,offset:i,length:s.origLength},r)}))}))}const Cu=lu();let ku;class Eu extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:48},t,"woff2");this.signature=s.tag,this.flavor=s.uint32,this.length=s.uint32,this.numTables=s.uint16,s.uint16,this.totalSfntSize=s.uint32,this.totalCompressedSize=s.uint32,this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.metaOffset=s.uint32,this.metaLength=s.uint32,this.metaOrigLength=s.uint32,this.privOffset=s.uint32,this.privLength=s.uint32,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Pu(s)));let i,r=s.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let a=t.buffer.slice(r);if(Cu)i=Cu(new Uint8Array(a));else{if(!ku){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}i=new Uint8Array(ku(a))}!function(e,t,n){e.tables={},e.directory.forEach((s=>{vu(e.tables,s.tag.trim(),(()=>{const i=s.offset,r=i+(s.transformLength?s.transformLength:s.origLength),a=new DataView(t.slice(i,r).buffer);try{return n(e.tables,{tag:s.tag,offset:0,length:s.origLength},a)}catch(e){console.error(e)}}))}))}(this,i,n)}}class Pu{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const Iu={};let Vu=!1;function Tu(e,t,n){let s=t.tag.replace(/[^\w\d]/g,""),i=Iu[s];return i?new i(t,n,e):(console.warn(`lib-font has no definition for ${s}. The table was skipped.`),{})}function Ou(){let e=0;function t(n,s){if(!Vu)return e>10?s(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(Tu)}return new Promise(((e,n)=>t(e)))}async function Au(e,t,n={}){if(!globalThis.document)return;let s=function(e,t){let n=e.lastIndexOf("."),s=(e.substring(n+1)||"").toLowerCase(),i={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[s];if(i)return i;let r={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[s];if(r||(r=`${e} is not a known webfont format.`),t)throw new Error(r);console.warn(`Could not load font: ${r}`)}(t,n.errorOnStyle);if(!s)return;let i=document.createElement("style");i.className="injected-by-Font-js";let r=[];return n.styleRules&&(r=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),i.textContent=`\n@font-face {\n font-family: "${e}";\n ${r.join("\n\t")}\n src: url("${t}") format("${s}");\n}`,globalThis.document.head.appendChild(i),i}Promise.all([Promise.resolve().then((function(){return nd})),Promise.resolve().then((function(){return sd})),Promise.resolve().then((function(){return id})),Promise.resolve().then((function(){return ad})),Promise.resolve().then((function(){return od})),Promise.resolve().then((function(){return ud})),Promise.resolve().then((function(){return dd})),Promise.resolve().then((function(){return pd})),Promise.resolve().then((function(){return Sd})),Promise.resolve().then((function(){return Md})),Promise.resolve().then((function(){return Ah})),Promise.resolve().then((function(){return Nh})),Promise.resolve().then((function(){return Bh})),Promise.resolve().then((function(){return Lh})),Promise.resolve().then((function(){return zh})),Promise.resolve().then((function(){return Hh})),Promise.resolve().then((function(){return Wh})),Promise.resolve().then((function(){return Uh})),Promise.resolve().then((function(){return qh})),Promise.resolve().then((function(){return Zh})),Promise.resolve().then((function(){return Yh})),Promise.resolve().then((function(){return Kh})),Promise.resolve().then((function(){return Qh})),Promise.resolve().then((function(){return np})),Promise.resolve().then((function(){return ip})),Promise.resolve().then((function(){return rp})),Promise.resolve().then((function(){return ap})),Promise.resolve().then((function(){return op})),Promise.resolve().then((function(){return lp})),Promise.resolve().then((function(){return dp})),Promise.resolve().then((function(){return gp})),Promise.resolve().then((function(){return xp})),Promise.resolve().then((function(){return wp})),Promise.resolve().then((function(){return Sp})),Promise.resolve().then((function(){return Cp})),Promise.resolve().then((function(){return kp})),Promise.resolve().then((function(){return Pp})),Promise.resolve().then((function(){return Ip})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Np})),Promise.resolve().then((function(){return Mp}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];Iu[t]=e[t]})),Vu=!0}));const Nu=[0,1,0,0],Fu=[79,84,84,79],Mu=[119,79,70,70],Bu=[119,79,70,50];function Du(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class Ru extends hu{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await Au(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const s=new du("error",n,`Failed to load font at ${t||e}`);this.dispatch(s),this.onerror&&this.onerror(s)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return Du(t,Nu)||Du(t,Fu)?"SFNT":Du(t,Mu)?"WOFF":Du(t,Bu)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const s=new du("load",{font:this});this.dispatch(s),this.onload&&this.onload(s)}async parseBasicData(e){return Ou().then((t=>("SFNT"===e&&(this.opentype=new yu(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new _u(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new Eu(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let s=n.getBoundingClientRect();document.body.removeChild(n);const i=this.opentype.tables["OS/2"];return s.fontSize=t,s.ascender=i.sTypoAscender,s.descender=i.sTypoDescender,s}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new du("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new du("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=Ru;class Lu extends mu{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class zu extends Lu{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class Hu extends Lu{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const s=Math.max(...this.subHeaderKeys),i=e.currentPosition;vu(this,"subHeaders",(()=>(e.currentPosition=i,[...new Array(s)].map((t=>new Gu(e))))));const r=i+8*s;vu(this,"glyphIndexArray",(()=>(e.currentPosition=r,[...new Array(s)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,s=this.subHeaders[n],i=this.subHeaders[s],r=i.firstCode,a=r+i.entryCount;return r<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class Gu{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class Wu extends Lu{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const s=e.currentPosition;vu(this,"endCode",(()=>e.readBytes(this.segCount,s,16)));const i=s+2+this.segCountX2;vu(this,"startCode",(()=>e.readBytes(this.segCount,i,16)));const r=i+this.segCountX2;vu(this,"idDelta",(()=>e.readBytes(this.segCount,r,16,!0)));const a=r+this.segCountX2;vu(this,"idRangeOffset",(()=>e.readBytes(this.segCount,a,16)));const o=a+this.segCountX2,l=this.length-(o-this.tableStart);vu(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),vu(this,"segments",(()=>this.buildSegments(a,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,s)=>{let i=this.startCode[s],r=this.endCode[s],a=this.idDelta[s],o=this.idRangeOffset[s],l=e+2*s,c=[];if(0===o)for(let e=i+a,t=r+a;e<=t;e++)c.push(e);else for(let e=0,t=r-i;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:i,endCode:r,idDelta:a,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(!(65534&~e&&65535&~e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class Uu extends Lu{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1;vu(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class qu extends Lu{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32;vu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Zu(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class Zu{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class Yu extends Lu{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars;vu(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&(!(e>this.startCharCode+this.numChars)&&e-this.startCharCode)}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class Ku extends Lu{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;vu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Xu(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343?0:65534&~e&&65535&~e?-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode)):0}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const s=t.startCharCode+(e-n);return{code:s,unicode:String.fromCodePoint(s)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Xu{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Qu extends Lu{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;vu(this,"groups",[...new Array(this.numGroups)].map((t=>new Ju(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Ju{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class $u extends Lu{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,vu(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new ed(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find((t=>t.varSelector===e));return t||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class ed{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class td{constructor(e,t){const n=this.platformID=e.uint16,s=this.encodingID=e.uint16,i=this.offset=e.Offset32;vu(this,"table",(()=>(e.currentPosition=t+i,function(e,t,n){const s=e.uint16;return 0===s?new zu(e,t,n):2===s?new Hu(e,t,n):4===s?new Wu(e,t,n):6===s?new Uu(e,t,n):8===s?new qu(e,t,n):10===s?new Yu(e,t,n):12===s?new Ku(e,t,n):13===s?new Qu(e,t,n):14===s?new $u(e,t,n):{}}(e,n,s))))}}var nd=Object.freeze({__proto__:null,cmap:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new td(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));if(-1===n)return!1;return this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,s)=>{let i=this.getSubTable(s);return!!i.getGlyphId&&(t=i.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const s=this.getSubTable(n);return s.supports&&!1!==s.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const s=this.getSubTable(n);return s.supportsVariation&&!1!==s.supportsVariation(e)}))}}});var sd=Object.freeze({__proto__:null,head:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}});var id=Object.freeze({__proto__:null,hhea:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class rd{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var ad=Object.freeze({__proto__:null,hmtx:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.hhea.numberOfHMetrics,r=n.maxp.numGlyphs,a=s.currentPosition;if(vu(this,"hMetrics",(()=>(s.currentPosition=a,[...new Array(i)].map((e=>new rd(s.uint16,s.int16)))))),i<r){const e=a+4*i;vu(this,"leftSideBearings",(()=>(s.currentPosition=e,[...new Array(r-i)].map((e=>s.int16)))))}}}});var od=Object.freeze({__proto__:null,maxp:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class ld{constructor(e,t){this.length=e,this.offset=t}}class cd{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,vu(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:s}=t;if(0===s)return"";if(0===n||3===n){const t=[];for(let n=0,i=s/2;n<i;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const i=e.readBytes(s),r=[];return i.forEach((function(e,t){r[t]=String.fromCharCode(e)})),r.join("")}(e,this))))}}var ud=Object.freeze({__proto__:null,name:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new cd(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new ld(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var dd=Object.freeze({__proto__:null,OS2:class extends gu{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const hd=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var pd=Object.freeze({__proto__:null,post:class extends gu{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<hd.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return hd[t];let n=this.glyphNameOffsets[e],s=this.glyphNameOffsets[e+1]-n-1;if(0===s)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(s,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class fd extends gu{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,vu(this,"baseTagList",(()=>new md({offset:e.offset+this.baseTagListOffset},t))),vu(this,"baseScriptList",(()=>new gd({offset:e.offset+this.baseScriptListOffset},t)))}}class md extends gu{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class gd extends gu{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const s=n.currentPosition;vu(this,"baseScriptRecords",(()=>(n.currentPosition=s,[...new Array(this.baseScriptCount)].map((e=>new vd(this.start,n))))))}}class vd{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,vu(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new yd(t))))}}class yd{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new xd(this.start,e))),vu(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new bd(e)))),vu(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new wd(e))))}}class xd{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,vu(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new wd(t))))}}class bd{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new jd(this.parser)}}class wd{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;vu(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new _d(e))))))}}class _d{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class jd{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var Sd=Object.freeze({__proto__:null,BASE:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,vu(this,"horizAxis",(()=>new fd({offset:e.offset+this.horizAxisOffset},t))),vu(this,"vertAxis",(()=>new fd({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,vu(this,"itemVarStore",(()=>new fd({offset:e.offset+this.itemVarStoreOffset},t))))}}});class Cd{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new kd(e))))}}class kd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class Ed extends mu{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new Pd(e))))}}class Pd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class Id{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class Vd extends mu{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new Td(this.parser)}}class Td{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class Od extends mu{constructor(e){super(e),this.coverageOffset=e.Offset16,vu(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new Ed(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new Ad(this.parser)}}class Ad extends mu{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new Nd(this.parser)}}class Nd{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class Fd extends mu{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Ed(this.parser)}}var Md=Object.freeze({__proto__:null,GDEF:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,vu(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new Cd(n)})),this.attachListOffset=n.Offset16,vu(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new Vd(n)})),this.ligCaretListOffset=n.Offset16,vu(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new Od(n)})),this.markAttachClassDefOffset=n.Offset16,vu(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Cd(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,vu(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new Fd(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,vu(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new Id(n)})))}}});class Bd extends mu{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new Dd(e)))}}class Dd{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class Rd extends mu{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new Ld(e)))}}class Ld{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class zd{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class Hd extends mu{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new Gd(e)))}}class Gd{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class Wd extends mu{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new qd(e);if(t.startsWith("cc"))return new Ud(e);if(t.startsWith("ss"))return new Zd(e)}}}class Ud{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class qd{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Zd{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function Yd(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class Kd extends mu{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Ed(e)}}class Xd{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Qd extends Kd{constructor(e){super(e),this.deltaGlyphID=e.int16}}class Jd extends Kd{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new $d(t)}}class $d{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class eh extends Kd{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new th(t)}}class th{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class nh extends Kd{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new sh(t)}}class sh extends mu{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new ih(t)}}class ih{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class rh extends Kd{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Yd(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Xd(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new ah(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new lh(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Ed(t)}}class ah extends mu{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new oh(t)}}class oh{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Xd(e)))}}class lh extends mu{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new ch(t)}}class ch extends oh{constructor(e){super(e)}}class uh extends Kd{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Yd(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new mh(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new dh(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new ph(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Ed(t)}}class dh extends mu{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new hh(t)}}class hh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new Xd(e)))}}class ph extends mu{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new fh(t)}}class fh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new mh(e)))}}class mh extends mu{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class gh extends mu{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class vh extends Kd{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var yh={buildSubtable:function(e,t){const n=new[void 0,Qd,Jd,eh,nh,rh,uh,gh,vh][e](t);return n.type=e,n}};class xh extends mu{constructor(e){super(e)}}class bh extends xh{constructor(e){super(e),console.log("lookup type 1")}}class wh extends xh{constructor(e){super(e),console.log("lookup type 2")}}class _h extends xh{constructor(e){super(e),console.log("lookup type 3")}}class jh extends xh{constructor(e){super(e),console.log("lookup type 4")}}class Sh extends xh{constructor(e){super(e),console.log("lookup type 5")}}class Ch extends xh{constructor(e){super(e),console.log("lookup type 6")}}class kh extends xh{constructor(e){super(e),console.log("lookup type 7")}}class Eh extends xh{constructor(e){super(e),console.log("lookup type 8")}}class Ph extends xh{constructor(e){super(e),console.log("lookup type 9")}}var Ih={buildSubtable:function(e,t){const n=new[void 0,bh,wh,_h,jh,Sh,Ch,kh,Eh,Ph][e](t);return n.type=e,n}};class Vh extends mu{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class Th extends mu{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?yh:Ih;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class Oh extends gu{constructor(e,t,n){const{p:s,tableStart:i}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.scriptListOffset=s.Offset16,this.featureListOffset=s.Offset16,this.lookupListOffset=s.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=s.Offset32);const r=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);vu(this,"scriptList",(()=>r?Bd.EMPTY:(s.currentPosition=i+this.scriptListOffset,new Bd(s)))),vu(this,"featureList",(()=>r?Hd.EMPTY:(s.currentPosition=i+this.featureListOffset,new Hd(s)))),vu(this,"lookupList",(()=>r?Vh.EMPTY:(s.currentPosition=i+this.lookupListOffset,new Vh(s)))),this.featureVariationsOffset&&vu(this,"featureVariations",(()=>r?FeatureVariations.EMPTY:(s.currentPosition=i+this.featureVariationsOffset,new FeatureVariations(s))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new Rd(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new zd(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let s=new zd(this.parser);return s.langSysTag=t,s}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new Wd(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new Th(this.parser,t)}}var Ah=Object.freeze({__proto__:null,GSUB:class extends Oh{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var Nh=Object.freeze({__proto__:null,GPOS:class extends Oh{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class Fh extends mu{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new Mh(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class Mh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var Bh=Object.freeze({__proto__:null,SVG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new Fh(n)}}});class Dh{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class Rh{constructor(e,t,n){let s=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-s<n&&(this.postScriptNameID=e.uint16)}}var Lh=Object.freeze({__proto__:null,fvar:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const s=this.tableStart+this.axesArrayOffset;vu(this,"axes",(()=>(n.currentPosition=s,[...new Array(this.axisCount)].map((e=>new Dh(n))))));const i=s+this.axisCount*this.axisSize;vu(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=i+t*this.instanceSize,e.push(new Rh(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}});var zh=Object.freeze({__proto__:null,cvt:class extends gu{constructor(e,t){const{p:n}=super(e,t),s=e.length/2;vu(this,"items",(()=>[...new Array(s)].map((e=>n.fword))))}}});var Hh=Object.freeze({__proto__:null,fpgm:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class Gh{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var Wh=Object.freeze({__proto__:null,gasp:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;vu(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new Gh(n)))))}}});var Uh=Object.freeze({__proto__:null,glyf:class extends gu{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var qh=Object.freeze({__proto__:null,loca:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,vu(this,"offsets",(()=>[...new Array(i)].map((e=>s.Offset16))))):vu(this,"offsets",(()=>[...new Array(i)].map((e=>s.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}});var Zh=Object.freeze({__proto__:null,prep:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var Yh=Object.freeze({__proto__:null,CFF:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"data",(()=>n.readBytes()))}}});var Kh=Object.freeze({__proto__:null,CFF2:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"data",(()=>n.readBytes()))}}});class Xh{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Qh=Object.freeze({__proto__:null,VORG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,vu(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Xh(n)))))}}});class Jh{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new ep(e),this.vert=new ep(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class $h{constructor(e){this.hori=new ep(e),this.vert=new ep(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class ep{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class tp extends gu{constructor(e,t,n){const{p:s}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.numSizes=s.uint32,vu(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Jh(s)))))}}var np=Object.freeze({__proto__:null,EBLC:tp});class sp extends gu{constructor(e,t,n){const{p:s}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16}}var ip=Object.freeze({__proto__:null,EBDT:sp});var rp=Object.freeze({__proto__:null,EBSC:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,vu(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new $h(n)))))}}});var ap=Object.freeze({__proto__:null,CBLC:class extends tp{constructor(e,t){super(e,t,"CBLC")}}});var op=Object.freeze({__proto__:null,CBDT:class extends sp{constructor(e,t){super(e,t,"CBDT")}}});var lp=Object.freeze({__proto__:null,sbix:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,vu(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class cp{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class up{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var dp=Object.freeze({__proto__:null,COLR:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new cp(this.parser),s=n.gID,i=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=i;let r=new cp(this.parser),a=r.gID;if(s===e)return n;if(a===e)return r;for(;t!==i;){let n=t+(i-t)/12;this.parser.currentPosition=n;let s=new cp(this.parser),r=s.gID;if(r===e)return s;r>e?i=n:r<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new up(p)))}}});class hp{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class pp{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class fp{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class mp{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var gp=Object.freeze({__proto__:null,CPAL:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const s=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),vu(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new hp(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,vu(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new pp(n,s)))),vu(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new fp(n,s)))),vu(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new mp(n,s)))))}}});class vp{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class yp{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var xp=Object.freeze({__proto__:null,DSIG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new vp(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new yp(this.parser)}}});class bp{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var wp=Object.freeze({__proto__:null,hdmx:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.hmtx.numGlyphs;this.version=s.uint16,this.numRecords=s.int16,this.sizeDeviceRecord=s.int32,this.records=[...new Array(numRecords)].map((e=>new bp(s,i)))}}});class _p{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,vu(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new jp(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class jp{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var Sp=Object.freeze({__proto__:null,kern:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,vu(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let s=0;s<this.nTables;s++){n.currentPosition=e;let s=new _p(n);t.push(s),e+=s}return t}))}}});var Cp=Object.freeze({__proto__:null,LTSH:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var kp=Object.freeze({__proto__:null,MERG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,vu(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Ep{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var Pp=Object.freeze({__proto__:null,meta:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new Ep(this.tableStart,n)))}}});var Ip=Object.freeze({__proto__:null,PCLT:class extends gu{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Vp{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class Tp{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new Op(e)))}}class Op{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var Ap=Object.freeze({__proto__:null,VDMX:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new Vp(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new Tp(n)))}}});var Np=Object.freeze({__proto__:null,vhea:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class Fp{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var Mp=Object.freeze({__proto__:null,vmtx:class extends gu{constructor(e,t,n){super(e,t);const s=n.vhea.numOfLongVerMetrics,i=n.maxp.numGlyphs,r=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=r,[...new Array(s)].map((e=>new Fp(p.uint16,p.int16)))))),s<i){const e=r+4*s;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(i-s)].map((e=>p.int16)))))}}}});const{kebabCase:Bp}=ne(b.privateApis);var Dp=function(){const{installFonts:e}=(0,h.useContext)(Gc),[t,n]=(0,h.useState)(!1),[s,i]=(0,h.useState)(!1),r=async e=>{i(null),n(!0);const t=new Set,s=[...e];let r=!1;const a=s.map((async e=>{const n=await async function(e){const t=new Ru("Uploaded Font");try{const n=await l(e);return await t.fromDataBuffer(n,"font"),!0}catch(e){return!1}}(e);if(!n)return r=!0,null;if(t.has(e.name))return null;const s=e.name.split(".").pop().toLowerCase();return Cc.includes(s)?(t.add(e.name),e):null})),c=(await Promise.all(a)).filter((e=>null!==e));if(c.length>0)o(c);else{const e=r?(0,w.__)("Sorry, you are not allowed to upload this file type."):(0,w.__)("No fonts found to install.");i({type:"error",message:e}),n(!1)}},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await Nc(t,t.file,"all"),t})));u(t)};async function l(e){return new Promise(((t,n)=>{const s=new window.FileReader;s.readAsArrayBuffer(e),s.onload=()=>t(s.result),s.onerror=n}))}const c=async e=>{const t=await l(e),n=new Ru("Uploaded Font");n.fromDataBuffer(t,e.name);const s=(await new Promise((e=>n.onload=e))).detail.font,{name:i}=s.opentype.tables,r=i.get(16)||i.get(1),a=i.get(2).toLowerCase().includes("italic"),o=s.opentype.tables["OS/2"].usWeightClass||"normal",c=!!s.opentype.tables.fvar&&s.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:r,fontStyle:a?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||o}},u=async t=>{const s=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:Bp(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(s),i({type:"success",message:(0,w.__)("Fonts were installed successfully.")})}catch(e){i({type:"error",message:e.message,errors:e?.installationErrors})}n(!1)};return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[(0,a.jsx)(b.DropZone,{onFilesDrop:e=>{r(e)}}),(0,a.jsxs)(b.__experimentalVStack,{className:"font-library-modal__local-fonts",children:[s&&(0,a.jsxs)(b.Notice,{status:s.type,__unstableHTML:!0,onRemove:()=>i(null),children:[s.message,s.errors&&(0,a.jsx)("ul",{children:s.errors.map(((e,t)=>(0,a.jsx)("li",{children:e},t)))})]}),t&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)("div",{className:"font-library-modal__upload-area",children:(0,a.jsx)(b.ProgressBar,{})})}),!t&&(0,a.jsx)(b.FormFileUpload,{accept:Cc.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{r(e.target.files)},render:({openFileDialog:e})=>(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:"font-library-modal__upload-area",onClick:e,children:(0,w.__)("Upload font")})}),(0,a.jsx)(b.__experimentalSpacer,{margin:2}),(0,a.jsx)(b.__experimentalText,{className:"font-library-modal__upload-area__text",children:(0,w.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})};const{Tabs:Rp}=ne(b.privateApis),Lp={id:"installed-fonts",title:(0,w._x)("Library","Font library")},zp={id:"upload-fonts",title:(0,w._x)("Upload","noun")};var Hp=function({onRequestClose:e,defaultTabId:t="installed-fonts"}){const{collections:n}=(0,h.useContext)(Gc),s=(0,c.useSelect)((e=>e(j.store).canUser("create",{kind:"postType",name:"wp_font_family"})),[]),i=[Lp];return s&&(i.push(zp),i.push(...(e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,w.__)("Install Fonts"):n}))))(n||[]))),(0,a.jsx)(b.Modal,{title:(0,w.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,a.jsxs)(Rp,{defaultTabId:t,children:[(0,a.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,a.jsx)(Rp.TabList,{children:i.map((({id:e,title:t})=>(0,a.jsx)(Rp.Tab,{tabId:e,children:t},e)))})}),i.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,a.jsx)(Dp,{});break;case"installed-fonts":t=(0,a.jsx)(Jc,{});break;default:t=(0,a.jsx)(au,{slug:e})}return(0,a.jsx)(Rp.TabPanel,{tabId:e,focusable:!1,children:t},e)}))]})})};var Gp=function({font:e}){const{handleSetLibraryFontSelected:t,setModalTabOpen:n}=(0,h.useContext)(Gc),s=e?.fontFace?.length||1,i=Qo(e);return(0,a.jsx)(b.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")},children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{style:i,children:e.name}),(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count",children:(0,w.sprintf)((0,w._n)("%d variant","%d variants",s),s)})]})})};const{useGlobalSetting:Wp}=ne(x.privateApis);function Up(e,t){return e?e.map((e=>Vc(e,{source:t}))):[]}function qp(){const{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:n}=(0,h.useContext)(Gc),[s]=Wp("typography.fontFamilies"),[i]=Wp("typography.fontFamilies",void 0,"base"),r=[...Up(s?.theme,"theme"),...Up(s?.custom,"custom")].sort(((e,t)=>e.name.localeCompare(t.name))),o=0<r.length,l=o||i?.theme?.length>0||e?.length>0;return(0,a.jsxs)(a.Fragment,{children:[!!t&&(0,a.jsx)(Hp,{onRequestClose:()=>n(null),defaultTabId:t}),(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Fonts")}),(0,a.jsx)(b.Button,{onClick:()=>n("installed-fonts"),label:(0,w.__)("Manage fonts"),icon:yc,size:"small"})]}),r.length>0&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:r.map((e=>(0,a.jsx)(Gp,{font:e},e.slug)))})}),!o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:l?(0,w.__)("No fonts activated."):(0,w.__)("No fonts installed.")}),(0,a.jsx)(b.Button,{className:"edit-site-global-styles-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{n(l?"installed-fonts":"upload-fonts")},children:l?(0,w.__)("Manage fonts"):(0,w.__)("Add fonts")})]})]})]})}var Zp=({...e})=>(0,a.jsx)(Wc,{children:(0,a.jsx)(qp,{...e})});var Yp=function(){const e=(0,c.useSelect)((e=>e(f.store).getEditorSettings().fontLibraryEnabled),[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Typography"),description:(0,w.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:7,children:[(0,a.jsx)(gc,{title:(0,w.__)("Typesets")}),e&&(0,a.jsx)(Zp,{}),(0,a.jsx)(tc,{}),(0,a.jsx)(vc,{})]})})]})};const{useGlobalStyle:Kp,useGlobalSetting:Xp,useSettingsForBlockElement:Qp,TypographyPanel:Jp}=ne(x.privateApis);function $p({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const s=n.join("."),[i]=Kp(s,void 0,"user",{shouldDecodeEncode:!1}),[r,o]=Kp(s,void 0,"all",{shouldDecodeEncode:!1}),[l]=Xp(""),c=Qp(l,void 0,"heading"===e?t:e);return(0,a.jsx)(Jp,{inheritedValue:r,value:i,onChange:o,settings:c})}const{useGlobalStyle:ef}=ne(x.privateApis);function tf({name:e,element:t,headingLevel:n}){let s="";"heading"===t?s=`elements.${n}.`:t&&"text"!==t&&(s=`elements.${t}.`);const[i]=ef(s+"typography.fontFamily",e),[r]=ef(s+"color.gradient",e),[o]=ef(s+"color.background",e),[l]=ef("color.background"),[c]=ef(s+"color.text",e),[u]=ef(s+"typography.fontSize",e),[d]=ef(s+"typography.fontStyle",e),[h]=ef(s+"typography.fontWeight",e),[p]=ef(s+"typography.letterSpacing",e),f="link"===t?{textDecoration:"underline"}:{};return(0,a.jsx)("div",{className:"edit-site-typography-preview",style:{fontFamily:i??"serif",background:r??o??l,color:c,fontSize:u,fontStyle:d,fontWeight:h,letterSpacing:p,...f},children:"Aa"})}const nf={text:{description:(0,w.__)("Manage the fonts used on the site."),title:(0,w.__)("Text")},link:{description:(0,w.__)("Manage the fonts and typography used on the links."),title:(0,w.__)("Links")},heading:{description:(0,w.__)("Manage the fonts and typography used on headings."),title:(0,w.__)("Headings")},caption:{description:(0,w.__)("Manage the fonts and typography used on captions."),title:(0,w.__)("Captions")},button:{description:(0,w.__)("Manage the fonts and typography used on buttons."),title:(0,w.__)("Buttons")}};var sf=function({element:e}){const[t,n]=(0,h.useState)("heading");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:nf[e].title,description:nf[e].description}),(0,a.jsx)(b.__experimentalSpacer,{marginX:4,children:(0,a.jsx)(tf,{element:e,headingLevel:t})}),"heading"===e&&(0,a.jsx)(b.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,a.jsxs)(b.__experimentalToggleGroupControl,{label:(0,w.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,w.__)("All headings"),label:(0,w._x)("All","heading levels")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,w.__)("Heading 1"),label:(0,w.__)("H1")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,w.__)("Heading 2"),label:(0,w.__)("H2")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,w.__)("Heading 3"),label:(0,w.__)("H3")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,w.__)("Heading 4"),label:(0,w.__)("H4")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,w.__)("Heading 5"),label:(0,w.__)("H5")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,w.__)("Heading 6"),label:(0,w.__)("H6")})]})}),(0,a.jsx)($p,{element:e,headingLevel:t})]})};const{useGlobalStyle:rf}=ne(x.privateApis);var af=function({fontSize:e}){const[t]=rf("typography"),n=e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},s=(0,x.getComputedFluidTypographyValue)(n);return(0,a.jsx)("div",{className:"edit-site-typography-preview",style:{fontSize:s,fontFamily:t?.fontFamily??"serif"},children:(0,w.__)("Aa")})};var of=function({fontSize:e,isOpen:t,toggleOpen:n,handleRemoveFontSize:s}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:(0,w.__)("Delete"),onCancel:()=>{n()},onConfirm:async()=>{n(),s(e)},size:"medium",children:e&&(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})};var lf=function({fontSize:e,toggleOpen:t,handleRename:n}){const[s,i]=(0,h.useState)(e.name);return(0,a.jsx)(b.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,w.__)("Rename"),size:"small",children:(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault(),s.trim()&&n(s),t(),t()},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"3",children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:s,onChange:i,label:(0,w.__)("Name"),placeholder:(0,w.__)("Font size preset name")}),(0,a.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,w.__)("Save")})]})]})})})};const cf=["px","em","rem","vw","vh"];var uf=function({__nextHasNoMarginBottom:e,...t}){const{baseControlProps:n}=(0,b.useBaseControlProps)(t),{value:s,onChange:i,fallbackValue:r,disabled:o,label:l}=t,c=(0,b.__experimentalUseCustomUnits)({availableUnits:cf}),[u,d="px"]=(0,b.__experimentalParseQuantityAndUnitFromRawValue)(s,c),h=!!d&&["em","rem","vw","vh"].includes(d);return(0,a.jsx)(b.BaseControl,{...n,__nextHasNoMarginBottom:!0,children:(0,a.jsxs)(b.Flex,{children:[(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,a.jsx)(b.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l,hideLabelFromVision:!0,value:s,onChange:e=>{i(e)},units:c,min:0,disabled:o})}),(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,a.jsx)(b.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,a.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l,hideLabelFromVision:!0,value:u,initialPosition:r,withInputField:!1,onChange:e=>{i?.(e+d)},min:0,max:h?10:100,step:h?.1:1,disabled:o})})})]})})};const{Menu:df}=ne(b.privateApis),{useGlobalSetting:hf}=ne(x.privateApis);var pf=function(){const[e,t]=(0,h.useState)(!1),[n,s]=(0,h.useState)(!1),{params:{origin:i,slug:r},goBack:o}=(0,b.useNavigator)(),[l,c]=hf("typography.fontSizes"),[u]=hf("typography.fluid"),d=l[i]??[],p=d.find((e=>e.slug===r));if((0,h.useEffect)((()=>{r&&!p&&o()}),[r,p,o]),!i||!r||!p)return null;const f=void 0!==p?.fluid?!!p.fluid:!!u,m="object"==typeof p?.fluid,g=(e,t)=>{const n=d.map((n=>n.slug===r?{...n,[e]:t}:n));c({...l,[i]:n})},v=()=>{t(!e)},y=()=>{s(!n)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(of,{fontSize:p,isOpen:e,toggleOpen:v,handleRemoveFontSize:()=>{const e=d.filter((e=>e.slug!==r));c({...l,[i]:e})}}),n&&(0,a.jsx)(lf,{fontSize:p,toggleOpen:y,handleRename:e=>{g("name",e)}}),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",align:"flex-start",children:[(0,a.jsx)(xl,{title:p.name,description:(0,w.sprintf)((0,w.__)("Manage the font size %s."),p.name)}),"custom"===i&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,a.jsxs)(df,{children:[(0,a.jsx)(df.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Font size options")})}),(0,a.jsxs)(df.Popover,{children:[(0,a.jsx)(df.Item,{onClick:y,children:(0,a.jsx)(df.ItemLabel,{children:(0,w.__)("Rename")})}),(0,a.jsx)(df.Item,{onClick:v,children:(0,a.jsx)(df.ItemLabel,{children:(0,w.__)("Delete")})})]})]})})})]}),(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(af,{fontSize:p})}),(0,a.jsx)(uf,{label:(0,w.__)("Size"),value:m?"":p.size,onChange:e=>{g("size",e)},disabled:m}),(0,a.jsx)(b.ToggleControl,{label:(0,w.__)("Fluid typography"),help:(0,w.__)("Scale the font size dynamically to fit the screen or viewport."),checked:f,onChange:e=>{g("fluid",e)},__nextHasNoMarginBottom:!0}),f&&(0,a.jsx)(b.ToggleControl,{label:(0,w.__)("Custom fluid values"),help:(0,w.__)("Set custom min and max values for the fluid font size."),checked:m,onChange:e=>{g("fluid",!e||{min:p.size,max:p.size})},__nextHasNoMarginBottom:!0}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(uf,{label:(0,w.__)("Minimum"),value:p.fluid?.min,onChange:e=>{g("fluid",{...p.fluid,min:e})}}),(0,a.jsx)(uf,{label:(0,w.__)("Maximum"),value:p.fluid?.max,onChange:e=>{g("fluid",{...p.fluid,max:e})}})]})]})})})]})]})},ff=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var mf=function({text:e,confirmButtonText:t,isOpen:n,toggleOpen:s,onConfirm:i}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:t,onCancel:()=>{s()},onConfirm:async()=>{s(),i()},size:"medium",children:e})};const{Menu:gf}=ne(b.privateApis),{useGlobalSetting:vf}=ne(x.privateApis);function yf({label:e,origin:t,sizes:n,handleAddFontSize:s,handleResetFontSizes:i}){const[r,o]=(0,h.useState)(!1),l=()=>o(!r),c="custom"===t?(0,w.__)("Are you sure you want to remove all custom font size presets?"):(0,w.__)("Are you sure you want to reset all font size presets to their default values?");return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(mf,{text:c,confirmButtonText:"custom"===t?(0,w.__)("Remove"):(0,w.__)("Reset"),isOpen:r,toggleOpen:l,onConfirm:i}),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsxs)(b.FlexItem,{className:"edit-site-global-styles__typography-panel__options-container",children:["custom"===t&&(0,a.jsx)(b.Button,{label:(0,w.__)("Add font size"),icon:ff,size:"small",onClick:s}),!!i&&(0,a.jsxs)(gf,{children:[(0,a.jsx)(gf.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Font size presets options")})}),(0,a.jsx)(gf.Popover,{children:(0,a.jsx)(gf.Item,{onClick:l,children:(0,a.jsx)(gf.ItemLabel,{children:"custom"===t?(0,w.__)("Remove font size presets"):(0,w.__)("Reset font size presets")})})})]})]})]}),!!n.length&&(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:n.map((e=>(0,a.jsx)(Bo,{path:`/typography/font-sizes/${t}/${e.slug}`,children:(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.FlexItem,{className:"edit-site-font-size__item",children:e.name}),(0,a.jsx)(b.FlexItem,{display:"flex",children:(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})})]})},e.slug)))})]})]})}var xf=function(){const[e,t]=vf("typography.fontSizes.theme"),[n]=vf("typography.fontSizes.theme",null,"base"),[s,i]=vf("typography.fontSizes.default"),[r]=vf("typography.fontSizes.default",null,"base"),[o=[],l]=vf("typography.fontSizes.custom"),[c]=vf("typography.defaultFontSizes"),u=()=>{const e=$o(o,"custom-"),t={name:(0,w.sprintf)((0,w.__)("New Font Size %d"),e),size:"16px",slug:`custom-${e}`};l([...o,t])},d=(e,t)=>e.map((e=>e.size)).join("")===t.map((e=>e.size)).join("");return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)(xl,{title:(0,w.__)("Font size presets"),description:(0,w.__)("Create and edit the presets used for font sizes across the site.")}),(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{paddingX:4,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,a.jsx)(yf,{label:(0,w.__)("Theme"),origin:"theme",sizes:e,baseSizes:n,handleAddFontSize:u,handleResetFontSizes:d(e,n)?null:()=>t(n)}),c&&!!s?.length&&(0,a.jsx)(yf,{label:(0,w.__)("Default"),origin:"default",sizes:s,baseSizes:r,handleAddFontSize:u,handleResetFontSizes:d(s,r)?null:()=>i(r)}),(0,a.jsx)(yf,{label:(0,w.__)("Custom"),origin:"custom",sizes:o,handleAddFontSize:u,handleResetFontSizes:o.length>0?()=>l([]):null})]})})})]})};var bf=function({className:e,...t}){return(0,a.jsx)(b.Flex,{className:Ht("edit-site-global-styles__color-indicator-wrapper",e),...t})};const{useGlobalSetting:wf}=ne(x.privateApis),_f=[];var jf=function({name:e}){const[t]=wf("color.palette.custom"),[n]=wf("color.palette.theme"),[s]=wf("color.palette.default"),[i]=wf("color.defaultPalette",e),r=(0,h.useMemo)((()=>[...t||_f,...n||_f,...s&&i?s:_f]),[t,n,s,i]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Palette")}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,a.jsx)(Bo,{path:o,children:(0,a.jsxs)(b.__experimentalHStack,{direction:"row",children:[r.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalZStack,{isLayered:!1,offset:-8,children:r.slice(0,5).map((({color:e},t)=>(0,a.jsx)(bf,{children:(0,a.jsx)(b.ColorIndicator,{colorValue:e})},`${e}-${t}`)))}),(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,w.__)("Edit palette")})]}):(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Add colors")}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})})]})};const{useGlobalStyle:Sf,useGlobalSetting:Cf,useSettingsForBlockElement:kf,ColorPanel:Ef}=ne(x.privateApis);var Pf=function(){const[e]=Sf("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Sf("",void 0,"all",{shouldDecodeEncode:!1}),[s]=Cf(""),i=kf(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Colors"),description:(0,w.__)("Palette colors and the application of those colors on site elements.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:7,children:[(0,a.jsx)(jf,{}),(0,a.jsx)(Ef,{inheritedValue:t,value:e,onChange:n,settings:i})]})})]})},If=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG",children:(0,a.jsx)(Zt.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})});function Vf(){const{paletteColors:e}=re();return e.slice(0,4).map((({slug:e,color:t},n)=>(0,a.jsx)("div",{style:{flexGrow:1,height:"100%",background:t}},`${e}-${n}`)))}const Tf={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}};var Of=({label:e,isFocused:t,withHoverView:n})=>(0,a.jsx)(ll,{label:e,isFocused:t,withHoverView:n,children:({key:e})=>(0,a.jsx)(b.__unstableMotion.div,{variants:Tf,style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(b.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(Vf,{})})},e)});function Af({title:e,gap:t=2}){const n=["color"],s=cc(n);return s?.length<=1?null:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[e&&(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsx)(b.__experimentalGrid,{spacing:t,children:s.map(((e,t)=>(0,a.jsx)(mc,{variation:e,isPill:!0,properties:n,showTooltip:!0,children:()=>(0,a.jsx)(Of,{})},t)))})]})}const{useGlobalSetting:Nf}=ne(x.privateApis),Ff={placement:"bottom-start",offset:8};function Mf({name:e}){const[t,n]=Nf("color.palette.theme",e),[s]=Nf("color.palette.theme",e,"base"),[i,r]=Nf("color.palette.default",e),[o]=Nf("color.palette.default",e,"base"),[l,c]=Nf("color.palette.custom",e),[u]=Nf("color.defaultPalette",e),d=(0,y.useViewportMatch)("small","<")?Ff:void 0,[h]=function(e){const[t,n]=se("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),s=t.map((t=>{const{color:n}=t,s=X(n).rotate(e).toHex();return{...t,color:s}}));n(s)}]:[]}();return(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:8,children:[(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:t!==s,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,w.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),window.__experimentalEnableColorRandomizer&&t?.length>0&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:If,onClick:h,children:(0,w.__)("Randomize colors")})]}),!!i&&!!i.length&&!!u&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,colors:i,onChange:r,paletteLabel:(0,w.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,a.jsx)(b.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,w.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:d}),(0,a.jsx)(Af,{title:(0,w.__)("Palettes")})]})}const{useGlobalSetting:Bf}=ne(x.privateApis),Df={placement:"bottom-start",offset:8},Rf=()=>{};function Lf({name:e}){const[t,n]=Bf("color.gradients.theme",e),[s]=Bf("color.gradients.theme",e,"base"),[i,r]=Bf("color.gradients.default",e),[o]=Bf("color.gradients.default",e,"base"),[l,c]=Bf("color.gradients.custom",e),[u]=Bf("color.defaultGradients",e),[d]=Bf("color.duotone.custom")||[],[h]=Bf("color.duotone.default")||[],[p]=Bf("color.duotone.theme")||[],[f]=Bf("color.defaultDuotone"),m=[...d||[],...p||[],...h&&f?h:[]],g=(0,y.useViewportMatch)("small","<")?Df:void 0;return(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:t!==s,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,w.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!i&&!!i.length&&!!u&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,gradients:i,onChange:r,paletteLabel:(0,w.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,a.jsx)(b.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,w.__)("Custom"),paletteLabelLevel:3,slugPrefix:"custom-",popoverProps:g}),!!m&&!!m.length&&(0,a.jsxs)("div",{children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Duotone")}),(0,a.jsx)(b.__experimentalSpacer,{margin:3}),(0,a.jsx)(b.DuotonePicker,{duotonePalette:m,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:Rf})]})]})}const{Tabs:zf}=ne(b.privateApis);var Hf=function({name:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Edit palette"),description:(0,w.__)("The combination of colors used across the site and in color pickers.")}),(0,a.jsxs)(zf,{children:[(0,a.jsxs)(zf.TabList,{children:[(0,a.jsx)(zf.Tab,{tabId:"color",children:(0,w.__)("Color")}),(0,a.jsx)(zf.Tab,{tabId:"gradient",children:(0,w.__)("Gradient")})]}),(0,a.jsx)(zf.TabPanel,{tabId:"color",focusable:!1,children:(0,a.jsx)(Mf,{name:e})}),(0,a.jsx)(zf.TabPanel,{tabId:"gradient",focusable:!1,children:(0,a.jsx)(Lf,{name:e})})]})]})};const Gf={backgroundSize:"auto"},{useGlobalStyle:Wf,useGlobalSetting:Uf,BackgroundPanel:qf}=ne(x.privateApis);function Zf(){const[e]=Wf("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Wf("",void 0,"all",{shouldDecodeEncode:!1}),[s]=Uf("");return(0,a.jsx)(qf,{inheritedValue:t,value:e,onChange:n,settings:s,defaultValues:Gf})}const{useHasBackgroundPanel:Yf,useGlobalSetting:Kf}=ne(x.privateApis);var Xf=function(){const[e]=Kf(""),t=Yf(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Background"),description:(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Set styles for the site’s background.")})}),t&&(0,a.jsx)(Zf,{})]})};var Qf=function({text:e,confirmButtonText:t,isOpen:n,toggleOpen:s,onConfirm:i}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:t,onCancel:()=>{s()},onConfirm:async()=>{s(),i()},size:"medium",children:e})};const{useGlobalSetting:Jf}=ne(x.privateApis),{Menu:$f}=ne(b.privateApis),em="6px 6px 9px rgba(0, 0, 0, 0.2)";function tm(){const[e]=Jf("shadow.presets.default"),[t]=Jf("shadow.defaultPresets"),[n]=Jf("shadow.presets.theme"),[s,i]=Jf("shadow.presets.custom"),[r,o]=(0,h.useState)(!1),l=()=>o(!r);return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(Qf,{text:(0,w.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,w.__)("Remove"),isOpen:r,toggleOpen:l,onConfirm:()=>{i([])}}),(0,a.jsx)(xl,{title:(0,w.__)("Shadows"),description:(0,w.__)("Manage and create shadow styles for use across the site.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles__shadows-panel",spacing:7,children:[t&&(0,a.jsx)(nm,{label:(0,w.__)("Default"),shadows:e||[],category:"default"}),n&&n.length>0&&(0,a.jsx)(nm,{label:(0,w.__)("Theme"),shadows:n||[],category:"theme"}),(0,a.jsx)(nm,{label:(0,w.__)("Custom"),shadows:s||[],category:"custom",canCreate:!0,onCreate:e=>{i([...s||[],e])},onReset:l})]})})]})}function nm({label:e,shadows:t,category:n,canCreate:s,onCreate:i,onReset:r}){return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsxs)(b.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:[s&&(0,a.jsx)(b.Button,{size:"small",icon:ff,label:(0,w.__)("Add shadow"),onClick:()=>{(()=>{const e=$o(t,"shadow-");i({name:(0,w.sprintf)((0,w.__)("Shadow %s"),e),shadow:em,slug:`shadow-${e}`})})()}}),!!t?.length&&"custom"===n&&(0,a.jsxs)($f,{children:[(0,a.jsx)($f.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Shadow options")})}),(0,a.jsx)($f.Popover,{children:(0,a.jsx)($f.Item,{onClick:r,children:(0,a.jsx)($f.ItemLabel,{children:(0,w.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((e=>(0,a.jsx)(sm,{shadow:e,category:n},e.slug)))})]})}function sm({shadow:e,category:t}){return(0,a.jsx)(Bo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.FlexItem,{children:e.name}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})}var im=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M7 11.5h10V13H7z"})});const{useGlobalSetting:rm}=ne(x.privateApis),{Menu:am}=ne(b.privateApis),om=[{label:(0,w.__)("Rename"),action:"rename"},{label:(0,w.__)("Delete"),action:"delete"}],lm=[{label:(0,w.__)("Reset"),action:"reset"}];function cm(){const{goBack:e,params:{category:t,slug:n}}=(0,b.useNavigator)(),[s,i]=rm(`shadow.presets.${t}`);(0,h.useEffect)((()=>{const t=s?.some((e=>e.slug===n));n&&!t&&e()}),[s,n,e]);const[r]=rm(`shadow.presets.${t}`,void 0,"base"),[o,l]=(0,h.useState)((()=>(s||[]).find((e=>e.slug===n)))),c=(0,h.useMemo)((()=>(r||[]).find((e=>e.slug===n))),[r,n]),[u,d]=(0,h.useState)(!1),[p,f]=(0,h.useState)(!1),[m,g]=(0,h.useState)(o.name);if(!t||!n)return null;return o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(xl,{title:o.name}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,a.jsxs)(am,{children:[(0,a.jsx)(am.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Menu")})}),(0,a.jsx)(am.Popover,{children:("custom"===t?om:lm).map((e=>(0,a.jsx)(am.Item,{onClick:()=>(e=>{if("reset"===e){const e=s.map((e=>e.slug===n?c:e));l(c),i(e)}else"delete"===e?d(!0):"rename"===e&&f(!0)})(e.action),disabled:"reset"===e.action&&o.shadow===c.shadow,children:(0,a.jsx)(am.ItemLabel,{children:e.label})},e.action)))})]})})})]}),(0,a.jsxs)("div",{className:"edit-site-global-styles-screen",children:[(0,a.jsx)(um,{shadow:o.shadow}),(0,a.jsx)(dm,{shadow:o.shadow,onChange:e=>{l({...o,shadow:e});const t=s.map((t=>t.slug===n?{...o,shadow:e}:t));i(t)}})]}),u&&(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{i(s.filter((e=>e.slug!==n))),d(!1)},onCancel:()=>{d(!1)},confirmButtonText:(0,w.__)("Delete"),size:"medium",children:(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" shadow preset?'),o.name)}),p&&(0,a.jsx)(b.Modal,{title:(0,w.__)("Rename"),onRequestClose:()=>f(!1),size:"small",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),(e=>{if(!e)return;const t=s.map((t=>t.slug===n?{...o,name:e}:t));l({...o,name:e}),i(t)})(m),f(!1)},children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,w.__)("Name"),placeholder:(0,w.__)("Shadow name"),value:m,onChange:e=>g(e)}),(0,a.jsx)(b.__experimentalSpacer,{marginBottom:6}),(0,a.jsxs)(b.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>f(!1),children:(0,w.__)("Cancel")})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,w.__)("Save")})})]})]})})]}):(0,a.jsx)(xl,{title:""})}function um({shadow:e}){const t={boxShadow:e};return(0,a.jsx)(b.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,a.jsx)(b.__experimentalHStack,{align:"center",justify:"center",className:"edit-site-global-styles__shadow-preview-panel",children:(0,a.jsx)("div",{className:"edit-site-global-styles__shadow-preview-block",style:t})})})}function dm({shadow:e,onChange:t}){const n=(0,h.useRef)(),s=(0,h.useMemo)((()=>function(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map((e=>e.trim()))}(e)),[e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalVStack,{spacing:2,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Shadows")}),(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:(0,a.jsx)(b.Button,{size:"small",icon:ff,label:(0,w.__)("Add shadow"),onClick:()=>{t([...s,em].join(", "))},ref:n})})]})}),(0,a.jsx)(b.__experimentalSpacer,{}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:s.map(((e,i)=>(0,a.jsx)(hm,{shadow:e,onChange:e=>((e,n)=>{const i=[...s];i[e]=n,t(i.join(", "))})(i,e),canRemove:s.length>1,onRemove:()=>(e=>{t(s.filter(((t,n)=>n!==e)).join(", ")),n.current.focus()})(i)},i)))})]})}function hm({shadow:e,onChange:t,canRemove:n,onRemove:s}){const i=(0,h.useMemo)((()=>function(e){const t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e)return t;if(e.includes("none"))return t;const n=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,s=e.match(n)||[];if(1!==s.length)return t;const i=s[0].split(" ").map((e=>e.trim())).filter((e=>e));if(i.length<2)return t;const r=e.match(/inset/gi)||[];if(r.length>1)return t;const a=1===r.length;let o=e.replace(n,"").trim();a&&(o=o.replace("inset","").replace("INSET","").trim());let l=(o.match(/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi)||[]).map((e=>e?.trim())).filter((e=>e));if(l.length>1)return t;if(0===l.length&&(l=o.trim().split(" ").filter((e=>e)),l.length>1))return t;const[c,u,d,h]=i;return{x:c,y:u,blur:d||t.blur,spread:h||t.spread,inset:a,color:o||t.color}}(e)),[e]),r=e=>{t(function(e){const t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}(e))};return(0,a.jsx)(b.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"edit-site-global-styles__shadow-editor__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const r={onClick:e,className:Ht("edit-site-global-styles__shadow-editor__dropdown-toggle",{"is-open":t}),"aria-expanded":t},o={onClick:()=>{t&&e(),s()},className:Ht("edit-site-global-styles__shadow-editor__remove-button",{"is-open":t}),label:(0,w.__)("Remove shadow")};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,icon:zo,...r,children:i.inset?(0,w.__)("Inner shadow"):(0,w.__)("Drop shadow")}),n&&(0,a.jsx)(b.Button,{size:"small",icon:im,...o})]})},renderContent:()=>(0,a.jsx)(b.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"edit-site-global-styles__shadow-editor__dropdown-content",children:(0,a.jsx)(pm,{shadowObj:i,onChange:r})})})}function pm({shadowObj:e,onChange:t}){const n=(n,s)=>{const i={...e,[n]:s};t(i)};return(0,a.jsxs)(b.__experimentalVStack,{spacing:4,className:"edit-site-global-styles__shadow-editor-panel",children:[(0,a.jsx)(b.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:e=>n("color",e)}),(0,a.jsxs)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:e.inset?"inset":"outset",isBlock:!0,onChange:e=>n("inset","inset"===e),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"outset",label:(0,w.__)("Outset")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"inset",label:(0,w.__)("Inset")})]}),(0,a.jsxs)(b.__experimentalGrid,{columns:2,gap:4,children:[(0,a.jsx)(fm,{label:(0,w.__)("X Position"),value:e.x,onChange:e=>n("x",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Y Position"),value:e.y,onChange:e=>n("y",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Blur"),value:e.blur,onChange:e=>n("blur",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Spread"),value:e.spread,onChange:e=>n("spread",e)})]})]})}function fm({label:e,value:t,onChange:n}){return(0,a.jsx)(b.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:e=>{const t=void 0!==e&&!isNaN(parseFloat(e));n(t?e:"0px")}})}function mm(){return(0,a.jsx)(tm,{})}function gm(){return(0,a.jsx)(cm,{})}const{useGlobalStyle:vm,useGlobalSetting:ym,useSettingsForBlockElement:xm,DimensionsPanel:bm}=ne(x.privateApis),wm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function _m(){const[e]=vm("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=vm("",void 0,"all",{shouldDecodeEncode:!1}),[s]=ym("",void 0,"user"),[i,r]=ym(""),o=xm(i),l=(0,h.useMemo)((()=>({...t,layout:o.layout})),[t,o.layout]),c=(0,h.useMemo)((()=>({...e,layout:s.layout})),[e,s.layout]);return(0,a.jsx)(bm,{inheritedValue:l,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==s.layout){const t={...s,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,r(t)}},settings:o,includeLayoutControls:!0,defaultControls:wm})}const{useHasDimensionsPanel:jm,useGlobalSetting:Sm,useSettingsForBlockElement:Cm}=ne(x.privateApis);var km=function(){const[e]=Sm(""),t=Cm(e),n=jm(t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Layout")}),n&&(0,a.jsx)(_m,{})]})};const{GlobalStylesContext:Em}=ne(x.privateApis);function Pm({gap:e=2}){const{user:t}=(0,h.useContext)(Em),n=t?.styles,s=(0,c.useSelect)((e=>e(j.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),i=s?.filter((e=>!dc(e,["color"])&&!dc(e,["typography","spacing"]))),r=(0,h.useMemo)((()=>[...[{title:(0,w.__)("Default"),settings:{},styles:{}},...i??[]].map((e=>{const t={...e?.styles?.blocks};n?.blocks&&Object.keys(n.blocks).forEach((e=>{if(n.blocks[e].css){const s=t[e]||{},i={css:`${t[e]?.css||""} ${n.blocks[e].css.trim()||""}`};t[e]={...s,...i}}}));const s=n?.css||e.styles?.css?{css:`${e.styles?.css||""} ${n?.css||""}`}:{},i=Object.keys(t).length>0?{blocks:t}:{},r={...e.styles,...s,...i};return{...e,settings:e.settings??{},styles:r}}))]),[i,n?.blocks,n?.css]);return!i||i?.length<1?null:(0,a.jsx)(b.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container",gap:e,children:r.map(((e,t)=>(0,a.jsx)(mc,{variation:e,children:t=>(0,a.jsx)(pl,{label:e?.title,withHoverView:!0,isFocused:t,variation:e})},t)))})}function Im(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:10,className:"edit-site-global-styles-variation-container",children:[(0,a.jsx)(Pm,{gap:3}),(0,a.jsx)(Af,{title:(0,w.__)("Palettes"),gap:3}),(0,a.jsx)(gc,{title:(0,w.__)("Typography"),gap:3})]})}const{useZoomOut:Vm}=ne(x.privateApis);var Tm=function(){const e=(0,c.useSelect)((e=>e(x.store).getSettings().isPreviewMode),[]);return Vm(!e),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Browse styles"),description:(0,w.__)("Choose a variation to change the look of the site.")}),(0,a.jsx)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations",children:(0,a.jsx)(b.CardBody,{children:(0,a.jsx)(Im,{})})})]})};const Om=window.wp.mediaUtils,Am=[{slug:"theme-colors",title:(0,w.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,w.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,w.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,w.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,w.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,w.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,w.__)("Default Gradients"),origin:"default",type:"gradients"}],Nm=[{slug:"site-identity",title:(0,w.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,w.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,w.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,w.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],Fm=[{slug:"overview",title:(0,w.__)("Overview"),blocks:[]},{slug:"text",title:(0,w.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,w.__)("Colors"),blocks:[]},{slug:"theme",title:(0,w.__)("Theme"),subcategories:Nm},{slug:"media",title:(0,w.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,w.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,w.__)("Embeds"),include:[]}],Mm=[...Nm,{slug:"media",title:(0,w.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,w.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,w.__)("Embeds"),include:[]}],Bm=[{slug:"overview",title:(0,w.__)("Overview"),blocks:[]},{slug:"text",title:(0,w.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,w.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,w.__)("All Blocks"),blocks:[],subcategories:Mm}];function Dm(e,t){if(!e?.slug||!t?.length)return;const n=e?.subcategories??[];if(n.length)return n.reduce(((e,n)=>{const s=Dm(n,t);return s&&(e.subcategories||(e.subcategories=[]),e.subcategories=[...e.subcategories,s]),e}),{title:e.title,slug:e.slug});const s=e?.blocks||[],i=e?.exclude||[],r=t.filter((t=>!i.includes(t.name)&&(t.category===e.slug||s.includes(t.name))));return r.length?{title:e.title,slug:e.slug,examples:r}:void 0}function Rm(){const e=[...Nm,...Fm].map((({slug:e})=>e)),t=(0,o.getCategories)().filter((({slug:t})=>!e.includes(t)));return[...Fm,...t]}var Lm=({colors:e,type:t,templateColumns:n="1fr 1fr",itemHeight:s="52px"})=>e?(0,a.jsx)(b.__experimentalGrid,{templateColumns:n,rowGap:8,columnGap:16,children:e.map((e=>{const n="gradients"===t?(0,x.__experimentalGetGradientClass)(e.slug):(0,x.getColorClassName)("background-color",e.slug),i=Ht("edit-site-style-book__color-example",n);return(0,a.jsx)(Zt.View,{className:i,style:{height:s}},e.slug)}))}):null;var zm=({duotones:e})=>e?(0,a.jsx)(b.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map((e=>(0,a.jsxs)(b.__experimentalGrid,{className:"edit-site-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,a.jsx)(Zt.View,{children:(0,a.jsx)("img",{alt:`Duotone example: ${e.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${e.slug})`}})}),e.colors.map((e=>(0,a.jsx)(Zt.View,{className:"edit-site-style-book__color-example",style:{backgroundColor:e}},e)))]},e.slug)))}):null;function Hm(e){const t=(0,o.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:s}=e;return"core/heading"!==t&&!!n&&!1!==s?.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,o.getBlockFromExample)(e.name,{...e.example,attributes:{...e.example.attributes,style:void 0}})})));if(!!!(0,o.getBlockType)("core/heading"))return t;const n={name:"core/heading",title:(0,w.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map((e=>(0,o.createBlock)("core/heading",{content:(0,w.sprintf)((0,w.__)("Heading %d"),e),level:e})))},s=function(e){if(!e)return[];const t=[];return Am.forEach((n=>{const s=e[n.type],i=Array.isArray(s)?s.find((e=>e.slug===n.origin)):void 0;if(i?.[n.type]){const e={name:n.slug,title:n.title,category:"colors"};"duotones"===n.type?(e.content=(0,a.jsx)(zm,{duotones:i[n.type]}),t.push(e)):(e.content=(0,a.jsx)(Lm,{colors:i[n.type],type:n.type}),t.push(e))}})),t}(e),i=function(e){const t=[],n=Array.isArray(e?.colors)?e.colors.find((e=>"theme"===e.slug)):void 0;if(n){const e={name:"theme-colors",title:(0,w.__)("Colors"),category:"overview",content:(0,a.jsx)(Lm,{colors:n.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(e)}const s=[];if((0,o.getBlockType)("core/heading")){const e=(0,o.createBlock)("core/heading",{content:(0,w.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(…)},.-<>?!*&:/A@HELFO™©"),level:1});s.push(e)}if((0,o.getBlockType)("core/paragraph")){const e=(0,o.createBlock)("core/paragraph",{content:(0,w.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),t=(0,o.createBlock)("core/paragraph",{content:(0,w.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,o.getBlockType)("core/group")){const n=(0,o.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[e,t]);s.push(n)}else s.push(e)}return s.length&&t.push({name:"typography",title:(0,w.__)("Typography"),category:"overview",blocks:s}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach((e=>{const n=(0,o.getBlockType)(e);if(n&&n.example){const s={name:e,title:n.title,category:"overview",blocks:(0,o.getBlockFromExample)(e,{...n.example,attributes:{...n.example.attributes,style:void 0}})};t.push(s)}})),t}(e);return[n,...s,...t,...i]}function Gm({breadcrumbs:e,badges:t,title:n,subTitle:s,actions:i}){return(0,a.jsxs)(b.__experimentalVStack,{className:"admin-ui-page__header",as:"header",children:[(0,a.jsxs)(b.__experimentalHStack,{className:"admin-ui-page__header-title",justify:"space-between",spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[n&&(0,a.jsx)(b.__experimentalHeading,{as:"h2",level:3,weight:500,truncate:!0,children:n}),e,t]}),(0,a.jsx)(b.__experimentalHStack,{style:{width:"auto",flexShrink:0},spacing:2,className:"admin-ui-page__header-actions",children:i})]}),s&&(0,a.jsx)("p",{className:"admin-ui-page__header-subtitle",children:s})]})}var Wm=function({breadcrumbs:e,badges:t,title:n,subTitle:s,children:i,className:r,actions:o,hasPadding:l=!1}){const c=Ht("admin-ui-page",r);return(0,a.jsxs)(Wt,{className:c,ariaLabel:n,children:[(n||e||t)&&(0,a.jsx)(Gm,{breadcrumbs:e,badges:t,title:n,subTitle:s,actions:o}),l?(0,a.jsx)("div",{className:"admin-ui-page__content has-padding",children:i}):i]})};const{useLocation:Um,useHistory:qm}=ne(Lt.privateApis),Zm=({isStyleBookOpened:e,setIsStyleBookOpened:t,path:n})=>{const s=qm(),i=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return!!i?._links?.["wp:action-edit-css"]}),[]);return(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.Button,{isPressed:e,icon:Ao,label:(0,w.__)("Style Book"),onClick:()=>{t(!e);const i=e?(0,Qt.removeQueryArgs)(n,"preview"):(0,Qt.addQueryArgs)(n,{preview:"stylebook"});s.navigate(i)},size:"compact"}),i&&(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("More"),toggleProps:{size:"compact"},children:({onClose:e})=>(0,a.jsx)(b.MenuGroup,{children:i&&(0,a.jsx)(b.MenuItem,{onClick:()=>{e(),s.navigate((0,Qt.addQueryArgs)(n,{section:"/css"}))},children:(0,w.__)("Additional CSS")})})})]})},Ym=()=>{const{path:e,query:t}=Um(),n=qm();return(0,h.useMemo)((()=>[t.section??"/",t=>{n.navigate((0,Qt.addQueryArgs)(e,{section:t}))}]),[e,t.section,n])};function Km(){const{path:e}=Um(),[t,n]=(0,h.useState)(e.includes("preview=stylebook")),s=(0,y.useViewportMatch)("medium","<"),[i,r]=Ym();return(0,a.jsx)(Wm,{actions:s?null:(0,a.jsx)(Zm,{isStyleBookOpened:t,setIsStyleBookOpened:n,path:e}),className:"edit-site-styles",title:(0,w.__)("Styles"),children:(0,a.jsx)(Wg,{path:i,onPathChange:r})})}const{ExperimentalBlockEditorProvider:Xm,useGlobalStyle:Qm,GlobalStylesContext:Jm,useGlobalStylesOutputWithConfig:$m}=ne(x.privateApis),{mergeBaseAndUserConfigs:eg}=ne(f.privateApis),{Tabs:tg}=ne(b.privateApis);function ng(e){return!e||0===Object.keys(e).length}const sg=(e,t)=>{if(!e||!t||!t?.contentDocument)return;const n="top"===e?t.contentDocument.body:t.contentDocument.getElementById(e);n&&n.scrollIntoView({behavior:"smooth"})},ig=e=>e&&"string"==typeof e&&("/"===e||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function rg(){const{colors:e,gradients:t}=(0,x.__experimentalUseMultipleOriginColorsAndGradients)(),[n,s,i,r]=(0,x.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,h.useMemo)((()=>{const a={colors:e,gradients:t,duotones:[]};return i&&i.length&&a.duotones.push({name:(0,w._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:i}),n&&r&&r.length&&a.duotones.push({name:(0,w._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:r}),s&&s.length&&a.duotones.push({name:(0,w._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:s}),a}),[e,t,s,i,r,n])}function ag(e){const t=[],n=Dm({slug:"overview"},e);t.push(...n.examples);const s=e.filter((e=>"overview"!==e.category&&!n.examples.find((t=>t.name===e.name))));return t.push(...s),t}function og(e,t){return t?e.map((e=>({...e,variation:t,blocks:Array.isArray(e.blocks)?e.blocks.map((e=>({...e,attributes:{...e.attributes,style:void 0,className:Jo(t)}}))):{...e.blocks,attributes:{...e.blocks.attributes,style:void 0,className:Jo(t)}}}))):e}const lg=({userConfig:e={},isStatic:t=!1})=>{const n=(0,c.useSelect)((e=>e(Rt).getSettings()),[]),s=(0,c.useSelect)((e=>e(j.store).canUser("create",{kind:"postType",name:"attachment"})),[]);(0,h.useEffect)((()=>{(0,c.dispatch)(x.store).updateSettings({...n,mediaUpload:s?Om.uploadMedia:void 0})}),[n,s]);const[i,r]=Ym(),o=Hm(rg()),l=ag(o);let u=null,d=null;if(i.includes("/colors"))u="colors";else if(i.includes("/typography"))u="text";else if(i.includes("/blocks")){u="blocks";let e=decodeURIComponent(i).split("/blocks/")[1];e?.includes("/variations")&&([e,d]=e.split("/variations/")),e&&o.find((t=>t.name===e))&&(u=e)}else t||(u="overview");const p=Bm.find((e=>e.slug===u)),f=(0,h.useMemo)((()=>p?Dm(p,o):{examples:[o.find((e=>e.name===u))]}),[p,o,u]),m=(0,h.useMemo)((()=>u?d?{examples:og(f.examples,d)}:f:{examples:l}),[u,l,d,f]),{base:g}=(0,h.useContext)(Jm),v=ig(i),y=(0,h.useMemo)((()=>ng(e)||ng(g)?{}:eg(g,e)),[g,e]),[b]=$m(y),w=(0,h.useMemo)((()=>({...n,styles:ng(b)||ng(e)?n.styles:b,isPreviewMode:!0})),[b,n,e]);return(0,a.jsx)("div",{className:"edit-site-style-book",children:(0,a.jsxs)(x.BlockEditorProvider,{settings:w,children:[(0,a.jsx)(wo,{disableRootPadding:!0}),(0,a.jsx)(cg,{examples:m,settings:w,goTo:v,isSelected:t?null:e=>i===`/blocks/${encodeURIComponent(e)}`||i.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t?null:(e,t=!1)=>{Am.find((t=>t.slug===e))?r("/colors/palette"):"typography"!==e?t||r(`/blocks/${encodeURIComponent(e)}`):r("/typography")}})]})})},cg=({examples:e,isSelected:t,onClick:n,onSelect:s,settings:i,title:r,goTo:o})=>{const[l,c]=(0,h.useState)(!1),[u,d]=(0,h.useState)(!1),p=(0,h.useRef)(null),f={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!n||t!==Xt.ENTER&&t!==Xt.SPACE||(e.preventDefault(),n(e))},onClick:e=>{e.defaultPrevented||n&&(e.preventDefault(),n(e))},readonly:!0};return(0,h.useLayoutEffect)((()=>{u&&p?.current&&o?.top&&sg("top",p?.current)}),[p?.current,o,sg,u]),(0,a.jsxs)(x.__unstableIframe,{onLoad:()=>d(!0),ref:p,className:Ht("edit-site-style-book__iframe",{"is-focused":l&&!!n,"is-button":!!n}),name:"style-book-canvas",tabIndex:0,...n?f:{},children:[(0,a.jsx)(x.__unstableEditorStyles,{styles:i.styles}),(0,a.jsxs)("style",{children:['\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n\n\n\t.edit-site-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.edit-site-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.edit-site-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title,\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tpadding-bottom: 8px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n',!!n&&"body { cursor: pointer; } body * { pointer-events: none; }"]}),(0,a.jsx)(ug,{className:"edit-site-style-book__examples",filteredExamples:e,label:r?(0,w.sprintf)((0,w.__)("Examples of blocks in the %s category"),r):(0,w.__)("Examples of blocks"),isSelected:t,onSelect:s},r)]})},ug=(0,h.memo)((({className:e,filteredExamples:t,label:n,isSelected:s,onSelect:i})=>(0,a.jsxs)(b.Composite,{orientation:"vertical",className:e,"aria-label":n,role:"grid",children:[!!t?.examples?.length&&t.examples.map((e=>(0,a.jsx)(pg,{id:`example-${e.name}`,title:e.title,content:e.content,blocks:e.blocks,isSelected:s?.(e.name),onClick:i?()=>i(e.name,!!e.variation):null},e.name))),!!t?.subcategories?.length&&t.subcategories.map((e=>(0,a.jsxs)(b.Composite.Group,{className:"edit-site-style-book__subcategory",children:[(0,a.jsx)(b.Composite.GroupLabel,{children:(0,a.jsx)("h2",{className:"edit-site-style-book__subcategory-title",children:e.title})}),(0,a.jsx)(dg,{examples:e.examples,isSelected:s,onSelect:i})]},`subcategory-${e.slug}`)))]}))),dg=({examples:e,isSelected:t,onSelect:n})=>!!e?.length&&e.map((e=>(0,a.jsx)(pg,{id:`example-${e.name}`,title:e.title,content:e.content,blocks:e.blocks,isSelected:t?.(e.name),onClick:n?()=>n(e.name):null},e.name))),hg=["example-duotones"],pg=({id:e,title:t,blocks:n,isSelected:s,onClick:i,content:r})=>{const o=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),l=(0,h.useMemo)((()=>({...o,focusMode:!1,isPreviewMode:!0})),[o]),u=(0,h.useMemo)((()=>Array.isArray(n)?n:[n]),[n]),d=hg.includes(e)||!i?{disabled:!0,accessibleWhenDisabled:!!i}:{};return(0,a.jsx)("div",{role:"row",children:(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsxs)(b.Composite.Item,{className:Ht("edit-site-style-book__example",{"is-selected":s,"is-disabled-example":!!d?.disabled}),id:e,"aria-label":i?(0,w.sprintf)((0,w.__)("Open %s styles in Styles panel"),t):void 0,render:(0,a.jsx)("div",{}),role:i?"button":null,onClick:i,...d,children:[(0,a.jsx)("span",{className:"edit-site-style-book__example-title",children:t}),(0,a.jsx)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0,children:(0,a.jsx)(b.Disabled,{className:"edit-site-style-book__example-preview__content",children:r||(0,a.jsxs)(Xm,{value:u,settings:l,children:[(0,a.jsx)(x.__unstableEditorStyles,{}),(0,a.jsx)(x.BlockList,{renderAppender:!1})]})})})]})})})};var fg=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:s,showCloseButton:i=!0,onClose:r,showTabs:o=!0,userConfig:l={},path:u=""}){const[d]=Qm("color.text"),[p]=Qm("color.background"),f=rg(),m=(0,h.useMemo)((()=>Hm(f)),[f]),g=(0,h.useMemo)((()=>Rm().filter((e=>m.some((t=>t.category===e.slug))))),[m]),v=ag(m),{base:y}=(0,h.useContext)(Jm),b=ig(u),_=(0,h.useMemo)((()=>ng(l)||ng(y)?{}:eg(y,l)),[y,l]),j=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),[S]=$m(_),C=(0,h.useMemo)((()=>({...j,styles:ng(S)||ng(l)?j.styles:S,isPreviewMode:!0})),[S,j,l]);return(0,a.jsx)(Oa,{onClose:r,enableResizing:e,closeButtonLabel:i?(0,w.__)("Close"):null,children:(0,a.jsx)("div",{className:Ht("edit-site-style-book",{"is-button":!!n}),style:{color:d,background:p},children:o?(0,a.jsxs)(tg,{children:[(0,a.jsx)("div",{className:"edit-site-style-book__tablist-container",children:(0,a.jsx)(tg.TabList,{children:g.map((e=>(0,a.jsx)(tg.Tab,{tabId:e.slug,children:e.title},e.slug)))})}),g.map((e=>{const n=e.slug?Rm().find((t=>t.slug===e.slug)):null,i=n?Dm(n,m):{examples:m};return(0,a.jsx)(tg.TabPanel,{tabId:e.slug,focusable:!1,className:"edit-site-style-book__tabpanel",children:(0,a.jsx)(cg,{category:e.slug,examples:i,isSelected:t,onSelect:s,settings:C,title:e.title,goTo:b})},e.slug)}))]}):(0,a.jsx)(cg,{examples:{examples:v},isSelected:t,onClick:n,onSelect:s,settings:C,goTo:b})})})};const{useGlobalStyle:mg,AdvancedPanel:gg}=ne(x.privateApis);var vg=function(){const[e]=mg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=mg("",void 0,"all",{shouldDecodeEncode:!1}),{setEditorCanvasContainerView:s}=ne((0,c.useDispatch)(Rt));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Additional CSS"),description:(0,a.jsxs)(a.Fragment,{children:[(0,w.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,a.jsx)("br",{}),(0,a.jsx)(b.ExternalLink,{href:(0,w.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"edit-site-global-styles-screen-css-help-link",children:(0,w.__)("Learn more about CSS")})]}),onBack:()=>{s(void 0)}}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen-css",children:(0,a.jsx)(gg,{value:e,onChange:n,inheritedValue:t})})]})};const{ExperimentalBlockEditorProvider:yg,GlobalStylesContext:xg,useGlobalStylesOutputWithConfig:bg,__unstableBlockStyleVariationOverridesWithConfig:wg}=ne(x.privateApis),{mergeBaseAndUserConfigs:_g}=ne(f.privateApis);function jg(e){return!e||0===Object.keys(e).length}var Sg=function({userConfig:e,blocks:t}){const{base:n}=(0,h.useContext)(xg),s=(0,h.useMemo)((()=>jg(e)||jg(n)?{}:_g(n,e)),[n,e]),i=(0,h.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),r=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),o=(0,h.useMemo)((()=>({...r,isPreviewMode:!0})),[r]),[l]=bg(s),u=jg(l)||jg(e)?o.styles:l;return(0,a.jsx)(Oa,{title:(0,w.__)("Revisions"),closeButtonLabel:(0,w.__)("Close revisions"),enableResizing:!0,children:(0,a.jsxs)(x.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,a.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,a.jsx)(b.Disabled,{className:"edit-site-revisions__example-preview__content",children:(0,a.jsxs)(yg,{value:i,settings:o,children:[(0,a.jsx)(x.BlockList,{renderAppender:!1}),(0,a.jsx)(x.__unstableEditorStyles,{styles:u}),(0,a.jsx)(wg,{config:s})]})})]})})};const Cg=window.wp.date,{getGlobalStylesChanges:kg}=ne(x.privateApis);function Eg({revision:e,previousRevision:t}){const n=kg(e,t,{maxResults:7});return n.length?(0,a.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes",children:n.map((e=>(0,a.jsx)("li",{children:e},e)))}):null}var Pg=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:s,onApplyRevision:i}){const{currentThemeName:r,currentUser:o}=(0,c.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(j.store),s=t();return{currentThemeName:s?.name?.rendered||s?.stylesheet,currentUser:n()}}),[]),l=(0,Cg.getDate)().getTime(),{datetimeAbbreviated:u}=(0,Cg.getSettings)().formats;return(0,a.jsx)(b.Composite,{orientation:"vertical",className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,w.__)("Global styles revisions list"),role:"listbox",children:e.map(((c,d)=>{const{id:h,author:p,modified:f}=c,m="unsaved"===h,g=m?o:p,v=g?.name||(0,w.__)("User"),y=g?.avatar_urls?.[48],x=t?t===h:0===d,_=!s&&x,j="parent"===h,S=(0,Cg.getDate)(f),C=f&&l-S.getTime()>864e5?(0,Cg.dateI18n)(u,S):(0,Cg.humanTimeDiff)(f),k=function(e,t,n,s){return"parent"===e?(0,w.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,w.sprintf)((0,w.__)("Unsaved changes by %s"),t):s?(0,w.sprintf)((0,w.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,w.sprintf)((0,w.__)("Changes saved by %1$s on %2$s"),t,n)}(h,v,(0,Cg.dateI18n)(u,S),_);return(0,a.jsxs)(b.Composite.Item,{className:"edit-site-global-styles-screen-revisions__revision-item","aria-current":x,role:"option",onKeyDown:e=>{const{keyCode:t}=e;t!==Xt.ENTER&&t!==Xt.SPACE||n(c)},onClick:e=>{e.preventDefault(),n(c)},"aria-selected":x,"aria-label":k,render:(0,a.jsx)("div",{}),children:[(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__revision-item-wrapper",children:j?(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[(0,w.__)("Default styles"),(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:r})]}):(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[m?(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__date",children:(0,w.__)("(Unsaved)")}):(0,a.jsx)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:f,children:C}),(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:[(0,a.jsx)("img",{alt:v,src:y}),v]}),x&&(0,a.jsx)(Eg,{revision:c,previousRevision:d<e.length?e[d+1]:{}})]})}),x&&(_?(0,a.jsx)("p",{className:"edit-site-global-styles-screen-revisions__applied-text",children:(0,w.__)("These styles are already applied to your site.")}):(0,a.jsx)(b.Button,{size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:i,"aria-label":(0,w.__)("Apply the selected revision to your site."),children:j?(0,w.__)("Reset to defaults"):(0,w.__)("Apply")}))]},h)}))})};function Ig({currentPage:e,numPages:t,changePage:n,totalItems:s,className:i,disabled:r=!1,buttonVariant:o="tertiary",label:l=(0,w.__)("Pagination")}){return(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:Ht("edit-site-pagination",i),children:[(0,a.jsx)(b.__experimentalText,{variant:"muted",className:"edit-site-pagination__total",children:(0,w.sprintf)((0,w._n)("%s item","%s items",s),s)}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,w.__)("First page"),icon:(0,w.isRTL)()?$c:eu,size:"compact"}),(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(e-1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?La:za,size:"compact"})]}),(0,a.jsx)(b.__experimentalText,{variant:"muted",children:(0,w.sprintf)((0,w._x)("%1$s of %2$s","paging"),e,t)}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(e+1),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?za:La,size:"compact"}),(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(t),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,w.__)("Last page"),icon:(0,w.isRTL)()?eu:$c,size:"compact"})]})]})}const{GlobalStylesContext:Vg,areGlobalStyleConfigsEqual:Tg}=ne(x.privateApis);var Og=function(){const{user:e,setUserConfig:t}=(0,h.useContext)(Vg),{blocks:n,editorCanvasContainerView:s}=(0,c.useSelect)((e=>({editorCanvasContainerView:ne(e(Rt)).getEditorCanvasContainerView(),blocks:e(x.store).getBlocks()})),[]),[i,r]=(0,h.useState)(1),[o,l]=(0,h.useState)([]),{revisions:u,isLoading:d,hasUnsavedChanges:p,revisionsCount:f}=no({query:{per_page:10,page:i}}),m=Math.ceil(f/10),[g,v]=(0,h.useState)(e),[y,_]=(0,h.useState)(!1),{setEditorCanvasContainerView:j}=ne((0,c.useDispatch)(Rt)),S=Tg(g,e),C=()=>{j("global-styles-revisions:style-book"===s?"style-book":void 0)},k=e=>{t((()=>e)),_(!1),C()};(0,h.useEffect)((()=>{!d&&u.length&&l(u)}),[u,d]);const E=u[0],P=g?.id,I=!!E?.id&&!S&&!P;(0,h.useEffect)((()=>{I&&v(E)}),[I,E]);const V=!!P&&"unsaved"!==P&&!S,T=!!o.length;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:f&&(0,w.sprintf)((0,w.__)("Revisions (%s)"),f),description:(0,w.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:C}),!T&&(0,a.jsx)(b.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),T&&("global-styles-revisions:style-book"===s?(0,a.jsx)(fg,{userConfig:g,isSelected:()=>{},onClose:()=>{j("global-styles-revisions")}}):(0,a.jsx)(Sg,{blocks:n,userConfig:g,closeButtonLabel:(0,w.__)("Close revisions")})),(0,a.jsx)(Pg,{onChange:v,selectedRevisionId:P,userRevisions:o,canApplyRevision:V,onApplyRevision:()=>p?_(!0):k(g)}),m>1&&(0,a.jsx)("div",{className:"edit-site-global-styles-screen-revisions__footer",children:(0,a.jsx)(Ig,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:i,numPages:m,changePage:r,totalItems:f,disabled:d,label:(0,w.__)("Global Styles pagination")})}),y&&(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:y,confirmButtonText:(0,w.__)("Apply"),onConfirm:()=>k(g),onCancel:()=>_(!1),size:"medium",children:(0,w.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})};const{useGlobalStylesReset:Ag}=ne(x.privateApis),{Slot:Ng,Fill:Fg}=(0,b.createSlotFill)("GlobalStylesMenu");function Mg(){const[e,t]=Ag(),{toggle:n}=(0,c.useDispatch)(m.store),{canEditCSS:s}=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:i}=ne((0,c.useDispatch)(Rt)),r=()=>{i("global-styles-css")};return(0,a.jsx)(Fg,{children:(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("More"),toggleProps:{size:"compact"},children:({onClose:i})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.MenuGroup,{children:[s&&(0,a.jsx)(b.MenuItem,{onClick:r,children:(0,w.__)("Additional CSS")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),i()},children:(0,w.__)("Welcome Guide")})]}),(0,a.jsx)(b.MenuGroup,{children:(0,a.jsx)(b.MenuItem,{onClick:()=>{t(),i()},disabled:!e,children:(0,w.__)("Reset styles")})})]})})})}function Bg({className:e,...t}){return(0,a.jsx)(b.Navigator.Screen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Dg({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,s)=>(0,a.jsx)(Bg,{path:e+"/variations/"+t.name,children:(0,a.jsx)(Jl,{name:n,variation:t.name})},s)))}function Rg({name:e,parentMenu:t=""}){const n=(0,c.useSelect)((t=>{const{getBlockStyles:n}=t(o.store);return n(e)}),[e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Bg,{path:t+"/colors/palette",children:(0,a.jsx)(Hf,{name:e})}),!!n?.length&&(0,a.jsx)(Dg,{parentMenu:t,blockStyles:n,blockName:e})]})}function Lg(){const e=(0,b.useNavigator)(),{path:t}=e.location;return(0,a.jsx)(fg,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{Am.find((e=>e.slug===t))?e.goTo("/colors/palette"):"typography"!==t?e.goTo("/blocks/"+encodeURIComponent(t)):e.goTo("/typography")}})}function zg(){const e=(0,b.useNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(x.store),s=t();return{selectedBlockName:n(s),selectedBlockClientId:s}}),[]),s=kl(t);(0,h.useEffect)((()=>{if(!n||!s)return;const i=e.location.path;if("/blocks"!==i&&!i.startsWith("/blocks/"))return;const r="/blocks/"+encodeURIComponent(t);r!==i&&e.goTo(r,{skipFocus:!0})}),[n,t,s])}function Hg(){const{goTo:e,location:t}=(0,b.useNavigator)(),n=(0,c.useSelect)((e=>ne(e(Rt)).getEditorCanvasContainerView()),[]),s=t?.path,i="/revisions"===s;(0,h.useEffect)((()=>{switch(n){case"global-styles-revisions":case"global-styles-revisions:style-book":i||e("/revisions");break;case"global-styles-css":e("/css");break;default:i&&e("/",{isBack:!0})}}),[n,i,e])}function Gg({path:e,onPathChange:t,children:n}){return function(e,t){const n=(0,b.useNavigator)(),{path:s}=n.location,i=(0,y.usePrevious)(e),r=(0,y.usePrevious)(s);(0,h.useEffect)((()=>{e!==s&&(e!==i?n.goTo(e):s!==r&&t(s))}),[t,e,r,i,s,n])}(e,t),n}var Wg=function({path:e,onPathChange:t}){const n=(0,o.getBlockTypes)(),s=(0,c.useSelect)((e=>ne(e(Rt)).getEditorCanvasContainerView()),[]);return(0,a.jsxs)(b.Navigator,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/",children:[e&&t&&(0,a.jsx)(Gg,{path:e,onPathChange:t}),(0,a.jsx)(Bg,{path:"/",children:(0,a.jsx)(fl,{})}),(0,a.jsx)(Bg,{path:"/variations",children:(0,a.jsx)(Tm,{})}),(0,a.jsx)(Bg,{path:"/blocks",children:(0,a.jsx)(Il,{})}),(0,a.jsx)(Bg,{path:"/typography",children:(0,a.jsx)(Yp,{})}),(0,a.jsx)(Bg,{path:"/typography/font-sizes",children:(0,a.jsx)(xf,{})}),(0,a.jsx)(Bg,{path:"/typography/font-sizes/:origin/:slug",children:(0,a.jsx)(pf,{})}),(0,a.jsx)(Bg,{path:"/typography/text",children:(0,a.jsx)(sf,{element:"text"})}),(0,a.jsx)(Bg,{path:"/typography/link",children:(0,a.jsx)(sf,{element:"link"})}),(0,a.jsx)(Bg,{path:"/typography/heading",children:(0,a.jsx)(sf,{element:"heading"})}),(0,a.jsx)(Bg,{path:"/typography/caption",children:(0,a.jsx)(sf,{element:"caption"})}),(0,a.jsx)(Bg,{path:"/typography/button",children:(0,a.jsx)(sf,{element:"button"})}),(0,a.jsx)(Bg,{path:"/colors",children:(0,a.jsx)(Pf,{})}),(0,a.jsx)(Bg,{path:"/shadows",children:(0,a.jsx)(mm,{})}),(0,a.jsx)(Bg,{path:"/shadows/edit/:category/:slug",children:(0,a.jsx)(gm,{})}),(0,a.jsx)(Bg,{path:"/layout",children:(0,a.jsx)(km,{})}),(0,a.jsx)(Bg,{path:"/css",children:(0,a.jsx)(vg,{})}),(0,a.jsx)(Bg,{path:"/revisions",children:(0,a.jsx)(Og,{})}),(0,a.jsx)(Bg,{path:"/background",children:(0,a.jsx)(Xf,{})}),n.map((e=>(0,a.jsx)(Bg,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,a.jsx)(Jl,{name:e.name})},"menu-block-"+e.name))),(0,a.jsx)(Rg,{}),n.map((e=>(0,a.jsx)(Rg,{name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)},"screens-block-"+e.name))),"style-book"===s&&(0,a.jsx)(Lg,{}),(0,a.jsx)(Mg,{}),(0,a.jsx)(zg,{}),(0,a.jsx)(Hg,{})]})};const{ComplementaryArea:Ug,ComplementaryAreaMoreMenuItem:qg}=ne(f.privateApis);function Zg({className:e,identifier:t,title:n,icon:s,children:i,closeLabel:r,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ug,{className:e,scope:"core",identifier:t,title:n,icon:s,closeLabel:r,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:i}),(0,a.jsx)(qg,{scope:"core",identifier:t,icon:s,children:n})]})}const{interfaceStore:Yg}=ne(f.privateApis),{useLocation:Kg}=ne(Lt.privateApis);function Xg(){const{query:e}=Kg(),{canvas:t="view",name:n}=e,{shouldClearCanvasContainerView:s,isStyleBookOpened:i,showListViewByDefault:r,hasRevisions:o,isRevisionsOpened:l,isRevisionsStyleBookOpened:u}=(0,c.useSelect)((e=>{const{getActiveComplementaryArea:n}=e(Yg),{getEditorCanvasContainerView:s}=ne(e(Rt)),i=s(),r="visual"===e(f.store).getEditorMode(),a="edit"===t,o=e(m.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(j.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===i,shouldClearCanvasContainerView:"edit-site/global-styles"!==n("core")||!r||!a,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===i,isRevisionsOpened:"global-styles-revisions"===i}}),[t]),{setEditorCanvasContainerView:d}=ne((0,c.useDispatch)(Rt)),p=(0,y.useViewportMatch)("medium","<");(0,h.useEffect)((()=>{s&&d(void 0)}),[s,d]);const{setIsListViewOpened:g}=(0,c.useDispatch)(f.store),{getActiveComplementaryArea:v}=(0,c.useSelect)(Yg),{enableComplementaryArea:x}=(0,c.useDispatch)(Yg),_=(0,h.useRef)(null);return(0,h.useEffect)((()=>{"styles"===n&&"edit"===t?(_.current=v("core"),x("core","edit-site/global-styles")):_.current&&x("core",_.current)}),[n,x,t,v]),(0,a.jsx)(Zg,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,w.__)("Styles"),icon:Fa,closeLabel:(0,w.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,a.jsxs)(b.Flex,{className:"edit-site-global-styles-sidebar__header",gap:1,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)("h2",{className:"edit-site-global-styles-sidebar__header-title",children:(0,w.__)("Styles")})}),(0,a.jsxs)(b.Flex,{justify:"flex-end",gap:1,className:"edit-site-global-styles-sidebar__header-actions",children:[!p&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{icon:Ao,label:(0,w.__)("Style Book"),isPressed:i||u,accessibleWhenDisabled:!0,disabled:s,onClick:()=>{l?d("global-styles-revisions:style-book"):u?d("global-styles-revisions"):(g(i&&r),d(i?void 0:"style-book"))},size:"compact"})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{label:(0,w.__)("Revisions"),icon:ba,onClick:()=>{g(!1),d(u?"style-book":l?void 0:i?"global-styles-revisions:style-book":"global-styles-revisions")},accessibleWhenDisabled:!0,disabled:!o,isPressed:l||u,size:"compact"})}),(0,a.jsx)(Ng,{})]})]}),children:(0,a.jsx)(Wg,{})})}var Qg=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});const Jg=window.wp.blob;function $g(){const e=(0,c.useSelect)((e=>{const t=e(j.store).getCurrentTheme()?._links?.["wp:export-theme"]?.[0]?.targetHints??{};return!!t.allow?.includes("GET")}),[]),{createErrorNotice:t}=(0,c.useDispatch)(_.store);if(!e)return null;return(0,a.jsx)(b.MenuItem,{role:"menuitem",icon:Qg,onClick:async function(){try{const e=await ra()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),s=n[1]?n[1]:"edit-site-export";(0,Jg.downloadBlob)(s+".zip",t,"application/zip")}catch(e){let n={};try{n=await e.json()}catch(e){}const s=n.message&&"unknown_error"!==n.code?n.message:(0,w.__)("An error occurred while creating the site export.");t(s,{type:"snackbar"})}},info:(0,w.__)("Download your theme with updated templates and styles."),children:(0,w._x)("Export","site exporter menu item")})}function ev(){const{toggle:e}=(0,c.useDispatch)(m.store);return(0,a.jsx)(b.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide"),children:(0,w.__)("Welcome Guide")})}const{ToolsMoreMenuGroup:tv,PreferencesModal:nv}=ne(f.privateApis);function sv(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(tv,{children:[(0,a.jsx)($g,{}),(0,a.jsx)(ev,{})]}),(0,a.jsx)(nv,{})]})}const{useLocation:iv,useHistory:rv}=ne(Lt.privateApis);const{useLocation:av}=ne(Lt.privateApis);const{getTemplateInfo:ov}=ne(f.privateApis);var lv=function(e,t){const{title:n,isLoaded:s}=(0,c.useSelect)((n=>{const{getEditedEntityRecord:s,getCurrentTheme:i,hasFinishedResolution:r}=n(j.store);if(!t)return{isLoaded:!1};const a=s("postType",e,t),{default_template_types:o=[]}=i()??{},l=ov({template:a,templateTypes:o}),c=r("getEditedEntityRecord",["postType",e,t]);return{title:l.title,isLoaded:c}}),[e,t]);let i;s&&(i=(0,w.sprintf)((0,w._x)("%1$s ‹ %2$s","breadcrumb trail"),(0,qt.decodeEntities)(n),Fe[e]??Fe[Se])),function(e){const t=av(),n=(0,c.useSelect)((e=>e(j.store).getEntityRecord("root","site")?.title),[]),s=(0,h.useRef)(!0);(0,h.useEffect)((()=>{s.current=!1}),[t]),(0,h.useEffect)((()=>{if(!s.current&&e&&n){const t=(0,w.sprintf)((0,w.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,qt.decodeEntities)(e),(0,qt.decodeEntities)(n));document.title=t,(0,ml.speak)(e,"assertive")}}),[e,n,t])}(s&&i)};const{useLocation:cv}=ne(Lt.privateApis),uv=[Se,Ce,je,Ie.user],dv=["page","post"];function hv(){const{name:e,params:t={},query:n}=cv(),{postId:s=n?.postId}=t,i=function(e){let t;return"navigation-item"===e?t=je:"pattern-item"===e?t=Ie.user:"template-part-item"===e?t=Ce:"templates"===e||"template-item"===e?t=Se:"page-item"===e||"pages"===e?t="page":"post-item"!==e&&"posts"!==e||(t="post"),t}(e)??n?.postType,r=(0,c.useSelect)((e=>{const{getHomePage:t}=ne(e(j.store));return t()}),[]),a=(0,c.useSelect)((e=>{if(uv.includes(i)&&s)return;if(s&&s.includes(","))return;const{getTemplateId:t}=ne(e(j.store));return i&&s&&dv.includes(i)?t(i,s):"page"===r?.postType?t("page",r?.postId):"wp_template"===r?.postType?r?.postId:void 0}),[r,s,i]),o=(0,h.useMemo)((()=>uv.includes(i)&&s?{}:i&&s&&dv.includes(i)?{postType:i,postId:s}:"page"===r?.postType?{postType:"page",postId:r?.postId}:{}),[r,i,s]);return uv.includes(i)&&s?{isReady:!0,postType:i,postId:s,context:o}:r?{isReady:void 0!==a,postType:Se,postId:a,context:o}:{isReady:!1}}function pv(){const e=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(j.store),n=t("root","__unstableBase");return n?.home}),[]);return(0,a.jsx)("iframe",{src:(0,Qt.addQueryArgs)(e,{wp_site_preview:1}),title:(0,w.__)("Site Preview"),style:{display:"block",width:"100%",height:"100%",backgroundColor:"#fff"},onLoad:e=>{const t=e.target.contentDocument;en.focus.focusable.find(t).forEach((e=>{e.style.pointerEvents="none",e.tabIndex=-1,e.setAttribute("aria-hidden","true")}))}})}const{Editor:fv,BackButton:mv}=ne(f.privateApis),{useHistory:gv,useLocation:vv}=ne(Lt.privateApis),{BlockKeyboardShortcuts:yv}=ne(l.privateApis),xv={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}},bv={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}};function wv(e){switch(e){case"navigation":return"/navigation";case"wp_block":return"/pattern?postType=wp_block";case"wp_template_part":return"/pattern?postType=wp_template_part";case"wp_template":return"/template";case"page":return"/page";case"post":return"/"}throw"Unknown post type"}function _v({isHomeRoute:e=!1,isPostsList:t=!1}){const n=(0,y.useReducedMotion)(),s=vv(),{canvas:i="view"}=s.query,r=Sn();!function(e){const{clearSelectedBlock:t}=(0,c.useDispatch)(x.store),{setDeviceType:n,closePublishSidebar:s,setIsListViewOpened:i,setIsInserterOpened:r}=(0,c.useDispatch)(f.store),{get:a}=(0,c.useSelect)(m.store),o=(0,c.useRegistry)();(0,h.useLayoutEffect)((()=>{const l=window.matchMedia("(min-width: 782px)").matches;o.batch((()=>{t(),n("Desktop"),s(),r(!1),l&&"edit"===e&&a("core","showListViewByDefault")&&!a("core","distractionFree")?i(!0):i(!1)}))}),[e,o,t,n,s,r,i,a])}(i);const o=hv();!function({postType:e,postId:t,context:n,isReady:s}){const{setEditedEntity:i}=(0,c.useDispatch)(Rt);(0,h.useEffect)((()=>{s&&i(e,String(t),n)}),[s,e,t,n,i])}(o);const{postType:l,postId:u,context:d}=o,{isBlockBasedTheme:p,editorCanvasView:g,currentPostIsTrashed:v,hasSiteIcon:S}=(0,c.useSelect)((e=>{const{getEditorCanvasContainerView:t}=ne(e(Rt)),{getCurrentTheme:n,getEntityRecord:s}=e(j.store),i=s("root","__unstableBase",void 0);return{isBlockBasedTheme:n()?.is_block_theme,editorCanvasView:t(),currentPostIsTrashed:"trash"===e(f.store).getCurrentPostAttribute("status"),hasSiteIcon:!!i?.site_icon_url}}),[]),C=!!d?.postId;lv(C?d.postType:l,C?d.postId:u);const k=Qr(),E=!Ta(),P=function(){const{query:e,path:t}=iv(),n=rv(),{canvas:s="view"}=e,i=(0,c.useSelect)((e=>"trash"===e(f.store).getCurrentPostAttribute("status")),[]),[r,a]=(0,h.useState)(!1);(0,h.useEffect)((()=>{"edit"===s&&a(!1)}),[s]);const o={"aria-label":(0,w.__)("Edit"),"aria-disabled":i,title:null,role:"button",tabIndex:0,onFocus:()=>a(!0),onBlur:()=>a(!1),onKeyDown:e=>{const{keyCode:s}=e;s!==Xt.ENTER&&s!==Xt.SPACE||i||(e.preventDefault(),n.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}))},onClick:()=>n.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),onClickCapture:e=>{i&&(e.preventDefault(),e.stopPropagation())},readonly:!0};return{className:Ht("edit-site-visual-editor__editor-canvas",{"is-focused":r&&"view"===s}),..."view"===s?o:{}}}(),I="edit"===i,V=(0,y.useInstanceId)(So,"edit-site-editor__loading-progress"),T=Po(),O=(0,h.useMemo)((()=>[...T.styles,{css:"view"===i?`body{min-height: 100vh; ${v?"":"cursor: pointer;"}}`:void 0}]),[T.styles,i,v]),{resetZoomLevel:A}=ne((0,c.useDispatch)(x.store)),{createSuccessNotice:N}=(0,c.useDispatch)(_.store),F=gv(),M=(0,h.useCallback)(((e,t)=>{switch(e){case"move-to-trash":case"delete-post":F.navigate(wv(C?d.postType:l));break;case"duplicate-post":{const e=t[0],n="string"==typeof e.title?e.title:e.title?.rendered;N((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(n)||(0,w.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,w.__)("Edit"),onClick:()=>{F.navigate(`/${e.type}/${e.id}?canvas=edit`)}}]})}}}),[l,d?.postType,C,F,N]),B=Va(g),D=!r,R={duration:n?0:.2};return!p&&e?(0,a.jsx)(pv,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(wo,{disableRootPadding:l!==Se}),(0,a.jsx)(f.EditorKeyboardShortcutsRegister,{}),I&&(0,a.jsx)(yv,{}),D?null:(0,a.jsx)(So,{id:V}),I&&(0,a.jsx)(xo,{postType:C?d.postType:l}),D&&(0,a.jsxs)(fv,{postType:C?d.postType:l,postId:C?d.postId:u,templateId:C?u:void 0,settings:T,className:"edit-site-editor__editor-interface",styles:O,customSaveButton:k&&(0,a.jsx)(ea,{size:"compact"}),customSavePanel:k&&(0,a.jsx)(ua,{}),forceDisableBlockTools:!E,title:B,iframeProps:P,onActionPerformed:M,extraSidebarPanels:!C&&(0,a.jsx)(Oo.Slot,{}),children:[I&&(0,a.jsx)(mv,{children:({length:e})=>e<=1&&(0,a.jsxs)(b.__unstableMotion.div,{className:"edit-site-editor__view-mode-toggle",transition:R,animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,label:(0,w.__)("Open Navigation"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{A(),t&&s.query?.focusMode?F.navigate("/",{transition:"canvas-mode-view-transition"}):F.navigate(function(e,t){const{path:n,name:s}=e;return["pattern-item","template-part-item","page-item","template-item","static-template-item","post-item"].includes(s)?wv(t):(0,Qt.addQueryArgs)(n,{canvas:void 0})}(s,C?d.postType:l),{transition:"canvas-mode-view-transition"})},children:(0,a.jsx)(b.__unstableMotion.div,{variants:bv,children:(0,a.jsx)($t,{className:"edit-site-editor__view-mode-toggle-icon"})})}),(0,a.jsx)(b.__unstableMotion.div,{className:Ht("edit-site-editor__back-icon",{"has-site-icon":S}),variants:xv,children:(0,a.jsx)(qa,{icon:ho})})]})}),(0,a.jsx)(sv,{}),p&&(0,a.jsx)(Xg,{})]})]})}function jv(e){const t=e.currentTheme?.is_block_theme,n=e.currentTheme?.theme_supports["editor-styles"],s=e.editorSettings?.supportsLayout;return!t&&(n||s)}const Sv={name:"home",path:"/",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||jv(e)?(0,a.jsx)(co,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||jv(e)?(0,a.jsx)(_v,{isHomeRoute:!0}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||jv(e)?(0,a.jsx)(co,{}):(0,a.jsx)(uo,{})}}},{useLocation:Cv}=ne(Lt.privateApis);function kv(){const{query:e={}}=Cv(),{canvas:t}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(Km,{})}const Ev={name:"styles",path:"/styles",areas:{content:(0,a.jsx)(Km,{}),sidebar:(0,a.jsx)(oo,{backPath:"/"}),preview:({query:e})=>"stylebook"===e.preview?(0,a.jsx)(lg,{}):(0,a.jsx)(_v,{}),mobile:(0,a.jsx)(kv,{})},widths:{content:380}},Pv={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"};function Iv({menuTitle:e,onClose:t,onSave:n}){const[s,i]=(0,h.useState)(e),r=s!==e&&(o=s,o?.trim()?.length>0);var o;return(0,a.jsx)(b.Modal,{title:(0,w.__)("Rename"),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,a.jsx)("form",{className:"sidebar-navigation__rename-modal-form",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"3",children:[(0,a.jsx)(b.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s,placeholder:(0,w.__)("Navigation title"),onChange:i,label:(0,w.__)("Name")}),(0,a.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!r,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),r&&(n({title:s}),t())},children:(0,w.__)("Save")})]})]})})})}function Vv({onClose:e,onConfirm:t}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{t(),e()},onCancel:e,confirmButtonText:(0,w.__)("Delete"),size:"medium",children:(0,w.__)("Are you sure you want to delete this Navigation Menu?")})}const{useHistory:Tv}=ne(Lt.privateApis),Ov={position:"bottom right"};function Av(e){const{onDelete:t,onSave:n,onDuplicate:s,menuTitle:i,menuId:r}=e,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),d=Tv(),p=()=>{l(!1),u(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,w.__)("Actions"),icon:No,popoverProps:Ov,children:({onClose:e})=>(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(b.MenuItem,{onClick:()=>{l(!0),e()},children:(0,w.__)("Rename")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{d.navigate(`/wp_navigation/${r}?canvas=edit`)},children:(0,w.__)("Edit")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{s(),e()},children:(0,w.__)("Duplicate")}),(0,a.jsx)(b.MenuItem,{isDestructive:!0,onClick:()=>{u(!0),e()},children:(0,w.__)("Delete")})]})}),c&&(0,a.jsx)(Vv,{onClose:p,onConfirm:t}),o&&(0,a.jsx)(Iv,{onClose:p,menuTitle:i,onSave:n})]})}var Nv=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Fv=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});const Mv={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useHistory:Bv,useLocation:Dv}=ne(Lt.privateApis);function Rv(e){const t=Bv(),{path:n}=Dv(),{block:s}=e,{clientId:i}=s,{moveBlocksDown:r,moveBlocksUp:o,removeBlocks:l}=(0,c.useDispatch)(x.store),u=(0,w.sprintf)((0,w.__)("Remove %s"),(0,x.BlockTitle)({clientId:i,maximumLength:25})),d=(0,w.sprintf)((0,w.__)("Go to %s"),(0,x.BlockTitle)({clientId:i,maximumLength:25})),p=(0,c.useSelect)((e=>{const{getBlockRootClientId:t}=e(x.store);return t(i)}),[i]),f=(0,h.useCallback)((e=>{const{attributes:s,name:i}=e;"post-type"===s.kind&&s.id&&s.type&&t&&t.navigate(`/${s.type}/${s.id}?canvas=edit`,{state:{backPath:n}}),"core/page-list-item"===i&&s.id&&t&&t.navigate(`/page/${s.id}?canvas=edit`,{state:{backPath:n}})}),[n,t]);return(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Mv,noIcons:!0,...e,children:({onClose:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(b.MenuItem,{icon:Nv,onClick:()=>{o([i],p),e()},children:(0,w.__)("Move up")}),(0,a.jsx)(b.MenuItem,{icon:Fv,onClick:()=>{r([i],p),e()},children:(0,w.__)("Move down")}),"page"===s.attributes?.type&&s.attributes?.id&&(0,a.jsx)(b.MenuItem,{onClick:()=>{f(s),e()},children:d})]}),(0,a.jsx)(b.MenuGroup,{children:(0,a.jsx)(b.MenuItem,{onClick:()=>{l([i],!1),e()},children:u})})]})})}const{PrivateListView:Lv}=ne(x.privateApis),zv=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function Hv({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,c.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:s,getBlockCount:i,getBlockOrder:r}=t(x.store),{isResolving:a}=t(j.store),o=r(e),l=1===o.length&&"core/page-list"===s(o[0])&&i(o[0])>0,c=a("getEntityRecords",zv);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:s,__unstableMarkNextChangeAsNotPersistent:i}=(0,c.useDispatch)(x.store),r=(0,h.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(i(),s(e.clientId,(0,o.createBlock)("core/navigation-link",e.attributes)))}),[i,s]);return(0,a.jsxs)(a.Fragment,{children:[!n&&(0,a.jsx)(Lv,{rootClientId:t,onSelect:r,blockSettingsMenu:Rv,showAppender:!1,isExpanded:!0}),(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",children:(0,a.jsx)(x.BlockList,{})})]})}const Gv=()=>{};function Wv({navigationMenuId:e}){const{storedSettings:t}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return{storedSettings:t()}}),[]),n=(0,h.useMemo)((()=>e?[(0,o.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,a.jsx)(x.BlockEditorProvider,{settings:t,value:n,onChange:Gv,onInput:Gv,children:(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content",children:(0,a.jsx)(Hv,{rootClientId:n[0].clientId})})}):null}function Uv(e,t,n){return e?.rendered?"publish"===n?(0,qt.decodeEntities)(e?.rendered):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","menu label"),(0,qt.decodeEntities)(e?.rendered),n):(0,w.sprintf)((0,w.__)("(no title %s)"),t)}function qv({navigationMenu:e,backPath:t,handleDelete:n,handleDuplicate:s,handleSave:i}){const r=e?.title?.rendered;return(0,a.jsx)(sy,{actions:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Av,{menuId:e?.id,menuTitle:(0,qt.decodeEntities)(r),onDelete:n,onSave:i,onDuplicate:s})}),backPath:t,title:Uv(e?.title,e?.id,e?.status),description:(0,w.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),children:(0,a.jsx)(Wv,{navigationMenuId:e?.id})})}const{useLocation:Zv}=ne(Lt.privateApis),Yv="wp_navigation";function Kv({backPath:e}){const{params:{postId:t}}=Zv(),{record:n,isResolving:s}=(0,j.useEntityRecord)("postType",Yv,t),{isSaving:i,isDeleting:r}=(0,c.useSelect)((e=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:s}=e(j.store);return{isSaving:n("postType",Yv,t),isDeleting:s("postType",Yv,t)}}),[t]),o=s||i||r,l=n?.title?.rendered||n?.slug,{handleSave:u,handleDelete:d,handleDuplicate:h}=ey(),p=()=>d(n),f=e=>u(n,e),m=()=>h(n);return o?(0,a.jsx)(sy,{description:(0,w.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),backPath:e,children:(0,a.jsx)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):o||n?n?.content?.raw?(0,a.jsx)(qv,{navigationMenu:n,backPath:e,handleDelete:p,handleSave:f,handleDuplicate:m}):(0,a.jsx)(sy,{actions:(0,a.jsx)(Av,{menuId:n?.id,menuTitle:(0,qt.decodeEntities)(l),onDelete:p,onSave:f,onDuplicate:m}),backPath:e,title:Uv(n?.title,n?.id,n?.status),description:(0,w.__)("This Navigation Menu is empty.")}):(0,a.jsx)(sy,{description:(0,w.__)("Navigation Menu missing."),backPath:e})}const{useHistory:Xv}=ne(Lt.privateApis);function Qv(){const{deleteEntityRecord:e}=(0,c.useDispatch)(j.store),{createSuccessNotice:t,createErrorNotice:n}=(0,c.useDispatch)(_.store),s=Xv();return async i=>{const r=i?.id;try{await e("postType",Yv,r,{force:!0},{throwOnError:!0}),t((0,w.__)("Navigation Menu successfully deleted."),{type:"snackbar"}),s.navigate("/navigation")}catch(e){n((0,w.sprintf)((0,w.__)("Unable to delete Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function Jv(){const{getEditedEntityRecord:e}=(0,c.useSelect)((e=>{const{getEditedEntityRecord:t}=e(j.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,c.useDispatch)(j.store),{createSuccessNotice:s,createErrorNotice:i}=(0,c.useDispatch)(_.store);return async(r,a)=>{if(!a)return;const o=r?.id,l=e("postType",je,o);t("postType",Yv,o,a);const c=Object.keys(a);try{await n("postType",Yv,o,c,{throwOnError:!0}),s((0,w.__)("Renamed Navigation Menu"),{type:"snackbar"})}catch(e){t("postType",Yv,o,l),i((0,w.sprintf)((0,w.__)("Unable to rename Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function $v(){const e=Xv(),{saveEntityRecord:t}=(0,c.useDispatch)(j.store),{createSuccessNotice:n,createErrorNotice:s}=(0,c.useDispatch)(_.store);return async i=>{const r=i?.title?.rendered||i?.slug;try{const s=await t("postType",Yv,{title:(0,w.sprintf)((0,w._x)("%s (Copy)","navigation menu"),r),content:i?.content?.raw,status:"publish"},{throwOnError:!0});s&&(n((0,w.__)("Duplicated Navigation Menu"),{type:"snackbar"}),e.navigate(`/wp_navigation/${s.id}`))}catch(e){s((0,w.sprintf)((0,w.__)("Unable to duplicate Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function ey(){return{handleDelete:Qv(),handleSave:Jv(),handleDuplicate:$v()}}function ty(e,t,n){return e?"publish"===n?(0,qt.decodeEntities)(e):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","menu label"),(0,qt.decodeEntities)(e),n):(0,w.sprintf)((0,w.__)("(no title %s)"),t)}function ny({backPath:e}){const{records:t,isResolving:n,hasResolved:s}=(0,j.useEntityRecords)("postType",je,Pv),i=n&&!s,{getNavigationFallbackId:r}=ne((0,c.useSelect)(j.store)),o=(0,c.useSelect)((e=>e(j.store).isResolving("getNavigationFallbackId")),[]),l=t?.[0];l||n||!s||o||r();const{handleSave:u,handleDelete:d,handleDuplicate:h}=ey(),p=!!t?.length;return i?(0,a.jsx)(sy,{backPath:e,children:(0,a.jsx)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):i||p?1===t?.length?(0,a.jsx)(qv,{navigationMenu:l,backPath:e,handleDelete:()=>d(l),handleDuplicate:()=>h(l),handleSave:e=>u(l,e)}):(0,a.jsx)(sy,{backPath:e,children:(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-navigation-menus",children:t?.map((({id:e,title:t,status:n},s)=>(0,a.jsx)(iy,{postId:e,withChevron:!0,icon:Ma,children:ty(t?.rendered,s+1,n)},e)))})}):(0,a.jsx)(sy,{description:(0,w.__)("No Navigation Menus found."),backPath:e})}function sy({children:e,actions:t,title:n,description:s,backPath:i}){return(0,a.jsx)(Ua,{title:n||(0,w.__)("Navigation"),actions:t,description:s||(0,w.__)("Manage your Navigation Menus."),backPath:i,content:e})}const iy=({postId:e,...t})=>(0,a.jsx)(Qa,{to:`/wp_navigation/${e}`,...t}),{useLocation:ry}=ne(Lt.privateApis);function ay(){const{query:e={}}=ry(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(ny,{backPath:"/"})}const oy={name:"navigation",path:"/navigation",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ny,{backPath:"/"}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ay,{}):(0,a.jsx)(uo,{})}}},{useLocation:ly}=ne(Lt.privateApis);function cy(){const{query:e={}}=ly(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(Kv,{backPath:"/navigation"})}const uy={name:"navigation-item",path:"/wp_navigation/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Kv,{backPath:"/navigation"}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(cy,{}):(0,a.jsx)(uo,{})}}};var dy=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});function hy({count:e,icon:t,id:n,isActive:s,label:i,type:r}){if(!e)return;const o=[`postType=${r}`];return n&&o.push(`categoryId=${n}`),(0,a.jsx)(Qa,{icon:t,suffix:(0,a.jsx)("span",{children:e}),"aria-current":s?"true":void 0,to:`/pattern?${o.join("&")}`,children:i})}const py=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));const{extractWords:fy,getNormalizedSearchTerms:my,normalizeString:gy}=ne(x.privateApis),vy=e=>e.type===Ie.user?e.slug:e.type===Ce?"":e.name||"",yy=e=>"string"==typeof e.title?e.title:e.title&&e.title.rendered?e.title.rendered:e.title&&e.title.raw?e.title.raw:"",xy=e=>e.type===Ie.user?e.excerpt.raw:e.description||"",by=e=>e.keywords||[],wy=()=>!1,_y=(e=[],t="",n={})=>{const s=my(t),i=n.categoryId!==Ve&&!s.length,r={...n,onlyFilterByCategory:i},a=i?0:1,o=e.map((e=>[e,jy(e,t,r)])).filter((([,e])=>e>a));return 0===s.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function jy(e,t,n){const{categoryId:s,getName:i=vy,getTitle:r=yy,getDescription:a=xy,getKeywords:o=by,hasCategory:l=wy,onlyFilterByCategory:c}=n;let u=s===Ve||s===Pe||s===Te&&e.type===Ie.user||l(e,s)?1:0;if(!u||c)return u;const d=i(e),h=r(e),p=a(e),f=o(e),m=gy(t),g=gy(h);if(m===g)u+=30;else if(g.startsWith(m))u+=20;else{const e=[d,h,p,...f].join(" ");0===((e,t)=>e.filter((e=>!my(t).some((t=>t.includes(e))))))(fy(m),e).length&&(u+=10)}return u}const Sy=[],Cy=(0,c.createSelector)(((e,t,n="")=>{const{getEntityRecords:s,getCurrentTheme:i,isResolving:r}=e(j.store),a={per_page:-1},o=s("postType",Ce,a)??Sy,l=(i()?.default_template_part_areas||[]).map((e=>e.area)),c=r("getEntityRecords",["postType",Ce,a]);return{patterns:_y(o,n,{categoryId:t,hasCategory:(e,t)=>t!==Ee?e.area===t:e.area===t||!l.includes(e.area)}),isResolving:c}}),(e=>[e(j.store).getEntityRecords("postType",Ce,{per_page:-1}),e(j.store).isResolving("getEntityRecords",["postType",Ce,{per_page:-1}]),e(j.store).getCurrentTheme()?.default_template_part_areas])),ky=(0,c.createSelector)((e=>{const{getSettings:t}=ne(e(Rt)),{isResolving:n}=e(j.store),s=t();return{patterns:[...(s.__experimentalAdditionalBlockPatterns??s.__experimentalBlockPatterns)||[],...e(j.store).getBlockPatterns()||[]].filter((e=>!Oe.includes(e.source))).filter(py).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:Ie.theme,blocks:(0,o.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:n("getBlockPatterns")}}),(e=>[e(j.store).getBlockPatterns(),e(j.store).isResolving("getBlockPatterns"),ne(e(Rt)).getSettings()])),Ey=(0,c.createSelector)(((e,t,n,s="")=>{const{patterns:i,isResolving:r}=ky(e),{patterns:a,isResolving:o,categories:l}=Py(e);let c=[...i||[],...a||[]];return n&&(c=c.filter((e=>e.type===Ie.user?(e.wp_pattern_sync_status||Ae.full)===n:n===Ae.unsynced))),c=_y(c,s,t?{categoryId:t,hasCategory:(e,t)=>e.type===Ie.user?e.wp_pattern_category?.some((e=>l.find((t=>t.id===e))?.slug===t)):e.categories?.includes(t)}:{hasCategory:e=>e.type===Ie.user?l?.length&&(!e.wp_pattern_category?.length||!e.wp_pattern_category?.some((e=>l.find((t=>t.id===e))))):!e.hasOwnProperty("categories")}),{patterns:c,isResolving:r||o}}),(e=>[ky(e),Py(e)])),Py=(0,c.createSelector)(((e,t,n="")=>{const{getEntityRecords:s,isResolving:i,getUserPatternCategories:r}=e(j.store),a={per_page:-1},o=s("postType",Ie.user,a),l=r(),c=new Map;l.forEach((e=>c.set(e.id,e)));let u=o??Sy;const d=i("getEntityRecords",["postType",Ie.user,a]);return t&&(u=u.filter((e=>e.wp_pattern_sync_status||Ae.full===t))),u=_y(u,n,{hasCategory:()=>!0}),{patterns:u,isResolving:d,categories:l}}),(e=>[e(j.store).getEntityRecords("postType",Ie.user,{per_page:-1}),e(j.store).isResolving("getEntityRecords",["postType",Ie.user,{per_page:-1}]),e(j.store).getUserPatternCategories()]));var Iy=(e,t,{search:n="",syncStatus:s}={})=>(0,c.useSelect)((i=>{if(e===Ce)return Cy(i,t,n);if(e===Ie.user&&t){return Ey(i,"uncategorized"===t?"":t,s,n)}return e===Ie.user?Py(i,s,n):{patterns:Sy,isResolving:!1}}),[t,e,n,s]);function Vy(){const e=function(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),n=t();return n.__experimentalAdditionalBlockPatternCategories??n.__experimentalBlockPatternCategories}));return[...e||[],...(0,c.useSelect)((e=>e(j.store).getBlockPatternCategories()))||[]]}();e.push({name:Ee,label:(0,w.__)("Uncategorized")});const t=function(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return t().__experimentalAdditionalBlockPatterns??t().__experimentalBlockPatterns})),t=(0,c.useSelect)((e=>e(j.store).getBlockPatterns()));return(0,h.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Oe.includes(e.source))).filter(py).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:s}=Iy(Ie.user),i=(0,h.useMemo)((()=>{const i={},r=[];e.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),s.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{i[e]&&(i[e].count+=1)})),e.categories?.length||(i.uncategorized.count+=1)})),n.forEach((e=>{e.wp_pattern_category?.forEach((e=>{const t=s.find((t=>t.id===e))?.name;i[t]&&(i[t].count+=1)})),e.wp_pattern_category?.length&&e.wp_pattern_category?.some((e=>s.find((t=>t.id===e))))||(i.uncategorized.count+=1)})),[...e,...s].forEach((e=>{i[e.name].count&&!r.find((t=>t.name===e.name))&&r.push(i[e.name])}));const a=r.sort(((e,t)=>e.label.localeCompare(t.label)));return a.unshift({name:Te,label:(0,w.__)("My patterns"),count:n.length}),a.unshift({name:Ve,label:(0,w.__)("All patterns"),description:(0,w.__)("A list of all patterns from all sources."),count:t.length+n.length}),a}),[e,t,s,n]);return{patternCategories:i,hasPatterns:!!i.length}}const Ty=e=>{const t=e||[],n=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_part_areas||[]),[]),s={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>s[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>{const n=e[t.area]?t.area:Ee;return e[n]?.templateParts?.push(t),e}),s)};const{useLocation:Oy}=ne(Lt.privateApis);function Ay({templatePartAreas:e,patternCategories:t,currentCategory:n,currentType:s}){const[i,...r]=t;return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:[(0,a.jsx)(hy,{count:Object.values(e).map((({templateParts:e})=>e?.length||0)).reduce(((e,t)=>e+t),0),icon:(0,f.getTemplatePartIcon)(),label:(0,w.__)("All template parts"),id:Pe,type:Ce,isActive:n===Pe&&s===Ce},"all"),Object.entries(e).map((([e,{label:t,templateParts:i}])=>(0,a.jsx)(hy,{count:i?.length,icon:(0,f.getTemplatePartIcon)(e),label:t,id:e,type:Ce,isActive:n===e&&s===Ce},e))),(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-patterns__divider"}),i&&(0,a.jsx)(hy,{count:i.count,label:i.label,icon:dy,id:i.name,type:Ie.user,isActive:n===`${i.name}`&&s===Ie.user},i.name),r.map((e=>(0,a.jsx)(hy,{count:e.count,label:e.label,icon:dy,id:e.name,type:Ie.user,isActive:n===`${e.name}`&&s===Ie.user},e.name)))]})}function Ny({backPath:e}){const{query:{postType:t="wp_block",categoryId:n}}=Oy(),s=n||(t===Ie.user?Ve:Pe),{templatePartAreas:i,hasTemplateParts:r,isLoading:o}=function(){const{records:e,isResolving:t}=(0,j.useEntityRecords)("postType",Ce,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Ty(e)}}(),{patternCategories:l,hasPatterns:c}=Vy();return(0,a.jsx)(Ua,{title:(0,w.__)("Patterns"),description:(0,w.__)("Manage what patterns are available when editing the site."),isRoot:!e,backPath:e,content:(0,a.jsxs)(a.Fragment,{children:[o&&(0,w.__)("Loading items…"),!o&&(0,a.jsxs)(a.Fragment,{children:[!r&&!c&&(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:(0,a.jsx)(b.__experimentalItem,{children:(0,w.__)("No items found")})}),(0,a.jsx)(Ay,{templatePartAreas:i,patternCategories:l,currentCategory:s,currentType:t})]})]})})}var Fy=i(9681),My=i.n(Fy);Math.pow(10,8);const By=6048e5,Dy=Symbol.for("constructDateFrom");function Ry(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Dy in e?e[Dy](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ly(e,t){return Ry(t||e,e)}function zy(e,t,n){const s=Ly(e,n?.in);return isNaN(t)?Ry(n?.in||e,NaN):t?(s.setDate(s.getDate()+t),s):s}function Hy(e,t,n){return zy(e,-t,n)}function Gy(e,t,n){return zy(e,7*t,n)}function Wy(e,t,n){return Gy(e,-t,n)}function Uy(e,t,n){const s=Ly(e,n?.in);if(isNaN(t))return Ry(n?.in||e,NaN);if(!t)return s;const i=s.getDate(),r=Ry(n?.in||e,s.getTime());r.setMonth(s.getMonth()+t+1,0);return i>=r.getDate()?r:(s.setFullYear(r.getFullYear(),r.getMonth(),i),s)}function qy(e,t,n){return Uy(e,-t,n)}function Zy(e,t,n){return Uy(e,12*t,n)}function Yy(e,t,n){return Zy(e,-t,n)}var Ky=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),Xy=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});const Qy="is",Jy="isNot",$y="isAny",ex="isNone",tx="isAll",nx="isNotAll",sx="lessThan",ix="greaterThan",rx="lessThanOrEqual",ax="greaterThanOrEqual",ox="before",lx="after",cx="beforeInc",ux="afterInc",dx="contains",hx="notContains",px="startsWith",fx="between",mx="on",gx="notOn",vx="inThePast",yx="over",xx=[Qy,Jy,$y,ex,tx,nx,sx,ix,rx,ax,ox,lx,cx,ux,dx,hx,px,fx,mx,gx,vx,yx],bx=[Qy,Jy,sx,ix,rx,ax,ox,lx,cx,ux,dx,hx,px,mx,gx],wx={[Qy]:{key:"is-filter",label:(0,w.__)("Is")},[Jy]:{key:"is-not-filter",label:(0,w.__)("Is not")},[$y]:{key:"is-any-filter",label:(0,w.__)("Is any")},[ex]:{key:"is-none-filter",label:(0,w.__)("Is none")},[tx]:{key:"is-all-filter",label:(0,w.__)("Is all")},[nx]:{key:"is-not-all-filter",label:(0,w.__)("Is not all")},[sx]:{key:"less-than-filter",label:(0,w.__)("Less than")},[ix]:{key:"greater-than-filter",label:(0,w.__)("Greater than")},[rx]:{key:"less-than-or-equal-filter",label:(0,w.__)("Less than or equal")},[ax]:{key:"greater-than-or-equal-filter",label:(0,w.__)("Greater than or equal")},[ox]:{key:"before-filter",label:(0,w.__)("Before")},[lx]:{key:"after-filter",label:(0,w.__)("After")},[cx]:{key:"before-inc-filter",label:(0,w.__)("Before (inc)")},[ux]:{key:"after-inc-filter",label:(0,w.__)("After (inc)")},[dx]:{key:"contains-filter",label:(0,w.__)("Contains")},[hx]:{key:"not-contains-filter",label:(0,w.__)("Doesn't contain")},[px]:{key:"starts-with-filter",label:(0,w.__)("Starts with")},[fx]:{key:"between-filter",label:(0,w.__)("Between (inc)")},[mx]:{key:"on-filter",label:(0,w.__)("On")},[gx]:{key:"not-on-filter",label:(0,w.__)("Not on")},[vx]:{key:"in-the-past-filter",label:(0,w.__)("In the past")},[yx]:{key:"over-filter",label:(0,w.__)("Over")}},_x=["asc","desc"],jx={asc:"↑",desc:"↓"},Sx={asc:"ascending",desc:"descending"},Cx={asc:(0,w.__)("Sort ascending"),desc:(0,w.__)("Sort descending")},kx={asc:Ky,desc:Xy},Ex="table",Px="grid",Ix=[];function Vx({elements:e,getElements:t}){const n=Array.isArray(e)&&e.length>0?e:Ix,[s,i]=(0,h.useState)(n),[r,a]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{if(!t)return void i(n);let e=!1;return a(!0),t().then((t=>{if(!e){const e=Array.isArray(t)&&t.length>0?t:n;i(e)}})).catch((()=>{e||i(n)})).finally((()=>{e||a(!1)})),()=>{e=!0}}),[t,n]),{elements:s,isLoading:r}}function Tx({item:e,field:t}){const{elements:n,isLoading:s}=Vx({elements:t.elements,getElements:t.getElements}),i=t.getValue({item:e});return s||0===n.length?i:n?.find((e=>e.value===i))?.label||t.getValue({item:e})}const Ox=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;var Ax={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Ox.test(n)?null:(0,w.__)("Value must be a valid email address.")}},Edit:"email",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};var Nx={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Number.isInteger(n)?null:(0,w.__)("Value must be an integer.")}},Edit:"integer",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy,sx,ix,rx,ax,fx],validOperators:[Qy,Jy,sx,ix,rx,ax,fx,$y,ex,tx,nx]}};var Fx={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return function(e){return""===e||null==e}(n)||Number.isFinite(n)?null:(0,w.__)("Value must be a number.")}},Edit:"number",render:({item:e,field:t})=>{t.hasElements;const n=t.getValue({item:e});return[null,void 0].includes(n)?null:Number(n).toFixed(2)},enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy,sx,ix,rx,ax,fx],validOperators:[Qy,Jy,sx,ix,rx,ax,fx,$y,ex,tx,nx]}};var Mx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"text",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};var Bx={sort:function(e,t,n){const s=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?s-i:i-s},isValid:{elements:!0,custom:()=>null},Edit:"datetime",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[mx,gx,ox,lx,cx,ux,vx,yx],validOperators:[mx,gx,ox,lx,cx,ux,vx,yx]}};var Dx={sort:function(e,t,n){const s=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?s-i:i-s},Edit:"date",isValid:{elements:!0,custom:()=>null},render:({item:e,field:t})=>{if(t.hasElements)return(0,a.jsx)(Tx,{item:e,field:t});const n=t.getValue({item:e});return n?(s=n,(0,Cg.dateI18n)((0,Cg.getSettings)().formats.date,(0,Cg.getDate)(s))):"";var s},enableSorting:!0,filterBy:{defaultOperators:[mx,gx,ox,lx,cx,ux,vx,yx,fx],validOperators:[mx,gx,ox,lx,cx,ux,vx,yx,fx]}};var Rx={sort:function(e,t,n){const s=Boolean(e);return s===Boolean(t)?0:"asc"===n?s?1:-1:s?-1:1},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||[!0,!1].includes(n)?null:(0,w.__)("Value must be true, false, or undefined")}},Edit:"checkbox",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):!0===t.getValue({item:e})?(0,w.__)("True"):!1===t.getValue({item:e})?(0,w.__)("False"):null,enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy],validOperators:[Qy,Jy]}};var Lx={sort:function(){return 0},isValid:{elements:!0,custom:()=>null},Edit:null,render:()=>null,enableSorting:!1,filterBy:!1};const zx={sort:function(e,t,n){const s=Array.isArray(e)?e:[],i=Array.isArray(t)?t:[];if(s.length!==i.length)return"asc"===n?s.length-i.length:i.length-s.length;const r=s.join(","),a=i.join(",");return"asc"===n?r.localeCompare(a):a.localeCompare(r)},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Array.isArray(n)?n.every((e=>"string"==typeof e))?null:(0,w.__)("Every value must be a string."):(0,w.__)("Value must be an array.")}},Edit:"array",render:function({item:e,field:t}){return(t.getValue({item:e})||[]).join(", ")},enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[$y,ex,tx,nx]}};var Hx=zx;var Gx={sort:function(e,t,n){return 0},isValid:{elements:!0,custom:()=>null},Edit:"password",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):"••••••••",enableSorting:!1,filterBy:!1};var Wx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"telephone",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};var Ux={sort:function(e,t,n){const s=X(e),i=X(t);if(!s.isValid()&&!i.isValid())return 0;if(!s.isValid())return"asc"===n?1:-1;if(!i.isValid())return"asc"===n?-1:1;const r=s.toHsl(),a=i.toHsl();return r.h!==a.h?"asc"===n?r.h-a.h:a.h-r.h:r.s!==a.s?"asc"===n?r.s-a.s:a.s-r.s:"asc"===n?r.l-a.l:a.l-r.l},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||X(n).isValid()?null:(0,w.__)("Value must be a valid color.")}},Edit:"color",render:({item:e,field:t})=>{if(t.hasElements)return(0,a.jsx)(Tx,{item:e,field:t});const n=t.getValue({item:e});return n&&X(n).isValid()?(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,a.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",flexShrink:0}}),(0,a.jsx)("span",{children:n})]}):n},enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy]}};var qx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"url",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};const{lock:Zx,unlock:Yx}=(0,ee.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");function Kx(e,t){let n;return e?.required&&t?.required?n=t?.required?.message?t.required:void 0:e?.elements&&t?.elements?n=t.elements:t?.custom&&(n=t.custom),n}const{ValidatedCheckboxControl:Xx}=Yx(b.privateApis);function Qx(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Jx(e){return!(!Qx(e)&&"number"!=typeof e||isNaN(+Ly(e)))}const $x={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tb={date:eb({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eb({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eb({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function sb(e){return(t,n)=>{let s;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;s=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;s=e.values[i]||e.values[t]}return s[e.argumentCallback?e.argumentCallback(t):t]}}function ib(e){return(t,n={})=>{const s=n.width,i=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],r=t.match(i);if(!r)return null;const a=r[0],o=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(o,(e=>e.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(o,(e=>e.test(a)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}var rb;const ab={code:"en-US",formatDistance:(e,t,n)=>{let s;const i=$x[e];return s="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s},formatLong:tb,formatRelative:(e,t,n,s)=>nb[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:sb({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:sb({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:sb({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:sb({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:sb({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rb={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(rb.matchPattern);if(!n)return null;const s=n[0],i=e.match(rb.parsePattern);if(!i)return null;let r=rb.valueCallback?rb.valueCallback(i[0]):i[0];return r=t.valueCallback?t.valueCallback(r):r,{value:r,rest:e.slice(s.length)}}),era:ib({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ib({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:ib({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ib({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ib({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};let ob={};function lb(){return ob}function cb(e){const t=Ly(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ub(e,t){const n=Ly(e,t?.in);return n.setHours(0,0,0,0),n}function db(e,t,n){const[s,i]=function(e,...t){const n=Ry.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}(n?.in,e,t),r=ub(s),a=ub(i),o=+r-cb(r),l=+a-cb(a);return Math.round((o-l)/864e5)}function hb(e,t){const n=Ly(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function pb(e,t){const n=Ly(e,t?.in);return db(n,hb(n))+1}function fb(e,t){const n=lb(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ly(e,t?.in),r=i.getDay(),a=(r<s?7:0)+r-s;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function mb(e,t){return fb(e,{...t,weekStartsOn:1})}function gb(e,t){const n=Ly(e,t?.in),s=n.getFullYear(),i=Ry(n,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const r=mb(i),a=Ry(n,0);a.setFullYear(s,0,4),a.setHours(0,0,0,0);const o=mb(a);return n.getTime()>=r.getTime()?s+1:n.getTime()>=o.getTime()?s:s-1}function vb(e,t){const n=gb(e,t),s=Ry(t?.in||e,0);return s.setFullYear(n,0,4),s.setHours(0,0,0,0),mb(s)}function yb(e,t){const n=Ly(e,t?.in),s=+mb(n)-+vb(n);return Math.round(s/By)+1}function xb(e,t){const n=Ly(e,t?.in),s=n.getFullYear(),i=lb(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Ry(t?.in||e,0);a.setFullYear(s+1,0,r),a.setHours(0,0,0,0);const o=fb(a,t),l=Ry(t?.in||e,0);l.setFullYear(s,0,r),l.setHours(0,0,0,0);const c=fb(l,t);return+n>=+o?s+1:+n>=+c?s:s-1}function bb(e,t){const n=lb(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=xb(e,t),r=Ry(t?.in||e,0);r.setFullYear(i,0,s),r.setHours(0,0,0,0);return fb(r,t)}function wb(e,t){const n=Ly(e,t?.in),s=+fb(n,t)-+bb(n,t);return Math.round(s/By)+1}function _b(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const jb={y(e,t){const n=e.getFullYear(),s=n>0?n:1-n;return _b("yy"===t?s%100:s,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):_b(n+1,2)},d:(e,t)=>_b(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>_b(e.getHours()%12||12,t.length),H:(e,t)=>_b(e.getHours(),t.length),m:(e,t)=>_b(e.getMinutes(),t.length),s:(e,t)=>_b(e.getSeconds(),t.length),S(e,t){const n=t.length,s=e.getMilliseconds();return _b(Math.trunc(s*Math.pow(10,n-3)),t.length)}},Sb="midnight",Cb="noon",kb="morning",Eb="afternoon",Pb="evening",Ib="night",Vb={G:function(e,t,n){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});default:return n.era(s,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),s=t>0?t:1-t;return n.ordinalNumber(s,{unit:"year"})}return jb.y(e,t)},Y:function(e,t,n,s){const i=xb(e,s),r=i>0?i:1-i;if("YY"===t){return _b(r%100,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):_b(r,t.length)},R:function(e,t){return _b(gb(e),t.length)},u:function(e,t){return _b(e.getFullYear(),t.length)},Q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return _b(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return _b(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,n){const s=e.getMonth();switch(t){case"M":case"MM":return jb.M(e,t);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,n){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return _b(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,n,s){const i=wb(e,s);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):_b(i,t.length)},I:function(e,t,n){const s=yb(e);return"Io"===t?n.ordinalNumber(s,{unit:"week"}):_b(s,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):jb.d(e,t)},D:function(e,t,n){const s=pb(e);return"Do"===t?n.ordinalNumber(s,{unit:"dayOfYear"}):_b(s,t.length)},E:function(e,t,n){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,n,s){const i=e.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return _b(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,s){const i=e.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return _b(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const s=e.getDay(),i=0===s?7:s;switch(t){case"i":return String(i);case"ii":return _b(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const s=e.getHours();let i;switch(i=12===s?Cb:0===s?Sb:s/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const s=e.getHours();let i;switch(i=s>=17?Pb:s>=12?Eb:s>=4?kb:Ib,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return jb.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):jb.H(e,t)},K:function(e,t,n){const s=e.getHours()%12;return"Ko"===t?n.ordinalNumber(s,{unit:"hour"}):_b(s,t.length)},k:function(e,t,n){let s=e.getHours();return 0===s&&(s=24),"ko"===t?n.ordinalNumber(s,{unit:"hour"}):_b(s,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jb.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jb.s(e,t)},S:function(e,t){return jb.S(e,t)},X:function(e,t,n){const s=e.getTimezoneOffset();if(0===s)return"Z";switch(t){case"X":return Ob(s);case"XXXX":case"XX":return Ab(s);default:return Ab(s,":")}},x:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"x":return Ob(s);case"xxxx":case"xx":return Ab(s);default:return Ab(s,":")}},O:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tb(s,":");default:return"GMT"+Ab(s,":")}},z:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tb(s,":");default:return"GMT"+Ab(s,":")}},t:function(e,t,n){return _b(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return _b(+e,t.length)}};function Tb(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=Math.trunc(s/60),r=s%60;return 0===r?n+String(i):n+String(i)+t+_b(r,2)}function Ob(e,t){if(e%60==0){return(e>0?"-":"+")+_b(Math.abs(e)/60,2)}return Ab(e,t)}function Ab(e,t=""){const n=e>0?"-":"+",s=Math.abs(e);return n+_b(Math.trunc(s/60),2)+t+_b(s%60,2)}const Nb=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Fb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Mb={p:Fb,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return Nb(e,t);let r;switch(s){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",Nb(s,t)).replace("{{time}}",Fb(i,t))}},Bb=/^D+$/,Db=/^Y+$/,Rb=["D","DD","YY","YYYY"];const Lb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hb=/^'([^]*?)'?$/,Gb=/''/g,Wb=/[a-zA-Z]/;function Ub(e,t,n){const s=lb(),i=n?.locale??s.locale??ab,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,o=Ly(e,n?.in);if(!Jx(o))throw new RangeError("Invalid time value");let l=t.match(zb).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Mb[t])(e,i.formatLong)}return e})).join("").match(Lb).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:qb(e)};if(Vb[t])return{isToken:!0,value:e};if(t.match(Wb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:r,weekStartsOn:a,locale:i};return l.map((s=>{if(!s.isToken)return s.value;const r=s.value;(!n?.useAdditionalWeekYearTokens&&function(e){return Db.test(e)}(r)||!n?.useAdditionalDayOfYearTokens&&function(e){return Bb.test(e)}(r))&&function(e,t,n){const s=function(e,t,n){const s="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(s),Rb.includes(e))throw new RangeError(s)}(r,t,String(e));return(0,Vb[r[0]])(o,r,i.localize,c)})).join("")}function qb(e){const t=e.match(Hb);return t?t[1].replace(Gb,"'"):e}const Zb={[vx]:[{value:"days",label:(0,w.__)("Days")},{value:"weeks",label:(0,w.__)("Weeks")},{value:"months",label:(0,w.__)("Months")},{value:"years",label:(0,w.__)("Years")}],[yx]:[{value:"days",label:(0,w.__)("Days ago")},{value:"weeks",label:(0,w.__)("Weeks ago")},{value:"months",label:(0,w.__)("Months ago")},{value:"years",label:(0,w.__)("Years ago")}]};function Yb({className:e,data:t,field:n,onChange:s,hideLabelFromVision:i,operator:r}){const o=Zb[r===vx?"inThePast":"over"],{id:l,label:c,getValue:u,setValue:d}=n,p=u({item:t}),{value:f="",unit:m=o[0].value}=p&&"object"==typeof p?p:{},g=(0,h.useCallback)((e=>s(d({item:t,value:{value:Number(e),unit:m}}))),[s,d,t,m]),v=(0,h.useCallback)((e=>s(d({item:t,value:{value:f,unit:e}}))),[s,d,t,f]);return(0,a.jsx)(b.BaseControl,{id:l,__nextHasNoMarginBottom:!0,className:Ht(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:i,children:(0,a.jsxs)(b.__experimentalHStack,{spacing:2.5,children:[(0,a.jsx)(b.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:f,onChange:g}),(0,a.jsx)(b.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Unit"),value:m,options:o,onChange:v,hideLabelFromVision:!0})]})})}const{DateCalendar:Kb,ValidatedInputControl:Xb}=Yx(b.privateApis),Qb=e=>{if(!e)return null;const t=(0,Cg.getDate)(e);return t&&Jx(t)?t:null};function Jb({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,description:l,setValue:c,getValue:u,isValid:d}=t,p=u({item:e}),f="string"==typeof p?p:void 0,[m,g]=(0,h.useState)((()=>Qb(f)||new Date)),v=(0,h.useRef)(null),y=(0,h.useRef)(),x=(0,h.useRef)(null),_=(0,h.useCallback)((t=>n(c({item:e,value:t}))),[e,n,c]);(0,h.useEffect)((()=>()=>{y.current&&clearTimeout(y.current)}),[]);const j=(0,h.useCallback)((e=>{let t;if(e){let n=e;if(f){const t=Qb(f);t&&(n=new Date(e),n.setHours(t.getHours()),n.setMinutes(t.getMinutes()))}t=n.toISOString(),_(t),y.current&&clearTimeout(y.current)}else _(void 0);x.current=v.current&&v.current.ownerDocument.activeElement,y.current=setTimeout((()=>{v.current&&(v.current.focus(),v.current.blur(),_(t),x.current&&x.current instanceof HTMLElement&&x.current.focus())}),0)}),[_,f]),S=(0,h.useCallback)((e=>{if(e){const t=new Date(e);_(t.toISOString());const n=Qb(t.toISOString());n&&g(n)}else _(void 0)}),[_]),{timezone:{string:C},l10n:{startOfWeek:k}}=(0,Cg.getSettings)(),E=d?.required&&!s?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,label:E,help:l,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(Kb,{style:{width:"100%"},selected:f&&Qb(f)||void 0,onSelect:j,month:m,onMonthChange:g,timeZone:C||void 0,weekStartsOn:k}),(0,a.jsx)(Xb,{ref:v,__next40pxDefaultSize:!0,required:!!d?.required,customValidity:Kx(d,i),type:"datetime-local",label:(0,w.__)("Date time"),hideLabelFromVision:!0,value:f?(P=Qb(f)||void 0,P?"string"==typeof P?P:Ub(P,"yyyy-MM-dd'T'HH:mm"):""):"",onChange:S})]})});var P}function $b(e,t){const n=Ly(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}var ew=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});const{DateCalendar:tw,DateRangeCalendar:nw}=Yx(b.privateApis),sw=[{id:"today",label:(0,w.__)("Today"),getValue:()=>(0,Cg.getDate)(null)},{id:"yesterday",label:(0,w.__)("Yesterday"),getValue:()=>Hy((0,Cg.getDate)(null),1)},{id:"past-week",label:(0,w.__)("Past week"),getValue:()=>Hy((0,Cg.getDate)(null),7)},{id:"past-month",label:(0,w.__)("Past month"),getValue:()=>qy((0,Cg.getDate)(null),1)}],iw=[{id:"last-7-days",label:(0,w.__)("Last 7 days"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Hy(e,7),e]}},{id:"last-30-days",label:(0,w.__)("Last 30 days"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Hy(e,30),e]}},{id:"month-to-date",label:(0,w.__)("Month to date"),getValue:()=>{const e=(0,Cg.getDate)(null);return[$b(e),e]}},{id:"last-year",label:(0,w.__)("Last year"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Yy(e,1),e]}},{id:"year-to-date",label:(0,w.__)("Year to date"),getValue:()=>{const e=(0,Cg.getDate)(null);return[hb(e),e]}}],rw=e=>{if(!e)return null;const t=(0,Cg.getDate)(e);return t&&Jx(t)?t:null},aw=e=>e?"string"==typeof e?e:Ub(e,"yyyy-MM-dd"):"";function ow({field:e,validity:t,inputRefs:n,isTouched:s,setIsTouched:i,children:r}){const{isValid:o}=e,[l,c]=(0,h.useState)(void 0),u=(0,h.useCallback)((()=>{const e=Array.isArray(n)?n:[n];for(const t of e){const e=t.current;if(e&&!e.validity.valid)return void c({type:"invalid",message:e.validationMessage})}c(void 0)}),[n]);(0,h.useEffect)((()=>{if(s){const e=setTimeout((()=>{t?c(Kx(o,t)):u()}),0);return()=>clearTimeout(e)}}),[s,o,t,u]);return(0,a.jsxs)("div",{onBlur:e=>{s||e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||i(!0)},children:[r,(0,a.jsx)("div",{"aria-live":"polite",children:l&&(0,a.jsxs)("p",{className:Ht("components-validated-control__indicator","invalid"===l.type?"is-invalid":void 0,"valid"===l.type?"is-valid":void 0),children:[(0,a.jsx)(b.Icon,{className:"components-validated-control__indicator-icon",icon:ew,size:16,fill:"currentColor"}),l.message]})})]})}function lw({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,setValue:l,getValue:c,isValid:u}=t,[d,p]=(0,h.useState)(null),f=c({item:e}),m="string"==typeof f?f:void 0,[g,v]=(0,h.useState)((()=>rw(m)||new Date)),[y,x]=(0,h.useState)(!1),_=(0,h.useRef)(null),j=(0,h.useCallback)((t=>n(l({item:e,value:t}))),[e,n,l]),S=(0,h.useCallback)((e=>{const t=e?Ub(e,"yyyy-MM-dd"):void 0;j(t),p(null),x(!0)}),[j]),C=(0,h.useCallback)((e=>{const t=e.getValue(),n=aw(t);v(t),j(n),p(e.id),x(!0)}),[j]),k=(0,h.useCallback)((e=>{if(j(e),e){const t=rw(e);t&&v(t)}p(null),x(!0)}),[j]),{timezone:{string:E},l10n:{startOfWeek:P}}=(0,Cg.getSettings)(),I=u?.required?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(ow,{field:t,validity:i,inputRefs:_,isTouched:y,setIsTouched:x,children:(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,className:"dataviews-controls__date",label:I,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[sw.map((e=>{const t=d===e.id;return(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:t,size:"small",onClick:()=>C(e),children:e.label},e.id)})),(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!d,size:"small",disabled:!!d,accessibleWhenDisabled:!1,children:(0,w.__)("Custom")})]}),(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:_,type:"date",label:(0,w.__)("Date"),hideLabelFromVision:!0,value:m,onChange:k,required:!!t.isValid?.required}),(0,a.jsx)(tw,{style:{width:"100%"},selected:m&&rw(m)||void 0,onSelect:S,month:g,onMonthChange:v,timeZone:E||void 0,weekStartsOn:P})]})})})}function cw({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,getValue:l,setValue:c}=t;let u;const d=l({item:e});Array.isArray(d)&&2===d.length&&d.every((e=>"string"==typeof e))&&(u=d);const p=(0,h.useCallback)((t=>{n(c({item:e,value:t}))}),[e,n,c]),[f,m]=(0,h.useState)(null),g=(0,h.useMemo)((()=>{if(!u)return{from:void 0,to:void 0};const[e,t]=u;return{from:rw(e)||void 0,to:rw(t)||void 0}}),[u]),[v,y]=(0,h.useState)((()=>g.from||new Date)),[x,_]=(0,h.useState)(!1),j=(0,h.useRef)(null),S=(0,h.useRef)(null),C=(0,h.useCallback)(((e,t)=>{e&&t?p([aw(e),aw(t)]):e||t||p(void 0)}),[p]),k=(0,h.useCallback)((e=>{C(e?.from,e?.to),m(null),_(!0)}),[C]),E=(0,h.useCallback)((e=>{const[t,n]=e.getValue();y(t),C(t,n),m(e.id),_(!0)}),[C]),P=(0,h.useCallback)(((e,t)=>{const[n,s]=u||[void 0,void 0];if(C("from"===e?t:n,"to"===e?t:s),t){const e=rw(t);e&&y(e)}m(null),_(!0)}),[u,C]),{timezone:I,l10n:V}=(0,Cg.getSettings)(),T=t.isValid?.required?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(ow,{field:t,validity:i,inputRefs:[j,S],isTouched:x,setIsTouched:_,children:(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,className:"dataviews-controls__date",label:T,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[iw.map((e=>{const t=f===e.id;return(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:t,size:"small",onClick:()=>E(e),children:e.label},e.id)})),(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!f,size:"small",accessibleWhenDisabled:!1,disabled:!!f,children:(0,w.__)("Custom")})]}),(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:j,type:"date",label:(0,w.__)("From"),hideLabelFromVision:!0,value:u?.[0],onChange:e=>P("from",e),required:!!t.isValid?.required}),(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:S,type:"date",label:(0,w.__)("To"),hideLabelFromVision:!0,value:u?.[1],onChange:e=>P("to",e),required:!!t.isValid?.required})]}),(0,a.jsx)(nw,{style:{width:"100%"},selected:g,onSelect:k,month:v,onMonthChange:y,timeZone:I.string||void 0,weekStartsOn:V.startOfWeek})]})})})}var uw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})});const{ValidatedInputControl:dw}=Yx(b.privateApis);function hw({data:e,field:t,onChange:n,hideLabelFromVision:s,type:i,prefix:r,suffix:o,validity:l}){const{label:c,placeholder:u,description:d,getValue:p,setValue:f,isValid:m}=t,g=p({item:e}),v=(0,h.useCallback)((t=>n(f({item:e,value:t}))),[e,f,n]);return(0,a.jsx)(dw,{required:!!m?.required,customValidity:Kx(m,l),label:c,placeholder:u,value:g??"",help:d,onChange:v,hideLabelFromVision:s,type:i,prefix:r,suffix:o,__next40pxDefaultSize:!0})}var pw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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 fw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const{ValidatedNumberControl:mw}=Yx(b.privateApis);function gw(e){if(""===e||void 0===e)return"";const t=Number(e);return Number.isFinite(t)?t:""}function vw({value:e,onChange:t,hideLabelFromVision:n,step:s}){const[i="",r=""]=e,o=(0,h.useCallback)((e=>t([gw(e),r])),[t,r]),l=(0,h.useCallback)((e=>t([i,gw(e)])),[t,i]);return(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,help:(0,w.__)("The max. value must be greater than the min. value."),children:(0,a.jsxs)(b.Flex,{direction:"row",gap:4,children:[(0,a.jsx)(b.__experimentalNumberControl,{label:(0,w.__)("Min."),value:i,max:r?Number(r)-s:void 0,onChange:o,__next40pxDefaultSize:!0,hideLabelFromVision:n,step:s}),(0,a.jsx)(b.__experimentalNumberControl,{label:(0,w.__)("Max."),value:r,min:i?Number(i)+s:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:n,step:s})]})})}function yw({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,decimals:r,validity:o}){const l=Math.pow(10,-1*Math.abs(r)),{label:c,description:u,getValue:d,setValue:p,isValid:f}=t,m=d({item:e})??"",g=(0,h.useCallback)((t=>{n(p({item:e,value:["",void 0].includes(t)?void 0:Number(t)}))}),[e,n,p]),v=(0,h.useCallback)((t=>{n(p({item:e,value:t}))}),[e,n,p]);if(i===fx){let e=["",""];return Array.isArray(m)&&2===m.length&&m.every((e=>"number"==typeof e||""===e))&&(e=m),(0,a.jsx)(vw,{value:e,onChange:v,hideLabelFromVision:s,step:l})}return(0,a.jsx)(mw,{required:!!f?.required,customValidity:Kx(f,o),label:c,help:u,value:m,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:s,step:l})}const{ValidatedRadioControl:xw}=Yx(b.privateApis);const{ValidatedSelectControl:bw}=Yx(b.privateApis);const{ValidatedToggleControl:ww}=Yx(b.privateApis);const{ValidatedTextareaControl:_w}=Yx(b.privateApis);const{ValidatedToggleGroupControl:jw}=Yx(b.privateApis);const{ValidatedFormTokenField:Sw}=Yx(b.privateApis);const{ValidatedInputControl:Cw,Picker:kw}=Yx(b.privateApis),Ew=({color:e,onColorChange:t})=>{const n=e&&X(e).isValid()?e:"#ffffff";return(0,a.jsx)(b.Dropdown,{renderToggle:({onToggle:e,isOpen:t})=>(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)("button",{type:"button",onClick:e,style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",cursor:"pointer",outline:t?"2px solid #007cba":"none",outlineOffset:"2px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,margin:0},"aria-label":"Open color picker"})}),renderContent:()=>(0,a.jsx)("div",{style:{padding:"16px"},children:(0,a.jsx)(kw,{color:X(n),onChange:t,enableAlpha:!0})})})};var Pw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});function Iw(e){return Array.isArray(e.elements)&&e.elements.length>0||"function"==typeof e.getElements}const Vw={array:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,placeholder:o,getValue:l,setValue:c,isValid:u}=t,d=l({item:e}),{elements:p,isLoading:f}=Vx({elements:t.elements,getElements:t.getElements}),m=(0,h.useMemo)((()=>Array.isArray(d)?d.map((e=>{const t=p?.find((t=>t.value===e));return t||{value:e,label:e}})):[]),[d,p]),g=(0,h.useCallback)((t=>{const s=t.map((e=>"object"==typeof e&&"value"in e?e.value:e));n(c({item:e,value:s}))}),[n,c,e]);return f?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(Sw,{required:!!u?.required,customValidity:Kx(u,i),label:s?void 0:r,value:m,onChange:g,placeholder:o,suggestions:p?.map((e=>e.value)),__experimentalValidateInput:e=>!t.isValid?.elements||!p||p.some((t=>t.value===e||t.label===e)),__experimentalExpandOnFocus:p&&p.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:e=>{if("object"==typeof e&&"label"in e)return e.label;if("string"==typeof e&&p){const t=p.find((t=>t.value===e));return t?.label||e}return e},__experimentalRenderItem:({item:e})=>{if("string"==typeof e&&p){const t=p.find((t=>t.value===e));return(0,a.jsx)("span",{children:t?.label||e})}return(0,a.jsx)("span",{children:e})}})},checkbox:function({field:e,onChange:t,data:n,hideLabelFromVision:s,validity:i}){const{getValue:r,setValue:o,label:l,description:c,isValid:u}=e,d=(0,h.useCallback)((()=>{t(o({item:n,value:!r({item:n})}))}),[n,r,t,o]);return(0,a.jsx)(Xx,{required:!!e.isValid?.required,customValidity:Kx(u,i),hidden:s,label:l,help:c,checked:r({item:n}),onChange:d})},color:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,placeholder:o,description:l,setValue:c,isValid:u}=t,d=t.getValue({item:e})||"",p=(0,h.useCallback)((t=>{n(c({item:e,value:t.toHex()}))}),[e,n,c]),f=(0,h.useCallback)((t=>{n(c({item:e,value:t||""}))}),[e,n,c]);return(0,a.jsx)(Cw,{required:!!t.isValid?.required,customValidity:Kx(u,i),label:r,placeholder:o,value:d,help:l,onChange:f,hideLabelFromVision:s,type:"text",prefix:(0,a.jsx)(Ew,{color:d,onColorChange:p})})},datetime:function({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,validity:r}){return i===vx||i===yx?(0,a.jsx)(Yb,{className:"dataviews-controls__datetime",data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i}):(0,a.jsx)(Jb,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r})},date:function({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,validity:r}){return i===vx||i===yx?(0,a.jsx)(Yb,{className:"dataviews-controls__date",data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i}):i===fx?(0,a.jsx)(cw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r}):(0,a.jsx)(lw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r})},email:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"email",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:uw})})})},telephone:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"tel",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:pw})})})},url:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"url",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:fw})})})},integer:function(e){return(0,a.jsx)(yw,{...e,decimals:0})},number:function(e){return(0,a.jsx)(yw,{...e,decimals:2})},password:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const[r,o]=(0,h.useState)(!1),l=(0,h.useCallback)((()=>{o((e=>!e))}),[]);return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:r?"text":"password",suffix:(0,a.jsx)(b.Button,{icon:r?Pw:Ao,onClick:l,size:"small",variant:"tertiary","aria-label":r?(0,w.__)("Hide password"):(0,w.__)("Show password")})})},radio:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,description:o,getValue:l,setValue:c,isValid:u}=t,{elements:d,isLoading:p}=Vx({elements:t.elements,getElements:t.getElements}),f=l({item:e}),m=(0,h.useCallback)((t=>n(c({item:e,value:t}))),[e,n,c]);return p?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(xw,{required:!!t.isValid?.required,customValidity:Kx(u,i),label:r,help:o,onChange:m,options:d,selected:f,hideLabelFromVision:s})},select:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{type:r,label:o,description:l,getValue:c,setValue:u,isValid:d}=t,p="array"===r,f=c({item:e})??(p?[]:""),m=(0,h.useCallback)((t=>n(u({item:e,value:t}))),[e,n,u]),{elements:g,isLoading:v}=Vx({elements:t.elements,getElements:t.getElements});return v?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(bw,{required:!!t.isValid?.required,customValidity:Kx(d,i),label:o,value:f,help:l,options:g,onChange:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:s,multiple:p})},text:function({data:e,field:t,onChange:n,hideLabelFromVision:s,config:i,validity:r}){const{prefix:o,suffix:l}=i||{};return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r,prefix:o?(0,h.createElement)(o):void 0,suffix:l?(0,h.createElement)(l):void 0})},toggle:function({field:e,onChange:t,data:n,hideLabelFromVision:s,validity:i}){const{label:r,description:o,getValue:l,setValue:c,isValid:u}=e,d=(0,h.useCallback)((()=>{t(c({item:n,value:!l({item:n})}))}),[t,c,n,l]);return(0,a.jsx)(ww,{required:!!u.required,customValidity:Kx(u,i),hidden:s,__nextHasNoMarginBottom:!0,label:r,help:o,checked:l({item:n}),onChange:d})},textarea:function({data:e,field:t,onChange:n,hideLabelFromVision:s,config:i,validity:r}){const{rows:o=4}=i||{},{label:l,placeholder:c,description:u,setValue:d,isValid:p}=t,f=t.getValue({item:e}),m=(0,h.useCallback)((t=>n(d({item:e,value:t}))),[e,n,d]);return(0,a.jsx)(_w,{required:!!p?.required,customValidity:Kx(p,r),label:l,placeholder:c,value:f??"",help:u,onChange:m,rows:o,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:s})},toggleGroup:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{getValue:r,setValue:o,isValid:l}=t,c=r({item:e}),u=(0,h.useCallback)((t=>n(o({item:e,value:t}))),[e,n,o]),{elements:d,isLoading:p}=Vx({elements:t.elements,getElements:t.getElements});if(p)return(0,a.jsx)(b.Spinner,{});if(0===d.length)return null;const f=d.find((e=>e.value===c));return(0,a.jsx)(jw,{required:!!t.isValid?.required,customValidity:Kx(l,i),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:t.label,help:f?.description||t.description,onChange:u,value:c,hideLabelFromVision:s,children:d.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})}};function Tw(e){return e&&"object"==typeof e&&"string"==typeof e.control}function Ow(e){const{control:t,...n}=e,s=Aw(t);return function(e){return(0,a.jsx)(s,{...e,config:n})}}function Aw(e){if(Object.keys(Vw).includes(e))return Vw[e];throw"Control "+e+" not found"}function Nw(e){return e.map((e=>{const t="email"===(n=e.type)?Ax:"integer"===n?Nx:"number"===n?Fx:"text"===n?Mx:"datetime"===n?Bx:"date"===n?Dx:"boolean"===n?Rx:"media"===n?Lx:"array"===n?Hx:"password"===n?Gx:"telephone"===n?Wx:"color"===n?Ux:"url"===n?qx:{sort:(e,t,n)=>"number"==typeof e&&"number"==typeof t?"asc"===n?e-t:t-e:"asc"===n?e.localeCompare(t):t.localeCompare(e),isValid:{elements:!0,custom:()=>null},Edit:null,render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy],validOperators:xx}};var n;const s=e.getValue||(i=e.id,({item:e})=>{const t=i.split(".");let n=e;for(const e of t)n=n.hasOwnProperty(e)?n[e]:void 0;return n});var i;const r=e.setValue||(e=>({value:t})=>{const n=e.split("."),s={};let i=s;for(const e of n.slice(0,-1))i[e]={},i=i[e];return i[n.at(-1)]=t,s})(e.id),o=e.sort??function(e,n,i){return t.sort(s({item:e}),s({item:n}),i)},l={...t.isValid,...e.isValid},c=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?Aw(e.Edit):Tw(e.Edit)?Ow(e.Edit):Iw(e)&&"array"!==e.type?Aw("select"):"string"==typeof t.Edit?Aw(t.Edit):Tw(t.Edit)?Ow(t.Edit):t.Edit}(e,t),u=e.render??function({item:e,field:n}){return t.render({item:e,field:n})},d=function(e,t){if(!1===e.filterBy)return!1;if("object"==typeof e.filterBy){let n=e.filterBy.operators;n&&Array.isArray(n)||(n=t.filterBy?t.filterBy.defaultOperators:[]);let s=xx;return"object"==typeof t.filterBy&&(s=t.filterBy.validOperators),n=n.filter((e=>s.includes(e))),Iw(e)&&n.includes(fx)&&(n=n.filter((e=>e!==fx))),n.some((e=>bx.includes(e)))&&(n=n.filter((e=>[...bx,fx].includes(e)))),0!==n.length&&{isPrimary:!!e.filterBy.isPrimary,operators:n}}if(!1===t.filterBy)return!1;let n=t.filterBy.defaultOperators;return Iw(e)&&n.includes(fx)&&(n=n.filter((e=>e!==fx))),{operators:n}}(e,t);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:s,setValue:r,render:u,sort:o,isValid:l,Edit:c,hasElements:Iw(e),enableHiding:e.enableHiding??!0,enableSorting:e.enableSorting??t.enableSorting??!0,filterBy:d,readOnly:e.readOnly??t.readOnly??!1}}))}function Fw(e=""){return My()(e.trim().toLowerCase())}const Mw=[];function Bw(e,t){switch(t){case"days":return Hy(new Date,e);case"weeks":return Wy(new Date,e);case"months":return qy(new Date,e);case"years":return Yy(new Date,e);default:return new Date}}function Dw(e,t,n){if(!e)return{data:Mw,paginationInfo:{totalItems:0,totalPages:0}};const s=Nw(n);let i=[...e];if(t.search){const e=Fw(t.search);i=i.filter((t=>s.filter((e=>e.enableGlobalSearch)).some((n=>{const s=n.getValue({item:t});return(Array.isArray(s)?s:[s]).some((t=>Fw(String(t)).includes(e)))}))))}t.filters&&t.filters?.length>0&&t.filters.forEach((e=>{const t=s.find((t=>t.id===e.field));if(t)if(e.operator===$y&&e?.value?.length>0)i=i.filter((n=>{const s=t.getValue({item:n});return Array.isArray(s)?e.value.some((e=>s.includes(e))):"string"==typeof s&&e.value.includes(s)}));else if(e.operator===ex&&e?.value?.length>0)i=i.filter((n=>{const s=t.getValue({item:n});return Array.isArray(s)?!e.value.some((e=>s.includes(e))):"string"==typeof s&&!e.value.includes(s)}));else if(e.operator===tx&&e?.value?.length>0)i=i.filter((n=>e.value.every((e=>t.getValue({item:n})?.includes(e)))));else if(e.operator===nx&&e?.value?.length>0)i=i.filter((n=>e.value.every((e=>!t.getValue({item:n})?.includes(e)))));else if(e.operator===Qy)i=i.filter((n=>e.value===t.getValue({item:n})||void 0===e.value));else if(e.operator===Jy)i=i.filter((n=>e.value!==t.getValue({item:n})));else if(e.operator===mx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return n.getTime()===s.getTime()}))}else if(e.operator===gx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return n.getTime()!==s.getTime()}))}else if(e.operator===sx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})<e.value));else if(e.operator===ix&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})>e.value));else if(e.operator===rx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})<=e.value));else if(e.operator===ax&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})>=e.value));else if(e.operator===dx&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&s.toLowerCase().includes(String(e.value).toLowerCase())}));else if(e.operator===hx&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&!s.toLowerCase().includes(String(e.value).toLowerCase())}));else if(e.operator===px&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&s.toLowerCase().startsWith(String(e.value).toLowerCase())}));else if(e.operator===ox&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<n))}else if(e.operator===lx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))>n))}else if(e.operator===cx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<=n))}else if(e.operator===ux&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))>=n))}else if(e.operator===fx&&Array.isArray(e.value)&&2===e.value.length&&void 0!==e.value[0]&&void 0!==e.value[1])i=i.filter((n=>{const s=t.getValue({item:n});return("number"==typeof s||s instanceof Date||"string"==typeof s)&&(s>=e.value[0]&&s<=e.value[1])}));else if(e.operator===vx&&void 0!==e.value?.value&&void 0!==e.value?.unit){const n=Bw(e.value.value,e.value.unit);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return s>=n&&s<=new Date}))}else if(e.operator===yx&&void 0!==e.value?.value&&void 0!==e.value?.unit){const n=Bw(e.value.value,e.value.unit);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<n))}}));const r=t.sort?.field?s.find((e=>e.id===t.sort?.field)):null,a=t.groupByField?s.find((e=>e.id===t.groupByField)):null;(r||a)&&i.sort(((e,n)=>{if(a){const t=a.sort(e,n,"asc");if(0!==t)return t}return r?r.sort(e,n,t.sort?.direction??"desc"):0}));let o=i.length,l=1;if(void 0!==t.page&&void 0!==t.perPage){const e=(t.page-1)*t.perPage;o=i?.length||0,l=Math.ceil(o/t.perPage),i=i?.slice(e,e+t.perPage)}return{data:i,paginationInfo:{totalItems:o,totalPages:l}}}const Rw=(0,h.createContext)({view:{type:Ex},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,h.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInfiniteScrollHandler:!1,config:{perPageSizes:[]}});Rw.displayName="DataViewsContext";var Lw=Rw,zw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})}),Hw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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"})}),Gw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Ww=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});function Uw({selection:e,onChangeSelection:t,item:n,getItemId:s,titleField:i,disabled:r,...o}){const l=s(n),c=!r&&e.includes(l),u=i?.getValue?.({item:n})||(0,w.__)("(no title)");return(0,a.jsx)(b.CheckboxControl,{className:"dataviews-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":u,"aria-disabled":r,checked:c,onChange:()=>{r||t(e.includes(l)?e.filter((e=>l!==e)):[...e,l])},...o})}const{Menu:qw,kebabCase:Zw}=Yx(b.privateApis);function Yw({action:e,onClick:t,items:n}){const s="string"==typeof e.label?e.label:e.label(n);return(0,a.jsx)(b.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",onClick:t,children:s})}function Kw({action:e,onClick:t,items:n}){const s="string"==typeof e.label?e.label:e.label(n);return(0,a.jsx)(qw.Item,{disabled:e.disabled,onClick:t,children:(0,a.jsx)(qw.ItemLabel,{children:s})})}function Xw({action:e,items:t,closeModal:n}){const s="string"==typeof e.label?e.label:e.label(t),i="function"==typeof e.modalHeader?e.modalHeader(t):e.modalHeader;return(0,a.jsx)(b.Modal,{title:i||s,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:n,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${Zw(e.id)}`,children:(0,a.jsx)(e.RenderModal,{items:t,closeModal:n})})}function Qw({actions:e,item:t,registry:n,setActiveModalAction:s}){return(0,a.jsx)(qw.Group,{children:e.map((e=>(0,a.jsx)(Kw,{action:e,onClick:()=>{"RenderModal"in e?s(e):e.callback([t],{registry:n})},items:[t]},e.id)))})}function Jw({item:e,actions:t,isCompact:n}){const s=(0,c.useRegistry)(),{primaryActions:i,eligibleActions:r}=(0,h.useMemo)((()=>{const n=t.filter((t=>!t.isEligible||t.isEligible(e)));return{primaryActions:n.filter((e=>e.isPrimary)),eligibleActions:n}}),[t,e]);return n?(0,a.jsx)($w,{item:e,actions:r,isSmall:!0,registry:s}):(0,a.jsxs)(b.__experimentalHStack,{spacing:0,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,a.jsx)(e_,{item:e,actions:i,registry:s}),i.length<r.length&&(0,a.jsx)($w,{item:e,actions:r,registry:s})]})}function $w({item:e,actions:t,isSmall:n,registry:s}){const[i,r]=(0,h.useState)(null);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(qw,{placement:"bottom-end",children:[(0,a.jsx)(qw.TriggerButton,{render:(0,a.jsx)(b.Button,{size:n?"small":"compact",icon:No,label:(0,w.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,a.jsx)(qw.Popover,{children:(0,a.jsx)(Qw,{actions:t,item:e,registry:s,setActiveModalAction:r})})]}),!!i&&(0,a.jsx)(Xw,{action:i,items:[e],closeModal:()=>r(null)})]})}function e_({item:e,actions:t,registry:n}){const[s,i]=(0,h.useState)(null);return(0,y.useViewportMatch)("medium","<")?null:Array.isArray(t)&&0!==t.length?(0,a.jsxs)(a.Fragment,{children:[t.map((t=>(0,a.jsx)(Yw,{action:t,onClick:()=>{"RenderModal"in t?i(t):t.callback([e],{registry:n})},items:[e]},t.id))),!!s&&(0,a.jsx)(Xw,{action:s,items:[e],closeModal:()=>i(null)})]}):null}function t_({action:e,items:t,ActionTriggerComponent:n}){const[s,i]=(0,h.useState)(!1),r={action:e,onClick:()=>{i(!0)},items:t};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{...r}),s&&(0,a.jsx)(Xw,{action:e,items:t,closeModal:()=>i(!1)})]})}function n_(e,t){return(0,h.useMemo)((()=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))),[e,t])}function s_(e,t){return(0,h.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))))),[e,t])}function i_({selection:e,onChangeSelection:t,data:n,actions:s,getItemId:i}){const r=(0,h.useMemo)((()=>n.filter((e=>s.some((t=>t.supportsBulk&&(!t.isEligible||t.isEligible(e))))))),[n,s]),o=n.filter((t=>e.includes(i(t))&&r.includes(t))),l=o.length===r.length;return(0,a.jsx)(b.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:l,indeterminate:!l&&!!o.length,onChange:()=>{t(l?[]:r.map((e=>i(e))))},"aria-label":l?(0,w.__)("Deselect all"):(0,w.__)("Select all")})}function r_({action:e,onClick:t,isBusy:n,items:s}){const i="string"==typeof e.label?e.label:e.label(s);return(0,a.jsx)(b.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",onClick:t,isBusy:n,children:i})}const a_=[];function o_({action:e,selectedItems:t,actionInProgress:n,setActionInProgress:s}){const i=(0,c.useRegistry)(),r=(0,h.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]);return"RenderModal"in e?(0,a.jsx)(t_,{action:e,items:r,ActionTriggerComponent:r_},e.id):(0,a.jsx)(r_,{action:e,onClick:async()=>{s(e.id),await e.callback(t,{registry:i}),s(null)},items:r,isBusy:n===e.id},e.id)}function l_(e,t,n,s,i,r,o,l,c){const u=r.length>0?(0,w.sprintf)((0,w._n)("%d Item selected","%d Items selected",r.length),r.length):(0,w.sprintf)((0,w._n)("%d Item","%d Items",e.length),e.length);return(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"dataviews-bulk-actions-footer__container",spacing:3,children:[(0,a.jsx)(i_,{selection:s,onChangeSelection:c,data:e,actions:t,getItemId:n}),(0,a.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u}),(0,a.jsxs)(b.__experimentalHStack,{className:"dataviews-bulk-actions-footer__action-buttons",expanded:!1,spacing:1,children:[i.map((e=>(0,a.jsx)(o_,{action:e,selectedItems:r,actionInProgress:o,setActionInProgress:l},e.id))),r.length>0&&(0,a.jsx)(b.Button,{icon:Ea,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,w.__)("Cancel"),disabled:!!o,accessibleWhenDisabled:!1,onClick:()=>{c(a_)}})]})]})}function c_({selection:e,actions:t,onChangeSelection:n,data:s,getItemId:i}){const[r,a]=(0,h.useState)(null),o=(0,h.useRef)(null),l=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),c=(0,h.useMemo)((()=>s.filter((e=>l.some((t=>!t.isEligible||t.isEligible(e)))))),[s,l]),u=(0,h.useMemo)((()=>s.filter((t=>e.includes(i(t))&&c.includes(t)))),[e,s,i,c]),d=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk&&u.some((t=>!e.isEligible||e.isEligible(t)))))),[t,u]);return r?(o.current||(o.current=l_(s,t,i,e,d,u,r,a,n)),o.current):(o.current&&(o.current=null),l_(s,t,i,e,d,u,r,a,n))}function u_(){const{data:e,selection:t,actions:n=a_,onChangeSelection:s,getItemId:i}=(0,h.useContext)(Lw);return(0,a.jsx)(c_,{selection:t,onChangeSelection:s,data:e,actions:n,getItemId:i})}var d_=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})}),h_=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),p_=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});const{Menu:f_}=Yx(b.privateApis);function m_({children:e}){return h.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,a.jsxs)(h.Fragment,{children:[t>0&&(0,a.jsx)(f_.Separator,{}),e]},t)))}const g_=(0,h.forwardRef)((function({fieldId:e,view:t,fields:n,onChangeView:s,onHide:i,setOpenedFilter:r,canMove:o=!0},l){const c=t.fields??[],u=c?.indexOf(e),d=t.sort?.field===e;let h=!1,p=!1,f=!1,m=[];const g=n.find((t=>t.id===e));if(!g)return null;h=!1!==g.enableHiding,p=!1!==g.enableSorting;const v=g.header;return m=!!g.filterBy&&g.filterBy?.operators||[],f=!(t.filters?.some((t=>e===t.field))||!g.hasElements&&!g.Edit||!1===g.filterBy||g.filterBy?.isPrimary),p||o||h||f?(0,a.jsxs)(f_,{children:[(0,a.jsxs)(f_.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:l,variant:"tertiary"}),children:[v,t.sort&&d&&(0,a.jsx)("span",{"aria-hidden":"true",children:jx[t.sort.direction]})]}),(0,a.jsx)(f_.Popover,{style:{minWidth:"240px"},children:(0,a.jsxs)(m_,{children:[p&&(0,a.jsx)(f_.Group,{children:_x.map((n=>{const i=t.sort&&d&&t.sort.direction===n,r=`${e}-${n}`;return(0,a.jsx)(f_.RadioItem,{name:"view-table-sorting",value:r,checked:i,onChange:()=>{s({...t,sort:{field:e,direction:n},showLevels:!1})},children:(0,a.jsx)(f_.ItemLabel,{children:Cx[n]})},r)}))}),f&&(0,a.jsx)(f_.Group,{children:(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:d_}),onClick:()=>{r(e),s({...t,page:1,filters:[...t.filters||[],{field:e,value:void 0,operator:m[0]}]})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Add filter")})})}),(o||h)&&g&&(0,a.jsxs)(f_.Group,{children:[o&&(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:h_}),disabled:u<1,onClick:()=>{s({...t,fields:[...c.slice(0,u-1)??[],e,c[u-1],...c.slice(u+1)]})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Move left")})}),o&&(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:p_}),disabled:u>=c.length-1,onClick:()=>{s({...t,fields:[...c.slice(0,u)??[],c[u+1],e,...c.slice(u+2)]})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Move right")})}),h&&g&&(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:Pw}),onClick:()=>{i(g),s({...t,fields:c.filter((t=>t!==e))})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Hide column")})})]})]})})]}):v}));var v_=g_;function y_({item:e,isItemClickable:t,onClickItem:n,renderItemLink:s,className:i,children:r,...o}){if(!t(e))return(0,a.jsx)("div",{className:i,...o,children:r});if(s){const t=s({item:e,className:`${i} ${i}--clickable`,...o,children:r});return(0,h.cloneElement)(t,{onClick:e=>{e.stopPropagation(),t.props.onClick&&t.props.onClick(e)},onKeyDown:e=>{"Enter"!==e.key&&""!==e.key&&" "!==e.key||(e.stopPropagation(),t.props.onKeyDown&&t.props.onKeyDown(e))}})}const l=function({item:e,isItemClickable:t,onClickItem:n,className:s}){return t(e)&&n?{className:s?`${s} ${s}--clickable`:void 0,role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),n(e)},onKeyDown:t=>{"Enter"!==t.key&&""!==t.key&&" "!==t.key||(t.stopPropagation(),n(e))}}:{className:s}}({item:e,isItemClickable:t,onClickItem:n,className:i});return(0,a.jsx)("div",{...l,...o,children:r})}var x_=function({item:e,level:t,titleField:n,mediaField:s,descriptionField:i,onClickItem:r,renderItemLink:o,isItemClickable:l}){return(0,a.jsxs)(b.__experimentalHStack,{spacing:3,justify:"flex-start",children:[s&&(0,a.jsx)(y_,{item:e,isItemClickable:l,onClickItem:r,renderItemLink:o,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":n?(0,w.sprintf)((0,w.__)("Click item: %s"),n.getValue?.({item:e})):void 0,children:(0,a.jsx)(s.render,{item:e,field:s,config:{sizes:"32px"}})}),(0,a.jsxs)(b.__experimentalVStack,{spacing:0,alignment:"flex-start",className:"dataviews-view-table__primary-column-content",children:[n&&(0,a.jsxs)(y_,{item:e,isItemClickable:l,onClickItem:r,renderItemLink:o,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[void 0!==t&&t>0&&(0,a.jsxs)("span",{className:"dataviews-view-table__level",children:["—".repeat(t)," "]}),(0,a.jsx)(n.render,{item:e,field:n})]}),i&&(0,a.jsx)(i.render,{item:e,field:i})]})]})};function b_({scrollContainerRef:e,enabled:t=!1}){const[n,s]=(0,h.useState)(!1),i=(0,y.useDebounce)((0,h.useCallback)((()=>{const t=e.current;t&&s((e=>{if((0,w.isRTL)())return Math.abs(e.scrollLeft)<=1;return e.scrollLeft+e.clientWidth>=e.scrollWidth-1})(t))}),[e,s]),200);return(0,h.useEffect)((()=>"undefined"!=typeof window&&t&&e.current?(i(),e.current.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{e.current?.removeEventListener("scroll",i),window.removeEventListener("resize",i)}):()=>{}),[e,t]),n}function w_(e,t){return e.reduce(((e,n)=>{const s=t.getValue({item:n});return e.has(s)||e.set(s,[]),e.get(s)?.push(n),e}),new Map)}function __({item:e,fields:t,column:n,align:s}){const i=t.find((e=>e.id===n));if(!i)return null;const r=Ht("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":"end"===s,"dataviews-view-table__cell-align-center":"center"===s});return(0,a.jsx)("div",{className:r,children:(0,a.jsx)(i.render,{item:e,field:i})})}function j_({hasBulkActions:e,item:t,level:n,actions:s,fields:i,id:r,view:o,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:p,isItemClickable:f,onClickItem:m,renderItemLink:g,onChangeSelection:v,isActionsColumnSticky:y,posinset:x}){const{paginationInfo:b}=(0,h.useContext)(Lw),w=n_(s,t),_=w&&d.includes(r),[j,S]=(0,h.useState)(!1),{showTitle:C=!0,showMedia:k=!0,showDescription:E=!0,infiniteScrollEnabled:P}=o,I=(0,h.useRef)(!1),V=o.fields??[],T=l&&C||c&&k||u&&E;return(0,a.jsxs)("tr",{className:Ht("dataviews-view-table__row",{"is-selected":w&&_,"is-hovered":j,"has-bulk-actions":w}),onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onTouchStart:()=>{I.current=!0},"aria-setsize":P?b.totalItems:void 0,"aria-posinset":x,role:P?"article":void 0,onClick:e=>{w&&(I.current||"Range"===document.getSelection()?.type||(((0,Xt.isAppleOS)()?e.metaKey:e.ctrlKey)?v(d.includes(r)?d.filter((e=>r!==e)):[...d,r]):v(d.includes(r)?d.filter((e=>r!==e)):[r])))},children:[e&&(0,a.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,a.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,a.jsx)(Uw,{item:t,selection:d,onChangeSelection:v,getItemId:p,titleField:l,disabled:!w})})}),T&&(0,a.jsx)("td",{children:(0,a.jsx)(x_,{item:t,level:n,titleField:C?l:void 0,mediaField:k?c:void 0,descriptionField:E?u:void 0,isItemClickable:f,onClickItem:m,renderItemLink:g})}),V.map((e=>{const{width:n,maxWidth:s,minWidth:r,align:l}=o.layout?.styles?.[e]??{};return(0,a.jsx)("td",{style:{width:n,maxWidth:s,minWidth:r},children:(0,a.jsx)(__,{fields:i,item:t,column:e,align:l})},e)})),!!s?.length&&(0,a.jsx)("td",{className:Ht("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":y}),onClick:e=>e.stopPropagation(),children:(0,a.jsx)(Jw,{item:t,actions:s})})]})}var S_=function({actions:e,data:t,fields:n,getItemId:s,getItemLevel:i,isLoading:r=!1,onChangeView:o,onChangeSelection:l,selection:c,setOpenedFilter:u,onClickItem:d,isItemClickable:p,renderItemLink:f,view:m,className:g,empty:v}){const{containerRef:y}=(0,h.useContext)(Lw),x=(0,h.useRef)(new Map),_=(0,h.useRef)(),[j,S]=(0,h.useState)(),C=s_(e,t);(0,h.useEffect)((()=>{_.current&&(_.current.focus(),_.current=void 0)}));const k=(0,h.useId)(),E=b_({scrollContainerRef:y,enabled:!!e?.length});if(j)return _.current=j,void S(void 0);const P=e=>{const t=x.current.get(e.id),n=t?x.current.get(t.fallback):void 0;S(n?.node)},I=!!t?.length,V=n.find((e=>e.id===m.titleField)),T=n.find((e=>e.id===m.mediaField)),O=n.find((e=>e.id===m.descriptionField)),A=m.groupByField?n.find((e=>e.id===m.groupByField)):null,N=A?w_(t,A):null,{showTitle:F=!0,showMedia:M=!0,showDescription:B=!0}=m,D=V&&F||T&&M||O&&B,R=m.fields??[],L=(e,t)=>n=>{n?x.current.set(e,{node:n,fallback:R[t>0?t-1:1]}):x.current.delete(e)},z=m.infiniteScrollEnabled&&!N;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("table",{className:Ht("dataviews-view-table",g,{[`has-${m.layout?.density}-density`]:m.layout?.density&&["compact","comfortable"].includes(m.layout.density)}),"aria-busy":r,"aria-describedby":k,role:z?"feed":void 0,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"dataviews-view-table__row",children:[C&&(0,a.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",children:(0,a.jsx)(i_,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:s})}),D&&(0,a.jsx)("th",{scope:"col",children:V&&(0,a.jsx)(v_,{ref:L(V.id,0),fieldId:V.id,view:m,fields:n,onChangeView:o,onHide:P,setOpenedFilter:u,canMove:!1})}),R.map(((e,t)=>{const{width:s,maxWidth:i,minWidth:r,align:l}=m.layout?.styles?.[e]??{};return(0,a.jsx)("th",{style:{width:s,maxWidth:i,minWidth:r,textAlign:l},"aria-sort":m.sort?.direction&&m.sort?.field===e?Sx[m.sort.direction]:void 0,scope:"col",children:(0,a.jsx)(v_,{ref:L(e,t),fieldId:e,view:m,fields:n,onChangeView:o,onHide:P,setOpenedFilter:u,canMove:m.layout?.enableMoving??!0})},e)})),!!e?.length&&(0,a.jsx)("th",{className:Ht("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!E}),children:(0,a.jsx)("span",{className:"dataviews-view-table-header",children:(0,w.__)("Actions")})})]})}),I&&A&&N?Array.from(N.entries()).map((([t,r])=>(0,a.jsxs)("tbody",{children:[(0,a.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,a.jsx)("td",{colSpan:R.length+(D?1:0)+(C?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),A.label,t)})}),r.map(((t,r)=>(0,a.jsx)(j_,{item:t,level:m.showLevels&&"function"==typeof i?i(t):void 0,hasBulkActions:C,actions:e,fields:n,id:s(t)||r.toString(),view:m,titleField:V,mediaField:T,descriptionField:O,selection:c,getItemId:s,onChangeSelection:l,onClickItem:d,renderItemLink:f,isItemClickable:p,isActionsColumnSticky:!E},s(t))))]},`group-${t}`))):(0,a.jsx)("tbody",{children:I&&t.map(((t,r)=>(0,a.jsx)(j_,{item:t,level:m.showLevels&&"function"==typeof i?i(t):void 0,hasBulkActions:C,actions:e,fields:n,id:s(t)||r.toString(),view:m,titleField:V,mediaField:T,descriptionField:O,selection:c,getItemId:s,onChangeSelection:l,onClickItem:d,renderItemLink:f,isItemClickable:p,isActionsColumnSticky:!E,posinset:z?r+1:void 0},s(t))))})]}),(0,a.jsxs)("div",{className:Ht({"dataviews-loading":r,"dataviews-no-results":!I&&!r}),id:k,children:[!I&&(r?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):v),I&&r&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})]})};const C_=(0,h.forwardRef)((({className:e,previewSize:t,...n},s)=>(0,a.jsx)("div",{ref:s,className:Ht("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...n}))),{Badge:k_}=Yx(b.privateApis);function E_({view:e,selection:t,onChangeSelection:n,onClickItem:s,isItemClickable:i,renderItemLink:r,getItemId:o,item:l,actions:c,mediaField:u,titleField:d,descriptionField:p,regularFields:f,badgeFields:m,hasBulkActions:g,config:v,posinset:x}){const{showTitle:_=!0,showMedia:j=!0,showDescription:S=!0,infiniteScrollEnabled:C}=e,k=n_(c,l),E=o(l),P=(0,y.useInstanceId)(E_),I=t.includes(E),V=u?.render?(0,a.jsx)(u.render,{item:l,field:u,config:v}):null,T=_&&d?.render?(0,a.jsx)(d.render,{item:l,field:d}):null,O=j&&V;let A,N;i(l)&&s&&(T?(A={"aria-labelledby":`dataviews-view-grid__title-field-${P}`},N={id:`dataviews-view-grid__title-field-${P}`}):A={"aria-label":(0,w.__)("Navigate to item")});const{paginationInfo:F}=(0,h.useContext)(Lw);return(0,a.jsxs)(b.__experimentalVStack,{spacing:0,className:Ht("dataviews-view-grid__card",{"is-selected":k&&I}),onClickCapture:e=>{if((0,Xt.isAppleOS)()?e.metaKey:e.ctrlKey){if(e.stopPropagation(),e.preventDefault(),!k)return;n(t.includes(E)?t.filter((e=>E!==e)):[...t,E])}},role:C?"article":void 0,"aria-setsize":C?F.totalItems:void 0,"aria-posinset":x,children:[O&&(0,a.jsx)(y_,{item:l,isItemClickable:i,onClickItem:s,renderItemLink:r,className:"dataviews-view-grid__media",...A,children:V}),g&&O&&(0,a.jsx)(Uw,{item:l,selection:t,onChangeSelection:n,getItemId:o,titleField:d,disabled:!k}),!_&&O&&!!c?.length&&(0,a.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,a.jsx)(Jw,{item:l,actions:c,isCompact:!0})}),_&&(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions",children:[(0,a.jsx)(y_,{item:l,isItemClickable:i,onClickItem:s,renderItemLink:r,className:"dataviews-view-grid__title-field dataviews-title-field",...N,children:T}),!!c?.length&&(0,a.jsx)(Jw,{item:l,actions:c,isCompact:!0})]}),(0,a.jsxs)(b.__experimentalVStack,{spacing:1,children:[S&&p?.render&&(0,a.jsx)(p.render,{item:l,field:p}),!!m?.length&&(0,a.jsx)(b.__experimentalHStack,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:m.map((e=>(0,a.jsx)(k_,{className:"dataviews-view-grid__field-value",children:(0,a.jsx)(e.render,{item:l,field:e})},e.id)))}),!!f?.length&&(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:1,children:f.map((e=>(0,a.jsx)(b.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Tooltip,{text:e.label,children:(0,a.jsx)(b.FlexItem,{className:"dataviews-view-grid__field-name",children:e.header})}),(0,a.jsx)(b.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,a.jsx)(e.render,{item:l,field:e})})]})},e.id)))})]})]},E)}var P_=function({actions:e,data:t,fields:n,getItemId:s,isLoading:i,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:p,empty:f}){const{resizeObserverRef:m}=(0,h.useContext)(Lw),g=n.find((e=>e.id===d?.titleField)),v=n.find((e=>e.id===d?.mediaField)),y=n.find((e=>e.id===d?.descriptionField)),x=d.fields??[],{regularFields:_,badgeFields:j}=x.reduce(((e,t)=>{const s=n.find((e=>e.id===t));if(!s)return e;return e[d.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(s),e}),{regularFields:[],badgeFields:[]}),S=!!t?.length,C=s_(e,t),k=d.layout?.previewSize,E="900px",P=d.groupByField?n.find((e=>e.id===d.groupByField)):null,I=P?w_(t,P):null,V=d.infiniteScrollEnabled&&!I;return(0,a.jsxs)(a.Fragment,{children:[S&&P&&I&&(0,a.jsx)(b.__experimentalVStack,{spacing:4,children:Array.from(I.entries()).map((([t,n])=>(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)("h3",{className:"dataviews-view-grid__group-header",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),P.label,t)}),(0,a.jsx)(C_,{className:Ht("dataviews-view-grid",p),previewSize:k,"aria-busy":i,ref:m,children:n.map((t=>(0,a.jsx)(E_,{view:d,selection:u,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,getItemId:s,item:t,actions:e,mediaField:v,titleField:g,descriptionField:y,regularFields:_,badgeFields:j,hasBulkActions:C,config:{sizes:E}},s(t))))})]},t)))}),S&&!I&&(0,a.jsx)(C_,{className:Ht("dataviews-view-grid",p),previewSize:k,"aria-busy":i,ref:m,role:V?"feed":void 0,children:t.map(((t,n)=>(0,a.jsx)(E_,{view:d,selection:u,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,getItemId:s,item:t,actions:e,mediaField:v,titleField:g,descriptionField:y,regularFields:_,badgeFields:j,hasBulkActions:C,config:{sizes:E},posinset:V?n+1:void 0},s(t))))}),!S&&(0,a.jsx)("div",{className:Ht({"dataviews-loading":i,"dataviews-no-results":!i}),children:i?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):f}),S&&i&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})};const{Menu:I_}=Yx(b.privateApis);function V_(e){return`${e}-item-wrapper`}function T_(e){return`${e}-dropdown`}function O_({idPrefix:e,primaryAction:t,item:n}){const s=(0,c.useRegistry)(),[i,r]=(0,h.useState)(!1),o=function(e,t){return`${e}-primary-action-${t}`}(e,t.id),l="string"==typeof t.label?t.label:t.label([n]);return"RenderModal"in t?(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:o,render:(0,a.jsx)(b.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>r(!0),variant:"link",children:l}),children:i&&(0,a.jsx)(Xw,{action:t,items:[n],closeModal:()=>r(!1)})})},t.id):(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:o,render:(0,a.jsx)(b.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([n],{registry:s})},variant:"link",children:l})})},t.id)}function A_({view:e,actions:t,idPrefix:n,isSelected:s,item:i,titleField:r,mediaField:o,descriptionField:l,onSelect:u,otherFields:d,onDropdownTriggerKeyDown:p,posinset:f}){const{showTitle:m=!0,showMedia:g=!0,showDescription:v=!0,infiniteScrollEnabled:y}=e,x=(0,h.useRef)(null),_=`${n}-label`,j=`${n}-description`,S=(0,c.useRegistry)(),[C,k]=(0,h.useState)(!1),[E,P]=(0,h.useState)(null),I=({type:e})=>{k("mouseenter"===e)},{paginationInfo:V}=(0,h.useContext)(Lw);(0,h.useEffect)((()=>{s&&x.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[s]);const{primaryAction:T,eligibleActions:O}=(0,h.useMemo)((()=>{const e=t.filter((e=>!e.isEligible||e.isEligible(i)));return{primaryAction:e.filter((e=>e.isPrimary))[0],eligibleActions:e}}),[t,i]),A=T&&1===t.length,N=g&&o?.render?(0,a.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,a.jsx)(o.render,{item:i,field:o,config:{sizes:"52px"}})}):null,F=m&&r?.render?(0,a.jsx)(r.render,{item:i,field:r}):null,M=O?.length>0&&(0,a.jsxs)(b.__experimentalHStack,{spacing:3,className:"dataviews-view-list__item-actions",children:[T&&(0,a.jsx)(O_,{idPrefix:n,primaryAction:T,item:i}),!A&&(0,a.jsxs)("div",{role:"gridcell",children:[(0,a.jsxs)(I_,{placement:"bottom-end",children:[(0,a.jsx)(I_.TriggerButton,{render:(0,a.jsx)(b.Composite.Item,{id:T_(n),render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:p})})}),(0,a.jsx)(I_.Popover,{children:(0,a.jsx)(Qw,{actions:O,item:i,registry:S,setActiveModalAction:P})})]}),!!E&&(0,a.jsx)(Xw,{action:E,items:[i],closeModal:()=>P(null)})]})]});return(0,a.jsx)(b.Composite.Row,{ref:x,render:(0,a.jsx)("div",{"aria-posinset":f,"aria-setsize":y?V.totalItems:void 0}),role:y?"article":"row",className:Ht({"is-selected":s,"is-hovered":C}),onMouseEnter:I,onMouseLeave:I,children:(0,a.jsxs)(b.__experimentalHStack,{className:"dataviews-view-list__item-wrapper",spacing:0,children:[(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:V_(n),"aria-pressed":s,"aria-labelledby":_,"aria-describedby":j,className:"dataviews-view-list__item",onClick:()=>u(i)})}),(0,a.jsxs)(b.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start",children:[N,(0,a.jsxs)(b.__experimentalVStack,{spacing:1,className:"dataviews-view-list__field-wrapper",children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:0,children:[(0,a.jsx)("div",{className:"dataviews-title-field",id:_,children:F}),M]}),v&&l?.render&&(0,a.jsx)("div",{className:"dataviews-view-list__field",children:(0,a.jsx)(l.render,{item:i,field:l})}),(0,a.jsx)("div",{className:"dataviews-view-list__fields",id:j,children:d.map((e=>(0,a.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,a.jsx)(b.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:e.label}),(0,a.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,a.jsx)(e.render,{item:i,field:e})})]},e.id)))})]})]})]})})}function N_(e){return!!e}function F_(e){return(0,h.useMemo)((()=>e?.every((e=>e.supportsBulk))),[e])}const{Badge:M_}=Yx(b.privateApis);function B_({view:e,multiselect:t,selection:n,onChangeSelection:s,getItemId:i,item:r,mediaField:o,titleField:l,descriptionField:c,regularFields:u,badgeFields:d,config:h,posinset:p,setsize:f}){const{showTitle:m=!0,showMedia:g=!0,showDescription:v=!0}=e,y=i(r),x=n.includes(y),_=o?.render?(0,a.jsx)(o.render,{item:r,field:o,config:h}):null,j=m&&l?.render?(0,a.jsx)(l.render,{item:r,field:l}):null;return(0,a.jsxs)(b.Composite.Item,{"aria-label":l?l.getValue({item:r})||(0,w.__)("(no title)"):void 0,render:({children:e,...t})=>(0,a.jsx)(b.__experimentalVStack,{spacing:0,children:e,...t}),role:"option","aria-posinset":p,"aria-setsize":f,className:Ht("dataviews-view-picker-grid__card",{"is-selected":x}),"aria-selected":x,onClick:()=>{if(x)s(n.filter((e=>y!==e)));else{const e=t?[...n,y]:[y];s(e)}},children:[g&&_&&(0,a.jsx)("div",{className:"dataviews-view-picker-grid__media",children:_}),g&&_&&(0,a.jsx)(Uw,{item:r,selection:n,onChangeSelection:s,getItemId:i,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),m&&(0,a.jsx)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,a.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:j})}),(0,a.jsxs)(b.__experimentalVStack,{spacing:1,children:[v&&c?.render&&(0,a.jsx)(c.render,{item:r,field:c}),!!d?.length&&(0,a.jsx)(b.__experimentalHStack,{className:"dataviews-view-picker-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:d.map((e=>(0,a.jsx)(M_,{className:"dataviews-view-picker-grid__field-value",children:(0,a.jsx)(e.render,{item:r,field:e})},e.id)))}),!!u?.length&&(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-picker-grid__fields",spacing:1,children:u.map((e=>(0,a.jsx)(b.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:e.header}),(0,a.jsx)(b.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,a.jsx)(e.render,{item:r,field:e})})]})},e.id)))})]})]},y)}function D_({groupName:e,groupField:t,children:n}){const s=(0,y.useInstanceId)(D_,"dataviews-view-picker-grid-group__header");return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,role:"group","aria-labelledby":s,children:[(0,a.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:s,children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),t.label,e)}),n]},e)}var R_=function({actions:e,data:t,fields:n,getItemId:s,isLoading:i,onChangeSelection:r,selection:o,view:l,className:c,empty:u}){const{resizeObserverRef:d,paginationInfo:p,itemListLabel:f}=(0,h.useContext)(Lw),m=n.find((e=>e.id===l?.titleField)),g=n.find((e=>e.id===l?.mediaField)),v=n.find((e=>e.id===l?.descriptionField)),y=l.fields??[],{regularFields:x,badgeFields:w}=y.reduce(((e,t)=>{const s=n.find((e=>e.id===t));if(!s)return e;return e[l.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(s),e}),{regularFields:[],badgeFields:[]}),_=!!t?.length,j=l.layout?.previewSize,S=F_(e),C="900px",k=l.groupByField?n.find((e=>e.id===l.groupByField)):null,E=k?w_(t,k):null,P=l.infiniteScrollEnabled&&!E,I=l?.page??1,V=l?.perPage??0,T=P?p?.totalItems:void 0;return(0,a.jsxs)(a.Fragment,{children:[_&&k&&E&&(0,a.jsx)(b.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":S,className:Ht("dataviews-view-picker-grid",c),"aria-label":f,render:({children:e,...t})=>(0,a.jsx)(b.__experimentalVStack,{spacing:4,children:e,...t}),children:Array.from(E.entries()).map((([e,n])=>(0,a.jsx)(D_,{groupName:e,groupField:k,children:(0,a.jsx)(C_,{previewSize:j,style:{gridTemplateColumns:j&&`repeat(auto-fill, minmax(${j}px, 1fr))`},"aria-busy":i,ref:d,children:n.map((e=>{const n=(I-1)*V+t.indexOf(e)+1;return(0,a.jsx)(B_,{view:l,multiselect:S,selection:o,onChangeSelection:r,getItemId:s,item:e,mediaField:g,titleField:m,descriptionField:v,regularFields:x,badgeFields:w,config:{sizes:C},posinset:n,setsize:T},s(e))}))})},e)))}),_&&!E&&(0,a.jsx)(b.Composite,{render:(0,a.jsx)(C_,{className:Ht("dataviews-view-picker-grid",c),previewSize:j,"aria-busy":i,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":S,"aria-label":f,children:t.map(((e,t)=>{let n=P?t+1:void 0;return P||(n=(I-1)*V+t+1),(0,a.jsx)(B_,{view:l,multiselect:S,selection:o,onChangeSelection:r,getItemId:s,item:e,mediaField:g,titleField:m,descriptionField:v,regularFields:x,badgeFields:w,config:{sizes:C},posinset:n,setsize:T},s(e))}))}),!_&&(0,a.jsx)("div",{className:Ht({"dataviews-loading":i,"dataviews-no-results":!i}),children:i?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):u}),_&&i&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})};const L_=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function z_(){const e=(0,h.useContext)(Lw),t=e.view,n=L_.filter((t=>e.containerWidth>=t.breakpoint)),s=t.layout?.previewSize??230,i=n.map(((e,t)=>({...e,index:t}))).filter((e=>e.value<=s)).sort(((e,t)=>t.value-e.value))[0]?.index??0,r=n.map(((e,t)=>({value:t})));return(0,a.jsx)(b.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,showTooltip:!1,label:(0,w.__)("Preview size"),value:i,min:0,max:n.length-1,withInputField:!1,onChange:(s=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:n[s].value}})},step:1,marks:r})}const H_=[{type:Ex,label:(0,w.__)("Table"),component:S_,icon:zw,viewConfigOptions:function(){const e=(0,h.useContext)(Lw),t=e.view;return(0,a.jsxs)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,w.__)("Density"),value:t.layout?.density||"balanced",onChange:n=>{e.onChangeView({...t,layout:{...t.layout,density:n}})},isBlock:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,w._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,w._x)("Balanced","Density option for DataView layout")},"balanced"),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"compact",label:(0,w._x)("Compact","Density option for DataView layout")},"compact")]})}},{type:Px,label:(0,w.__)("Grid"),component:P_,icon:Hw,viewConfigOptions:z_},{type:"list",label:(0,w.__)("List"),component:function e(t){const{actions:n,data:s,fields:i,getItemId:r,isLoading:o,onChangeSelection:l,selection:c,view:u,className:d,empty:p}=t,f=(0,y.useInstanceId)(e,"view-list"),m=s?.findLast((e=>c.includes(r(e)))),g=i.find((e=>e.id===u.titleField)),v=i.find((e=>e.id===u.mediaField)),x=i.find((e=>e.id===u.descriptionField)),_=(u?.fields??[]).map((e=>i.find((t=>e===t.id)))).filter(N_),j=e=>l([r(e)]),S=(0,h.useCallback)((e=>`${f}-${r(e)}`),[f,r]),C=(0,h.useCallback)(((e,t)=>t.startsWith(S(e))),[S]),[k,E]=(0,h.useState)(void 0);(0,h.useEffect)((()=>{m&&E(V_(S(m)))}),[m,S]);const P=s.findIndex((e=>C(e,k??""))),I=(0,y.usePrevious)(P),V=-1!==P,T=(0,h.useCallback)(((e,t)=>{const n=Math.min(s.length-1,Math.max(0,e));if(!s[n])return;const i=t(S(s[n]));E(i),document.getElementById(i)?.focus()}),[s,S]);(0,h.useEffect)((()=>{!V&&(void 0!==I&&-1!==I)&&T(I,V_)}),[V,T,I]);const O=(0,h.useCallback)((e=>{"ArrowDown"===e.key&&(e.preventDefault(),T(P+1,T_)),"ArrowUp"===e.key&&(e.preventDefault(),T(P-1,T_))}),[T,P]),A=s?.length;if(!A)return(0,a.jsx)("div",{className:Ht({"dataviews-loading":o,"dataviews-no-results":!A&&!o}),children:!A&&(o?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):p)});const N=u.groupByField?i.find((e=>e.id===u.groupByField)):null,F=N?w_(s,N):null;return A&&N&&F?(0,a.jsx)(b.Composite,{id:`${f}`,render:(0,a.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:k,setActiveId:E,children:(0,a.jsx)(b.__experimentalVStack,{spacing:4,className:Ht("dataviews-view-list",d),children:Array.from(F.entries()).map((([e,t])=>(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)("h3",{className:"dataviews-view-list__group-header",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),N.label,e)}),t.map((e=>{const t=S(e);return(0,a.jsx)(A_,{view:u,idPrefix:t,actions:n,item:e,isSelected:e===m,onSelect:j,mediaField:v,titleField:g,descriptionField:x,otherFields:_,onDropdownTriggerKeyDown:O},t)}))]},e)))})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Composite,{id:f,render:(0,a.jsx)("div",{}),className:Ht("dataviews-view-list",d),role:u.infiniteScrollEnabled?"feed":"grid",activeId:k,setActiveId:E,children:s.map(((e,t)=>{const s=S(e);return(0,a.jsx)(A_,{view:u,idPrefix:s,actions:n,item:e,isSelected:e===m,onSelect:j,mediaField:v,titleField:g,descriptionField:x,otherFields:_,onDropdownTriggerKeyDown:O,posinset:u.infiniteScrollEnabled?t+1:void 0},s)}))}),A&&o&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})},icon:(0,w.isRTL)()?Gw:Ww},{type:"pickerGrid",label:(0,w.__)("Grid"),component:R_,icon:Hw,viewConfigOptions:z_,isPicker:!0}],{Menu:G_}=Yx(b.privateApis);function W_({filters:e,view:t,onChangeView:n,setOpenedFilter:s,triggerProps:i}){const r=e.filter((e=>!e.isVisible));return(0,a.jsxs)(G_,{children:[(0,a.jsx)(G_.TriggerButton,{...i}),(0,a.jsx)(G_.Popover,{children:r.map((e=>(0,a.jsx)(G_.Item,{onClick:()=>{s(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})},children:(0,a.jsx)(G_.ItemLabel,{children:e.name})},e.field)))})]})}var U_=(0,h.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:s},i){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const r=e.filter((e=>!e.isVisible));return(0,a.jsx)(W_,{triggerProps:{render:(0,a.jsx)(b.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!r.length,ref:i}),children:(0,w.__)("Add filter")},filters:e,view:t,onChangeView:n,setOpenedFilter:s})}));function q_({buttonRef:e,filtersCount:t,children:n}){return(0,h.useEffect)((()=>()=>{e.current?.focus()}),[e]),(0,a.jsxs)(a.Fragment,{children:[n,!!t&&(0,a.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var Z_=function(){const{filters:e,view:t,onChangeView:n,setOpenedFilter:s,isShowingFilter:i,setIsShowingFilter:r}=(0,h.useContext)(Lw),o=(0,h.useRef)(null),l=(0,h.useCallback)((e=>{n(e),r(!0)}),[n,r]),c=!!e.filter((e=>e.isVisible)).length;if(0===e.length)return null;const u={label:(0,w.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,w._x)("Filter","verb"),"aria-expanded":i,isPressed:i,onClick:()=>{i||s(null),r(!i)}},p=(0,a.jsx)(b.Button,{ref:o,className:"dataviews-filters__visibility-toggle",size:"compact",icon:d_,...c?d:u});return(0,a.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,a.jsx)(q_,{buttonRef:o,filtersCount:t.filters?.length,children:p}):(0,a.jsx)(W_,{filters:e,view:t,onChangeView:l,setOpenedFilter:s,triggerProps:{render:p}})})},Y_=Object.defineProperty,K_=Object.defineProperties,X_=Object.getOwnPropertyDescriptors,Q_=Object.getOwnPropertySymbols,J_=Object.prototype.hasOwnProperty,$_=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?Y_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tj=(e,t)=>{for(var n in t||(t={}))J_.call(t,n)&&ej(e,n,t[n]);if(Q_)for(var n of Q_(t))$_.call(t,n)&&ej(e,n,t[n]);return e},nj=(e,t)=>K_(e,X_(t)),sj=(e,t)=>{var n={};for(var s in e)J_.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&Q_)for(var s of Q_(e))t.indexOf(s)<0&&$_.call(e,s)&&(n[s]=e[s]);return n},ij=Object.defineProperty,rj=Object.defineProperties,aj=Object.getOwnPropertyDescriptors,oj=Object.getOwnPropertySymbols,lj=Object.prototype.hasOwnProperty,cj=Object.prototype.propertyIsEnumerable,uj=(e,t,n)=>t in e?ij(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dj=(e,t)=>{for(var n in t||(t={}))lj.call(t,n)&&uj(e,n,t[n]);if(oj)for(var n of oj(t))cj.call(t,n)&&uj(e,n,t[n]);return e},hj=(e,t)=>rj(e,aj(t)),pj=(e,t)=>{var n={};for(var s in e)lj.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&oj)for(var s of oj(e))t.indexOf(s)<0&&cj.call(e,s)&&(n[s]=e[s]);return n};function fj(...e){}function mj(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function gj(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function vj(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function yj(e){return e}function xj(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function bj(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function wj(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}function _j(...e){for(const t of e)if(void 0!==t)return t}function jj(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Sj(e){if(!function(e){return!!e&&!!(0,Gn.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e))return null;return tj({},e.props).ref||e.ref}var Cj,kj="undefined"!=typeof window&&!!(null==(Cj=window.document)?void 0:Cj.createElement);function Ej(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function Pj(e,t=!1){const{activeElement:n}=Ej(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return Pj(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=Ej(n).getElementById(e);if(t)return t}}return n}function Ij(e,t){return e===t||e.contains(t)}function Vj(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==Tj.indexOf(e.type)}var Tj=["button","color","file","image","reset","submit"];function Oj(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function Aj(e){return e.isContentEditable||Oj(e)}function Nj(e){let t=0,n=0;if(Oj(e))t=e.selectionStart||0,n=e.selectionEnd||0;else if(e.isContentEditable){const s=Ej(e).getSelection();if((null==s?void 0:s.rangeCount)&&s.anchorNode&&Ij(e,s.anchorNode)&&s.focusNode&&Ij(e,s.focusNode)){const i=s.getRangeAt(0),r=i.cloneRange();r.selectNodeContents(e),r.setEnd(i.startContainer,i.startOffset),t=r.toString().length,r.setEnd(i.endContainer,i.endOffset),n=r.toString().length}}return{start:t,end:n}}function Fj(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function Mj(e){if(!e)return null;const t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:n}=getComputedStyle(e);if(t(n))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:n}=getComputedStyle(e);if(t(n))return e}return Mj(e.parentElement)||document.scrollingElement||document.body}function Bj(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Dj(e,t){const n=e.map(((e,t)=>[t,e]));let s=!1;return n.sort((([e,n],[i,r])=>{const a=t(n),o=t(r);return a===o?0:a&&o?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(a,o)?(e>i&&(s=!0),-1):(e<i&&(s=!0),1):0})),s?n.map((([e,t])=>t)):e}function Rj(){return kj&&!!navigator.maxTouchPoints}function Lj(){return!!kj&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function zj(){return kj&&Lj()&&/apple/i.test(navigator.vendor)}function Hj(e){return Boolean(e.currentTarget&&!Ij(e.currentTarget,e.target))}function Gj(e){return e.target===e.currentTarget}function Wj(e,t){const n=new FocusEvent("blur",t),s=e.dispatchEvent(n),i=hj(dj({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",i)),s}function Uj(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function qj(e,t){const n=t||e.currentTarget,s=e.relatedTarget;return!s||!Ij(n,s)}function Zj(e,t,n,s){const i=(e=>{if(s){const t=setTimeout(e,s);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,r,!0),n()})),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Yj(e,t,n,s=window){const i=[];try{s.document.addEventListener(e,t,n);for(const r of Array.from(s.frames))i.push(Yj(e,t,n,r))}catch(e){}return()=>{try{s.document.removeEventListener(e,t,n)}catch(e){}for(const e of i)e()}}var Kj=tj({},Wn),Xj=Kj.useId,Qj=(Kj.useDeferredValue,Kj.useInsertionEffect),Jj=kj?Gn.useLayoutEffect:Gn.useEffect;function $j(e){const t=(0,Gn.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return Qj?Qj((()=>{t.current=e})):t.current=e,(0,Gn.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function eS(...e){return(0,Gn.useMemo)((()=>{if(e.some(Boolean))return t=>{for(const n of e)jj(n,t)}}),e)}function tS(e){if(Xj){const t=Xj();return e||t}const[t,n]=(0,Gn.useState)(e);return Jj((()=>{if(e||t)return;const s=Math.random().toString(36).slice(2,8);n(`id-${s}`)}),[e,t]),e||t}function nS(e,t,n){const s=function(e){const[t]=(0,Gn.useState)(e);return t}(n),[i,r]=(0,Gn.useState)(s);return(0,Gn.useEffect)((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const i=()=>{const e=n.getAttribute(t);r(null==e?s:e)},a=new MutationObserver(i);return a.observe(n,{attributeFilter:[t]}),i(),()=>a.disconnect()}),[e,t,s]),i}function sS(e,t){const n=(0,Gn.useRef)(!1);(0,Gn.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,Gn.useEffect)((()=>()=>{n.current=!1}),[])}function iS(e){return $j("function"==typeof e?e:()=>e)}function rS(e,t,n=[]){const s=(0,Gn.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return nj(tj({},e),{wrapElement:s})}var aS=!1,oS=0,lS=0;function cS(e){(function(e){const t=e.movementX||e.screenX-oS,n=e.movementY||e.screenY-lS;return oS=e.screenX,lS=e.screenY,t||n||!1})(e)&&(aS=!0)}function uS(){aS=!1}function dS(e){const t=Gn.forwardRef(((t,n)=>e(nj(tj({},t),{ref:n}))));return t.displayName=e.displayName||e.name,t}function hS(e,t){return Gn.memo(e,t)}function pS(e,t){const n=t,{wrapElement:s,render:i}=n,r=sj(n,["wrapElement","render"]),o=eS(t.ref,Sj(i));let l;if(Gn.isValidElement(i)){const e=nj(tj({},i.props),{ref:o});l=Gn.cloneElement(i,function(e,t){const n=tj({},e);for(const s in t){if(!mj(t,s))continue;if("className"===s){const s="className";n[s]=e[s]?`${e[s]} ${t[s]}`:t[s];continue}if("style"===s){const s="style";n[s]=e[s]?tj(tj({},e[s]),t[s]):t[s];continue}const i=t[s];if("function"==typeof i&&s.startsWith("on")){const t=e[s];if("function"==typeof t){n[s]=(...e)=>{i(...e),t(...e)};continue}}n[s]=i}return n}(r,e))}else l=i?i(r):(0,a.jsx)(e,tj({},r));return s?s(l):l}function fS(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function mS(e=[],t=[]){const n=Gn.createContext(void 0),s=Gn.createContext(void 0),i=()=>Gn.useContext(n),r=t=>e.reduceRight(((e,n)=>(0,a.jsx)(n,nj(tj({},t),{children:e}))),(0,a.jsx)(n.Provider,tj({},t)));return{context:n,scopedContext:s,useContext:i,useScopedContext:(e=!1)=>{const t=Gn.useContext(s),n=i();return e?t:t||n},useProviderContext:()=>{const e=Gn.useContext(s),t=i();if(!e||e!==t)return t},ContextProvider:r,ScopedContextProvider:e=>(0,a.jsx)(r,nj(tj({},e),{children:t.reduceRight(((t,n)=>(0,a.jsx)(n,nj(tj({},e),{children:t}))),(0,a.jsx)(s.Provider,tj({},e)))}))}}var gS=mS(),vS=gS.useContext,yS=(gS.useScopedContext,gS.useProviderContext,mS([gS.ContextProvider],[gS.ScopedContextProvider])),xS=yS.useContext,bS=(yS.useScopedContext,yS.useProviderContext),wS=yS.ContextProvider,_S=yS.ScopedContextProvider,jS=(0,Gn.createContext)(void 0),SS=(0,Gn.createContext)(void 0),CS=((0,Gn.createContext)(null),(0,Gn.createContext)(null),mS([wS],[_S])),kS=CS.useContext;CS.useScopedContext,CS.useProviderContext,CS.ContextProvider,CS.ScopedContextProvider;function ES(e,t){const n=e.__unstableInternals;return xj(n,"Invalid store"),n[t]}function PS(e,...t){let n=e,s=n,i=Symbol(),r=fj;const a=new Set,o=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,h=new WeakMap,p=(e,t,n=c)=>(n.add(t),h.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),h.delete(t),n.delete(t)}),f=(e,r,a=!1)=>{var l;if(!mj(n,e))return;const p=function(e,t){if(function(e){return"function"==typeof e}(e))return e(function(e){return"function"==typeof e}(t)?t():t);return e}(r,n[e]);if(p===n[e])return;if(!a)for(const n of t)null==(l=null==n?void 0:n.setState)||l.call(n,e,p);const f=n;n=hj(dj({},n),{[e]:p});const m=Symbol();i=m,o.add(e);const g=(t,s,i)=>{var r;const a=h.get(t);a&&!a.some((t=>i?i.has(t):t===e))||(null==(r=d.get(t))||r(),d.set(t,t(n,s)))};for(const e of c)g(e,f);queueMicrotask((()=>{if(i!==m)return;const e=n;for(const e of u)g(e,s,o);s=e,o.clear()}))},m={getState:()=>n,setState:f,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=a.size,s=Symbol();a.add(s);const i=()=>{a.delete(s),a.size||r()};if(e)return i;const o=(c=n,Object.keys(c)).map((e=>gj(...t.map((t=>{var n;const s=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(s&&mj(s,e))return OS(t,[e],(t=>{f(e,t[e],!0)}))})))));var c;const u=[];for(const e of l)u.push(e());const d=t.map(VS);return r=gj(...o,...u,...d),i},subscribe:(e,t)=>p(e,t),sync:(e,t)=>(d.set(t,t(n,n)),p(e,t)),batch:(e,t)=>(d.set(t,t(n,s)),p(e,t,u)),pick:e=>PS(function(e,t){const n={};for(const s of t)mj(e,s)&&(n[s]=e[s]);return n}(n,e),m),omit:e=>PS(function(e,t){const n=dj({},e);for(const e of t)mj(n,e)&&delete n[e];return n}(n,e),m)}};return m}function IS(e,...t){if(e)return ES(e,"setup")(...t)}function VS(e,...t){if(e)return ES(e,"init")(...t)}function TS(e,...t){if(e)return ES(e,"subscribe")(...t)}function OS(e,...t){if(e)return ES(e,"sync")(...t)}function AS(e,...t){if(e)return ES(e,"batch")(...t)}function NS(e,...t){if(e)return ES(e,"omit")(...t)}function FS(...e){const t=e.reduce(((e,t)=>{var n;const s=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return s?Object.assign(e,s):e}),{}),n=PS(t,...e);return Object.assign({},...e,n)}var MS=i(422),{useSyncExternalStore:BS}=MS;function DS(e,t=yj){const n=Gn.useCallback((t=>e?TS(e,null,t):()=>{}),[e]),s=()=>{const n="string"==typeof t?t:null,s="function"==typeof t?t:null,i=null==e?void 0:e.getState();return s?s(i):i&&n&&mj(i,n)?i[n]:void 0};return BS(n,s,s)}function RS(e,t){const n=Gn.useRef({}),s=Gn.useCallback((t=>e?TS(e,null,t):()=>{}),[e]),i=()=>{const s=null==e?void 0:e.getState();let i=!1;const r=n.current;for(const e in t){const n=t[e];if("function"==typeof n){const t=n(s);t!==r[e]&&(r[e]=t,i=!0)}if("string"==typeof n){if(!s)continue;if(!mj(s,n))continue;const t=s[n];t!==r[e]&&(r[e]=t,i=!0)}}return i&&(n.current=tj({},r)),n.current};return BS(s,i,i)}function LS(e,t,n,s){const i=mj(t,n)?t[n]:void 0,r=s?t[s]:void 0,a=function(e){const t=(0,Gn.useRef)(e);return Jj((()=>{t.current=e})),t}({value:i,setValue:r});Jj((()=>OS(e,[n],((e,t)=>{const{value:s,setValue:i}=a.current;i&&e[n]!==t[n]&&e[n]!==s&&i(e[n])}))),[e,n]),Jj((()=>{if(void 0!==i)return e.setState(n,i),AS(e,[n],(()=>{void 0!==i&&e.setState(n,i)}))}))}function zS(e,t,n){return sS(t,[n.store]),LS(e,n,"items","setItems"),e}function HS(e){const t=tS(e.id);return tj({id:t},e)}function GS(e,t,n){return LS(e=zS(e,t,n),n,"activeId","setActiveId"),LS(e,n,"includesBaseElement"),LS(e,n,"virtualFocus"),LS(e,n,"orientation"),LS(e,n,"rtl"),LS(e,n,"focusLoop"),LS(e,n,"focusWrap"),LS(e,n,"focusShift"),e}function WS(e,t,n){return sS(t,[n.store,n.disclosure]),LS(e,n,"open","setOpen"),LS(e,n,"mounted","setMounted"),LS(e,n,"animated"),Object.assign(e,{disclosure:n.disclosure})}function US(e,t,n){return WS(e,t,n)}function qS(e,t,n){return sS(t,[n.popover]),LS(e,n,"placement"),US(e,t,n)}function ZS(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),s=_j(e.items,null==n?void 0:n.items,e.defaultItems,[]),i=new Map(s.map((e=>[e.id,e]))),r={items:s,renderedItems:_j(null==n?void 0:n.renderedItems,[])},a=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),o=PS({items:s,renderedItems:r.renderedItems},a),l=PS(r,e.store),c=e=>{const t=Dj(e,(e=>e.element));o.setState("renderedItems",t),l.setState("renderedItems",t)};IS(l,(()=>VS(o))),IS(o,(()=>AS(o,["items"],(e=>{l.setState("items",e.items)})))),IS(o,(()=>AS(o,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const s=function(e){var t;const n=e.find((e=>!!e.element)),s=[...e].reverse().find((e=>!!e.element));let i=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;i&&(null==s?void 0:s.element);){if(s&&i.contains(s.element))return i;i=i.parentElement}return Ej(i).body}(e.renderedItems),i=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:s});for(const t of e.renderedItems)t.element&&i.observe(t.element);return()=>{cancelAnimationFrame(n),i.disconnect()}}))));const u=(e,t,n=!1)=>{let s;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),r=t.slice();if(-1!==n){s=t[n];const a=dj(dj({},s),e);r[n]=a,i.set(e.id,a)}else r.push(e),i.set(e.id,e);return r}));return()=>{t((t=>{if(!s)return n&&i.delete(e.id),t.filter((({id:t})=>t!==e.id));const r=t.findIndex((({id:t})=>t===e.id));if(-1===r)return t;const a=t.slice();return a[r]=s,i.set(e.id,s),a}))}},d=e=>u(e,(e=>o.setState("items",e)),!0);return hj(dj({},l),{registerItem:d,renderItem:e=>gj(d(e),u(e,(e=>o.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=i.get(e);if(!t){const{items:n}=o.getState();t=n.find((t=>t.id===e)),t&&i.set(e,t)}return t||null},__unstablePrivateStore:o})}function YS(e){const t=[];for(const n of e)t.push(...n);return t}function KS(e){return e.slice().reverse()}var XS={id:null};function QS(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function JS(e,t){return e.filter((e=>e.rowId===t))}function $S(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function eC(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function tC(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),s=ZS(e),i=_j(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),r=PS(hj(dj({},s.getState()),{id:_j(e.id,null==n?void 0:n.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:i,baseElement:_j(null==n?void 0:n.baseElement,null),includesBaseElement:_j(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===i),moves:_j(null==n?void 0:n.moves,0),orientation:_j(e.orientation,null==n?void 0:n.orientation,"both"),rtl:_j(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:_j(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:_j(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:_j(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:_j(e.focusShift,null==n?void 0:n.focusShift,!1)}),s,e.store);IS(r,(()=>OS(r,["renderedItems","activeId"],(e=>{r.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=QS(e.renderedItems))?void 0:n.id}))}))));const a=(e="next",t={})=>{var n,s;const i=r.getState(),{skip:a=0,activeId:o=i.activeId,focusShift:l=i.focusShift,focusLoop:c=i.focusLoop,focusWrap:u=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:h=i.renderedItems,rtl:p=i.rtl}=t,f="up"===e||"down"===e,m="next"===e||"down"===e,g=m?p&&!f:!p||f,v=l&&!a;let y=f?YS(function(e,t,n){const s=eC(e);for(const i of e)for(let e=0;e<s;e+=1){const s=i[e];if(!s||n&&s.disabled){const s=0===e&&n?QS(i):i[e-1];i[e]=s&&t!==s.id&&n?s:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==s?void 0:s.rowId}}}return e}($S(h),o,v)):h;if(y=g?KS(y):y,y=f?function(e){const t=$S(e),n=eC(t),s=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&s.push(hj(dj({},t),{rowId:t.rowId?`${e}`:void 0}))}return s}(y):y,null==o)return null==(n=QS(y))?void 0:n.id;const x=y.find((e=>e.id===o));if(!x)return null==(s=QS(y))?void 0:s.id;const b=y.some((e=>e.rowId)),w=y.indexOf(x),_=y.slice(w+1),j=JS(_,x.rowId);if(a){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(j,o),t=e.slice(a)[0]||e[e.length-1];return null==t?void 0:t.id}const S=c&&(f?"horizontal"!==c:"vertical"!==c),C=b&&u&&(f?"horizontal"!==u:"vertical"!==u),k=m?(!b||f)&&S&&d:!!f&&d;if(S){const e=function(e,t,n=!1){const s=e.findIndex((e=>e.id===t));return[...e.slice(s+1),...n?[XS]:[],...e.slice(0,s)]}(C&&!k?y:JS(y,x.rowId),o,k),t=QS(e,o);return null==t?void 0:t.id}if(C){const e=QS(k?j:_,o);return k?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const E=QS(j,o);return!E&&k?null:null==E?void 0:E.id};return hj(dj(dj({},s),r),{setBaseElement:e=>r.setState("baseElement",e),setActiveId:e=>r.setState("activeId",e),move:e=>{void 0!==e&&(r.setState("activeId",e),r.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=QS(r.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=QS(KS(r.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("up",e))})}function nC(e={}){return function(e={}){const t=FS(e.store,NS(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),s=_j(e.open,null==n?void 0:n.open,e.defaultOpen,!1),i=_j(e.animated,null==n?void 0:n.animated,!1),r=PS({open:s,animated:i,animating:!!i&&s,mounted:s,contentElement:_j(null==n?void 0:n.contentElement,null),disclosureElement:_j(null==n?void 0:n.disclosureElement,null)},t);return IS(r,(()=>OS(r,["animated","animating"],(e=>{e.animated||r.setState("animating",!1)})))),IS(r,(()=>TS(r,["open"],(()=>{r.getState().animated&&r.setState("animating",!0)})))),IS(r,(()=>OS(r,["open","animating"],(e=>{r.setState("mounted",e.open||e.animating)})))),hj(dj({},r),{disclosure:e.disclosure,setOpen:e=>r.setState("open",e),show:()=>r.setState("open",!0),hide:()=>r.setState("open",!1),toggle:()=>r.setState("open",(e=>!e)),stopAnimation:()=>r.setState("animating",!1),setContentElement:e=>r.setState("contentElement",e),setDisclosureElement:e=>r.setState("disclosureElement",e)})}(e)}var sC=zj()&&Rj();function iC(e={}){var t=e,{tag:n}=t,s=pj(t,["tag"]);const i=FS(s.store,function(e,...t){if(e)return ES(e,"pick")(...t)}(n,["value","rtl"])),r=null==n?void 0:n.getState(),a=null==i?void 0:i.getState(),o=_j(s.activeId,null==a?void 0:a.activeId,s.defaultActiveId,null),l=tC(hj(dj({},s),{activeId:o,includesBaseElement:_j(s.includesBaseElement,null==a?void 0:a.includesBaseElement,!0),orientation:_j(s.orientation,null==a?void 0:a.orientation,"vertical"),focusLoop:_j(s.focusLoop,null==a?void 0:a.focusLoop,!0),focusWrap:_j(s.focusWrap,null==a?void 0:a.focusWrap,!0),virtualFocus:_j(s.virtualFocus,null==a?void 0:a.virtualFocus,!0)})),c=function(e={}){var t=e,{popover:n}=t,s=pj(t,["popover"]);const i=FS(s.store,NS(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),r=null==i?void 0:i.getState(),a=nC(hj(dj({},s),{store:i})),o=_j(s.placement,null==r?void 0:r.placement,"bottom"),l=PS(hj(dj({},a.getState()),{placement:o,currentPlacement:o,anchorElement:_j(null==r?void 0:r.anchorElement,null),popoverElement:_j(null==r?void 0:r.popoverElement,null),arrowElement:_j(null==r?void 0:r.arrowElement,null),rendered:Symbol("rendered")}),a,i);return hj(dj(dj({},a),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}(hj(dj({},s),{placement:_j(s.placement,null==a?void 0:a.placement,"bottom-start")})),u=_j(s.value,null==a?void 0:a.value,s.defaultValue,""),d=_j(s.selectedValue,null==a?void 0:a.selectedValue,null==r?void 0:r.values,s.defaultSelectedValue,""),h=Array.isArray(d),p=hj(dj(dj({},l.getState()),c.getState()),{value:u,selectedValue:d,resetValueOnSelect:_j(s.resetValueOnSelect,null==a?void 0:a.resetValueOnSelect,h),resetValueOnHide:_j(s.resetValueOnHide,null==a?void 0:a.resetValueOnHide,h&&!n),activeValue:null==a?void 0:a.activeValue}),f=PS(p,l,c,i);return sC&&IS(f,(()=>OS(f,["virtualFocus"],(()=>{f.setState("virtualFocus",!1)})))),IS(f,(()=>{if(n)return gj(OS(f,["selectedValue"],(e=>{Array.isArray(e.selectedValue)&&n.setValues(e.selectedValue)})),OS(n,["values"],(e=>{f.setState("selectedValue",e.values)})))})),IS(f,(()=>OS(f,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||f.setState("value",u))})))),IS(f,(()=>OS(f,["open"],(e=>{e.open||(f.setState("activeId",o),f.setState("moves",0))})))),IS(f,(()=>OS(f,["moves","activeId"],((e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})))),IS(f,(()=>AS(f,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=f.getState(),s=l.item(n);f.setState("activeValue",null==s?void 0:s.value)})))),hj(dj(dj(dj({},c),l),f),{tag:n,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",p.value),setSelectedValue:e=>f.setState("selectedValue",e)})}function rC(e={}){e=function(e){const t=kS();return HS(e=nj(tj({},e),{tag:void 0!==e.tag?e.tag:t}))}(e);const[t,n]=function(e,t){const[n,s]=Gn.useState((()=>e(t)));Jj((()=>VS(n)),[n]);const i=Gn.useCallback((e=>DS(n,e)),[n]);return[Gn.useMemo((()=>nj(tj({},n),{useState:i})),[n,i]),$j((()=>{s((n=>e(tj(tj({},t),n.getState()))))}))]}(iC,e);return function(e,t,n){return sS(t,[n.tag]),LS(e,n,"value","setValue"),LS(e,n,"selectedValue","setSelectedValue"),LS(e,n,"resetValueOnHide"),LS(e,n,"resetValueOnSelect"),Object.assign(GS(qS(e,t,n),t,n),{tag:n.tag})}(t,n,e)}var aC=mS(),oC=(aC.useContext,aC.useScopedContext,aC.useProviderContext),lC=mS([aC.ContextProvider],[aC.ScopedContextProvider]),cC=(lC.useContext,lC.useScopedContext,lC.useProviderContext,lC.ContextProvider),uC=lC.ScopedContextProvider,dC=((0,Gn.createContext)(void 0),(0,Gn.createContext)(void 0),mS([cC],[uC])),hC=(dC.useContext,dC.useScopedContext,dC.useProviderContext),pC=dC.ContextProvider,fC=dC.ScopedContextProvider,mC=(0,Gn.createContext)(void 0),gC=mS([pC,wS],[fC,_S]),vC=gC.useContext,yC=gC.useScopedContext,xC=gC.useProviderContext,bC=gC.ContextProvider,wC=gC.ScopedContextProvider,_C=(0,Gn.createContext)(void 0),jC=(0,Gn.createContext)(!1);function SC(e={}){const t=rC(e);return(0,a.jsx)(bC,{value:t,children:e.children})}var CC=fS((function(e){var t=e,{store:n}=t,s=sj(t,["store"]);const i=xC();xj(n=n||i,!1);const r=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return wj(s=tj({htmlFor:r},s))})),kC=hS(dS((function(e){return pS("label",CC(e))}))),EC=fS((function(e){var t=e,{store:n}=t,s=sj(t,["store"]);const i=hC();return n=n||i,s=nj(tj({},s),{ref:eS(null==n?void 0:n.setAnchorElement,s.ref)})}));dS((function(e){return pS("div",EC(e))}));function PC(e,t){return t&&e.item(t)||null}var IC=Symbol("FOCUS_SILENTLY");function VC(e,t,n){if(!t)return!1;if(t===n)return!1;const s=e.item(t.id);return!!s&&(!n||s.element!==n)}var TC=(0,Gn.createContext)(!0),OC="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function AC(e){return!!e.matches(OC)&&(!!function(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!e.closest("[inert]"))}function NC(e){const t=Pj(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function FC(e){const t=Pj(e);if(!t)return!1;if(Ij(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}var MC=zj(),BC=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],DC=Symbol("safariFocusAncestor");function RC(e,t){e&&(e[DC]=t)}function LC(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function zC(e,t,n,s,i){return e?t?n&&!s?-1:void 0:n?i:i||0:i}function HC(e,t){return $j((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var GC=!0;function WC(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(GC=!1))}function UC(e){e.metaKey||e.ctrlKey||e.altKey||(GC=!0)}var qC=fS((function(e){var t=e,{focusable:n=!0,accessibleWhenDisabled:s,autoFocus:i,onFocusVisible:r}=t,a=sj(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const o=(0,Gn.useRef)(null);(0,Gn.useEffect)((()=>{n&&(Yj("mousedown",WC,!0),Yj("keydown",UC,!0))}),[n]),MC&&(0,Gn.useEffect)((()=>{if(!n)return;const e=o.current;if(!e)return;if(!LC(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const s=()=>queueMicrotask((()=>e.focus()));for(const e of t)e.addEventListener("mouseup",s);return()=>{for(const e of t)e.removeEventListener("mouseup",s)}}),[n]);const l=n&&bj(a),c=!!l&&!s,[u,d]=(0,Gn.useState)(!1);(0,Gn.useEffect)((()=>{n&&c&&u&&d(!1)}),[n,c,u]),(0,Gn.useEffect)((()=>{if(!n)return;if(!u)return;const e=o.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{AC(e)||d(!1)}));return t.observe(e),()=>t.disconnect()}),[n,u]);const h=HC(a.onKeyPressCapture,l),p=HC(a.onMouseDownCapture,l),f=HC(a.onClickCapture,l),m=a.onMouseDown,g=$j((e=>{if(null==m||m(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!MC)return;if(Hj(e))return;if(!Vj(t)&&!LC(t))return;let s=!1;const i=()=>{s=!0};t.addEventListener("focusin",i,{capture:!0,once:!0});const r=function(e){for(;e&&!AC(e);)e=e.closest(OC);return e||null}(t.parentElement);RC(r,!0),Zj(t,"mouseup",(()=>{t.removeEventListener("focusin",i,!0),RC(r,!1),s||function(e){!FC(e)&&AC(e)&&e.focus()}(t)}))})),v=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const s=e.currentTarget;s&&NC(s)&&(null==r||r(e),e.defaultPrevented||(s.dataset.focusVisible="true",d(!0)))},y=a.onKeyDownCapture,x=$j((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;if(u)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!Gj(e))return;const t=e.currentTarget;Zj(t,"focusout",(()=>v(e,t)))})),b=a.onFocusCapture,w=$j((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!n)return;if(!Gj(e))return void d(!1);const t=e.currentTarget,s=()=>v(e,t);GC||function(e){const{tagName:t,readOnly:n,type:s}=e;return"TEXTAREA"===t&&!n||("SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):BC.includes(s)))}(e.target)?Zj(e.target,"focusout",s):d(!1)})),_=a.onBlur,j=$j((e=>{null==_||_(e),n&&qj(e)&&d(!1)})),S=(0,Gn.useContext)(TC),C=$j((e=>{n&&i&&e&&S&&queueMicrotask((()=>{NC(e)||AC(e)&&e.focus()}))})),k=function(e,t){const n=e=>{if("string"==typeof e)return e},[s,i]=(0,Gn.useState)((()=>n(t)));return Jj((()=>{const s=e&&"current"in e?e.current:e;i((null==s?void 0:s.tagName.toLowerCase())||n(t))}),[e,t]),s}(o),E=n&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(k),P=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(k),I=a.style,V=(0,Gn.useMemo)((()=>c?tj({pointerEvents:"none"},I):I),[c,I]);return wj(a=nj(tj({"data-focus-visible":n&&u||void 0,"data-autofocus":i||void 0,"aria-disabled":l||void 0},a),{ref:eS(o,C,a.ref),style:V,tabIndex:zC(n,c,E,P,a.tabIndex),disabled:!(!P||!c)||void 0,contentEditable:l?void 0:a.contentEditable,onKeyPressCapture:h,onClickCapture:f,onMouseDownCapture:p,onMouseDown:g,onKeyDownCapture:x,onFocusCapture:w,onBlur:j}))}));dS((function(e){return pS("div",qC(e))}));function ZC(e,t,n){return $j((s=>{var i;if(null==t||t(s),s.defaultPrevented)return;if(s.isPropagationStopped())return;if(!Gj(s))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(s))return;if(function(e){const t=e.target;return!(t&&!Oj(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(s))return;const r=e.getState(),a=null==(i=PC(e,r.activeId))?void 0:i.element;if(!a)return;const o=s,{view:l}=o,c=sj(o,["view"]);a!==(null==n?void 0:n.current)&&a.focus(),function(e,t,n){const s=new KeyboardEvent(t,n);return e.dispatchEvent(s)}(a,s.type,c)||s.preventDefault(),s.currentTarget.contains(a)&&s.stopPropagation()}))}var YC=fS((function(e){var t=e,{store:n,composite:s=!0,focusOnMove:i=s,moveOnKeyPress:r=!0}=t,o=sj(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=bS();xj(n=n||l,!1);const c=(0,Gn.useRef)(null),u=(0,Gn.useRef)(null),d=function(e){const[t,n]=(0,Gn.useState)(!1),s=(0,Gn.useCallback)((()=>n(!0)),[]),i=e.useState((t=>PC(e,t.activeId)));return(0,Gn.useEffect)((()=>{const e=null==i?void 0:i.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[i,t]),s}(n),h=n.useState("moves"),[,p]=function(e){const[t,n]=(0,Gn.useState)(null);return Jj((()=>{if(null==t)return;if(!e)return;let n=null;return e((e=>(n=e,t))),()=>{e(n)}}),[t,e]),[t,n]}(s?n.setBaseElement:null);(0,Gn.useEffect)((()=>{var e;if(!n)return;if(!h)return;if(!s)return;if(!i)return;const{activeId:t}=n.getState(),r=null==(e=PC(n,t))?void 0:e.element;var a,o;r&&("scrollIntoView"in(a=r)?(a.focus({preventScroll:!0}),a.scrollIntoView(dj({block:"nearest",inline:"nearest"},o))):a.focus())}),[n,h,s,i]),Jj((()=>{if(!n)return;if(!h)return;if(!s)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const i=u.current;u.current=null,i&&Wj(i,{relatedTarget:e}),NC(e)||e.focus()}),[n,h,s]);const f=n.useState("activeId"),m=n.useState("virtualFocus");Jj((()=>{var e;if(!n)return;if(!s)return;if(!m)return;const t=u.current;if(u.current=null,!t)return;const i=(null==(e=PC(n,f))?void 0:e.element)||Pj(t);i!==t&&Wj(t,{relatedTarget:i})}),[n,f,m,s]);const g=ZC(n,o.onKeyDownCapture,u),v=ZC(n,o.onKeyUpCapture,u),y=o.onFocusCapture,x=$j((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const s=e.relatedTarget,i=function(e){const t=e[IC];return delete e[IC],t}(e.currentTarget);Gj(e)&&i&&(e.stopPropagation(),u.current=s)})),b=o.onFocus,w=$j((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!s)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:i}=n.getState();i?Gj(e)&&!VC(n,t)&&queueMicrotask(d):Gj(e)&&n.setActiveId(null)})),_=o.onBlurCapture,j=$j((e=>{var t;if(null==_||_(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:s,activeId:i}=n.getState();if(!s)return;const r=null==(t=PC(n,i))?void 0:t.element,a=e.relatedTarget,o=VC(n,a),l=u.current;if(u.current=null,Gj(e)&&o)a===r?l&&l!==a&&Wj(l,e):r?Wj(r,e):l&&Wj(l,e),e.stopPropagation();else{!VC(n,e.target)&&r&&Wj(r,e)}})),S=o.onKeyDown,C=iS(r),k=$j((e=>{var t;if(null==S||S(e),e.defaultPrevented)return;if(!n)return;if(!Gj(e))return;const{orientation:s,renderedItems:i,activeId:r}=n.getState(),a=PC(n,r);if(null==(t=null==a?void 0:a.element)?void 0:t.isConnected)return;const o="horizontal"!==s,l="vertical"!==s,c=i.some((e=>!!e.rowId));if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&Oj(e.currentTarget))return;const u={ArrowUp:(c||o)&&(()=>{if(c){const e=function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(YS(KS(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(i);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(c||l)&&n.first,ArrowDown:(c||o)&&n.first,ArrowLeft:(c||l)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},d=u[e.key];if(d){const t=d();if(void 0!==t){if(!C(e))return;e.preventDefault(),n.move(t)}}}));o=rS(o,(e=>(0,a.jsx)(wS,{value:n,children:e})),[n]);const E=n.useState((e=>{var t;if(n&&s&&e.virtualFocus)return null==(t=PC(n,e.activeId))?void 0:t.id}));o=nj(tj({"aria-activedescendant":E},o),{ref:eS(c,p,o.ref),onKeyDownCapture:g,onKeyUpCapture:v,onFocusCapture:x,onFocus:w,onBlurCapture:j,onKeyDown:k});const P=n.useState((e=>s&&(e.virtualFocus||null===e.activeId)));return o=qC(tj({focusable:P},o))}));dS((function(e){return pS("div",YC(e))}));function KC(e,t,n){if(!n)return!1;const s=e.find((e=>!e.disabled&&e.value));return(null==s?void 0:s.value)===t}function XC(e,t){return!!t&&(null!=e&&(e=vj(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var QC=fS((function(e){var t=e,{store:n,focusable:s=!0,autoSelect:i=!1,getAutoSelectId:r,setValueOnChange:a,showMinLength:o=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:h=d,blurActiveItemOnClick:p,setValueOnClick:f=!0,moveOnKeyPress:m=!0,autoComplete:g="list"}=t,v=sj(t,["store","focusable","autoSelect","getAutoSelectId","setValueOnChange","showMinLength","showOnChange","showOnMouseDown","showOnClick","showOnKeyDown","showOnKeyPress","blurActiveItemOnClick","setValueOnClick","moveOnKeyPress","autoComplete"]);const y=xC();xj(n=n||y,!1);const x=(0,Gn.useRef)(null),[b,w]=(0,Gn.useReducer)((()=>[]),[]),_=(0,Gn.useRef)(!1),j=(0,Gn.useRef)(!1),S=n.useState((e=>e.virtualFocus&&i)),C="inline"===g||"both"===g,[k,E]=(0,Gn.useState)(C);!function(e,t){const n=(0,Gn.useRef)(!1);Jj((()=>{if(n.current)return e();n.current=!0}),t),Jj((()=>()=>{n.current=!1}),[])}((()=>{C&&E(!0)}),[C]);const P=n.useState("value"),I=(0,Gn.useRef)();(0,Gn.useEffect)((()=>OS(n,["selectedValue","activeId"],((e,t)=>{I.current=t.selectedValue}))),[]);const V=n.useState((e=>{var t;if(C&&k){if(e.activeValue&&Array.isArray(e.selectedValue)){if(e.selectedValue.includes(e.activeValue))return;if(null==(t=I.current)?void 0:t.includes(e.activeValue))return}return e.activeValue}})),T=n.useState("renderedItems"),O=n.useState("open"),A=n.useState("contentElement"),N=(0,Gn.useMemo)((()=>{if(!C)return P;if(!k)return P;if(KC(T,V,S)){if(XC(P,V)){const e=(null==V?void 0:V.slice(P.length))||"";return P+e}return P}return V||P}),[C,k,T,V,S,P]);(0,Gn.useEffect)((()=>{const e=x.current;if(!e)return;const t=()=>E(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,Gn.useEffect)((()=>{if(!C)return;if(!k)return;if(!V)return;if(!KC(T,V,S))return;if(!XC(P,V))return;let e=fj;return queueMicrotask((()=>{const t=x.current;if(!t)return;const{start:n,end:s}=Nj(t),i=P.length,r=V.length;Bj(t,i,r),e=()=>{if(!NC(t))return;const{start:e,end:a}=Nj(t);e===i&&a===r&&Bj(t,n,s)}})),()=>e()}),[b,C,k,V,T,S,P]);const F=(0,Gn.useRef)(null),M=$j(r),B=(0,Gn.useRef)(null);(0,Gn.useEffect)((()=>{if(!O)return;if(!A)return;const e=Mj(A);if(!e)return;F.current=e;const t=()=>{_.current=!1},s=()=>{if(!n)return;if(!_.current)return;const{activeId:e}=n.getState();null!==e&&e!==B.current&&(_.current=!1)},i={passive:!0,capture:!0};return e.addEventListener("wheel",t,i),e.addEventListener("touchmove",t,i),e.addEventListener("scroll",s,i),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("scroll",s,!0)}}),[O,A,n]),Jj((()=>{P&&(j.current||(_.current=!0))}),[P]),Jj((()=>{"always"!==S&&O||(_.current=O)}),[S,O]);const D=n.useState("resetValueOnSelect");sS((()=>{var e,t;const s=_.current;if(!n)return;if(!O)return;if(!s&&!D)return;const{baseElement:i,contentElement:r,activeId:a}=n.getState();if(!i||NC(i)){if(null==r?void 0:r.hasAttribute("data-placing")){const e=new MutationObserver(w);return e.observe(r,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(S&&s){const t=M(T),s=void 0!==t?t:null!=(e=function(e){const t=e.find((e=>{var t;return!e.disabled&&"tab"!==(null==(t=e.element)?void 0:t.getAttribute("role"))}));return null==t?void 0:t.id}(T))?e:n.first();B.current=s,n.move(null!=s?s:null)}else{const e=null==(t=n.item(a||n.first()))?void 0:t.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,O,b,P,S,D,M,T]),(0,Gn.useEffect)((()=>{if(!C)return;const e=x.current;if(!e)return;const t=[e,A].filter((e=>!!e)),s=e=>{t.every((t=>qj(e,t)))&&(null==n||n.setValue(N))};for(const e of t)e.addEventListener("focusout",s);return()=>{for(const e of t)e.removeEventListener("focusout",s)}}),[C,A,n,N]);const R=e=>e.currentTarget.value.length>=o,L=v.onChange,z=iS(null!=l?l:R),H=iS(null!=a?a:!n.tag),G=$j((e=>{if(null==L||L(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget,{value:s,selectionStart:i,selectionEnd:r}=t,a=e.nativeEvent;if(_.current=!0,function(e){return"input"===e.type}(a)&&(a.isComposing&&(_.current=!1,j.current=!0),C)){const e="insertText"===a.inputType||"insertCompositionText"===a.inputType,t=i===s.length;E(e&&t)}if(H(e)){const e=s===n.getState().value;n.setValue(s),queueMicrotask((()=>{Bj(t,i,r)})),C&&S&&e&&w()}z(e)&&n.show(),S&&_.current||n.setActiveId(null)})),W=v.onCompositionEnd,U=$j((e=>{_.current=!0,j.current=!1,null==W||W(e),e.defaultPrevented||S&&w()})),q=v.onMouseDown,Z=iS(null!=p?p:()=>!!(null==n?void 0:n.getState().includesBaseElement)),Y=iS(f),K=iS(null!=u?u:R),X=$j((e=>{null==q||q(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(Z(e)&&n.setActiveId(null),Y(e)&&n.setValue(N),K(e)&&Zj(e.currentTarget,"mouseup",n.show))})),Q=v.onKeyDown,J=iS(null!=h?h:R),$=$j((e=>{if(null==Q||Q(e),e.repeat||(_.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t}=n.getState();t||"ArrowUp"!==e.key&&"ArrowDown"!==e.key||J(e)&&(e.preventDefault(),n.show())})),ee=v.onBlur,te=$j((e=>{_.current=!1,null==ee||ee(e),e.defaultPrevented})),ne=tS(v.id),se=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(g)?g:void 0,ie=n.useState((e=>null===e.activeId));return v=nj(tj({id:ne,role:"combobox","aria-autocomplete":se,"aria-haspopup":Fj(A,"listbox"),"aria-expanded":O,"aria-controls":null==A?void 0:A.id,"data-active-item":ie||void 0,value:N},v),{ref:eS(x,v.ref),onChange:G,onCompositionEnd:U,onMouseDown:X,onKeyDown:$,onBlur:te}),v=YC(nj(tj({store:n,focusable:s},v),{moveOnKeyPress:e=>!function(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}(m,e)&&(C&&E(!0),!0)})),v=EC(tj({store:n},v)),tj({autoComplete:"off"},v)})),JC=dS((function(e){return pS("input",QC(e))}));function $C(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function ek(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=t.endsWith("ms")?1:1e3,s=Number.parseFloat(t||"0s")*n;return s>e?s:e}),0)}function tk(e,t,n){return!(n||!1===t||e&&!t)}var nk=fS((function(e){var t=e,{store:n,alwaysVisible:s}=t,i=sj(t,["store","alwaysVisible"]);const r=oC();xj(n=n||r,!1);const o=(0,Gn.useRef)(null),l=tS(i.id),[c,u]=(0,Gn.useState)(null),d=n.useState("open"),h=n.useState("mounted"),p=n.useState("animated"),f=n.useState("contentElement"),m=DS(n.disclosure,"contentElement");Jj((()=>{o.current&&(null==n||n.setContentElement(o.current))}),[n]),Jj((()=>{let e;return null==n||n.setState("animated",(t=>(e=t,!0))),()=>{void 0!==e&&(null==n||n.setState("animated",e))}}),[n]),Jj((()=>{if(p){if(null==f?void 0:f.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{u(d?"enter":h?"leave":null)}));u(null)}}),[p,f,d,h]),Jj((()=>{if(!n)return;if(!p)return;if(!c)return;if(!f)return;const e=()=>null==n?void 0:n.setState("animating",!1),t=()=>(0,Fr.flushSync)(e);if("leave"===c&&d)return;if("enter"===c&&!d)return;if("number"==typeof p){return $C(p,t)}const{transitionDuration:s,animationDuration:i,transitionDelay:r,animationDelay:a}=getComputedStyle(f),{transitionDuration:o="0",animationDuration:l="0",transitionDelay:u="0",animationDelay:h="0"}=m?getComputedStyle(m):{},g=ek(r,a,u,h)+ek(s,i,o,l);if(!g)return"enter"===c&&n.setState("animated",!1),void e();return $C(Math.max(g-1e3/60,0),t)}),[n,p,f,m,d,c]),i=rS(i,(e=>(0,a.jsx)(uC,{value:n,children:e})),[n]);const g=tk(h,i.hidden,s),v=i.style,y=(0,Gn.useMemo)((()=>g?nj(tj({},v),{display:"none"}):v),[g,v]);return wj(i=nj(tj({id:l,"data-open":d||void 0,"data-enter":"enter"===c||void 0,"data-leave":"leave"===c||void 0,hidden:g},i),{ref:eS(l?n.setContentElement:null,o,i.ref),style:y}))})),sk=dS((function(e){return pS("div",nk(e))})),ik=(dS((function(e){var t=e,{unmountOnHide:n}=t,s=sj(t,["unmountOnHide"]);const i=oC();return!1===DS(s.store||i,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,a.jsx)(sk,tj({},s))})),fS((function(e){var t=e,{store:n,alwaysVisible:s}=t,i=sj(t,["store","alwaysVisible"]);const r=yC(!0),o=vC(),l=!!(n=n||o)&&n===r;xj(n,!1);const c=(0,Gn.useRef)(null),u=tS(i.id),d=n.useState("mounted"),h=tk(d,i.hidden,s),p=h?nj(tj({},i.style),{display:"none"}):i.style,f=n.useState((e=>Array.isArray(e.selectedValue))),m=nS(c,"role",i.role),g=("listbox"===m||"tree"===m||"grid"===m)&&f||void 0,[v,y]=(0,Gn.useState)(!1),x=n.useState("contentElement");Jj((()=>{if(!d)return;const e=c.current;if(!e)return;if(x!==e)return;const t=()=>{y(!!e.querySelector("[role='listbox']"))},n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>n.disconnect()}),[d,x]),v||(i=tj({role:"listbox","aria-multiselectable":g},i)),i=rS(i,(e=>(0,a.jsx)(wC,{value:n,children:(0,a.jsx)(mC.Provider,{value:m,children:e})})),[n,m]);const b=!u||r&&l?null:n.setContentElement;return wj(i=nj(tj({id:u,hidden:h},i),{ref:eS(b,c,i.ref),style:p}))}))),rk=dS((function(e){return pS("div",ik(e))}));function ak(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var ok=Symbol("composite-hover");var lk=fS((function(e){var t=e,{store:n,focusOnHover:s=!0,blurOnHoverEnd:i=!!s}=t,r=sj(t,["store","focusOnHover","blurOnHoverEnd"]);const a=xS();xj(n=n||a,!1);const o=((0,Gn.useEffect)((()=>{Yj("mousemove",cS,!0),Yj("mousedown",uS,!0),Yj("mouseup",uS,!0),Yj("keydown",uS,!0),Yj("scroll",uS,!0)}),[]),$j((()=>aS))),l=r.onMouseMove,c=iS(s),u=$j((e=>{if(null==l||l(e),!e.defaultPrevented&&o()&&c(e)){if(!FC(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!NC(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=r.onMouseLeave,h=iS(i),p=$j((e=>{var t;null==d||d(e),e.defaultPrevented||o()&&(function(e){const t=ak(e);return!!t&&Ij(e.currentTarget,t)}(e)||function(e){let t=ak(e);if(!t)return!1;do{if(mj(t,ok)&&t[ok])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&h(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),f=(0,Gn.useCallback)((e=>{e&&(e[ok]=!0)}),[]);return wj(r=nj(tj({},r),{ref:eS(f,r.ref),onMouseMove:u,onMouseLeave:p}))})),ck=(hS(dS((function(e){return pS("div",lk(e))}))),fS((function(e){var t=e,{store:n,shouldRegisterItem:s=!0,getItem:i=yj,element:r}=t,a=sj(t,["store","shouldRegisterItem","getItem","element"]);const o=vS();n=n||o;const l=tS(a.id),c=(0,Gn.useRef)(r);return(0,Gn.useEffect)((()=>{const e=c.current;if(!l)return;if(!e)return;if(!s)return;const t=i({id:l,element:e});return null==n?void 0:n.renderItem(t)}),[l,s,i,n]),wj(a=nj(tj({},a),{ref:eS(c,a.ref)}))})));dS((function(e){return pS("div",ck(e))}));function uk(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?Vj(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(Vj(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var dk=Symbol("command"),hk=fS((function(e){var t=e,{clickOnEnter:n=!0,clickOnSpace:s=!0}=t,i=sj(t,["clickOnEnter","clickOnSpace"]);const r=(0,Gn.useRef)(null),[a,o]=(0,Gn.useState)(!1);(0,Gn.useEffect)((()=>{r.current&&o(Vj(r.current))}),[]);const[l,c]=(0,Gn.useState)(!1),u=(0,Gn.useRef)(!1),d=bj(i),[h,p]=function(e,t,n){const s=e.onLoadedMetadataCapture,i=(0,Gn.useMemo)((()=>Object.assign((()=>{}),nj(tj({},s),{[t]:n}))),[s,t,n]);return[null==s?void 0:s[t],{onLoadedMetadataCapture:i}]}(i,dk,!0),f=i.onKeyDown,m=$j((e=>{null==f||f(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(h)return;if(d)return;if(!Gj(e))return;if(Oj(t))return;if(t.isContentEditable)return;const i=n&&"Enter"===e.key,r=s&&" "===e.key,a="Enter"===e.key&&!n,o=" "===e.key&&!s;if(a||o)e.preventDefault();else if(i||r){const n=uk(e);if(i){if(!n){e.preventDefault();const n=e,{view:s}=n,i=sj(n,["view"]),r=()=>Uj(t,i);kj&&/firefox\//i.test(navigator.userAgent)?Zj(t,"keyup",r):queueMicrotask(r)}}else r&&(u.current=!0,n||(e.preventDefault(),c(!0)))}})),g=i.onKeyUp,v=$j((e=>{if(null==g||g(e),e.defaultPrevented)return;if(h)return;if(d)return;if(e.metaKey)return;const t=s&&" "===e.key;if(u.current&&t&&(u.current=!1,!uk(e))){e.preventDefault(),c(!1);const t=e.currentTarget,n=e,{view:s}=n,i=sj(n,["view"]);queueMicrotask((()=>Uj(t,i)))}}));return i=nj(tj(tj({"data-active":l||void 0,type:a?"button":void 0},p),i),{ref:eS(r,i.ref),onKeyDown:m,onKeyUp:v}),i=qC(i)}));dS((function(e){return pS("button",hk(e))}));function pk(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function fk(e,t,n,s=!1){var i;if(!t)return;if(!n)return;const{renderedItems:r}=t.getState(),a=Mj(e);if(!a)return;const o=function(e,t=!1){const n=e.clientHeight,{top:s}=e.getBoundingClientRect(),i=1.5*Math.max(.875*n,n-40),r=t?n-i+s:i+s;return"HTML"===e.tagName?r+e.scrollTop:r}(a,s);let l,c;for(let e=0;e<r.length;e+=1){const r=l;if(l=n(e),!l)break;if(l===r)continue;const a=null==(i=PC(t,l))?void 0:i.element;if(!a)continue;const u=pk(a,s)-o,d=Math.abs(u);if(s&&u<=0||!s&&u>=0){void 0!==c&&c<d&&(l=r);break}c=d}return l}var mk=fS((function(e){var t=e,{store:n,rowId:s,preventScrollOnKeyDown:i=!1,moveOnKeyPress:r=!0,tabbable:o=!1,getItem:l,"aria-setsize":c,"aria-posinset":u}=t,d=sj(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const h=xS();n=n||h;const p=tS(d.id),f=(0,Gn.useRef)(null),m=(0,Gn.useContext)(SS),g=bj(d)&&!d.accessibleWhenDisabled,{rowId:v,baseElement:y,isActiveItem:x,ariaSetSize:b,ariaPosInSet:w,isTabbable:_}=RS(n,{rowId:e=>s||(e&&(null==m?void 0:m.baseElement)&&m.baseElement===e.baseElement?m.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===p,ariaSetSize:e=>null!=c?c:e&&(null==m?void 0:m.ariaSetSize)&&m.baseElement===e.baseElement?m.ariaSetSize:void 0,ariaPosInSet(e){if(null!=u)return u;if(!e)return;if(!(null==m?void 0:m.ariaPosInSet))return;if(m.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===v));return m.ariaPosInSet+t.findIndex((e=>e.id===p))},isTabbable(e){if(!(null==e?void 0:e.renderedItems.length))return!0;if(e.virtualFocus)return!1;if(o)return!0;if(null===e.activeId)return!1;const t=null==n?void 0:n.item(e.activeId);return!!(null==t?void 0:t.disabled)||(!(null==t?void 0:t.element)||e.activeId===p)}}),j=(0,Gn.useCallback)((e=>{var t;const n=nj(tj({},e),{id:p||e.id,rowId:v,disabled:!!g,children:null==(t=e.element)?void 0:t.textContent});return l?l(n):n}),[p,v,g,l]),S=d.onFocus,C=(0,Gn.useRef)(!1),k=$j((e=>{if(null==S||S(e),e.defaultPrevented)return;if(Hj(e))return;if(!p)return;if(!n)return;if(function(e,t){return!Gj(e)&&VC(t,e.target)}(e,n))return;const{virtualFocus:t,baseElement:s}=n.getState();if(n.setActiveId(p),Aj(e.currentTarget)&&function(e,t=!1){if(Oj(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){const n=Ej(e).getSelection();null==n||n.selectAllChildren(e),t&&(null==n||n.collapseToEnd())}}(e.currentTarget),!t)return;if(!Gj(e))return;if(Aj(i=e.currentTarget)||"INPUT"===i.tagName&&!Vj(i))return;var i;if(!(null==s?void 0:s.isConnected))return;zj()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),C.current=!0;e.relatedTarget===s||VC(n,e.relatedTarget)?function(e){e[IC]=!0,e.focus({preventScroll:!0})}(s):s.focus()})),E=d.onBlurCapture,P=$j((e=>{if(null==E||E(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&C.current&&(C.current=!1,e.preventDefault(),e.stopPropagation())})),I=d.onKeyDown,V=iS(i),T=iS(r),O=$j((e=>{if(null==I||I(e),e.defaultPrevented)return;if(!Gj(e))return;if(!n)return;const{currentTarget:t}=e,s=n.getState(),i=n.item(p),r=!!(null==i?void 0:i.rowId),a="horizontal"!==s.orientation,o="vertical"!==s.orientation,l=()=>!!r||(!!o||(!s.baseElement||!Oj(s.baseElement))),c={ArrowUp:(r||a)&&n.up,ArrowRight:(r||o)&&n.next,ArrowDown:(r||a)&&n.down,ArrowLeft:(r||o)&&n.previous,Home:()=>{if(l())return!r||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!r||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>fk(t,n,null==n?void 0:n.up,!0),PageDown:()=>fk(t,n,null==n?void 0:n.down)}[e.key];if(c){if(Aj(t)){const n=Nj(t),s=o&&"ArrowLeft"===e.key,i=o&&"ArrowRight"===e.key,r=a&&"ArrowUp"===e.key,l=a&&"ArrowDown"===e.key;if(i||l){const{length:e}=function(e){if(Oj(e))return e.value;if(e.isContentEditable){const t=Ej(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(t);if(n.end!==e)return}else if((s||r)&&0!==n.start)return}const s=c();if(V(e)||void 0!==s){if(!T(e))return;e.preventDefault(),n.move(s)}}})),A=(0,Gn.useMemo)((()=>({id:p,baseElement:y})),[p,y]);return d=rS(d,(e=>(0,a.jsx)(jS.Provider,{value:A,children:e})),[A]),d=nj(tj({id:p,"data-active-item":x||void 0},d),{ref:eS(f,d.ref),tabIndex:_?d.tabIndex:-1,onFocus:k,onBlurCapture:P,onKeyDown:O}),d=hk(d),d=ck(nj(tj({store:n},d),{getItem:j,shouldRegisterItem:!!p&&d.shouldRegisterItem})),wj(nj(tj({},d),{"aria-setsize":b,"aria-posinset":w}))}));hS(dS((function(e){return pS("button",mk(e))})));function gk(e){var t;return null!=(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])?t:"option"}var vk=fS((function(e){var t,n=e,{store:s,value:i,hideOnClick:r,setValueOnClick:o,selectValueOnClick:l=!0,resetValueOnSelect:c,focusOnHover:u=!1,moveOnKeyPress:d=!0,getItem:h}=n,p=sj(n,["store","value","hideOnClick","setValueOnClick","selectValueOnClick","resetValueOnSelect","focusOnHover","moveOnKeyPress","getItem"]);const f=yC();xj(s=s||f,!1);const{resetValueOnSelectState:m,multiSelectable:g,selected:v}=RS(s,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,i)}),y=(0,Gn.useCallback)((e=>{const t=nj(tj({},e),{value:i});return h?h(t):t}),[i,h]);o=null!=o?o:!g,r=null!=r?r:null!=i&&!g;const x=p.onClick,b=iS(o),w=iS(l),_=iS(null!=(t=null!=c?c:m)?t:g),j=iS(r),S=$j((e=>{null==x||x(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const n=Lj();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const s=t.tagName.toLowerCase();return"a"===s||"button"===s&&"submit"===t.type||"input"===s&&"submit"===t.type}(e)||(null!=i&&(w(e)&&(_(e)&&(null==s||s.resetValue()),null==s||s.setSelectedValue((e=>Array.isArray(e)?e.includes(i)?e.filter((e=>e!==i)):[...e,i]:i))),b(e)&&(null==s||s.setValue(i))),j(e)&&(null==s||s.hide()))})),C=p.onKeyDown,k=$j((e=>{if(null==C||C(e),e.defaultPrevented)return;const t=null==s?void 0:s.getState().baseElement;if(!t)return;if(NC(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),Oj(t)&&(null==s||s.setValue(t.value)))}));g&&null!=v&&(p=tj({"aria-selected":v},p)),p=rS(p,(e=>(0,a.jsx)(_C.Provider,{value:i,children:(0,a.jsx)(jC.Provider,{value:null!=v&&v,children:e})})),[i,v]);const E=(0,Gn.useContext)(mC);p=nj(tj({role:gk(E),children:i},p),{onClick:S,onKeyDown:k});const P=iS(d);return p=mk(nj(tj({store:s},p),{getItem:y,moveOnKeyPress:e=>{if(!P(e))return!1;const t=new Event("combobox-item-move"),n=null==s?void 0:s.getState().baseElement;return null==n||n.dispatchEvent(t),!0}})),p=lk(tj({store:s,focusOnHover:u},p))})),yk=hS(dS((function(e){return pS("div",vk(e))})));function xk(e){return vj(e).toLowerCase()}function bk(e,t){if(!e)return e;if(!t)return e;const n=(s=t,Array.isArray(s)?s:void 0!==s?[s]:[]).filter(Boolean).map(xk);var s;const i=[],r=(e,t=!1)=>(0,a.jsx)("span",{"data-autocomplete-value":t?"":void 0,"data-user-value":t?void 0:"",children:e},i.length),o=function(e){return e.sort((([e],[t])=>e-t))}(function(e){return e.filter((([e,t],n,s)=>!s.some((([s,i],r)=>r!==n&&s<=e&&s+i>=e+t))))}(function(e,t){const n=[];for(const s of t){let t=0;const i=s.length;for(;-1!==e.indexOf(s,t);){const r=e.indexOf(s,t);-1!==r&&n.push([r,i]),t=r+1}}return n}(xk(e),new Set(n))));if(!o.length)return i.push(r(e,!0)),i;const[l]=o[0],c=[e.slice(0,l),...o.flatMap((([t,n],s)=>{var i;const r=e.slice(t,t+n),a=null==(i=o[s+1])?void 0:i[0];return[r,e.slice(t+n,a)]}))];return c.forEach(((e,t)=>{e&&i.push(r(e,t%2==0))})),i}var wk=fS((function(e){var t=e,{store:n,value:s,userValue:i}=t,r=sj(t,["store","value","userValue"]);const a=yC();n=n||a;const o=(0,Gn.useContext)(_C),l=null!=s?s:o,c=DS(n,(e=>null!=i?i:null==e?void 0:e.value)),u=(0,Gn.useMemo)((()=>{if(l)return c?bk(l,c):l}),[l,c]);return wj(r=tj({children:u},r))})),_k=dS((function(e){return pS("span",wk(e))}));const jk=[],Sk=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:jk;function Ck(e=""){return My()(e.trim().toLowerCase())}const kk=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter((e=>e!==n)):[...t.value,n]:[n];function Ek(e,t){return`${e}-${t}`}const Pk=({selected:e})=>(0,a.jsx)("span",{className:Ht("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,a.jsx)(b.Icon,{icon:Xr})}),Ik=({selected:e})=>(0,a.jsx)("span",{className:Ht("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Vk({view:e,filter:t,onChangeView:n}){const s=(0,y.useInstanceId)(Vk,"dataviews-filter-list-box"),[i,r]=(0,h.useState)(1===t.operators?.length?void 0:null),o=e.filters?.find((e=>e.field===t.field)),l=Sk(t,o);return(0,a.jsx)(b.Composite,{virtualFocus:!0,focusLoop:!0,activeId:i,setActiveId:r,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,w.sprintf)((0,w.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!i&&t.elements.length&&r(Ek(s,t.elements[0].value))},render:(0,a.jsx)(b.Composite.Typeahead,{}),children:t.elements.map((i=>(0,a.jsxs)(b.Composite.Hover,{render:(0,a.jsx)(b.Composite.Item,{id:Ek(s,i.value),render:(0,a.jsx)("div",{"aria-label":i.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{const s=o?[...(e.filters??[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:kk(t,o,i.value)}:e))]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:kk(t,o,i.value)}];n({...e,page:1,filters:s})}}),children:[t.singleSelection&&(0,a.jsx)(Ik,{selected:l===i.value}),!t.singleSelection&&(0,a.jsx)(Pk,{selected:l.includes(i.value)}),(0,a.jsx)("span",{children:i.label})]},i.value)))})}function Tk({view:e,filter:t,onChangeView:n}){const[s,i]=(0,h.useState)(""),r=(0,h.useDeferredValue)(s),o=e.filters?.find((e=>e.field===t.field)),l=Sk(t,o),c=(0,h.useMemo)((()=>{const e=Ck(r);return t.elements.filter((t=>Ck(t.label).includes(e)))}),[t.elements,r]);return(0,a.jsxs)(SC,{selectedValue:l,setSelectedValue:s=>{const i=o?[...(e.filters??[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:s}:e))]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:s}];n({...e,page:1,filters:i})},setValue:i,children:[(0,a.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,a.jsx)(kC,{render:(0,a.jsx)(b.VisuallyHidden,{children:(0,w.__)("Search items")}),children:(0,w.__)("Search items")}),(0,a.jsx)(JC,{autoSelect:"always",placeholder:(0,w.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,a.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,a.jsx)(b.Icon,{icon:Yt})})]}),(0,a.jsxs)(rk,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map((e=>(0,a.jsxs)(yk,{resetValueOnSelect:!1,value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,a.jsx)(Ik,{selected:l===e.value}),!t.singleSelection&&(0,a.jsx)(Pk,{selected:l.includes(e.value)}),(0,a.jsxs)("span",{children:[(0,a.jsx)(_k,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,a.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value))),!c.length&&(0,a.jsx)("p",{children:(0,w.__)("No results found")})]})]})}function Ok(e){const{elements:t,isLoading:n}=Vx({elements:e.filter.elements,getElements:e.filter.getElements});if(n)return(0,a.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,a.jsx)(b.Spinner,{})});if(0===t.length)return(0,a.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,w.__)("No elements found")});const s=t.length>10?Tk:Vk;return(0,a.jsx)(s,{...e,filter:{...e.filter,elements:t}})}var Ak=i(7734),Nk=i.n(Ak);function Fk({filter:e,view:t,onChangeView:n,fields:s}){const i=t.filters?.find((t=>t.field===e.field)),r=Sk(e,i),o=(0,h.useMemo)((()=>{const t=s.find((t=>t.id===e.field));return t?{...t,isValid:{required:!1,custom:()=>null},getValue:({item:e})=>e[t.id],setValue:({value:e})=>({[t.id]:e})}:t}),[s,e.field]),l=(0,h.useMemo)((()=>(t.filters??[]).reduce(((e,t)=>(e[t.field]=t.value,e)),{})),[t.filters]),c=(0,y.useEvent)((s=>{if(!o||!i)return;const a=o.getValue({item:s});Nk()(a,r)||n({...t,filters:(t.filters??[]).map((t=>t.field===e.field?{...t,operator:i.operator||e.operators[0],value:""===a?void 0:a}:t))})}));return o&&o.Edit&&i?(0,a.jsx)(b.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,a.jsx)(o.Edit,{hideLabelFromVision:!0,data:l,field:o,operator:i.operator,onChange:c})}):null}const Mk="Enter",Bk=" ",Dk=({activeElements:e,filterInView:t,filter:n})=>{if(void 0===e||0===e.length)return n.name;const s={Name:(0,a.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,a.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};if(t?.operator===$y)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is any: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===ex)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is none: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===tx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===nx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===Qy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===Jy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===sx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ix)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===rx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ax)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===dx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===hx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===px)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ox)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===lx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===cx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ux)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===fx){const{label:t}=e[0];return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),n.name,t[0],t[1]),s)}return t?.operator===mx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),s):t?.operator===gx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),s):t?.operator===vx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),n.name,`${e[0].value.value} ${e[0].value.unit}`),s):t?.operator===yx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is over: </Name><Value>%2$s</Value> ago"),n.name,`${e[0].value.value} ${e[0].value.unit}`),s):(0,w.sprintf)((0,w.__)("Unknown status for %1$s"),n.name)};function Rk({filter:e,view:t,onChangeView:n}){const s=e.operators?.map((e=>({value:e,label:wx[e]?.label}))),i=t.filters?.find((t=>t.field===e.field)),r=i?.operator||e.operators[0];return s.length>1&&(0,a.jsxs)(b.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filters__summary-operators-container",children:[(0,a.jsx)(b.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,a.jsx)(b.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,w.__)("Conditions"),value:r,options:s,onChange:s=>{const r=s,a=i?.operator,o=i?[...(t.filters??[]).map((t=>{if(t.field===e.field){const e=[fx,vx,yx],n=a&&(e.includes(a)||e.includes(r));return{...t,value:n?void 0:t.value,operator:r}}return t}))]:[...t.filters??[],{field:e.field,operator:r,value:void 0}];n({...t,page:1,filters:o})},size:"small",variant:"minimal",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0})]})}function Lk({addFilterRef:e,openedFilter:t,fields:n,...s}){const i=(0,h.useRef)(null),{filter:r,view:o,onChangeView:l}=s,c=o.filters?.find((e=>e.field===r.field));let u=[];const{elements:d}=Vx({elements:r.elements,getElements:r.getElements});d.length>0?u=d.filter((e=>r.singleSelection?e.value===c?.value:c?.value?.includes(e.value))):void 0!==c?.value&&(u=[{value:c.value,label:c.value}]);const p=r.isPrimary,f=c?.isLocked,m=!f&&void 0!==c?.value,g=!f&&(!p||m);return(0,a.jsx)(b.Dropdown,{defaultOpen:t===r.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{i.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,a.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,a.jsx)(b.Tooltip,{text:(0,w.sprintf)((0,w.__)("Filter by: %1$s"),r.name.toLowerCase()),placement:"top",children:(0,a.jsx)("div",{className:Ht("dataviews-filters__summary-chip",{"has-reset":g,"has-values":m,"is-not-clickable":f}),role:"button",tabIndex:f?-1:0,onClick:()=>{f||n()},onKeyDown:e=>{!f&&[Mk,Bk].includes(e.key)&&(n(),e.preventDefault())},"aria-disabled":f,"aria-pressed":t,"aria-expanded":t,ref:i,children:(0,a.jsx)(Dk,{activeElements:u,filterInView:c,filter:r})})}),g&&(0,a.jsx)(b.Tooltip,{text:p?(0,w.__)("Reset"):(0,w.__)("Remove"),placement:"top",children:(0,a.jsx)("button",{className:Ht("dataviews-filters__summary-chip-remove",{"has-values":m}),onClick:()=>{l({...o,page:1,filters:o.filters?.filter((e=>e.field!==r.field))}),p?i.current?.focus():e.current?.focus()},children:(0,a.jsx)(b.Icon,{icon:Ea})})})]}),renderContent:()=>(0,a.jsxs)(b.__experimentalVStack,{spacing:0,justify:"flex-start",children:[(0,a.jsx)(Rk,{...s}),s.filter.hasElements?(0,a.jsx)(Ok,{...s,filter:{...s.filter,elements:d}}):(0,a.jsx)(Fk,{...s,fields:n})]})})}function zk({filters:e,view:t,onChangeView:n}){const s=!t.search&&!t.filters?.some((t=>{return!(t.isLocked||void 0===t.value&&(n=t.field,e.some((e=>e.field===n&&e.isPrimary))));var n}));return(0,a.jsx)(b.Button,{disabled:s,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:t.filters?.filter((e=>!!e.isLocked))||[]})},children:(0,w.__)("Reset")})}var Hk=function(e,t){return(0,h.useMemo)((()=>{const n=[];return e.forEach((e=>{if(!1===e.filterBy||!e.hasElements&&!e.Edit)return;const s=e.filterBy.operators,i=!!e.filterBy?.isPrimary,r=t.filters?.some((t=>t.field===e.id&&!!t.isLocked))??!1;n.push({field:e.id,name:e.label,elements:e.elements,getElements:e.getElements,hasElements:e.hasElements,singleSelection:s.some((e=>bx.includes(e))),operators:s,isVisible:r||i||!!t.filters?.some((t=>t.field===e.id&&xx.includes(t.operator))),isPrimary:i,isLocked:r})})),n.sort(((e,t)=>e.isLocked&&!t.isLocked?-1:!e.isLocked&&t.isLocked?1:e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name))),n}),[e,t])};var Gk=(0,h.memo)((function({className:e}){const{fields:t,view:n,onChangeView:s,openedFilter:i,setOpenedFilter:r}=(0,h.useContext)(Lw),o=(0,h.useRef)(null),l=Hk(t,n),c=(0,a.jsx)(U_,{filters:l,view:n,onChangeView:s,ref:o,setOpenedFilter:r},"add-filter"),u=l.filter((e=>e.isVisible));if(0===u.length)return null;const d=[...u.map((e=>(0,a.jsx)(Lk,{filter:e,view:n,fields:t,onChangeView:s,addFilterRef:o,openedFilter:i},e.field))),c];return d.push((0,a.jsx)(zk,{filters:l,view:n,onChangeView:s},"reset-filters")),(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},wrap:!0,className:e,children:d})}));var Wk=function(e){const{isShowingFilter:t}=(0,h.useContext)(Lw);return t?(0,a.jsx)(Gk,{...e}):null};function Uk({className:e}){const{actions:t=[],data:n,fields:s,getItemId:i,getItemLevel:r,isLoading:o,view:l,onChangeView:c,selection:u,onChangeSelection:d,setOpenedFilter:p,onClickItem:f,isItemClickable:m,renderItemLink:g,defaultLayouts:v,empty:y=(0,a.jsx)("p",{children:(0,w.__)("No results")})}=(0,h.useContext)(Lw),x=H_.find((e=>e.type===l.type&&v[e.type]))?.component;return(0,a.jsx)(x,{className:e,actions:t,data:n,fields:s,getItemId:i,getItemLevel:r,isLoading:o,onChangeView:c,onChangeSelection:d,selection:u,setOpenedFilter:p,onClickItem:f,renderItemLink:g,isItemClickable:m,view:l,empty:y})}function qk(){const{view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:s}}=(0,h.useContext)(Lw);if(!n||!s||e.infiniteScrollEnabled)return null;const i=e.page??1,r=Array.from(Array(s)).map(((e,t)=>{const n=t+1;return{value:n.toString(),label:n.toString(),"aria-label":i===n?(0,w.sprintf)((0,w.__)("Page %1$d of %2$d"),i,s):n.toString()}}));return!!n&&1!==s&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"dataviews-pagination",justify:"end",spacing:6,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"dataviews-pagination__page-select",children:(0,h.createInterpolateElement)((0,w.sprintf)((0,w._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",s),{div:(0,a.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,a.jsx)(b.SelectControl,{"aria-label":(0,w.__)("Current page"),value:i.toString(),options:r,onChange:n=>{t({...e,page:+n})},size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{onClick:()=>t({...e,page:i-1}),disabled:1===i,accessibleWhenDisabled:!0,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?$c:eu,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.jsx)(b.Button,{onClick:()=>t({...e,page:i+1}),disabled:i>=s,accessibleWhenDisabled:!0,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?eu:$c,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var Zk=(0,h.memo)(qk);const Yk=[];function Kk(){const{view:e,paginationInfo:{totalItems:t=0,totalPages:n},data:s,actions:i=Yk}=(0,h.useContext)(Lw),r=s_(i,s)&&[Ex,Px].includes(e.type);return!t||!n||n<=1&&!r?null:!!t&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,justify:"end",className:"dataviews-footer",children:[r&&(0,a.jsx)(u_,{}),(0,a.jsx)(Zk,{})]})}var Xk=(0,h.memo)((function({label:e}){const{view:t,onChangeView:n}=(0,h.useContext)(Lw),[s,i,r]=(0,y.useDebouncedInput)(t.search);(0,h.useEffect)((()=>{i(t.search??"")}),[t.search,i]);const o=(0,h.useRef)(n),l=(0,h.useRef)(t);(0,h.useEffect)((()=>{o.current=n,l.current=t}),[n,t]),(0,h.useEffect)((()=>{r!==l.current?.search&&o.current({...l.current,page:1,search:r})}),[r]);const c=e||(0,w.__)("Search");return(0,a.jsx)(b.SearchControl,{className:"dataviews-search",__nextHasNoMarginBottom:!0,onChange:i,value:s,label:c,placeholder:c,size:"compact"})})),Qk=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})}),Jk=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const $k=window.wp.warning;var eE=i.n($k);function tE(){const e=(0,h.useContext)(Lw),{view:t,onChangeView:n}=e,s=t.infiniteScrollEnabled??!1;return e.hasInfiniteScrollHandler?(0,a.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,w.__)("Enable infinite scroll"),help:(0,w.__)("Automatically load more content as you scroll, instead of showing pagination links."),checked:s,onChange:e=>{n({...t,infiniteScrollEnabled:e})}}):null}const{Menu:nE}=Yx(b.privateApis),sE={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function iE(){const{view:e,onChangeView:t,defaultLayouts:n}=(0,h.useContext)(Lw),s=Object.keys(n);if(s.length<=1)return null;const i=H_.find((t=>e.type===t.type));return(0,a.jsxs)(nE,{children:[(0,a.jsx)(nE.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"compact",icon:i?.icon,label:(0,w.__)("Layout")})}),(0,a.jsx)(nE.Popover,{children:s.map((s=>{const i=H_.find((e=>e.type===s));return i?(0,a.jsx)(nE.RadioItem,{value:s,name:"view-actions-available-view",checked:s===e.type,hideOnClick:!0,onChange:s=>{switch(s.target.value){case"list":case"grid":case"table":case"pickerGrid":const i={...e};return"layout"in i&&delete i.layout,t({...i,type:s.target.value,...n[s.target.value]})}eE()("Invalid dataview")},children:(0,a.jsx)(nE.ItemLabel,{children:i.label})},s):null}))})]})}function rE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Lw),s=(0,h.useMemo)((()=>t.filter((e=>!1!==e.enableSorting)).map((e=>({label:e.label,value:e.id})))),[t]);return(0,a.jsx)(b.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,w.__)("Sort by"),value:e.sort?.field,options:s,onChange:t=>{n({...e,sort:{direction:e?.sort?.direction||"desc",field:t},showLevels:!1})}})}function aE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Lw);if(0===t.filter((e=>!1!==e.enableSorting)).length)return null;let s=e.sort?.direction;return!s&&e.sort?.field&&(s="desc"),(0,a.jsx)(b.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Order"),value:s,onChange:s=>{"asc"!==s&&"desc"!==s?eE()("Invalid direction"):n({...e,sort:{direction:s,field:e.sort?.field||t.find((e=>!1!==e.enableSorting))?.id||""},showLevels:!1})},children:_x.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOptionIcon,{value:e,icon:kx[e],label:Cx[e]},e)))})}function oE(){const{view:e,config:t,onChangeView:n}=(0,h.useContext)(Lw),{infiniteScrollEnabled:s}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||s?null:(0,a.jsx)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:t=>{const s="number"==typeof t||void 0===t?t:parseInt(t,10);n({...e,perPage:s,page:1})},children:t.perPageSizes.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:e,label:e.toString()},e)))})}function lE({previewOptions:e,onChangePreviewOption:t,onMenuOpenChange:n,activeOption:s}){return(0,a.jsxs)(nE,{onOpenChange:n,children:[(0,a.jsx)(nE.TriggerButton,{render:(0,a.jsx)(b.Button,{className:"dataviews-field-control__field-preview-options-button",size:"compact",icon:No,label:(0,w.__)("Preview")})}),(0,a.jsx)(nE.Popover,{children:e?.map((({id:e,label:n})=>(0,a.jsx)(nE.RadioItem,{value:e,checked:e===s,onChange:()=>{t?.(e),(e=>{setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e} .dataviews-field-control__field-preview-options-button`);t instanceof HTMLElement&&t.focus()}),50)})(e)},children:(0,a.jsx)(nE.ItemLabel,{children:n})},e)))})]})}function cE({field:e,label:t,description:n,isVisible:s,isFirst:i,isLast:r,canMove:o=!0,onToggleVisibility:l,onMoveUp:c,onMoveDown:u,previewOptions:d,onChangePreviewOption:p}){const[f,m]=(0,h.useState)(!1);return(0,a.jsx)(b.__experimentalItem,{children:(0,a.jsxs)(b.__experimentalHStack,{expanded:!0,className:Ht("dataviews-field-control__field",`dataviews-field-control__field-${e.id}`,{"is-interacting":f}),justify:"flex-start",children:[(0,a.jsx)("span",{className:"dataviews-field-control__icon",children:!o&&!e.enableHiding&&(0,a.jsx)(b.Icon,{icon:Qk})}),(0,a.jsxs)("span",{className:"dataviews-field-control__label-sub-label-container",children:[(0,a.jsx)("span",{className:"dataviews-field-control__label",children:t||e.label}),n&&(0,a.jsx)("span",{className:"dataviews-field-control__sub-label",children:n})]}),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-end",expanded:!1,className:"dataviews-field-control__actions",children:[s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{disabled:i||!o,accessibleWhenDisabled:!0,size:"compact",onClick:c,icon:Nv,label:i||!o?(0,w.__)("This field can't be moved up"):(0,w.sprintf)((0,w.__)("Move %s up"),e.label)}),(0,a.jsx)(b.Button,{disabled:r||!o,accessibleWhenDisabled:!0,size:"compact",onClick:u,icon:Fv,label:r||!o?(0,w.__)("This field can't be moved down"):(0,w.sprintf)((0,w.__)("Move %s down"),e.label)})]}),l&&(0,a.jsx)(b.Button,{className:"dataviews-field-control__field-visibility-button",disabled:!e.enableHiding,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{l(),setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e.id} .dataviews-field-control__field-visibility-button`);t instanceof HTMLElement&&t.focus()}),50)},icon:s?Pw:Ao,label:s?(0,w.sprintf)((0,w._x)("Hide %s","field"),e.label):(0,w.sprintf)((0,w._x)("Show %s","field"),e.label)}),d&&(0,a.jsx)(lE,{previewOptions:d,onChangePreviewOption:p,onMenuOpenChange:m,activeOption:e.id})]})]})})}function uE({index:e,field:t,view:n,onChangeView:s}){const i=n.fields??[],r=void 0!==e&&i.includes(t.id);return(0,a.jsx)(cE,{field:t,isVisible:r,isFirst:void 0!==e&&e<1,isLast:void 0!==e&&e===i.length-1,onToggleVisibility:()=>{s({...n,fields:r?i.filter((e=>e!==t.id)):[...i,t.id]})},onMoveUp:void 0!==e?()=>{s({...n,fields:[...i.slice(0,e-1)??[],t.id,i[e-1],...i.slice(e+1)]})}:void 0,onMoveDown:void 0!==e?()=>{s({...n,fields:[...i.slice(0,e)??[],i[e+1],t.id,...i.slice(e+2)]})}:void 0})}function dE(e){return!!e}function hE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Lw),s=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean),i=e.fields??[],r=t.filter((e=>!i.includes(e.id)&&!s.includes(e.id)&&"media"!==e.type&&!1!==e.enableHiding));let o=i.map((e=>t.find((t=>t.id===e)))).filter(dE);if(!o?.length&&!r?.length)return null;const l=t.find((t=>t.id===e.titleField)),c=t.find((t=>t.id===e.mediaField)),u=t.find((t=>t.id===e.descriptionField)),d=t.filter((e=>"media"===e.type));let p;if(d.length>1){const t=dE(c)&&(e.showMedia??!0);p=dE(c)&&(0,a.jsx)(cE,{field:c,label:(0,w.__)("Preview"),description:c.label,isVisible:t,onToggleVisibility:()=>{n({...e,showMedia:!t})},canMove:!1,previewOptions:d.map((e=>({label:e.label,id:e.id}))),onChangePreviewOption:t=>n({...e,mediaField:t})},c.id)}const f=[{field:l,isVisibleFlag:"showTitle"},{field:c,isVisibleFlag:"showMedia",ui:p},{field:u,isVisibleFlag:"showDescription"}].filter((({field:e})=>dE(e)));let m=f.filter((({field:t,isVisibleFlag:n})=>dE(t)&&(e[n]??!0)));1===m.length&&(m=m.map((e=>({...e,field:{...e.field,enableHiding:!1}})))),0===m.length&&1===o.length&&(o=[{...o[0],enableHiding:!1}]);const g=f.filter((({field:t,isVisibleFlag:n})=>dE(t)&&!(e[n]??1)));return(0,a.jsxs)(b.__experimentalVStack,{className:"dataviews-field-control",spacing:6,children:[(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-config__properties",spacing:0,children:(m.length>0||!!o?.length)&&(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[m.map((({field:t,isVisibleFlag:s,ui:i})=>i??(0,a.jsx)(cE,{field:t,isVisible:!0,onToggleVisibility:()=>{n({...e,[s]:!1})},canMove:!1},t.id))),o.map(((t,s)=>(0,a.jsx)(uE,{field:t,view:e,onChangeView:n,index:s},t.id)))]})}),(!!r?.length||!!g.length)&&(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.BaseControl.VisualLabel,{style:{margin:0},children:(0,w.__)("Hidden")}),(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-config__properties",spacing:0,children:(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[g.length>0&&g.map((({field:t,isVisibleFlag:s,ui:i})=>i??(0,a.jsx)(cE,{field:t,isVisible:!1,onToggleVisibility:()=>{n({...e,[s]:!0})},canMove:!1},t.id))),r.map((t=>(0,a.jsx)(uE,{field:t,view:e,onChangeView:n},t.id)))]})})]})]})}function pE({title:e,description:t,children:n}){return(0,a.jsxs)(b.__experimentalGrid,{columns:12,className:"dataviews-settings-section",gap:4,children:[(0,a.jsxs)("div",{className:"dataviews-settings-section__sidebar",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:e}),t&&(0,a.jsx)(b.__experimentalText,{variant:"muted",className:"dataviews-settings-section__description",children:t})]}),(0,a.jsx)(b.__experimentalGrid,{columns:8,gap:4,className:"dataviews-settings-section__content",children:n})]})}function fE(){const{view:e}=(0,h.useContext)(Lw),t=(0,y.useInstanceId)(mE,"dataviews-view-config-dropdown"),n=H_.find((t=>t.type===e.type));return(0,a.jsx)(b.Dropdown,{expandOnMobile:!0,popoverProps:{...sE,id:t},renderToggle:({onToggle:e,isOpen:n})=>(0,a.jsx)(b.Button,{size:"compact",icon:Jk,label:(0,w._x)("View options","View is used as a noun"),onClick:e,"aria-expanded":n?"true":"false","aria-controls":t}),renderContent:()=>(0,a.jsx)(b.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,a.jsxs)(b.__experimentalVStack,{className:"dataviews-view-config",spacing:6,children:[(0,a.jsxs)(pE,{title:(0,w.__)("Appearance"),children:[(0,a.jsxs)(b.__experimentalHStack,{expanded:!0,className:"is-divided-in-two",children:[(0,a.jsx)(rE,{}),(0,a.jsx)(aE,{})]}),!!n?.viewConfigOptions&&(0,a.jsx)(n.viewConfigOptions,{}),(0,a.jsx)(tE,{}),(0,a.jsx)(oE,{})]}),(0,a.jsx)(pE,{title:(0,w.__)("Properties"),children:(0,a.jsx)(hE,{})})]})})})}function mE(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(iE,{}),(0,a.jsx)(fE,{})]})}var gE=(0,h.memo)(mE);const vE=e=>e.id,yE=()=>!0,xE=[],bE=H_.filter((e=>!e.isPicker));function wE({header:e,search:t=!0,searchLabel:n}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalHStack,{alignment:"top",justify:"space-between",className:"dataviews__view-actions",spacing:1,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"start",expanded:!1,className:"dataviews__search",children:[t&&(0,a.jsx)(Xk,{label:n}),(0,a.jsx)(Z_,{})]}),(0,a.jsxs)(b.__experimentalHStack,{spacing:1,expanded:!1,style:{flexShrink:0},children:[(0,a.jsx)(gE,{}),e]})]}),(0,a.jsx)(Wk,{className:"dataviews-filters__container"}),(0,a.jsx)(Uk,{}),(0,a.jsx)(Kk,{})]})}const _E=function({view:e,onChangeView:t,fields:n,search:s=!0,searchLabel:i,actions:r=xE,data:o,getItemId:l=vE,getItemLevel:c,isLoading:u=!1,paginationInfo:d,defaultLayouts:p,selection:f,onChangeSelection:m,onClickItem:g,renderItemLink:v,isItemClickable:x=yE,header:b,children:w,config:_={perPageSizes:[10,20,50,100]},empty:j}){const{infiniteScrollHandler:S}=d,C=(0,h.useRef)(null),[k,E]=(0,h.useState)(0),P=(0,y.useResizeObserver)((e=>{E(e[0].borderBoxSize[0].inlineSize)}),{box:"border-box"}),[I,V]=(0,h.useState)([]),T=void 0===f||void 0===m,O=T?I:f,[A,N]=(0,h.useState)(null),F=(0,h.useMemo)((()=>Nw(n)),[n]),M=(0,h.useMemo)((()=>O.filter((e=>o.some((t=>l(t)===e))))),[O,o,l]),B=Hk(F,e),D=(0,h.useMemo)((()=>(B||[]).some((e=>e.isPrimary||e.isLocked))),[B]),[R,L]=(0,h.useState)(D);(0,h.useEffect)((()=>{D&&!R&&L(!0)}),[D,R]),(0,h.useEffect)((()=>{if(!e.infiniteScrollEnabled||!C.current)return;const t=(0,y.throttle)((e=>{const t=e.target,n=t.scrollTop,s=t.scrollHeight;n+t.clientHeight>=s-100&&S?.()}),100),n=C.current;return n.addEventListener("scroll",t),()=>{n.removeEventListener("scroll",t),t.cancel()}}),[S,e.infiniteScrollEnabled]);const z=(0,h.useMemo)((()=>Object.fromEntries(Object.entries(p).filter((([e])=>bE.some((t=>t.type===e)))))),[p]);return z[e.type]?(0,a.jsx)(Lw.Provider,{value:{view:e,onChangeView:t,fields:F,actions:r,data:o,isLoading:u,paginationInfo:d,selection:M,onChangeSelection:function(e){const t="function"==typeof e?e(O):e;T&&V(t),m&&m(t)},openedFilter:A,setOpenedFilter:N,getItemId:l,getItemLevel:c,isItemClickable:x,onClickItem:g,renderItemLink:v,containerWidth:k,containerRef:C,resizeObserverRef:P,defaultLayouts:z,filters:B,isShowingFilter:R,setIsShowingFilter:L,config:_,empty:j,hasInfiniteScrollHandler:!!S},children:(0,a.jsx)("div",{className:"dataviews-wrapper",ref:C,children:w??(0,a.jsx)(wE,{header:b,search:s,searchLabel:i})})}):null};_E.BulkActionToolbar=u_,_E.Filters=Gk,_E.FiltersToggled=Wk,_E.FiltersToggle=Z_,_E.Layout=Uk,_E.LayoutSwitcher=iE,_E.Pagination=qk,_E.Search=Xk,_E.ViewConfig=fE,_E.Footer=Kk;var jE=_E,SE=i(7951);function CE(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return t()}),[]),t=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,n=(0,c.useSelect)((e=>e(j.store).getBlockPatterns()),[]),s=(0,h.useMemo)((()=>[...t||[],...n||[]].filter(py)),[t,n]);return(0,h.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:t,...n}=e;return{...n,__experimentalBlockPatterns:s,isPreviewMode:!0}}),[e,s])}var kE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),EE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})});const{useHistory:PE,useLocation:IE}=ne(Lt.privateApis),{CreatePatternModal:VE,useAddPatternCategory:TE}=ne(_e.privateApis),{CreateTemplatePartModal:OE}=ne(f.privateApis);function AE(){const e=PE(),t=IE(),[n,s]=(0,h.useState)(!1),[i,r]=(0,h.useState)(!1),{createPatternFromFile:o}=ne((0,c.useDispatch)(_e.store)),{createSuccessNotice:l,createErrorNotice:u}=(0,c.useDispatch)(_.store),d=(0,h.useRef)(),{isBlockBasedTheme:p,addNewPatternLabel:f,addNewTemplatePartLabel:m,canCreatePattern:g,canCreateTemplatePart:v}=(0,c.useSelect)((e=>{const{getCurrentTheme:t,getPostType:n,canUser:s}=e(j.store);return{isBlockBasedTheme:t()?.is_block_theme,addNewPatternLabel:n(Ie.user)?.labels?.add_new_item,addNewTemplatePartLabel:n(Ce)?.labels?.add_new_item,canCreatePattern:s("create",{kind:"postType",name:Ie.user}),canCreateTemplatePart:s("create",{kind:"postType",name:Ce})}}),[]);function y(){s(!1),r(!1)}const x=[];g&&x.push({icon:Ra,onClick:()=>s(!0),title:f}),p&&v&&x.push({icon:kE,onClick:()=>r(!0),title:m}),g&&x.push({icon:EE,onClick:()=>{d.current.click()},title:(0,w.__)("Import pattern from JSON")});const{categoryMap:S,findOrCreateTerm:C}=TE();return 0===x.length?null:(0,a.jsxs)(a.Fragment,{children:[f&&(0,a.jsx)(b.DropdownMenu,{controls:x,icon:null,toggleProps:{variant:"primary",showTooltip:!1,__next40pxDefaultSize:!0},text:f,label:f}),n&&(0,a.jsx)(VE,{onClose:()=>s(!1),onSuccess:function({pattern:t}){s(!1),e.navigate(`/${Ie.user}/${t.id}?canvas=edit`)},onError:y}),i&&(0,a.jsx)(OE,{closeModal:()=>r(!1),blocks:[],onCreate:function(t){r(!1),e.navigate(`/${Ce}/${t.id}?canvas=edit`)},onError:y}),(0,a.jsx)("input",{type:"file",accept:".json",hidden:!0,ref:d,onChange:async n=>{const s=n.target.files?.[0];if(s)try{let n;if(t.query.postType!==Ce){const e=Array.from(S.values()).find((e=>e.name===t.query.categoryId));e&&(n=e.id||await C(e.label))}const i=await o(s,n?[n]:void 0);n||"my-patterns"===t.query.categoryId||e.navigate(`/pattern?categoryId=${Ve}`),l((0,w.sprintf)((0,w.__)('Imported "%s" from JSON.'),i.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}})]})}const{RenamePatternCategoryModal:NE}=ne(_e.privateApis);function FE({category:e,onClose:t}){const[n,s]=(0,h.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.MenuItem,{onClick:()=>s(!0),children:(0,w.__)("Rename")}),n&&(0,a.jsx)(ME,{category:e,onClose:()=>{s(!1),t()}})]})}function ME({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},s=Vy();return(0,a.jsx)(NE,{category:n,existingCategories:s,onClose:t,overlayClassName:"edit-site-list__rename-modal",focusOnMount:"firstContentElement",size:"small"})}const{useHistory:BE}=ne(Lt.privateApis);function DE({category:e,onClose:t}){const[n,s]=(0,h.useState)(!1),i=BE(),{createSuccessNotice:r,createErrorNotice:o}=(0,c.useDispatch)(_.store),{deleteEntityRecord:l,invalidateResolution:u}=(0,c.useDispatch)(j.store);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.MenuItem,{isDestructive:!0,onClick:()=>s(!0),children:(0,w.__)("Delete")}),(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await l("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),u("getUserPatternCategories"),u("getEntityRecords",["postType",Ie.user,{per_page:-1}]),r((0,w.sprintf)((0,w._x)('"%s" deleted.',"pattern category"),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),i.navigate(`/pattern?categoryId=${Ve}`)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while deleting the pattern category.");o(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>s(!1),confirmButtonText:(0,w.__)("Delete"),className:"edit-site-patterns__delete-modal",title:(0,w.sprintf)((0,w._x)('Delete "%s"?',"pattern category"),(0,qt.decodeEntities)(e.label)),size:"medium",__experimentalHideHeader:!1,children:(0,w.sprintf)((0,w.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,qt.decodeEntities)(e.label))})]})}function RE({categoryId:e,type:t}){const{patternCategories:n}=Vy();let s;return t===Ie.user&&e&&(s=n.find((t=>t.name===e))),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(AE,{}),!!s?.id&&(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",size:"compact"},children:({onClose:e})=>(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(FE,{category:s,onClose:e}),(0,a.jsx)(DE,{category:s,onClose:e})]})})]})}var LE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});const{useHistory:zE}=ne(Lt.privateApis),HE=()=>{const e=zE();return(0,h.useMemo)((()=>({id:"edit-post",label:(0,w.__)("Edit"),isPrimary:!0,icon:LE,isEligible:e=>"trash"!==e.status&&e.type!==Ie.theme,callback(t){const n=t[0];e.navigate(`/${n.type}/${n.id}?canvas=edit`)}})),[e])};var GE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),WE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),UE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});function qE(e,t){return(0,c.useSelect)((n=>{const{getEntityRecord:s,getUser:i,getEditedEntityRecord:r}=n(j.store),a=r("postType",e,t),o=a?.original_source,l=a?.author_text;switch(o){case"theme":return{type:o,icon:Da,text:l,isCustomized:a.source===ke};case"plugin":return{type:o,icon:GE,text:l,isCustomized:a.source===ke};case"site":{const e=s("root","__unstableBase");return{type:o,icon:WE,imageUrl:e?.site_logo?s("postType","attachment",e.site_logo)?.source_url:void 0,text:l,isCustomized:!1}}default:{const e=i(a.author);return{type:"user",icon:UE,imageUrl:e?.avatar_urls?.[48],text:l??e?.name,isCustomized:!1}}}}),[e,t])}const{useGlobalStyle:ZE}=ne(x.privateApis);const YE={label:(0,w.__)("Preview"),id:"preview",render:function({item:e}){const t=(0,h.useId)(),n=e.description||e?.excerpt?.raw,s=e.type===Ce,[i]=ZE("color.background"),r=(0,h.useMemo)((()=>e.blocks??(0,o.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0})),[e?.content?.raw,e.blocks]),l=!r?.length;return(0,a.jsxs)("div",{className:"page-patterns-preview-field",style:{backgroundColor:i},"aria-describedby":n?t:void 0,children:[l&&s&&(0,w.__)("Empty template part"),l&&!s&&(0,w.__)("Empty pattern"),!l&&(0,a.jsx)(x.BlockPreview.Async,{children:(0,a.jsx)(x.BlockPreview,{blocks:r,viewportWidth:e.viewportWidth})}),!!n&&(0,a.jsx)("div",{hidden:!0,id:t,children:n})]})},enableSorting:!1},KE=[{value:Ae.full,label:(0,w._x)("Synced","pattern (singular)"),description:(0,w.__)("Patterns that are kept in sync across the site.")},{value:Ae.unsynced,label:(0,w._x)("Not synced","pattern (singular)"),description:(0,w.__)("Patterns that can be changed freely without affecting the site.")}],XE={label:(0,w.__)("Sync status"),id:"sync-status",render:({item:e})=>{const t="wp_pattern_sync_status"in e?e.wp_pattern_sync_status||Ae.full:Ae.unsynced;return(0,a.jsx)("span",{className:`edit-site-patterns__field-sync-status-${t}`,children:KE.find((({value:e})=>e===t)).label})},elements:KE,filterBy:{operators:["is"],isPrimary:!0},enableSorting:!1};const QE={label:(0,w.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:function({item:e}){const[t,n]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:r}=qE(e.type,e.id);return(0,a.jsxs)(b.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,a.jsx)("div",{className:Ht("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,a.jsx)("img",{onLoad:()=>n(!0),alt:"",src:r})}),!r&&(0,a.jsx)("div",{className:"page-templates-author-field__icon",children:(0,a.jsx)(qa,{icon:i})}),(0,a.jsx)("span",{className:"page-templates-author-field__name",children:s})]})},filterBy:{isPrimary:!0}},{ExperimentalBlockEditorProvider:JE}=ne(x.privateApis),{usePostActions:$E,patternTitleField:eP}=ne(f.privateApis),{useLocation:tP,useHistory:nP}=ne(Lt.privateApis),sP=[],iP={[Be]:{layout:{styles:{author:{width:"1%"}}}},[Me]:{layout:{badgeFields:["sync-status"]}}},rP={type:Me,perPage:20,titleField:"title",mediaField:"preview",fields:["sync-status"],filters:[],...iP[Me]};function aP(){const{path:e,query:t}=tP(),{postType:n="wp_block",categoryId:s}=t,i=nP(),r=s||Ve,{view:o,updateView:l,isModified:u,resetToDefault:d}=(0,SE.useView)({kind:"postType",name:n,slug:r,defaultView:rP,queryParams:{page:Number(t.pageNumber??1),search:t.search},onChangeQueryParams:n=>{i.navigate((0,Qt.addQueryArgs)(e,{...t,pageNumber:n.page,search:n.search}))}}),p=o.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:f,isResolving:m}=Iy(n,r,{search:o.search,syncStatus:p}),{records:g}=(0,j.useEntityRecords)("postType",Ce,{per_page:-1}),v=(0,h.useMemo)((()=>{if(!g)return sP;const e=new Set;return g.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[g]),y=(0,h.useMemo)((()=>{const e=[YE,eP];return n===Ie.user?e.push(XE):n===Ce&&e.push({...QE,elements:v}),e}),[n,v]),{data:x,paginationInfo:_}=(0,h.useMemo)((()=>{const e={...o};return delete e.search,n!==Ce&&(e.filters=[]),Dw(f,e,y)}),[f,o,y,n]),S=function(e){const t=(0,h.useMemo)((()=>e?.filter((e=>e.type!==Ie.theme)).map((e=>[e.type,e.id]))??[]),[e]),n=(0,c.useSelect)((e=>{const{getEntityRecordPermissions:n}=ne(e(j.store));return t.reduce(((e,[t,s])=>(e[s]=n("postType",t,s),e)),{})}),[t]);return(0,h.useMemo)((()=>e?.map((e=>({...e,permissions:n?.[e.id]??{}})))??[]),[e,n])}(x),C=$E({postType:Ce,context:"list"}),k=$E({postType:Ie.user,context:"list"}),E=HE(),P=(0,h.useMemo)((()=>n===Ce?[E,...C].filter(Boolean):[E,...k].filter(Boolean)),[E,n,C,k]),I=CE(),{title:V,description:T}=function(e,t){const{patternCategories:n}=Vy(),s=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_part_areas||[]),[]);let i,r,a;if(e===Ce){const e=s.find((e=>e.area===t));i=e?.label||(0,w.__)("All Template Parts"),r=e?.description||(0,w.__)("Includes every template part defined for any area.")}else e===Ie.user&&t&&(a=n.find((e=>e.name===t)),i=a?.label,r=a?.description);return{title:i,description:r}}(n,r);return(0,a.jsx)(JE,{settings:I,children:(0,a.jsx)(Wm,{className:"edit-site-page-patterns-dataviews",title:V,subTitle:T,actions:(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:d,children:(0,w.__)("Reset view")}),(0,a.jsx)(RE,{})]}),children:(0,a.jsx)(jE,{paginationInfo:_,fields:y,actions:P,data:S||sP,getItemId:e=>e.name??e.id,isLoading:m,isItemClickable:e=>e.type!==Ie.theme,onClickItem:e=>{i.navigate(`/${e.type}/${[Ie.user,Ce].includes(e.type)?e.id:e.name}?canvas=edit`)},view:o,onChangeView:l,defaultLayouts:iP},r+n)})})}const oP={name:"patterns",path:"/pattern",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme,n=t||jv(e)?"/":void 0;return(0,a.jsx)(Ny,{backPath:n})},content:(0,a.jsx)(aP,{}),mobile({siteData:e,query:t}){const{categoryId:n}=t,s=e.currentTheme?.is_block_theme,i=s||jv(e)?"/":void 0;return n?(0,a.jsx)(aP,{}):(0,a.jsx)(Ny,{backPath:i})}}},lP={name:"pattern-item",path:"/wp_block/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme,n=t||jv(e)?"/":void 0;return(0,a.jsx)(Ny,{backPath:n})},mobile:(0,a.jsx)(_v,{}),preview:(0,a.jsx)(_v,{})}},cP={name:"template-part-item",path:"/wp_template_part/*postId",areas:{sidebar:(0,a.jsx)(Ny,{backPath:"/"}),mobile:(0,a.jsx)(_v,{}),preview:(0,a.jsx)(_v,{})}},{useLocation:uP}=ne(Lt.privateApis),dP=[];function hP({template:e,isActive:t}){const{text:n,icon:s}=qE(e.type,e.id);return(0,a.jsx)(Qa,{to:(0,Qt.addQueryArgs)("/template",{activeView:n}),icon:s,"aria-current":t,children:n})}function pP(){const{query:{activeView:e="active"}}=uP(),{records:t}=(0,j.useEntityRecords)("root","registeredTemplate",{per_page:-1}),n=(0,h.useMemo)((()=>{const e=t?.reduce(((e,t)=>{const n=t.author_text;return n&&!e[n]&&(e[n]=t),e}),{});return(e&&Object.values(e))??dP}),[t]);return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-templates-browse",children:[(0,a.jsx)(Qa,{to:"/template",icon:Da,"aria-current":"active"===e,children:(0,w.__)("Active templates")}),(0,a.jsx)(Qa,{to:(0,Qt.addQueryArgs)("/template",{activeView:"user"}),icon:Da,"aria-current":"user"===e,children:(0,w.__)("Created templates")}),n.map((t=>(0,a.jsx)(hP,{template:t,isActive:e===t.author_text},t.author_text)))]})}function fP({backPath:e}){return(0,a.jsx)(Ua,{title:(0,w.__)("Templates"),description:(0,w.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),backPath:e,content:(0,a.jsx)(pP,{})})}var mP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),gP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),vP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})}),yP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})}),xP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})}),bP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})}),wP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})}),_P=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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"})}),jP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),SP=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),CP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});const kP={},EP=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n};function PP(e,t){return`${e}-${(0,Qt.safeDecodeURI)(t)}`}const IP=()=>(0,c.useSelect)((e=>e(j.store).getEntityRecords("postType",Se,{per_page:-1})),[]),VP=()=>(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_types||[]),[]),TP=()=>{const e=(0,c.useSelect)((e=>e(j.store).getPostTypes({per_page:-1})),[]);return(0,h.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n))).sort(((e,t)=>"post"===e.slug||"post"===t.slug?0:e.name.localeCompare(t.name)))}),[e])};function OP(){const e=TP(),t=(0,h.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=IP(),s=(0,h.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[e]),i=(0,h.useCallback)((({labels:e,slug:t})=>{const n=e.singular_name.toLowerCase();return s[n]>1&&n!==t}),[s]);return(0,h.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=i(e)?(0,w.sprintf)((0,w.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,w.sprintf)((0,w.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,w.sprintf)((0,w.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:"string"==typeof e.icon&&e.icon.startsWith("dashicons-")?e.icon.slice(10):yP,templatePrefix:"archive"}}))||[]),[t,n,i])}const AP=e=>{const t=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getTaxonomies({per_page:-1})),[]);return(0,h.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=IP(),s=VP(),i=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),r=t?.reduce(((e,{labels:t})=>{const n=(t.template_name||t.singular_name).toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),a=MP("taxonomy",i),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=i[l],d=s?.find((({slug:e})=>e===u)),h=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=(e.template_name||e.singular_name).toLowerCase();return r[n]>1&&n!==t})(c,l);let f=c.template_name||c.singular_name;p&&(f=c.template_name?(0,w.sprintf)((0,w._x)("%1$s (%2$s)","taxonomy template menu label"),c.template_name,l):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","taxonomy menu label"),c.singular_name,l));const m=d?{...d,templatePrefix:i[l]}:{slug:u,title:f,description:(0,w.sprintf)((0,w.__)("Displays taxonomy: %s."),c.singular_name),icon:wP,templatePrefix:i[l]},g=a?.[l]?.hasEntities;return g&&(m.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:a[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=PP(i[l],e.slug);return{title:t,slug:t,templatePrefix:i[l]}}},labels:c,hasGeneralTemplate:h,template:t})}),h&&!g||t.push(m),t}),[]);return(0,h.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let s="taxonomiesMenuItems";return["category","tag"].includes(n)&&(s="defaultTaxonomiesMenuItems"),e[s].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},NP={user:"author"},FP={user:{who:"authors"}};const MP=(e,t,n=kP)=>{const s=(0,c.useSelect)((s=>Object.keys(t||{}).reduce(((t,i)=>(t[i]=!!s(j.store).getEntityRecords(e,i,{per_page:1,_fields:"id",context:"view",...n[i]})?.length,t)),{})),[t,e,n]);return(0,h.useMemo)((()=>Object.keys(t||{}).reduce(((e,t)=>(e[t]={hasEntities:s[t]},e)),{})),[t,s])},BP=[];function DP({suggestion:e,search:t,onSelect:n,entityForSuggestions:s}){const i="edit-site-custom-template-modal__suggestions_list__list-item";return(0,a.jsxs)(b.Composite.Item,{render:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,role:"option",className:i,onClick:()=>n(s.config.getSpecificTemplate(e))}),children:[(0,a.jsx)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${i}__title`,children:(0,a.jsx)(b.TextHighlight,{text:(0,qt.decodeEntities)(e.name),highlight:t})}),e.link&&(0,a.jsx)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${i}__info`,children:(0,Qt.safeDecodeURI)(e.link)})]})}function RP(e,t){const{config:n}=e,s=(0,h.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:i,hasResolved:r}=(0,j.useEntityRecords)(e.type,e.slug,s),[a,o]=(0,h.useState)(BP);return(0,h.useEffect)((()=>{if(!r)return;let e=BP;var t,s;i?.length&&(e=i,n.recordNamePath&&(t=e,s=n.recordNamePath,e=(t||[]).map((e=>({...e,name:(0,qt.decodeEntities)(EP(e,s))}))))),o(e)}),[i,r]),a}function LP({entityForSuggestions:e,onSelect:t}){const[n,s,i]=(0,y.useDebouncedInput)(),r=RP(e,i),{labels:o}=e,[l,c]=(0,h.useState)(!1);return!l&&r?.length>9&&c(!0),(0,a.jsxs)(a.Fragment,{children:[l&&(0,a.jsx)(b.SearchControl,{__nextHasNoMarginBottom:!0,onChange:s,value:n,label:o.search_items,placeholder:o.search_items}),!!r?.length&&(0,a.jsx)(b.Composite,{orientation:"vertical",role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,w.__)("Suggestions list"),children:r.map((n=>(0,a.jsx)(DP,{suggestion:n,search:i,onSelect:t,entityForSuggestions:e},n.slug)))}),i&&!r?.length&&(0,a.jsx)(b.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results",children:o.not_found})]})}var zP=function({onSelect:e,entityForSuggestions:t,onBack:n,containerRef:s}){const[i,r]=(0,h.useState)();return(0,h.useEffect)((()=>{if(s.current){const[e]=en.focus.focusable.find(s.current);e?.focus()}}),[i]),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left",children:[!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("Select whether to create a single template for all items or a specific one.")}),(0,a.jsxs)(b.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial",children:[(0,a.jsxs)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{const{slug:n,title:s,description:i,templatePrefix:r}=t.template;e({slug:n,title:s,description:i,templatePrefix:r})},children:[(0,a.jsx)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.all_items}),(0,a.jsx)(b.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,w.__)("For all items")})]}),(0,a.jsxs)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{r(!0)},children:[(0,a.jsx)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.singular_name}),(0,a.jsx)(b.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,w.__)("For a specific item")})]})]}),(0,a.jsx)(b.Flex,{justify:"right",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,w.__)("Back")})})]}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("This template will be used only for the specific item chosen.")}),(0,a.jsx)(LP,{entityForSuggestions:t,onSelect:e}),(0,a.jsx)(b.Flex,{justify:"right",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t.hasGeneralTemplate?n():r(!1)},children:(0,w.__)("Back")})})]})]})};var HP=function(){return HP=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},HP.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function GP(e){return e.toLowerCase()}var WP=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],UP=/[^A-Z0-9]+/gi;function qP(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function ZP(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,s=void 0===n?WP:n,i=t.stripRegexp,r=void 0===i?UP:i,a=t.transform,o=void 0===a?GP:a,l=t.delimiter,c=void 0===l?" ":l,u=qP(qP(e,s,"$1\0$2"),r,"\0"),d=0,h=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(h-1);)h--;return u.slice(d,h).split("\0").map(o).join(c)}(e,HP({delimiter:"."},t))}var YP=function({createTemplate:e,onBack:t}){const[n,s]=(0,h.useState)(""),i=(0,w.__)("Custom Template"),[r,o]=(0,h.useState)(!1),l=(0,h.useRef)();return(0,h.useEffect)((()=>{l.current&&l.current.focus()}),[]),(0,a.jsx)("form",{onSubmit:async function(t){if(t.preventDefault(),!r){o(!0);try{await e({slug:(s=n||i,void 0===a&&(a={}),ZP(s,HP({delimiter:"-"},a))||"wp-custom-template"),title:n||i},!1)}finally{o(!1)}var s,a}},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:6,children:[(0,a.jsx)(b.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Name"),value:n,onChange:s,placeholder:i,disabled:r,ref:l,help:(0,w.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,a.jsxs)(b.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Back")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,children:(0,w.__)("Create")})]})]})})};const{useHistory:KP}=ne(Lt.privateApis),XP=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],QP={"front-page":mP,home:gP,single:vP,page:Ba,archive:yP,search:Yt,404:xP,index:bP,category:Hw,author:UE,taxonomy:wP,date:_P,tag:jP,attachment:SP};function JP({title:e,direction:t,className:n,description:s,icon:i,onClick:r,children:o}){return(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:n,onClick:r,label:s,showTooltip:!!s,children:(0,a.jsxs)(b.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t,children:[(0,a.jsx)("div",{className:"edit-site-add-new-template__template-icon",children:(0,a.jsx)(b.Icon,{icon:i})}),(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0,children:[(0,a.jsx)(b.__experimentalText,{align:"center",weight:500,lineHeight:1.53846153846,children:e}),o]})]})})}const $P=1,eI=2,tI=3;function nI({onClose:e}){const[t,n]=(0,h.useState)($P),[s,i]=(0,h.useState)({}),[r,o]=(0,h.useState)(!1),l=function(e,t){const n=(VP()||[]).filter((e=>XP.includes(e.slug))),s=n=>{t?.(),e(n)},i=[...n],{defaultTaxonomiesMenuItems:r,taxonomiesMenuItems:a}=AP(s),{defaultPostTypesMenuItems:o,postTypesMenuItems:l}=(e=>{const t=TP(),n=VP(),s=(0,h.useMemo)((()=>t?.reduce(((e,{labels:t})=>{const n=(t.template_name||t.singular_name).toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[t]),i=(0,h.useCallback)((({labels:e,slug:t})=>{const n=(e.template_name||e.singular_name).toLowerCase();return s[n]>1&&n!==t}),[s]),r=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),a=MP("postType",r),o=(t||[]).reduce(((t,s)=>{const{slug:o,labels:l,icon:c}=s,u=r[o],d=n?.find((({slug:e})=>e===u)),h=i(s);let p=l.template_name||(0,w.sprintf)((0,w.__)("Single item: %s"),l.singular_name);h&&(p=l.template_name?(0,w.sprintf)((0,w._x)("%1$s (%2$s)","post type menu label"),l.template_name,o):(0,w.sprintf)((0,w._x)("Single item: %1$s (%2$s)","post type menu label"),l.singular_name,o));const f=d?{...d,templatePrefix:r[o]}:{slug:u,title:p,description:(0,w.sprintf)((0,w.__)("Displays a single item: %s."),l.singular_name),icon:"string"==typeof c&&c.startsWith("dashicons-")?c.slice(10):CP,templatePrefix:r[o]},m=a?.[o]?.hasEntities;return m&&(f.onClick=t=>{e({type:"postType",slug:o,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:a[o].existingEntitiesIds}),getSpecificTemplate:e=>{const t=PP(r[o],e.slug);return{title:t,slug:t,templatePrefix:r[o]}}},labels:l,template:t})}),m&&t.push(f),t}),[]),l=(0,h.useMemo)((()=>o.reduce(((e,t)=>{const{slug:n}=t;let s="postTypesMenuItems";return"page"===n&&(s="defaultPostTypesMenuItems"),e[s].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[o]);return l})(s),c=function(e){const t=IP(),n=VP(),s=MP("root",NP,FP);let i=n?.find((({slug:e})=>"author"===e));i||(i={description:(0,w.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const r=!!t?.find((({slug:e})=>"author"===e));if(s.user?.hasEntities&&(i={...i,templatePrefix:"author"},i.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:s.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=PP("author",e.slug);return{title:(0,w.sprintf)((0,w.__)("Author: %s"),e.name),slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,w.__)("Author"),search_items:(0,w.__)("Search Authors"),not_found:(0,w.__)("No authors found."),all_items:(0,w.__)("All Authors")},hasGeneralTemplate:r,template:t})}),!r||s.user?.hasEntities)return i}(s);[...r,...o,c].forEach((e=>{if(!e)return;const t=i.findIndex((t=>t.slug===e.slug));t>-1?i[t]=e:i.push(e)})),i?.sort(((e,t)=>XP.indexOf(e.slug)-XP.indexOf(t.slug)));const u=[...i,...OP(),...l,...a];return u}(i,(()=>n(eI))),u=KP(),{saveEntityRecord:d}=(0,c.useDispatch)(j.store),{createErrorNotice:p,createSuccessNotice:f}=(0,c.useDispatch)(_.store),m=(0,h.useRef)(null),g=(0,y.useViewportMatch)("medium","<"),v=(0,c.useSelect)((e=>e(j.store).getEntityRecord("root","__unstableBase")?.home),[]),x={"front-page":v,date:(0,w.sprintf)((0,w.__)("E.g. %s"),v+"/"+(new Date).getFullYear())};async function S(e,t=!0){if(!r){o(!0);try{const{title:n,description:s,slug:i}=e,r=await d("postType",Se,{description:s,slug:i.toString(),status:"publish",title:n,meta:{is_wp_suggestion:t}},{throwOnError:!0});u.navigate(`/${Se}/${r.id}?canvas=edit`),f((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(r.title?.rendered||n)||(0,w.__)("(no title)")),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while creating the template.");p(t,{type:"snackbar"})}finally{o(!1)}}}(0,h.useEffect)((()=>{if(m.current&&t===$P){const[e]=en.focus.focusable.find(m.current);e?.focus()}}),[t]);let C=(0,w.__)("Add template");return t===eI?C=(0,w.sprintf)((0,w.__)("Add template: %s"),s.labels.singular_name):t===tI&&(C=(0,w.__)("Create custom template")),(0,a.jsxs)(b.Modal,{title:C,className:Ht("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===$P,"edit-site-custom-template-modal":t===eI}),onRequestClose:()=>{e(),n($P)},overlayClassName:t===tI?"edit-site-custom-generic-template__modal":void 0,ref:m,children:[t===$P&&(0,a.jsxs)(b.__experimentalGrid,{columns:g?2:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents",children:[(0,a.jsx)(b.Flex,{className:"edit-site-add-new-template__template-list__prompt",children:(0,w.__)("Select what the new template should apply to:")}),l.map((e=>{const{title:t,slug:n,onClick:s}=e;return(0,a.jsx)(JP,{title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:x[n],icon:QP[n]||Da,onClick:()=>s?s(e):S(e)},n)})),(0,a.jsx)(JP,{title:(0,w.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:LE,onClick:()=>n(tI),children:(0,a.jsx)(b.__experimentalText,{lineHeight:1.53846153846,children:(0,w.__)("A custom template can be manually applied to any post or page.")})})]}),t===eI&&(0,a.jsx)(zP,{onSelect:S,entityForSuggestions:s,onBack:()=>n($P),containerRef:m}),t===tI&&(0,a.jsx)(YP,{createTemplate:S,onBack:()=>n($P)})]})}var sI=(0,h.memo)((function(){const[e,t]=(0,h.useState)(!1),{postType:n}=(0,c.useSelect)((e=>{const{getPostType:t}=e(j.store);return{postType:t(Se)}}),[]);return n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>t(!0),label:n.labels.add_new_item,__next40pxDefaultSize:!0,children:n.labels.add_new_item}),e&&(0,a.jsx)(nI,{onClose:()=>t(!1)})]}):null}));const{useGlobalStyle:iI}=ne(x.privateApis),{Badge:rI}=ne(b.privateApis),{useEntityRecordsWithPermissions:aI}=ne(j.privateApis);function oI(){const e=VP(),{records:t}=aI("root","registeredTemplate");return[...e,...t?.filter((e=>!e.is_custom)).map((e=>({slug:e.slug,title:e.title.rendered,description:e.description})))]}const lI={label:(0,w.__)("Preview"),id:"preview",render:function({item:e}){const t=CE(),[n="white"]=iI("color.background"),s=(0,h.useMemo)((()=>(0,o.parse)(e.content.raw)),[e.content.raw]),i=!s?.length;return(0,a.jsx)(f.EditorProvider,{post:e,settings:t,children:(0,a.jsxs)("div",{className:"page-templates-preview-field",style:{backgroundColor:n},children:[i&&(0,w.__)("Empty template"),!i&&(0,a.jsx)(x.BlockPreview.Async,{children:(0,a.jsx)(x.BlockPreview,{blocks:s})})]})})},enableSorting:!1},cI={label:(0,w.__)("Description"),id:"description",render:function({item:e}){const t=oI().find((t=>t.slug===e.slug));return e.description?(0,qt.decodeEntities)(e.description):t?.description},enableSorting:!1,enableGlobalSearch:!0};const uI={label:(0,w.__)("Author"),id:"author",getValue:({item:e})=>e.author_text??e.author,render:function({item:e}){const[t,n]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:r}=qE(e.type,e.id);return(0,a.jsxs)(b.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,a.jsx)("div",{className:Ht("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,a.jsx)("img",{onLoad:()=>n(!0),alt:"",src:r})}),!r&&(0,a.jsx)("div",{className:"page-templates-author-field__icon",children:(0,a.jsx)(b.Icon,{icon:i})}),(0,a.jsx)("span",{className:"page-templates-author-field__name",children:s})]})}},dI={label:(0,w.__)("Status"),id:"active",type:"boolean",getValue:({item:e})=>e._isActive,render:function({item:e}){const t=e._isCustom?(0,w.__)("Active when used"):(0,w.__)("Active"),n=e._isCustom?"info":"success",s=e._isActive;return(0,a.jsx)(rI,{intent:s?n:"default",children:s?t:(0,w.__)("Inactive")})}},hI={label:(0,w.__)("Template Type"),id:"slug",getValue:({item:e})=>e.slug,render:function({item:e}){const t=oI().find((t=>t.slug===e.slug));return t?.title||(0,w._x)("Custom","template type")}},pI={table:{showMedia:!1},grid:{showMedia:!0},list:{showMedia:!1}},fI={type:"grid",perPage:20,sort:{field:"title",direction:"asc"},titleField:"title",descriptionField:"description",mediaField:"preview",fields:["author","active","slug","theme"],filters:[],...pI.grid};function mI(e){return{...fI,filters:["active","user"].includes(e)?[]:[{field:"author",operator:"isAny",value:[e]}]}}const{usePostActions:gI,templateTitleField:vI}=ne(f.privateApis),{useHistory:yI,useLocation:xI}=ne(Lt.privateApis),{useEntityRecordsWithPermissions:bI}=ne(j.privateApis);function wI(){const{path:e,query:t}=xI(),{activeView:n="active",postId:s}=t,[i,r]=(0,h.useState)([s]),[o,l]=(0,h.useState)(!1),u=(0,h.useMemo)((()=>mI(n)),[n]),{view:d,updateView:p,isModified:f,resetToDefault:m}=(0,SE.useView)({kind:"postType",name:Se,slug:n,defaultView:u,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:n=>{O.navigate((0,Qt.addQueryArgs)(e,{...t,pageNumber:n.page,search:n.search||void 0}))}}),{activeTemplatesOption:g,activeTheme:v,defaultTemplateTypes:x}=(0,c.useSelect)((e=>{const{getEntityRecord:t,getCurrentTheme:n}=e(j.store);return{activeTemplatesOption:t("root","site")?.active_templates,activeTheme:n(),defaultTemplateTypes:e(j.store).getCurrentTheme()?.default_template_types}})),{records:S,isResolving:C}=bI("postType",Se,{per_page:-1,combinedTemplates:!1}),{records:k,isResolving:E}=bI("root","registeredTemplate",{per_page:-1}),P=(0,h.useMemo)((()=>{const e=[...k];if(g)for(const t in g){const n=g[t],s=S.find((e=>e.id===n&&e.theme===v.stylesheet));if(s){const t=e.findIndex((({slug:e})=>e===s.slug));-1!==t?e[t]=s:e.push(s)}}return e}),[S,k,g,v]);let I;I="active"===n?C||E:"user"===n?C:E;const V=(0,h.useMemo)((()=>{function e(e){return e.is_custom??(!e.meta?.is_wp_suggestion&&!x.some((t=>t.slug===e.slug)))}let t;return t="active"===n?P.filter((t=>!e(t))):"user"===n?S:k,t.map((t=>({...t,_isActive:P.some((e=>e.id===t.id)),_isCustom:e(t)})))}),[P,x,S,k,n]),T=(0,c.useSelect)((e=>{const{getUser:t}=e(j.store);return V.reduce(((e,n)=>(n.author_text?e[n.author_text]||(e[n.author_text]=n.author_text):n.author&&(e[n.author]||(e[n.author]=t(n.author))),e)),{})}),[V]),O=yI(),A=(0,h.useCallback)((t=>{r(t),"list"===d?.type&&O.navigate((0,Qt.addQueryArgs)(e,{postId:1===t.length?t[0]:void 0}))}),[O,e,d?.type]),N=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()));return(0,h.useMemo)((()=>({label:(0,w.__)("Compatible Theme"),id:"theme",getValue:({item:e})=>e.theme,render:function({item:t}){return t.theme===e.stylesheet?(0,a.jsx)(rI,{intent:"success",children:t.theme}):(0,a.jsx)(rI,{intent:"error",children:t.theme})}})),[e])})(),F=(0,h.useMemo)((()=>{const e=[lI,vI,cI,dI,hI];"user"===n&&e.push(N);const t=[];for(const e in T)t.push({value:T[e]?.id??e,label:T[e]?.name??e});return e.push({...uI,elements:t}),e}),[T,n,N]),{data:M,paginationInfo:B}=(0,h.useMemo)((()=>Dw(V,d,F)),[V,d,F]),{createSuccessNotice:D}=(0,c.useDispatch)(_.store),R=(0,h.useCallback)(((e,t)=>{if("duplicate-post"===e){const e=t[0],n="string"==typeof e.title?e.title:e.title?.rendered;D((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(n)||(0,w.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,w.__)("Edit"),onClick:()=>{O.navigate(`/${e.type}/${e.id}?canvas=edit`)}}]})}}),[O,D]),L=gI({postType:Se,context:"list",onActionPerformed:R}),z=HE(),H=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getCurrentTheme())),{getEntityRecord:t}=(0,c.useSelect)(j.store),{editEntityRecord:n,saveEditedEntityRecord:s}=(0,c.useDispatch)(j.store);return(0,h.useMemo)((()=>({id:"set-active-template",label:e=>e.some((e=>e._isActive))?(0,w.__)("Deactivate"):(0,w.__)("Activate"),isPrimary:!0,icon:LE,isEligible:t=>t.theme===e.stylesheet&&("number"==typeof t.id||!1===t._isActive),async callback(e){const i=e.some((e=>e._isActive)),r={...await t("root","site").active_templates??{}};for(const t of e)i?delete r[t.slug]:r[t.slug]=t.id;await n("root","site",void 0,{active_templates:r}),await s("root","site")}})),[n,s,t,e])})(),G=(0,h.useMemo)((()=>"user"===n?[H,z,...L]:[H,...L]),[L,H,z,n]),W=(0,y.useEvent)((e=>{e.type!==d.type&&O.invalidate(),p(e)})),U=G.find((e=>"duplicate-post"===e.id));return(0,a.jsxs)(Wm,{className:"edit-site-page-templates",title:(0,w.__)("Templates"),actions:(0,a.jsxs)(a.Fragment,{children:[f&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{m(),O.invalidate()},children:(0,w.__)("Reset view")}),(0,a.jsx)(sI,{})]}),children:[(0,a.jsx)(jE,{paginationInfo:B,fields:F,actions:G,data:M,isLoading:I,view:d,onChangeView:W,onChangeSelection:A,isItemClickable:()=>!0,onClickItem:e=>{"string"==typeof e.id?l(e):O.navigate(`/${e.type}/${e.id}?canvas=edit`)},selection:i,defaultLayouts:pI},n),o&&U&&(0,a.jsx)(b.Modal,{title:(0,w.__)("Duplicate"),onRequestClose:()=>l(),size:"small",children:(0,a.jsx)(U.RenderModal,{items:[o],closeModal:()=>l(),onActionPerformed:([e])=>{O.navigate(`/${e.type}/${e.id}?canvas=edit`)}})})]})}async function _I(e){const{activeView:t="active"}=e;return"list"===(await(0,SE.loadView)({kind:"postType",name:"wp_template",slug:t,defaultView:mI(t)})).type}const jI={name:"templates",path:"/template",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(fP,{backPath:"/"}):(0,a.jsx)(uo,{})},content({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wI,{}):void 0},async preview({query:e,siteData:t}){const n=t.currentTheme?.is_block_theme;if(!n)return;return await _I(e)?(0,a.jsx)(_v,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(wI,{}):(0,a.jsx)(uo,{})}},widths:{content:async({query:e})=>await _I(e)?380:void 0}},SI={name:"template-item",path:"/wp_template/*postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(fP,{backPath:"/"}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})}}},{useLocation:CI}=ne(Lt.privateApis);function kI({title:e,slug:t,type:n,icon:s,isActive:i,suffix:r}){const{path:o}=CI(),l=s||H_.find((e=>e.type===n)).icon;return"all"===t&&(t=void 0),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",className:Ht("edit-site-sidebar-dataviews-dataview-item",{"is-selected":i}),children:[(0,a.jsx)(Qa,{icon:l,to:(0,Qt.addQueryArgs)(o,{activeView:t}),"aria-current":i?"true":void 0,children:e}),r]})}var EI=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,a.jsx)(Zt.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,a.jsx)(Zt.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]}),PI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})}),II=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),VI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),TI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),OI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),AI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});const NI={table:{},grid:{},list:{}},FI={type:"list",filters:[],perPage:20,sort:{field:"title",direction:"asc"},showLevels:!0,titleField:"title",mediaField:"featured_media",fields:["author","status"],...NI.list};function MI(e){return[{title:e?.labels?.all_items||(0,w.__)("All items"),slug:"all",icon:EI,view:FI},{title:(0,w.__)("Published"),slug:"published",icon:PI,view:{...FI,filters:[{field:"status",operator:De,value:"publish",isLocked:!0}]}},{title:(0,w.__)("Scheduled"),slug:"future",icon:II,view:{...FI,filters:[{field:"status",operator:De,value:"future",isLocked:!0}]}},{title:(0,w.__)("Drafts"),slug:"drafts",icon:VI,view:{...FI,filters:[{field:"status",operator:De,value:"draft",isLocked:!0}]}},{title:(0,w.__)("Pending"),slug:"pending",icon:TI,view:{...FI,filters:[{field:"status",operator:De,value:"pending",isLocked:!0}]}},{title:(0,w.__)("Private"),slug:"private",icon:OI,view:{...FI,filters:[{field:"status",operator:De,value:"private",isLocked:!0}]}},{title:(0,w.__)("Trash"),slug:"trash",icon:AI,view:{...FI,type:"table",layout:NI.table.layout,filters:[{field:"status",operator:De,value:"trash",isLocked:!0}]}}]}const BI=(e,t)=>MI(e).find((({slug:e})=>e===t))?.view,{useLocation:DI}=ne(Lt.privateApis);function RI({postType:e}){const{query:{activeView:t="all"}}=DI(),n=(0,c.useSelect)((t=>{const{getPostType:n}=t(j.store);return n(e)}),[e]),s=(0,h.useMemo)((()=>MI(n)),[n]);return e?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-dataviews",children:s.map((e=>(0,a.jsx)(kI,{slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:e.slug===t},e.slug)))})}):null}var LI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});function zI({postType:e,onSave:t,onClose:n}){const s=(0,c.useSelect)((t=>t(j.store).getPostType(e)?.labels),[e]),[i,r]=(0,h.useState)(!1),[l,u]=(0,h.useState)(""),{saveEntityRecord:d}=(0,c.useDispatch)(j.store),{createErrorNotice:p,createSuccessNotice:f}=(0,c.useDispatch)(_.store),{resolveSelect:m}=(0,c.useRegistry)();return(0,a.jsx)(b.Modal,{title:(0,w.sprintf)((0,w.__)("Draft new: %s"),s?.singular_name),onRequestClose:n,focusOnMount:"firstContentElement",size:"small",children:(0,a.jsx)("form",{onSubmit:async function(n){if(n.preventDefault(),!i){r(!0);try{const n=await m(j.store).getPostType(e),s=await d("postType",e,{status:"draft",title:l,slug:l??void 0,content:n.template&&n.template.length?(0,o.serialize)((0,o.synchronizeBlocksWithTemplate)([],n.template)):void 0},{throwOnError:!0});t(s),f((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(s.title?.rendered||l)||(0,w.__)("(no title)")),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while creating the item.");p(t,{type:"snackbar"})}finally{r(!1)}}},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Title"),onChange:u,placeholder:(0,w.__)("No title"),value:l}),(0,a.jsxs)(b.__experimentalHStack,{spacing:2,justify:"end",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,w.__)("Create draft")})]})]})})})}const{usePostActions:HI,usePostFields:GI}=ne(f.privateApis),{useLocation:WI,useHistory:UI}=ne(Lt.privateApis),{useEntityRecordsWithPermissions:qI}=ne(j.privateApis),ZI=[];function YI(e){return e.id.toString()}function KI(e){return e.level}function XI({postType:e}){const{path:t,query:n}=WI(),{activeView:s="all",postId:i,quickEdit:r=!1}=n,o=UI(),l=(0,c.useSelect)((t=>{const{getPostType:n}=t(j.store);return n(e)}),[e]),{view:u,updateView:d,isModified:p,resetToDefault:f}=(0,SE.useView)({kind:"postType",name:e,slug:s,queryParams:{page:n.pageNumber,search:n.search},onChangeQueryParams:e=>{o.navigate((0,Qt.addQueryArgs)(t,{...n,pageNumber:e.page,search:e.search||void 0}))},defaultView:BI(l,s)}),m=(0,y.useEvent)((e=>{e.type!==u.type&&o.invalidate(),d(e)})),[g,v]=(0,h.useState)(i?.split(",")??[]),x=(0,h.useCallback)((e=>{v(e),o.navigate((0,Qt.addQueryArgs)(t,{postId:e.join(",")}))}),[t,o]),_=GI({postType:e}),S=(0,h.useMemo)((()=>{const e={};return u.filters?.forEach((t=>{"status"===t.field&&t.operator===De&&(e.status=t.value),"author"===t.field&&t.operator===De?e.author=t.value:"author"===t.field&&"isNone"===t.operator&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status="draft,future,pending,private,publish"),{per_page:u.perPage,page:u.page,_embed:"author,wp:featuredmedia",order:u.sort?.direction,orderby:u.sort?.field,orderby_hierarchy:!!u.showLevels,search:u.search,...e}}),[u]),{records:C,isResolving:k,totalItems:E,totalPages:P}=qI("postType",e,S),I=(0,h.useMemo)((()=>"author"===u?.sort?.field?Dw(C,{sort:{...u.sort}},_).data:C),[C,_,u?.sort]),V=I?.map((e=>YI(e)))??[],T=((0,y.usePrevious)(V)??[]).filter((e=>!V.includes(e))).includes(i);(0,h.useEffect)((()=>{T&&o.navigate((0,Qt.addQueryArgs)(t,{postId:void 0}))}),[o,T,t]);const O=(0,h.useMemo)((()=>({totalItems:E,totalPages:P})),[E,P]),{labels:A,canCreateRecord:N}=(0,c.useSelect)((t=>{const{getPostType:n,canUser:s}=t(j.store);return{labels:n(e)?.labels,canCreateRecord:s("create",{kind:"postType",name:e})}}),[e]),F=HI({postType:e,context:"list"}),M=HE(),B=(0,h.useMemo)((()=>[M,...F]),[F,M]),[D,R]=(0,h.useState)(!1),L=()=>R(!1);return(0,a.jsx)(Wm,{title:A?.name,actions:(0,a.jsxs)(a.Fragment,{children:[p&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{f(),o.invalidate()},children:(0,w.__)("Reset view")}),A?.add_new_item&&N&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>R(!0),__next40pxDefaultSize:!0,children:A.add_new_item}),D&&(0,a.jsx)(zI,{postType:e,onSave:({type:e,id:t})=>{o.navigate(`/${e}/${t}?canvas=edit`),L()},onClose:L})]})]}),children:(0,a.jsx)(jE,{paginationInfo:O,fields:_,actions:B,data:I||ZI,isLoading:k,view:u,onChangeView:m,selection:g,onChangeSelection:x,isItemClickable:e=>"trash"!==e.status,onClickItem:({id:t})=>{o.navigate(`/${e}/${t}?canvas=edit`)},getItemId:YI,getItemLevel:KI,defaultLayouts:NI,header:window.__experimentalQuickEditDataViews&&"list"!==u.type&&"page"===e&&(0,a.jsx)(b.Button,{size:"compact",isPressed:r,icon:LI,label:(0,w.__)("Details"),onClick:()=>{o.navigate((0,Qt.addQueryArgs)(t,{quickEdit:!r||void 0}))}})},s)})}const QI=(0,h.createContext)({fields:[]});function JI({fields:e,children:t}){return(0,a.jsx)(QI.Provider,{value:{fields:e},children:t})}QI.displayName="DataFormContext";var $I=QI;function eV(e){return void 0!==e.children}const tV={type:"regular",labelPosition:"top"};function nV(e){let t=tV;if("regular"===e?.type)t={type:"regular",labelPosition:e?.labelPosition??"top"};else if("panel"===e?.type){const n=e.summary??[],s=Array.isArray(n)?n:[n];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:s}}else if("card"===e?.type)if(!1===e.withHeader)t={type:"card",withHeader:!1,isOpened:!0,summary:[]};else{const s=e.summary??[];t={type:"card",withHeader:!0,isOpened:"boolean"!=typeof e.isOpened||e.isOpened,summary:(n=s,"string"==typeof n?[{id:n,visibility:"when-collapsed"}]:n.map((e=>"string"==typeof e?{id:e,visibility:"when-collapsed"}:{id:e.id,visibility:e.visibility})))}}else"row"===e?.type&&(t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}});var n;return t}function sV(e){const t=nV(e?.layout);return(e.fields??[]).map((e=>{if("string"==typeof e)return{id:e,layout:t};const n=e.layout?nV(e.layout):t;return{...e,layout:n}}))}function iV({title:e}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-regular__header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{})]})})}var rV=function({summaryFields:e,data:t,labelPosition:n,fieldLabel:s,disabled:i,onClick:r,"aria-expanded":o}){return(0,a.jsx)(b.Button,{className:"dataforms-layouts-panel__summary-button",size:"compact",variant:["none","top"].includes(n)?"link":"tertiary","aria-expanded":o,"aria-label":(0,w.sprintf)((0,w._x)("Edit %s","field"),s||""),onClick:r,disabled:i,accessibleWhenDisabled:!0,style:e.length>1?{minHeight:"auto",height:"auto",alignItems:"flex-start"}:void 0,children:e.length>1?(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:e.map((e=>(0,a.jsx)("div",{style:{width:"100%"},children:(0,a.jsx)(e.render,{item:t,field:e})},e.id)))}):e.map((e=>(0,a.jsx)(e.render,{item:t,field:e},e.id)))})};function aV({title:e,onClose:t}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[e&&(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{}),t&&(0,a.jsx)(b.Button,{label:(0,w.__)("Close"),icon:Ea,onClick:t,size:"small"})]})})}var oV=function({data:e,field:t,onChange:n,validity:s,labelPosition:i="side",summaryFields:r,fieldDefinition:o,popoverAnchor:l}){const c=eV(t)?t.label:o?.label,u=(0,h.useMemo)((()=>({layout:tV,fields:eV(t)?t.children:[{id:t.id}]})),[t]),d=(0,h.useMemo)((()=>{if(void 0!==s)return eV(t)?s?.children:{[t.id]:s}}),[s,t]),p=(0,h.useMemo)((()=>({anchor:l,placement:"left-start",offset:36,shift:!0})),[l]);return(0,a.jsx)(b.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:p,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:t,onToggle:n})=>(0,a.jsx)(rV,{summaryFields:r,data:e,labelPosition:i,fieldLabel:c,disabled:!0===o.readOnly,onClick:n,"aria-expanded":t}),renderContent:({onClose:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(aV,{title:c,onClose:t}),(0,a.jsx)(SV,{data:e,form:u,onChange:n,validity:d,children:(t,s,i)=>(0,a.jsx)(t,{data:e,field:s,onChange:n,hideLabelFromVision:(u?.fields??[]).length<2,validity:i},s.id)})]})})},lV=i(66),cV=i.n(lV);const uV=e=>[void 0,"",null].includes(e);function dV(e,t){return!!(void 0===e&&uV(t)||"text"===e&&uV(t)||"email"===e&&uV(t)||"url"===e&&uV(t)||"telephone"===e&&uV(t)||"password"===e&&uV(t)||"integer"===e&&uV(t)||"number"===e&&uV(t)||"array"===e&&(e=>!Array.isArray(e)||0===e.length||e.every((e=>uV(e))))(t)||"boolean"===e&&!0!==t)}function hV(e){return!e||Object.values(e).every((e=>Object.entries(e).every((([e,t])=>"children"===e&&t&&"object"==typeof t?hV(t):"valid"===t.type))))}function pV(e,t,n,s){e(t?e=>({...e,[t]:{...e?.[t],children:{...e?.[t]?.children,[n]:{...s}}}}):e=>({...e,[n]:{...s}}))}var fV=function(e,t,n){const[s,i]=(0,h.useState)(),r=(0,h.useRef)({}),a=(0,h.useRef)({}),o=(0,h.useRef)({}),l=(0,h.useCallback)((()=>{const{fields:s,fieldToParent:l}=function(e,t){const n=sV(t);if(0===n.length)return{fields:[],fieldToParent:new Map};const s=new Map,i=[];return n.forEach((e=>{e.children?e.children.forEach((t=>{const n="string"==typeof t?t:t.id;i.push(n),s.set(n,e.id)})):i.push(e.id)})),{fields:Nw(e.filter((e=>i.includes(e.id)))),fieldToParent:s}}(t,n);0!==s.length?s.forEach((t=>{const n=t.getValue({item:e});if(r.current.hasOwnProperty(t.id)&&n===r.current[t.id])return;r.current[t.id]=n;const s=l.get(t.id);if(t.isValid.required&&dV(t.type,n))return void pV(i,s,t.id,{required:{type:"invalid"}});if(t.isValid.elements&&t.hasElements&&!t.getElements&&Array.isArray(t.elements)){const e=t.elements.map((e=>e.value));if("array"!==t.type&&!e.includes(n))return void pV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}});if("array"===t.type&&!Array.isArray(n))return void pV(i,s,t.id,{elements:{type:"invalid",message:"Value must be an array."}});if("array"===t.type&&n.some((t=>!e.includes(t))))return void pV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}})}if(t.isValid.elements&&t.hasElements&&"function"==typeof t.getElements){const e=(o.current[t.id]||0)+1;o.current[t.id]=e,pV(i,s,t.id,{elements:{type:"validating",message:"Validating..."}}),t.getElements().then((r=>{if(o.current[t.id]!==e)return;if(!Array.isArray(r))return void pV(i,s,t.id,{elements:{type:"invalid",message:"Could not validate elements."}});const a=r.map((e=>e.value));"array"===t.type||a.includes(n)?"array"!==t.type||Array.isArray(n)?"array"===t.type&&n.some((e=>!a.includes(e)))&&pV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}}):pV(i,s,t.id,{elements:{type:"invalid",message:"Value must be an array."}}):pV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}})})).catch((n=>{o.current[t.id]===e&&pV(i,s,t.id,{elements:{type:"invalid",message:n.message}})}))}let c;try{c=t.isValid?.custom?.(cV()(e,t.setValue({item:e,value:n})),t)}catch(e){let n;n=e instanceof Error?e.message:String(e)||(0,w.__)("Unknown error when running custom validation."),pV(i,s,t.id,{custom:{type:"invalid",message:n}})}if("string"!=typeof c){if(c instanceof Promise){const e=(a.current[t.id]||0)+1;return a.current[t.id]=e,pV(i,s,t.id,{custom:{type:"validating",message:"Validating..."}}),void c.then((n=>{a.current[t.id]===e&&(null!==n?"string"==typeof n&&pV(i,s,t.id,{custom:{type:"invalid",message:n}}):pV(i,s,t.id,{custom:{type:"valid",message:"Valid"}}))})).catch((n=>{a.current[t.id]===e&&pV(i,s,t.id,{custom:{type:"invalid",message:n.message}})}))}i((e=>{if(!e)return e;if(s){const n=e[s];if(!n?.children)return e;const{[t.id]:i,...r}=n.children;if(0===Object.keys(r).length){const{children:t,...i}=n;if(0===Object.keys(i).length){const{[s]:t,...n}=e;return 0===Object.keys(n).length?void 0:n}return{...e,[s]:i}}return{...e,[s]:{...n,children:r}}}if(!e[t.id])return e;const{[t.id]:n,...i}=e;return 0!==Object.keys(i).length?i:void 0}))}else pV(i,s,t.id,{custom:{type:"invalid",message:c}})})):i(void 0)}),[e,t,n]);return(0,h.useEffect)((()=>{l()}),[l]),{validity:s,isValid:hV(s)}};function mV({data:e,field:t,onChange:n,fieldLabel:s,onClose:i}){const{fields:r}=(0,h.useContext)($I),[o,l]=(0,h.useState)({}),c=(0,h.useMemo)((()=>cV()(e,o)),[e,o]),u=(0,h.useMemo)((()=>({layout:tV,fields:eV(t)?t.children:[{id:t.id}]})),[t]),{validity:d}=fV(c,r,u),p=e=>{l((t=>cV()(t,e)))};return(0,a.jsxs)(b.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:i,isFullScreen:!1,title:s,size:"medium",children:[(0,a.jsx)(SV,{data:c,form:u,onChange:p,validity:d,children:(e,t,n)=>(0,a.jsx)(e,{data:c,field:t,onChange:p,hideLabelFromVision:(u?.fields??[]).length<2,validity:n},t.id)}),(0,a.jsxs)(b.__experimentalHStack,{className:"dataforms-layouts-panel__modal-footer",spacing:3,children:[(0,a.jsx)(b.__experimentalSpacer,{}),(0,a.jsx)(b.Button,{variant:"tertiary",onClick:i,__next40pxDefaultSize:!0,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>{n(o),i()},__next40pxDefaultSize:!0,children:(0,w.__)("Apply")})]})]})}var gV=function({data:e,field:t,onChange:n,labelPosition:s,summaryFields:i,fieldDefinition:r}){const[o,l]=(0,h.useState)(!1),c=eV(t)?t.label:r?.label;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(rV,{summaryFields:i,data:e,labelPosition:s,fieldLabel:c,disabled:!0===r.readOnly,onClick:()=>l(!0),"aria-expanded":o}),o&&(0,a.jsx)(mV,{data:e,field:t,onChange:n,fieldLabel:c??"",onClose:()=>l(!1)})]})};const vV=(e,t)=>{if(Array.isArray(e)&&e.length>0){return(n=e,Array.isArray(n)?n.map((e=>"string"==typeof e?e:e.id)):[]).map((e=>t.find((t=>t.id===e)))).filter((e=>void 0!==e))}var n;return[]},yV=(e,t,n)=>{const s=vV(e.summary,n),i=((e,t)=>{const n=t.find((t=>t.id===e.id));return n||t.find((t=>{if(eV(e)){const n=e.children.filter((e=>"string"==typeof e||!eV(e)));if(0===n.length)return!1;const s="string"==typeof n[0]?n[0]:n[0].id;return t.id===s}return t.id===e.id}))})(t,n);return 0===s.length?{summaryFields:i?[i]:[],fieldDefinition:i}:{summaryFields:s,fieldDefinition:i}};function xV({title:e}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-row__header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{})]})})}const bV=({children:e})=>(0,a.jsx)(a.Fragment,{children:e});const wV=[{type:"regular",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)($I),o=(0,h.useMemo)((()=>({layout:tV,fields:eV(t)?t.children:[]})),[t]);if(eV(t))return(0,a.jsxs)(a.Fragment,{children:[!s&&t.label&&(0,a.jsx)(iV,{title:t.label}),(0,a.jsx)(SV,{data:e,form:o,onChange:n,validity:i?.children})]});const l=nV({...t.layout,type:"regular"}).labelPosition,c=r.find((e=>e.id===t.id));return c&&c.Edit?"side"===l?(0,a.jsxs)(b.__experimentalHStack,{className:"dataforms-layouts-regular__field",children:[(0,a.jsx)("div",{className:Ht("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${l}`),children:c.label}),(0,a.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:!0===c.readOnly?(0,a.jsx)(c.render,{item:e,field:c}):(0,a.jsx)(c.Edit,{data:e,field:c,onChange:n,hideLabelFromVision:!0,validity:i},c.id)})]}):(0,a.jsx)("div",{className:"dataforms-layouts-regular__field",children:!0===c.readOnly?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(a.Fragment,{children:[!s&&"none"!==l&&(0,a.jsx)(b.BaseControl.VisualLabel,{children:c.label}),(0,a.jsx)(c.render,{item:e,field:c})]})}):(0,a.jsx)(c.Edit,{data:e,field:c,onChange:n,hideLabelFromVision:"none"===l||s,validity:i})}):null},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e})},{type:"panel",component:function({data:e,field:t,onChange:n,validity:s}){const{fields:i}=(0,h.useContext)($I),r=nV({...t.layout,type:"panel"}),[o,l]=(0,h.useState)(null),{fieldDefinition:c,summaryFields:u}=yV(r,t,i);if(!c)return null;const d=r.labelPosition,p=Ht("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${d}`),f=eV(t)?t.label:c?.label,m="modal"===r.openAs?(0,a.jsx)(gV,{data:e,field:t,onChange:n,labelPosition:d,summaryFields:u,fieldDefinition:c}):(0,a.jsx)(oV,{data:e,field:t,onChange:n,validity:s,labelPosition:d,summaryFields:u,fieldDefinition:c,popoverAnchor:o});return"top"===d?(0,a.jsxs)(b.__experimentalVStack,{className:"dataforms-layouts-panel__field",spacing:0,children:[(0,a.jsx)("div",{className:p,style:{paddingBottom:0},children:f}),(0,a.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:m})]}):"none"===d?(0,a.jsx)("div",{className:"dataforms-layouts-panel__field",children:m}):(0,a.jsxs)(b.__experimentalHStack,{ref:l,className:"dataforms-layouts-panel__field",children:[(0,a.jsx)("div",{className:p,children:f}),(0,a.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:m})]})},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:2,children:e})},{type:"card",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)($I),o=nV({...t.layout,type:"card"}),l=(0,h.useMemo)((()=>({layout:tV,fields:eV(t)?t.children:[]})),[t]),{isOpen:c,CollapsibleCardHeader:u}=function(e=!0){const[t,n]=(0,h.useState)(e),s=(0,h.useCallback)((()=>{n((e=>!e))}),[]),i=(0,h.useCallback)((({children:e,...n})=>(0,a.jsxs)(b.CardHeader,{...n,onClick:s,style:{cursor:"pointer",...n.style},children:[(0,a.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:e}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:t?Nv:Fv,"aria-expanded":t,"aria-label":t?"Collapse":"Expand"})]})),[s,t]);return{isOpen:t,CollapsibleCardHeader:i}}(o.isOpened),d=vV(o.summary,r).filter((e=>function(e,t,n){if(!t||Array.isArray(t)&&0===t.length)return!1;const s=(Array.isArray(t)?t:[t]).find((t=>"string"==typeof t?t===e.id:"object"==typeof t&&"id"in t&&t.id===e.id));return!!s&&("string"==typeof s||"object"!=typeof s||!("visibility"in s)||"always"===s.visibility||"when-collapsed"===s.visibility&&!n)}(e,o.summary,c)));if(eV(t)){const s=!!t.label&&o.withHeader;return(0,a.jsxs)(b.Card,{className:"dataforms-layouts-card__field",children:[s&&(0,a.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,a.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:t.label}),d.length>0&&o.withHeader&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:d.map((t=>(0,a.jsx)(t.render,{item:e,field:t},t.id)))})]}),(c||!s)&&(0,a.jsxs)(b.CardBody,{className:"dataforms-layouts-card__field-control",children:[t.description&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,a.jsx)(SV,{data:e,form:l,onChange:n,validity:i?.children})]})]})}const p=r.find((e=>e.id===t.id));if(!p||!p.Edit)return null;const f=_V("regular")?.component;if(!f)return null;const m=!!p.label&&o.withHeader;return(0,a.jsxs)(b.Card,{className:"dataforms-layouts-card__field",children:[m&&(0,a.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,a.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:p.label}),d.length>0&&o.withHeader&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:d.map((t=>(0,a.jsx)(t.render,{item:e,field:t},t.id)))})]}),(c||!m)&&(0,a.jsx)(b.CardBody,{className:"dataforms-layouts-card__field-control",children:(0,a.jsx)(f,{data:e,field:t,onChange:n,hideLabelFromVision:s||m,validity:i})})]})},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:6,children:e})},{type:"row",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)($I),o=nV({...t.layout,type:"row"});if(eV(t)){const r={fields:t.children.map((e=>"string"==typeof e?{id:e}:e))};return(0,a.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!s&&t.label&&(0,a.jsx)(xV,{title:t.label}),(0,a.jsx)(b.__experimentalHStack,{alignment:o.alignment,spacing:4,children:(0,a.jsx)(SV,{data:e,form:r,onChange:n,validity:i?.children,as:bV,children:(t,i,r)=>(0,a.jsx)("div",{className:"dataforms-layouts-row__field-control",style:o.styles[i.id],children:(0,a.jsx)(t,{data:e,field:i,onChange:n,hideLabelFromVision:s,validity:r})},i.id)})})]})}const l=r.find((e=>e.id===t.id));if(!l||!l.Edit)return null;const c=_V("regular")?.component;return c?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,a.jsx)(c,{data:e,field:l,onChange:n,validity:i})})}):null},wrapper:({children:e,layout:t})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:(0,a.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,a.jsx)(b.__experimentalHStack,{spacing:4,alignment:t.alignment,children:e})})})}];function _V(e){return wV.find((t=>t.type===e))}const jV=({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e});function SV({data:e,form:t,onChange:n,validity:s,children:i,as:r}){const{fields:o}=(0,h.useContext)($I);const l=(0,h.useMemo)((()=>sV(t)),[t]),c=nV(t.layout),u=r??_V(c.type)?.wrapper??jV;return(0,a.jsx)(u,{layout:c,children:l.map((t=>{const r=_V(t.layout.type)?.component;if(!r)return null;const l=eV(t)?void 0:function(e){const t="string"==typeof e?e:e.id;return o.find((e=>e.id===t))}(t);return l&&l.isVisible&&!l.isVisible(e)?null:i?i(r,t,s?.[t.id]):(0,a.jsx)(r,{data:e,field:t,onChange:n,validity:s?.[t.id]},t.id)}))})}function CV({data:e,form:t,fields:n,onChange:s,validity:i}){const r=(0,h.useMemo)((()=>Nw(n)),[n]);return t.fields?(0,a.jsx)(JI,{fields:r,children:(0,a.jsx)(SV,{data:e,form:t,onChange:s,validity:i})}):null}const{usePostFields:kV,PostCardPanel:EV}=ne(f.privateApis),PV=["title","status","date","author","discussion"];function IV({postType:e,postId:t}){const n=(0,h.useMemo)((()=>t.split(",")),[t]),{record:s,hasFinishedResolution:i}=(0,c.useSelect)((t=>{const s=["postType",e,n[0]],{getEditedEntityRecord:i,hasFinishedResolution:r}=t(j.store);return{record:1===n.length?i(...s):null,hasFinishedResolution:r("getEditedEntityRecord",s)}}),[e,n]),[r,o]=(0,h.useState)({}),{editEntityRecord:l}=(0,c.useDispatch)(j.store),u=kV({postType:e}),d=(0,h.useMemo)((()=>u?.map((e=>"status"===e.id?{...e,elements:e.elements.filter((e=>"trash"!==e.value))}:e))),[u]),p=(0,h.useMemo)((()=>({layout:{type:"panel"},fields:[{id:"featured_media",layout:{type:"regular"}},{id:"status",label:(0,w.__)("Status & Visibility"),children:["status","password"]},"author","date","slug","parent",{id:"discussion",label:(0,w.__)("Discussion"),children:["comment_status","ping_status"]},{label:(0,w.__)("Template"),id:"template",layout:{type:"regular",labelPosition:"side"}}].filter((e=>1===n.length||PV.includes("string"==typeof e?e:e.id)))})),[n]);(0,h.useEffect)((()=>{o({})}),[n]);const{ExperimentalBlockEditorProvider:f}=ne(x.privateApis),m=CE(),g=(0,h.useMemo)((()=>d.map((e=>"template"===e.id?{...e,Edit:t=>(0,a.jsx)(f,{settings:m,children:(0,a.jsx)(e.Edit,{...t})})}:e))),[d,m]);return(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(EV,{postType:e,postId:n}),i&&(0,a.jsx)(CV,{data:1===n.length?s:r,fields:g,form:p,onChange:t=>{for(const i of n)t.status&&"future"!==t.status&&"future"===s?.status&&new Date(s.date)>new Date&&(t.date=null),t.status&&"private"===t.status&&s.password&&(t.password=""),l("postType",e,i,t),n.length>1&&o((e=>({...e,...t})))}})]})}function VV({postType:e,postId:t}){return(0,a.jsxs)(Wm,{className:Ht("edit-site-post-edit",{"is-empty":!t}),label:(0,w.__)("Post Edit"),children:[t&&(0,a.jsx)(IV,{postType:e,postId:t}),!t&&(0,a.jsx)("p",{children:(0,w.__)("Select a page to edit")})]})}const{useLocation:TV}=ne(Lt.privateApis);async function OV(e){const{activeView:t="all"}=e,n=await(0,c.resolveSelect)(j.store).getPostType("page");return"list"===(await(0,SE.loadView)({kind:"postType",name:"page",slug:t,defaultView:BI(n,t)})).type}function AV(){const{query:e={}}=TV(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(XI,{postType:"page"})}const NV={name:"pages",path:"/page",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Ua,{title:(0,w.__)("Pages"),backPath:"/",content:(0,a.jsx)(RI,{postType:"page"})}):(0,a.jsx)(uo,{})},content({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(XI,{postType:"page"}):void 0},async preview({query:e,siteData:t}){const n=t.currentTheme?.is_block_theme;if(!n)return;return await OV(e)?(0,a.jsx)(_v,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(AV,{}):(0,a.jsx)(uo,{})},edit:async({query:e})=>!await OV(e)&&!!e.quickEdit?(0,a.jsx)(VV,{postType:"page",postId:e.postId}):void 0},widths:{content:async({query:e})=>await OV(e)?380:void 0,edit:async({query:e})=>!await OV(e)&&!!e.quickEdit?380:void 0}};function FV(){return(0,a.jsx)(b.Notice,{status:"error",isDismissible:!1,children:(0,w.__)("The requested page could not be found. Please check the URL.")})}const MV=[{name:"page-item",path:"/page/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Ua,{title:(0,w.__)("Pages"),backPath:"/",content:(0,a.jsx)(RI,{postType:"page"})}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})}}},NV,SI,jI,cP,lP,oP,uy,oy,Ev,Sv,{name:"stylebook",path:"/stylebook",areas:{sidebar:({siteData:e})=>jv(e)?(0,a.jsx)(Ua,{title:(0,w.__)("Styles"),backPath:"/",description:(0,w.__)("Preview your website's visual identity: colors, typography, and blocks.")}):(0,a.jsx)(uo,{}),preview:({siteData:e})=>jv(e)?(0,a.jsx)(lg,{isStatic:!0}):void 0,mobile:({siteData:e})=>jv(e)?(0,a.jsx)(lg,{isStatic:!0}):void 0}},{name:"notfound",path:"*",areas:{sidebar:(0,a.jsx)(co,{}),mobile:(0,a.jsx)(co,{customDescription:(0,a.jsx)(FV,{})}),content:(0,a.jsx)(b.__experimentalSpacer,{padding:2,children:(0,a.jsx)(FV,{})})}}];const{RouterProvider:BV}=ne(Lt.privateApis);function DV(){return(0,Kt.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:Sa()}),(0,Kt.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Ca()}),(0,Kt.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:ka()}),function(){const{query:e={}}=Na(),{canvas:t="view"}=e;let n="site-editor";"edit"===t&&(n="entity-edit"),(0,c.useSelect)((e=>e(x.store).getBlockSelectionStart()),[])&&(n="block-selection-edit"),Ta()&&(n=""),Aa(n)}(),(0,a.jsx)(ga,{})}function RV(){!function(){const e=(0,c.useRegistry)(),{registerRoute:t}=ne((0,c.useDispatch)(Rt));(0,h.useEffect)((()=>{e.batch((()=>{MV.forEach(t)}))}),[e,t])}();const{routes:e,currentTheme:t,editorSettings:n}=(0,c.useSelect)((e=>({routes:ne(e(Rt)).getRoutes(),currentTheme:e(j.store).getCurrentTheme(),editorSettings:e(Rt).getSettings()})),[]),s=(0,h.useCallback)((({path:e,query:t})=>Qr()?{path:e,query:{...t,wp_theme_preview:"wp_theme_preview"in t?t.wp_theme_preview:Jr()}}:{path:e,query:t}),[]),i=(0,h.useMemo)((()=>({siteData:{currentTheme:t,editorSettings:n}})),[t,n]);return(0,a.jsx)(BV,{routes:e,pathArg:"p",beforeNavigate:s,matchResolverArgs:i,children:(0,a.jsx)(DV,{})})}const LV=(0,Qt.getPath)(window.location.href)?.includes("site-editor.php"),zV=e=>{d()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function HV(e){return LV?(zV("PluginMoreMenuItem"),(0,a.jsx)(f.PluginMoreMenuItem,{...e})):null}function GV(e){return LV?(zV("PluginSidebar"),(0,a.jsx)(f.PluginSidebar,{...e})):null}function WV(e){return LV?(zV("PluginSidebarMoreMenuItem"),(0,a.jsx)(f.PluginSidebarMoreMenuItem,{...e})):null}const{useLocation:UV}=ne(Lt.privateApis);async function qV(e){const{activeView:t="all"}=e,n=await(0,c.resolveSelect)(j.store).getPostType("post");return"list"===(await(0,SE.loadView)({kind:"postType",name:"post",slug:t,defaultView:BI(n,t)})).type}function ZV(){const{query:e={}}=UV(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(XI,{postType:"post"})}const YV={name:"posts",path:"/",areas:{sidebar:(0,a.jsx)(Ua,{title:(0,w.__)("Posts"),isRoot:!0,content:(0,a.jsx)(RI,{postType:"post"})}),content:(0,a.jsx)(XI,{postType:"post"}),preview:async({query:e})=>await qV(e)?(0,a.jsx)(_v,{isPostsList:!0}):void 0,mobile:(0,a.jsx)(ZV,{}),edit:async({query:e})=>!await qV(e)&&!!e.quickEdit?(0,a.jsx)(VV,{postType:"post",postId:e.postId}):void 0},widths:{content:async({query:e})=>await qV(e)?380:void 0,edit:async({query:e})=>!await qV(e)&&!!e.quickEdit?380:void 0}};(0,w.__)("Posts");const{RouterProvider:KV}=ne(Lt.privateApis);function XV(e,t){}const{registerCoreBlockBindingsSources:QV}=ne(f.privateApis);function JV(e,t){const n=document.getElementById(e),s=(0,h.createRoot)(n);(0,c.dispatch)(o.store).reapplyBlockTypeFilters();const i=(0,l.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,l.registerCoreBlocks)(i),QV(),(0,c.dispatch)(o.store).setFreeformFallbackBlockName("core/html"),(0,g.registerLegacyWidgetBlock)({inserter:!1}),(0,g.registerWidgetGroupBlock)({inserter:!1}),(0,c.dispatch)(m.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,c.dispatch)(m.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1,enableChoosePatternModal:!0}),window.__experimentalMediaProcessing&&(0,c.dispatch)(m.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,c.dispatch)(Rt).updateSettings(t),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),s.render((0,a.jsx)(h.StrictMode,{children:(0,a.jsx)(RV,{})})),s}function $V(){d()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=r})();
\ No newline at end of file
+ */var s=n(1609);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=s.useState,a=s.useEffect,o=s.useLayoutEffect,l=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),s=r({inst:{value:n,getSnapshot:t}}),i=s[0].inst,u=s[1];return o((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),a((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:u},422:(e,t,n)=>{"use strict";e.exports=n(83)},1233:e=>{"use strict";e.exports=window.wp.preferences},1609:e=>{"use strict";e.exports=window.React},4660:e=>{e.exports=function(){function e(t,n,s){function i(a,o){if(!n[a]){if(!t[a]){if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,s)}return n[a].exports}for(var r=void 0,a=0;a<s.length;a++)i(s[a]);return i}return e}()({1:[function(e,t,n){"use strict";var s="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var s in n)i(n,s)&&(e[s]=n[s])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,s,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+s),i);else for(var r=0;r<s;r++)e[i+r]=t[n+r]},flattenChunks:function(e){var t,n,s,i,r,a;for(s=0,t=0,n=e.length;t<n;t++)s+=e[t].length;for(a=new Uint8Array(s),i=0,t=0,n=e.length;t<n;t++)r=e[t],a.set(r,i),i+=r.length;return a}},a={arraySet:function(e,t,n,s,i){for(var r=0;r<s;r++)e[i+r]=t[n+r]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,r)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(s)},{}],2:[function(e,t,n){"use strict";var s=e("./common"),i=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var a=new s.Buf8(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&r||!e.subarray&&i))return String.fromCharCode.apply(null,s.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){var t,n,i,r,a,o=e.length,l=0;for(r=0;r<o;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),l+=n<128?1:n<2048?2:n<65536?3:4;for(t=new s.Buf8(l),a=0,r=0;a<l;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(i=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(i-56320),r++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new s.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){var n,s,i,r,o=t||e.length,c=new Array(2*o);for(s=0,n=0;n<o;)if((i=e[n++])<128)c[s++]=i;else if((r=a[i])>4)c[s++]=65533,n+=r-1;else{for(i&=2===r?31:3===r?15:7;r>1&&n<o;)i=i<<6|63&e[n++],r--;r>1?c[s++]=65533:i<65536?c[s++]=i:(i-=65536,c[s++]=55296|i>>10&1023,c[s++]=56320|1023&i)}return l(c,s)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":1}],3:[function(e,t,n){"use strict";function s(e,t,n,s){for(var i=65535&e,r=e>>>16&65535,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{r=r+(i=i+t[s++]|0)|0}while(--a);i%=65521,r%=65521}return i|r<<16}t.exports=s},{}],4:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],5:[function(e,t,n){"use strict";function s(){for(var e,t=[],n=0;n<256;n++){e=n;for(var s=0;s<8;s++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}var i=s();function r(e,t,n,s){var r=i,a=s+n;e^=-1;for(var o=s;o<a;o++)e=e>>>8^r[255&(e^t[o])];return~e}t.exports=r},{}],6:[function(e,t,n){"use strict";function s(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}t.exports=s},{}],7:[function(e,t,n){"use strict";var s=30,i=12;t.exports=function(e,t){var n,r,a,o,l,c,u,d,h,p,f,m,g,v,y,x,b,w,_,j,S,C,k,E,P;n=e.state,r=e.next_in,E=e.input,a=r+(e.avail_in-5),o=e.next_out,P=e.output,l=o-(t-e.avail_out),c=o+(e.avail_out-257),u=n.dmax,d=n.wsize,h=n.whave,p=n.wnext,f=n.window,m=n.hold,g=n.bits,v=n.lencode,y=n.distcode,x=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=v[m&x];t:for(;;){if(m>>>=_=w>>>24,g-=_,0==(_=w>>>16&255))P[o++]=65535&w;else{if(!(16&_)){if(64&_){if(32&_){n.mode=i;break e}e.msg="invalid literal/length code",n.mode=s;break e}w=v[(65535&w)+(m&(1<<_)-1)];continue t}for(j=65535&w,(_&=15)&&(g<_&&(m+=E[r++]<<g,g+=8),j+=m&(1<<_)-1,m>>>=_,g-=_),g<15&&(m+=E[r++]<<g,g+=8,m+=E[r++]<<g,g+=8),w=y[m&b];;){if(m>>>=_=w>>>24,g-=_,16&(_=w>>>16&255)){if(S=65535&w,g<(_&=15)&&(m+=E[r++]<<g,(g+=8)<_&&(m+=E[r++]<<g,g+=8)),(S+=m&(1<<_)-1)>u){e.msg="invalid distance too far back",n.mode=s;break e}if(m>>>=_,g-=_,S>(_=o-l)){if((_=S-_)>h&&n.sane){e.msg="invalid distance too far back",n.mode=s;break e}if(C=0,k=f,0===p){if(C+=d-_,_<j){j-=_;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}}else if(p<_){if(C+=d+p-_,(_-=p)<j){j-=_;do{P[o++]=f[C++]}while(--_);if(C=0,p<j){j-=_=p;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}}}else if(C+=p-_,_<j){j-=_;do{P[o++]=f[C++]}while(--_);C=o-S,k=P}for(;j>2;)P[o++]=k[C++],P[o++]=k[C++],P[o++]=k[C++],j-=3;j&&(P[o++]=k[C++],j>1&&(P[o++]=k[C++]))}else{C=o-S;do{P[o++]=P[C++],P[o++]=P[C++],P[o++]=P[C++],j-=3}while(j>2);j&&(P[o++]=P[C++],j>1&&(P[o++]=P[C++]))}break}if(64&_){e.msg="invalid distance code",n.mode=s;break e}w=y[(65535&w)+(m&(1<<_)-1)]}}break}}while(r<a&&o<c);r-=j=g>>3,m&=(1<<(g-=j<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<a?a-r+5:5-(r-a),e.avail_out=o<c?c-o+257:257-(o-c),n.hold=m,n.bits=g}},{}],8:[function(e,t,n){"use strict";var s=e("../utils/common"),i=e("./adler32"),r=e("./crc32"),a=e("./inffast"),o=e("./inftrees"),l=0,c=1,u=2,d=4,h=5,p=6,f=0,m=1,g=2,v=-2,y=-3,x=-4,b=-5,w=8,_=1,j=2,S=3,C=4,k=5,E=6,P=7,I=8,V=9,T=10,O=11,A=12,N=13,F=14,M=15,B=16,D=17,R=18,L=19,z=20,H=21,G=22,W=23,U=24,q=25,Z=26,Y=27,K=28,X=29,Q=30,J=31,$=852,ee=592,te=15;function ne(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function se(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ie(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=_,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new s.Buf32($),t.distcode=t.distdyn=new s.Buf32(ee),t.sane=1,t.back=-1,f):v}function re(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ie(e)):v}function ae(e,t){var n,s;return e&&e.state?(s=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?v:(null!==s.window&&s.wbits!==t&&(s.window=null),s.wrap=n,s.wbits=t,re(e))):v}function oe(e,t){var n,s;return e?(s=new se,e.state=s,s.window=null,(n=ae(e,t))!==f&&(e.state=null),n):v}function le(e){return oe(e,te)}var ce,ue,de=!0;function he(e){if(de){var t;for(ce=new s.Buf32(512),ue=new s.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(o(c,e.lens,0,288,ce,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;o(u,e.lens,0,32,ue,0,e.work,{bits:5}),de=!1}e.lencode=ce,e.lenbits=9,e.distcode=ue,e.distbits=5}function pe(e,t,n,i){var r,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new s.Buf8(a.wsize)),i>=a.wsize?(s.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((r=a.wsize-a.wnext)>i&&(r=i),s.arraySet(a.window,t,n-i,r,a.wnext),(i-=r)?(s.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=r))),0}function fe(e,t){var n,$,ee,te,se,ie,re,ae,oe,le,ce,ue,de,fe,me,ge,ve,ye,xe,be,we,_e,je,Se,Ce=0,ke=new s.Buf8(4),Ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return v;(n=e.state).mode===A&&(n.mode=N),se=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,ae=n.hold,oe=n.bits,le=ie,ce=re,_e=f;e:for(;;)switch(n.mode){case _:if(0===n.wrap){n.mode=N;break}for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(2&n.wrap&&35615===ae){n.check=0,ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0),ae=0,oe=0,n.mode=j;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&ae)<<8)+(ae>>8))%31){e.msg="incorrect header check",n.mode=Q;break}if((15&ae)!==w){e.msg="unknown compression method",n.mode=Q;break}if(oe-=4,we=8+(15&(ae>>>=4)),0===n.wbits)n.wbits=we;else if(we>n.wbits){e.msg="invalid window size",n.mode=Q;break}n.dmax=1<<we,e.adler=n.check=1,n.mode=512&ae?T:A,ae=0,oe=0;break;case j:for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(n.flags=ae,(255&n.flags)!==w){e.msg="unknown compression method",n.mode=Q;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Q;break}n.head&&(n.head.text=ae>>8&1),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0,n.mode=S;case S:for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.time=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,ke[2]=ae>>>16&255,ke[3]=ae>>>24&255,n.check=r(n.check,ke,4,0)),ae=0,oe=0,n.mode=C;case C:for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.head&&(n.head.xflags=255&ae,n.head.os=ae>>8),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0,n.mode=k;case k:if(1024&n.flags){for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.length=ae,n.head&&(n.head.extra_len=ae),512&n.flags&&(ke[0]=255&ae,ke[1]=ae>>>8&255,n.check=r(n.check,ke,2,0)),ae=0,oe=0}else n.head&&(n.head.extra=null);n.mode=E;case E:if(1024&n.flags&&((ue=n.length)>ie&&(ue=ie),ue&&(n.head&&(we=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),s.arraySet(n.head.extra,$,te,ue,we)),512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,n.length-=ue),n.length))break e;n.length=0,n.mode=P;case P:if(2048&n.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],n.head&&we&&n.length<65536&&(n.head.name+=String.fromCharCode(we))}while(we&&ue<ie);if(512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=I;case I:if(4096&n.flags){if(0===ie)break e;ue=0;do{we=$[te+ue++],n.head&&we&&n.length<65536&&(n.head.comment+=String.fromCharCode(we))}while(we&&ue<ie);if(512&n.flags&&(n.check=r(n.check,$,ue,te)),ie-=ue,te+=ue,we)break e}else n.head&&(n.head.comment=null);n.mode=V;case V:if(512&n.flags){for(;oe<16;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Q;break}ae=0,oe=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=A;break;case T:for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}e.adler=n.check=ne(ae),ae=0,oe=0,n.mode=O;case O:if(0===n.havedict)return e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,g;e.adler=n.check=1,n.mode=A;case A:if(t===h||t===p)break e;case N:if(n.last){ae>>>=7&oe,oe-=7&oe,n.mode=Y;break}for(;oe<3;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}switch(n.last=1&ae,oe-=1,3&(ae>>>=1)){case 0:n.mode=F;break;case 1:if(he(n),n.mode=z,t===p){ae>>>=2,oe-=2;break e}break;case 2:n.mode=D;break;case 3:e.msg="invalid block type",n.mode=Q}ae>>>=2,oe-=2;break;case F:for(ae>>>=7&oe,oe-=7&oe;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if((65535&ae)!=(ae>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Q;break}if(n.length=65535&ae,ae=0,oe=0,n.mode=M,t===p)break e;case M:n.mode=B;case B:if(ue=n.length){if(ue>ie&&(ue=ie),ue>re&&(ue=re),0===ue)break e;s.arraySet(ee,$,te,ue,se),ie-=ue,te+=ue,re-=ue,se+=ue,n.length-=ue;break}n.mode=A;break;case D:for(;oe<14;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(n.nlen=257+(31&ae),ae>>>=5,oe-=5,n.ndist=1+(31&ae),ae>>>=5,oe-=5,n.ncode=4+(15&ae),ae>>>=4,oe-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Q;break}n.have=0,n.mode=R;case R:for(;n.have<n.ncode;){for(;oe<3;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.lens[Ee[n.have++]]=7&ae,ae>>>=3,oe-=3}for(;n.have<19;)n.lens[Ee[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,je={bits:n.lenbits},_e=o(l,n.lens,0,19,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid code lengths set",n.mode=Q;break}n.have=0,n.mode=L;case L:for(;n.have<n.nlen+n.ndist;){for(;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ve<16)ae>>>=me,oe-=me,n.lens[n.have++]=ve;else{if(16===ve){for(Se=me+2;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae>>>=me,oe-=me,0===n.have){e.msg="invalid bit length repeat",n.mode=Q;break}we=n.lens[n.have-1],ue=3+(3&ae),ae>>>=2,oe-=2}else if(17===ve){for(Se=me+3;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}oe-=me,we=0,ue=3+(7&(ae>>>=me)),ae>>>=3,oe-=3}else{for(Se=me+7;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}oe-=me,we=0,ue=11+(127&(ae>>>=me)),ae>>>=7,oe-=7}if(n.have+ue>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Q;break}for(;ue--;)n.lens[n.have++]=we}}if(n.mode===Q)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Q;break}if(n.lenbits=9,je={bits:n.lenbits},_e=o(c,n.lens,0,n.nlen,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid literal/lengths set",n.mode=Q;break}if(n.distbits=6,n.distcode=n.distdyn,je={bits:n.distbits},_e=o(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,je),n.distbits=je.bits,_e){e.msg="invalid distances set",n.mode=Q;break}if(n.mode=z,t===p)break e;case z:n.mode=H;case H:if(ie>=6&&re>=258){e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,a(e,ce),se=e.next_out,ee=e.output,re=e.avail_out,te=e.next_in,$=e.input,ie=e.avail_in,ae=n.hold,oe=n.bits,n.mode===A&&(n.back=-1);break}for(n.back=0;ge=(Ce=n.lencode[ae&(1<<n.lenbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ge&&!(240&ge)){for(ye=me,xe=ge,be=ve;ge=(Ce=n.lencode[be+((ae&(1<<ye+xe)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=me,oe-=me,n.back+=me,n.length=ve,0===ge){n.mode=Z;break}if(32&ge){n.back=-1,n.mode=A;break}if(64&ge){e.msg="invalid literal/length code",n.mode=Q;break}n.extra=15&ge,n.mode=G;case G:if(n.extra){for(Se=n.extra;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.length+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=W;case W:for(;ge=(Ce=n.distcode[ae&(1<<n.distbits)-1])>>>16&255,ve=65535&Ce,!((me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(!(240&ge)){for(ye=me,xe=ge,be=ve;ge=(Ce=n.distcode[be+((ae&(1<<ye+xe)-1)>>ye)])>>>16&255,ve=65535&Ce,!(ye+(me=Ce>>>24)<=oe);){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}ae>>>=ye,oe-=ye,n.back+=ye}if(ae>>>=me,oe-=me,n.back+=me,64&ge){e.msg="invalid distance code",n.mode=Q;break}n.offset=ve,n.extra=15&ge,n.mode=U;case U:if(n.extra){for(Se=n.extra;oe<Se;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}n.offset+=ae&(1<<n.extra)-1,ae>>>=n.extra,oe-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Q;break}n.mode=q;case q:if(0===re)break e;if(ue=ce-re,n.offset>ue){if((ue=n.offset-ue)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Q;break}ue>n.wnext?(ue-=n.wnext,de=n.wsize-ue):de=n.wnext-ue,ue>n.length&&(ue=n.length),fe=n.window}else fe=ee,de=se-n.offset,ue=n.length;ue>re&&(ue=re),re-=ue,n.length-=ue;do{ee[se++]=fe[de++]}while(--ue);0===n.length&&(n.mode=H);break;case Z:if(0===re)break e;ee[se++]=n.length,re--,n.mode=H;break;case Y:if(n.wrap){for(;oe<32;){if(0===ie)break e;ie--,ae|=$[te++]<<oe,oe+=8}if(ce-=re,e.total_out+=ce,n.total+=ce,ce&&(e.adler=n.check=n.flags?r(n.check,ee,ce,se-ce):i(n.check,ee,ce,se-ce)),ce=re,(n.flags?ae:ne(ae))!==n.check){e.msg="incorrect data check",n.mode=Q;break}ae=0,oe=0}n.mode=K;case K:if(n.wrap&&n.flags){for(;oe<32;){if(0===ie)break e;ie--,ae+=$[te++]<<oe,oe+=8}if(ae!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Q;break}ae=0,oe=0}n.mode=X;case X:_e=m;break e;case Q:_e=y;break e;case J:return x;default:return v}return e.next_out=se,e.avail_out=re,e.next_in=te,e.avail_in=ie,n.hold=ae,n.bits=oe,(n.wsize||ce!==e.avail_out&&n.mode<Q&&(n.mode<Y||t!==d))&&pe(e,e.output,e.next_out,ce-e.avail_out)?(n.mode=J,x):(le-=e.avail_in,ce-=e.avail_out,e.total_in+=le,e.total_out+=ce,n.total+=ce,n.wrap&&ce&&(e.adler=n.check=n.flags?r(n.check,ee,ce,e.next_out-ce):i(n.check,ee,ce,e.next_out-ce)),e.data_type=n.bits+(n.last?64:0)+(n.mode===A?128:0)+(n.mode===z||n.mode===M?256:0),(0===le&&0===ce||t===d)&&_e===f&&(_e=b),_e)}function me(e){if(!e||!e.state)return v;var t=e.state;return t.window&&(t.window=null),e.state=null,f}function ge(e,t){var n;return e&&e.state&&2&(n=e.state).wrap?(n.head=t,t.done=!1,f):v}function ve(e,t){var n,s=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==O?v:n.mode===O&&i(1,t,s,0)!==n.check?y:pe(e,t,s,s)?(n.mode=J,x):(n.havedict=1,f):v}n.inflateReset=re,n.inflateReset2=ae,n.inflateResetKeep=ie,n.inflateInit=le,n.inflateInit2=oe,n.inflate=fe,n.inflateEnd=me,n.inflateGetHeader=ge,n.inflateSetDictionary=ve,n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":1,"./adler32":3,"./crc32":5,"./inffast":7,"./inftrees":9}],9:[function(e,t,n){"use strict";var s=e("../utils/common"),i=15,r=852,a=592,o=0,l=1,c=2,u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],p=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,f,m,g,v,y){var x,b,w,_,j,S,C,k,E,P=y.bits,I=0,V=0,T=0,O=0,A=0,N=0,F=0,M=0,B=0,D=0,R=null,L=0,z=new s.Buf16(i+1),H=new s.Buf16(i+1),G=null,W=0;for(I=0;I<=i;I++)z[I]=0;for(V=0;V<f;V++)z[t[n+V]]++;for(A=P,O=i;O>=1&&0===z[O];O--);if(A>O&&(A=O),0===O)return m[g++]=20971520,m[g++]=20971520,y.bits=1,0;for(T=1;T<O&&0===z[T];T++);for(A<T&&(A=T),M=1,I=1;I<=i;I++)if(M<<=1,(M-=z[I])<0)return-1;if(M>0&&(e===o||1!==O))return-1;for(H[1]=0,I=1;I<i;I++)H[I+1]=H[I]+z[I];for(V=0;V<f;V++)0!==t[n+V]&&(v[H[t[n+V]]++]=V);if(e===o?(R=G=v,S=19):e===l?(R=u,L-=257,G=d,W-=257,S=256):(R=h,G=p,S=-1),D=0,V=0,I=T,j=g,N=A,F=0,w=-1,_=(B=1<<A)-1,e===l&&B>r||e===c&&B>a)return 1;for(;;){C=I-F,v[V]<S?(k=0,E=v[V]):v[V]>S?(k=G[W+v[V]],E=R[L+v[V]]):(k=96,E=0),x=1<<I-F,T=b=1<<N;do{m[j+(D>>F)+(b-=x)]=C<<24|k<<16|E}while(0!==b);for(x=1<<I-1;D&x;)x>>=1;if(0!==x?(D&=x-1,D+=x):D=0,V++,0==--z[I]){if(I===O)break;I=t[n+v[V]]}if(I>A&&(D&_)!==w){for(0===F&&(F=A),j+=T,M=1<<(N=I-F);N+F<O&&!((M-=z[N+F])<=0);)N++,M<<=1;if(B+=1<<N,e===l&&B>r||e===c&&B>a)return 1;m[w=D&_]=A<<24|N<<16|j-g}}return 0!==D&&(m[j+D]=I-F<<24|64<<16),y.bits=A,0}},{"../utils/common":1}],10:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(e,t,n){"use strict";function s(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=s},{}],"/lib/inflate.js":[function(e,t,n){"use strict";var s=e("./zlib/inflate"),i=e("./utils/common"),r=e("./utils/strings"),a=e("./zlib/constants"),o=e("./zlib/messages"),l=e("./zlib/zstream"),c=e("./zlib/gzheader"),u=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(15&t.windowBits||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var n=s.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(o[n]);if(this.header=new c,s.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=r.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=s.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(o[n])}function h(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||o[n.err];return n.result}function p(e,t){return(t=t||{}).raw=!0,h(e,t)}d.prototype.push=function(e,t){var n,o,l,c,d,h=this.strm,p=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;o=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?h.input=r.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(p),h.next_out=0,h.avail_out=p),(n=s.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&f&&(n=s.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&n!==a.Z_STREAM_END&&(0!==h.avail_in||o!==a.Z_FINISH&&o!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(h.output,h.next_out),c=h.next_out-l,d=r.buf2string(h.output,l),h.next_out=c,h.avail_out=p-c,c&&i.arraySet(h.output,h.output,l,c,0),this.onData(d)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(o=a.Z_FINISH),o===a.Z_FINISH?(n=s.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):o!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=d,n.inflate=h,n.inflateRaw=p,n.ungzip=h},{"./utils/common":1,"./utils/strings":2,"./zlib/constants":4,"./zlib/gzheader":6,"./zlib/inflate":8,"./zlib/messages":10,"./zlib/zstream":11}]},{},[])("/lib/inflate.js")},6087:e=>{"use strict";e.exports=window.wp.element},7143:e=>{"use strict";e.exports=window.wp.data},7734:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var s,i,r;if(Array.isArray(t)){if((s=t.length)!=n.length)return!1;for(i=s;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t instanceof Map&&n instanceof Map){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],n.get(i[0])))return!1;return!0}if(t instanceof Set&&n instanceof Set){if(t.size!==n.size)return!1;for(i of t.entries())if(!n.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(n)){if((s=t.length)!=n.length)return!1;for(i=s;0!=i--;)if(t[i]!==n[i])return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((s=(r=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=s;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,r[i]))return!1;for(i=s;0!=i--;){var a=r[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},7951:(e,t,n)=>{"use strict";n.d(t,{loadView:()=>d,useView:()=>u});var s=Object.prototype.hasOwnProperty;function i(e,t,n){for(n of e.keys())if(r(n,t))return n}function r(e,t){var n,a,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((a=e.length)===t.length)for(;a--&&r(e[a],t[a]););return-1===a}if(n===Set){if(e.size!==t.size)return!1;for(a of e){if((o=a)&&"object"==typeof o&&!(o=i(t,o)))return!1;if(!t.has(o))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(a of e){if((o=a[0])&&"object"==typeof o&&!(o=i(t,o)))return!1;if(!r(a[1],t.get(o)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((a=e.byteLength)===t.byteLength)for(;a--&&e.getInt8(a)===t.getInt8(a););return-1===a}if(ArrayBuffer.isView(e)){if((a=e.byteLength)===t.byteLength)for(;a--&&e[a]===t[a];);return-1===a}if(!n||"object"==typeof e){for(n in a=0,e){if(s.call(e,n)&&++a&&!s.call(t,n))return!1;if(!(n in t)||!r(e[n],t[n]))return!1}return Object.keys(t).length===a}}return e!=e&&t!=t}function a(e,t,n){return`dataviews-${e}-${t}-${n}`}var o=n(6087),l=n(7143),c=n(1233);function u(e){const{kind:t,name:n,slug:s,defaultView:i,queryParams:u,onChangeQueryParams:d}=e,h=a(t,n,s),p=(0,l.useSelect)((e=>e(c.store).get("core/views",h)),[h]),{set:f}=(0,l.useDispatch)(c.store),m=p??i,g=u?.page??m.page??1,v=u?.search??m.search??"";return{view:(0,o.useMemo)((()=>({...m,page:g,search:v})),[m,g,v]),isModified:!!p,updateView:(0,o.useCallback)((e=>{const t={page:e?.page,search:e?.search},n=function(e,t){const n={...e};for(const e of t)delete n[e];return n}(e,["page","search"]);d&&!r(t,{page:g,search:v})&&d(t),r(m,n)||(r(n,i)?f("core/views",h,void 0):f("core/views",h,n))}),[d,g,v,m,i,f,h]),resetToDefault:(0,o.useCallback)((()=>{f("core/views",h,void 0)}),[h,f])}}async function d(e){const{kind:t,name:n,slug:s,defaultView:i,queryParams:r}=e,o=a(t,n,s);return{...(0,l.select)(c.store).get("core/views",o)??i,page:r?.page??1,search:r?.search??""}}},8572:e=>{e.exports=function(){function e(t,n,s){function i(a,o){if(!n[a]){if(!t[a]){if(r)return r(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,s)}return n[a].exports}for(var r=void 0,a=0;a<s.length;a++)i(s[a]);return i}return e}()({1:[function(e,t,n){var s=4096,i=2*s+32,r=2*s-1,a=new Uint32Array([0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215]);function o(e){this.buf_=new Uint8Array(i),this.input_=e,this.reset()}o.READ_SIZE=s,o.IBUF_MASK=r,o.prototype.reset=function(){this.buf_ptr_=0,this.val_=0,this.pos_=0,this.bit_pos_=0,this.bit_end_pos_=0,this.eos_=0,this.readMoreInput();for(var e=0;e<4;e++)this.val_|=this.buf_[this.pos_]<<8*e,++this.pos_;return this.bit_end_pos_>0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var e=this.buf_ptr_,t=this.input_.read(this.buf_,e,s);if(t<0)throw new Error("Unexpected end of input");if(t<s){this.eos_=1;for(var n=0;n<32;n++)this.buf_[e+t+n]=0}if(0===e){for(n=0;n<32;n++)this.buf_[(s<<1)+n]=this.buf_[n];this.buf_ptr_=s}else this.buf_ptr_=0;this.bit_end_pos_+=t<<3}},o.prototype.fillBitWindow=function(){for(;this.bit_pos_>=8;)this.val_>>>=8,this.val_|=this.buf_[this.pos_&r]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(e){32-this.bit_pos_<e&&this.fillBitWindow();var t=this.val_>>>this.bit_pos_&a[e];return this.bit_pos_+=e,t},t.exports=o},{}],2:[function(e,t,n){n.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},{}],3:[function(e,t,n){var s=e("./streams").BrotliInput,i=e("./streams").BrotliOutput,r=e("./bit_reader"),a=e("./dictionary"),o=e("./huffman").HuffmanCode,l=e("./huffman").BrotliBuildHuffmanTable,c=e("./context"),u=e("./prefix"),d=e("./transform"),h=8,p=16,f=256,m=704,g=26,v=6,y=2,x=8,b=255,w=1080,_=18,j=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),S=16,C=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),k=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),E=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function P(e){var t;return 0===e.readBits(1)?16:(t=e.readBits(3))>0?17+t:(t=e.readBits(3))>0?8+t:17}function I(e){if(e.readBits(1)){var t=e.readBits(3);return 0===t?1:e.readBits(t)+(1<<t)}return 0}function V(){this.meta_block_length=0,this.input_end=0,this.is_uncompressed=0,this.is_metadata=!1}function T(e){var t,n,s,i=new V;if(i.input_end=e.readBits(1),i.input_end&&e.readBits(1))return i;if(7===(t=e.readBits(2)+4)){if(i.is_metadata=!0,0!==e.readBits(1))throw new Error("Invalid reserved bit");if(0===(n=e.readBits(2)))return i;for(s=0;s<n;s++){var r=e.readBits(8);if(s+1===n&&n>1&&0===r)throw new Error("Invalid size byte");i.meta_block_length|=r<<8*s}}else for(s=0;s<t;++s){var a=e.readBits(4);if(s+1===t&&t>4&&0===a)throw new Error("Invalid size nibble");i.meta_block_length|=a<<4*s}return++i.meta_block_length,i.input_end||i.is_metadata||(i.is_uncompressed=e.readBits(1)),i}function O(e,t,n){var s;return n.fillBitWindow(),(s=e[t+=n.val_>>>n.bit_pos_&b].bits-x)>0&&(n.bit_pos_+=x,t+=e[t].value,t+=n.val_>>>n.bit_pos_&(1<<s)-1),n.bit_pos_+=e[t].bits,e[t].value}function A(e,t,n,s){for(var i=0,r=h,a=0,c=0,u=32768,d=[],f=0;f<32;f++)d.push(new o(0,0));for(l(d,0,5,e,_);i<t&&u>0;){var m,g=0;if(s.readMoreInput(),s.fillBitWindow(),g+=s.val_>>>s.bit_pos_&31,s.bit_pos_+=d[g].bits,(m=255&d[g].value)<p)a=0,n[i++]=m,0!==m&&(r=m,u-=32768>>m);else{var v,y,x=m-14,b=0;if(m===p&&(b=r),c!==b&&(a=0,c=b),v=a,a>0&&(a-=2,a<<=x),i+(y=(a+=s.readBits(x)+3)-v)>t)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var w=0;w<y;w++)n[i+w]=c;i+=y,0!==c&&(u-=y<<15-c)}}if(0!==u)throw new Error("[ReadHuffmanCodeLengths] space = "+u);for(;i<t;i++)n[i]=0}function N(e,t,n,s){var i,r=0,a=new Uint8Array(e);if(s.readMoreInput(),1===(i=s.readBits(2))){for(var c=e-1,u=0,d=new Int32Array(4),h=s.readBits(2)+1;c;)c>>=1,++u;for(p=0;p<h;++p)d[p]=s.readBits(u)%e,a[d[p]]=2;switch(a[d[0]]=1,h){case 1:break;case 3:if(d[0]===d[1]||d[0]===d[2]||d[1]===d[2])throw new Error("[ReadHuffmanCode] invalid symbols");break;case 2:if(d[0]===d[1])throw new Error("[ReadHuffmanCode] invalid symbols");a[d[1]]=1;break;case 4:if(d[0]===d[1]||d[0]===d[2]||d[0]===d[3]||d[1]===d[2]||d[1]===d[3]||d[2]===d[3])throw new Error("[ReadHuffmanCode] invalid symbols");s.readBits(1)?(a[d[2]]=3,a[d[3]]=3):a[d[0]]=2}}else{var p,f=new Uint8Array(_),m=32,g=0,v=[new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,1),new o(2,0),new o(2,4),new o(2,3),new o(3,2),new o(2,0),new o(2,4),new o(2,3),new o(4,5)];for(p=i;p<_&&m>0;++p){var y,b=j[p],w=0;s.fillBitWindow(),w+=s.val_>>>s.bit_pos_&15,s.bit_pos_+=v[w].bits,y=v[w].value,f[b]=y,0!==y&&(m-=32>>y,++g)}if(1!==g&&0!==m)throw new Error("[ReadHuffmanCode] invalid num_codes or space");A(f,e,a,s)}if(0===(r=l(t,n,x,a,e)))throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");return r}function F(e,t,n){var s,i;return s=O(e,t,n),i=u.kBlockLengthPrefixCode[s].nbits,u.kBlockLengthPrefixCode[s].offset+n.readBits(i)}function M(e,t,n){var s;return e<S?(n+=C[e],s=t[n&=3]+k[e]):s=e-S+1,s}function B(e,t){for(var n=e[t],s=t;s;--s)e[s]=e[s-1];e[0]=n}function D(e,t){var n,s=new Uint8Array(256);for(n=0;n<256;++n)s[n]=n;for(n=0;n<t;++n){var i=e[n];e[n]=s[i],i&&B(s,i)}}function R(e,t){this.alphabet_size=e,this.num_htrees=t,this.codes=new Array(t+t*E[e+31>>>5]),this.htrees=new Uint32Array(t)}function L(e,t){var n,s,i={num_htrees:null,context_map:null},r=0;t.readMoreInput();var a=i.num_htrees=I(t)+1,l=i.context_map=new Uint8Array(e);if(a<=1)return i;for(t.readBits(1)&&(r=t.readBits(4)+1),n=[],s=0;s<w;s++)n[s]=new o(0,0);for(N(a+r,n,0,t),s=0;s<e;){var c;if(t.readMoreInput(),0===(c=O(n,0,t)))l[s]=0,++s;else if(c<=r)for(var u=1+(1<<c)+t.readBits(c);--u;){if(s>=e)throw new Error("[DecodeContextMap] i >= context_map_size");l[s]=0,++s}else l[s]=c-r,++s}return t.readBits(1)&&D(l,e),i}function z(e,t,n,s,i,r,a){var o,l=2*n,c=n,u=O(t,n*w,a);(o=0===u?i[l+(1&r[c])]:1===u?i[l+(r[c]-1&1)]+1:u-2)>=e&&(o-=e),s[n]=o,i[l+(1&r[c])]=o,++r[c]}function H(e,t,n,s,i,a){var o,l=i+1,c=n&i,u=a.pos_&r.IBUF_MASK;if(t<8||a.bit_pos_+(t<<3)<a.bit_end_pos_)for(;t-- >0;)a.readMoreInput(),s[c++]=a.readBits(8),c===l&&(e.write(s,l),c=0);else{if(a.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;a.bit_pos_<32;)s[c]=a.val_>>>a.bit_pos_,a.bit_pos_+=8,++c,--t;if(u+(o=a.bit_end_pos_-a.bit_pos_>>3)>r.IBUF_MASK){for(var d=r.IBUF_MASK+1-u,h=0;h<d;h++)s[c+h]=a.buf_[u+h];o-=d,c+=d,t-=d,u=0}for(h=0;h<o;h++)s[c+h]=a.buf_[u+h];if(t-=o,(c+=o)>=l)for(e.write(s,l),c-=l,h=0;h<c;h++)s[h]=s[l+h];for(;c+t>=l;){if(o=l-c,a.input_.read(s,c,o)<o)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");e.write(s,l),t-=o,c=0}if(a.input_.read(s,c,t)<t)throw new Error("[CopyUncompressedBlockToOutput] not enough bytes");a.reset()}}function G(e){var t=e.bit_pos_+7&-8;return 0==e.readBits(t-e.bit_pos_)}function W(e){var t=new s(e),n=new r(t);return P(n),T(n).meta_block_length}function U(e,t){var n=new s(e);null==t&&(t=W(e));var r=new Uint8Array(t),a=new i(r);return q(n,a),a.pos<a.buffer.length&&(a.buffer=a.buffer.subarray(0,a.pos)),a.buffer}function q(e,t){var n,s,i,l,h,p,x,b,_,j=0,C=0,k=0,E=0,V=[16,15,11,4],A=0,B=0,D=0,W=[new R(0,0),new R(0,0),new R(0,0)],U=128+r.READ_SIZE;s=(1<<(k=P(_=new r(e))))-16,l=(i=1<<k)-1,h=new Uint8Array(i+U+a.maxDictionaryWordLength),p=i,x=[],b=[];for(var q=0;q<3*w;q++)x[q]=new o(0,0),b[q]=new o(0,0);for(;!C;){var Z,Y,K,X,Q,J,$,ee,te,ne=0,se=[1<<28,1<<28,1<<28],ie=[0],re=[1,1,1],ae=[0,1,0,1,0,1],oe=[0],le=null,ce=null,ue=null,de=null,he=0,pe=null,fe=0,me=0,ge=0;for(n=0;n<3;++n)W[n].codes=null,W[n].htrees=null;_.readMoreInput();var ve=T(_);if(j+(ne=ve.meta_block_length)>t.buffer.length){var ye=new Uint8Array(j+ne);ye.set(t.buffer),t.buffer=ye}if(C=ve.input_end,Z=ve.is_uncompressed,ve.is_metadata)for(G(_);ne>0;--ne)_.readMoreInput(),_.readBits(8);else if(0!==ne)if(Z)_.bit_pos_=_.bit_pos_+7&-8,H(t,ne,j,h,l,_),j+=ne;else{for(n=0;n<3;++n)re[n]=I(_)+1,re[n]>=2&&(N(re[n]+2,x,n*w,_),N(g,b,n*w,_),se[n]=F(b,n*w,_),oe[n]=1);for(_.readMoreInput(),X=(1<<(Y=_.readBits(2)))-1,Q=(K=S+(_.readBits(4)<<Y))+(48<<Y),ce=new Uint8Array(re[0]),n=0;n<re[0];++n)_.readMoreInput(),ce[n]=_.readBits(2)<<1;var xe=L(re[0]<<v,_);J=xe.num_htrees,le=xe.context_map;var be=L(re[2]<<y,_);for($=be.num_htrees,ue=be.context_map,W[0]=new R(f,J),W[1]=new R(m,re[1]),W[2]=new R(Q,$),n=0;n<3;++n)W[n].decode(_);for(de=0,pe=0,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1],te=W[1].htrees[0];ne>0;){var we,_e,je,Se,Ce,ke,Ee,Pe,Ie,Ve,Te,Oe;for(_.readMoreInput(),0===se[1]&&(z(re[1],x,1,ie,ae,oe,_),se[1]=F(b,w,_),te=W[1].htrees[ie[1]]),--se[1],(_e=(we=O(W[1].codes,te,_))>>6)>=2?(_e-=2,Ee=-1):Ee=0,je=u.kInsertRangeLut[_e]+(we>>3&7),Se=u.kCopyRangeLut[_e]+(7&we),Ce=u.kInsertLengthPrefixCode[je].offset+_.readBits(u.kInsertLengthPrefixCode[je].nbits),ke=u.kCopyLengthPrefixCode[Se].offset+_.readBits(u.kCopyLengthPrefixCode[Se].nbits),B=h[j-1&l],D=h[j-2&l],Ie=0;Ie<Ce;++Ie)_.readMoreInput(),0===se[0]&&(z(re[0],x,0,ie,ae,oe,_),se[0]=F(b,0,_),de=ie[0]<<v,ee=ce[ie[0]],me=c.lookupOffsets[ee],ge=c.lookupOffsets[ee+1]),he=le[de+(c.lookup[me+B]|c.lookup[ge+D])],--se[0],D=B,B=O(W[0].codes,W[0].htrees[he],_),h[j&l]=B,(j&l)===l&&t.write(h,i),++j;if((ne-=Ce)<=0)break;if(Ee<0&&(_.readMoreInput(),0===se[2]&&(z(re[2],x,2,ie,ae,oe,_),se[2]=F(b,2*w,_),pe=ie[2]<<y),--se[2],fe=ue[pe+(255&(ke>4?3:ke-2))],(Ee=O(W[2].codes,W[2].htrees[fe],_))>=K&&(Oe=(Ee-=K)&X,Ee=K+((Ae=(2+(1&(Ee>>=Y))<<(Te=1+(Ee>>1)))-4)+_.readBits(Te)<<Y)+Oe)),(Pe=M(Ee,V,A))<0)throw new Error("[BrotliDecompress] invalid distance");if(Ve=j&l,Pe>(E=j<s&&E!==s?j:s)){if(!(ke>=a.minDictionaryWordLength&&ke<=a.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Ae=a.offsetsByLength[ke],Ne=Pe-E-1,Fe=a.sizeBitsByLength[ke],Me=Ne>>Fe;if(Ae+=(Ne&(1<<Fe)-1)*ke,!(Me<d.kNumTransforms))throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);var Be=d.transformDictionaryWord(h,Ve,Ae,ke,Me);if(j+=Be,ne-=Be,(Ve+=Be)>=p){t.write(h,i);for(var De=0;De<Ve-p;De++)h[De]=h[p+De]}}else{if(Ee>0&&(V[3&A]=Pe,++A),ke>ne)throw new Error("Invalid backward reference. pos: "+j+" distance: "+Pe+" len: "+ke+" bytes left: "+ne);for(Ie=0;Ie<ke;++Ie)h[j&l]=h[j-Pe&l],(j&l)===l&&t.write(h,i),++j,--ne}B=h[j-1&l],D=h[j-2&l]}j&=1073741823}}t.write(h,j&l)}R.prototype.decode=function(e){var t,n=0;for(t=0;t<this.num_htrees;++t)this.htrees[t]=n,n+=N(this.alphabet_size,this.codes,n,e)},n.BrotliDecompressedSize=W,n.BrotliDecompressBuffer=U,n.BrotliDecompress=q,a.init()},{"./bit_reader":1,"./context":2,"./dictionary":6,"./huffman":7,"./prefix":9,"./streams":10,"./transform":11}],4:[function(e,t,n){var s=e("base64-js");n.init=function(){return(0,e("./decode").BrotliDecompressBuffer)(s.toByteArray(e("./dictionary.bin.js")))}},{"./decode":3,"./dictionary.bin.js":5,"base64-js":8}],5:[function(e,t,n){t.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="},{}],6:[function(e,t,n){var s=e("./dictionary-browser");n.init=function(){n.dictionary=s.init()},n.offsetsByLength=new Uint32Array([0,0,0,0,0,4096,9216,21504,35840,44032,53248,63488,74752,87040,93696,100864,104704,106752,108928,113536,115968,118528,119872,121280,122016]),n.sizeBitsByLength=new Uint8Array([0,0,0,0,10,10,11,11,10,10,10,10,10,9,9,8,7,7,8,7,7,6,6,5,5]),n.minDictionaryWordLength=4,n.maxDictionaryWordLength=24},{"./dictionary-browser":4}],7:[function(e,t,n){function s(e,t){this.bits=e,this.value=t}n.HuffmanCode=s;var i=15;function r(e,t){for(var n=1<<t-1;e&n;)n>>=1;return(e&n-1)+n}function a(e,t,n,i,r){do{e[t+(i-=n)]=new s(r.bits,r.value)}while(i>0)}function o(e,t,n){for(var s=1<<t-n;t<i&&!((s-=e[t])<=0);)++t,s<<=1;return t-n}n.BrotliBuildHuffmanTable=function(e,t,n,l,c){var u,d,h,p,f,m,g,v,y,x,b=t,w=new Int32Array(i+1),_=new Int32Array(i+1);for(x=new Int32Array(c),d=0;d<c;d++)w[l[d]]++;for(_[1]=0,u=1;u<i;u++)_[u+1]=_[u]+w[u];for(d=0;d<c;d++)0!==l[d]&&(x[_[l[d]]++]=d);if(y=v=1<<(g=n),1===_[i]){for(h=0;h<y;++h)e[t+h]=new s(0,65535&x[0]);return y}for(h=0,d=0,u=1,p=2;u<=n;++u,p<<=1)for(;w[u]>0;--w[u])a(e,t+h,p,v,new s(255&u,65535&x[d++])),h=r(h,u);for(m=y-1,f=-1,u=n+1,p=2;u<=i;++u,p<<=1)for(;w[u]>0;--w[u])(h&m)!==f&&(t+=v,y+=v=1<<(g=o(w,u,n)),e[b+(f=h&m)]=new s(g+n&255,t-b-f&65535)),a(e,t+(h>>n),p,v,new s(u-n&255,65535&x[d++])),h=r(h,u);return y}},{}],8:[function(e,t,n){"use strict";n.byteLength=u,n.toByteArray=h,n.fromByteArray=m;for(var s=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,l=a.length;o<l;++o)s[o]=a[o],i[a.charCodeAt(o)]=o;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e){var t=c(e),n=t[0],s=t[1];return 3*(n+s)/4-s}function d(e,t,n){return 3*(t+n)/4-n}function h(e){for(var t,n=c(e),s=n[0],a=n[1],o=new r(d(e,s,a)),l=0,u=a>0?s-4:s,h=0;h<u;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],o[l++]=t>>16&255,o[l++]=t>>8&255,o[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,o[l++]=255&t),1===a&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,o[l++]=t>>8&255,o[l++]=255&t),o}function p(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function f(e,t,n){for(var s,i=[],r=t;r<n;r+=3)s=(e[r]<<16&16711680)+(e[r+1]<<8&65280)+(255&e[r+2]),i.push(p(s));return i.join("")}function m(e){for(var t,n=e.length,i=n%3,r=[],a=16383,o=0,l=n-i;o<l;o+=a)r.push(f(e,o,o+a>l?l:o+a));return 1===i?(t=e[n-1],r.push(s[t>>2]+s[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),r.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],9:[function(e,t,n){function s(e,t){this.offset=e,this.nbits=t}n.kBlockLengthPrefixCode=[new s(1,2),new s(5,2),new s(9,2),new s(13,2),new s(17,3),new s(25,3),new s(33,3),new s(41,3),new s(49,4),new s(65,4),new s(81,4),new s(97,4),new s(113,5),new s(145,5),new s(177,5),new s(209,5),new s(241,6),new s(305,6),new s(369,7),new s(497,8),new s(753,9),new s(1265,10),new s(2289,11),new s(4337,12),new s(8433,13),new s(16625,24)],n.kInsertLengthPrefixCode=[new s(0,0),new s(1,0),new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,1),new s(8,1),new s(10,2),new s(14,2),new s(18,3),new s(26,3),new s(34,4),new s(50,4),new s(66,5),new s(98,5),new s(130,6),new s(194,7),new s(322,8),new s(578,9),new s(1090,10),new s(2114,12),new s(6210,14),new s(22594,24)],n.kCopyLengthPrefixCode=[new s(2,0),new s(3,0),new s(4,0),new s(5,0),new s(6,0),new s(7,0),new s(8,0),new s(9,0),new s(10,1),new s(12,1),new s(14,2),new s(18,2),new s(22,3),new s(30,3),new s(38,4),new s(54,4),new s(70,5),new s(102,5),new s(134,6),new s(198,7),new s(326,8),new s(582,9),new s(1094,10),new s(2118,24)],n.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],n.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},{}],10:[function(e,t,n){function s(e){this.buffer=e,this.pos=0}function i(e){this.buffer=e,this.pos=0}s.prototype.read=function(e,t,n){this.pos+n>this.buffer.length&&(n=this.buffer.length-this.pos);for(var s=0;s<n;s++)e[t+s]=this.buffer[this.pos+s];return this.pos+=n,n},n.BrotliInput=s,i.prototype.write=function(e,t){if(this.pos+t>this.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(e.subarray(0,t),this.pos),this.pos+=t,t},n.BrotliOutput=i},{}],11:[function(e,t,n){var s=e("./dictionary"),i=0,r=1,a=2,o=3,l=4,c=5,u=6,d=7,h=8,p=9,f=10,m=11,g=12,v=13,y=14,x=15,b=16,w=17,_=18,j=20;function S(e,t,n){this.prefix=new Uint8Array(e.length),this.transform=t,this.suffix=new Uint8Array(n.length);for(var s=0;s<e.length;s++)this.prefix[s]=e.charCodeAt(s);for(s=0;s<n.length;s++)this.suffix[s]=n.charCodeAt(s)}var C=[new S("",i,""),new S("",i," "),new S(" ",i," "),new S("",g,""),new S("",f," "),new S("",i," the "),new S(" ",i,""),new S("s ",i," "),new S("",i," of "),new S("",f,""),new S("",i," and "),new S("",v,""),new S("",r,""),new S(", ",i," "),new S("",i,", "),new S(" ",f," "),new S("",i," in "),new S("",i," to "),new S("e ",i," "),new S("",i,'"'),new S("",i,"."),new S("",i,'">'),new S("",i,"\n"),new S("",o,""),new S("",i,"]"),new S("",i," for "),new S("",y,""),new S("",a,""),new S("",i," a "),new S("",i," that "),new S(" ",f,""),new S("",i,". "),new S(".",i,""),new S(" ",i,", "),new S("",x,""),new S("",i," with "),new S("",i,"'"),new S("",i," from "),new S("",i," by "),new S("",b,""),new S("",w,""),new S(" the ",i,""),new S("",l,""),new S("",i,". The "),new S("",m,""),new S("",i," on "),new S("",i," as "),new S("",i," is "),new S("",d,""),new S("",r,"ing "),new S("",i,"\n\t"),new S("",i,":"),new S(" ",i,". "),new S("",i,"ed "),new S("",j,""),new S("",_,""),new S("",u,""),new S("",i,"("),new S("",f,", "),new S("",h,""),new S("",i," at "),new S("",i,"ly "),new S(" the ",i," of "),new S("",c,""),new S("",p,""),new S(" ",f,", "),new S("",f,'"'),new S(".",i,"("),new S("",m," "),new S("",f,'">'),new S("",i,'="'),new S(" ",i,"."),new S(".com/",i,""),new S(" the ",i," of the "),new S("",f,"'"),new S("",i,". This "),new S("",i,","),new S(".",i," "),new S("",f,"("),new S("",f,"."),new S("",i," not "),new S(" ",i,'="'),new S("",i,"er "),new S(" ",m," "),new S("",i,"al "),new S(" ",m,""),new S("",i,"='"),new S("",m,'"'),new S("",f,". "),new S(" ",i,"("),new S("",i,"ful "),new S(" ",f,". "),new S("",i,"ive "),new S("",i,"less "),new S("",m,"'"),new S("",i,"est "),new S(" ",f,"."),new S("",m,'">'),new S(" ",i,"='"),new S("",f,","),new S("",i,"ize "),new S("",m,"."),new S(" ",i,""),new S(" ",i,","),new S("",f,'="'),new S("",m,'="'),new S("",i,"ous "),new S("",m,", "),new S("",f,"='"),new S(" ",f,","),new S(" ",m,'="'),new S(" ",m,", "),new S("",m,","),new S("",m,"("),new S("",m,". "),new S(" ",m,"."),new S("",m,"='"),new S(" ",m,". "),new S(" ",f,'="'),new S(" ",m,"='"),new S(" ",f,"='")];function k(e,t){return e[t]<192?(e[t]>=97&&e[t]<=122&&(e[t]^=32),1):e[t]<224?(e[t+1]^=32,2):(e[t+2]^=5,3)}n.kTransforms=C,n.kNumTransforms=C.length,n.transformDictionaryWord=function(e,t,n,i,r){var a,o=C[r].prefix,l=C[r].suffix,c=C[r].transform,u=c<g?0:c-(g-1),d=0,h=t;u>i&&(u=i);for(var v=0;v<o.length;)e[t++]=o[v++];for(n+=u,i-=u,c<=p&&(i-=c),d=0;d<i;d++)e[t++]=s.dictionary[n+d];if(a=t-i,c===f)k(e,a);else if(c===m)for(;i>0;){var y=k(e,a);a+=y,i-=y}for(var x=0;x<l.length;)e[t++]=l[x++];return t-h}},{"./dictionary":6}],12:[function(e,t,n){t.exports=e("./dec/decode").BrotliDecompressBuffer},{"./dec/decode":3}]},{},[12])(12)},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},n=Object.keys(t).join("|"),s=new RegExp(n,"g"),i=new RegExp(n,"");function r(e){return t[e]}var a=function(e){return e.replace(s,r)};e.exports=a,e.exports.has=function(e){return!!e.match(i)},e.exports.remove=a}},s={};function i(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var r=Object.create(null);i.r(r);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,i.d(r,a),r},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";i.r(r),i.d(r,{PluginMoreMenuItem:()=>GV,PluginSidebar:()=>WV,PluginSidebarMoreMenuItem:()=>UV,PluginTemplateSettingPanel:()=>Oo,initializeEditor:()=>$V,initializePostsDashboard:()=>QV,reinitializeEditor:()=>eT,store:()=>Rt});var e={};i.r(e),i.d(e,{__experimentalSetPreviewDeviceType:()=>ze,addTemplate:()=>Ge,closeGeneralSidebar:()=>at,openGeneralSidebar:()=>rt,openNavigationPanelToMenu:()=>Je,removeTemplate:()=>We,revertTemplate:()=>it,setEditedEntity:()=>Ze,setEditedPostContext:()=>Ke,setHasPageContentFocus:()=>lt,setHomeTemplateId:()=>Ye,setIsInserterOpened:()=>et,setIsListViewOpened:()=>tt,setIsNavigationPanelOpened:()=>$e,setIsSaveViewOpened:()=>st,setNavigationMenu:()=>qe,setNavigationPanelActiveMenu:()=>Qe,setPage:()=>Xe,setTemplate:()=>He,setTemplatePart:()=>Ue,switchEditorMode:()=>ot,toggleDistractionFree:()=>ct,toggleFeature:()=>Le,updateSettings:()=>nt});var t={};i.r(t),i.d(t,{registerRoute:()=>dt,setEditorCanvasContainerView:()=>ut,unregisterRoute:()=>ht});var n={};i.r(n),i.d(n,{__experimentalGetInsertionPoint:()=>Ct,__experimentalGetPreviewDeviceType:()=>mt,getCanUserCreateMedia:()=>gt,getCurrentTemplateNavigationPanelSubMenu:()=>Tt,getCurrentTemplateTemplateParts:()=>It,getEditedPostContext:()=>_t,getEditedPostId:()=>wt,getEditedPostType:()=>bt,getEditorMode:()=>Vt,getHomeTemplateId:()=>xt,getNavigationPanelActiveMenu:()=>Ot,getPage:()=>jt,getReusableBlocks:()=>vt,getSettings:()=>yt,hasPageContentFocus:()=>Ft,isFeatureActive:()=>ft,isInserterOpened:()=>St,isListViewOpened:()=>kt,isNavigationOpened:()=>At,isPage:()=>Nt,isSaveViewOpened:()=>Et});var s={};i.r(s),i.d(s,{getEditorCanvasContainerView:()=>Mt,getRoutes:()=>Bt});const a=window.ReactJSXRuntime,o=window.wp.blocks,l=window.wp.blockLibrary;var c=i(7143);const u=window.wp.deprecated;var d=i.n(u),h=i(6087);const f=window.wp.editor;var m=i(1233);const g=window.wp.widgets,v=window.wp.hooks,y=window.wp.compose,x=window.wp.blockEditor,b=window.wp.components,w=window.wp.i18n,_=window.wp.notices,j=window.wp.coreData;var S={grad:.9,turn:360,rad:360/(2*Math.PI)},C=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},k=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},E=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},P=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},I=function(e){return{r:E(e.r,0,255),g:E(e.g,0,255),b:E(e.b,0,255),a:E(e.a)}},V=function(e){return{r:k(e.r),g:k(e.g),b:k(e.b),a:k(e.a,3)}},T=/^#([0-9a-f]{3,8})$/i,O=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},A=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,r=Math.max(t,n,s),a=r-Math.min(t,n,s),o=a?r===t?(n-s)/a:r===n?2+(s-t)/a:4+(t-n)/a:0;return{h:60*(o<0?o+6:o),s:r?a/r*100:0,v:r/255*100,a:i}},N=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var r=Math.floor(t),a=s*(1-n),o=s*(1-(t-r)*n),l=s*(1-(1-t+r)*n),c=r%6;return{r:255*[s,o,a,a,l,s][c],g:255*[l,s,s,o,a,a][c],b:255*[a,a,l,s,s,o][c],a:i}},F=function(e){return{h:P(e.h),s:E(e.s,0,100),l:E(e.l,0,100),a:E(e.a)}},M=function(e){return{h:k(e.h),s:k(e.s),l:k(e.l),a:k(e.a,3)}},B=function(e){return N((n=(t=e).s,{h:t.h,s:(n*=((s=t.l)<50?s:100-s)/100)>0?2*n/(s+n)*100:0,v:s+n,a:t.a}));var t,n,s},D=function(e){return{h:(t=A(e)).h,s:(i=(200-(n=t.s))*(s=t.v)/100)>0&&i<200?n*s/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,s,i},R=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,L=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,z=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,H=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,G={string:[[function(e){var t=T.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?k(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?k(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=z.exec(e)||H.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:I({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=R.exec(e)||L.exec(e);if(!t)return null;var n,s,i=F({h:(n=t[1],s=t[2],void 0===s&&(s="deg"),Number(n)*(S[s]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return B(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,s=e.b,i=e.a,r=void 0===i?1:i;return C(t)&&C(n)&&C(s)?I({r:Number(t),g:Number(n),b:Number(s),a:Number(r)}):null},"rgb"],[function(e){var t=e.h,n=e.s,s=e.l,i=e.a,r=void 0===i?1:i;if(!C(t)||!C(n)||!C(s))return null;var a=F({h:Number(t),s:Number(n),l:Number(s),a:Number(r)});return B(a)},"hsl"],[function(e){var t=e.h,n=e.s,s=e.v,i=e.a,r=void 0===i?1:i;if(!C(t)||!C(n)||!C(s))return null;var a=function(e){return{h:P(e.h),s:E(e.s,0,100),v:E(e.v,0,100),a:E(e.a)}}({h:Number(t),s:Number(n),v:Number(s),a:Number(r)});return N(a)},"hsv"]]},W=function(e,t){for(var n=0;n<t.length;n++){var s=t[n][0](e);if(s)return[s,t[n][1]]}return[null,void 0]},U=function(e){return"string"==typeof e?W(e.trim(),G.string):"object"==typeof e&&null!==e?W(e,G.object):[null,void 0]},q=function(e,t){var n=D(e);return{h:n.h,s:E(n.s+100*t,0,100),l:n.l,a:n.a}},Z=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Y=function(e,t){var n=D(e);return{h:n.h,s:n.s,l:E(n.l+100*t,0,100),a:n.a}},K=function(){function e(e){this.parsed=U(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return k(Z(this.rgba),2)},e.prototype.isDark=function(){return Z(this.rgba)<.5},e.prototype.isLight=function(){return Z(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=V(this.rgba)).r,n=e.g,s=e.b,r=(i=e.a)<1?O(k(255*i)):"","#"+O(t)+O(n)+O(s)+r;var e,t,n,s,i,r},e.prototype.toRgb=function(){return V(this.rgba)},e.prototype.toRgbString=function(){return t=(e=V(this.rgba)).r,n=e.g,s=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+s+", "+i+")":"rgb("+t+", "+n+", "+s+")";var e,t,n,s,i},e.prototype.toHsl=function(){return M(D(this.rgba))},e.prototype.toHslString=function(){return t=(e=M(D(this.rgba))).h,n=e.s,s=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+s+"%, "+i+")":"hsl("+t+", "+n+"%, "+s+"%)";var e,t,n,s,i},e.prototype.toHsv=function(){return e=A(this.rgba),{h:k(e.h),s:k(e.s),v:k(e.v),a:k(e.a,3)};var e},e.prototype.invert=function(){return X({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),X(q(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),X(q(this.rgba,-e))},e.prototype.grayscale=function(){return X(q(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),X(Y(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),X(Y(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?X({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):k(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=D(this.rgba);return"number"==typeof e?X({h:e,s:t.s,l:t.l,a:t.a}):k(t.h)},e.prototype.isEqual=function(e){return this.toHex()===X(e).toHex()},e}(),X=function(e){return e instanceof K?e:new K(e)},Q=[],J=function(e){var t=e/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},$=function(e){return.2126*J(e.r)+.7152*J(e.g)+.0722*J(e.b)};const ee=window.wp.privateApis,{lock:te,unlock:ne}=(0,ee.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/edit-site"),{useGlobalSetting:se,useGlobalStyle:ie}=ne(x.privateApis);function re(){const[e="black"]=ie("color.text"),[t="white"]=ie("color.background"),[n=e]=ie("elements.h1.color.text"),[s=n]=ie("elements.link.color.text"),[i=s]=ie("elements.button.color.background"),[r]=se("color.palette.core"),[a]=se("color.palette.theme"),[o]=se("color.palette.custom"),l=(a??[]).concat(o??[]).concat(r??[]),c=l.filter((({color:t})=>t===e)),u=l.filter((({color:e})=>e===i));return{paletteColors:l,highlightedColors:c.concat(u).concat(l).filter((({color:e})=>e!==t)).slice(0,2)}}function ae(e,t,n){return e&&"object"==typeof e?(t.reduce(((e,s,i)=>(void 0===e[s]&&(Number.isInteger(t[i+1])?e[s]=[]:e[s]={}),i===t.length-1&&(e[s]=n),e[s])),e),e):e}!function(e){e.forEach((function(e){Q.indexOf(e)<0&&(e(K,G),Q.push(e))}))}([function(e){e.prototype.luminance=function(){return e=$(this.rgba),void 0===(t=2)&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0;var e,t,n},e.prototype.contrast=function(t){void 0===t&&(t="#FFF");var n,s,i,r,a,o,l,c=t instanceof e?t:new e(t);return r=this.rgba,a=c.toRgb(),n=(o=$(r))>(l=$(a))?(o+.05)/(l+.05):(l+.05)/(o+.05),void 0===(s=2)&&(s=0),void 0===i&&(i=Math.pow(10,s)),Math.floor(i*n)/i+0},e.prototype.isReadable=function(e,t){return void 0===e&&(e="#FFF"),void 0===t&&(t={}),this.contrast(e)>=(a=void 0===(r=(n=t).size)?"normal":r,"AAA"===(i=void 0===(s=n.level)?"AA":s)&&"normal"===a?7:"AA"===i&&"large"===a?3:4.5);var n,s,i,r,a}}]);const{cleanEmptyObject:oe,GlobalStylesContext:le}=ne(x.privateApis),ce={...o.__EXPERIMENTAL_STYLE_PROPERTY,blockGap:{value:["spacing","blockGap"]}},ue={"border.color":"color","color.background":"color","color.text":"color","elements.link.color.text":"color","elements.link.:hover.color.text":"color","elements.link.typography.fontFamily":"font-family","elements.link.typography.fontSize":"font-size","elements.button.color.text":"color","elements.button.color.background":"color","elements.button.typography.fontFamily":"font-family","elements.button.typography.fontSize":"font-size","elements.caption.color.text":"color","elements.heading.color":"color","elements.heading.color.background":"color","elements.heading.typography.fontFamily":"font-family","elements.heading.gradient":"gradient","elements.heading.color.gradient":"gradient","elements.h1.color":"color","elements.h1.color.background":"color","elements.h1.typography.fontFamily":"font-family","elements.h1.color.gradient":"gradient","elements.h2.color":"color","elements.h2.color.background":"color","elements.h2.typography.fontFamily":"font-family","elements.h2.color.gradient":"gradient","elements.h3.color":"color","elements.h3.color.background":"color","elements.h3.typography.fontFamily":"font-family","elements.h3.color.gradient":"gradient","elements.h4.color":"color","elements.h4.color.background":"color","elements.h4.typography.fontFamily":"font-family","elements.h4.color.gradient":"gradient","elements.h5.color":"color","elements.h5.color.background":"color","elements.h5.typography.fontFamily":"font-family","elements.h5.color.gradient":"gradient","elements.h6.color":"color","elements.h6.color.background":"color","elements.h6.typography.fontFamily":"font-family","elements.h6.color.gradient":"gradient","color.gradient":"gradient",blockGap:"spacing","typography.fontSize":"font-size","typography.fontFamily":"font-family"},de={"border.color":"borderColor","color.background":"backgroundColor","color.text":"textColor","color.gradient":"gradient","typography.fontSize":"fontSize","typography.fontFamily":"fontFamily"},he=["border","color","spacing","typography"],pe=(e,t)=>{let n=e;return t.forEach((e=>{n=n?.[e]})),n},fe=["borderColor","borderWidth","borderStyle"],me=["top","right","bottom","left"];function ge(e,t,n){if(!t?.[e]||n?.[e]?.style)return[];const{color:s,style:i,width:r}=t[e];return!(s||r)||i?[]:[{path:["border",e,"style"],value:"solid"}]}function ve(e,t,n){const s=function(e,t){const{supportedPanels:n}=(0,c.useSelect)((n=>({supportedPanels:ne(n(o.store)).getSupportedStyles(e,t)})),[e,t]);return n}(e),i=n?.styles?.blocks?.[e];return(0,h.useMemo)((()=>{const e=s.flatMap((e=>{if(!ce[e])return[];const{value:n}=ce[e],s=n.join("."),i=t[de[s]],r=i?`var:preset|${ue[s]}|${i}`:pe(t.style,n);if("linkColor"===e){const e=r?[{path:n,value:r}]:[],s=["elements","link",":hover","color","text"],i=pe(t.style,s);return i&&e.push({path:s,value:i}),e}if(fe.includes(e)&&r){const e=[{path:n,value:r}];return me.forEach((t=>{const s=[...n];s.splice(-1,0,t),e.push({path:s,value:r})})),e}return r?[{path:n,value:r}]:[]}));return function(e,t,n){if(!e&&!t)return[];const s=[...ge("top",e,n),...ge("right",e,n),...ge("bottom",e,n),...ge("left",e,n)],{color:i,style:r,width:a}=e||{};return(t||i||a)&&!r&&me.forEach((e=>{n?.[e]?.style||s.push({path:["border",e,"style"],value:"solid"})})),s}(t.style?.border,t.borderColor,i?.border).forEach((t=>e.push(t))),e}),[s,t,i])}function ye({name:e,attributes:t,setAttributes:n}){const{user:s,setUserConfig:i}=(0,h.useContext)(le),r=ve(e,t,s),{__unstableMarkNextChangeAsNotPersistent:l}=(0,c.useDispatch)(x.store),{createSuccessNotice:u}=(0,c.useDispatch)(_.store),d=(0,h.useCallback)((()=>{if(0!==r.length&&r.length>0){const{style:a}=t,c=structuredClone(a),d=structuredClone(s);for(const{path:t,value:n}of r)ae(c,t,void 0),ae(d,["styles","blocks",e,...t],n);const h={borderColor:void 0,backgroundColor:void 0,textColor:void 0,gradient:void 0,fontSize:void 0,fontFamily:void 0,style:oe(c)};l(),n(h),i(d,{undoIgnore:!0}),u((0,w.sprintf)((0,w.__)("%s styles applied."),(0,o.getBlockType)(e).title),{type:"snackbar",actions:[{label:(0,w.__)("Undo"),onClick(){l(),n(t),i(s,{undoIgnore:!0})}}]})}}),[l,t,r,u,e,n,i,s]);return(0,a.jsxs)(b.BaseControl,{__nextHasNoMarginBottom:!0,className:"edit-site-push-changes-to-global-styles-control",help:(0,w.sprintf)((0,w.__)("Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks."),(0,o.getBlockType)(e).title),children:[(0,a.jsx)(b.BaseControl.VisualLabel,{children:(0,w.__)("Styles")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",accessibleWhenDisabled:!0,disabled:0===r.length,onClick:d,children:(0,w.__)("Apply globally")})]})}function xe(e){const t=(0,x.useBlockEditingMode)(),n=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.is_block_theme),[]),s=he.some((t=>(0,o.hasBlockSupport)(e.name,t)));return"default"===t&&s&&n?(0,a.jsx)(x.InspectorAdvancedControls,{children:(0,a.jsx)(ye,{...e})}):null}const be=(0,y.createHigherOrderComponent)((e=>t=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e,{...t},"edit"),t.isSelected&&(0,a.jsx)(xe,{...t})]})));(0,v.addFilter)("editor.BlockEdit","core/edit-site/push-changes-to-global-styles",be);var we=(0,c.combineReducers)({settings:function(e={},t){return"UPDATE_SETTINGS"===t.type?{...e,...t.settings}:e},editedPost:function(e={},t){switch(t.type){case"SET_EDITED_POST":return{postType:t.postType,id:t.id,context:t.context};case"SET_EDITED_POST_CONTEXT":return{...e,context:t.context}}return e},saveViewPanel:function(e=!1,t){return"SET_IS_SAVE_VIEW_OPENED"===t.type?t.isOpen:e},editorCanvasContainerView:function(e=void 0,t){return"SET_EDITOR_CANVAS_CONTAINER_VIEW"===t.type?t.view:e},routes:function(e=[],t){switch(t.type){case"REGISTER_ROUTE":return[...e,t.route];case"UNREGISTER_ROUTE":return e.filter((e=>e.name!==t.name))}return e}});const _e=window.wp.patterns,je="wp_navigation",Se="wp_template",Ce="wp_template_part",ke="custom",Ee="uncategorized",Pe="all-parts",{PATTERN_TYPES:Ie,PATTERN_DEFAULT_CATEGORY:Ve,PATTERN_USER_CATEGORY:Te,EXCLUDED_PATTERN_SOURCES:Oe,PATTERN_SYNC_TYPES:Ae}=ne(_e.privateApis),Ne=[Ce,je,Ie.user],Fe={[Se]:(0,w.__)("Template"),[Ce]:(0,w.__)("Template part"),[Ie.user]:(0,w.__)("Pattern"),[je]:(0,w.__)("Navigation")},Me="grid",Be="table",De="isAny",{interfaceStore:Re}=ne(f.privateApis);function Le(e){return function({registry:t}){d()("dispatch( 'core/edit-site' ).toggleFeature( featureName )",{since:"6.0",alternative:"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )"}),t.dispatch(m.store).toggle("core/edit-site",e)}}const ze=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType",{since:"6.5",version:"6.7",hint:"registry.dispatch( editorStore ).setDeviceType"}),t.dispatch(f.store).setDeviceType(e)};function He(){return d()("dispatch( 'core/edit-site' ).setTemplate",{since:"6.5",version:"6.8",hint:"The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}const Ge=e=>async({dispatch:t,registry:n})=>{d()("dispatch( 'core/edit-site' ).addTemplate",{since:"6.5",version:"6.8",hint:"use saveEntityRecord directly"});const s=await n.dispatch(j.store).saveEntityRecord("postType",Se,e);e.content&&n.dispatch(j.store).editEntityRecord("postType",Se,s.id,{blocks:(0,o.parse)(e.content)},{undoIgnore:!0}),t({type:"SET_EDITED_POST",postType:Se,id:s.id})},We=e=>({registry:t})=>ne(t.dispatch(f.store)).removeTemplates([e]);function Ue(e){return d()("dispatch( 'core/edit-site' ).setTemplatePart",{since:"6.8"}),{type:"SET_EDITED_POST",postType:Ce,id:e}}function qe(e){return d()("dispatch( 'core/edit-site' ).setNavigationMenu",{since:"6.8"}),{type:"SET_EDITED_POST",postType:je,id:e}}function Ze(e,t,n){return{type:"SET_EDITED_POST",postType:e,id:t,context:n}}function Ye(){return d()("dispatch( 'core/edit-site' ).setHomeTemplateId",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Ke(e){return d()("dispatch( 'core/edit-site' ).setEditedPostContext",{since:"6.8"}),{type:"SET_EDITED_POST_CONTEXT",context:e}}function Xe(){return d()("dispatch( 'core/edit-site' ).setPage",{since:"6.5",version:"6.8",hint:"The setPage is not needed anymore, the correct entity is resolved from the URL automatically."}),{type:"NOTHING"}}function Qe(){return d()("dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function Je(){return d()("dispatch( 'core/edit-site' ).openNavigationPanelToMenu",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}function $e(){return d()("dispatch( 'core/edit-site' ).setIsNavigationPanelOpened",{since:"6.2",version:"6.4"}),{type:"NOTHING"}}const et=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).setIsInserterOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsInserterOpened"}),t.dispatch(f.store).setIsInserterOpened(e)},tt=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).setIsListViewOpened",{since:"6.5",alternative:"dispatch( 'core/editor').setIsListViewOpened"}),t.dispatch(f.store).setIsListViewOpened(e)};function nt(e){return{type:"UPDATE_SETTINGS",settings:e}}function st(e){return{type:"SET_IS_SAVE_VIEW_OPENED",isOpen:e}}const it=(e,t)=>({registry:n})=>ne(n.dispatch(f.store)).revertTemplate(e,t),rt=e=>({registry:t})=>{t.dispatch(Re).enableComplementaryArea("core",e)},at=()=>({registry:e})=>{e.dispatch(Re).disableComplementaryArea("core")},ot=e=>({registry:t})=>{d()("dispatch( 'core/edit-site' ).switchEditorMode",{since:"6.6",alternative:"dispatch( 'core/editor').switchEditorMode"}),t.dispatch(f.store).switchEditorMode(e)},lt=e=>({dispatch:t,registry:n})=>{d()("dispatch( 'core/edit-site' ).setHasPageContentFocus",{since:"6.5"}),e&&n.dispatch(x.store).clearSelectedBlock(),t({type:"SET_HAS_PAGE_CONTENT_FOCUS",hasPageContentFocus:e})},ct=()=>({registry:e})=>{d()("dispatch( 'core/edit-site' ).toggleDistractionFree",{since:"6.6",alternative:"dispatch( 'core/editor').toggleDistractionFree"}),e.dispatch(f.store).toggleDistractionFree()},ut=e=>({dispatch:t})=>{t({type:"SET_EDITOR_CANVAS_CONTAINER_VIEW",view:e})};function dt(e){return{type:"REGISTER_ROUTE",route:e}}function ht(e){return{type:"UNREGISTER_ROUTE",name:e}}const pt=[];const ft=(0,c.createRegistrySelector)((e=>(t,n)=>(d()("select( 'core/edit-site' ).isFeatureActive",{since:"6.0",alternative:"select( 'core/preferences' ).get"}),!!e(m.store).get("core/edit-site",n)))),mt=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).__experimentalGetPreviewDeviceType",{since:"6.5",version:"6.7",alternative:"select( 'core/editor' ).getDeviceType"}),e(f.store).getDeviceType()))),gt=(0,c.createRegistrySelector)((e=>()=>(d()("wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()",{since:"6.7",alternative:"wp.data.select( 'core' ).canUser( 'create', { kind: 'postType', type: 'attachment' } )"}),e(j.store).canUser("create","media")))),vt=(0,c.createRegistrySelector)((e=>()=>{d()("select( 'core/edit-site' ).getReusableBlocks()",{since:"6.5",version:"6.8",alternative:"select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )"});return"web"===h.Platform.OS?e(j.store).getEntityRecords("postType","wp_block",{per_page:-1}):[]}));function yt(e){return e.settings}function xt(){d()("select( 'core/edit-site' ).getHomeTemplateId",{since:"6.2",version:"6.4"})}function bt(e){return d()("select( 'core/edit-site' ).getEditedPostType",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),e.editedPost.postType}function wt(e){return d()("select( 'core/edit-site' ).getEditedPostId",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostId"}),e.editedPost.id}function _t(e){return d()("select( 'core/edit-site' ).getEditedPostContext",{since:"6.8"}),e.editedPost.context}function jt(e){return d()("select( 'core/edit-site' ).getPage",{since:"6.8"}),{context:e.editedPost.context}}const St=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).isInserterOpened",{since:"6.5",alternative:"select( 'core/editor' ).isInserterOpened"}),e(f.store).isInserterOpened()))),Ct=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).__experimentalGetInsertionPoint",{since:"6.5",version:"6.7"}),ne(e(f.store)).getInserter()))),kt=(0,c.createRegistrySelector)((e=>()=>(d()("select( 'core/edit-site' ).isListViewOpened",{since:"6.5",alternative:"select( 'core/editor' ).isListViewOpened"}),e(f.store).isListViewOpened())));function Et(e){return e.saveViewPanel}function Pt(e){const t=e(j.store).getEntityRecords("postType",Ce,{per_page:-1}),{getBlocksByName:n,getBlocksByClientId:s}=e(x.store);return[s(n("core/template-part")),t]}const It=(0,c.createRegistrySelector)((e=>(0,c.createSelector)((()=>(d()("select( 'core/edit-site' ).getCurrentTemplateTemplateParts()",{since:"6.7",version:"6.9",alternative:"select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )"}),function(e=pt,t){const n=t?t.reduce(((e,t)=>({...e,[t.id]:t})),{}):{},s=[],i=[...e];for(;i.length;){const{innerBlocks:e,...t}=i.shift();if(i.unshift(...e),(0,o.isTemplatePart)(t)){const{attributes:{theme:e,slug:i}}=t,r=n[`${e}//${i}`];r&&s.push({templatePart:r,block:t})}}return s}(...Pt(e)))),(()=>Pt(e))))),Vt=(0,c.createRegistrySelector)((e=>()=>e(m.store).get("core","editorMode")));function Tt(){d()("dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu",{since:"6.2",version:"6.4"})}function Ot(){d()("dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu",{since:"6.2",version:"6.4"})}function At(){d()("dispatch( 'core/edit-site' ).isNavigationOpened",{since:"6.2",version:"6.4"})}function Nt(e){return d()("select( 'core/edit-site' ).isPage",{since:"6.8",alternative:"select( 'core/editor' ).getCurrentPostType"}),!!e.editedPost.context?.postId}function Ft(){return d()("select( 'core/edit-site' ).hasPageContentFocus",{since:"6.5"}),!1}function Mt(e){return e.editorCanvasContainerView}function Bt(e){return e.routes}const Dt={reducer:we,actions:e,selectors:n},Rt=(0,c.createReduxStore)("core/edit-site",Dt);(0,c.register)(Rt),ne(Rt).registerPrivateSelectors(s),ne(Rt).registerPrivateActions(t);const Lt=window.wp.router;function zt(e){var t,n,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zt(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}const Ht=function(){for(var e,t,n=0,s="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zt(e))&&(s&&(s+=" "),s+=t);return s},Gt=(0,h.forwardRef)((({children:e,className:t,ariaLabel:n,as:s="div",...i},r)=>(0,a.jsx)(s,{ref:r,className:Ht("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...i,children:e})));Gt.displayName="NavigableRegion";var Wt=Gt;const Ut=window.wp.plugins,qt=window.wp.htmlEntities,Zt=window.wp.primitives;var Yt=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const Kt=window.wp.commands,Xt=window.wp.keycodes,Qt=window.wp.url;var Jt=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,a.jsx)(Zt.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});var $t=function({className:e}){const{isRequestingSite:t,siteIconUrl:n}=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(j.store),n=t("root","__unstableBase",void 0);return{isRequestingSite:!n,siteIconUrl:n?.site_icon_url}}),[]);if(t&&!n)return(0,a.jsx)("div",{className:"edit-site-site-icon__image"});const s=n?(0,a.jsx)("img",{className:"edit-site-site-icon__image",alt:(0,w.__)("Site Icon"),src:n}):(0,a.jsx)(b.Icon,{className:"edit-site-site-icon__icon",icon:Jt,size:48});return(0,a.jsx)("div",{className:Ht(e,"edit-site-site-icon"),children:s})};const en=window.wp.dom,tn=(0,h.createContext)((()=>{}));function nn(){let e={direction:null,focusSelector:null};return{get:()=>e,navigate(t,n=null){e={direction:t,focusSelector:"forward"===t&&n?n:e.focusSelector}}}}function sn({children:e,shouldAnimate:t}){const n=(0,h.useContext)(tn),s=(0,h.useRef)(),[i,r]=(0,h.useState)(null);(0,h.useLayoutEffect)((()=>{const{direction:e,focusSelector:t}=n.get();!function(e,t,n){let s;if("back"===t&&n&&(s=e.querySelector(n)),null!==t&&!s){const[t]=en.focus.tabbable.find(e);s=t??e}s?.focus()}(s.current,e,t),r(e)}),[n]);const o=Ht("edit-site-sidebar__screen-wrapper",t?{"slide-from-left":"back"===i,"slide-from-right":"forward"===i}:{});return(0,a.jsx)("div",{ref:s,className:o,children:e})}function rn({children:e}){const[t]=(0,h.useState)(nn);return(0,a.jsx)(tn.Provider,{value:t,children:e})}function an({routeKey:e,shouldAnimate:t,children:n}){return(0,a.jsx)("div",{className:"edit-site-sidebar__content",children:(0,a.jsx)(sn,{shouldAnimate:t,children:n},e)})}tn.displayName="SidebarNavigationContext";const{useLocation:on,useHistory:ln}=ne(Lt.privateApis),cn=(0,h.memo)((0,h.forwardRef)((({isTransparent:e},t)=>{const{dashboardLink:n,homeUrl:s,siteTitle:i}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),{getEntityRecord:n}=e(j.store),s=n("root","site");return{dashboardLink:t().__experimentalDashboardLink,homeUrl:n("root","__unstableBase")?.home,siteTitle:!s?.title&&s?.url?(0,Qt.filterURLForDisplay)(s?.url):s?.title}}),[]),{open:r}=(0,c.useDispatch)(Kt.store);return(0,a.jsx)("div",{className:"edit-site-site-hub",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,a.jsx)("div",{className:Ht("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,ref:t,href:n,label:(0,w.__)("Go to the Dashboard"),className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5333) translateX(-4px)",borderRadius:4},children:(0,a.jsx)($t,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)("div",{className:"edit-site-site-hub__title",children:(0,a.jsxs)(b.Button,{__next40pxDefaultSize:!0,variant:"link",href:s,target:"_blank",children:[(0,qt.decodeEntities)(i),(0,a.jsx)(b.VisuallyHidden,{as:"span",children:(0,w.__)("(opens in a new tab)")})]})}),(0,a.jsx)(b.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,a.jsx)(b.Button,{size:"compact",className:"edit-site-site-hub_toggle-command-center",icon:Yt,onClick:()=>r(),label:(0,w.__)("Open command palette"),shortcut:Xt.displayShortcut.primary("k")})})]})]})})})));var un=cn;const dn=(0,h.memo)((0,h.forwardRef)((({isTransparent:e},t)=>{const{path:n}=on(),s=ln(),{navigate:i}=(0,h.useContext)(tn),{dashboardLink:r,homeUrl:o,siteTitle:l,isBlockTheme:u,isClassicThemeWithStyleBookSupport:d}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),{getEntityRecord:n,getCurrentTheme:s}=e(j.store),i=n("root","site"),r=s(),a=t(),o=r.theme_supports["editor-styles"],l=a.supportsLayout;return{dashboardLink:a.__experimentalDashboardLink,homeUrl:n("root","__unstableBase")?.home,siteTitle:!i?.title&&i?.url?(0,Qt.filterURLForDisplay)(i?.url):i?.title,isBlockTheme:r?.is_block_theme,isClassicThemeWithStyleBookSupport:!r?.is_block_theme&&(o||l)}}),[]),{open:p}=(0,c.useDispatch)(Kt.store);let f;"/"!==n&&(u||d?f="/":"/pattern"!==n&&(f="/pattern"));const m={href:f?void 0:r,label:f?(0,w.__)("Go to Site Editor"):(0,w.__)("Go to the Dashboard"),onClick:f?()=>{s.navigate(f),i("back")}:void 0};return(0,a.jsx)("div",{className:"edit-site-site-hub",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",spacing:"0",children:[(0,a.jsx)("div",{className:Ht("edit-site-site-hub__view-mode-toggle-container",{"has-transparent-background":e}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,ref:t,className:"edit-site-layout__view-mode-toggle",style:{transform:"scale(0.5)",borderRadius:4},...m,children:(0,a.jsx)($t,{className:"edit-site-layout__view-mode-toggle-icon"})})}),(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)("div",{className:"edit-site-site-hub__title",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"link",href:o,target:"_blank",label:(0,w.__)("View site (opens in a new tab)"),children:(0,qt.decodeEntities)(l)})}),(0,a.jsx)(b.__experimentalHStack,{spacing:0,expanded:!1,className:"edit-site-site-hub__actions",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:"edit-site-site-hub_toggle-command-center",icon:Yt,onClick:()=>p(),label:(0,w.__)("Open command palette"),shortcut:Xt.displayShortcut.primary("k")})})]})]})})}))),{useLocation:hn,useHistory:pn}=ne(Lt.privateApis),fn={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0},mn=320,gn=9/19.5,vn={width:"100%",height:"100%"};function yn(e,t){const n=1-Math.max(0,Math.min(1,(e-mn)/980)),s=((e,t,n)=>e+(t-e)*n)(t,gn,n);return e/s}var xn=function e({isFullWidth:t,isOversized:n,setIsOversized:s,isReady:i,children:r,defaultSize:o,innerContentStyle:l}){const u=pn(),{path:d,query:p}=hn(),{canvas:f="view"}=p,m=(0,y.useReducedMotion)(),[g,v]=(0,h.useState)(vn),[x,_]=(0,h.useState)(),[S,C]=(0,h.useState)(!1),[k,E]=(0,h.useState)(!1),[P,I]=(0,h.useState)(1),V={type:"tween",duration:S?0:.5},T=(0,h.useRef)(null),O=(0,y.useInstanceId)(e,"edit-site-resizable-frame-handle-help"),A=o.width/o.height,N=(0,c.useSelect)((e=>{const{getCurrentTheme:t}=e(j.store);return t()?.is_block_theme}),[]),F={default:{flexGrow:0,height:g.height},fullWidth:{flexGrow:1,height:g.height}},M={hidden:{opacity:0,...(0,w.isRTL)()?{right:0}:{left:0}},visible:{opacity:1,...(0,w.isRTL)()?{right:-14}:{left:-14}},active:{opacity:1,...(0,w.isRTL)()?{right:-14}:{left:-14},scaleY:1.3}},B=S?"active":k?"visible":"hidden";return(0,a.jsx)(b.ResizableBox,{as:b.__unstableMotion.div,ref:T,initial:!1,variants:F,animate:t?"fullWidth":"default",onAnimationComplete:e=>{"fullWidth"===e&&v({width:"100%",height:"100%"})},whileHover:"view"===f&&N?{scale:1.005,transition:{duration:m?0:.5,ease:"easeOut"}}:{},transition:V,size:g,enable:{top:!1,bottom:!1,...(0,w.isRTL)()?{right:i,left:!1}:{left:i,right:!1},topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},resizeRatio:P,handleClasses:void 0,handleStyles:{left:fn,right:fn},minWidth:mn,maxWidth:t?"100%":"150%",maxHeight:"100%",onFocus:()=>E(!0),onBlur:()=>E(!1),onMouseOver:()=>E(!0),onMouseOut:()=>E(!1),handleComponent:{[(0,w.isRTL)()?"right":"left"]:"view"===f&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Tooltip,{text:(0,w.__)("Drag to resize"),children:(0,a.jsx)(b.__unstableMotion.button,{role:"separator","aria-orientation":"vertical",className:Ht("edit-site-resizable-frame__handle",{"is-resizing":S}),variants:M,animate:B,"aria-label":(0,w.__)("Drag to resize"),"aria-describedby":O,"aria-valuenow":T.current?.resizable?.offsetWidth||void 0,"aria-valuemin":mn,"aria-valuemax":o.width,onKeyDown:e=>{if(!["ArrowLeft","ArrowRight"].includes(e.key))return;e.preventDefault();const t=20*(e.shiftKey?5:1)*("ArrowLeft"===e.key?1:-1)*((0,w.isRTL)()?-1:1),n=Math.min(Math.max(mn,T.current.resizable.offsetWidth+t),o.width);v({width:n,height:yn(n,A)})},initial:"hidden",exit:"hidden",whileFocus:"active",whileHover:"active"},"handle")}),(0,a.jsx)("div",{hidden:!0,id:O,children:(0,w.__)("Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.")})]})},onResizeStart:(e,t,n)=>{_(n.offsetWidth),C(!0)},onResize:(e,t,i,r)=>{const a=r.width/P,l=Math.abs(a),c=r.width<0?l:(o.width-x)/2,u=Math.min(l,c),d=0===l?0:u/l;I(1-d+2*d);const h=x+r.width;s(h>o.width),v({height:n?"100%":yn(h,A)})},onResizeStop:(e,t,i)=>{if(C(!1),!n)return;s(!1);i.ownerDocument.documentElement.offsetWidth-i.offsetWidth>200||!N?v(vn):u.navigate((0,Qt.addQueryArgs)(d,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"})},className:Ht("edit-site-resizable-frame__inner",{"is-resizing":S}),showHandle:!1,children:(0,a.jsx)("div",{className:"edit-site-resizable-frame__inner-content",style:l,children:r})})};const bn=window.wp.keyboardShortcuts,wn="core/edit-site/save";function _n(){const{__experimentalGetDirtyEntityRecords:e,isSavingEntityRecord:t}=(0,c.useSelect)(j.store),{hasNonPostEntityChanges:n,isPostSavingLocked:s}=(0,c.useSelect)(f.store),{savePost:i}=(0,c.useDispatch)(f.store),{setIsSaveViewOpened:r}=(0,c.useDispatch)(Rt),{registerShortcut:a,unregisterShortcut:o}=(0,c.useDispatch)(bn.store);return(0,h.useEffect)((()=>(a({name:wn,category:"global",description:(0,w.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),()=>{o(wn)})),[a,o]),(0,bn.useShortcut)("core/edit-site/save",(a=>{a.preventDefault();const o=e(),l=!!o.length,c=o.some((e=>t(e.kind,e.name,e.key)));l&&!c&&(n()?r(!0):s()||i())})),null}const jn=1e4;function Sn(){const[e,t]=(0,h.useState)(!1),n=(0,c.useSelect)((t=>{const n=t(j.store).hasResolvingSelectors();return!e&&!n}),[e]);return(0,h.useEffect)((()=>{let n;return e||(n=setTimeout((()=>{t(!0)}),jn)),()=>{clearTimeout(n)}}),[e]),(0,h.useEffect)((()=>{if(n){const e=setTimeout((()=>{t(!0)}),100);return()=>{clearTimeout(e)}}}),[n]),!e}var Cn=zn(),kn=e=>Bn(e,Cn),En=zn();kn.write=e=>Bn(e,En);var Pn=zn();kn.onStart=e=>Bn(e,Pn);var In=zn();kn.onFrame=e=>Bn(e,In);var Vn=zn();kn.onFinish=e=>Bn(e,Vn);var Tn=[];kn.setTimeout=(e,t)=>{let n=kn.now()+t,s=()=>{let e=Tn.findIndex((e=>e.cancel==s));~e&&Tn.splice(e,1),Fn-=~e?1:0},i={time:n,handler:e,cancel:s};return Tn.splice(On(n),0,i),Fn+=1,Dn(),i};var On=e=>~(~Tn.findIndex((t=>t.time>e))||~Tn.length);kn.cancel=e=>{Pn.delete(e),In.delete(e),Vn.delete(e),Cn.delete(e),En.delete(e)},kn.sync=e=>{Mn=!0,kn.batchedUpdates(e),Mn=!1},kn.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function s(...e){t=e,kn.onStart(n)}return s.handler=e,s.cancel=()=>{Pn.delete(n),t=null},s};var An=typeof window<"u"?window.requestAnimationFrame:()=>{};kn.use=e=>An=e,kn.now=typeof performance<"u"?()=>performance.now():Date.now,kn.batchedUpdates=e=>e(),kn.catch=console.error,kn.frameLoop="always",kn.advance=()=>{"demand"!==kn.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ln()};var Nn=-1,Fn=0,Mn=!1;function Bn(e,t){Mn?(t.delete(e),e(0)):(t.add(e),Dn())}function Dn(){Nn<0&&(Nn=0,"demand"!==kn.frameLoop&&An(Rn))}function Rn(){~Nn&&(An(Rn),kn.batchedUpdates(Ln))}function Ln(){let e=Nn;Nn=kn.now();let t=On(Nn);t&&(Hn(Tn.splice(0,t),(e=>e.handler())),Fn-=t),Fn?(Pn.flush(),Cn.flush(e?Math.min(64,Nn-e):16.667),In.flush(),En.flush(),Vn.flush()):Nn=-1}function zn(){let e=new Set,t=e;return{add(n){Fn+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(Fn-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,Fn-=t.size,Hn(t,(t=>t(n)&&e.add(t))),Fn+=e.size,t=e)}}}function Hn(e,t){e.forEach((e=>{try{t(e)}catch(e){kn.catch(e)}}))}var Gn=i(1609),Wn=i.t(Gn,2),Un=Object.defineProperty,qn={};function Zn(){}((e,t)=>{for(var n in t)Un(e,n,{get:t[n],enumerable:!0})})(qn,{assign:()=>os,colors:()=>is,createStringInterpolator:()=>es,skipAnimation:()=>rs,to:()=>ts,willAdvance:()=>as});var Yn={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function Kn(e,t){if(Yn.arr(e)){if(!Yn.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Xn=(e,t)=>e.forEach(t);function Qn(e,t,n){if(Yn.arr(e))for(let s=0;s<e.length;s++)t.call(n,e[s],`${s}`);else for(let s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s)}var Jn=e=>Yn.und(e)?[]:Yn.arr(e)?e:[e];function $n(e,t){if(e.size){let n=Array.from(e);e.clear(),Xn(n,t)}}var es,ts,ns=(e,...t)=>$n(e,(e=>e(...t))),ss=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),is=null,rs=!1,as=Zn,os=e=>{e.to&&(ts=e.to),e.now&&(kn.now=e.now),void 0!==e.colors&&(is=e.colors),null!=e.skipAnimation&&(rs=e.skipAnimation),e.createStringInterpolator&&(es=e.createStringInterpolator),e.requestAnimationFrame&&kn.use(e.requestAnimationFrame),e.batchedUpdates&&(kn.batchedUpdates=e.batchedUpdates),e.willAdvance&&(as=e.willAdvance),e.frameLoop&&(kn.frameLoop=e.frameLoop)},ls=new Set,cs=[],us=[],ds=0,hs={get idle(){return!ls.size&&!cs.length},start(e){ds>e.priority?(ls.add(e),kn.onStart(ps)):(fs(e),kn(gs))},advance:gs,sort(e){if(ds)kn.onFrame((()=>hs.sort(e)));else{let t=cs.indexOf(e);~t&&(cs.splice(t,1),ms(e))}},clear(){cs=[],ls.clear()}};function ps(){ls.forEach(fs),ls.clear(),kn(gs)}function fs(e){cs.includes(e)||ms(e)}function ms(e){cs.splice(function(e,t){let n=e.findIndex(t);return n<0?e.length:n}(cs,(t=>t.priority>e.priority)),0,e)}function gs(e){let t=us;for(let n=0;n<cs.length;n++){let s=cs[n];ds=s.priority,s.idle||(as(s),s.advance(e),s.idle||t.push(s))}return ds=0,(us=cs).length=0,(cs=t).length>0}var vs="[-+]?\\d*\\.?\\d+",ys=vs+"%";function xs(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var bs=new RegExp("rgb"+xs(vs,vs,vs)),ws=new RegExp("rgba"+xs(vs,vs,vs,vs)),_s=new RegExp("hsl"+xs(vs,ys,ys)),js=new RegExp("hsla"+xs(vs,ys,ys,vs)),Ss=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Cs=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ks=/^#([0-9a-fA-F]{6})$/,Es=/^#([0-9a-fA-F]{8})$/;function Ps(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Is(e,t,n){let s=n<.5?n*(1+t):n+t-n*t,i=2*n-s,r=Ps(i,s,e+1/3),a=Ps(i,s,e),o=Ps(i,s,e-1/3);return Math.round(255*r)<<24|Math.round(255*a)<<16|Math.round(255*o)<<8}function Vs(e){let t=parseInt(e,10);return t<0?0:t>255?255:t}function Ts(e){return(parseFloat(e)%360+360)%360/360}function Os(e){let t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function As(e){let t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ns(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ks.exec(e))?parseInt(t[1]+"ff",16)>>>0:is&&void 0!==is[e]?is[e]:(t=bs.exec(e))?(Vs(t[1])<<24|Vs(t[2])<<16|Vs(t[3])<<8|255)>>>0:(t=ws.exec(e))?(Vs(t[1])<<24|Vs(t[2])<<16|Vs(t[3])<<8|Os(t[4]))>>>0:(t=Ss.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Es.exec(e))?parseInt(t[1],16)>>>0:(t=Cs.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=_s.exec(e))?(255|Is(Ts(t[1]),As(t[2]),As(t[3])))>>>0:(t=js.exec(e))?(Is(Ts(t[1]),As(t[2]),As(t[3]))|Os(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}var Fs=(e,t,n)=>{if(Yn.fun(e))return e;if(Yn.arr(e))return Fs({range:e,output:t,extrapolate:n});if(Yn.str(e.output[0]))return es(e);let s=e,i=s.output,r=s.range||[0,1],a=s.extrapolateLeft||s.extrapolate||"extend",o=s.extrapolateRight||s.extrapolate||"extend",l=s.easing||(e=>e);return e=>{let t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,r);return function(e,t,n,s,i,r,a,o,l){let c=l?l(e):e;if(c<t){if("identity"===a)return c;"clamp"===a&&(c=t)}if(c>n){if("identity"===o)return c;"clamp"===o&&(c=n)}return s===i?s:t===n?e<=t?s:i:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=r(c),s===-1/0?c=-c:i===1/0?c+=s:c=c*(i-s)+s,c)}(e,r[t],r[t+1],i[t],i[t+1],l,a,o,s.map)}};var Ms=1.70158,Bs=1.525*Ms,Ds=Ms+1,Rs=2*Math.PI/3,Ls=2*Math.PI/4.5,zs=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Hs={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Ds*e*e*e-Ms*e*e,easeOutBack:e=>1+Ds*Math.pow(e-1,3)+Ms*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(2*(Bs+1)*e-Bs)/2:(Math.pow(2*e-2,2)*((Bs+1)*(2*e-2)+Bs)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*Rs),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*Rs)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Ls)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Ls)/2+1,easeInBounce:e=>1-zs(1-e),easeOutBounce:zs,easeInOutBounce:e=>e<.5?(1-zs(1-2*e))/2:(1+zs(2*e-1))/2,steps:(e,t="end")=>n=>{let s=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(s):Math.ceil(s))/e)}},Gs=Symbol.for("FluidValue.get"),Ws=Symbol.for("FluidValue.observers"),Us=e=>Boolean(e&&e[Gs]),qs=e=>e&&e[Gs]?e[Gs]():e,Zs=e=>e[Ws]||null;function Ys(e,t){let n=e[Ws];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var Ks=class{[Gs];[Ws];constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Xs(this,e)}},Xs=(e,t)=>ei(e,Gs,t);function Qs(e,t){if(e[Gs]){let n=e[Ws];n||ei(e,Ws,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Js(e,t){let n=e[Ws];if(n&&n.has(t)){let s=n.size-1;s?n.delete(t):e[Ws]=null,e.observerRemoved&&e.observerRemoved(s,t)}}var $s,ei=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ti=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ni=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,si=new RegExp(`(${ti.source})(%|[a-z]+)`,"i"),ii=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ri=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,ai=e=>{let[t,n]=oi(e);if(!t||ss())return e;let s=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(s)return s.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&ri.test(n)?ai(n):n||e},oi=e=>{let t=ri.exec(e);if(!t)return[,];let[,n,s]=t;return[n,s]},li=(e,t,n,s,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,ci=e=>{$s||($s=is?new RegExp(`(${Object.keys(is).join("|")})(?!\\w)`,"g"):/^\b$/);let t=e.output.map((e=>qs(e).replace(ri,ai).replace(ni,Ns).replace($s,Ns))),n=t.map((e=>e.match(ti).map(Number))),s=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>Fs({...e,output:t})));return e=>{let n=!si.test(t[0])&&t.find((e=>si.test(e)))?.replace(ti,""),i=0;return t[0].replace(ti,(()=>`${s[i++](e)}${n||""}`)).replace(ii,li)}},ui="react-spring: ",di=e=>{let t=e,n=!1;if("function"!=typeof t)throw new TypeError(`${ui}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},hi=di(console.warn);di(console.warn);function pi(e){return Yn.str(e)&&("#"==e[0]||/\d/.test(e)||!ss()&&ri.test(e)||e in(is||{}))}new WeakMap;new Set,new WeakMap,new WeakMap,new WeakMap;var fi=ss()?Gn.useEffect:Gn.useLayoutEffect;function mi(){let e=(0,Gn.useState)()[1],t=(()=>{let e=(0,Gn.useRef)(!1);return fi((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}var gi=[];var vi=Symbol.for("Animated:node"),yi=e=>e&&e[vi],xi=(e,t)=>((e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}))(e,vi,t),bi=e=>e&&e[vi]&&e[vi].getPayload(),wi=class{payload;constructor(){xi(this,this)}getPayload(){return this.payload||[]}},_i=class extends wi{constructor(e){super(),this._value=e,Yn.num(this._value)&&(this.lastPosition=this._value)}done=!0;elapsedTime;lastPosition;lastVelocity;v0;durationProgress=0;static create(e){return new _i(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Yn.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){let{done:e}=this;this.done=!1,Yn.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},ji=class extends _i{_string=null;_toString;constructor(e){super(0),this._toString=Fs({output:[e,e]})}static create(e){return new ji(e)}getValue(){return this._string??(this._string=this._toString(this._value))}setValue(e){if(Yn.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=Fs({output:[this.getValue(),e]})),this._value=0,super.reset()}},Si={dependencies:null},Ci=class extends wi{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){let t={};return Qn(this.source,((n,s)=>{(e=>!!e&&e[vi]===e)(n)?t[s]=n.getValue(e):Us(n)?t[s]=qs(n):e||(t[s]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Xn(this.payload,(e=>e.reset()))}_makePayload(e){if(e){let t=new Set;return Qn(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Si.dependencies&&Us(e)&&Si.dependencies.add(e);let t=bi(e);t&&Xn(t,(e=>this.add(e)))}},ki=class extends Ci{constructor(e){super(e)}static create(e){return new ki(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){let t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Ei)),!0)}};function Ei(e){return(pi(e)?ji:_i).create(e)}function Pi(e){let t=yi(e);return t?t.constructor:Yn.arr(e)?ki:pi(e)?ji:_i}var Ii=(e,t)=>{let n=!Yn.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,Gn.forwardRef)(((s,i)=>{let r=(0,Gn.useRef)(null),a=n&&(0,Gn.useCallback)((e=>{r.current=function(e,t){return e&&(Yn.fun(e)?e(t):e.current=t),t}(i,e)}),[i]),[o,l]=function(e,t){let n=new Set;return Si.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ci(e),Si.dependencies=null,[e,n]}(s,t),c=mi(),u=()=>{let e=r.current;n&&!e||!1===(!!e&&t.applyAnimatedValues(e,o.getValue(!0)))&&c()},d=new Vi(u,l),h=(0,Gn.useRef)();fi((()=>(h.current=d,Xn(l,(e=>Qs(e,d))),()=>{h.current&&(Xn(h.current.deps,(e=>Js(e,h.current))),kn.cancel(h.current.update))}))),(0,Gn.useEffect)(u,[]),(e=>{(0,Gn.useEffect)(e,gi)})((()=>()=>{let e=h.current;Xn(e.deps,(t=>Js(t,e)))}));let p=t.getComponentProps(o.getValue());return Gn.createElement(e,{...p,ref:a})}))},Vi=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&kn.write(this.update)}};var Ti=Symbol.for("AnimatedComponent"),Oi=e=>Yn.str(e)?e:e&&Yn.str(e.displayName)?e.displayName:Yn.fun(e)&&e.name||null;function Ai(e,...t){return Yn.fun(e)?e(...t):e}var Ni=(e,t)=>!0===e||!!(t&&e&&(Yn.fun(e)?e(t):Jn(e).includes(t))),Fi=(e,t)=>Yn.obj(e)?t&&e[t]:e,Mi=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Bi=e=>e,Di=(e,t=Bi)=>{let n=Ri;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));let s={};for(let i of n){let n=t(e[i],i);Yn.und(n)||(s[i]=n)}return s},Ri=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Li={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function zi(e){let t=function(e){let t={},n=0;if(Qn(e,((e,s)=>{Li[s]||(t[s]=e,n++)})),n)return t}(e);if(t){let n={to:t};return Qn(e,((e,s)=>s in t||(n[s]=e))),n}return{...e}}function Hi(e){return e=qs(e),Yn.arr(e)?e.map(Hi):pi(e)?qn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Gi(e){return Yn.fun(e)||Yn.arr(e)&&Yn.obj(e[0])}var Wi={tension:170,friction:26,mass:1,damping:1,easing:Hs.linear,clamp:!1},Ui=class{tension;friction;frequency;damping;mass;velocity=0;restVelocity;precision;progress;duration;easing;clamp;bounce;decay;round;constructor(){Object.assign(this,Wi)}};function qi(e,t){if(Yn.und(t.decay)){let n=!Yn.und(t.tension)||!Yn.und(t.friction);(n||!Yn.und(t.frequency)||!Yn.und(t.damping)||!Yn.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var Zi=[],Yi=class{changed=!1;values=Zi;toValues=null;fromValues=Zi;to;from;config=new Ui;immediate=!1};function Ki(e,{key:t,props:n,defaultProps:s,state:i,actions:r}){return new Promise(((a,o)=>{let l,c,u=Ni(n.cancel??s?.cancel,t);if(u)p();else{Yn.und(n.pause)||(i.paused=Ni(n.pause,t));let e=s?.pause;!0!==e&&(e=i.paused||Ni(e,t)),l=Ai(n.delay||0,t),e?(i.resumeQueue.add(h),r.pause()):(r.resume(),h())}function d(){i.resumeQueue.add(h),i.timeouts.delete(c),c.cancel(),l=c.time-kn.now()}function h(){l>0&&!qn.skipAnimation?(i.delayed=!0,c=kn.setTimeout(p,l),i.pauseQueue.add(d),i.timeouts.add(c)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(c),e<=(i.cancelId||0)&&(u=!0);try{r.start({...n,callId:e,cancel:u},a)}catch(e){o(e)}}}))}var Xi=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?$i(e.get()):t.every((e=>e.noop))?Qi(e.get()):Ji(e.get(),t.every((e=>e.finished))),Qi=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Ji=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),$i=e=>({value:e,cancelled:!0,finished:!1});function er(e,t,n,s){let{callId:i,parentId:r,onRest:a}=t,{asyncTo:o,promise:l}=n;return r||e!==o||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;let c,u,d,h=Di(t,((e,t)=>"onRest"===t?void 0:e)),p=new Promise(((e,t)=>(c=e,u=t))),f=e=>{let t=i<=(n.cancelId||0)&&$i(s)||i!==n.asyncId&&Ji(s,!1);if(t)throw e.result=t,u(e),e},m=(e,t)=>{let r=new nr,a=new sr;return(async()=>{if(qn.skipAnimation)throw tr(n),a.result=Ji(s,!1),u(a),a;f(r);let o=Yn.obj(e)?{...e}:{...t,to:e};o.parentId=i,Qn(h,((e,t)=>{Yn.und(o[t])&&(o[t]=e)}));let l=await s.start(o);return f(r),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};if(qn.skipAnimation)return tr(n),Ji(s,!1);try{let t;t=Yn.arr(e)?(async e=>{for(let t of e)await m(t)})(e):Promise.resolve(e(m,s.stop.bind(s))),await Promise.all([t.then(c),p]),d=Ji(s.get(),!0,!1)}catch(e){if(e instanceof nr)d=e.result;else{if(!(e instanceof sr))throw e;d=e.result}}finally{i==n.asyncId&&(n.asyncId=r,n.asyncTo=r?o:void 0,n.promise=r?l:void 0)}return Yn.fun(a)&&kn.batchedUpdates((()=>{a(d,s,s.item)})),d})():l}function tr(e,t){$n(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var nr=class extends Error{result;constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},sr=class extends Error{result;constructor(){super("SkipAnimationSignal")}},ir=e=>e instanceof ar,rr=1,ar=class extends Ks{id=rr++;_priority=0;get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){let e=yi(this);return e&&e.getValue()}to(...e){return qn.to(this,e)}interpolate(...e){return hi(`${ui}The "interpolate" function is deprecated in v9 (use "to" instead)`),qn.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Ys(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||hs.sort(this),Ys(this,{type:"priority",parent:this,priority:e})}},or=Symbol.for("SpringPhase"),lr=e=>(1&e[or])>0,cr=e=>(2&e[or])>0,ur=e=>(4&e[or])>0,dr=(e,t)=>t?e[or]|=3:e[or]&=-3,hr=(e,t)=>t?e[or]|=4:e[or]&=-5,pr=class extends ar{key;animation=new Yi;queue;defaultProps={};_state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_pendingCalls=new Set;_lastCallId=0;_lastToId=0;_memoizedDuration=0;constructor(e,t){if(super(),!Yn.und(e)||!Yn.und(t)){let n=Yn.obj(e)?{...e}:{...t,from:e};Yn.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(cr(this)||this._state.asyncTo)||ur(this)}get goal(){return qs(this.animation.to)}get velocity(){let e=yi(this);return e instanceof _i?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return lr(this)}get isAnimating(){return cr(this)}get isPaused(){return ur(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1,s=this.animation,{config:i,toValues:r}=s,a=bi(s.to);!a&&Us(s.to)&&(r=Jn(qs(s.to))),s.values.forEach(((o,l)=>{if(o.done)return;let c=o.constructor==ji?1:a?a[l].lastPosition:r[l],u=s.immediate,d=c;if(!u){if(d=o.lastPosition,i.tension<=0)return void(o.done=!0);let t,n=o.elapsedTime+=e,r=s.fromValues[l],a=null!=o.v0?o.v0:o.v0=Yn.arr(i.velocity)?i.velocity[l]:i.velocity,h=i.precision||(r==c?.005:Math.min(1,.001*Math.abs(c-r)));if(Yn.und(i.duration))if(i.decay){let e=!0===i.decay?.998:i.decay,s=Math.exp(-(1-e)*n);d=r+a/(1-e)*(1-s),u=Math.abs(o.lastPosition-d)<=h,t=a*s}else{t=null==o.lastVelocity?a:o.lastVelocity;let n,s=i.restVelocity||h/10,l=i.clamp?0:i.bounce,p=!Yn.und(l),f=r==c?o.v0>0:r<c,m=!1,g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(n=Math.abs(t)>s,n||(u=Math.abs(c-d)<=h,!u));++e){p&&(m=d==c||d>c==f,m&&(t=-t*l,d=c)),t+=(1e-6*-i.tension*(d-c)+.001*-i.friction*t)/i.mass*g,d+=t*g}}else{let s=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,o.durationProgress>0&&(o.elapsedTime=i.duration*o.durationProgress,n=o.elapsedTime+=e)),s=(i.progress||0)+n/this._memoizedDuration,s=s>1?1:s<0?0:s,o.durationProgress=s),d=r+i.easing(s)*(c-r),t=(d-o.lastPosition)/e,u=1==s}o.lastVelocity=t,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}a&&!a[l].done&&(u=!1),u?o.done=!0:t=!1,o.setValue(d,i.round)&&(n=!0)}));let o=yi(this),l=o.getValue();if(t){let e=qs(s.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return kn.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(cr(this)){let{to:e,config:t}=this.animation;kn.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Yn.und(e)?(n=this.queue||[],this.queue=[]):n=[Yn.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>Xi(this,e)))}stop(e){let{to:t}=this.animation;return this._focus(this.get()),tr(this._state,e&&this._lastCallId),kn.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){let t=this.key||"",{to:n,from:s}=e;n=Yn.obj(n)?n[t]:n,(null==n||Gi(n))&&(n=void 0),s=Yn.obj(s)?s[t]:s,null==s&&(s=void 0);let i={to:n,from:s};return lr(this)||(e.reverse&&([n,s]=[s,n]),s=qs(s),Yn.und(s)?yi(this)||this._set(n):this._set(s)),i}_update({...e},t){let{key:n,defaultProps:s}=this;e.default&&Object.assign(s,Di(e,((e,t)=>/^on/.test(t)?Fi(e,n):e))),xr(this,e,"onProps"),br(this,"onProps",e,this);let i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");let r=this._state;return Ki(++this._lastCallId,{key:n,props:e,defaultProps:s,state:r,actions:{pause:()=>{ur(this)||(hr(this,!0),ns(r.pauseQueue),br(this,"onPause",Ji(this,fr(this,this.animation.to)),this))},resume:()=>{ur(this)&&(hr(this,!1),cr(this)&&this._resume(),ns(r.resumeQueue),br(this,"onResume",Ji(this,fr(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){let t=mr(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n($i(this));let s=!Yn.und(e.to),i=!Yn.und(e.from);if(s||i){if(!(t.callId>this._lastToId))return n($i(this));this._lastToId=t.callId}let{key:r,defaultProps:a,animation:o}=this,{to:l,from:c}=o,{to:u=l,from:d=c}=e;i&&!s&&(!t.default||Yn.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);let h=!Kn(d,c);h&&(o.from=d),d=qs(d);let p=!Kn(u,l);p&&this._focus(u);let f=Gi(t.to),{config:m}=o,{decay:g,velocity:v}=m;(s||i)&&(m.velocity=0),t.config&&!f&&function(e,t,n){n&&(qi(n={...n},t),t={...n,...t}),qi(e,t),Object.assign(e,t);for(let t in Wi)null==e[t]&&(e[t]=Wi[t]);let{mass:s,frequency:i,damping:r}=e;Yn.und(i)||(i<.01&&(i=.01),r<0&&(r=0),e.tension=Math.pow(2*Math.PI/i,2)*s,e.friction=4*Math.PI*r*s/i)}(m,Ai(t.config,r),t.config!==a.config?Ai(a.config,r):void 0);let y=yi(this);if(!y||Yn.und(u))return n(Ji(this,!0));let x=Yn.und(t.reset)?i&&!t.default:!Yn.und(d)&&Ni(t.reset,r),b=x?d:this.get(),w=Hi(u),_=Yn.num(w)||Yn.arr(w)||pi(w),j=!f&&(!_||Ni(a.immediate||t.immediate,r));if(p){let e=Pi(u);if(e!==y.constructor){if(!j)throw Error(`Cannot animate between ${y.constructor.name} and ${e.name}, as the "to" prop suggests`);y=this._set(w)}}let S=y.constructor,C=Us(u),k=!1;if(!C){let e=x||!lr(this)&&h;(p||e)&&(k=Kn(Hi(b),w),C=!k),(!Kn(o.immediate,j)&&!j||!Kn(m.decay,g)||!Kn(m.velocity,v))&&(C=!0)}if(k&&cr(this)&&(o.changed&&!x?C=!0:C||this._stop(l)),!f&&((C||Us(l))&&(o.values=y.getPayload(),o.toValues=Us(u)?null:S==ji?[1]:Jn(w)),o.immediate!=j&&(o.immediate=j,!j&&!x&&this._set(l)),C)){let{onRest:e}=o;Xn(yr,(e=>xr(this,t,e)));let s=Ji(this,fr(this,l));ns(this._pendingCalls,s),this._pendingCalls.add(n),o.changed&&kn.batchedUpdates((()=>{o.changed=!x,e?.(s,this),x?Ai(a.onRest,s):o.onStart?.(s,this)}))}x&&this._set(b),f?n(er(t.to,t,this._state,this)):C?this._start():cr(this)&&!p?this._pendingCalls.add(n):n(Qi(b))}_focus(e){let t=this.animation;e!==t.to&&(Zs(this)&&this._detach(),t.to=e,Zs(this)&&this._attach())}_attach(){let e=0,{to:t}=this.animation;Us(t)&&(Qs(t,this),ir(t)&&(e=t.priority+1)),this.priority=e}_detach(){let{to:e}=this.animation;Us(e)&&Js(e,this)}_set(e,t=!0){let n=qs(e);if(!Yn.und(n)){let e=yi(this);if(!e||!Kn(n,e.getValue())){let s=Pi(n);e&&e.constructor==s?e.setValue(n):xi(this,s.create(n)),e&&kn.batchedUpdates((()=>{this._onChange(n,t)}))}}return yi(this)}_onStart(){let e=this.animation;e.changed||(e.changed=!0,br(this,"onStart",Ji(this,fr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Ai(this.animation.onChange,e,this)),Ai(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){let e=this.animation;yi(this).reset(qs(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),cr(this)||(dr(this,!0),ur(this)||this._resume())}_resume(){qn.skipAnimation?this.finish():hs.start(this)}_stop(e,t){if(cr(this)){dr(this,!1);let n=this.animation;Xn(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Ys(this,{type:"idle",parent:this});let s=t?$i(this.get()):Ji(this.get(),fr(this,e??n.to));ns(this._pendingCalls,s),n.changed&&(n.changed=!1,br(this,"onRest",s,this))}}};function fr(e,t){let n=Hi(t);return Kn(Hi(e.get()),n)}function mr(e,t=e.loop,n=e.to){let s=Ai(t);if(s){let i=!0!==s&&zi(s),r=(i||e).reverse,a=!i||i.reset;return gr({...e,loop:t,default:!1,pause:void 0,to:!r||Gi(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function gr(e){let{to:t,from:n}=e=zi(e),s=new Set;return Yn.obj(t)&&vr(t,s),Yn.obj(n)&&vr(n,s),e.keys=s.size?Array.from(s):null,e}function vr(e,t){Qn(e,((e,n)=>null!=e&&t.add(n)))}var yr=["onStart","onRest","onChange","onPause","onResume"];function xr(e,t,n){e.animation[n]=t[n]!==Mi(t,n)?Fi(t[n],e.key):void 0}function br(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var wr=["onStart","onChange","onRest"],_r=1,jr=class{id=_r++;springs={};queue=[];ref;_flush;_initialProps;_lastAsyncId=0;_active=new Set;_changed=new Set;_started=!1;_item;_state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set};_events={onStart:new Map,onChange:new Map,onRest:new Map};constructor(e,t){this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){let e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(let t in e){let n=e[t];Yn.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(gr(e)),this}start(e){let{queue:t}=this;return e?t=Jn(e).map(gr):this.queue=[],this._flush?this._flush(this,t):(Pr(this,t),Sr(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){let n=this.springs;Xn(Jn(t),(t=>n[t].stop(!!e)))}else tr(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(Yn.und(e))this.start({pause:!0});else{let t=this.springs;Xn(Jn(e),(e=>t[e].pause()))}return this}resume(e){if(Yn.und(e))this.start({pause:!1});else{let t=this.springs;Xn(Jn(e),(e=>t[e].resume()))}return this}each(e){Qn(this.springs,e)}_onFrame(){let{onStart:e,onChange:t,onRest:n}=this._events,s=this._active.size>0,i=this._changed.size>0;(s&&!this._started||i&&!this._started)&&(this._started=!0,$n(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));let r=!s&&this._started,a=i||r&&n.size?this.get():null;i&&t.size&&$n(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),r&&(this._started=!1,$n(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}kn.onFrame(this._onFrame)}};function Sr(e,t){return Promise.all(t.map((t=>Cr(e,t)))).then((t=>Xi(e,t)))}async function Cr(e,t,n){let{keys:s,to:i,from:r,loop:a,onRest:o,onResolve:l}=t,c=Yn.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===r&&(t.from=null);let u=Yn.arr(i)||Yn.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):Xn(wr,(n=>{let s=t[n];if(Yn.fun(s)){let i=e._events[n];t[n]=({finished:e,cancelled:t})=>{let n=i.get(s);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(s,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));let d=e._state;t.pause===!d.paused?(d.paused=t.pause,ns(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);let h=(s||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Mi(t,"cancel");(u||p&&d.asyncId)&&h.push(Ki(++e._lastAsyncId,{props:t,state:d,actions:{pause:Zn,resume:Zn,start(t,n){p?(tr(d,e._lastAsyncId),n($i(e))):(t.onRest=o,n(er(u,t,d,e)))}}})),d.paused&&await new Promise((e=>{d.resumeQueue.add(e)}));let f=Xi(e,await Promise.all(h));if(a&&f.finished&&(!n||!f.noop)){let n=mr(t,a,i);if(n)return Pr(e,[n]),Cr(e,n,!0)}return l&&kn.batchedUpdates((()=>l(f,e,e.item))),f}function kr(e,t){let n=new pr;return n.key=e,t&&Qs(n,t),n}function Er(e,t,n){t.keys&&Xn(t.keys,(s=>{(e[s]||(e[s]=n(s)))._prepareNode(t)}))}function Pr(e,t){Xn(t,(t=>{Er(e.springs,t,(t=>kr(t,e)))}))}var Ir=({children:e,...t})=>{let n=(0,Gn.useContext)(Vr),s=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=function(e,t){let[n]=(0,Gn.useState)((()=>({inputs:t,result:e()}))),s=(0,Gn.useRef)(),i=s.current,r=i;return r?Boolean(t&&r.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,r.inputs))||(r={inputs:t,result:e()}):r=n,(0,Gn.useEffect)((()=>{s.current=r,i==n&&(n.inputs=n.result=void 0)}),[r]),r.result}((()=>({pause:s,immediate:i})),[s,i]);let{Provider:r}=Vr;return Gn.createElement(r,{value:t},e)},Vr=function(e,t){return Object.assign(e,Gn.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Ir,{});Ir.Provider=Vr.Provider,Ir.Consumer=Vr.Consumer;var Tr=class extends ar{constructor(e,t){super(),this.source=e,this.calc=Fs(...t);let n=this._get(),s=Pi(n);xi(this,s.create(n))}key;idle=!0;calc;_active=new Set;advance(e){let t=this._get();Kn(t,this.get())||(yi(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ar(this._active)&&Nr(this)}_get(){let e=Yn.arr(this.source)?this.source.map(qs):Jn(qs(this.source));return this.calc(...e)}_start(){this.idle&&!Ar(this._active)&&(this.idle=!1,Xn(bi(this),(e=>{e.done=!1})),qn.skipAnimation?(kn.batchedUpdates((()=>this.advance())),Nr(this)):hs.start(this))}_attach(){let e=1;Xn(Jn(this.source),(t=>{Us(t)&&Qs(t,this),ir(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){Xn(Jn(this.source),(e=>{Us(e)&&Js(e,this)})),this._active.clear(),Nr(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=Jn(this.source).reduce(((e,t)=>Math.max(e,(ir(t)?t.priority:0)+1)),0))}};function Or(e){return!1!==e.idle}function Ar(e){return!e.size||Array.from(e).every(Or)}function Nr(e){e.idle||(e.idle=!0,Xn(bi(e),(e=>{e.done=!0})),Ys(e,{type:"idle",parent:e}))}qn.assign({createStringInterpolator:ci,to:(e,t)=>new Tr(e,t)});hs.advance;const Fr=window.ReactDOM;var Mr=/^--/;function Br(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||Mr.test(e)||Rr.hasOwnProperty(e)&&Rr[e]?(""+t).trim():t+"px"}var Dr={};var Rr={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Lr=["Webkit","Ms","Moz","O"];Rr=Object.keys(Rr).reduce(((e,t)=>(Lr.forEach((n=>e[((e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1))(n,t)]=e[t])),e)),Rr);var zr=/^(matrix|translate|scale|rotate|skew)/,Hr=/^(translate)/,Gr=/^(rotate|skew)/,Wr=(e,t)=>Yn.num(e)&&0!==e?e+t:e,Ur=(e,t)=>Yn.arr(e)?e.every((e=>Ur(e,t))):Yn.num(e)?e===t:parseFloat(e)===t,qr=class extends Ci{constructor({x:e,y:t,z:n,...s}){let i=[],r=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),r.push((e=>[`translate3d(${e.map((e=>Wr(e,"px"))).join(",")})`,Ur(e,0)]))),Qn(s,((e,t)=>{if("transform"===t)i.push([e||""]),r.push((e=>[e,""===e]));else if(zr.test(t)){if(delete s[t],Yn.und(e))return;let n=Hr.test(t)?"px":Gr.test(t)?"deg":"";i.push(Jn(e)),r.push("rotate3d"===t?([e,t,s,i])=>[`rotate3d(${e},${t},${s},${Wr(i,n)})`,Ur(i,0)]:e=>[`${t}(${e.map((e=>Wr(e,n))).join(",")})`,Ur(e,t.startsWith("scale")?1:0)])}})),i.length&&(s.transform=new Zr(i,r)),super(s)}},Zr=class extends Ks{constructor(e,t){super(),this.inputs=e,this.transforms=t}_value=null;get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Xn(this.inputs,((n,s)=>{let i=qs(n[0]),[r,a]=this.transforms[s](Yn.arr(i)?i:n.map(qs));e+=" "+r,t=t&&a})),t?"none":e}observerAdded(e){1==e&&Xn(this.inputs,(e=>Xn(e,(e=>Us(e)&&Qs(e,this)))))}observerRemoved(e){0==e&&Xn(this.inputs,(e=>Xn(e,(e=>Us(e)&&Js(e,this)))))}eventObserved(e){"change"==e.type&&(this._value=null),Ys(this,e)}};qn.assign({batchedUpdates:Fr.unstable_batchedUpdates,createStringInterpolator:ci,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199}});var Yr=((e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=e=>new Ci(e),getComponentProps:s=e=>e}={})=>{let i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:s},r=e=>{let t=Oi(e)||"Anonymous";return(e=Yn.str(e)?r[e]||(r[e]=Ii(e,i)):e[Ti]||(e[Ti]=Ii(e,i))).displayName=`Animated(${t})`,e};return Qn(e,((t,n)=>{Yn.arr(e)&&(n=Oi(t)),r[n]=r(t)})),{animated:r}})(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],{applyAnimatedValues:function(e,t){if(!e.nodeType||!e.setAttribute)return!1;let n="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName,{style:s,children:i,scrollTop:r,scrollLeft:a,viewBox:o,...l}=t,c=Object.values(l),u=Object.keys(l).map((t=>n||e.hasAttribute(t)?t:Dr[t]||(Dr[t]=t.replace(/([A-Z])/g,(e=>"-"+e.toLowerCase())))));void 0!==i&&(e.textContent=i);for(let t in s)if(s.hasOwnProperty(t)){let n=Br(t,s[t]);Mr.test(t)?e.style.setProperty(t,n):e.style[t]=n}u.forEach(((t,n)=>{e.setAttribute(t,c[n])})),void 0!==r&&(e.scrollTop=r),void 0!==a&&(e.scrollLeft=a),void 0!==o&&e.setAttribute("viewBox",o)},createAnimatedStyle:e=>new qr(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n});Yr.animated;var Kr=function({triggerAnimationOnChange:e}){const t=(0,h.useRef)(),{previous:n,prevRect:s}=(0,h.useMemo)((()=>{return{previous:t.current&&(e=t.current,{top:e.offsetTop,left:e.offsetLeft}),prevRect:t.current&&t.current.getBoundingClientRect()};var e}),[e]);return(0,h.useLayoutEffect)((()=>{if(!n||!t.current)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=new jr({x:0,y:0,width:s.width,height:s.height,config:{duration:400,easing:Hs.easeInOutQuint},onChange({value:e}){if(!t.current)return;let{x:n,y:s,width:i,height:r}=e;n=Math.round(n),s=Math.round(s),i=Math.round(i),r=Math.round(r);const a=0===n&&0===s;t.current.style.transformOrigin="center center",t.current.style.transform=a?null:`translate3d(${n}px,${s}px,0)`,t.current.style.width=a?null:`${i}px`,t.current.style.height=a?null:`${r}px`}});t.current.style.transform=void 0;const i=t.current.getBoundingClientRect(),r=Math.round(s.left-i.left),a=Math.round(s.top-i.top),o=i.width,l=i.height;return e.start({x:0,y:0,width:o,height:l,from:{x:r,y:a,width:s.width,height:s.height}}),()=>{e.stop(),e.set({x:0,y:0,width:s.width,height:s.height})}}),[n,s]),t},Xr=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});function Qr(){return!!(0,Qt.getQueryArg)(window.location.href,"wp_theme_preview")}function Jr(){return Qr()?(0,Qt.getQueryArg)(window.location.href,"wp_theme_preview"):null}const{useLocation:$r}=ne(Lt.privateApis);function ea({className:e="edit-site-save-button__button",variant:t="primary",showTooltip:n=!0,showReviewMessage:s,icon:i,size:r,__next40pxDefaultSize:o=!1}){const{params:l}=$r(),{setIsSaveViewOpened:u}=(0,c.useDispatch)(Rt),{saveDirtyEntities:d}=ne((0,c.useDispatch)(f.store)),{dirtyEntityRecords:h}=(0,f.useEntitiesSavedStatesIsDirty)(),{isSaving:p,isSaveViewOpen:m,previewingThemeName:g}=(0,c.useSelect)((e=>{const{isSavingEntityRecord:t,isResolving:n}=e(j.store),{isSaveViewOpened:s}=e(Rt),i=n("activateTheme"),r=Jr();return{isSaving:h.some((e=>t(e.kind,e.name,e.key)))||i,isSaveViewOpen:s(),previewingThemeName:r?e(j.store).getTheme(r)?.name?.rendered:void 0}}),[h]),v=!!h.length;let y;1===h.length&&(l.postId?y=`${h[0].key}`===l.postId&&h[0].name===l.postType:l.path?.includes("wp_global_styles")&&(y="globalStyles"===h[0].name));const x=p||!v&&!Qr(),_=Qr()?p?(0,w.sprintf)((0,w.__)("Activating %s"),g):x?(0,w.__)("Saved"):v?(0,w.sprintf)((0,w.__)("Activate %s & Save"),g):(0,w.sprintf)((0,w.__)("Activate %s"),g):p?(0,w.__)("Saving"):x?(0,w.__)("Saved"):!y&&s?(0,w.sprintf)((0,w._n)("Review %d change…","Review %d changes…",h.length),h.length):(0,w.__)("Save"),S=y?()=>d({dirtyEntityRecords:h}):()=>u(!0);return(0,a.jsx)(b.Button,{variant:t,className:e,"aria-disabled":x,"aria-expanded":m,isBusy:p,onClick:x?void 0:S,label:_,shortcut:x?void 0:Xt.displayShortcut.primary("s"),showTooltip:n,icon:i,__next40pxDefaultSize:o,size:r,children:_})}function ta(){const{isDisabled:e,isSaving:t}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n}=e(j.store),s=t(),i=s.some((e=>n(e.kind,e.name,e.key)));return{isSaving:i,isDisabled:i||!s.length&&!Qr()}}),[]);return(0,a.jsx)(b.__experimentalHStack,{className:"edit-site-save-hub",alignment:"right",spacing:4,children:(0,a.jsx)(ea,{className:"edit-site-save-hub__button",variant:e?null:"primary",showTooltip:!1,icon:e&&!t?Xr:null,showReviewMessage:!0,__next40pxDefaultSize:!0})})}const{useHistory:na,useLocation:sa}=ne(Lt.privateApis);const ia=window.wp.apiFetch;var ra=i.n(ia);const{EntitiesSavedStatesExtensible:aa}=ne(f.privateApis),{useLocation:oa}=ne(Lt.privateApis),la=({onClose:e,renderDialog:t,variant:n})=>{const s=(0,f.useEntitiesSavedStatesIsDirty)();let i;i=s.isDirty?(0,w.__)("Activate & Save"):(0,w.__)("Activate");const r=function(){const[e,t]=(0,h.useState)();return(0,h.useEffect)((()=>{const e=(0,Qt.addQueryArgs)("/wp/v2/themes?status=active",{context:"edit",wp_theme_preview:""});ra()({path:e}).then((e=>t(e[0]))).catch((()=>{}))}),[]),e}(),o=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()),[]),l=(0,a.jsx)("p",{children:(0,w.sprintf)((0,w.__)("Saving your changes will change your active theme from %1$s to %2$s."),r?.name?.rendered??"...",o?.name?.rendered??"...")}),u=function(){const e=na(),{path:t}=sa(),{startResolution:n,finishResolution:s}=(0,c.useDispatch)(j.store);return async()=>{if(Qr()){const i="themes.php?action=activate&stylesheet="+Jr()+"&_wpnonce="+window.WP_BLOCK_THEME_ACTIVATE_NONCE;n("activateTheme"),await window.fetch(i),s("activateTheme"),e.navigate((0,Qt.addQueryArgs)(t,{wp_theme_preview:""}))}}}();return(0,a.jsx)(aa,{...{...s,additionalPrompt:l,close:e,onSave:async e=>(await u(),e),saveEnabled:!0,saveLabel:i,renderDialog:t,variant:n}})},ca=({onClose:e,renderDialog:t,variant:n})=>Qr()?(0,a.jsx)(la,{onClose:e,renderDialog:t,variant:n}):(0,a.jsx)(f.EntitiesSavedStates,{close:e,renderDialog:t,variant:n});function ua(){const{query:e}=oa(),{canvas:t="view"}=e,{isSaveViewOpen:n,isDirty:s,isSaving:i}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,isSavingEntityRecord:n,isResolving:s}=e(j.store),i=t(),r=s("activateTheme"),{isSaveViewOpened:a}=ne(e(Rt));return{isSaveViewOpen:a(),isDirty:i.length>0,isSaving:i.some((e=>n(e.kind,e.name,e.key)))||r}}),[]),{setIsSaveViewOpened:r}=(0,c.useDispatch)(Rt),o=()=>r(!1);if((0,h.useEffect)((()=>{r(!1)}),[t,r]),"view"===t)return n?(0,a.jsx)(b.Modal,{className:"edit-site-save-panel__modal",onRequestClose:o,title:(0,w.__)("Review changes"),size:"small",children:(0,a.jsx)(ca,{onClose:o,variant:"inline"})}):null;const l=Qr()||s,u=i||!l;return(0,a.jsxs)(Wt,{className:Ht("edit-site-layout__actions",{"is-entity-save-view-open":n}),ariaLabel:(0,w.__)("Save panel"),children:[(0,a.jsx)("div",{className:Ht("edit-site-editor__toggle-save-panel",{"screen-reader-text":n}),children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",className:"edit-site-editor__toggle-save-panel-button",onClick:()=>r(!0),"aria-haspopup":"dialog",disabled:u,accessibleWhenDisabled:!0,children:(0,w.__)("Open save panel")})}),n&&(0,a.jsx)(ca,{onClose:o,renderDialog:!0})]})}const{useGlobalStyle:da}=ne(x.privateApis),{GlobalStylesProvider:ha}=ne(f.privateApis),{useLocation:pa}=ne(Lt.privateApis),fa=.3;function ma(){const{query:e,name:t,areas:n,widths:s}=pa(),{canvas:i="view"}=e,r=(0,y.useViewportMatch)("medium","<"),o=(0,h.useRef)(),l=(0,b.__unstableUseNavigateRegions)(),u=(0,y.useReducedMotion)(),[d,p]=(0,y.useResizeObserver)(),g=Sn(),[v,x]=(0,h.useState)(!1),_=Kr({triggerAnimationOnChange:t+"-"+i}),{showIconLabels:j}=(0,c.useSelect)((e=>({showIconLabels:e(m.store).get("core","showIconLabels")}))),[S]=da("color.background"),[C]=da("color.gradient"),k=(0,y.usePrevious)(i);return(0,h.useEffect)((()=>{"edit"===k&&o.current?.focus()}),[i]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.UnsavedChangesWarning,{}),"view"===i&&(0,a.jsx)(_n,{}),(0,a.jsx)("div",{...l,ref:l.ref,className:Ht("edit-site-layout",l.className,{"is-full-canvas":"edit"===i,"show-icon-labels":j}),children:(0,a.jsxs)("div",{className:"edit-site-layout__content",children:[(!r||!n.mobile)&&(0,a.jsx)(Wt,{ariaLabel:(0,w.__)("Navigation"),className:"edit-site-layout__sidebar-region",children:(0,a.jsx)(b.__unstableAnimatePresence,{children:"view"===i&&(0,a.jsxs)(b.__unstableMotion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{type:"tween",duration:u||r?0:fa,ease:"easeOut"},className:"edit-site-layout__sidebar",children:[(0,a.jsx)(un,{ref:o,isTransparent:v}),(0,a.jsx)(rn,{children:(0,a.jsx)(an,{shouldAnimate:"styles"!==t,routeKey:t,children:(0,a.jsx)(f.ErrorBoundary,{children:n.sidebar})})}),(0,a.jsx)(ta,{}),(0,a.jsx)(ua,{})]})})}),(0,a.jsx)(f.EditorSnackbars,{}),r&&n.mobile&&(0,a.jsx)("div",{className:"edit-site-layout__mobile",children:(0,a.jsx)(rn,{children:"edit"!==i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(dn,{ref:o,isTransparent:v}),(0,a.jsx)(an,{routeKey:t,children:(0,a.jsx)(f.ErrorBoundary,{children:n.mobile})}),(0,a.jsx)(ta,{}),(0,a.jsx)(ua,{})]}):(0,a.jsx)(f.ErrorBoundary,{children:n.mobile})})}),!r&&n.content&&"edit"!==i&&(0,a.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:s?.content},children:(0,a.jsx)(f.ErrorBoundary,{children:n.content})}),!r&&n.edit&&"edit"!==i&&(0,a.jsx)("div",{className:"edit-site-layout__area",style:{maxWidth:s?.edit},children:(0,a.jsx)(f.ErrorBoundary,{children:n.edit})}),!r&&n.preview&&(0,a.jsxs)("div",{className:"edit-site-layout__canvas-container",children:[d,!!p.width&&(0,a.jsx)("div",{className:Ht("edit-site-layout__canvas",{"is-right-aligned":v}),ref:_,children:(0,a.jsx)(f.ErrorBoundary,{children:(0,a.jsx)(xn,{isReady:!g,isFullWidth:"edit"===i,defaultSize:{width:p.width-24,height:p.height},isOversized:v,setIsOversized:x,innerContentStyle:{background:C??S},children:n.preview})})})]})]})})]})}function ga(e){const{createErrorNotice:t}=(0,c.useDispatch)(_.store);return(0,a.jsx)(b.SlotFillProvider,{children:(0,a.jsxs)(ha,{children:[(0,a.jsx)(Ut.PluginArea,{onError:function(e){t((0,w.sprintf)((0,w.__)('The "%s" plugin has encountered an error and cannot be rendered.'),e))}}),(0,a.jsx)(ma,{...e})]})})}var va=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})}),ya=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})}),xa=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})}),ba=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});const{useGlobalStylesReset:wa}=ne(x.privateApis),{useHistory:_a,useLocation:ja}=ne(Lt.privateApis),Sa=()=>function(){const{openGeneralSidebar:e}=ne((0,c.useDispatch)(Rt)),{params:t}=ja(),{canvas:n="view"}=t,{set:s}=(0,c.useDispatch)(m.store),i=_a(),r=(0,c.useSelect)((e=>e(j.store).getCurrentTheme().is_block_theme),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>r?[{name:"core/edit-site/toggle-styles-welcome-guide",label:(0,w.__)("Learn about styles"),callback:({close:t})=>{t(),"edit"!==n&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),e("edit-site/global-styles"),s("core/edit-site","welcomeGuideStyles",!0),setTimeout((()=>{s("core/edit-site","welcomeGuideStyles",!0)}),500)},icon:va}]:[]),[i,e,n,r,s])}},Ca=()=>function(){const[e,t]=wa();return{isLoading:!1,commands:(0,h.useMemo)((()=>e?[{name:"core/edit-site/reset-global-styles",label:(0,w.__)("Reset styles"),icon:(0,w.isRTL)()?ya:xa,callback:({close:e})=>{e(),t()}}]:[]),[e,t])}},ka=()=>function(){const{openGeneralSidebar:e,setEditorCanvasContainerView:t}=ne((0,c.useDispatch)(Rt)),{params:n}=ja(),{canvas:s="view"}=n,i=_a(),r=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return!!i?._links?.["version-history"]?.[0]?.count}),[]);return{isLoading:!1,commands:(0,h.useMemo)((()=>r?[{name:"core/edit-site/open-styles-revisions",label:(0,w.__)("Open style revisions"),icon:ba,callback:({close:n})=>{n(),"edit"!==s&&i.navigate("/styles?canvas=edit",{transition:"canvas-mode-edit-transition"}),e("edit-site/global-styles"),t("global-styles-revisions")}}]:[]),[i,e,t,r,s])}};var Ea=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const{EditorContentSlotFill:Pa,ResizableEditor:Ia}=ne(f.privateApis);function Va(e){switch(e){case"style-book":return(0,w.__)("Style Book");case"global-styles-revisions":case"global-styles-revisions:style-book":return(0,w.__)("Style Revisions");default:return""}}function Ta(){const e=(0,b.__experimentalUseSlotFills)(Pa.name);return!!e?.length}var Oa=function({children:e,closeButtonLabel:t,onClose:n,enableResizing:s=!1}){const{editorCanvasContainerView:i,showListViewByDefault:r}=(0,c.useSelect)((e=>({editorCanvasContainerView:ne(e(Rt)).getEditorCanvasContainerView(),showListViewByDefault:e(m.store).get("core","showListViewByDefault")})),[]),[o,l]=(0,h.useState)(!1),{setEditorCanvasContainerView:u}=ne((0,c.useDispatch)(Rt)),{setIsListViewOpened:d}=(0,c.useDispatch)(f.store),p=(0,y.useFocusOnMount)("firstElement"),g=(0,y.useFocusReturn)();function v(){d(r),u(void 0),l(!0),"function"==typeof n&&n()}const x=Array.isArray(e)?h.Children.map(e,((e,t)=>0===t?(0,h.cloneElement)(e,{ref:g}):e)):(0,h.cloneElement)(e,{ref:g});if(o)return null;const _=Va(i),j=n||t;return(0,a.jsx)(Pa.Fill,{children:(0,a.jsx)("div",{className:"edit-site-editor-canvas-container",children:(0,a.jsx)(Ia,{enableResizing:s,children:(0,a.jsxs)("section",{className:"edit-site-editor-canvas-container__section",ref:j?p:null,onKeyDown:function(e){e.keyCode!==Xt.ESCAPE||e.defaultPrevented||(e.preventDefault(),v())},"aria-label":_,children:[j&&(0,a.jsx)(b.Button,{size:"compact",className:"edit-site-editor-canvas-container__close-button",icon:Ea,label:t||(0,w.__)("Close"),onClick:v}),x]})})})})};const{useCommandContext:Aa}=ne(Kt.privateApis),{useLocation:Na}=ne(Lt.privateApis);var Fa=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20 12a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 0 1-6.5 6.5v-13a6.5 6.5 0 0 1 6.5 6.5Z"})}),Ma=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),Ba=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,a.jsx)(Zt.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),Da=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),Ra=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),La=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})}),za=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})});function Ha(e){return(0,a.jsx)(b.Button,{size:"compact",...e,className:Ht("edit-site-sidebar-button",e.className)})}const{useHistory:Ga,useLocation:Wa}=ne(Lt.privateApis);function Ua({isRoot:e,title:t,actions:n,content:s,footer:i,description:r,backPath:o}){const{dashboardLink:l,dashboardLinkText:u,previewingThemeName:d}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),n=Jr();return{dashboardLink:t().__experimentalDashboardLink,dashboardLinkText:t().__experimentalDashboardLinkText,previewingThemeName:n?e(j.store).getTheme(n)?.name?.rendered:void 0}}),[]),p=Wa(),f=Ga(),{navigate:m}=(0,h.useContext)(tn),g=o??p.state?.backPath,v=(0,w.isRTL)()?La:za;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalVStack,{className:Ht("edit-site-sidebar-navigation-screen__main",{"has-footer":!!i}),spacing:0,justify:"flex-start",children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:3,alignment:"flex-start",className:"edit-site-sidebar-navigation-screen__title-icon",children:[!e&&(0,a.jsx)(Ha,{onClick:()=>{f.navigate(g),m("back")},icon:v,label:(0,w.__)("Back"),showTooltip:!1}),e&&(0,a.jsx)(Ha,{icon:v,label:u||(0,w.__)("Go to the Dashboard"),href:l}),(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-sidebar-navigation-screen__title",color:"#e0e0e0",level:1,size:20,children:Qr()?(0,w.sprintf)((0,w.__)("Previewing %1$s: %2$s"),d,t):t}),n&&(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen__actions",children:n})]}),(0,a.jsxs)("div",{className:"edit-site-sidebar-navigation-screen__content",children:[r&&(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen__description",children:r}),s]})]}),i&&(0,a.jsx)("footer",{className:"edit-site-sidebar-navigation-screen__footer",children:i})]})}var qa=(0,h.forwardRef)((({icon:e,size:t=24,...n},s)=>(0,h.cloneElement)(e,{width:t,height:t,...n,ref:s}))),Za=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})}),Ya=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})});const{useHistory:Ka,useLink:Xa}=ne(Lt.privateApis);function Qa({className:e,icon:t,withChevron:n=!1,suffix:s,uid:i,to:r,onClick:o,children:l,...c}){const u=Ka(),{navigate:d}=(0,h.useContext)(tn);const p=Xa(r);return(0,a.jsx)(b.__experimentalItem,{className:Ht("edit-site-sidebar-navigation-item",{"with-suffix":!n&&s},e),id:i,onClick:function(e){o?(o(e),d("forward")):r&&(e.preventDefault(),u.navigate(r),d("forward",`[id="${i}"]`))},href:r?p.href:void 0,...c,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[t&&(0,a.jsx)(qa,{style:{fill:"currentcolor"},icon:t,size:24}),(0,a.jsx)(b.FlexBlock,{children:l}),n&&(0,a.jsx)(qa,{icon:(0,w.isRTL)()?Za:Ya,className:"edit-site-sidebar-navigation-item__drilldown-indicator",size:24}),!n&&s]})})}const Ja={per_page:-1,_fields:"id,name,avatar_urls",context:"view",capabilities:["edit_theme_options"]},$a={per_page:100,page:1},eo=[],{GlobalStylesContext:to}=ne(x.privateApis);function no({query:e}={}){const{user:t}=(0,h.useContext)(to),n={...$a,...e},{authors:s,currentUser:i,isDirty:r,revisions:a,isLoadingGlobalStylesRevisions:o,revisionsCount:l}=(0,c.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getCurrentUser:s,getUsers:i,getRevisions:r,__experimentalGetCurrentGlobalStylesId:a,getEntityRecord:o,isResolving:l}=e(j.store),c=t(),u=s(),d=c.length>0,h=a(),p=h?o("root","globalStyles",h):void 0,f=p?._links?.["version-history"]?.[0]?.count??0,m=r("root","globalStyles",h,n)||eo;return{authors:i(Ja)||eo,currentUser:u,isDirty:d,revisions:m,isLoadingGlobalStylesRevisions:l("getRevisions",["root","globalStyles",h,n]),revisionsCount:f}}),[e]);return(0,h.useMemo)((()=>{if(!s.length||o)return{revisions:eo,hasUnsavedChanges:r,isLoading:!0,revisionsCount:l};const e=a.map((e=>({...e,author:s.find((t=>t.id===e.author))})));if(a.length){if("unsaved"!==e[0].id&&1===n.page&&(e[0].isLatest=!0),r&&t&&Object.keys(t).length>0&&i&&1===n.page){const n={id:"unsaved",styles:t?.styles,settings:t?.settings,_links:t?._links,author:{name:i?.name,avatar_urls:i?.avatar_urls},modified:new Date};e.unshift(n)}n.page===Math.ceil(l/n.per_page)&&e.push({id:"parent",styles:{},settings:{}})}return{revisions:e,hasUnsavedChanges:r,isLoading:!1,revisionsCount:l}}),[r,a,i,s,t,o])}function so({record:e,revisionsCount:t,...n}){const s={},i=e?._links?.["predecessor-version"]?.[0]?.id??null;return t=t||e?._links?.["version-history"]?.[0]?.count||0,i&&t>1&&(s.href=(0,Qt.addQueryArgs)("revision.php",{revision:e?._links["predecessor-version"][0].id}),s.as="a"),(0,a.jsx)(b.__experimentalItemGroup,{size:"large",className:"edit-site-sidebar-navigation-screen-details-footer",children:(0,a.jsx)(Qa,{icon:ba,...s,...n,children:(0,w.sprintf)((0,w._n)("%d Revision","%d Revisions",t),t)})})}const{useLocation:io,useHistory:ro}=ne(Lt.privateApis);function ao(e){const{name:t}=io();return(0,a.jsx)(Qa,{...e,"aria-current":"styles"===t})}function oo(){const e=ro(),{path:t}=io(),{revisions:n,isLoading:s,revisionsCount:i}=no(),{openGeneralSidebar:r}=(0,c.useDispatch)(Rt),{setEditorCanvasContainerView:o}=ne((0,c.useDispatch)(Rt)),{set:l}=(0,c.useDispatch)(m.store),u=(0,h.useCallback)((async()=>(e.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),Promise.all([l("core","distractionFree",!1),r("edit-site/global-styles")]))),[t,e,r,l]),d=(0,h.useCallback)((async()=>{await u(),o("global-styles-revisions")}),[u,o]),p=!!i&&!s;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Ua,{title:(0,w.__)("Design"),isRoot:!0,description:(0,w.__)("Customize the appearance of your website using the block editor."),content:(0,a.jsx)(lo,{activeItem:"styles-navigation-item"}),footer:p&&(0,a.jsx)(so,{record:n?.[0],revisionsCount:i,onClick:d})})})}function lo({isBlockBasedTheme:e=!0}){return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-main",children:[e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ao,{to:"/styles",uid:"global-styles-navigation-item",icon:Fa,children:(0,w.__)("Styles")}),(0,a.jsx)(Qa,{uid:"navigation-navigation-item",to:"/navigation",withChevron:!0,icon:Ma,children:(0,w.__)("Navigation")}),(0,a.jsx)(Qa,{uid:"page-navigation-item",to:"/page",withChevron:!0,icon:Ba,children:(0,w.__)("Pages")}),(0,a.jsx)(Qa,{uid:"template-navigation-item",to:"/template",withChevron:!0,icon:Da,children:(0,w.__)("Templates")})]}),!e&&(0,a.jsx)(Qa,{uid:"stylebook-navigation-item",to:"/stylebook",withChevron:!0,icon:Fa,children:(0,w.__)("Styles")}),(0,a.jsx)(Qa,{uid:"patterns-navigation-item",to:"/pattern",withChevron:!0,icon:Ra,children:(0,w.__)("Patterns")})]})}function co({customDescription:e}){const t=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.is_block_theme),[]),{setEditorCanvasContainerView:n}=ne((0,c.useDispatch)(Rt));let s;return(0,h.useEffect)((()=>{n(void 0)}),[n]),s=e||(t?(0,w.__)("Customize the appearance of your website using the block editor."):(0,w.__)("Explore block styles and patterns to refine your site.")),(0,a.jsx)(Ua,{isRoot:!0,title:(0,w.__)("Design"),description:s,content:(0,a.jsx)(lo,{isBlockBasedTheme:t})})}function uo(){return(0,a.jsx)(b.__experimentalSpacer,{padding:3,children:(0,a.jsx)(b.Notice,{status:"warning",isDismissible:!1,children:(0,w.__)("The theme you are currently using does not support this screen.")})})}var ho=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M14 6H6v8h1.5V8.5L17 18l1-1-9.5-9.5H14V6Z"})});function po({nonAnimatedSrc:e,animatedSrc:t}){return(0,a.jsxs)("picture",{className:"edit-site-welcome-guide__image",children:[(0,a.jsx)("source",{srcSet:e,media:"(prefers-reduced-motion: reduce)"}),(0,a.jsx)("img",{src:t,width:"312",height:"240",alt:""})]})}function fo(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,isBlockBasedTheme:n}=(0,c.useSelect)((e=>({isActive:!!e(m.store).get("core/edit-site","welcomeGuide"),isBlockBasedTheme:e(j.store).getCurrentTheme()?.is_block_theme})),[]);return t&&n?(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-editor",contentLabel:(0,w.__)("Welcome to the site editor"),finishButtonText:(0,w.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuide"),pages:[{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/edit-your-site.svg?1",animatedSrc:"https://s.w.org/images/block-editor/edit-your-site.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Edit your site")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Design everything on your site — from the header right down to the footer — using blocks.")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,h.createInterpolateElement)((0,w.__)("Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors."),{StylesIconImage:(0,a.jsx)("img",{alt:(0,w.__)("styles"),src:"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath 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' fill='%231E1E1E'/%3E%3C/svg%3E%0A"})})})]})}]}):null}const{interfaceStore:mo}=ne(f.privateApis);function go(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,isStylesOpen:n}=(0,c.useSelect)((e=>{const t=e(mo).getActiveComplementaryArea("core");return{isActive:!!e(m.store).get("core/edit-site","welcomeGuideStyles"),isStylesOpen:"edit-site/global-styles"===t}}),[]);if(!t||!n)return null;const s=(0,w.__)("Welcome to Styles");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-styles",contentLabel:s,finishButtonText:(0,w.__)("Get started"),onFinish:()=>e("core/edit-site","welcomeGuideStyles"),pages:[{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.svg?1",animatedSrc:"https://s.w.org/images/block-editor/welcome-to-styles.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/set-the-design.svg?1",animatedSrc:"https://s.w.org/images/block-editor/set-the-design.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Set the design")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.svg?1",animatedSrc:"https://s.w.org/images/block-editor/personalize-blocks.gif?1"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Personalize blocks")}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.")})]})},{image:(0,a.jsx)(po,{nonAnimatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.svg",animatedSrc:"https://s.w.org/images/block-editor/welcome-documentation.gif"}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:(0,w.__)("Learn more")}),(0,a.jsxs)("p",{className:"edit-site-welcome-guide__text",children:[(0,w.__)("New to block themes and styling your site?")," ",(0,a.jsx)(b.ExternalLink,{href:(0,w.__)("https://wordpress.org/documentation/article/styles-overview/"),children:(0,w.__)("Here’s a detailed guide to learn how to make the most of it.")})]})]})}]})}function vo(){const{toggle:e}=(0,c.useDispatch)(m.store);if(!(0,c.useSelect)((e=>{const t=!!e(m.store).get("core/edit-site","welcomeGuidePage"),n=!!e(m.store).get("core/edit-site","welcomeGuide");return t&&!n}),[]))return null;const t=(0,w.__)("Editing a page");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-page",contentLabel:t,finishButtonText:(0,w.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuidePage"),pages:[{image:(0,a.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,a.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-page.mp4",type:"video/mp4"})}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:t}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.")})]})}]})}function yo(){const{toggle:e}=(0,c.useDispatch)(m.store),{isActive:t,hasPreviousEntity:n}=(0,c.useSelect)((e=>{const{getEditorSettings:t}=e(f.store),{get:n}=e(m.store);return{isActive:n("core/edit-site","welcomeGuideTemplate"),hasPreviousEntity:!!t().onNavigateToPreviousEntityRecord}}),[]);if(!(t&&n))return null;const s=(0,w.__)("Editing a template");return(0,a.jsx)(b.Guide,{className:"edit-site-welcome-guide guide-template",contentLabel:s,finishButtonText:(0,w.__)("Continue"),onFinish:()=>e("core/edit-site","welcomeGuideTemplate"),pages:[{image:(0,a.jsx)("video",{className:"edit-site-welcome-guide__video",autoPlay:!0,loop:!0,muted:!0,width:"312",height:"240",children:(0,a.jsx)("source",{src:"https://s.w.org/images/block-editor/editing-your-template.mp4",type:"video/mp4"})}),content:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"edit-site-welcome-guide__heading",children:s}),(0,a.jsx)("p",{className:"edit-site-welcome-guide__text",children:(0,w.__)("Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.")})]})}]})}function xo({postType:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(fo,{}),(0,a.jsx)(go,{}),"page"===e&&(0,a.jsx)(vo,{}),"wp_template"===e&&(0,a.jsx)(yo,{})]})}const{useGlobalStylesOutput:bo}=ne(x.privateApis);function wo({disableRootPadding:e}){return function(e){const[t,n]=bo(e),{getSettings:s}=(0,c.useSelect)(Rt),{updateSettings:i}=(0,c.useDispatch)(Rt);(0,h.useEffect)((()=>{if(!t||!n)return;const e=s(),r=Object.values(e.styles??[]).filter((e=>!e.isGlobalStyles));i({...e,styles:[...r,...t],__experimentalFeatures:n})}),[t,n,i,s])}(e),null}const{Theme:_o}=ne(b.privateApis),{useGlobalStyle:jo}=ne(x.privateApis);function So({id:e}){const[t]=jo("color.text"),[n]=jo("color.background"),{highlightedColors:s}=re(),i=s[0]?.color??t,{elapsed:r,total:o}=(0,c.useSelect)((e=>{const t=e(j.store).countSelectorsByStatus(),n=t.resolving??0,s=t.finished??0;return{elapsed:s,total:s+n}}),[]);return(0,a.jsx)("div",{className:"edit-site-canvas-loader",children:(0,a.jsx)(_o,{accent:i,background:n,children:(0,a.jsx)(b.ProgressBar,{id:e,max:o,value:r})})})}const{useHistory:Co}=ne(Lt.privateApis);const{useLocation:ko,useHistory:Eo}=ne(Lt.privateApis);function Po(){const{query:e}=ko(),{canvas:t="view"}=e,n=function(){const e=Co();return(0,h.useCallback)((t=>{e.navigate(`/${t.postType}/${t.postId}?canvas=edit&focusMode=true`)}),[e])}(),{settings:s}=(0,c.useSelect)((e=>{const{getSettings:t}=e(Rt);return{settings:t()}}),[]),i=function(){const e=ko(),t=(0,y.usePrevious)(e),n=Eo();return(0,h.useMemo)((()=>{const s=e.query.focusMode||e?.params?.postId&&Ne.includes(e?.params?.postType),i="edit"===t?.query.canvas;return s&&i?()=>n.back():void 0}),[e,n])}();return(0,h.useMemo)((()=>({...s,richEditingEnabled:!0,supportsTemplateMode:!0,focusMode:"view"!==t,onNavigateToEntityRecord:n,onNavigateToPreviousEntityRecord:i,isPreviewMode:"view"===t})),[s,t,n,i])}const{Fill:Io,Slot:Vo}=(0,b.createSlotFill)("PluginTemplateSettingPanel"),To=({children:e})=>{d()("wp.editSite.PluginTemplateSettingPanel",{since:"6.6",version:"6.8",alternative:"wp.editor.PluginDocumentSettingPanel"});return(0,c.useSelect)((e=>"wp_template"===e(f.store).getCurrentPostType()),[])?(0,a.jsx)(Io,{children:e}):null};To.Slot=Vo;var Oo=To,Ao=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z"})}),No=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});function Fo({className:e,...t}){return(0,a.jsx)(b.Icon,{className:Ht(e,"edit-site-global-styles-icon-with-current-color"),...t})}function Mo({icon:e,children:t,...n}){return(0,a.jsxs)(b.__experimentalItem,{...n,children:[e&&(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(Fo,{icon:e,size:24}),(0,a.jsx)(b.FlexItem,{children:t})]}),!e&&t]})}function Bo(e){return(0,a.jsx)(b.Navigator.Button,{as:Mo,...e})}var Do=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m8.6 7 3.9 10.8h-1.7l-1-2.8H5.7l-1 2.8H3L6.9 7h1.7Zm-2.4 6.6h3L7.7 9.3l-1.5 4.3ZM17.691 8.879c.473 0 .88.055 1.221.165.352.1.643.264.875.495.274.253.456.572.544.957.088.374.132.83.132 1.37v4.554c0 .274.033.472.099.593.077.11.198.166.363.166.11 0 .215-.028.313-.083.11-.055.237-.137.38-.247l.165.28a3.304 3.304 0 0 1-.71.446c-.23.11-.527.165-.89.165-.352 0-.639-.055-.858-.165-.22-.11-.386-.27-.495-.479-.1-.209-.149-.468-.149-.775-.286.462-.627.814-1.023 1.056-.396.242-.858.363-1.386.363-.462 0-.858-.088-1.188-.264a1.752 1.752 0 0 1-.742-.726 2.201 2.201 0 0 1-.248-1.056c0-.484.11-.875.33-1.172.22-.308.5-.556.841-.742.352-.187.721-.341 1.106-.462.396-.132.765-.253 1.106-.363.351-.121.637-.259.857-.413.232-.154.347-.357.347-.61V10.81c0-.396-.066-.71-.198-.941a1.05 1.05 0 0 0-.511-.511 1.763 1.763 0 0 0-.76-.149c-.253 0-.522.039-.808.116a1.165 1.165 0 0 0-.677.412 1.1 1.1 0 0 1 .595.396c.165.187.247.424.247.71 0 .307-.104.55-.313.726-.198.176-.451.263-.76.263-.34 0-.594-.104-.758-.313a1.231 1.231 0 0 1-.248-.759c0-.297.072-.539.214-.726.154-.187.352-.363.595-.528.264-.176.6-.324 1.006-.445.418-.121.88-.182 1.386-.182Zm.99 3.729a1.57 1.57 0 0 1-.528.462c-.231.121-.479.248-.742.38a5.377 5.377 0 0 0-.76.462c-.23.165-.423.38-.577.643-.154.264-.231.6-.231 1.007 0 .429.11.77.33 1.023.22.242.517.363.891.363.308 0 .594-.088.858-.264.275-.176.528-.44.759-.792v-3.284Z"})}),Ro=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})}),Lo=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.53 4.47a.75.75 0 1 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm5 1a.75.75 0 1 0-1.06 1.06l2 2a.75.75 0 1 0 1.06-1.06l-2-2Zm-11.06 10a.75.75 0 0 1 1.06 0l2 2a.75.75 0 1 1-1.06 1.06l-2-2a.75.75 0 0 1 0-1.06Zm.06-5a.75.75 0 0 0-1.06 1.06l8 8a.75.75 0 1 0 1.06-1.06l-8-8Zm-.06-3a.75.75 0 0 1 1.06 0l10 10a.75.75 0 1 1-1.06 1.06l-10-10a.75.75 0 0 1 0-1.06Zm3.06-2a.75.75 0 0 0-1.06 1.06l10 10a.75.75 0 1 0 1.06-1.06l-10-10Z"})}),zo=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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"})});const{useHasDimensionsPanel:Ho,useHasTypographyPanel:Go,useHasColorPanel:Wo,useGlobalSetting:Uo,useSettingsForBlockElement:qo,useHasBackgroundPanel:Zo}=ne(x.privateApis);var Yo=function(){const[e]=Uo(""),t=qo(e),n=Zo(e),s=Go(t),i=Wo(t),r=Ho(t);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(b.__experimentalItemGroup,{children:[s&&(0,a.jsx)(Bo,{icon:Do,path:"/typography",children:(0,w.__)("Typography")}),i&&(0,a.jsx)(Bo,{icon:Ro,path:"/colors",children:(0,w.__)("Colors")}),n&&(0,a.jsx)(Bo,{icon:Lo,path:"/background","aria-label":(0,w.__)("Background styles"),children:(0,w.__)("Background")}),(0,a.jsx)(Bo,{icon:zo,path:"/shadows",children:(0,w.__)("Shadows")}),r&&(0,a.jsx)(Bo,{icon:Da,path:"/layout",children:(0,w.__)("Layout")})]})})};function Ko(e){const t=/^(?!generic\([ a-zA-Z\-]+\)$)(?!^[a-zA-Z\-]+$).+/,n=e.trim(),s=e=>(e=e.trim()).match(t)?`"${e=e.replace(/^["']|["']$/g,"")}"`:e;return n.includes(",")?n.split(",").map(s).filter((e=>""!==e)).join(", "):s(n)}function Xo(e){if(!e)return"";let t=e.trim();return t.includes(",")&&(t=t.split(",").find((e=>""!==e.trim())).trim()),t=t.replace(/^["']|["']$/g,""),window.navigator.userAgent.toLowerCase().includes("firefox")&&(t=`"${t}"`),t}function Qo(e){const t={fontFamily:Ko(e.fontFamily)};if(!Array.isArray(e.fontFace))return t.fontWeight="400",t.fontStyle="normal",t;if(e.fontFace){const i=e.fontFace.filter((e=>e?.fontStyle&&"normal"===e.fontStyle.toLowerCase()));if(i.length>0){t.fontStyle="normal";const e=function(e){const t=[];return e.forEach((e=>{const n=String(e.fontWeight).split(" ");if(2===n.length){const e=parseInt(n[0]),s=parseInt(n[1]);for(let n=e;n<=s;n+=100)t.push(n)}else 1===n.length&&t.push(parseInt(n[0]))})),t}(i),r=(n=400,0===(s=e).length?null:(s.sort(((e,t)=>Math.abs(n-e)-Math.abs(n-t))),s[0]));t.fontWeight=String(r)||"400"}else t.fontStyle=e.fontFace.length&&e.fontFace[0].fontStyle||"normal",t.fontWeight=e.fontFace.length&&String(e.fontFace[0].fontWeight)||"400"}var n,s;return t}function Jo(e){return e?`is-style-${e}`:""}function $o(e,t){const n=new RegExp(`^${t}([\\d]+)$`);return e.reduce(((e,t)=>{if("string"==typeof t?.slug){const s=t?.slug.match(n);if(s){const t=parseInt(s[1],10);if(t>e)return t}}return e}),0)+1}function el(e,t){if(!Array.isArray(e)||!t)return null;const n=t.replace("var(","").replace(")",""),s=n?.split("--").slice(-1)[0];return e.find((e=>e.slug===s))}const{useGlobalStyle:tl,GlobalStylesContext:nl}=ne(x.privateApis),{mergeBaseAndUserConfigs:sl}=ne(f.privateApis);function il({fontSize:e,variation:t}){const{base:n}=(0,h.useContext)(nl);let s=n;t&&(s=sl(n,t));const[i]=tl("color.text"),[r,o]=function(e){const t=e?.settings?.typography?.fontFamilies?.theme,n=e?.settings?.typography?.fontFamilies?.custom;let s=[];t&&n?s=[...t,...n]:t?s=t:n&&(s=n);const i=e?.styles?.typography?.fontFamily,r=el(s,i),a=e?.styles?.elements?.heading?.typography?.fontFamily;let o;return o=a?el(s,e?.styles?.elements?.heading?.typography?.fontFamily):r,[r,o]}(s),l=r?Qo(r):{},c=o?Qo(o):{};return i&&(l.color=i,c.color=i),e&&(l.fontSize=e,c.fontSize=e),(0,a.jsxs)(b.__unstableMotion.div,{animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:.3,type:"tween"},style:{textAlign:"center",lineHeight:1},children:[(0,a.jsx)("span",{style:c,children:(0,w._x)("A","Uppercase letter A")}),(0,a.jsx)("span",{style:l,children:(0,w._x)("a","Lowercase letter A")})]})}function rl({normalizedColorSwatchSize:e,ratio:t}){const{highlightedColors:n}=re(),s=e*t;return n.map((({slug:e,color:t},n)=>(0,a.jsx)(b.__unstableMotion.div,{style:{height:s,width:s,background:t,borderRadius:s/2},animate:{scale:1,opacity:1},initial:{scale:.1,opacity:0},transition:{delay:1===n?.2:.1}},`${e}-${n}`)))}const{useGlobalStyle:al}=ne(x.privateApis),ol={leading:!0,trailing:!0};function ll({children:e,label:t,isFocused:n,withHoverView:s}){const[i="white"]=al("color.background"),[r]=al("color.gradient"),o=(0,y.useReducedMotion)(),[l,c]=(0,h.useState)(!1),[u,{width:d}]=(0,y.useResizeObserver)(),[p,f]=(0,h.useState)(d),[m,g]=(0,h.useState)(),v=(0,y.useThrottle)(f,250,ol);(0,h.useLayoutEffect)((()=>{d&&v(d)}),[d,v]),(0,h.useLayoutEffect)((()=>{const e=p?p/248:1,t=e-(m||0);!(Math.abs(t)>.1)&&m||g(e)}),[p,m]);const x=m||(d?d/248:1),w=!!d;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{position:"relative"},children:u}),w&&(0,a.jsx)("div",{className:"edit-site-global-styles-preview__wrapper",style:{height:152*x},onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),tabIndex:-1,children:(0,a.jsx)(b.__unstableMotion.div,{style:{height:152*x,width:"100%",background:r??i,cursor:s?"pointer":void 0},initial:"start",animate:(l||n)&&!o&&t?"hover":"start",children:[].concat(e).map(((e,t)=>e({ratio:x,key:t})))})})]})}const{useGlobalStyle:cl}=ne(x.privateApis),ul={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}},dl={hover:{opacity:1},start:{opacity:.5}},hl={hover:{scale:1,opacity:1},start:{scale:0,opacity:0}};var pl=({label:e,isFocused:t,withHoverView:n,variation:s})=>{const[i]=cl("typography.fontWeight"),[r="serif"]=cl("typography.fontFamily"),[o=r]=cl("elements.h1.typography.fontFamily"),[l=i]=cl("elements.h1.typography.fontWeight"),[c="black"]=cl("color.text"),[u=c]=cl("elements.h1.color.text"),{paletteColors:d}=re();return(0,a.jsxs)(ll,{label:e,isFocused:t,withHoverView:n,children:[({ratio:e,key:t})=>(0,a.jsx)(b.__unstableMotion.div,{variants:ul,style:{height:"100%",overflow:"hidden"},children:(0,a.jsxs)(b.__experimentalHStack,{spacing:10*e,justify:"center",style:{height:"100%",overflow:"hidden"},children:[(0,a.jsx)(il,{fontSize:65*e,variation:s}),(0,a.jsx)(b.__experimentalVStack,{spacing:4*e,children:(0,a.jsx)(rl,{normalizedColorSwatchSize:32,ratio:e})})]})},t),({key:e})=>(0,a.jsx)(b.__unstableMotion.div,{variants:n&&dl,style:{height:"100%",width:"100%",position:"absolute",top:0,overflow:"hidden",filter:"blur(60px)",opacity:.1},children:(0,a.jsx)(b.__experimentalHStack,{spacing:0,justify:"flex-start",style:{height:"100%",overflow:"hidden"},children:d.slice(0,4).map((({color:e},t)=>(0,a.jsx)("div",{style:{height:"100%",background:e,flexGrow:1}},t)))})},e),({ratio:t,key:n})=>(0,a.jsx)(b.__unstableMotion.div,{variants:hl,style:{height:"100%",width:"100%",overflow:"hidden",position:"absolute",top:0},children:(0,a.jsx)(b.__experimentalVStack,{spacing:3*t,justify:"center",style:{height:"100%",overflow:"hidden",padding:10*t,boxSizing:"border-box"},children:e&&(0,a.jsx)("div",{style:{fontSize:40*t,fontFamily:o,color:u,fontWeight:l,lineHeight:"1em",textAlign:"center"},children:e})})},n)]})};var fl=function(){const e=(0,c.useSelect)((e=>{const{__experimentalGetCurrentThemeGlobalStylesVariations:t}=e(j.store);return!!t()?.length}),[]);return(0,a.jsxs)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-root",isRounded:!1,children:[(0,a.jsx)(b.CardBody,{children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.Card,{className:"edit-site-global-styles-screen-root__active-style-tile",children:(0,a.jsx)(b.CardMedia,{className:"edit-site-global-styles-screen-root__active-style-tile-preview",children:(0,a.jsx)(pl,{})})}),e&&(0,a.jsx)(b.__experimentalItemGroup,{children:(0,a.jsx)(Bo,{path:"/variations",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Browse styles")}),(0,a.jsx)(Fo,{icon:(0,w.isRTL)()?za:La})]})})}),(0,a.jsx)(Yo,{})]})}),(0,a.jsx)(b.CardDivider,{}),(0,a.jsxs)(b.CardBody,{children:[(0,a.jsx)(b.__experimentalSpacer,{as:"p",paddingTop:2,paddingX:"13px",marginBottom:2,children:(0,w.__)("Customize the appearance of specific blocks for the whole site.")}),(0,a.jsx)(b.__experimentalItemGroup,{children:(0,a.jsx)(Bo,{path:"/blocks",children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Blocks")}),(0,a.jsx)(Fo,{icon:(0,w.isRTL)()?za:La})]})})})]})]})};const ml=window.wp.a11y,{useGlobalStyle:gl}=ne(x.privateApis);function vl(e){const t=(0,c.useSelect)((t=>{const{getBlockStyles:n}=t(o.store);return n(e)}),[e]),[n]=gl("variations",e);return function(e,t){return e?.filter((e=>"block"===e.source||t.includes(e.name)))}(t,Object.keys(n??{}))}function yl({name:e}){const t=vl(e);return(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map(((t,n)=>t?.isDefault?null:(0,a.jsx)(Bo,{path:"/blocks/"+encodeURIComponent(e)+"/variations/"+encodeURIComponent(t.name),children:t.label},n)))})}var xl=function({title:e,description:t,onBack:n}){return(0,a.jsxs)(b.__experimentalVStack,{spacing:0,children:[(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{marginBottom:0,paddingX:4,paddingY:3,children:(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",label:(0,w.__)("Back"),onClick:n}),(0,a.jsx)(b.__experimentalSpacer,{children:(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-global-styles-header",level:2,size:13,children:e})})]})})}),t&&(0,a.jsx)("p",{className:"edit-site-global-styles-header__description",children:t})]})};const{useHasDimensionsPanel:bl,useHasTypographyPanel:wl,useHasBorderPanel:_l,useGlobalSetting:jl,useSettingsForBlockElement:Sl,useHasColorPanel:Cl}=ne(x.privateApis);function kl(e){const[t]=jl("",e),n=Sl(t,e),s=wl(n),i=Cl(n),r=_l(n),a=bl(n),o=r||a,l=!!vl(e)?.length;return s||i||o||l}function El({block:e}){return kl(e.name)?(0,a.jsx)(Bo,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(x.BlockIcon,{icon:e.icon}),(0,a.jsx)(b.FlexItem,{children:e.title})]})}):null}const Pl=(0,h.memo)((function({filterValue:e}){const t=function(){const e=(0,c.useSelect)((e=>e(o.store).getBlockTypes()),[]),{core:t,noncore:n}=e.reduce(((e,t)=>{const{core:n,noncore:s}=e;return(t.name.startsWith("core/")?n:s).push(t),e}),{core:[],noncore:[]});return[...t,...n]}(),n=(0,y.useDebounce)(ml.speak,500),{isMatchingSearchTerm:s}=(0,c.useSelect)(o.store),i=e?t.filter((t=>s(t,e))):t,r=(0,h.useRef)();return(0,h.useEffect)((()=>{if(!e)return;const t=r.current.childElementCount,s=(0,w.sprintf)((0,w._n)("%d result found.","%d results found.",t),t);n(s,t)}),[e,n]),(0,a.jsx)("div",{ref:r,className:"edit-site-block-types-item-list",role:"list",children:0===i.length?(0,a.jsx)(b.__experimentalText,{align:"center",as:"p",children:(0,w.__)("No blocks found.")}):i.map((e=>(0,a.jsx)(El,{block:e},"menu-itemblock-"+e.name)))})}));var Il=function(){const[e,t]=(0,h.useState)(""),n=(0,h.useDeferredValue)(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Blocks"),description:(0,w.__)("Customize the appearance of specific blocks and for the whole site.")}),(0,a.jsx)(b.SearchControl,{__nextHasNoMarginBottom:!0,className:"edit-site-block-types-search",onChange:t,value:e,label:(0,w.__)("Search"),placeholder:(0,w.__)("Search")}),(0,a.jsx)(Pl,{filterValue:n})]})};var Vl=({name:e,variation:t=""})=>{const n=(0,o.getBlockType)(e)?.example,s=(0,h.useMemo)((()=>{if(!n)return null;const s={...n,attributes:{...n.attributes,style:void 0,className:t?Jo(t):n.attributes?.className}};return(0,o.getBlockFromExample)(e,s)}),[e,n,t]),i=n?.viewportWidth??500,r=144,l=235/i,c=0!==l&&l<1?r/l:r;return n?(0,a.jsx)(b.__experimentalSpacer,{marginX:4,marginBottom:4,children:(0,a.jsx)("div",{className:"edit-site-global-styles__block-preview-panel",style:{maxHeight:r,boxSizing:"initial"},children:(0,a.jsx)(x.BlockPreview,{blocks:s,viewportWidth:i,minHeight:r,additionalStyles:[{css:`\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\tmin-height:${Math.round(c)}px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\n\t\t\t\t\t\t\t`}]})})}):null};var Tl=function({children:e,level:t}){return(0,a.jsx)(b.__experimentalHeading,{className:"edit-site-global-styles-subtitle",level:t??2,children:e})};const Ol={backgroundSize:"cover",backgroundPosition:"50% 50%"};function Al(e){if(!e)return e;const t=e.color||e.width;return!e.style&&t?{...e,style:"solid"}:!e.style||t?e:void 0}const{useHasDimensionsPanel:Nl,useHasTypographyPanel:Fl,useHasBorderPanel:Ml,useGlobalSetting:Bl,useSettingsForBlockElement:Dl,useHasColorPanel:Rl,useHasFiltersPanel:Ll,useHasImageSettingsPanel:zl,useGlobalStyle:Hl,useHasBackgroundPanel:Gl,BackgroundPanel:Wl,BorderPanel:Ul,ColorPanel:ql,TypographyPanel:Zl,DimensionsPanel:Yl,FiltersPanel:Kl,ImageSettingsPanel:Xl,AdvancedPanel:Ql}=ne(x.privateApis);var Jl=function({name:e,variation:t}){let n=[];t&&(n=["variations",t].concat(n));const s=n.join("."),[i]=Hl(s,e,"user",{shouldDecodeEncode:!1}),[r,l]=Hl(s,e,"all",{shouldDecodeEncode:!1}),[u]=Bl("",e,"user"),[d,p]=Bl("",e),f=Dl(d,e),m=(0,o.getBlockType)(e);let g=!1;f?.spacing?.blockGap&&m?.supports?.spacing?.blockGap&&(!0===m?.supports?.spacing?.__experimentalSkipSerialization||m?.supports?.spacing?.__experimentalSkipSerialization?.some?.((e=>"blockGap"===e)))&&(g=!0);let v=!1;f?.dimensions?.aspectRatio&&"core/group"===e&&(v=!0);const y=(0,h.useMemo)((()=>{const e=structuredClone(f);return g&&(e.spacing.blockGap=!1),v&&(e.dimensions.aspectRatio=!1),e}),[f,g,v]),x=vl(e),_=Gl(y),S=Fl(y),C=Rl(y),k=Ml(y),E=Nl(y),P=Ll(y),I=zl(e,u,y),V=!!x?.length&&!t,{canEditCSS:T}=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),O=t?x.find((e=>e.name===t)):null,A=(0,h.useMemo)((()=>({...r,layout:y.layout})),[r,y.layout]),N=(0,h.useMemo)((()=>({...i,layout:u.layout})),[i,u.layout]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:t?O?.label:m.title}),(0,a.jsx)(Vl,{name:e,variation:t}),V&&(0,a.jsx)("div",{className:"edit-site-global-styles-screen-variations",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Tl,{children:(0,w.__)("Style Variations")}),(0,a.jsx)(yl,{name:e})]})}),C&&(0,a.jsx)(ql,{inheritedValue:r,value:i,onChange:l,settings:y}),_&&(0,a.jsx)(Wl,{inheritedValue:r,value:i,onChange:l,settings:y,defaultValues:Ol}),S&&(0,a.jsx)(Zl,{inheritedValue:r,value:i,onChange:l,settings:y}),E&&(0,a.jsx)(Yl,{inheritedValue:A,value:N,onChange:e=>{const t={...e};delete t.layout,l(t),e.layout!==u.layout&&p({...u,layout:e.layout})},settings:y,includeLayoutControls:!0}),k&&(0,a.jsx)(Ul,{inheritedValue:r,value:i,onChange:e=>{if(!e?.border)return void l(e);const{radius:t,...n}=e.border,s=function(e){return e?(0,b.__experimentalHasSplitBorders)(e)?{top:Al(e.top),right:Al(e.right),bottom:Al(e.bottom),left:Al(e.left)}:Al(e):e}(n),i=(0,b.__experimentalHasSplitBorders)(s)?{color:null,style:null,width:null,...s}:{top:s,right:s,bottom:s,left:s};l({...e,border:{...i,radius:t}})},settings:y}),P&&(0,a.jsx)(Kl,{inheritedValue:A,value:N,onChange:l,settings:y,includeLayoutControls:!0}),I&&(0,a.jsx)(Xl,{onChange:e=>{p(void 0===e?{...d,lightbox:void 0}:{...d,lightbox:{...d.lightbox,...e}})},value:u,inheritedValue:y}),T&&(0,a.jsxs)(b.PanelBody,{title:(0,w.__)("Advanced"),initialOpen:!1,children:[(0,a.jsx)("p",{children:(0,w.sprintf)((0,w.__)("Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value."),m?.title)}),(0,a.jsx)(Ql,{value:i,onChange:l,inheritedValue:r})]})]})};const{useGlobalStyle:$l}=ne(x.privateApis);function ec({parentMenu:e,element:t,label:n}){const s="text"!==t&&t?`elements.${t}.`:"",i="link"===t?{textDecoration:"underline"}:{},[r]=$l(s+"typography.fontFamily"),[o]=$l(s+"typography.fontStyle"),[l]=$l(s+"typography.fontWeight"),[c]=$l(s+"color.background"),[u]=$l("color.background"),[d]=$l(s+"color.gradient"),[h]=$l(s+"color.text");return(0,a.jsx)(Bo,{path:e+"/typography/"+t,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__indicator",style:{fontFamily:r??"serif",background:d??c??u,color:h,fontStyle:o,fontWeight:l,...i},"aria-hidden":"true",children:(0,w.__)("Aa")}),(0,a.jsx)(b.FlexItem,{children:n})]})})}var tc=function(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Elements")}),(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[(0,a.jsx)(ec,{parentMenu:"",element:"text",label:(0,w.__)("Text")}),(0,a.jsx)(ec,{parentMenu:"",element:"link",label:(0,w.__)("Links")}),(0,a.jsx)(ec,{parentMenu:"",element:"heading",label:(0,w.__)("Headings")}),(0,a.jsx)(ec,{parentMenu:"",element:"caption",label:(0,w.__)("Captions")}),(0,a.jsx)(ec,{parentMenu:"",element:"button",label:(0,w.__)("Buttons")})]})]})};var nc=({variation:e,isFocused:t,withHoverView:n})=>(0,a.jsx)(ll,{label:e.title,isFocused:t,withHoverView:n,children:({ratio:t,key:n})=>(0,a.jsx)(b.__experimentalHStack,{spacing:10*t,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(il,{variation:e,fontSize:85*t})},n)});const sc=[],{GlobalStylesContext:ic,areGlobalStyleConfigsEqual:rc}=ne(x.privateApis),{mergeBaseAndUserConfigs:ac}=ne(f.privateApis);function oc(e,t){if(!t?.length)return e;if("object"!=typeof e||!e||!Object.keys(e).length)return e;for(const n in e)t.includes(n)?delete e[n]:"object"==typeof e[n]&&oc(e[n],t);return e}function lc({title:e,settings:t,styles:n}){return e===(0,w.__)("Default")||Object.keys(t).length>0||Object.keys(n).length>0}function cc(e=[]){const{variationsFromTheme:t}=(0,c.useSelect)((e=>({variationsFromTheme:e(j.store).__experimentalGetCurrentThemeGlobalStylesVariations()||sc})),[]),{user:n}=(0,h.useContext)(ic),s=e.toString();return(0,h.useMemo)((()=>{const s=oc(structuredClone(n),e);s.title=(0,w.__)("Default");const i=t.filter((t=>dc(t,e))).map((e=>ac(s,e))),r=[s,...i];return r?.length?r.filter(lc):[]}),[s,n,t])}const uc=(e,t)=>{if(!e||!t?.length)return{};const n={};return Object.keys(e).forEach((s=>{if(t.includes(s))n[s]=e[s];else if("object"==typeof e[s]){const i=uc(e[s],t);Object.keys(i).length&&(n[s]=i)}})),n};function dc(e,t){const n=uc(structuredClone(e),t);return rc(n,e)}const{mergeBaseAndUserConfigs:hc}=ne(f.privateApis),{GlobalStylesContext:pc,areGlobalStyleConfigsEqual:fc}=ne(x.privateApis);function mc({variation:e,children:t,isPill:n,properties:s,showTooltip:i}){const[r,o]=(0,h.useState)(!1),{base:l,user:c,setUserConfig:u}=(0,h.useContext)(pc),d=(0,h.useMemo)((()=>{let t=hc(l,e);return s&&(t=uc(t,s)),{user:e,base:l,merged:t,setUserConfig:()=>{}}}),[e,l,s]),p=()=>u(e),f=(0,h.useMemo)((()=>fc(c,e)),[c,e]);let m=e?.title;e?.description&&(m=(0,w.sprintf)((0,w._x)("%1$s (%2$s)","variation label"),e?.title,e?.description));const g=(0,a.jsx)("div",{className:Ht("edit-site-global-styles-variations_item",{"is-active":f}),role:"button",onClick:p,onKeyDown:e=>{e.keyCode===Xt.ENTER&&(e.preventDefault(),p())},tabIndex:"0","aria-label":m,"aria-current":f,onFocus:()=>o(!0),onBlur:()=>o(!1),children:(0,a.jsx)("div",{className:Ht("edit-site-global-styles-variations_item-preview",{"is-pill":n}),children:t(r)})});return(0,a.jsx)(pc.Provider,{value:d,children:i?(0,a.jsx)(b.Tooltip,{text:e?.title,children:g}):g})}function gc({title:e,gap:t=2}){const n=["typography"],s=cc(n);return s?.length<=1?null:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[e&&(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsx)(b.__experimentalGrid,{columns:3,gap:t,className:"edit-site-global-styles-style-variations-container",children:s.map(((e,t)=>(0,a.jsx)(mc,{variation:e,properties:n,showTooltip:!0,children:()=>(0,a.jsx)(nc,{variation:e})},t)))})]})}var vc=function(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"space-between",children:(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Font Sizes")})}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,a.jsx)(Bo,{path:"/typography/font-sizes",children:(0,a.jsxs)(b.__experimentalHStack,{direction:"row",children:[(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Font size presets")}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})})]})},yc=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,a.jsx)(Zt.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]});const xc="/wp/v2/font-families",bc="/wp/v2/font-collections";async function wc(e){const t={path:xc,method:"POST",body:e},n=await ra()(t);return{id:n.id,...n.font_family_settings,fontFace:[]}}async function _c(e,t){const n={path:`${xc}/${e}/font-faces`,method:"POST",body:t},s=await ra()(n);return{id:s.id,...s.font_face_settings}}async function jc(e){const t={path:`${xc}?slug=${e}&_embed=true`,method:"GET"},n=await ra()(t);if(!n||0===n.length)return null;const s=n[0];return{id:s.id,...s.font_family_settings,fontFace:s?._embedded?.font_faces.map((e=>e.font_face_settings))||[]}}async function Sc(e){const t={path:`${xc}/${e}?force=true`,method:"DELETE"};return await ra()(t)}const Cc=["otf","ttf","woff","woff2"],kc={100:(0,w._x)("Thin","font weight"),200:(0,w._x)("Extra-light","font weight"),300:(0,w._x)("Light","font weight"),400:(0,w._x)("Normal","font weight"),500:(0,w._x)("Medium","font weight"),600:(0,w._x)("Semi-bold","font weight"),700:(0,w._x)("Bold","font weight"),800:(0,w._x)("Extra-bold","font weight"),900:(0,w._x)("Black","font weight")},Ec={normal:(0,w._x)("Normal","font style"),italic:(0,w._x)("Italic","font style")},{File:Pc}=window,{kebabCase:Ic}=ne(b.privateApis);function Vc(e,t={}){return e.name||!e.fontFamily&&!e.slug||(e.name=e.fontFamily||e.slug),{...e,...t}}function Tc(e){return`${kc[e.fontWeight]||e.fontWeight} ${"normal"===e.fontStyle?"":Ec[e.fontStyle]||e.fontStyle}`}function Oc(e=[],t=[]){const n=new Map;for(const t of e)n.set(`${t.fontWeight}${t.fontStyle}`,t);for(const e of t)n.set(`${e.fontWeight}${e.fontStyle}`,e);return Array.from(n.values())}function Ac(e=[],t=[]){const n=new Map;for(const t of e)n.set(t.slug,{...t});for(const e of t)if(n.has(e.slug)){const{fontFace:t,...s}=e,i=Oc(n.get(e.slug).fontFace,t);n.set(e.slug,{...s,fontFace:i})}else n.set(e.slug,{...e});return Array.from(n.values())}async function Nc(e,t,n="all"){let s;if("string"==typeof t)s=`url(${t})`;else{if(!(t instanceof Pc))return;s=await t.arrayBuffer()}const i=new window.FontFace(Xo(e.fontFamily),s,{style:e.fontStyle,weight:e.fontWeight}),r=await i.load();if("document"!==n&&"all"!==n||document.fonts.add(r),"iframe"===n||"all"===n){document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts.add(r)}}function Fc(e,t="all"){const n=t=>{t.forEach((n=>{n.family===Xo(e?.fontFamily)&&n.weight===e?.fontWeight&&n.style===e?.fontStyle&&t.delete(n)}))};if("document"!==t&&"all"!==t||n(document.fonts),"iframe"===t||"all"===t){n(document.querySelector('iframe[name="editor-canvas"]').contentDocument.fonts)}}function Mc(e){if(!e)return;let t;var n;return t=Array.isArray(e)?e[0]:e,t.startsWith("file:.")?void 0:(("string"!=typeof(n=t)||n===decodeURIComponent(n))&&(t=encodeURI(t)),t)}function Bc(e){const t=new FormData,{fontFace:n,category:s,...i}=e,r={...i,slug:Ic(e.slug)};return t.append("font_family_settings",JSON.stringify(r)),t}function Dc(e){if(e?.fontFace){return e.fontFace.map(((e,t)=>{const n={...e},s=new FormData;if(n.file){const e=Array.isArray(n.file)?n.file:[n.file],i=[];e.forEach(((e,n)=>{const r=`file-${t}-${n}`;s.append(r,e,e.name),i.push(r)})),n.src=1===i.length?i[0]:i,delete n.file,s.append("font_face_settings",JSON.stringify(n))}else s.append("font_face_settings",JSON.stringify(n));return s}))}}async function Rc(e,t){const n=[];for(const s of t)try{const t=await _c(e,s);n.push({status:"fulfilled",value:t})}catch(e){n.push({status:"rejected",reason:e})}const s={errors:[],successes:[]};return n.forEach(((e,n)=>{if("fulfilled"===e.status){const i=e.value;i.id?s.successes.push(i):s.errors.push({data:t[n],message:`Error: ${i.message}`})}else s.errors.push({data:t[n],message:e.reason.message})})),s}function Lc(e,t){return-1!==t.findIndex((t=>t.fontWeight===e.fontWeight&&t.fontStyle===e.fontStyle))}function zc(e,t,n){const s=t=>t.slug===e.slug,i=n.find(s);return t?(i=>{const r=e=>e.fontWeight===t.fontWeight&&e.fontStyle===t.fontStyle;if(!i)return[...n,{...e,fontFace:[t]}];let a=i.fontFace||[];return a=a.find(r)?a.filter((e=>!r(e))):[...a,t],0===a.length?n.filter((e=>!s(e))):n.map((e=>s(e)?{...e,fontFace:a}:e))})(i):i?n.filter((e=>!s(e))):[...n,e]}const{useGlobalSetting:Hc}=ne(x.privateApis),Gc=(0,h.createContext)({});Gc.displayName="FontLibraryContext";var Wc=function({children:e}){const{saveEntityRecord:t}=(0,c.useDispatch)(j.store),{globalStylesId:n}=(0,c.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(j.store);return{globalStylesId:t()}})),s=(0,j.useEntityRecord)("root","globalStyles",n),[i,r]=(0,h.useState)(!1),[o,l]=(0,h.useState)(0),u=()=>{l(Date.now())},{records:d=[],isResolving:p}=(0,j.useEntityRecords)("postType","wp_font_family",{refreshKey:o,_embed:!0}),f=(d||[]).map((e=>({id:e.id,...e.font_family_settings,fontFace:e?._embedded?.font_faces.map((e=>e.font_face_settings))||[]})))||[],[m,g]=Hc("typography.fontFamilies"),v=async e=>{const n=s.record;ae(n,["settings","typography","fontFamilies"],e),await t("root","globalStyles",n)},[y,x]=(0,h.useState)(!1),[b,_]=(0,h.useState)(null),S=m?.theme?m.theme.map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],C=m?.custom?m.custom.map((e=>Vc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=f?f.map((e=>Vc(e,{source:"custom"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[];(0,h.useEffect)((()=>{y||_(null)}),[y]);const[E]=(0,h.useState)(new Set),P=e=>e.reduce(((e,t)=>{const n=t?.fontFace&&t.fontFace?.length>0?t?.fontFace.map((e=>`${e.fontStyle+e.fontWeight}`)):["normal400"];return e[t.slug]=n,e}),{}),I=e=>P("theme"===e?S:C),V=(e,t,n,s)=>t||n?!!I(s)[e]?.includes(t+n):!!I(s)[e],T=e=>{const t=(m?.[e.source]??[]).filter((t=>t.slug!==e.slug)),n={...m,[e.source]:t};return g(n),e.fontFace&&e.fontFace.forEach((e=>{Fc(e,"all")})),n},O=e=>{const t=A(e),n={...m,custom:Ac(m?.custom,t)};return g(n),N(t),n},A=e=>e.map((({id:e,fontFace:t,...n})=>({...n,...t&&t.length>0?{fontFace:t.map((({id:e,...t})=>t))}:{}}))),N=e=>{e.forEach((e=>{e.fontFace&&e.fontFace.forEach((e=>{Nc(e,Mc(e.src),"all")}))}))},[F,M]=(0,h.useState)([]),B=async()=>{const e=await async function(){const e={path:`${bc}?_fields=slug,name,description`,method:"GET"};return await ra()(e)}();M(e)};return(0,h.useEffect)((()=>{B()}),[]),(0,a.jsx)(Gc.Provider,{value:{libraryFontSelected:b,handleSetLibraryFontSelected:e=>{if(!e)return void _(null);const t=("theme"===e.source?S:k).find((t=>t.slug===e.slug));_({...t||e,source:e.source})},fontFamilies:m,baseCustomFonts:k,isFontActivated:V,getFontFacesActivated:(e,t)=>I(t)[e]||[],loadFontFaceAsset:async e=>{if(!e.src)return;const t=Mc(e.src);t&&!E.has(t)&&(Nc(e,t,"document"),E.add(t))},installFonts:async function(e){r(!0);try{const t=[];let n=[];for(const s of e){let e=!1,i=await jc(s.slug);i||(e=!0,i=await wc(Bc(s)));const r=i.fontFace&&s.fontFace?i.fontFace.filter((e=>Lc(e,s.fontFace))):[];i.fontFace&&s.fontFace&&(s.fontFace=s.fontFace.filter((e=>!Lc(e,i.fontFace))));let a=[],o=[];if(s?.fontFace?.length>0){const e=await Rc(i.id,Dc(s));a=e?.successes,o=e?.errors}(a?.length>0||r?.length>0)&&(i.fontFace=[...a],t.push(i)),i&&!s?.fontFace?.length&&t.push(i),e&&s?.fontFace?.length>0&&0===a?.length&&await Sc(i.id),n=n.concat(o)}if(n=n.reduce(((e,t)=>e.includes(t.message)?e:[...e,t.message]),[]),t.length>0){const e=O(t);await v(e),u()}if(n.length>0){const e=new Error((0,w.__)("There was an error installing fonts."));throw e.installationErrors=n,e}}finally{r(!1)}},uninstallFontFamily:async function(e){try{const t=await Sc(e.id);if(t.deleted){const t=T(e);await v(t)}return u(),t}catch(e){throw console.error("There was an error uninstalling the font family:",e),e}},toggleActivateFont:(e,t)=>{const n=zc(e,t,m?.[e.source]??[]);g({...m,[e.source]:n});V(e.slug,t?.fontStyle,t?.fontWeight,e.source)?Fc(t,"all"):Nc(t,Mc(t?.src),"all")},getAvailableFontsOutline:P,modalTabOpen:y,setModalTabOpen:x,refreshLibrary:u,saveFontFamilies:v,isResolvingLibrary:p,isInstalling:i,collections:F,getFontCollection:async e=>{try{if(!!F.find((t=>t.slug===e))?.font_families)return;const t=await async function(e){const t={path:`${bc}/${e}`,method:"GET"};return await ra()(t)}(e),n=F.map((n=>n.slug===e?{...n,...t}:n));M(n)}catch(e){throw console.error(e),e}}},children:e})};var Uc=function({font:e,text:t}){const n=(0,h.useRef)(null),s=function(e){return e.fontStyle||e.fontWeight?e:e.fontFace&&e.fontFace.length?e.fontFace.find((e=>"normal"===e.fontStyle&&"400"===e.fontWeight))||e.fontFace[0]:{fontStyle:"normal",fontWeight:"400",fontFamily:e.fontFamily,fake:!0}}(e),i=Qo(e);t=t||e.name;const r=e.preview,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),{loadFontFaceAsset:d}=(0,h.useContext)(Gc),p=r??function(e){return e.preview?e.preview:e.src?Array.isArray(e.src)?e.src[0]:e.src:void 0}(s),f=p&&p.match(/\.(png|jpg|jpeg|gif|svg)$/i);var m;const g={fontSize:"18px",lineHeight:1,opacity:c?"1":"0",...i,...{fontFamily:Ko((m=s).fontFamily),fontStyle:m.fontStyle||"normal",fontWeight:m.fontWeight||"400"}};return(0,h.useEffect)((()=>{const e=new window.IntersectionObserver((([e])=>{l(e.isIntersecting)}),{});return e.observe(n.current),()=>e.disconnect()}),[n]),(0,h.useEffect)((()=>{(async()=>{o&&(!f&&s.src&&await d(s),u(!0))})()}),[s,o,d,f]),(0,a.jsx)("div",{ref:n,children:f?(0,a.jsx)("img",{src:p,loading:"lazy",alt:t,className:"font-library-modal__font-variant_demo-image"}):(0,a.jsx)(b.__experimentalText,{style:g,className:"font-library-modal__font-variant_demo-text",children:t})})};var qc=function({font:e,onClick:t,variantsText:n,navigatorPath:s}){const i=e.fontFace?.length||1,r={cursor:t?"pointer":"default"},o=(0,b.useNavigator)();return(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{t(),s&&o.goTo(s)},style:r,className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"space-between",wrap:!1,children:[(0,a.jsx)(Uc,{font:e}),(0,a.jsxs)(b.Flex,{justify:"flex-end",children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalText,{className:"font-library-modal__font-card__count",children:n||(0,w.sprintf)((0,w._n)("%d variant","%d variants",i),i)})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Icon,{icon:(0,w.isRTL)()?za:La})})]})]})})};var Zc=function({face:e,font:t}){const{isFontActivated:n,toggleActivateFont:s}=(0,h.useContext)(Gc),i=t?.fontFace?.length>0?n(t.slug,e.fontStyle,e.fontWeight,t.source):n(t.slug,null,null,t.source),r=()=>{t?.fontFace?.length>0?s(t,e):s(t)},o=t.name+" "+Tc(e),l=(0,h.useId)();return(0,a.jsx)("div",{className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,a.jsx)(b.CheckboxControl,{checked:i,onChange:r,__nextHasNoMarginBottom:!0,id:l}),(0,a.jsx)("label",{htmlFor:l,children:(0,a.jsx)(Uc,{font:e,text:o,onClick:r})})]})})};function Yc(e){switch(e){case"normal":return 400;case"bold":return 700;case"bolder":return 500;case"lighter":return 300;default:return parseInt(e,10)}}function Kc(e){return e.sort(((e,t)=>"normal"===e.fontStyle&&"normal"!==t.fontStyle?-1:"normal"===t.fontStyle&&"normal"!==e.fontStyle?1:e.fontStyle===t.fontStyle?Yc(e.fontWeight)-Yc(t.fontWeight):e.fontStyle.localeCompare(t.fontStyle)))}const{useGlobalSetting:Xc}=ne(x.privateApis);function Qc({font:e,isOpen:t,setIsOpen:n,setNotice:s,uninstallFontFamily:i,handleSetLibraryFontSelected:r}){const o=(0,b.useNavigator)();return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:(0,w.__)("Delete"),onCancel:()=>{n(!1)},onConfirm:async()=>{s(null),n(!1);try{await i(e),o.goBack(),r(null),s({type:"success",message:(0,w.__)("Font family uninstalled successfully.")})}catch(e){s({type:"error",message:(0,w.__)("There was an error uninstalling the font family.")+e.message})}},size:"medium",children:e&&(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" font and all its variants and assets?'),e.name)})}var Jc=function(){const{baseCustomFonts:e,libraryFontSelected:t,handleSetLibraryFontSelected:n,refreshLibrary:s,uninstallFontFamily:i,isResolvingLibrary:r,isInstalling:o,saveFontFamilies:l,getFontFacesActivated:u}=(0,h.useContext)(Gc),[d,p]=Xc("typography.fontFamilies"),[f,m]=(0,h.useState)(!1),[g,v]=(0,h.useState)(!1),[y]=Xc("typography.fontFamilies",void 0,"base"),x=(0,c.useSelect)((e=>{const{__experimentalGetCurrentGlobalStylesId:t}=e(j.store);return t()})),_=(0,j.useEntityRecord)("root","globalStyles",x),S=!!_?.edits?.settings?.typography?.fontFamilies,C=d?.theme?d.theme.map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name))):[],k=new Set(C.map((e=>e.slug))),E=y?.theme?C.concat(y.theme.filter((e=>!k.has(e.slug))).map((e=>Vc(e,{source:"theme"}))).sort(((e,t)=>e.name.localeCompare(t.name)))):[],P="custom"===t?.source&&t?.id,I=(0,c.useSelect)((e=>{const{canUser:t}=e(j.store);return P&&t("delete",{kind:"postType",name:"wp_font_family",id:P})}),[P]),V=!!t&&"theme"!==t?.source&&I,T=e=>{const t=e?.fontFace?.length>0?e.fontFace.length:1,n=u(e.slug,e.source).length;return(0,w.sprintf)((0,w.__)("%1$s/%2$s variants active"),n,t)};(0,h.useEffect)((()=>{n(t),s()}),[]);const O=t?u(t.slug,t.source).length:0,A=t?.fontFace?.length??(t?.fontFamily?1:0),N=O>0&&O!==A,F=O===A,M=E.length>0||e.length>0;return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[r&&(0,a.jsx)("div",{className:"font-library-modal__loading",children:(0,a.jsx)(b.ProgressBar,{})}),!r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Navigator,{initialPath:t?"/fontFamily":"/",children:[(0,a.jsx)(b.Navigator.Screen,{path:"/",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"8",children:[g&&(0,a.jsx)(b.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),!M&&(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("No fonts installed.")}),E.length>0&&(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,w._x)("Theme","font source")}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:E.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e,navigatorPath:"/fontFamily",variantsText:T(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]}),e.length>0&&(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)("h2",{className:"font-library-modal__fonts-title",children:(0,w._x)("Custom","font source")}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:e.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e,navigatorPath:"/fontFamily",variantsText:T(e),onClick:()=>{v(null),n(e)}})},e.slug)))})]})]})}),(0,a.jsxs)(b.Navigator.Screen,{path:"/fontFamily",children:[(0,a.jsx)(Qc,{font:t,isOpen:f,setIsOpen:m,setNotice:v,uninstallFontFamily:i,handleSetLibraryFontSelected:n}),(0,a.jsxs)(b.Flex,{justify:"flex-start",children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",onClick:()=>{n(null),v(null)},label:(0,w.__)("Back")}),(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:t?.name})]}),g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalSpacer,{margin:1}),(0,a.jsx)(b.Notice,{status:g.type,onRemove:()=>v(null),children:g.message}),(0,a.jsx)(b.__experimentalSpacer,{margin:1})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Choose font variants. Keep in mind that too many variants could make your site slower.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsxs)(b.__experimentalVStack,{spacing:0,children:[(0,a.jsx)(b.CheckboxControl,{className:"font-library-modal__select-all",label:(0,w.__)("Select all"),checked:F,onChange:()=>{const e=d?.[t.source]?.filter((e=>e.slug!==t.slug))??[],n=F?e:[...e,t];p({...d,[t.source]:n}),t.fontFace&&t.fontFace.forEach((e=>{F?Fc(e,"all"):Nc(e,Mc(e?.src),"all")}))},indeterminate:N,__nextHasNoMarginBottom:!0}),(0,a.jsx)(b.__experimentalSpacer,{margin:8}),(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(e=>e?e.fontFace&&e.fontFace.length?Kc(e.fontFace):[{fontFamily:e.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[])(t).map(((e,n)=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(Zc,{font:t,face:e},`face${n}`)},`face${n}`)))})]})]})]}),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-end",className:"font-library-modal__footer",children:[o&&(0,a.jsx)(b.ProgressBar,{}),V&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,isDestructive:!0,variant:"tertiary",onClick:()=>{m(!0)},children:(0,w.__)("Delete")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{v(null);try{await l(d),v({type:"success",message:(0,w.__)("Font family updated successfully.")})}catch(e){v({type:"error",message:(0,w.sprintf)((0,w.__)("There was an error updating the font family. %s"),e.message)})}},disabled:!S,accessibleWhenDisabled:!0,children:(0,w.__)("Update")})]})]})]})},$c=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),eu=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});function tu(e,t,n){return t?!!n[e]?.[`${t.fontStyle}-${t.fontWeight}`]:!!n[e]}var nu=function(){return(0,a.jsx)("div",{className:"font-library__google-fonts-confirm",children:(0,a.jsx)(b.Card,{children:(0,a.jsxs)(b.CardBody,{children:[(0,a.jsx)(b.__experimentalHeading,{level:2,children:(0,w.__)("Connect to Google Fonts")}),(0,a.jsx)(b.__experimentalSpacer,{margin:6}),(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:3}),(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("You can alternatively upload files directly on the Upload tab.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:6}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:()=>{window.localStorage.setItem("wp-font-library-google-fonts-permission","true"),window.dispatchEvent(new Event("storage"))},children:(0,w.__)("Allow access to Google Fonts")})]})})})};var su=function({face:e,font:t,handleToggleVariant:n,selected:s}){const i=()=>{t?.fontFace?n(t,e):n(t)},r=t.name+" "+Tc(e),o=(0,h.useId)();return(0,a.jsx)("div",{className:"font-library-modal__font-card",children:(0,a.jsxs)(b.Flex,{justify:"flex-start",align:"center",gap:"1rem",children:[(0,a.jsx)(b.CheckboxControl,{checked:s,onChange:i,__nextHasNoMarginBottom:!0,id:o}),(0,a.jsx)("label",{htmlFor:o,children:(0,a.jsx)(Uc,{font:e,text:r,onClick:i})})]})})};const iu={slug:"all",name:(0,w._x)("All","font categories")},ru="wp-font-library-google-fonts-permission";var au=function({slug:e}){const t="google-fonts"===e,n=()=>"true"===window.localStorage.getItem(ru),[s,i]=(0,h.useState)(null),[r,o]=(0,h.useState)(!1),[l,c]=(0,h.useState)([]),[u,d]=(0,h.useState)(1),[p,f]=(0,h.useState)({}),[m,g]=(0,h.useState)(t&&!n()),{collections:v,getFontCollection:x,installFonts:_,isInstalling:j}=(0,h.useContext)(Gc),S=v.find((t=>t.slug===e));(0,h.useEffect)((()=>{const e=()=>{g(t&&!n())};return e(),window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[e,t]);const C=()=>{window.localStorage.setItem(ru,"false"),window.dispatchEvent(new Event("storage"))};(0,h.useEffect)((()=>{(async()=>{try{await x(e),B()}catch(e){r||o({type:"error",message:e?.message})}})()}),[e,x,o,r]),(0,h.useEffect)((()=>{i(null)}),[e]),(0,h.useEffect)((()=>{c([])}),[s]);const k=(0,h.useMemo)((()=>S?.font_families??[]),[S]),E=[iu,...S?.categories??[]],P=(0,h.useMemo)((()=>function(e,t){const{category:n,search:s}=t;let i=e||[];return n&&"all"!==n&&(i=i.filter((e=>-1!==e.categories.indexOf(n)))),s&&(i=i.filter((e=>e.font_family_settings.name.toLowerCase().includes(s.toLowerCase())))),i}(k,p)),[k,p]),I=!S?.font_families&&!r,V=Math.max(window.innerHeight,500),T=Math.floor((V-417)/61),O=Math.ceil(P.length/T),A=(u-1)*T,N=u*T,F=P.slice(A,N),M=(0,y.debounce)((e=>{f({...p,search:e}),d(1)}),300),B=()=>{f({}),d(1)},D=(e,t)=>{const n=zc(e,t,l);c(n)},R=function(e){return e.reduce(((e,t)=>({...e,[t.slug]:(t?.fontFace||[]).reduce(((e,t)=>({...e,[`${t.fontStyle}-${t.fontWeight}`]:!0})),{})})),{})}(l),L=l.length>0?l[0]?.fontFace?.length:0,z=L>0&&L!==s?.fontFace?.length,H=L===s?.fontFace?.length;if(m)return(0,a.jsx)(nu,{});const G=()=>"google-fonts"!==e||m||s?null:(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Actions"),popoverProps:{position:"bottom left"},controls:[{title:(0,w.__)("Revoke access to Google Fonts"),onClick:C}]});return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[I&&(0,a.jsx)("div",{className:"font-library-modal__loading",children:(0,a.jsx)(b.ProgressBar,{})}),!I&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Navigator,{initialPath:"/",className:"font-library-modal__tabpanel-layout",children:[(0,a.jsxs)(b.Navigator.Screen,{path:"/",children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsxs)(b.__experimentalVStack,{children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:S.name}),(0,a.jsx)(b.__experimentalText,{children:S.description})]}),(0,a.jsx)(G,{})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsxs)(b.Flex,{children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.SearchControl,{className:"font-library-modal__search",value:p.search,placeholder:(0,w.__)("Font name…"),label:(0,w.__)("Search"),onChange:M,__nextHasNoMarginBottom:!0,hideLabelFromVision:!1})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,w.__)("Category"),value:p.category,onChange:e=>{f({...p,category:e}),d(1)},children:E&&E.map((e=>(0,a.jsx)("option",{value:e.slug,children:e.name},e.slug)))})})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),!!S?.font_families?.length&&!P.length&&(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("No fonts found. Try with a different search term.")}),(0,a.jsx)("div",{className:"font-library-modal__fonts-grid__main",children:(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:F.map((e=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(qc,{font:e.font_family_settings,navigatorPath:"/fontFamily",onClick:()=>{i(e.font_family_settings)}})},e.font_family_settings.slug)))})})]}),(0,a.jsxs)(b.Navigator.Screen,{path:"/fontFamily",children:[(0,a.jsxs)(b.Flex,{justify:"flex-start",children:[(0,a.jsx)(b.Navigator.BackButton,{icon:(0,w.isRTL)()?La:za,size:"small",onClick:()=>{i(null),o(null)},label:(0,w.__)("Back")}),(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,className:"edit-site-global-styles-header",children:s?.name})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalSpacer,{margin:1}),(0,a.jsx)(b.Notice,{status:r.type,onRemove:()=>o(null),children:r.message}),(0,a.jsx)(b.__experimentalSpacer,{margin:1})]}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Select font variants to install.")}),(0,a.jsx)(b.__experimentalSpacer,{margin:4}),(0,a.jsx)(b.CheckboxControl,{className:"font-library-modal__select-all",label:(0,w.__)("Select all"),checked:H,onChange:()=>{c(H?[]:[s])},indeterminate:z,__nextHasNoMarginBottom:!0}),(0,a.jsx)(b.__experimentalVStack,{spacing:0,children:(0,a.jsx)("ul",{role:"list",className:"font-library-modal__fonts-list",children:(W=s,W?W.fontFace&&W.fontFace.length?Kc(W.fontFace):[{fontFamily:W.fontFamily,fontStyle:"normal",fontWeight:"400"}]:[]).map(((e,t)=>(0,a.jsx)("li",{className:"font-library-modal__fonts-list-item",children:(0,a.jsx)(su,{font:s,face:e,handleToggleVariant:D,selected:tu(s.slug,s.fontFace?e:null,R)})},`face${t}`)))})}),(0,a.jsx)(b.__experimentalSpacer,{margin:16})]})]}),s&&(0,a.jsx)(b.Flex,{justify:"flex-end",className:"font-library-modal__footer",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(null);const e=l[0];try{e?.fontFace&&await Promise.all(e.fontFace.map((async e=>{e.src&&(e.file=await async function(e){e=Array.isArray(e)?e:[e];const t=await Promise.all(e.map((async e=>fetch(new Request(e)).then((t=>{if(!t.ok)throw new Error(`Error downloading font face asset from ${e}. Server responded with status: ${t.status}`);return t.blob()})).then((t=>{const n=e.split("/").pop();return new Pc([t],n,{type:t.type})})))));return 1===t.length?t[0]:t}(e.src))})))}catch(e){return void o({type:"error",message:(0,w.__)("Error installing the fonts, could not be downloaded.")})}try{await _([e]),o({type:"success",message:(0,w.__)("Fonts were installed successfully.")})}catch(e){o({type:"error",message:e.message})}c([])},isBusy:j,disabled:0===l.length||j,accessibleWhenDisabled:!0,children:(0,w.__)("Install")})}),!s&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"font-library-modal__footer",justify:"end",spacing:6,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"font-library-modal__page-selection",children:(0,h.createInterpolateElement)((0,w.sprintf)((0,w._x)("<div>Page</div>%1$s<div>of %2$s</div>","paging"),"<CurrentPage />",O),{div:(0,a.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,a.jsx)(b.SelectControl,{"aria-label":(0,w.__)("Current page"),value:u,options:[...Array(O)].map(((e,t)=>({label:t+1,value:t+1}))),onChange:e=>d(parseInt(e)),size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{onClick:()=>d(u-1),disabled:1===u,accessibleWhenDisabled:!0,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?$c:eu,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.jsx)(b.Button,{onClick:()=>d(u+1),disabled:u===O,accessibleWhenDisabled:!0,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?eu:$c,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})]})]});var W},ou=i(8572),lu=i.n(ou),cu=i(4660),uu=i.n(cu);globalThis.fetch;class du{constructor(e,t={},n){this.type=e,this.detail=t,this.msg=n,Object.defineProperty(this,"__mayPropagate",{enumerable:!1,writable:!0}),this.__mayPropagate=!0}preventDefault(){}stopPropagation(){this.__mayPropagate=!1}valueOf(){return this}toString(){return this.msg?`[${this.type} event]: ${this.msg}`:`[${this.type} event]`}}class hu{constructor(){this.listeners={}}addEventListener(e,t,n){let s=this.listeners[e]||[];n?s.unshift(t):s.push(t),this.listeners[e]=s}removeEventListener(e,t){let n=this.listeners[e]||[],s=n.findIndex((e=>e===t));s>-1&&(n.splice(s,1),this.listeners[e]=n)}dispatch(e){let t=this.listeners[e.type];if(t)for(let n=0,s=t.length;n<s&&e.__mayPropagate;n++)t[n](e)}}const pu=new Date("1904-01-01T00:00:00+0000").getTime();class fu{constructor(e,t,n){this.name=(n||e.tag||"").trim(),this.length=e.length,this.start=e.offset,this.offset=0,this.data=t,["getInt8","getUint8","getInt16","getUint16","getInt32","getUint32","getBigInt64","getBigUint64"].forEach((e=>{let t=e.replace(/get(Big)?/,"").toLowerCase(),n=parseInt(e.replace(/[^\d]/g,""))/8;Object.defineProperty(this,t,{get:()=>this.getValue(e,n)})}))}get currentPosition(){return this.start+this.offset}set currentPosition(e){this.start=e,this.offset=0}skip(e=0,t=8){this.offset+=e*t/8}getValue(e,t){let n=this.start+this.offset;this.offset+=t;try{return this.data[e](n)}catch(n){throw console.error("parser",e,t,this),console.error("parser",this.start,this.offset),n}}flags(e){if(8===e||16===e||32===e||64===e)return this[`uint${e}`].toString(2).padStart(e,0).split("").map((e=>"1"===e));console.error("Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long"),console.trace()}get tag(){const e=this.uint32;return t=[e>>24&255,e>>16&255,e>>8&255,255&e],Array.from(t).map((e=>String.fromCharCode(e))).join("");var t}get fixed(){return this.int16+Math.round(1e3*this.uint16/65356)/1e3}get legacyFixed(){let e=this.uint16,t=this.uint16.toString(16).padStart(4,0);return parseFloat(`${e}.${t}`)}get uint24(){return(this.uint8<<16)+(this.uint8<<8)+this.uint8}get uint128(){let e=0;for(let t=0;t<5;t++){let t=this.uint8;if(e=128*e+(127&t),t<128)break}return e}get longdatetime(){return new Date(pu+1e3*parseInt(this.int64.toString()))}get fword(){return this.int16}get ufword(){return this.uint16}get Offset16(){return this.uint16}get Offset32(){return this.uint32}get F2DOT14(){const e=p.uint16;return[0,1,-2,-1][e>>14]+(16383&e)/16384}verifyLength(){this.offset!=this.length&&console.error(`unexpected parsed table size (${this.offset}) for "${this.name}" (expected ${this.length})`)}readBytes(e=0,t=0,n=8,s=!1){if(0===(e=e||this.length))return[];t&&(this.currentPosition=t);const i=`${s?"":"u"}int${n}`,r=[];for(;e--;)r.push(this[i]);return r}}class mu{constructor(e){const t={enumerable:!1,get:()=>e};Object.defineProperty(this,"parser",t);const n=e.currentPosition,s={enumerable:!1,get:()=>n};Object.defineProperty(this,"start",s)}load(e){Object.keys(e).forEach((t=>{let n=Object.getOwnPropertyDescriptor(e,t);n.get?this[t]=n.get.bind(this):void 0!==n.value&&(this[t]=n.value)})),this.parser.length&&this.parser.verifyLength()}}class gu extends mu{constructor(e,t,n){const{parser:s,start:i}=super(new fu(e,t,n)),r={enumerable:!1,get:()=>s};Object.defineProperty(this,"p",r);const a={enumerable:!1,get:()=>i};Object.defineProperty(this,"tableStart",a)}}function vu(e,t,n){let s;Object.defineProperty(e,t,{get:()=>s||(s=n(),s),enumerable:!0})}class yu extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:12},t,"sfnt");this.version=s.uint32,this.numTables=s.uint16,this.searchRange=s.uint16,this.entrySelector=s.uint16,this.rangeShift=s.uint16,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new xu(s))),this.tables={},this.directory.forEach((e=>{vu(this.tables,e.tag.trim(),(()=>n(this.tables,{tag:e.tag,offset:e.offset,length:e.length},t)))}))}}class xu{constructor(e){this.tag=e.tag,this.checksum=e.uint32,this.offset=e.uint32,this.length=e.uint32}}const bu=uu().inflate||void 0;let wu;class _u extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:44},t,"woff");this.signature=s.tag,this.flavor=s.uint32,this.length=s.uint32,this.numTables=s.uint16,s.uint16,this.totalSfntSize=s.uint32,this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.metaOffset=s.uint32,this.metaLength=s.uint32,this.metaOrigLength=s.uint32,this.privOffset=s.uint32,this.privLength=s.uint32,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new ju(s))),Su(this,t,n)}}class ju{constructor(e){this.tag=e.tag,this.offset=e.uint32,this.compLength=e.uint32,this.origLength=e.uint32,this.origChecksum=e.uint32}}function Su(e,t,n){e.tables={},e.directory.forEach((s=>{vu(e.tables,s.tag.trim(),(()=>{let i=0,r=t;if(s.compLength!==s.origLength){const e=t.buffer.slice(s.offset,s.offset+s.compLength);let n;if(bu)n=bu(new Uint8Array(e));else{if(!wu){const e="no brotli decoder available to decode WOFF2 font";throw font.onerror&&font.onerror(e),new Error(e)}n=wu(new Uint8Array(e))}r=new DataView(n.buffer)}else i=s.offset;return n(e.tables,{tag:s.tag,offset:i,length:s.origLength},r)}))}))}const Cu=lu();let ku;class Eu extends gu{constructor(e,t,n){const{p:s}=super({offset:0,length:48},t,"woff2");this.signature=s.tag,this.flavor=s.uint32,this.length=s.uint32,this.numTables=s.uint16,s.uint16,this.totalSfntSize=s.uint32,this.totalCompressedSize=s.uint32,this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.metaOffset=s.uint32,this.metaLength=s.uint32,this.metaOrigLength=s.uint32,this.privOffset=s.uint32,this.privLength=s.uint32,s.verifyLength(),this.directory=[...new Array(this.numTables)].map((e=>new Pu(s)));let i,r=s.currentPosition;this.directory[0].offset=0,this.directory.forEach(((e,t)=>{let n=this.directory[t+1];n&&(n.offset=e.offset+(void 0!==e.transformLength?e.transformLength:e.origLength))}));let a=t.buffer.slice(r);if(Cu)i=Cu(new Uint8Array(a));else{if(!ku){const t="no brotli decoder available to decode WOFF2 font";throw e.onerror&&e.onerror(t),new Error(t)}i=new Uint8Array(ku(a))}!function(e,t,n){e.tables={},e.directory.forEach((s=>{vu(e.tables,s.tag.trim(),(()=>{const i=s.offset,r=i+(s.transformLength?s.transformLength:s.origLength),a=new DataView(t.slice(i,r).buffer);try{return n(e.tables,{tag:s.tag,offset:0,length:s.origLength},a)}catch(e){console.error(e)}}))}))}(this,i,n)}}class Pu{constructor(e){this.flags=e.uint8;const t=this.tagNumber=63&this.flags;this.tag=63===t?e.tag:["cmap","head","hhea","hmtx","maxp","name","OS/2","post","cvt ","fpgm","glyf","loca","prep","CFF ","VORG","EBDT","EBLC","gasp","hdmx","kern","LTSH","PCLT","VDMX","vhea","vmtx","BASE","GDEF","GPOS","GSUB","EBSC","JSTF","MATH","CBDT","CBLC","COLR","CPAL","SVG ","sbix","acnt","avar","bdat","bloc","bsln","cvar","fdsc","feat","fmtx","fvar","gvar","hsty","just","lcar","mort","morx","opbd","prop","trak","Zapf","Silf","Glat","Gloc","Feat","Sill"][63&t];let n=0!==(this.transformVersion=(192&this.flags)>>6);"glyf"!==this.tag&&"loca"!==this.tag||(n=3!==this.transformVersion),this.origLength=e.uint128,n&&(this.transformLength=e.uint128)}}const Iu={};let Vu=!1;function Tu(e,t,n){let s=t.tag.replace(/[^\w\d]/g,""),i=Iu[s];return i?new i(t,n,e):(console.warn(`lib-font has no definition for ${s}. The table was skipped.`),{})}function Ou(){let e=0;function t(n,s){if(!Vu)return e>10?s(new Error("loading took too long")):(e++,setTimeout((()=>t(n)),250));n(Tu)}return new Promise(((e,n)=>t(e)))}async function Au(e,t,n={}){if(!globalThis.document)return;let s=function(e,t){let n=e.lastIndexOf("."),s=(e.substring(n+1)||"").toLowerCase(),i={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"}[s];if(i)return i;let r={eot:"The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.",svg:"The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.",fon:"The .fon format is not supported: this is an ancient Windows bitmap font format.",ttc:"Based on the current CSS specification, font collections are not (yet?) supported."}[s];if(r||(r=`${e} is not a known webfont format.`),t)throw new Error(r);console.warn(`Could not load font: ${r}`)}(t,n.errorOnStyle);if(!s)return;let i=document.createElement("style");i.className="injected-by-Font-js";let r=[];return n.styleRules&&(r=Object.entries(n.styleRules).map((([e,t])=>`${e}: ${t};`))),i.textContent=`\n@font-face {\n font-family: "${e}";\n ${r.join("\n\t")}\n src: url("${t}") format("${s}");\n}`,globalThis.document.head.appendChild(i),i}Promise.all([Promise.resolve().then((function(){return nd})),Promise.resolve().then((function(){return sd})),Promise.resolve().then((function(){return id})),Promise.resolve().then((function(){return ad})),Promise.resolve().then((function(){return od})),Promise.resolve().then((function(){return ud})),Promise.resolve().then((function(){return dd})),Promise.resolve().then((function(){return pd})),Promise.resolve().then((function(){return Sd})),Promise.resolve().then((function(){return Md})),Promise.resolve().then((function(){return Ah})),Promise.resolve().then((function(){return Nh})),Promise.resolve().then((function(){return Bh})),Promise.resolve().then((function(){return Lh})),Promise.resolve().then((function(){return zh})),Promise.resolve().then((function(){return Hh})),Promise.resolve().then((function(){return Wh})),Promise.resolve().then((function(){return Uh})),Promise.resolve().then((function(){return qh})),Promise.resolve().then((function(){return Zh})),Promise.resolve().then((function(){return Yh})),Promise.resolve().then((function(){return Kh})),Promise.resolve().then((function(){return Qh})),Promise.resolve().then((function(){return np})),Promise.resolve().then((function(){return ip})),Promise.resolve().then((function(){return rp})),Promise.resolve().then((function(){return ap})),Promise.resolve().then((function(){return op})),Promise.resolve().then((function(){return lp})),Promise.resolve().then((function(){return dp})),Promise.resolve().then((function(){return gp})),Promise.resolve().then((function(){return xp})),Promise.resolve().then((function(){return wp})),Promise.resolve().then((function(){return Sp})),Promise.resolve().then((function(){return Cp})),Promise.resolve().then((function(){return kp})),Promise.resolve().then((function(){return Pp})),Promise.resolve().then((function(){return Ip})),Promise.resolve().then((function(){return Ap})),Promise.resolve().then((function(){return Np})),Promise.resolve().then((function(){return Mp}))]).then((e=>{e.forEach((e=>{let t=Object.keys(e)[0];Iu[t]=e[t]})),Vu=!0}));const Nu=[0,1,0,0],Fu=[79,84,84,79],Mu=[119,79,70,70],Bu=[119,79,70,50];function Du(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}class Ru extends hu{constructor(e,t={}){super(),this.name=e,this.options=t,this.metrics=!1}get src(){return this.__src}set src(e){this.__src=e,(async()=>{globalThis.document&&!this.options.skipStyleSheet&&await Au(this.name,e,this.options),this.loadFont(e)})()}async loadFont(e,t){fetch(e).then((e=>function(e){if(!e.ok)throw new Error(`HTTP ${e.status} - ${e.statusText}`);return e}(e)&&e.arrayBuffer())).then((n=>this.fromDataBuffer(n,t||e))).catch((n=>{const s=new du("error",n,`Failed to load font at ${t||e}`);this.dispatch(s),this.onerror&&this.onerror(s)}))}async fromDataBuffer(e,t){this.fontData=new DataView(e);let n=function(e){const t=[e.getUint8(0),e.getUint8(1),e.getUint8(2),e.getUint8(3)];return Du(t,Nu)||Du(t,Fu)?"SFNT":Du(t,Mu)?"WOFF":Du(t,Bu)?"WOFF2":void 0}(this.fontData);if(!n)throw new Error(`${t} is either an unsupported font format, or not a font at all.`);await this.parseBasicData(n);const s=new du("load",{font:this});this.dispatch(s),this.onload&&this.onload(s)}async parseBasicData(e){return Ou().then((t=>("SFNT"===e&&(this.opentype=new yu(this,this.fontData,t)),"WOFF"===e&&(this.opentype=new _u(this,this.fontData,t)),"WOFF2"===e&&(this.opentype=new Eu(this,this.fontData,t)),this.opentype)))}getGlyphId(e){return this.opentype.tables.cmap.getGlyphId(e)}reverse(e){return this.opentype.tables.cmap.reverse(e)}supports(e){return 0!==this.getGlyphId(e)}supportsVariation(e){return!1!==this.opentype.tables.cmap.supportsVariation(e)}measureText(e,t=16){if(this.__unloaded)throw new Error("Cannot measure text: font was unloaded. Please reload before calling measureText()");let n=document.createElement("div");n.textContent=e,n.style.fontFamily=this.name,n.style.fontSize=`${t}px`,n.style.color="transparent",n.style.background="transparent",n.style.top="0",n.style.left="0",n.style.position="absolute",document.body.appendChild(n);let s=n.getBoundingClientRect();document.body.removeChild(n);const i=this.opentype.tables["OS/2"];return s.fontSize=t,s.ascender=i.sTypoAscender,s.descender=i.sTypoDescender,s}unload(){if(this.styleElement.parentNode){this.styleElement.parentNode.removeElement(this.styleElement);const e=new du("unload",{font:this});this.dispatch(e),this.onunload&&this.onunload(e)}this._unloaded=!0}load(){if(this.__unloaded){delete this.__unloaded,document.head.appendChild(this.styleElement);const e=new du("load",{font:this});this.dispatch(e),this.onload&&this.onload(e)}}}globalThis.Font=Ru;class Lu extends mu{constructor(e,t,n){super(e),this.plaformID=t,this.encodingID=n}}class zu extends Lu{constructor(e,t,n){super(e,t,n),this.format=0,this.length=e.uint16,this.language=e.uint16,this.glyphIdArray=[...new Array(256)].map((t=>e.uint8))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.")),0<=e&&e<=255}reverse(e){return console.warn("reverse not implemented for cmap subtable format 0"),{}}getSupportedCharCodes(){return[{start:1,end:256}]}}class Hu extends Lu{constructor(e,t,n){super(e,t,n),this.format=2,this.length=e.uint16,this.language=e.uint16,this.subHeaderKeys=[...new Array(256)].map((t=>e.uint16));const s=Math.max(...this.subHeaderKeys),i=e.currentPosition;vu(this,"subHeaders",(()=>(e.currentPosition=i,[...new Array(s)].map((t=>new Gu(e))))));const r=i+8*s;vu(this,"glyphIndexArray",(()=>(e.currentPosition=r,[...new Array(s)].map((t=>e.uint16)))))}supports(e){e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented."));const t=e&&255,n=e&&65280,s=this.subHeaders[n],i=this.subHeaders[s],r=i.firstCode,a=r+i.entryCount;return r<=t&&t<=a}reverse(e){return console.warn("reverse not implemented for cmap subtable format 2"),{}}getSupportedCharCodes(e=!1){return e?this.subHeaders.map((e=>({firstCode:e.firstCode,lastCode:e.lastCode}))):this.subHeaders.map((e=>({start:e.firstCode,end:e.lastCode})))}}class Gu{constructor(e){this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.first+this.entryCount,this.idDelta=e.int16,this.idRangeOffset=e.uint16}}class Wu extends Lu{constructor(e,t,n){super(e,t,n),this.format=4,this.length=e.uint16,this.language=e.uint16,this.segCountX2=e.uint16,this.segCount=this.segCountX2/2,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16;const s=e.currentPosition;vu(this,"endCode",(()=>e.readBytes(this.segCount,s,16)));const i=s+2+this.segCountX2;vu(this,"startCode",(()=>e.readBytes(this.segCount,i,16)));const r=i+this.segCountX2;vu(this,"idDelta",(()=>e.readBytes(this.segCount,r,16,!0)));const a=r+this.segCountX2;vu(this,"idRangeOffset",(()=>e.readBytes(this.segCount,a,16)));const o=a+this.segCountX2,l=this.length-(o-this.tableStart);vu(this,"glyphIdArray",(()=>e.readBytes(l,o,16))),vu(this,"segments",(()=>this.buildSegments(a,o,e)))}buildSegments(e,t,n){return[...new Array(this.segCount)].map(((t,s)=>{let i=this.startCode[s],r=this.endCode[s],a=this.idDelta[s],o=this.idRangeOffset[s],l=e+2*s,c=[];if(0===o)for(let e=i+a,t=r+a;e<=t;e++)c.push(e);else for(let e=0,t=r-i;e<=t;e++)n.currentPosition=l+o+2*e,c.push(n.uint16);return{startCode:i,endCode:r,idDelta:a,idRangeOffset:o,glyphIDs:c}}))}reverse(e){let t=this.segments.find((t=>t.glyphIDs.includes(e)));if(!t)return{};const n=t.startCode+t.glyphIDs.indexOf(e);return{code:n,unicode:String.fromCodePoint(n)}}getGlyphId(e){if(e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343)return 0;if(!(65534&~e&&65535&~e))return 0;let t=this.segments.find((t=>t.startCode<=e&&e<=t.endCode));return t?t.glyphIDs[e-t.startCode]:0}supports(e){return 0!==this.getGlyphId(e)}getSupportedCharCodes(e=!1){return e?this.segments:this.segments.map((e=>({start:e.startCode,end:e.endCode})))}}class Uu extends Lu{constructor(e,t,n){super(e,t,n),this.format=6,this.length=e.uint16,this.language=e.uint16,this.firstCode=e.uint16,this.entryCount=e.uint16,this.lastCode=this.firstCode+this.entryCount-1;vu(this,"glyphIdArray",(()=>[...new Array(this.entryCount)].map((t=>e.uint16))))}supports(e){if(e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.")),e<this.firstCode)return{};if(e>this.firstCode+this.entryCount)return{};const t=e-this.firstCode;return{code:t,unicode:String.fromCodePoint(t)}}reverse(e){let t=this.glyphIdArray.indexOf(e);if(t>-1)return this.firstCode+t}getSupportedCharCodes(e=!1){return e?[{firstCode:this.firstCode,lastCode:this.lastCode}]:[{start:this.firstCode,end:this.lastCode}]}}class qu extends Lu{constructor(e,t,n){super(e,t,n),this.format=8,e.uint16,this.length=e.uint32,this.language=e.uint32,this.is32=[...new Array(8192)].map((t=>e.uint8)),this.numGroups=e.uint32;vu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Zu(e)))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.")),-1!==this.groups.findIndex((t=>t.startcharCode<=e&&e<=t.endcharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 8"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startcharCode,end:e.endcharCode})))}}class Zu{constructor(e){this.startcharCode=e.uint32,this.endcharCode=e.uint32,this.startGlyphID=e.uint32}}class Yu extends Lu{constructor(e,t,n){super(e,t,n),this.format=10,e.uint16,this.length=e.uint32,this.language=e.uint32,this.startCharCode=e.uint32,this.numChars=e.uint32,this.endCharCode=this.startCharCode+this.numChars;vu(this,"glyphs",(()=>[...new Array(this.numChars)].map((t=>e.uint16))))}supports(e){return e.charCodeAt&&(e=-1,console.warn("supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.")),!(e<this.startCharCode)&&(!(e>this.startCharCode+this.numChars)&&e-this.startCharCode)}reverse(e){return console.warn("reverse not implemented for cmap subtable format 10"),{}}getSupportedCharCodes(e=!1){return e?[{startCharCode:this.startCharCode,endCharCode:this.endCharCode}]:[{start:this.startCharCode,end:this.endCharCode}]}}class Ku extends Lu{constructor(e,t,n){super(e,t,n),this.format=12,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;vu(this,"groups",(()=>[...new Array(this.numGroups)].map((t=>new Xu(e)))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),55296<=e&&e<=57343?0:65534&~e&&65535&~e?-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode)):0}reverse(e){for(let t of this.groups){let n=t.startGlyphID;if(n>e)continue;if(n===e)return t.startCharCode;if(n+(t.endCharCode-t.startCharCode)<e)continue;const s=t.startCharCode+(e-n);return{code:s,unicode:String.fromCodePoint(s)}}return{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Xu{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.startGlyphID=e.uint32}}class Qu extends Lu{constructor(e,t,n){super(e,t,n),this.format=13,e.uint16,this.length=e.uint32,this.language=e.uint32,this.numGroups=e.uint32;vu(this,"groups",[...new Array(this.numGroups)].map((t=>new Ju(e))))}supports(e){return e.charCodeAt&&(e=e.charCodeAt(0)),-1!==this.groups.findIndex((t=>t.startCharCode<=e&&e<=t.endCharCode))}reverse(e){return console.warn("reverse not implemented for cmap subtable format 13"),{}}getSupportedCharCodes(e=!1){return e?this.groups:this.groups.map((e=>({start:e.startCharCode,end:e.endCharCode})))}}class Ju{constructor(e){this.startCharCode=e.uint32,this.endCharCode=e.uint32,this.glyphID=e.uint32}}class $u extends Lu{constructor(e,t,n){super(e,t,n),this.subTableStart=e.currentPosition,this.format=14,this.length=e.uint32,this.numVarSelectorRecords=e.uint32,vu(this,"varSelectors",(()=>[...new Array(this.numVarSelectorRecords)].map((t=>new ed(e)))))}supports(){return console.warn("supports not implemented for cmap subtable format 14"),0}getSupportedCharCodes(){return console.warn("getSupportedCharCodes not implemented for cmap subtable format 14"),[]}reverse(e){return console.warn("reverse not implemented for cmap subtable format 14"),{}}supportsVariation(e){let t=this.varSelector.find((t=>t.varSelector===e));return t||!1}getSupportedVariations(){return this.varSelectors.map((e=>e.varSelector))}}class ed{constructor(e){this.varSelector=e.uint24,this.defaultUVSOffset=e.Offset32,this.nonDefaultUVSOffset=e.Offset32}}class td{constructor(e,t){const n=this.platformID=e.uint16,s=this.encodingID=e.uint16,i=this.offset=e.Offset32;vu(this,"table",(()=>(e.currentPosition=t+i,function(e,t,n){const s=e.uint16;return 0===s?new zu(e,t,n):2===s?new Hu(e,t,n):4===s?new Wu(e,t,n):6===s?new Uu(e,t,n):8===s?new qu(e,t,n):10===s?new Yu(e,t,n):12===s?new Ku(e,t,n):13===s?new Qu(e,t,n):14===s?new $u(e,t,n):{}}(e,n,s))))}}var nd=Object.freeze({__proto__:null,cmap:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numTables=n.uint16,this.encodingRecords=[...new Array(this.numTables)].map((e=>new td(n,this.tableStart)))}getSubTable(e){return this.encodingRecords[e].table}getSupportedEncodings(){return this.encodingRecords.map((e=>({platformID:e.platformID,encodingId:e.encodingID})))}getSupportedCharCodes(e,t){const n=this.encodingRecords.findIndex((n=>n.platformID===e&&n.encodingID===t));if(-1===n)return!1;return this.getSubTable(n).getSupportedCharCodes()}reverse(e){for(let t=0;t<this.numTables;t++){let n=this.getSubTable(t).reverse(e);if(n)return n}}getGlyphId(e){let t=0;return this.encodingRecords.some(((n,s)=>{let i=this.getSubTable(s);return!!i.getGlyphId&&(t=i.getGlyphId(e),0!==t)})),t}supports(e){return this.encodingRecords.some(((t,n)=>{const s=this.getSubTable(n);return s.supports&&!1!==s.supports(e)}))}supportsVariation(e){return this.encodingRecords.some(((t,n)=>{const s=this.getSubTable(n);return s.supportsVariation&&!1!==s.supportsVariation(e)}))}}});var sd=Object.freeze({__proto__:null,head:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.load({majorVersion:n.uint16,minorVersion:n.uint16,fontRevision:n.fixed,checkSumAdjustment:n.uint32,magicNumber:n.uint32,flags:n.flags(16),unitsPerEm:n.uint16,created:n.longdatetime,modified:n.longdatetime,xMin:n.int16,yMin:n.int16,xMax:n.int16,yMax:n.int16,macStyle:n.flags(16),lowestRecPPEM:n.uint16,fontDirectionHint:n.uint16,indexToLocFormat:n.uint16,glyphDataFormat:n.uint16})}}});var id=Object.freeze({__proto__:null,hhea:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.ascender=n.fword,this.descender=n.fword,this.lineGap=n.fword,this.advanceWidthMax=n.ufword,this.minLeftSideBearing=n.fword,this.minRightSideBearing=n.fword,this.xMaxExtent=n.fword,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,n.int16,n.int16,n.int16,n.int16,this.metricDataFormat=n.int16,this.numberOfHMetrics=n.uint16,n.verifyLength()}}});class rd{constructor(e,t){this.advanceWidth=e,this.lsb=t}}var ad=Object.freeze({__proto__:null,hmtx:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.hhea.numberOfHMetrics,r=n.maxp.numGlyphs,a=s.currentPosition;if(vu(this,"hMetrics",(()=>(s.currentPosition=a,[...new Array(i)].map((e=>new rd(s.uint16,s.int16)))))),i<r){const e=a+4*i;vu(this,"leftSideBearings",(()=>(s.currentPosition=e,[...new Array(r-i)].map((e=>s.int16)))))}}}});var od=Object.freeze({__proto__:null,maxp:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.legacyFixed,this.numGlyphs=n.uint16,1===this.version&&(this.maxPoints=n.uint16,this.maxContours=n.uint16,this.maxCompositePoints=n.uint16,this.maxCompositeContours=n.uint16,this.maxZones=n.uint16,this.maxTwilightPoints=n.uint16,this.maxStorage=n.uint16,this.maxFunctionDefs=n.uint16,this.maxInstructionDefs=n.uint16,this.maxStackElements=n.uint16,this.maxSizeOfInstructions=n.uint16,this.maxComponentElements=n.uint16,this.maxComponentDepth=n.uint16),n.verifyLength()}}});class ld{constructor(e,t){this.length=e,this.offset=t}}class cd{constructor(e,t){this.platformID=e.uint16,this.encodingID=e.uint16,this.languageID=e.uint16,this.nameID=e.uint16,this.length=e.uint16,this.offset=e.Offset16,vu(this,"string",(()=>(e.currentPosition=t.stringStart+this.offset,function(e,t){const{platformID:n,length:s}=t;if(0===s)return"";if(0===n||3===n){const t=[];for(let n=0,i=s/2;n<i;n++)t[n]=String.fromCharCode(e.uint16);return t.join("")}const i=e.readBytes(s),r=[];return i.forEach((function(e,t){r[t]=String.fromCharCode(e)})),r.join("")}(e,this))))}}var ud=Object.freeze({__proto__:null,name:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.format=n.uint16,this.count=n.uint16,this.stringOffset=n.Offset16,this.nameRecords=[...new Array(this.count)].map((e=>new cd(n,this))),1===this.format&&(this.langTagCount=n.uint16,this.langTagRecords=[...new Array(this.langTagCount)].map((e=>new ld(n.uint16,n.Offset16)))),this.stringStart=this.tableStart+this.stringOffset}get(e){let t=this.nameRecords.find((t=>t.nameID===e));if(t)return t.string}}});var dd=Object.freeze({__proto__:null,OS2:class extends gu{constructor(e,t){const{p:n}=super(e,t);return this.version=n.uint16,this.xAvgCharWidth=n.int16,this.usWeightClass=n.uint16,this.usWidthClass=n.uint16,this.fsType=n.uint16,this.ySubscriptXSize=n.int16,this.ySubscriptYSize=n.int16,this.ySubscriptXOffset=n.int16,this.ySubscriptYOffset=n.int16,this.ySuperscriptXSize=n.int16,this.ySuperscriptYSize=n.int16,this.ySuperscriptXOffset=n.int16,this.ySuperscriptYOffset=n.int16,this.yStrikeoutSize=n.int16,this.yStrikeoutPosition=n.int16,this.sFamilyClass=n.int16,this.panose=[...new Array(10)].map((e=>n.uint8)),this.ulUnicodeRange1=n.flags(32),this.ulUnicodeRange2=n.flags(32),this.ulUnicodeRange3=n.flags(32),this.ulUnicodeRange4=n.flags(32),this.achVendID=n.tag,this.fsSelection=n.uint16,this.usFirstCharIndex=n.uint16,this.usLastCharIndex=n.uint16,this.sTypoAscender=n.int16,this.sTypoDescender=n.int16,this.sTypoLineGap=n.int16,this.usWinAscent=n.uint16,this.usWinDescent=n.uint16,0===this.version?n.verifyLength():(this.ulCodePageRange1=n.flags(32),this.ulCodePageRange2=n.flags(32),1===this.version?n.verifyLength():(this.sxHeight=n.int16,this.sCapHeight=n.int16,this.usDefaultChar=n.uint16,this.usBreakChar=n.uint16,this.usMaxContext=n.uint16,this.version<=4?n.verifyLength():(this.usLowerOpticalPointSize=n.uint16,this.usUpperOpticalPointSize=n.uint16,5===this.version?n.verifyLength():void 0)))}}});const hd=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];var pd=Object.freeze({__proto__:null,post:class extends gu{constructor(e,t){const{p:n}=super(e,t);if(this.version=n.legacyFixed,this.italicAngle=n.fixed,this.underlinePosition=n.fword,this.underlineThickness=n.fword,this.isFixedPitch=n.uint32,this.minMemType42=n.uint32,this.maxMemType42=n.uint32,this.minMemType1=n.uint32,this.maxMemType1=n.uint32,1===this.version||3===this.version)return n.verifyLength();if(this.numGlyphs=n.uint16,2===this.version){this.glyphNameIndex=[...new Array(this.numGlyphs)].map((e=>n.uint16)),this.namesOffset=n.currentPosition,this.glyphNameOffsets=[1];for(let e=0;e<this.numGlyphs;e++){if(this.glyphNameIndex[e]<hd.length){this.glyphNameOffsets.push(this.glyphNameOffsets[e]);continue}let t=n.int8;n.skip(t),this.glyphNameOffsets.push(this.glyphNameOffsets[e]+t+1)}}2.5===this.version&&(this.offset=[...new Array(this.numGlyphs)].map((e=>n.int8)))}getGlyphName(e){if(2!==this.version)return console.warn(`post table version ${this.version} does not support glyph name lookups`),"";let t=this.glyphNameIndex[e];if(t<258)return hd[t];let n=this.glyphNameOffsets[e],s=this.glyphNameOffsets[e+1]-n-1;if(0===s)return".notdef.";this.parser.currentPosition=this.namesOffset+n;return this.parser.readBytes(s,this.namesOffset+n,8,!0).map((e=>String.fromCharCode(e))).join("")}}});class fd extends gu{constructor(e,t){const{p:n}=super(e,t,"AxisTable");this.baseTagListOffset=n.Offset16,this.baseScriptListOffset=n.Offset16,vu(this,"baseTagList",(()=>new md({offset:e.offset+this.baseTagListOffset},t))),vu(this,"baseScriptList",(()=>new gd({offset:e.offset+this.baseScriptListOffset},t)))}}class md extends gu{constructor(e,t){const{p:n}=super(e,t,"BaseTagListTable");this.baseTagCount=n.uint16,this.baselineTags=[...new Array(this.baseTagCount)].map((e=>n.tag))}}class gd extends gu{constructor(e,t){const{p:n}=super(e,t,"BaseScriptListTable");this.baseScriptCount=n.uint16;const s=n.currentPosition;vu(this,"baseScriptRecords",(()=>(n.currentPosition=s,[...new Array(this.baseScriptCount)].map((e=>new vd(this.start,n))))))}}class vd{constructor(e,t){this.baseScriptTag=t.tag,this.baseScriptOffset=t.Offset16,vu(this,"baseScriptTable",(()=>(t.currentPosition=e+this.baseScriptOffset,new yd(t))))}}class yd{constructor(e){this.start=e.currentPosition,this.baseValuesOffset=e.Offset16,this.defaultMinMaxOffset=e.Offset16,this.baseLangSysCount=e.uint16,this.baseLangSysRecords=[...new Array(this.baseLangSysCount)].map((t=>new xd(this.start,e))),vu(this,"baseValues",(()=>(e.currentPosition=this.start+this.baseValuesOffset,new bd(e)))),vu(this,"defaultMinMax",(()=>(e.currentPosition=this.start+this.defaultMinMaxOffset,new wd(e))))}}class xd{constructor(e,t){this.baseLangSysTag=t.tag,this.minMaxOffset=t.Offset16,vu(this,"minMax",(()=>(t.currentPosition=e+this.minMaxOffset,new wd(t))))}}class bd{constructor(e){this.parser=e,this.start=e.currentPosition,this.defaultBaselineIndex=e.uint16,this.baseCoordCount=e.uint16,this.baseCoords=[...new Array(this.baseCoordCount)].map((t=>e.Offset16))}getTable(e){return this.parser.currentPosition=this.start+this.baseCoords[e],new jd(this.parser)}}class wd{constructor(e){this.minCoord=e.Offset16,this.maxCoord=e.Offset16,this.featMinMaxCount=e.uint16;const t=e.currentPosition;vu(this,"featMinMaxRecords",(()=>(e.currentPosition=t,[...new Array(this.featMinMaxCount)].map((t=>new _d(e))))))}}class _d{constructor(e){this.featureTableTag=e.tag,this.minCoord=e.Offset16,this.maxCoord=e.Offset16}}class jd{constructor(e){this.baseCoordFormat=e.uint16,this.coordinate=e.int16,2===this.baseCoordFormat&&(this.referenceGlyph=e.uint16,this.baseCoordPoint=e.uint16),3===this.baseCoordFormat&&(this.deviceTable=e.Offset16)}}var Sd=Object.freeze({__proto__:null,BASE:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.horizAxisOffset=n.Offset16,this.vertAxisOffset=n.Offset16,vu(this,"horizAxis",(()=>new fd({offset:e.offset+this.horizAxisOffset},t))),vu(this,"vertAxis",(()=>new fd({offset:e.offset+this.vertAxisOffset},t))),1===this.majorVersion&&1===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,vu(this,"itemVarStore",(()=>new fd({offset:e.offset+this.itemVarStoreOffset},t))))}}});class Cd{constructor(e){this.classFormat=e.uint16,1===this.classFormat&&(this.startGlyphID=e.uint16,this.glyphCount=e.uint16,this.classValueArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.classFormat&&(this.classRangeCount=e.uint16,this.classRangeRecords=[...new Array(this.classRangeCount)].map((t=>new kd(e))))}}class kd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.class=e.uint16}}class Ed extends mu{constructor(e){super(e),this.coverageFormat=e.uint16,1===this.coverageFormat&&(this.glyphCount=e.uint16,this.glyphArray=[...new Array(this.glyphCount)].map((t=>e.uint16))),2===this.coverageFormat&&(this.rangeCount=e.uint16,this.rangeRecords=[...new Array(this.rangeCount)].map((t=>new Pd(e))))}}class Pd{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.startCoverageIndex=e.uint16}}class Id{constructor(e,t){this.table=e,this.parser=t,this.start=t.currentPosition,this.format=t.uint16,this.variationRegionListOffset=t.Offset32,this.itemVariationDataCount=t.uint16,this.itemVariationDataOffsets=[...new Array(this.itemVariationDataCount)].map((e=>t.Offset32))}}class Vd extends mu{constructor(e){super(e),this.coverageOffset=e.Offset16,this.glyphCount=e.uint16,this.attachPointOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16))}getPoint(e){return this.parser.currentPosition=this.start+this.attachPointOffsets[e],new Td(this.parser)}}class Td{constructor(e){this.pointCount=e.uint16,this.pointIndices=[...new Array(this.pointCount)].map((t=>e.uint16))}}class Od extends mu{constructor(e){super(e),this.coverageOffset=e.Offset16,vu(this,"coverage",(()=>(e.currentPosition=this.start+this.coverageOffset,new Ed(e)))),this.ligGlyphCount=e.uint16,this.ligGlyphOffsets=[...new Array(this.ligGlyphCount)].map((t=>e.Offset16))}getLigGlyph(e){return this.parser.currentPosition=this.start+this.ligGlyphOffsets[e],new Ad(this.parser)}}class Ad extends mu{constructor(e){super(e),this.caretCount=e.uint16,this.caretValueOffsets=[...new Array(this.caretCount)].map((t=>e.Offset16))}getCaretValue(e){return this.parser.currentPosition=this.start+this.caretValueOffsets[e],new Nd(this.parser)}}class Nd{constructor(e){this.caretValueFormat=e.uint16,1===this.caretValueFormat&&(this.coordinate=e.int16),2===this.caretValueFormat&&(this.caretValuePointIndex=e.uint16),3===this.caretValueFormat&&(this.coordinate=e.int16,this.deviceOffset=e.Offset16)}}class Fd extends mu{constructor(e){super(e),this.markGlyphSetTableFormat=e.uint16,this.markGlyphSetCount=e.uint16,this.coverageOffsets=[...new Array(this.markGlyphSetCount)].map((t=>e.Offset32))}getMarkGlyphSet(e){return this.parser.currentPosition=this.start+this.coverageOffsets[e],new Ed(this.parser)}}var Md=Object.freeze({__proto__:null,GDEF:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.glyphClassDefOffset=n.Offset16,vu(this,"glyphClassDefs",(()=>{if(0!==this.glyphClassDefOffset)return n.currentPosition=this.tableStart+this.glyphClassDefOffset,new Cd(n)})),this.attachListOffset=n.Offset16,vu(this,"attachList",(()=>{if(0!==this.attachListOffset)return n.currentPosition=this.tableStart+this.attachListOffset,new Vd(n)})),this.ligCaretListOffset=n.Offset16,vu(this,"ligCaretList",(()=>{if(0!==this.ligCaretListOffset)return n.currentPosition=this.tableStart+this.ligCaretListOffset,new Od(n)})),this.markAttachClassDefOffset=n.Offset16,vu(this,"markAttachClassDef",(()=>{if(0!==this.markAttachClassDefOffset)return n.currentPosition=this.tableStart+this.markAttachClassDefOffset,new Cd(n)})),this.minorVersion>=2&&(this.markGlyphSetsDefOffset=n.Offset16,vu(this,"markGlyphSetsDef",(()=>{if(0!==this.markGlyphSetsDefOffset)return n.currentPosition=this.tableStart+this.markGlyphSetsDefOffset,new Fd(n)}))),3===this.minorVersion&&(this.itemVarStoreOffset=n.Offset32,vu(this,"itemVarStore",(()=>{if(0!==this.itemVarStoreOffset)return n.currentPosition=this.tableStart+this.itemVarStoreOffset,new Id(n)})))}}});class Bd extends mu{static EMPTY={scriptCount:0,scriptRecords:[]};constructor(e){super(e),this.scriptCount=e.uint16,this.scriptRecords=[...new Array(this.scriptCount)].map((t=>new Dd(e)))}}class Dd{constructor(e){this.scriptTag=e.tag,this.scriptOffset=e.Offset16}}class Rd extends mu{constructor(e){super(e),this.defaultLangSys=e.Offset16,this.langSysCount=e.uint16,this.langSysRecords=[...new Array(this.langSysCount)].map((t=>new Ld(e)))}}class Ld{constructor(e){this.langSysTag=e.tag,this.langSysOffset=e.Offset16}}class zd{constructor(e){this.lookupOrder=e.Offset16,this.requiredFeatureIndex=e.uint16,this.featureIndexCount=e.uint16,this.featureIndices=[...new Array(this.featureIndexCount)].map((t=>e.uint16))}}class Hd extends mu{static EMPTY={featureCount:0,featureRecords:[]};constructor(e){super(e),this.featureCount=e.uint16,this.featureRecords=[...new Array(this.featureCount)].map((t=>new Gd(e)))}}class Gd{constructor(e){this.featureTag=e.tag,this.featureOffset=e.Offset16}}class Wd extends mu{constructor(e){super(e),this.featureParams=e.Offset16,this.lookupIndexCount=e.uint16,this.lookupListIndices=[...new Array(this.lookupIndexCount)].map((t=>e.uint16))}getFeatureParams(){if(this.featureParams>0){const e=this.parser;e.currentPosition=this.start+this.featureParams;const t=this.featureTag;if("size"===t)return new qd(e);if(t.startsWith("cc"))return new Ud(e);if(t.startsWith("ss"))return new Zd(e)}}}class Ud{constructor(e){this.format=e.uint16,this.featUiLabelNameId=e.uint16,this.featUiTooltipTextNameId=e.uint16,this.sampleTextNameId=e.uint16,this.numNamedParameters=e.uint16,this.firstParamUiLabelNameId=e.uint16,this.charCount=e.uint16,this.character=[...new Array(this.charCount)].map((t=>e.uint24))}}class qd{constructor(e){this.designSize=e.uint16,this.subfamilyIdentifier=e.uint16,this.subfamilyNameID=e.uint16,this.smallEnd=e.uint16,this.largeEnd=e.uint16}}class Zd{constructor(e){this.version=e.uint16,this.UINameID=e.uint16}}function Yd(e){e.parser.currentPosition-=2,delete e.coverageOffset,delete e.getCoverageTable}class Kd extends mu{constructor(e){super(e),this.substFormat=e.uint16,this.coverageOffset=e.Offset16}getCoverageTable(){let e=this.parser;return e.currentPosition=this.start+this.coverageOffset,new Ed(e)}}class Xd{constructor(e){this.glyphSequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class Qd extends Kd{constructor(e){super(e),this.deltaGlyphID=e.int16}}class Jd extends Kd{constructor(e){super(e),this.sequenceCount=e.uint16,this.sequenceOffsets=[...new Array(this.sequenceCount)].map((t=>e.Offset16))}getSequence(e){let t=this.parser;return t.currentPosition=this.start+this.sequenceOffsets[e],new $d(t)}}class $d{constructor(e){this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class eh extends Kd{constructor(e){super(e),this.alternateSetCount=e.uint16,this.alternateSetOffsets=[...new Array(this.alternateSetCount)].map((t=>e.Offset16))}getAlternateSet(e){let t=this.parser;return t.currentPosition=this.start+this.alternateSetOffsets[e],new th(t)}}class th{constructor(e){this.glyphCount=e.uint16,this.alternateGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}class nh extends Kd{constructor(e){super(e),this.ligatureSetCount=e.uint16,this.ligatureSetOffsets=[...new Array(this.ligatureSetCount)].map((t=>e.Offset16))}getLigatureSet(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureSetOffsets[e],new sh(t)}}class sh extends mu{constructor(e){super(e),this.ligatureCount=e.uint16,this.ligatureOffsets=[...new Array(this.ligatureCount)].map((t=>e.Offset16))}getLigature(e){let t=this.parser;return t.currentPosition=this.start+this.ligatureOffsets[e],new ih(t)}}class ih{constructor(e){this.ligatureGlyph=e.uint16,this.componentCount=e.uint16,this.componentGlyphIDs=[...new Array(this.componentCount-1)].map((t=>e.uint16))}}class rh extends Kd{constructor(e){super(e),1===this.substFormat&&(this.subRuleSetCount=e.uint16,this.subRuleSetOffsets=[...new Array(this.subRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.classDefOffset=e.Offset16,this.subClassSetCount=e.uint16,this.subClassSetOffsets=[...new Array(this.subClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Yd(this),this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.coverageOffsets=[...new Array(this.glyphCount)].map((t=>e.Offset16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Xd(e))))}getSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.subRuleSetOffsets[e],new ah(t)}getSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 5.${this.substFormat} has no subclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.subClassSetOffsets[e],new lh(t)}getCoverageTable(e){if(3!==this.substFormat&&!e)return super.getCoverageTable();if(!e)throw new Error(`lookup type 5.${this.substFormat} requires an coverage table index.`);let t=this.parser;return t.currentPosition=this.start+this.coverageOffsets[e],new Ed(t)}}class ah extends mu{constructor(e){super(e),this.subRuleCount=e.uint16,this.subRuleOffsets=[...new Array(this.subRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.subRuleOffsets[e],new oh(t)}}class oh{constructor(e){this.glyphCount=e.uint16,this.substitutionCount=e.uint16,this.inputSequence=[...new Array(this.glyphCount-1)].map((t=>e.uint16)),this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new Xd(e)))}}class lh extends mu{constructor(e){super(e),this.subClassRuleCount=e.uint16,this.subClassRuleOffsets=[...new Array(this.subClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.subClassRuleOffsets[e],new ch(t)}}class ch extends oh{constructor(e){super(e)}}class uh extends Kd{constructor(e){super(e),1===this.substFormat&&(this.chainSubRuleSetCount=e.uint16,this.chainSubRuleSetOffsets=[...new Array(this.chainSubRuleSetCount)].map((t=>e.Offset16))),2===this.substFormat&&(this.backtrackClassDefOffset=e.Offset16,this.inputClassDefOffset=e.Offset16,this.lookaheadClassDefOffset=e.Offset16,this.chainSubClassSetCount=e.uint16,this.chainSubClassSetOffsets=[...new Array(this.chainSubClassSetCount)].map((t=>e.Offset16))),3===this.substFormat&&(Yd(this),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.inputGlyphCount=e.uint16,this.inputCoverageOffsets=[...new Array(this.inputGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[...new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.seqLookupCount=e.uint16,this.seqLookupRecords=[...new Array(this.substitutionCount)].map((t=>new mh(e))))}getChainSubRuleSet(e){if(1!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubrule sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleSetOffsets[e],new dh(t)}getChainSubClassSet(e){if(2!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} has no chainsubclass sets.`);let t=this.parser;return t.currentPosition=this.start+this.chainSubClassSetOffsets[e],new ph(t)}getCoverageFromOffset(e){if(3!==this.substFormat)throw new Error(`lookup type 6.${this.substFormat} does not use contextual coverage offsets.`);let t=this.parser;return t.currentPosition=this.start+e,new Ed(t)}}class dh extends mu{constructor(e){super(e),this.chainSubRuleCount=e.uint16,this.chainSubRuleOffsets=[...new Array(this.chainSubRuleCount)].map((t=>e.Offset16))}getSubRule(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new hh(t)}}class hh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.SubstCount)].map((t=>new Xd(e)))}}class ph extends mu{constructor(e){super(e),this.chainSubClassRuleCount=e.uint16,this.chainSubClassRuleOffsets=[...new Array(this.chainSubClassRuleCount)].map((t=>e.Offset16))}getSubClass(e){let t=this.parser;return t.currentPosition=this.start+this.chainSubRuleOffsets[e],new fh(t)}}class fh{constructor(e){this.backtrackGlyphCount=e.uint16,this.backtrackSequence=[...new Array(this.backtrackGlyphCount)].map((t=>e.uint16)),this.inputGlyphCount=e.uint16,this.inputSequence=[...new Array(this.inputGlyphCount-1)].map((t=>e.uint16)),this.lookaheadGlyphCount=e.uint16,this.lookAheadSequence=[...new Array(this.lookAheadGlyphCount)].map((t=>e.uint16)),this.substitutionCount=e.uint16,this.substLookupRecords=[...new Array(this.substitutionCount)].map((t=>new mh(e)))}}class mh extends mu{constructor(e){super(e),this.sequenceIndex=e.uint16,this.lookupListIndex=e.uint16}}class gh extends mu{constructor(e){super(e),this.substFormat=e.uint16,this.extensionLookupType=e.uint16,this.extensionOffset=e.Offset32}}class vh extends Kd{constructor(e){super(e),this.backtrackGlyphCount=e.uint16,this.backtrackCoverageOffsets=[...new Array(this.backtrackGlyphCount)].map((t=>e.Offset16)),this.lookaheadGlyphCount=e.uint16,this.lookaheadCoverageOffsets=[new Array(this.lookaheadGlyphCount)].map((t=>e.Offset16)),this.glyphCount=e.uint16,this.substituteGlyphIDs=[...new Array(this.glyphCount)].map((t=>e.uint16))}}var yh={buildSubtable:function(e,t){const n=new[void 0,Qd,Jd,eh,nh,rh,uh,gh,vh][e](t);return n.type=e,n}};class xh extends mu{constructor(e){super(e)}}class bh extends xh{constructor(e){super(e),console.log("lookup type 1")}}class wh extends xh{constructor(e){super(e),console.log("lookup type 2")}}class _h extends xh{constructor(e){super(e),console.log("lookup type 3")}}class jh extends xh{constructor(e){super(e),console.log("lookup type 4")}}class Sh extends xh{constructor(e){super(e),console.log("lookup type 5")}}class Ch extends xh{constructor(e){super(e),console.log("lookup type 6")}}class kh extends xh{constructor(e){super(e),console.log("lookup type 7")}}class Eh extends xh{constructor(e){super(e),console.log("lookup type 8")}}class Ph extends xh{constructor(e){super(e),console.log("lookup type 9")}}var Ih={buildSubtable:function(e,t){const n=new[void 0,bh,wh,_h,jh,Sh,Ch,kh,Eh,Ph][e](t);return n.type=e,n}};class Vh extends mu{static EMPTY={lookupCount:0,lookups:[]};constructor(e){super(e),this.lookupCount=e.uint16,this.lookups=[...new Array(this.lookupCount)].map((t=>e.Offset16))}}class Th extends mu{constructor(e,t){super(e),this.ctType=t,this.lookupType=e.uint16,this.lookupFlag=e.uint16,this.subTableCount=e.uint16,this.subtableOffsets=[...new Array(this.subTableCount)].map((t=>e.Offset16)),this.markFilteringSet=e.uint16}get rightToLeft(){return!0&this.lookupFlag}get ignoreBaseGlyphs(){return!0&this.lookupFlag}get ignoreLigatures(){return!0&this.lookupFlag}get ignoreMarks(){return!0&this.lookupFlag}get useMarkFilteringSet(){return!0&this.lookupFlag}get markAttachmentType(){return!0&this.lookupFlag}getSubTable(e){const t="GSUB"===this.ctType?yh:Ih;return this.parser.currentPosition=this.start+this.subtableOffsets[e],t.buildSubtable(this.lookupType,this.parser)}}class Oh extends gu{constructor(e,t,n){const{p:s,tableStart:i}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.scriptListOffset=s.Offset16,this.featureListOffset=s.Offset16,this.lookupListOffset=s.Offset16,1===this.majorVersion&&1===this.minorVersion&&(this.featureVariationsOffset=s.Offset32);const r=!(this.scriptListOffset||this.featureListOffset||this.lookupListOffset);vu(this,"scriptList",(()=>r?Bd.EMPTY:(s.currentPosition=i+this.scriptListOffset,new Bd(s)))),vu(this,"featureList",(()=>r?Hd.EMPTY:(s.currentPosition=i+this.featureListOffset,new Hd(s)))),vu(this,"lookupList",(()=>r?Vh.EMPTY:(s.currentPosition=i+this.lookupListOffset,new Vh(s)))),this.featureVariationsOffset&&vu(this,"featureVariations",(()=>r?FeatureVariations.EMPTY:(s.currentPosition=i+this.featureVariationsOffset,new FeatureVariations(s))))}getSupportedScripts(){return this.scriptList.scriptRecords.map((e=>e.scriptTag))}getScriptTable(e){let t=this.scriptList.scriptRecords.find((t=>t.scriptTag===e));this.parser.currentPosition=this.scriptList.start+t.scriptOffset;let n=new Rd(this.parser);return n.scriptTag=e,n}ensureScriptTable(e){return"string"==typeof e?this.getScriptTable(e):e}getSupportedLangSys(e){const t=0!==(e=this.ensureScriptTable(e)).defaultLangSys,n=e.langSysRecords.map((e=>e.langSysTag));return t&&n.unshift("dflt"),n}getDefaultLangSysTable(e){let t=(e=this.ensureScriptTable(e)).defaultLangSys;if(0!==t){this.parser.currentPosition=e.start+t;let n=new zd(this.parser);return n.langSysTag="",n.defaultForScript=e.scriptTag,n}}getLangSysTable(e,t="dflt"){if("dflt"===t)return this.getDefaultLangSysTable(e);let n=(e=this.ensureScriptTable(e)).langSysRecords.find((e=>e.langSysTag===t));this.parser.currentPosition=e.start+n.langSysOffset;let s=new zd(this.parser);return s.langSysTag=t,s}getFeatures(e){return e.featureIndices.map((e=>this.getFeature(e)))}getFeature(e){let t;if(t=parseInt(e)==e?this.featureList.featureRecords[e]:this.featureList.featureRecords.find((t=>t.featureTag===e)),!t)return;this.parser.currentPosition=this.featureList.start+t.featureOffset;let n=new Wd(this.parser);return n.featureTag=t.featureTag,n}getLookups(e){return e.lookupListIndices.map((e=>this.getLookup(e)))}getLookup(e,t){let n=this.lookupList.lookups[e];return this.parser.currentPosition=this.lookupList.start+n,new Th(this.parser,t)}}var Ah=Object.freeze({__proto__:null,GSUB:class extends Oh{constructor(e,t){super(e,t,"GSUB")}getLookup(e){return super.getLookup(e,"GSUB")}}});var Nh=Object.freeze({__proto__:null,GPOS:class extends Oh{constructor(e,t){super(e,t,"GPOS")}getLookup(e){return super.getLookup(e,"GPOS")}}});class Fh extends mu{constructor(e){super(e),this.numEntries=e.uint16,this.documentRecords=[...new Array(this.numEntries)].map((t=>new Mh(e)))}getDocument(e){let t=this.documentRecords[e];if(!t)return"";let n=this.start+t.svgDocOffset;return this.parser.currentPosition=n,this.parser.readBytes(t.svgDocLength)}getDocumentForGlyph(e){let t=this.documentRecords.findIndex((t=>t.startGlyphID<=e&&e<=t.endGlyphID));return-1===t?"":this.getDocument(t)}}class Mh{constructor(e){this.startGlyphID=e.uint16,this.endGlyphID=e.uint16,this.svgDocOffset=e.Offset32,this.svgDocLength=e.uint32}}var Bh=Object.freeze({__proto__:null,SVG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.offsetToSVGDocumentList=n.Offset32,n.currentPosition=this.tableStart+this.offsetToSVGDocumentList,this.documentList=new Fh(n)}}});class Dh{constructor(e){this.tag=e.tag,this.minValue=e.fixed,this.defaultValue=e.fixed,this.maxValue=e.fixed,this.flags=e.flags(16),this.axisNameID=e.uint16}}class Rh{constructor(e,t,n){let s=e.currentPosition;this.subfamilyNameID=e.uint16,e.uint16,this.coordinates=[...new Array(t)].map((t=>e.fixed)),e.currentPosition-s<n&&(this.postScriptNameID=e.uint16)}}var Lh=Object.freeze({__proto__:null,fvar:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.axesArrayOffset=n.Offset16,n.uint16,this.axisCount=n.uint16,this.axisSize=n.uint16,this.instanceCount=n.uint16,this.instanceSize=n.uint16;const s=this.tableStart+this.axesArrayOffset;vu(this,"axes",(()=>(n.currentPosition=s,[...new Array(this.axisCount)].map((e=>new Dh(n))))));const i=s+this.axisCount*this.axisSize;vu(this,"instances",(()=>{let e=[];for(let t=0;t<this.instanceCount;t++)n.currentPosition=i+t*this.instanceSize,e.push(new Rh(n,this.axisCount,this.instanceSize));return e}))}getSupportedAxes(){return this.axes.map((e=>e.tag))}getAxis(e){return this.axes.find((t=>t.tag===e))}}});var zh=Object.freeze({__proto__:null,cvt:class extends gu{constructor(e,t){const{p:n}=super(e,t),s=e.length/2;vu(this,"items",(()=>[...new Array(s)].map((e=>n.fword))))}}});var Hh=Object.freeze({__proto__:null,fpgm:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});class Gh{constructor(e){this.rangeMaxPPEM=e.uint16,this.rangeGaspBehavior=e.uint16}}var Wh=Object.freeze({__proto__:null,gasp:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRanges=n.uint16;vu(this,"gaspRanges",(()=>[...new Array(this.numRanges)].map((e=>new Gh(n)))))}}});var Uh=Object.freeze({__proto__:null,glyf:class extends gu{constructor(e,t){super(e,t)}getGlyphData(e,t){return this.parser.currentPosition=this.tableStart+e,this.parser.readBytes(t)}}});var qh=Object.freeze({__proto__:null,loca:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.maxp.numGlyphs+1;0===n.head.indexToLocFormat?(this.x2=!0,vu(this,"offsets",(()=>[...new Array(i)].map((e=>s.Offset16))))):vu(this,"offsets",(()=>[...new Array(i)].map((e=>s.Offset32))))}getGlyphDataOffsetAndLength(e){let t=this.offsets[e]*this.x2?2:1;return{offset:t,length:(this.offsets[e+1]*this.x2?2:1)-t}}}});var Zh=Object.freeze({__proto__:null,prep:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"instructions",(()=>[...new Array(e.length)].map((e=>n.uint8))))}}});var Yh=Object.freeze({__proto__:null,CFF:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"data",(()=>n.readBytes()))}}});var Kh=Object.freeze({__proto__:null,CFF2:class extends gu{constructor(e,t){const{p:n}=super(e,t);vu(this,"data",(()=>n.readBytes()))}}});class Xh{constructor(e){this.glyphIndex=e.uint16,this.vertOriginY=e.int16}}var Qh=Object.freeze({__proto__:null,VORG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.defaultVertOriginY=n.int16,this.numVertOriginYMetrics=n.uint16,vu(this,"vertORiginYMetrics",(()=>[...new Array(this.numVertOriginYMetrics)].map((e=>new Xh(n)))))}}});class Jh{constructor(e){this.indexSubTableArrayOffset=e.Offset32,this.indexTablesSize=e.uint32,this.numberofIndexSubTables=e.uint32,this.colorRef=e.uint32,this.hori=new ep(e),this.vert=new ep(e),this.startGlyphIndex=e.uint16,this.endGlyphIndex=e.uint16,this.ppemX=e.uint8,this.ppemY=e.uint8,this.bitDepth=e.uint8,this.flags=e.int8}}class $h{constructor(e){this.hori=new ep(e),this.vert=new ep(e),this.ppemX=e.uint8,this.ppemY=e.uint8,this.substitutePpemX=e.uint8,this.substitutePpemY=e.uint8}}class ep{constructor(e){this.ascender=e.int8,this.descender=e.int8,this.widthMax=e.uint8,this.caretSlopeNumerator=e.int8,this.caretSlopeDenominator=e.int8,this.caretOffset=e.int8,this.minOriginSB=e.int8,this.minAdvanceSB=e.int8,this.maxBeforeBL=e.int8,this.minAfterBL=e.int8,this.pad1=e.int8,this.pad2=e.int8}}class tp extends gu{constructor(e,t,n){const{p:s}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16,this.numSizes=s.uint32,vu(this,"bitMapSizes",(()=>[...new Array(this.numSizes)].map((e=>new Jh(s)))))}}var np=Object.freeze({__proto__:null,EBLC:tp});class sp extends gu{constructor(e,t,n){const{p:s}=super(e,t,n);this.majorVersion=s.uint16,this.minorVersion=s.uint16}}var ip=Object.freeze({__proto__:null,EBDT:sp});var rp=Object.freeze({__proto__:null,EBSC:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.majorVersion=n.uint16,this.minorVersion=n.uint16,this.numSizes=n.uint32,vu(this,"bitmapScales",(()=>[...new Array(this.numSizes)].map((e=>new $h(n)))))}}});var ap=Object.freeze({__proto__:null,CBLC:class extends tp{constructor(e,t){super(e,t,"CBLC")}}});var op=Object.freeze({__proto__:null,CBDT:class extends sp{constructor(e,t){super(e,t,"CBDT")}}});var lp=Object.freeze({__proto__:null,sbix:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.flags=n.flags(16),this.numStrikes=n.uint32,vu(this,"strikeOffsets",(()=>[...new Array(this.numStrikes)].map((e=>n.Offset32))))}}});class cp{constructor(e){this.gID=e.uint16,this.firstLayerIndex=e.uint16,this.numLayers=e.uint16}}class up{constructor(e){this.gID=e.uint16,this.paletteIndex=e.uint16}}var dp=Object.freeze({__proto__:null,COLR:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numBaseGlyphRecords=n.uint16,this.baseGlyphRecordsOffset=n.Offset32,this.layerRecordsOffset=n.Offset32,this.numLayerRecords=n.uint16}getBaseGlyphRecord(e){let t=this.tableStart+this.baseGlyphRecordsOffset;this.parser.currentPosition=t;let n=new cp(this.parser),s=n.gID,i=this.tableStart+this.layerRecordsOffset-6;this.parser.currentPosition=i;let r=new cp(this.parser),a=r.gID;if(s===e)return n;if(a===e)return r;for(;t!==i;){let n=t+(i-t)/12;this.parser.currentPosition=n;let s=new cp(this.parser),r=s.gID;if(r===e)return s;r>e?i=n:r<e&&(t=n)}return!1}getLayers(e){let t=this.getBaseGlyphRecord(e);return this.parser.currentPosition=this.tableStart+this.layerRecordsOffset+4*t.firstLayerIndex,[...new Array(t.numLayers)].map((e=>new up(p)))}}});class hp{constructor(e){this.blue=e.uint8,this.green=e.uint8,this.red=e.uint8,this.alpha=e.uint8}}class pp{constructor(e,t){this.paletteTypes=[...new Array(t)].map((t=>e.uint32))}}class fp{constructor(e,t){this.paletteLabels=[...new Array(t)].map((t=>e.uint16))}}class mp{constructor(e,t){this.paletteEntryLabels=[...new Array(t)].map((t=>e.uint16))}}var gp=Object.freeze({__proto__:null,CPAL:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numPaletteEntries=n.uint16;const s=this.numPalettes=n.uint16;this.numColorRecords=n.uint16,this.offsetFirstColorRecord=n.Offset32,this.colorRecordIndices=[...new Array(this.numPalettes)].map((e=>n.uint16)),vu(this,"colorRecords",(()=>(n.currentPosition=this.tableStart+this.offsetFirstColorRecord,[...new Array(this.numColorRecords)].map((e=>new hp(n)))))),1===this.version&&(this.offsetPaletteTypeArray=n.Offset32,this.offsetPaletteLabelArray=n.Offset32,this.offsetPaletteEntryLabelArray=n.Offset32,vu(this,"paletteTypeArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteTypeArray,new pp(n,s)))),vu(this,"paletteLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteLabelArray,new fp(n,s)))),vu(this,"paletteEntryLabelArray",(()=>(n.currentPosition=this.tableStart+this.offsetPaletteEntryLabelArray,new mp(n,s)))))}}});class vp{constructor(e){this.format=e.uint32,this.length=e.uint32,this.offset=e.Offset32}}class yp{constructor(e){e.uint16,e.uint16,this.signatureLength=e.uint32,this.signature=e.readBytes(this.signatureLength)}}var xp=Object.freeze({__proto__:null,DSIG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.numSignatures=n.uint16,this.flags=n.uint16,this.signatureRecords=[...new Array(this.numSignatures)].map((e=>new vp(n)))}getData(e){const t=this.signatureRecords[e];return this.parser.currentPosition=this.tableStart+t.offset,new yp(this.parser)}}});class bp{constructor(e,t){this.pixelSize=e.uint8,this.maxWidth=e.uint8,this.widths=e.readBytes(t)}}var wp=Object.freeze({__proto__:null,hdmx:class extends gu{constructor(e,t,n){const{p:s}=super(e,t),i=n.hmtx.numGlyphs;this.version=s.uint16,this.numRecords=s.int16,this.sizeDeviceRecord=s.int32,this.records=[...new Array(numRecords)].map((e=>new bp(s,i)))}}});class _p{constructor(e){this.version=e.uint16,this.length=e.uint16,this.coverage=e.flags(8),this.format=e.uint8,0===this.format&&(this.nPairs=e.uint16,this.searchRange=e.uint16,this.entrySelector=e.uint16,this.rangeShift=e.uint16,vu(this,"pairs",(()=>[...new Array(this.nPairs)].map((t=>new jp(e)))))),2===this.format&&console.warn("Kern subtable format 2 is not supported: this parser currently only parses universal table data.")}get horizontal(){return this.coverage[0]}get minimum(){return this.coverage[1]}get crossstream(){return this.coverage[2]}get override(){return this.coverage[3]}}class jp{constructor(e){this.left=e.uint16,this.right=e.uint16,this.value=e.fword}}var Sp=Object.freeze({__proto__:null,kern:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.nTables=n.uint16,vu(this,"tables",(()=>{let e=this.tableStart+4;const t=[];for(let s=0;s<this.nTables;s++){n.currentPosition=e;let s=new _p(n);t.push(s),e+=s}return t}))}}});var Cp=Object.freeze({__proto__:null,LTSH:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numGlyphs=n.uint16,this.yPels=n.readBytes(this.numGlyphs)}}});var kp=Object.freeze({__proto__:null,MERG:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.mergeClassCount=n.uint16,this.mergeDataOffset=n.Offset16,this.classDefCount=n.uint16,this.offsetToClassDefOffsets=n.Offset16,vu(this,"mergeEntryMatrix",(()=>[...new Array(this.mergeClassCount)].map((e=>n.readBytes(this.mergeClassCount))))),console.warn("Full MERG parsing is currently not supported."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Ep{constructor(e,t){this.tableStart=e,this.parser=t,this.tag=t.tag,this.dataOffset=t.Offset32,this.dataLength=t.uint32}getData(){return this.parser.currentField=this.tableStart+this.dataOffset,this.parser.readBytes(this.dataLength)}}var Pp=Object.freeze({__proto__:null,meta:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint32,this.flags=n.uint32,n.uint32,this.dataMapsCount=n.uint32,this.dataMaps=[...new Array(this.dataMapsCount)].map((e=>new Ep(this.tableStart,n)))}}});var Ip=Object.freeze({__proto__:null,PCLT:class extends gu{constructor(e,t){super(e,t),console.warn("This font uses a PCLT table, which is currently not supported by this parser."),console.warn("If you need this table parsed, please file an issue, or better yet, a PR.")}}});class Vp{constructor(e){this.bCharSet=e.uint8,this.xRatio=e.uint8,this.yStartRatio=e.uint8,this.yEndRatio=e.uint8}}class Tp{constructor(e){this.recs=e.uint16,this.startsz=e.uint8,this.endsz=e.uint8,this.records=[...new Array(this.recs)].map((t=>new Op(e)))}}class Op{constructor(e){this.yPelHeight=e.uint16,this.yMax=e.int16,this.yMin=e.int16}}var Ap=Object.freeze({__proto__:null,VDMX:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.uint16,this.numRecs=n.uint16,this.numRatios=n.uint16,this.ratRanges=[...new Array(this.numRatios)].map((e=>new Vp(n))),this.offsets=[...new Array(this.numRatios)].map((e=>n.Offset16)),this.VDMXGroups=[...new Array(this.numRecs)].map((e=>new Tp(n)))}}});var Np=Object.freeze({__proto__:null,vhea:class extends gu{constructor(e,t){const{p:n}=super(e,t);this.version=n.fixed,this.ascent=this.vertTypoAscender=n.int16,this.descent=this.vertTypoDescender=n.int16,this.lineGap=this.vertTypoLineGap=n.int16,this.advanceHeightMax=n.int16,this.minTopSideBearing=n.int16,this.minBottomSideBearing=n.int16,this.yMaxExtent=n.int16,this.caretSlopeRise=n.int16,this.caretSlopeRun=n.int16,this.caretOffset=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.reserved=n.int16,this.metricDataFormat=n.int16,this.numOfLongVerMetrics=n.uint16,n.verifyLength()}}});class Fp{constructor(e,t){this.advanceHeight=e,this.topSideBearing=t}}var Mp=Object.freeze({__proto__:null,vmtx:class extends gu{constructor(e,t,n){super(e,t);const s=n.vhea.numOfLongVerMetrics,i=n.maxp.numGlyphs,r=p.currentPosition;if(lazy(this,"vMetrics",(()=>(p.currentPosition=r,[...new Array(s)].map((e=>new Fp(p.uint16,p.int16)))))),s<i){const e=r+4*s;lazy(this,"topSideBearings",(()=>(p.currentPosition=e,[...new Array(i-s)].map((e=>p.int16)))))}}}});const{kebabCase:Bp}=ne(b.privateApis);var Dp=function(){const{installFonts:e}=(0,h.useContext)(Gc),[t,n]=(0,h.useState)(!1),[s,i]=(0,h.useState)(!1),r=async e=>{i(null),n(!0);const t=new Set,s=[...e];let r=!1;const a=s.map((async e=>{const n=await async function(e){const t=new Ru("Uploaded Font");try{const n=await l(e);return await t.fromDataBuffer(n,"font"),!0}catch(e){return!1}}(e);if(!n)return r=!0,null;if(t.has(e.name))return null;const s=e.name.split(".").pop().toLowerCase();return Cc.includes(s)?(t.add(e.name),e):null})),c=(await Promise.all(a)).filter((e=>null!==e));if(c.length>0)o(c);else{const e=r?(0,w.__)("Sorry, you are not allowed to upload this file type."):(0,w.__)("No fonts found to install.");i({type:"error",message:e}),n(!1)}},o=async e=>{const t=await Promise.all(e.map((async e=>{const t=await c(e);return await Nc(t,t.file,"all"),t})));u(t)};async function l(e){return new Promise(((t,n)=>{const s=new window.FileReader;s.readAsArrayBuffer(e),s.onload=()=>t(s.result),s.onerror=n}))}const c=async e=>{const t=await l(e),n=new Ru("Uploaded Font");n.fromDataBuffer(t,e.name);const s=(await new Promise((e=>n.onload=e))).detail.font,{name:i}=s.opentype.tables,r=i.get(16)||i.get(1),a=i.get(2).toLowerCase().includes("italic"),o=s.opentype.tables["OS/2"].usWeightClass||"normal",c=!!s.opentype.tables.fvar&&s.opentype.tables.fvar.axes.find((({tag:e})=>"wght"===e));return{file:e,fontFamily:r,fontStyle:a?"italic":"normal",fontWeight:(c?`${c.minValue} ${c.maxValue}`:null)||o}},u=async t=>{const s=function(e){const t=e.reduce(((e,t)=>(e[t.fontFamily]||(e[t.fontFamily]={name:t.fontFamily,fontFamily:t.fontFamily,slug:Bp(t.fontFamily.toLowerCase()),fontFace:[]}),e[t.fontFamily].fontFace.push(t),e)),{});return Object.values(t)}(t);try{await e(s),i({type:"success",message:(0,w.__)("Fonts were installed successfully.")})}catch(e){i({type:"error",message:e.message,errors:e?.installationErrors})}n(!1)};return(0,a.jsxs)("div",{className:"font-library-modal__tabpanel-layout",children:[(0,a.jsx)(b.DropZone,{onFilesDrop:e=>{r(e)}}),(0,a.jsxs)(b.__experimentalVStack,{className:"font-library-modal__local-fonts",children:[s&&(0,a.jsxs)(b.Notice,{status:s.type,__unstableHTML:!0,onRemove:()=>i(null),children:[s.message,s.errors&&(0,a.jsx)("ul",{children:s.errors.map(((e,t)=>(0,a.jsx)("li",{children:e},t)))})]}),t&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)("div",{className:"font-library-modal__upload-area",children:(0,a.jsx)(b.ProgressBar,{})})}),!t&&(0,a.jsx)(b.FormFileUpload,{accept:Cc.map((e=>`.${e}`)).join(","),multiple:!0,onChange:e=>{r(e.target.files)},render:({openFileDialog:e})=>(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:"font-library-modal__upload-area",onClick:e,children:(0,w.__)("Upload font")})}),(0,a.jsx)(b.__experimentalSpacer,{margin:2}),(0,a.jsx)(b.__experimentalText,{className:"font-library-modal__upload-area__text",children:(0,w.__)("Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.")})]})]})};const{Tabs:Rp}=ne(b.privateApis),Lp={id:"installed-fonts",title:(0,w._x)("Library","Font library")},zp={id:"upload-fonts",title:(0,w._x)("Upload","noun")};var Hp=function({onRequestClose:e,defaultTabId:t="installed-fonts"}){const{collections:n}=(0,h.useContext)(Gc),s=(0,c.useSelect)((e=>e(j.store).canUser("create",{kind:"postType",name:"wp_font_family"})),[]),i=[Lp];return s&&(i.push(zp),i.push(...(e=>e.map((({slug:t,name:n})=>({id:t,title:1===e.length&&"google-fonts"===t?(0,w.__)("Install Fonts"):n}))))(n||[]))),(0,a.jsx)(b.Modal,{title:(0,w.__)("Fonts"),onRequestClose:e,isFullScreen:!0,className:"font-library-modal",children:(0,a.jsxs)(Rp,{defaultTabId:t,children:[(0,a.jsx)("div",{className:"font-library-modal__tablist-container",children:(0,a.jsx)(Rp.TabList,{children:i.map((({id:e,title:t})=>(0,a.jsx)(Rp.Tab,{tabId:e,children:t},e)))})}),i.map((({id:e})=>{let t;switch(e){case"upload-fonts":t=(0,a.jsx)(Dp,{});break;case"installed-fonts":t=(0,a.jsx)(Jc,{});break;default:t=(0,a.jsx)(au,{slug:e})}return(0,a.jsx)(Rp.TabPanel,{tabId:e,focusable:!1,children:t},e)}))]})})};var Gp=function({font:e}){const{handleSetLibraryFontSelected:t,setModalTabOpen:n}=(0,h.useContext)(Gc),s=e?.fontFace?.length||1,i=Qo(e);return(0,a.jsx)(b.__experimentalItem,{onClick:()=>{t(e),n("installed-fonts")},children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(b.FlexItem,{style:i,children:e.name}),(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles-screen-typography__font-variants-count",children:(0,w.sprintf)((0,w._n)("%d variant","%d variants",s),s)})]})})};const{useGlobalSetting:Wp}=ne(x.privateApis);function Up(e,t){return e?e.map((e=>Vc(e,{source:t}))):[]}function qp(){const{baseCustomFonts:e,modalTabOpen:t,setModalTabOpen:n}=(0,h.useContext)(Gc),[s]=Wp("typography.fontFamilies"),[i]=Wp("typography.fontFamilies",void 0,"base"),r=[...Up(s?.theme,"theme"),...Up(s?.custom,"custom")].sort(((e,t)=>e.name.localeCompare(t.name))),o=0<r.length,l=o||i?.theme?.length>0||e?.length>0;return(0,a.jsxs)(a.Fragment,{children:[!!t&&(0,a.jsx)(Hp,{onRequestClose:()=>n(null),defaultTabId:t}),(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Fonts")}),(0,a.jsx)(b.Button,{onClick:()=>n("installed-fonts"),label:(0,w.__)("Manage fonts"),icon:yc,size:"small"})]}),r.length>0&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.__experimentalItemGroup,{size:"large",isBordered:!0,isSeparated:!0,children:r.map((e=>(0,a.jsx)(Gp,{font:e},e.slug)))})}),!o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:l?(0,w.__)("No fonts activated."):(0,w.__)("No fonts installed.")}),(0,a.jsx)(b.Button,{className:"edit-site-global-styles-font-families__manage-fonts",variant:"secondary",__next40pxDefaultSize:!0,onClick:()=>{n(l?"installed-fonts":"upload-fonts")},children:l?(0,w.__)("Manage fonts"):(0,w.__)("Add fonts")})]})]})]})}var Zp=({...e})=>(0,a.jsx)(Wc,{children:(0,a.jsx)(qp,{...e})});var Yp=function(){const e=(0,c.useSelect)((e=>e(f.store).getEditorSettings().fontLibraryEnabled),[]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Typography"),description:(0,w.__)("Available fonts, typographic styles, and the application of those styles.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:7,children:[(0,a.jsx)(gc,{title:(0,w.__)("Typesets")}),e&&(0,a.jsx)(Zp,{}),(0,a.jsx)(tc,{}),(0,a.jsx)(vc,{})]})})]})};const{useGlobalStyle:Kp,useGlobalSetting:Xp,useSettingsForBlockElement:Qp,TypographyPanel:Jp}=ne(x.privateApis);function $p({element:e,headingLevel:t}){let n=[];"heading"===e?n=n.concat(["elements",t]):e&&"text"!==e&&(n=n.concat(["elements",e]));const s=n.join("."),[i]=Kp(s,void 0,"user",{shouldDecodeEncode:!1}),[r,o]=Kp(s,void 0,"all",{shouldDecodeEncode:!1}),[l]=Xp(""),c=Qp(l,void 0,"heading"===e?t:e);return(0,a.jsx)(Jp,{inheritedValue:r,value:i,onChange:o,settings:c})}const{useGlobalStyle:ef}=ne(x.privateApis);function tf({name:e,element:t,headingLevel:n}){let s="";"heading"===t?s=`elements.${n}.`:t&&"text"!==t&&(s=`elements.${t}.`);const[i]=ef(s+"typography.fontFamily",e),[r]=ef(s+"color.gradient",e),[o]=ef(s+"color.background",e),[l]=ef("color.background"),[c]=ef(s+"color.text",e),[u]=ef(s+"typography.fontSize",e),[d]=ef(s+"typography.fontStyle",e),[h]=ef(s+"typography.fontWeight",e),[p]=ef(s+"typography.letterSpacing",e),f="link"===t?{textDecoration:"underline"}:{};return(0,a.jsx)("div",{className:"edit-site-typography-preview",style:{fontFamily:i??"serif",background:r??o??l,color:c,fontSize:u,fontStyle:d,fontWeight:h,letterSpacing:p,...f},children:"Aa"})}const nf={text:{description:(0,w.__)("Manage the fonts used on the site."),title:(0,w.__)("Text")},link:{description:(0,w.__)("Manage the fonts and typography used on the links."),title:(0,w.__)("Links")},heading:{description:(0,w.__)("Manage the fonts and typography used on headings."),title:(0,w.__)("Headings")},caption:{description:(0,w.__)("Manage the fonts and typography used on captions."),title:(0,w.__)("Captions")},button:{description:(0,w.__)("Manage the fonts and typography used on buttons."),title:(0,w.__)("Buttons")}};var sf=function({element:e}){const[t,n]=(0,h.useState)("heading");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:nf[e].title,description:nf[e].description}),(0,a.jsx)(b.__experimentalSpacer,{marginX:4,children:(0,a.jsx)(tf,{element:e,headingLevel:t})}),"heading"===e&&(0,a.jsx)(b.__experimentalSpacer,{marginX:4,marginBottom:"1em",children:(0,a.jsxs)(b.__experimentalToggleGroupControl,{label:(0,w.__)("Select heading level"),hideLabelFromVision:!0,value:t,onChange:n,isBlock:!0,size:"__unstable-large",__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"heading",showTooltip:!0,"aria-label":(0,w.__)("All headings"),label:(0,w._x)("All","heading levels")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h1",showTooltip:!0,"aria-label":(0,w.__)("Heading 1"),label:(0,w.__)("H1")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h2",showTooltip:!0,"aria-label":(0,w.__)("Heading 2"),label:(0,w.__)("H2")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h3",showTooltip:!0,"aria-label":(0,w.__)("Heading 3"),label:(0,w.__)("H3")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h4",showTooltip:!0,"aria-label":(0,w.__)("Heading 4"),label:(0,w.__)("H4")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h5",showTooltip:!0,"aria-label":(0,w.__)("Heading 5"),label:(0,w.__)("H5")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"h6",showTooltip:!0,"aria-label":(0,w.__)("Heading 6"),label:(0,w.__)("H6")})]})}),(0,a.jsx)($p,{element:e,headingLevel:t})]})};const{useGlobalStyle:rf}=ne(x.privateApis);var af=function({fontSize:e}){const[t]=rf("typography"),n=e?.fluid?.min&&e?.fluid?.max?{minimumFontSize:e.fluid.min,maximumFontSize:e.fluid.max}:{fontSize:e.size},s=(0,x.getComputedFluidTypographyValue)(n);return(0,a.jsx)("div",{className:"edit-site-typography-preview",style:{fontSize:s,fontFamily:t?.fontFamily??"serif"},children:(0,w.__)("Aa")})};var of=function({fontSize:e,isOpen:t,toggleOpen:n,handleRemoveFontSize:s}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:t,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:(0,w.__)("Delete"),onCancel:()=>{n()},onConfirm:async()=>{n(),s(e)},size:"medium",children:e&&(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" font size preset?'),e.name)})};var lf=function({fontSize:e,toggleOpen:t,handleRename:n}){const[s,i]=(0,h.useState)(e.name);return(0,a.jsx)(b.Modal,{onRequestClose:t,focusOnMount:"firstContentElement",title:(0,w.__)("Rename"),size:"small",children:(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault(),s.trim()&&n(s),t(),t()},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"3",children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",value:s,onChange:i,label:(0,w.__)("Name"),placeholder:(0,w.__)("Font size preset name")}),(0,a.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,w.__)("Save")})]})]})})})};const cf=["px","em","rem","vw","vh"];var uf=function({__nextHasNoMarginBottom:e,...t}){const{baseControlProps:n}=(0,b.useBaseControlProps)(t),{value:s,onChange:i,fallbackValue:r,disabled:o,label:l}=t,c=(0,b.__experimentalUseCustomUnits)({availableUnits:cf}),[u,d="px"]=(0,b.__experimentalParseQuantityAndUnitFromRawValue)(s,c),h=!!d&&["em","rem","vw","vh"].includes(d);return(0,a.jsx)(b.BaseControl,{...n,__nextHasNoMarginBottom:!0,children:(0,a.jsxs)(b.Flex,{children:[(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,a.jsx)(b.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l,hideLabelFromVision:!0,value:s,onChange:e=>{i(e)},units:c,min:0,disabled:o})}),(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,a.jsx)(b.__experimentalSpacer,{marginX:2,marginBottom:0,children:(0,a.jsx)(b.RangeControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:l,hideLabelFromVision:!0,value:u,initialPosition:r,withInputField:!1,onChange:e=>{i?.(e+d)},min:0,max:h?10:100,step:h?.1:1,disabled:o})})})]})})};const{Menu:df}=ne(b.privateApis),{useGlobalSetting:hf}=ne(x.privateApis);var pf=function(){const[e,t]=(0,h.useState)(!1),[n,s]=(0,h.useState)(!1),{params:{origin:i,slug:r},goBack:o}=(0,b.useNavigator)(),[l,c]=hf("typography.fontSizes"),[u]=hf("typography.fluid"),d=l[i]??[],p=d.find((e=>e.slug===r));if((0,h.useEffect)((()=>{r&&!p&&o()}),[r,p,o]),!i||!r||!p)return null;const f=void 0!==p?.fluid?!!p.fluid:!!u,m="object"==typeof p?.fluid,g=(e,t)=>{const n=d.map((n=>n.slug===r?{...n,[e]:t}:n));c({...l,[i]:n})},v=()=>{t(!e)},y=()=>{s(!n)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(of,{fontSize:p,isOpen:e,toggleOpen:v,handleRemoveFontSize:()=>{const e=d.filter((e=>e.slug!==r));c({...l,[i]:e})}}),n&&(0,a.jsx)(lf,{fontSize:p,toggleOpen:y,handleRename:e=>{g("name",e)}}),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",align:"flex-start",children:[(0,a.jsx)(xl,{title:p.name,description:(0,w.sprintf)((0,w.__)("Manage the font size %s."),p.name)}),"custom"===i&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalSpacer,{marginTop:3,marginBottom:0,paddingX:4,children:(0,a.jsxs)(df,{children:[(0,a.jsx)(df.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Font size options")})}),(0,a.jsxs)(df.Popover,{children:[(0,a.jsx)(df.Item,{onClick:y,children:(0,a.jsx)(df.ItemLabel,{children:(0,w.__)("Rename")})}),(0,a.jsx)(df.Item,{onClick:v,children:(0,a.jsx)(df.ItemLabel,{children:(0,w.__)("Delete")})})]})]})})})]}),(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{paddingX:4,marginBottom:0,paddingBottom:6,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(af,{fontSize:p})}),(0,a.jsx)(uf,{label:(0,w.__)("Size"),value:m?"":p.size,onChange:e=>{g("size",e)},disabled:m}),(0,a.jsx)(b.ToggleControl,{label:(0,w.__)("Fluid typography"),help:(0,w.__)("Scale the font size dynamically to fit the screen or viewport."),checked:f,onChange:e=>{g("fluid",e)},__nextHasNoMarginBottom:!0}),f&&(0,a.jsx)(b.ToggleControl,{label:(0,w.__)("Custom fluid values"),help:(0,w.__)("Set custom min and max values for the fluid font size."),checked:m,onChange:e=>{g("fluid",!e||{min:p.size,max:p.size})},__nextHasNoMarginBottom:!0}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(uf,{label:(0,w.__)("Minimum"),value:p.fluid?.min,onChange:e=>{g("fluid",{...p.fluid,min:e})}}),(0,a.jsx)(uf,{label:(0,w.__)("Maximum"),value:p.fluid?.max,onChange:e=>{g("fluid",{...p.fluid,max:e})}})]})]})})})]})]})},ff=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var mf=function({text:e,confirmButtonText:t,isOpen:n,toggleOpen:s,onConfirm:i}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:t,onCancel:()=>{s()},onConfirm:async()=>{s(),i()},size:"medium",children:e})};const{Menu:gf}=ne(b.privateApis),{useGlobalSetting:vf}=ne(x.privateApis);function yf({label:e,origin:t,sizes:n,handleAddFontSize:s,handleResetFontSizes:i}){const[r,o]=(0,h.useState)(!1),l=()=>o(!r),c="custom"===t?(0,w.__)("Are you sure you want to remove all custom font size presets?"):(0,w.__)("Are you sure you want to reset all font size presets to their default values?");return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(mf,{text:c,confirmButtonText:"custom"===t?(0,w.__)("Remove"):(0,w.__)("Reset"),isOpen:r,toggleOpen:l,onConfirm:i}),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsxs)(b.FlexItem,{className:"edit-site-global-styles__typography-panel__options-container",children:["custom"===t&&(0,a.jsx)(b.Button,{label:(0,w.__)("Add font size"),icon:ff,size:"small",onClick:s}),!!i&&(0,a.jsxs)(gf,{children:[(0,a.jsx)(gf.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Font size presets options")})}),(0,a.jsx)(gf.Popover,{children:(0,a.jsx)(gf.Item,{onClick:l,children:(0,a.jsx)(gf.ItemLabel,{children:"custom"===t?(0,w.__)("Remove font size presets"):(0,w.__)("Reset font size presets")})})})]})]})]}),!!n.length&&(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:n.map((e=>(0,a.jsx)(Bo,{path:`/typography/font-sizes/${t}/${e.slug}`,children:(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.FlexItem,{className:"edit-site-font-size__item",children:e.name}),(0,a.jsx)(b.FlexItem,{display:"flex",children:(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})})]})},e.slug)))})]})]})}var xf=function(){const[e,t]=vf("typography.fontSizes.theme"),[n]=vf("typography.fontSizes.theme",null,"base"),[s,i]=vf("typography.fontSizes.default"),[r]=vf("typography.fontSizes.default",null,"base"),[o=[],l]=vf("typography.fontSizes.custom"),[c]=vf("typography.defaultFontSizes"),u=()=>{const e=$o(o,"custom-"),t={name:(0,w.sprintf)((0,w.__)("New Font Size %d"),e),size:"16px",slug:`custom-${e}`};l([...o,t])},d=(e,t)=>e.map((e=>e.size)).join("")===t.map((e=>e.size)).join("");return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)(xl,{title:(0,w.__)("Font size presets"),description:(0,w.__)("Create and edit the presets used for font sizes across the site.")}),(0,a.jsx)(b.__experimentalView,{children:(0,a.jsx)(b.__experimentalSpacer,{paddingX:4,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:8,children:[!!e?.length&&(0,a.jsx)(yf,{label:(0,w.__)("Theme"),origin:"theme",sizes:e,baseSizes:n,handleAddFontSize:u,handleResetFontSizes:d(e,n)?null:()=>t(n)}),c&&!!s?.length&&(0,a.jsx)(yf,{label:(0,w.__)("Default"),origin:"default",sizes:s,baseSizes:r,handleAddFontSize:u,handleResetFontSizes:d(s,r)?null:()=>i(r)}),(0,a.jsx)(yf,{label:(0,w.__)("Custom"),origin:"custom",sizes:o,handleAddFontSize:u,handleResetFontSizes:o.length>0?()=>l([]):null})]})})})]})};var bf=function({className:e,...t}){return(0,a.jsx)(b.Flex,{className:Ht("edit-site-global-styles__color-indicator-wrapper",e),...t})};const{useGlobalSetting:wf}=ne(x.privateApis),_f=[];var jf=function({name:e}){const[t]=wf("color.palette.custom"),[n]=wf("color.palette.theme"),[s]=wf("color.palette.default"),[i]=wf("color.defaultPalette",e),r=(0,h.useMemo)((()=>[...t||_f,...n||_f,...s&&i?s:_f]),[t,n,s,i]),o=e?"/blocks/"+encodeURIComponent(e)+"/colors/palette":"/colors/palette";return(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Palette")}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:(0,a.jsx)(Bo,{path:o,children:(0,a.jsxs)(b.__experimentalHStack,{direction:"row",children:[r.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalZStack,{isLayered:!1,offset:-8,children:r.slice(0,5).map((({color:e},t)=>(0,a.jsx)(bf,{children:(0,a.jsx)(b.ColorIndicator,{colorValue:e})},`${e}-${t}`)))}),(0,a.jsx)(b.FlexItem,{isBlock:!0,children:(0,w.__)("Edit palette")})]}):(0,a.jsx)(b.FlexItem,{children:(0,w.__)("Add colors")}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})})]})};const{useGlobalStyle:Sf,useGlobalSetting:Cf,useSettingsForBlockElement:kf,ColorPanel:Ef}=ne(x.privateApis);var Pf=function(){const[e]=Sf("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Sf("",void 0,"all",{shouldDecodeEncode:!1}),[s]=Cf(""),i=kf(s);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Colors"),description:(0,w.__)("Palette colors and the application of those colors on site elements.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:7,children:[(0,a.jsx)(jf,{}),(0,a.jsx)(Ef,{inheritedValue:t,value:e,onChange:n,settings:i})]})})]})},If=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/SVG",children:(0,a.jsx)(Zt.Path,{d:"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z"})});function Vf(){const{paletteColors:e}=re();return e.slice(0,4).map((({slug:e,color:t},n)=>(0,a.jsx)("div",{style:{flexGrow:1,height:"100%",background:t}},`${e}-${n}`)))}const Tf={start:{scale:1,opacity:1},hover:{scale:0,opacity:0}};var Of=({label:e,isFocused:t,withHoverView:n})=>(0,a.jsx)(ll,{label:e,isFocused:t,withHoverView:n,children:({key:e})=>(0,a.jsx)(b.__unstableMotion.div,{variants:Tf,style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(b.__experimentalHStack,{spacing:0,justify:"center",style:{height:"100%",overflow:"hidden"},children:(0,a.jsx)(Vf,{})})},e)});function Af({title:e,gap:t=2}){const n=["color"],s=cc(n);return s?.length<=1?null:(0,a.jsxs)(b.__experimentalVStack,{spacing:3,children:[e&&(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsx)(b.__experimentalGrid,{spacing:t,children:s.map(((e,t)=>(0,a.jsx)(mc,{variation:e,isPill:!0,properties:n,showTooltip:!0,children:()=>(0,a.jsx)(Of,{})},t)))})]})}const{useGlobalSetting:Nf}=ne(x.privateApis),Ff={placement:"bottom-start",offset:8};function Mf({name:e}){const[t,n]=Nf("color.palette.theme",e),[s]=Nf("color.palette.theme",e,"base"),[i,r]=Nf("color.palette.default",e),[o]=Nf("color.palette.default",e,"base"),[l,c]=Nf("color.palette.custom",e),[u]=Nf("color.defaultPalette",e),d=(0,y.useViewportMatch)("small","<")?Ff:void 0,[h]=function(e){const[t,n]=se("color.palette.theme",e);return window.__experimentalEnableColorRandomizer?[function(){const e=Math.floor(225*Math.random()),s=t.map((t=>{const{color:n}=t,s=X(n).rotate(e).toHex();return{...t,color:s}}));n(s)}]:[]}();return(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles-color-palette-panel",spacing:8,children:[(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[!!t&&!!t.length&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:t!==s,canOnlyChangeValues:!0,colors:t,onChange:n,paletteLabel:(0,w.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:d}),window.__experimentalEnableColorRandomizer&&t?.length>0&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"secondary",icon:If,onClick:h,children:(0,w.__)("Randomize colors")})]}),!!i&&!!i.length&&!!u&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,colors:i,onChange:r,paletteLabel:(0,w.__)("Default"),paletteLabelHeadingLevel:3,popoverProps:d}),(0,a.jsx)(b.__experimentalPaletteEdit,{colors:l,onChange:c,paletteLabel:(0,w.__)("Custom"),paletteLabelHeadingLevel:3,slugPrefix:"custom-",popoverProps:d}),(0,a.jsx)(Af,{title:(0,w.__)("Palettes")})]})}const{useGlobalSetting:Bf}=ne(x.privateApis),Df={placement:"bottom-start",offset:8},Rf=()=>{};function Lf({name:e}){const[t,n]=Bf("color.gradients.theme",e),[s]=Bf("color.gradients.theme",e,"base"),[i,r]=Bf("color.gradients.default",e),[o]=Bf("color.gradients.default",e,"base"),[l,c]=Bf("color.gradients.custom",e),[u]=Bf("color.defaultGradients",e),[d]=Bf("color.duotone.custom")||[],[h]=Bf("color.duotone.default")||[],[p]=Bf("color.duotone.theme")||[],[f]=Bf("color.defaultDuotone"),m=[...d||[],...p||[],...h&&f?h:[]],g=(0,y.useViewportMatch)("small","<")?Df:void 0;return(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles-gradient-palette-panel",spacing:8,children:[!!t&&!!t.length&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:t!==s,canOnlyChangeValues:!0,gradients:t,onChange:n,paletteLabel:(0,w.__)("Theme"),paletteLabelHeadingLevel:3,popoverProps:g}),!!i&&!!i.length&&!!u&&(0,a.jsx)(b.__experimentalPaletteEdit,{canReset:i!==o,canOnlyChangeValues:!0,gradients:i,onChange:r,paletteLabel:(0,w.__)("Default"),paletteLabelLevel:3,popoverProps:g}),(0,a.jsx)(b.__experimentalPaletteEdit,{gradients:l,onChange:c,paletteLabel:(0,w.__)("Custom"),paletteLabelLevel:3,slugPrefix:"custom-",popoverProps:g}),!!m&&!!m.length&&(0,a.jsxs)("div",{children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Duotone")}),(0,a.jsx)(b.__experimentalSpacer,{margin:3}),(0,a.jsx)(b.DuotonePicker,{duotonePalette:m,disableCustomDuotone:!0,disableCustomColors:!0,clearable:!1,onChange:Rf})]})]})}const{Tabs:zf}=ne(b.privateApis);var Hf=function({name:e}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Edit palette"),description:(0,w.__)("The combination of colors used across the site and in color pickers.")}),(0,a.jsxs)(zf,{children:[(0,a.jsxs)(zf.TabList,{children:[(0,a.jsx)(zf.Tab,{tabId:"color",children:(0,w.__)("Color")}),(0,a.jsx)(zf.Tab,{tabId:"gradient",children:(0,w.__)("Gradient")})]}),(0,a.jsx)(zf.TabPanel,{tabId:"color",focusable:!1,children:(0,a.jsx)(Mf,{name:e})}),(0,a.jsx)(zf.TabPanel,{tabId:"gradient",focusable:!1,children:(0,a.jsx)(Lf,{name:e})})]})]})};const Gf={backgroundSize:"auto"},{useGlobalStyle:Wf,useGlobalSetting:Uf,BackgroundPanel:qf}=ne(x.privateApis);function Zf(){const[e]=Wf("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=Wf("",void 0,"all",{shouldDecodeEncode:!1}),[s]=Uf("");return(0,a.jsx)(qf,{inheritedValue:t,value:e,onChange:n,settings:s,defaultValues:Gf})}const{useHasBackgroundPanel:Yf,useGlobalSetting:Kf}=ne(x.privateApis);var Xf=function(){const[e]=Kf(""),t=Yf(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Background"),description:(0,a.jsx)(b.__experimentalText,{children:(0,w.__)("Set styles for the site’s background.")})}),t&&(0,a.jsx)(Zf,{})]})};var Qf=function({text:e,confirmButtonText:t,isOpen:n,toggleOpen:s,onConfirm:i}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,cancelButtonText:(0,w.__)("Cancel"),confirmButtonText:t,onCancel:()=>{s()},onConfirm:async()=>{s(),i()},size:"medium",children:e})};const{useGlobalSetting:Jf}=ne(x.privateApis),{Menu:$f}=ne(b.privateApis),em="6px 6px 9px rgba(0, 0, 0, 0.2)";function tm(){const[e]=Jf("shadow.presets.default"),[t]=Jf("shadow.defaultPresets"),[n]=Jf("shadow.presets.theme"),[s,i]=Jf("shadow.presets.custom"),[r,o]=(0,h.useState)(!1),l=()=>o(!r);return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)(Qf,{text:(0,w.__)("Are you sure you want to remove all custom shadows?"),confirmButtonText:(0,w.__)("Remove"),isOpen:r,toggleOpen:l,onConfirm:()=>{i([])}}),(0,a.jsx)(xl,{title:(0,w.__)("Shadows"),description:(0,w.__)("Manage and create shadow styles for use across the site.")}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen",children:(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-global-styles__shadows-panel",spacing:7,children:[t&&(0,a.jsx)(nm,{label:(0,w.__)("Default"),shadows:e||[],category:"default"}),n&&n.length>0&&(0,a.jsx)(nm,{label:(0,w.__)("Theme"),shadows:n||[],category:"theme"}),(0,a.jsx)(nm,{label:(0,w.__)("Custom"),shadows:s||[],category:"custom",canCreate:!0,onCreate:e=>{i([...s||[],e])},onReset:l})]})})]})}function nm({label:e,shadows:t,category:n,canCreate:s,onCreate:i,onReset:r}){return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Tl,{level:3,children:e}),(0,a.jsxs)(b.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:[s&&(0,a.jsx)(b.Button,{size:"small",icon:ff,label:(0,w.__)("Add shadow"),onClick:()=>{(()=>{const e=$o(t,"shadow-");i({name:(0,w.sprintf)((0,w.__)("Shadow %s"),e),shadow:em,slug:`shadow-${e}`})})()}}),!!t?.length&&"custom"===n&&(0,a.jsxs)($f,{children:[(0,a.jsx)($f.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Shadow options")})}),(0,a.jsx)($f.Popover,{children:(0,a.jsx)($f.Item,{onClick:r,children:(0,a.jsx)($f.ItemLabel,{children:(0,w.__)("Remove all custom shadows")})})})]})]})]}),t.length>0&&(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:t.map((e=>(0,a.jsx)(sm,{shadow:e,category:n},e.slug)))})]})}function sm({shadow:e,category:t}){return(0,a.jsx)(Bo,{path:`/shadows/edit/${t}/${e.slug}`,children:(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.FlexItem,{children:e.name}),(0,a.jsx)(qa,{icon:(0,w.isRTL)()?za:La})]})})}var im=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M7 11.5h10V13H7z"})});const{useGlobalSetting:rm}=ne(x.privateApis),{Menu:am}=ne(b.privateApis),om=[{label:(0,w.__)("Rename"),action:"rename"},{label:(0,w.__)("Delete"),action:"delete"}],lm=[{label:(0,w.__)("Reset"),action:"reset"}];function cm(){const{goBack:e,params:{category:t,slug:n}}=(0,b.useNavigator)(),[s,i]=rm(`shadow.presets.${t}`);(0,h.useEffect)((()=>{const t=s?.some((e=>e.slug===n));n&&!t&&e()}),[s,n,e]);const[r]=rm(`shadow.presets.${t}`,void 0,"base"),[o,l]=(0,h.useState)((()=>(s||[]).find((e=>e.slug===n)))),c=(0,h.useMemo)((()=>(r||[]).find((e=>e.slug===n))),[r,n]),[u,d]=(0,h.useState)(!1),[p,f]=(0,h.useState)(!1),[m,g]=(0,h.useState)(o.name);if(!t||!n)return null;return o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(xl,{title:o.name}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.__experimentalSpacer,{marginTop:2,marginBottom:0,paddingX:4,children:(0,a.jsxs)(am,{children:[(0,a.jsx)(am.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Menu")})}),(0,a.jsx)(am.Popover,{children:("custom"===t?om:lm).map((e=>(0,a.jsx)(am.Item,{onClick:()=>(e=>{if("reset"===e){const e=s.map((e=>e.slug===n?c:e));l(c),i(e)}else"delete"===e?d(!0):"rename"===e&&f(!0)})(e.action),disabled:"reset"===e.action&&o.shadow===c.shadow,children:(0,a.jsx)(am.ItemLabel,{children:e.label})},e.action)))})]})})})]}),(0,a.jsxs)("div",{className:"edit-site-global-styles-screen",children:[(0,a.jsx)(um,{shadow:o.shadow}),(0,a.jsx)(dm,{shadow:o.shadow,onChange:e=>{l({...o,shadow:e});const t=s.map((t=>t.slug===n?{...o,shadow:e}:t));i(t)}})]}),u&&(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{i(s.filter((e=>e.slug!==n))),d(!1)},onCancel:()=>{d(!1)},confirmButtonText:(0,w.__)("Delete"),size:"medium",children:(0,w.sprintf)((0,w.__)('Are you sure you want to delete "%s" shadow preset?'),o.name)}),p&&(0,a.jsx)(b.Modal,{title:(0,w.__)("Rename"),onRequestClose:()=>f(!1),size:"small",children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),(e=>{if(!e)return;const t=s.map((t=>t.slug===n?{...o,name:e}:t));l({...o,name:e}),i(t)})(m),f(!1)},children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,autoComplete:"off",label:(0,w.__)("Name"),placeholder:(0,w.__)("Shadow name"),value:m,onChange:e=>g(e)}),(0,a.jsx)(b.__experimentalSpacer,{marginBottom:6}),(0,a.jsxs)(b.Flex,{className:"block-editor-shadow-edit-modal__actions",justify:"flex-end",expanded:!1,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>f(!1),children:(0,w.__)("Cancel")})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,w.__)("Save")})})]})]})})]}):(0,a.jsx)(xl,{title:""})}function um({shadow:e}){const t={boxShadow:e};return(0,a.jsx)(b.__experimentalSpacer,{marginBottom:4,marginTop:-2,children:(0,a.jsx)(b.__experimentalHStack,{align:"center",justify:"center",className:"edit-site-global-styles__shadow-preview-panel",children:(0,a.jsx)("div",{className:"edit-site-global-styles__shadow-preview-block",style:t})})})}function dm({shadow:e,onChange:t}){const n=(0,h.useRef)(),s=(0,h.useMemo)((()=>function(e){return(e.match(/(?:[^,(]|\([^)]*\))+/g)||[]).map((e=>e.trim()))}(e)),[e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalVStack,{spacing:2,children:(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",children:[(0,a.jsx)(Tl,{level:3,children:(0,w.__)("Shadows")}),(0,a.jsx)(b.FlexItem,{className:"edit-site-global-styles__shadows-panel__options-container",children:(0,a.jsx)(b.Button,{size:"small",icon:ff,label:(0,w.__)("Add shadow"),onClick:()=>{t([...s,em].join(", "))},ref:n})})]})}),(0,a.jsx)(b.__experimentalSpacer,{}),(0,a.jsx)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:s.map(((e,i)=>(0,a.jsx)(hm,{shadow:e,onChange:e=>((e,n)=>{const i=[...s];i[e]=n,t(i.join(", "))})(i,e),canRemove:s.length>1,onRemove:()=>(e=>{t(s.filter(((t,n)=>n!==e)).join(", ")),n.current.focus()})(i)},i)))})]})}function hm({shadow:e,onChange:t,canRemove:n,onRemove:s}){const i=(0,h.useMemo)((()=>function(e){const t={x:"0",y:"0",blur:"0",spread:"0",color:"#000",inset:!1};if(!e)return t;if(e.includes("none"))return t;const n=/((?:^|\s+)(-?\d*\.?\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\s|$)(?![^(]*\))){1,4}/g,s=e.match(n)||[];if(1!==s.length)return t;const i=s[0].split(" ").map((e=>e.trim())).filter((e=>e));if(i.length<2)return t;const r=e.match(/inset/gi)||[];if(r.length>1)return t;const a=1===r.length;let o=e.replace(n,"").trim();a&&(o=o.replace("inset","").replace("INSET","").trim());let l=(o.match(/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\(?[\d*\.?\d+%?,?\/?\s]*\)$/gi)||[]).map((e=>e?.trim())).filter((e=>e));if(l.length>1)return t;if(0===l.length&&(l=o.trim().split(" ").filter((e=>e)),l.length>1))return t;const[c,u,d,h]=i;return{x:c,y:u,blur:d||t.blur,spread:h||t.spread,inset:a,color:o||t.color}}(e)),[e]),r=e=>{t(function(e){const t=`${e.x||"0px"} ${e.y||"0px"} ${e.blur||"0px"} ${e.spread||"0px"}`;return`${e.inset?"inset":""} ${t} ${e.color||""}`.trim()}(e))};return(0,a.jsx)(b.Dropdown,{popoverProps:{placement:"left-start",offset:36,shift:!0},className:"edit-site-global-styles__shadow-editor__dropdown",renderToggle:({onToggle:e,isOpen:t})=>{const r={onClick:e,className:Ht("edit-site-global-styles__shadow-editor__dropdown-toggle",{"is-open":t}),"aria-expanded":t},o={onClick:()=>{t&&e(),s()},className:Ht("edit-site-global-styles__shadow-editor__remove-button",{"is-open":t}),label:(0,w.__)("Remove shadow")};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,icon:zo,...r,children:i.inset?(0,w.__)("Inner shadow"):(0,w.__)("Drop shadow")}),n&&(0,a.jsx)(b.Button,{size:"small",icon:im,...o})]})},renderContent:()=>(0,a.jsx)(b.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"edit-site-global-styles__shadow-editor__dropdown-content",children:(0,a.jsx)(pm,{shadowObj:i,onChange:r})})})}function pm({shadowObj:e,onChange:t}){const n=(n,s)=>{const i={...e,[n]:s};t(i)};return(0,a.jsxs)(b.__experimentalVStack,{spacing:4,className:"edit-site-global-styles__shadow-editor-panel",children:[(0,a.jsx)(b.ColorPalette,{clearable:!1,enableAlpha:!0,__experimentalIsRenderedInSidebar:!0,value:e.color,onChange:e=>n("color",e)}),(0,a.jsxs)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:e.inset?"inset":"outset",isBlock:!0,onChange:e=>n("inset","inset"===e),hideLabelFromVision:!0,__next40pxDefaultSize:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"outset",label:(0,w.__)("Outset")}),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"inset",label:(0,w.__)("Inset")})]}),(0,a.jsxs)(b.__experimentalGrid,{columns:2,gap:4,children:[(0,a.jsx)(fm,{label:(0,w.__)("X Position"),value:e.x,onChange:e=>n("x",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Y Position"),value:e.y,onChange:e=>n("y",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Blur"),value:e.blur,onChange:e=>n("blur",e)}),(0,a.jsx)(fm,{label:(0,w.__)("Spread"),value:e.spread,onChange:e=>n("spread",e)})]})]})}function fm({label:e,value:t,onChange:n}){return(0,a.jsx)(b.__experimentalUnitControl,{label:e,__next40pxDefaultSize:!0,value:t,onChange:e=>{const t=void 0!==e&&!isNaN(parseFloat(e));n(t?e:"0px")}})}function mm(){return(0,a.jsx)(tm,{})}function gm(){return(0,a.jsx)(cm,{})}const{useGlobalStyle:vm,useGlobalSetting:ym,useSettingsForBlockElement:xm,DimensionsPanel:bm}=ne(x.privateApis),wm={contentSize:!0,wideSize:!0,padding:!0,margin:!0,blockGap:!0,minHeight:!0,childLayout:!1};function _m(){const[e]=vm("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=vm("",void 0,"all",{shouldDecodeEncode:!1}),[s]=ym("",void 0,"user"),[i,r]=ym(""),o=xm(i),l=(0,h.useMemo)((()=>({...t,layout:o.layout})),[t,o.layout]),c=(0,h.useMemo)((()=>({...e,layout:s.layout})),[e,s.layout]);return(0,a.jsx)(bm,{inheritedValue:l,value:c,onChange:e=>{const t={...e};if(delete t.layout,n(t),e.layout!==s.layout){const t={...s,layout:e.layout};t.layout?.definitions&&delete t.layout.definitions,r(t)}},settings:o,includeLayoutControls:!0,defaultControls:wm})}const{useHasDimensionsPanel:jm,useGlobalSetting:Sm,useSettingsForBlockElement:Cm}=ne(x.privateApis);var km=function(){const[e]=Sm(""),t=Cm(e),n=jm(t);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Layout")}),n&&(0,a.jsx)(_m,{})]})};const{GlobalStylesContext:Em}=ne(x.privateApis);function Pm({gap:e=2}){const{user:t}=(0,h.useContext)(Em),n=t?.styles,s=(0,c.useSelect)((e=>e(j.store).__experimentalGetCurrentThemeGlobalStylesVariations()),[]),i=s?.filter((e=>!dc(e,["color"])&&!dc(e,["typography","spacing"]))),r=(0,h.useMemo)((()=>[...[{title:(0,w.__)("Default"),settings:{},styles:{}},...i??[]].map((e=>{const t={...e?.styles?.blocks};n?.blocks&&Object.keys(n.blocks).forEach((e=>{if(n.blocks[e].css){const s=t[e]||{},i={css:`${t[e]?.css||""} ${n.blocks[e].css.trim()||""}`};t[e]={...s,...i}}}));const s=n?.css||e.styles?.css?{css:`${e.styles?.css||""} ${n?.css||""}`}:{},i=Object.keys(t).length>0?{blocks:t}:{},r={...e.styles,...s,...i};return{...e,settings:e.settings??{},styles:r}}))]),[i,n?.blocks,n?.css]);return!i||i?.length<1?null:(0,a.jsx)(b.__experimentalGrid,{columns:2,className:"edit-site-global-styles-style-variations-container",gap:e,children:r.map(((e,t)=>(0,a.jsx)(mc,{variation:e,children:t=>(0,a.jsx)(pl,{label:e?.title,withHoverView:!0,isFocused:t,variation:e})},t)))})}function Im(){return(0,a.jsxs)(b.__experimentalVStack,{spacing:10,className:"edit-site-global-styles-variation-container",children:[(0,a.jsx)(Pm,{gap:3}),(0,a.jsx)(Af,{title:(0,w.__)("Palettes"),gap:3}),(0,a.jsx)(gc,{title:(0,w.__)("Typography"),gap:3})]})}const{useZoomOut:Vm}=ne(x.privateApis);var Tm=function(){const e=(0,c.useSelect)((e=>e(x.store).getSettings().isPreviewMode),[]);return Vm(!e),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Browse styles"),description:(0,w.__)("Choose a variation to change the look of the site.")}),(0,a.jsx)(b.Card,{size:"small",isBorderless:!0,className:"edit-site-global-styles-screen-style-variations",children:(0,a.jsx)(b.CardBody,{children:(0,a.jsx)(Im,{})})})]})};const Om=window.wp.mediaUtils,Am=[{slug:"theme-colors",title:(0,w.__)("Theme Colors"),origin:"theme",type:"colors"},{slug:"theme-gradients",title:(0,w.__)("Theme Gradients"),origin:"theme",type:"gradients"},{slug:"custom-colors",title:(0,w.__)("Custom Colors"),origin:"custom",type:"colors"},{slug:"custom-gradients",title:(0,w.__)("Custom Gradients"),origin:"custom",type:"gradients"},{slug:"duotones",title:(0,w.__)("Duotones"),origin:"theme",type:"duotones"},{slug:"default-colors",title:(0,w.__)("Default Colors"),origin:"default",type:"colors"},{slug:"default-gradients",title:(0,w.__)("Default Gradients"),origin:"default",type:"gradients"}],Nm=[{slug:"site-identity",title:(0,w.__)("Site Identity"),blocks:["core/site-logo","core/site-title","core/site-tagline"]},{slug:"design",title:(0,w.__)("Design"),blocks:["core/navigation","core/avatar","core/post-time-to-read"],exclude:["core/home-link","core/navigation-link"]},{slug:"posts",title:(0,w.__)("Posts"),blocks:["core/post-title","core/post-excerpt","core/post-author","core/post-author-name","core/post-author-biography","core/post-date","core/post-terms","core/term-description","core/query-title","core/query-no-results","core/query-pagination","core/query-numbers"]},{slug:"comments",title:(0,w.__)("Comments"),blocks:["core/comments-title","core/comments-pagination","core/comments-pagination-numbers","core/comments","core/comments-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/post-comments-count","core/post-comments-link"]}],Fm=[{slug:"overview",title:(0,w.__)("Overview"),blocks:[]},{slug:"text",title:(0,w.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,w.__)("Colors"),blocks:[]},{slug:"theme",title:(0,w.__)("Theme"),subcategories:Nm},{slug:"media",title:(0,w.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,w.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,w.__)("Embeds"),include:[]}],Mm=[...Nm,{slug:"media",title:(0,w.__)("Media"),blocks:["core/post-featured-image"]},{slug:"widgets",title:(0,w.__)("Widgets"),blocks:[]},{slug:"embed",title:(0,w.__)("Embeds"),include:[]}],Bm=[{slug:"overview",title:(0,w.__)("Overview"),blocks:[]},{slug:"text",title:(0,w.__)("Text"),blocks:["core/post-content","core/home-link","core/navigation-link"]},{slug:"colors",title:(0,w.__)("Colors"),blocks:[]},{slug:"blocks",title:(0,w.__)("All Blocks"),blocks:[],subcategories:Mm}];function Dm(e,t){if(!e?.slug||!t?.length)return;const n=e?.subcategories??[];if(n.length)return n.reduce(((e,n)=>{const s=Dm(n,t);return s&&(e.subcategories||(e.subcategories=[]),e.subcategories=[...e.subcategories,s]),e}),{title:e.title,slug:e.slug});const s=e?.blocks||[],i=e?.exclude||[],r=t.filter((t=>!i.includes(t.name)&&(t.category===e.slug||s.includes(t.name))));return r.length?{title:e.title,slug:e.slug,examples:r}:void 0}function Rm(){const e=[...Nm,...Fm].map((({slug:e})=>e)),t=(0,o.getCategories)().filter((({slug:t})=>!e.includes(t)));return[...Fm,...t]}var Lm=({colors:e,type:t,templateColumns:n="1fr 1fr",itemHeight:s="52px"})=>e?(0,a.jsx)(b.__experimentalGrid,{templateColumns:n,rowGap:8,columnGap:16,children:e.map((e=>{const n="gradients"===t?(0,x.__experimentalGetGradientClass)(e.slug):(0,x.getColorClassName)("background-color",e.slug),i=Ht("edit-site-style-book__color-example",n);return(0,a.jsx)(Zt.View,{className:i,style:{height:s}},e.slug)}))}):null;var zm=({duotones:e})=>e?(0,a.jsx)(b.__experimentalGrid,{columns:2,rowGap:16,columnGap:16,children:e.map((e=>(0,a.jsxs)(b.__experimentalGrid,{className:"edit-site-style-book__duotone-example",columns:2,rowGap:8,columnGap:8,children:[(0,a.jsx)(Zt.View,{children:(0,a.jsx)("img",{alt:`Duotone example: ${e.slug}`,src:"https://s.w.org/images/core/5.3/MtBlanc1.jpg",style:{filter:`url(#wp-duotone-${e.slug})`}})}),e.colors.map((e=>(0,a.jsx)(Zt.View,{className:"edit-site-style-book__color-example",style:{backgroundColor:e}},e)))]},e.slug)))}):null;function Hm(e){const t=(0,o.getBlockTypes)().filter((e=>{const{name:t,example:n,supports:s}=e;return"core/heading"!==t&&!!n&&!1!==s?.inserter})).map((e=>({name:e.name,title:e.title,category:e.category,blocks:(0,o.getBlockFromExample)(e.name,{...e.example,attributes:{...e.example.attributes,style:void 0}})})));if(!!!(0,o.getBlockType)("core/heading"))return t;const n={name:"core/heading",title:(0,w.__)("Headings"),category:"text",blocks:[1,2,3,4,5,6].map((e=>(0,o.createBlock)("core/heading",{content:(0,w.sprintf)((0,w.__)("Heading %d"),e),level:e})))},s=function(e){if(!e)return[];const t=[];return Am.forEach((n=>{const s=e[n.type],i=Array.isArray(s)?s.find((e=>e.slug===n.origin)):void 0;if(i?.[n.type]){const e={name:n.slug,title:n.title,category:"colors"};"duotones"===n.type?(e.content=(0,a.jsx)(zm,{duotones:i[n.type]}),t.push(e)):(e.content=(0,a.jsx)(Lm,{colors:i[n.type],type:n.type}),t.push(e))}})),t}(e),i=function(e){const t=[],n=Array.isArray(e?.colors)?e.colors.find((e=>"theme"===e.slug)):void 0;if(n){const e={name:"theme-colors",title:(0,w.__)("Colors"),category:"overview",content:(0,a.jsx)(Lm,{colors:n.colors,type:"colors",templateColumns:"repeat(auto-fill, minmax( 200px, 1fr ))",itemHeight:"32px"})};t.push(e)}const s=[];if((0,o.getBlockType)("core/heading")){const e=(0,o.createBlock)("core/heading",{content:(0,w.__)("AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz0123456789X{(…)},.-<>?!*&:/A@HELFO™©"),level:1});s.push(e)}if((0,o.getBlockType)("core/paragraph")){const e=(0,o.createBlock)("core/paragraph",{content:(0,w.__)("A paragraph in a website refers to a distinct block of text that is used to present and organize information. It is a fundamental unit of content in web design and is typically composed of a group of related sentences or thoughts focused on a particular topic or idea. Paragraphs play a crucial role in improving the readability and user experience of a website. They break down the text into smaller, manageable chunks, allowing readers to scan the content more easily.")}),t=(0,o.createBlock)("core/paragraph",{content:(0,w.__)("Additionally, paragraphs help structure the flow of information and provide logical breaks between different concepts or pieces of information. In terms of formatting, paragraphs in websites are commonly denoted by a vertical gap or indentation between each block of text. This visual separation helps visually distinguish one paragraph from another, creating a clear and organized layout that guides the reader through the content smoothly.")});if((0,o.getBlockType)("core/group")){const n=(0,o.createBlock)("core/group",{layout:{type:"grid",columnCount:2,minimumColumnWidth:"12rem"},style:{spacing:{blockGap:"1.5rem"}}},[e,t]);s.push(n)}else s.push(e)}return s.length&&t.push({name:"typography",title:(0,w.__)("Typography"),category:"overview",blocks:s}),["core/image","core/separator","core/buttons","core/pullquote","core/search"].forEach((e=>{const n=(0,o.getBlockType)(e);if(n&&n.example){const s={name:e,title:n.title,category:"overview",blocks:(0,o.getBlockFromExample)(e,{...n.example,attributes:{...n.example.attributes,style:void 0}})};t.push(s)}})),t}(e);return[n,...s,...t,...i]}function Gm({breadcrumbs:e,badges:t,title:n,subTitle:s,actions:i}){return(0,a.jsxs)(b.__experimentalVStack,{className:"admin-ui-page__header",as:"header",children:[(0,a.jsxs)(b.__experimentalHStack,{className:"admin-ui-page__header-title",justify:"space-between",spacing:2,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[n&&(0,a.jsx)(b.__experimentalHeading,{as:"h2",level:3,weight:500,truncate:!0,children:n}),e,t]}),(0,a.jsx)(b.__experimentalHStack,{style:{width:"auto",flexShrink:0},spacing:2,className:"admin-ui-page__header-actions",children:i})]}),s&&(0,a.jsx)("p",{className:"admin-ui-page__header-subtitle",children:s})]})}var Wm=function({breadcrumbs:e,badges:t,title:n,subTitle:s,children:i,className:r,actions:o,hasPadding:l=!1}){const c=Ht("admin-ui-page",r);return(0,a.jsxs)(Wt,{className:c,ariaLabel:n,children:[(n||e||t)&&(0,a.jsx)(Gm,{breadcrumbs:e,badges:t,title:n,subTitle:s,actions:o}),l?(0,a.jsx)("div",{className:"admin-ui-page__content has-padding",children:i}):i]})};const{useLocation:Um,useHistory:qm}=ne(Lt.privateApis),Zm=({isStyleBookOpened:e,setIsStyleBookOpened:t,path:n})=>{const s=qm(),i=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return!!i?._links?.["wp:action-edit-css"]}),[]);return(0,a.jsxs)(b.__experimentalHStack,{children:[(0,a.jsx)(b.Button,{isPressed:e,icon:Ao,label:(0,w.__)("Style Book"),onClick:()=>{t(!e);const i=e?(0,Qt.removeQueryArgs)(n,"preview"):(0,Qt.addQueryArgs)(n,{preview:"stylebook"});s.navigate(i)},size:"compact"}),i&&(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("More"),toggleProps:{size:"compact"},children:({onClose:e})=>(0,a.jsx)(b.MenuGroup,{children:i&&(0,a.jsx)(b.MenuItem,{onClick:()=>{e(),s.navigate((0,Qt.addQueryArgs)(n,{section:"/css"}))},children:(0,w.__)("Additional CSS")})})})]})},Ym=()=>{const{path:e,query:t}=Um(),n=qm();return(0,h.useMemo)((()=>[t.section??"/",t=>{n.navigate((0,Qt.addQueryArgs)(e,{section:t}))}]),[e,t.section,n])};function Km(){const{path:e}=Um(),[t,n]=(0,h.useState)(e.includes("preview=stylebook")),s=(0,y.useViewportMatch)("medium","<"),[i,r]=Ym();return(0,a.jsx)(Wm,{actions:s?null:(0,a.jsx)(Zm,{isStyleBookOpened:t,setIsStyleBookOpened:n,path:e}),className:"edit-site-styles",title:(0,w.__)("Styles"),children:(0,a.jsx)(Wg,{path:i,onPathChange:r})})}const{ExperimentalBlockEditorProvider:Xm,useGlobalStyle:Qm,GlobalStylesContext:Jm,useGlobalStylesOutputWithConfig:$m}=ne(x.privateApis),{mergeBaseAndUserConfigs:eg}=ne(f.privateApis),{Tabs:tg}=ne(b.privateApis);function ng(e){return!e||0===Object.keys(e).length}const sg=(e,t)=>{if(!e||!t||!t?.contentDocument)return;const n="top"===e?t.contentDocument.body:t.contentDocument.getElementById(e);n&&n.scrollIntoView({behavior:"smooth"})},ig=e=>e&&"string"==typeof e&&("/"===e||e.startsWith("/typography")||e.startsWith("/colors")||e.startsWith("/blocks"))?{top:!0}:null;function rg(){const{colors:e,gradients:t}=(0,x.__experimentalUseMultipleOriginColorsAndGradients)(),[n,s,i,r]=(0,x.useSettings)("color.defaultDuotone","color.duotone.custom","color.duotone.theme","color.duotone.default");return(0,h.useMemo)((()=>{const a={colors:e,gradients:t,duotones:[]};return i&&i.length&&a.duotones.push({name:(0,w._x)("Theme","Indicates these duotone filters come from the theme."),slug:"theme",duotones:i}),n&&r&&r.length&&a.duotones.push({name:(0,w._x)("Default","Indicates these duotone filters come from WordPress."),slug:"default",duotones:r}),s&&s.length&&a.duotones.push({name:(0,w._x)("Custom","Indicates these doutone filters are created by the user."),slug:"custom",duotones:s}),a}),[e,t,s,i,r,n])}function ag(e){const t=[],n=Dm({slug:"overview"},e);t.push(...n.examples);const s=e.filter((e=>"overview"!==e.category&&!n.examples.find((t=>t.name===e.name))));return t.push(...s),t}function og(e,t){return t?e.map((e=>({...e,variation:t,blocks:Array.isArray(e.blocks)?e.blocks.map((e=>({...e,attributes:{...e.attributes,style:void 0,className:Jo(t)}}))):{...e.blocks,attributes:{...e.blocks.attributes,style:void 0,className:Jo(t)}}}))):e}const lg=({userConfig:e={},isStatic:t=!1})=>{const n=(0,c.useSelect)((e=>e(Rt).getSettings()),[]),s=(0,c.useSelect)((e=>e(j.store).canUser("create",{kind:"postType",name:"attachment"})),[]);(0,h.useEffect)((()=>{(0,c.dispatch)(x.store).updateSettings({...n,mediaUpload:s?Om.uploadMedia:void 0})}),[n,s]);const[i,r]=Ym(),o=Hm(rg()),l=ag(o);let u=null,d=null;if(i.includes("/colors"))u="colors";else if(i.includes("/typography"))u="text";else if(i.includes("/blocks")){u="blocks";let e=decodeURIComponent(i).split("/blocks/")[1];e?.includes("/variations")&&([e,d]=e.split("/variations/")),e&&o.find((t=>t.name===e))&&(u=e)}else t||(u="overview");const p=Bm.find((e=>e.slug===u)),f=(0,h.useMemo)((()=>p?Dm(p,o):{examples:[o.find((e=>e.name===u))]}),[p,o,u]),m=(0,h.useMemo)((()=>u?d?{examples:og(f.examples,d)}:f:{examples:l}),[u,l,d,f]),{base:g}=(0,h.useContext)(Jm),v=ig(i),y=(0,h.useMemo)((()=>ng(e)||ng(g)?{}:eg(g,e)),[g,e]),[b]=$m(y),w=(0,h.useMemo)((()=>({...n,styles:ng(b)||ng(e)?n.styles:b,isPreviewMode:!0})),[b,n,e]);return(0,a.jsx)("div",{className:"edit-site-style-book",children:(0,a.jsxs)(x.BlockEditorProvider,{settings:w,children:[(0,a.jsx)(wo,{disableRootPadding:!0}),(0,a.jsx)(cg,{examples:m,settings:w,goTo:v,isSelected:t?null:e=>i===`/blocks/${encodeURIComponent(e)}`||i.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t?null:(e,t=!1)=>{Am.find((t=>t.slug===e))?r("/colors/palette"):"typography"!==e?t||r(`/blocks/${encodeURIComponent(e)}`):r("/typography")}})]})})},cg=({examples:e,isSelected:t,onClick:n,onSelect:s,settings:i,title:r,goTo:o})=>{const[l,c]=(0,h.useState)(!1),[u,d]=(0,h.useState)(!1),p=(0,h.useRef)(null),f={role:"button",onFocus:()=>c(!0),onBlur:()=>c(!1),onKeyDown:e=>{if(e.defaultPrevented)return;const{keyCode:t}=e;!n||t!==Xt.ENTER&&t!==Xt.SPACE||(e.preventDefault(),n(e))},onClick:e=>{e.defaultPrevented||n&&(e.preventDefault(),n(e))},readonly:!0};return(0,h.useLayoutEffect)((()=>{u&&p?.current&&o?.top&&sg("top",p?.current)}),[p?.current,o,sg,u]),(0,a.jsxs)(x.__unstableIframe,{onLoad:()=>d(!0),ref:p,className:Ht("edit-site-style-book__iframe",{"is-focused":l&&!!n,"is-button":!!n}),name:"style-book-canvas",tabIndex:0,...n?f:{},children:[(0,a.jsx)(x.__unstableEditorStyles,{styles:i.styles}),(0,a.jsxs)("style",{children:['\n\tbody {\n\t\tposition: relative;\n\t\tpadding: 32px !important;\n\t}\n\n\t\n\t.is-root-container {\n\t\tdisplay: flow-root;\n\t}\n\n\n\t.edit-site-style-book__examples {\n\t\tmax-width: 1200px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t max-width: 900px;\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t\tmargin: 0 auto 40px auto;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example.is-disabled-example {\n\t\tpointer-events: none;\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__duotone-example > div:first-child {\n\t\tdisplay: flex;\n\t\taspect-ratio: 16 / 9;\n\t\tgrid-row: span 1;\n\t\tgrid-column: span 2;\n\t}\n\t.edit-site-style-book__duotone-example img {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-fit: cover;\n\t}\n\t.edit-site-style-book__duotone-example > div:not(:first-child) {\n\t\theight: 20px;\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__color-example {\n\t\tborder: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title,\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\tfont-size: 13px;\n\t\tfont-weight: normal;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tpadding-top: 8px;\n\t\tborder-top: 1px solid color-mix( in srgb, currentColor 10%, transparent );\n\t\tcolor: color-mix( in srgb, currentColor 60%, transparent );\n\t}\n\n\t.edit-site-style-book__subcategory-title {\n\t\tfont-size: 16px;\n\t\tmargin-bottom: 40px;\n \tpadding-bottom: 8px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\t:where(.is-root-container > .wp-block:first-child) {\n\t\tmargin-top: 0;\n\t}\n\t:where(.is-root-container > .wp-block:last-child) {\n\t\tmargin-bottom: 0;\n\t}\n',!!n&&"body { cursor: pointer; } body * { pointer-events: none; }"]}),(0,a.jsx)(ug,{className:"edit-site-style-book__examples",filteredExamples:e,label:r?(0,w.sprintf)((0,w.__)("Examples of blocks in the %s category"),r):(0,w.__)("Examples of blocks"),isSelected:t,onSelect:s},r)]})},ug=(0,h.memo)((({className:e,filteredExamples:t,label:n,isSelected:s,onSelect:i})=>(0,a.jsxs)(b.Composite,{orientation:"vertical",className:e,"aria-label":n,role:"grid",children:[!!t?.examples?.length&&t.examples.map((e=>(0,a.jsx)(pg,{id:`example-${e.name}`,title:e.title,content:e.content,blocks:e.blocks,isSelected:s?.(e.name),onClick:i?()=>i(e.name,!!e.variation):null},e.name))),!!t?.subcategories?.length&&t.subcategories.map((e=>(0,a.jsxs)(b.Composite.Group,{className:"edit-site-style-book__subcategory",children:[(0,a.jsx)(b.Composite.GroupLabel,{children:(0,a.jsx)("h2",{className:"edit-site-style-book__subcategory-title",children:e.title})}),(0,a.jsx)(dg,{examples:e.examples,isSelected:s,onSelect:i})]},`subcategory-${e.slug}`)))]}))),dg=({examples:e,isSelected:t,onSelect:n})=>!!e?.length&&e.map((e=>(0,a.jsx)(pg,{id:`example-${e.name}`,title:e.title,content:e.content,blocks:e.blocks,isSelected:t?.(e.name),onClick:n?()=>n(e.name):null},e.name))),hg=["example-duotones"],pg=({id:e,title:t,blocks:n,isSelected:s,onClick:i,content:r})=>{const o=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),l=(0,h.useMemo)((()=>({...o,focusMode:!1,isPreviewMode:!0})),[o]),u=(0,h.useMemo)((()=>Array.isArray(n)?n:[n]),[n]),d=hg.includes(e)||!i?{disabled:!0,accessibleWhenDisabled:!!i}:{};return(0,a.jsx)("div",{role:"row",children:(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsxs)(b.Composite.Item,{className:Ht("edit-site-style-book__example",{"is-selected":s,"is-disabled-example":!!d?.disabled}),id:e,"aria-label":i?(0,w.sprintf)((0,w.__)("Open %s styles in Styles panel"),t):void 0,render:(0,a.jsx)("div",{}),role:i?"button":null,onClick:i,...d,children:[(0,a.jsx)("span",{className:"edit-site-style-book__example-title",children:t}),(0,a.jsx)("div",{className:"edit-site-style-book__example-preview","aria-hidden":!0,children:(0,a.jsx)(b.Disabled,{className:"edit-site-style-book__example-preview__content",children:r||(0,a.jsxs)(Xm,{value:u,settings:l,children:[(0,a.jsx)(x.__unstableEditorStyles,{}),(0,a.jsx)(x.BlockList,{renderAppender:!1})]})})})]})})})};var fg=function({enableResizing:e=!0,isSelected:t,onClick:n,onSelect:s,showCloseButton:i=!0,onClose:r,showTabs:o=!0,userConfig:l={},path:u=""}){const[d]=Qm("color.text"),[p]=Qm("color.background"),f=rg(),m=(0,h.useMemo)((()=>Hm(f)),[f]),g=(0,h.useMemo)((()=>Rm().filter((e=>m.some((t=>t.category===e.slug))))),[m]),v=ag(m),{base:y}=(0,h.useContext)(Jm),b=ig(u),_=(0,h.useMemo)((()=>ng(l)||ng(y)?{}:eg(y,l)),[y,l]),j=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),[S]=$m(_),C=(0,h.useMemo)((()=>({...j,styles:ng(S)||ng(l)?j.styles:S,isPreviewMode:!0})),[S,j,l]);return(0,a.jsx)(Oa,{onClose:r,enableResizing:e,closeButtonLabel:i?(0,w.__)("Close"):null,children:(0,a.jsx)("div",{className:Ht("edit-site-style-book",{"is-button":!!n}),style:{color:d,background:p},children:o?(0,a.jsxs)(tg,{children:[(0,a.jsx)("div",{className:"edit-site-style-book__tablist-container",children:(0,a.jsx)(tg.TabList,{children:g.map((e=>(0,a.jsx)(tg.Tab,{tabId:e.slug,children:e.title},e.slug)))})}),g.map((e=>{const n=e.slug?Rm().find((t=>t.slug===e.slug)):null,i=n?Dm(n,m):{examples:m};return(0,a.jsx)(tg.TabPanel,{tabId:e.slug,focusable:!1,className:"edit-site-style-book__tabpanel",children:(0,a.jsx)(cg,{category:e.slug,examples:i,isSelected:t,onSelect:s,settings:C,title:e.title,goTo:b})},e.slug)}))]}):(0,a.jsx)(cg,{examples:{examples:v},isSelected:t,onClick:n,onSelect:s,settings:C,goTo:b})})})};const{useGlobalStyle:mg,AdvancedPanel:gg}=ne(x.privateApis);var vg=function(){const[e]=mg("",void 0,"user",{shouldDecodeEncode:!1}),[t,n]=mg("",void 0,"all",{shouldDecodeEncode:!1}),{setEditorCanvasContainerView:s}=ne((0,c.useDispatch)(Rt));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:(0,w.__)("Additional CSS"),description:(0,a.jsxs)(a.Fragment,{children:[(0,w.__)("You can add custom CSS to further customize the appearance and layout of your site."),(0,a.jsx)("br",{}),(0,a.jsx)(b.ExternalLink,{href:(0,w.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),className:"edit-site-global-styles-screen-css-help-link",children:(0,w.__)("Learn more about CSS")})]}),onBack:()=>{s(void 0)}}),(0,a.jsx)("div",{className:"edit-site-global-styles-screen-css",children:(0,a.jsx)(gg,{value:e,onChange:n,inheritedValue:t})})]})};const{ExperimentalBlockEditorProvider:yg,GlobalStylesContext:xg,useGlobalStylesOutputWithConfig:bg,__unstableBlockStyleVariationOverridesWithConfig:wg}=ne(x.privateApis),{mergeBaseAndUserConfigs:_g}=ne(f.privateApis);function jg(e){return!e||0===Object.keys(e).length}var Sg=function({userConfig:e,blocks:t}){const{base:n}=(0,h.useContext)(xg),s=(0,h.useMemo)((()=>jg(e)||jg(n)?{}:_g(n,e)),[n,e]),i=(0,h.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),r=(0,c.useSelect)((e=>e(x.store).getSettings()),[]),o=(0,h.useMemo)((()=>({...r,isPreviewMode:!0})),[r]),[l]=bg(s),u=jg(l)||jg(e)?o.styles:l;return(0,a.jsx)(Oa,{title:(0,w.__)("Revisions"),closeButtonLabel:(0,w.__)("Close revisions"),enableResizing:!0,children:(0,a.jsxs)(x.__unstableIframe,{className:"edit-site-revisions__iframe",name:"revisions",tabIndex:0,children:[(0,a.jsx)("style",{children:".is-root-container { display: flow-root; }"}),(0,a.jsx)(b.Disabled,{className:"edit-site-revisions__example-preview__content",children:(0,a.jsxs)(yg,{value:i,settings:o,children:[(0,a.jsx)(x.BlockList,{renderAppender:!1}),(0,a.jsx)(x.__unstableEditorStyles,{styles:u}),(0,a.jsx)(wg,{config:s})]})})]})})};const Cg=window.wp.date,{getGlobalStylesChanges:kg}=ne(x.privateApis);function Eg({revision:e,previousRevision:t}){const n=kg(e,t,{maxResults:7});return n.length?(0,a.jsx)("ul",{"data-testid":"global-styles-revision-changes",className:"edit-site-global-styles-screen-revisions__changes",children:n.map((e=>(0,a.jsx)("li",{children:e},e)))}):null}var Pg=function({userRevisions:e,selectedRevisionId:t,onChange:n,canApplyRevision:s,onApplyRevision:i}){const{currentThemeName:r,currentUser:o}=(0,c.useSelect)((e=>{const{getCurrentTheme:t,getCurrentUser:n}=e(j.store),s=t();return{currentThemeName:s?.name?.rendered||s?.stylesheet,currentUser:n()}}),[]),l=(0,Cg.getDate)().getTime(),{datetimeAbbreviated:u}=(0,Cg.getSettings)().formats;return(0,a.jsx)(b.Composite,{orientation:"vertical",className:"edit-site-global-styles-screen-revisions__revisions-list","aria-label":(0,w.__)("Global styles revisions list"),role:"listbox",children:e.map(((c,d)=>{const{id:h,author:p,modified:f}=c,m="unsaved"===h,g=m?o:p,v=g?.name||(0,w.__)("User"),y=g?.avatar_urls?.[48],x=t?t===h:0===d,_=!s&&x,j="parent"===h,S=(0,Cg.getDate)(f),C=f&&l-S.getTime()>864e5?(0,Cg.dateI18n)(u,S):(0,Cg.humanTimeDiff)(f),k=function(e,t,n,s){return"parent"===e?(0,w.__)("Reset the styles to the theme defaults"):"unsaved"===e?(0,w.sprintf)((0,w.__)("Unsaved changes by %s"),t):s?(0,w.sprintf)((0,w.__)("Changes saved by %1$s on %2$s. This revision matches current editor styles."),t,n):(0,w.sprintf)((0,w.__)("Changes saved by %1$s on %2$s"),t,n)}(h,v,(0,Cg.dateI18n)(u,S),_);return(0,a.jsxs)(b.Composite.Item,{className:"edit-site-global-styles-screen-revisions__revision-item","aria-current":x,role:"option",onKeyDown:e=>{const{keyCode:t}=e;t!==Xt.ENTER&&t!==Xt.SPACE||n(c)},onClick:e=>{e.preventDefault(),n(c)},"aria-selected":x,"aria-label":k,render:(0,a.jsx)("div",{}),children:[(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__revision-item-wrapper",children:j?(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[(0,w.__)("Default styles"),(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:r})]}):(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__description",children:[m?(0,a.jsx)("span",{className:"edit-site-global-styles-screen-revisions__date",children:(0,w.__)("(Unsaved)")}):(0,a.jsx)("time",{className:"edit-site-global-styles-screen-revisions__date",dateTime:f,children:C}),(0,a.jsxs)("span",{className:"edit-site-global-styles-screen-revisions__meta",children:[(0,a.jsx)("img",{alt:v,src:y}),v]}),x&&(0,a.jsx)(Eg,{revision:c,previousRevision:d<e.length?e[d+1]:{}})]})}),x&&(_?(0,a.jsx)("p",{className:"edit-site-global-styles-screen-revisions__applied-text",children:(0,w.__)("These styles are already applied to your site.")}):(0,a.jsx)(b.Button,{size:"compact",variant:"primary",className:"edit-site-global-styles-screen-revisions__apply-button",onClick:i,"aria-label":(0,w.__)("Apply the selected revision to your site."),children:j?(0,w.__)("Reset to defaults"):(0,w.__)("Apply")}))]},h)}))})};function Ig({currentPage:e,numPages:t,changePage:n,totalItems:s,className:i,disabled:r=!1,buttonVariant:o="tertiary",label:l=(0,w.__)("Pagination")}){return(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,as:"nav","aria-label":l,spacing:3,justify:"flex-start",className:Ht("edit-site-pagination",i),children:[(0,a.jsx)(b.__experimentalText,{variant:"muted",className:"edit-site-pagination__total",children:(0,w.sprintf)((0,w._n)("%s item","%s items",s),s)}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,w.__)("First page"),icon:(0,w.isRTL)()?$c:eu,size:"compact"}),(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(e-1),accessibleWhenDisabled:!0,disabled:r||1===e,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?La:za,size:"compact"})]}),(0,a.jsx)(b.__experimentalText,{variant:"muted",children:(0,w.sprintf)((0,w._x)("%1$s of %2$s","paging"),e,t)}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(e+1),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?za:La,size:"compact"}),(0,a.jsx)(b.Button,{variant:o,onClick:()=>n(t),accessibleWhenDisabled:!0,disabled:r||e===t,label:(0,w.__)("Last page"),icon:(0,w.isRTL)()?eu:$c,size:"compact"})]})]})}const{GlobalStylesContext:Vg,areGlobalStyleConfigsEqual:Tg}=ne(x.privateApis);var Og=function(){const{user:e,setUserConfig:t}=(0,h.useContext)(Vg),{blocks:n,editorCanvasContainerView:s}=(0,c.useSelect)((e=>({editorCanvasContainerView:ne(e(Rt)).getEditorCanvasContainerView(),blocks:e(x.store).getBlocks()})),[]),[i,r]=(0,h.useState)(1),[o,l]=(0,h.useState)([]),{revisions:u,isLoading:d,hasUnsavedChanges:p,revisionsCount:f}=no({query:{per_page:10,page:i}}),m=Math.ceil(f/10),[g,v]=(0,h.useState)(e),[y,_]=(0,h.useState)(!1),{setEditorCanvasContainerView:j}=ne((0,c.useDispatch)(Rt)),S=Tg(g,e),C=()=>{j("global-styles-revisions:style-book"===s?"style-book":void 0)},k=e=>{t((()=>e)),_(!1),C()};(0,h.useEffect)((()=>{!d&&u.length&&l(u)}),[u,d]);const E=u[0],P=g?.id,I=!!E?.id&&!S&&!P;(0,h.useEffect)((()=>{I&&v(E)}),[I,E]);const V=!!P&&"unsaved"!==P&&!S,T=!!o.length;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(xl,{title:f&&(0,w.sprintf)((0,w.__)("Revisions (%s)"),f),description:(0,w.__)('Click on previously saved styles to preview them. To restore a selected version to the editor, hit "Apply." When you\'re ready, use the Save button to save your changes.'),onBack:C}),!T&&(0,a.jsx)(b.Spinner,{className:"edit-site-global-styles-screen-revisions__loading"}),T&&("global-styles-revisions:style-book"===s?(0,a.jsx)(fg,{userConfig:g,isSelected:()=>{},onClose:()=>{j("global-styles-revisions")}}):(0,a.jsx)(Sg,{blocks:n,userConfig:g,closeButtonLabel:(0,w.__)("Close revisions")})),(0,a.jsx)(Pg,{onChange:v,selectedRevisionId:P,userRevisions:o,canApplyRevision:V,onApplyRevision:()=>p?_(!0):k(g)}),m>1&&(0,a.jsx)("div",{className:"edit-site-global-styles-screen-revisions__footer",children:(0,a.jsx)(Ig,{className:"edit-site-global-styles-screen-revisions__pagination",currentPage:i,numPages:m,changePage:r,totalItems:f,disabled:d,label:(0,w.__)("Global Styles pagination")})}),y&&(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:y,confirmButtonText:(0,w.__)("Apply"),onConfirm:()=>k(g),onCancel:()=>_(!1),size:"medium",children:(0,w.__)("Are you sure you want to apply this revision? Any unsaved changes will be lost.")})]})};const{useGlobalStylesReset:Ag}=ne(x.privateApis),{Slot:Ng,Fill:Fg}=(0,b.createSlotFill)("GlobalStylesMenu");function Mg(){const[e,t]=Ag(),{toggle:n}=(0,c.useDispatch)(m.store),{canEditCSS:s}=(0,c.useSelect)((e=>{const{getEntityRecord:t,__experimentalGetCurrentGlobalStylesId:n}=e(j.store),s=n(),i=s?t("root","globalStyles",s):void 0;return{canEditCSS:!!i?._links?.["wp:action-edit-css"]}}),[]),{setEditorCanvasContainerView:i}=ne((0,c.useDispatch)(Rt)),r=()=>{i("global-styles-css")};return(0,a.jsx)(Fg,{children:(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("More"),toggleProps:{size:"compact"},children:({onClose:i})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.MenuGroup,{children:[s&&(0,a.jsx)(b.MenuItem,{onClick:r,children:(0,w.__)("Additional CSS")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{n("core/edit-site","welcomeGuideStyles"),i()},children:(0,w.__)("Welcome Guide")})]}),(0,a.jsx)(b.MenuGroup,{children:(0,a.jsx)(b.MenuItem,{onClick:()=>{t(),i()},disabled:!e,children:(0,w.__)("Reset styles")})})]})})})}function Bg({className:e,...t}){return(0,a.jsx)(b.Navigator.Screen,{className:["edit-site-global-styles-sidebar__navigator-screen",e].filter(Boolean).join(" "),...t})}function Dg({parentMenu:e,blockStyles:t,blockName:n}){return t.map(((t,s)=>(0,a.jsx)(Bg,{path:e+"/variations/"+t.name,children:(0,a.jsx)(Jl,{name:n,variation:t.name})},s)))}function Rg({name:e,parentMenu:t=""}){const n=(0,c.useSelect)((t=>{const{getBlockStyles:n}=t(o.store);return n(e)}),[e]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Bg,{path:t+"/colors/palette",children:(0,a.jsx)(Hf,{name:e})}),!!n?.length&&(0,a.jsx)(Dg,{parentMenu:t,blockStyles:n,blockName:e})]})}function Lg(){const e=(0,b.useNavigator)(),{path:t}=e.location;return(0,a.jsx)(fg,{isSelected:e=>t===`/blocks/${encodeURIComponent(e)}`||t.startsWith(`/blocks/${encodeURIComponent(e)}/`),onSelect:t=>{Am.find((e=>e.slug===t))?e.goTo("/colors/palette"):"typography"!==t?e.goTo("/blocks/"+encodeURIComponent(t)):e.goTo("/typography")}})}function zg(){const e=(0,b.useNavigator)(),{selectedBlockName:t,selectedBlockClientId:n}=(0,c.useSelect)((e=>{const{getSelectedBlockClientId:t,getBlockName:n}=e(x.store),s=t();return{selectedBlockName:n(s),selectedBlockClientId:s}}),[]),s=kl(t);(0,h.useEffect)((()=>{if(!n||!s)return;const i=e.location.path;if("/blocks"!==i&&!i.startsWith("/blocks/"))return;const r="/blocks/"+encodeURIComponent(t);r!==i&&e.goTo(r,{skipFocus:!0})}),[n,t,s])}function Hg(){const{goTo:e,location:t}=(0,b.useNavigator)(),n=(0,c.useSelect)((e=>ne(e(Rt)).getEditorCanvasContainerView()),[]),s=t?.path,i="/revisions"===s;(0,h.useEffect)((()=>{switch(n){case"global-styles-revisions":case"global-styles-revisions:style-book":i||e("/revisions");break;case"global-styles-css":e("/css");break;default:i&&e("/",{isBack:!0})}}),[n,i,e])}function Gg({path:e,onPathChange:t,children:n}){return function(e,t){const n=(0,b.useNavigator)(),{path:s}=n.location,i=(0,y.usePrevious)(e),r=(0,y.usePrevious)(s);(0,h.useEffect)((()=>{e!==s&&(e!==i?n.goTo(e):s!==r&&t(s))}),[t,e,r,i,s,n])}(e,t),n}var Wg=function({path:e,onPathChange:t}){const n=(0,o.getBlockTypes)(),s=(0,c.useSelect)((e=>ne(e(Rt)).getEditorCanvasContainerView()),[]);return(0,a.jsxs)(b.Navigator,{className:"edit-site-global-styles-sidebar__navigator-provider",initialPath:"/",children:[e&&t&&(0,a.jsx)(Gg,{path:e,onPathChange:t}),(0,a.jsx)(Bg,{path:"/",children:(0,a.jsx)(fl,{})}),(0,a.jsx)(Bg,{path:"/variations",children:(0,a.jsx)(Tm,{})}),(0,a.jsx)(Bg,{path:"/blocks",children:(0,a.jsx)(Il,{})}),(0,a.jsx)(Bg,{path:"/typography",children:(0,a.jsx)(Yp,{})}),(0,a.jsx)(Bg,{path:"/typography/font-sizes",children:(0,a.jsx)(xf,{})}),(0,a.jsx)(Bg,{path:"/typography/font-sizes/:origin/:slug",children:(0,a.jsx)(pf,{})}),(0,a.jsx)(Bg,{path:"/typography/text",children:(0,a.jsx)(sf,{element:"text"})}),(0,a.jsx)(Bg,{path:"/typography/link",children:(0,a.jsx)(sf,{element:"link"})}),(0,a.jsx)(Bg,{path:"/typography/heading",children:(0,a.jsx)(sf,{element:"heading"})}),(0,a.jsx)(Bg,{path:"/typography/caption",children:(0,a.jsx)(sf,{element:"caption"})}),(0,a.jsx)(Bg,{path:"/typography/button",children:(0,a.jsx)(sf,{element:"button"})}),(0,a.jsx)(Bg,{path:"/colors",children:(0,a.jsx)(Pf,{})}),(0,a.jsx)(Bg,{path:"/shadows",children:(0,a.jsx)(mm,{})}),(0,a.jsx)(Bg,{path:"/shadows/edit/:category/:slug",children:(0,a.jsx)(gm,{})}),(0,a.jsx)(Bg,{path:"/layout",children:(0,a.jsx)(km,{})}),(0,a.jsx)(Bg,{path:"/css",children:(0,a.jsx)(vg,{})}),(0,a.jsx)(Bg,{path:"/revisions",children:(0,a.jsx)(Og,{})}),(0,a.jsx)(Bg,{path:"/background",children:(0,a.jsx)(Xf,{})}),n.map((e=>(0,a.jsx)(Bg,{path:"/blocks/"+encodeURIComponent(e.name),children:(0,a.jsx)(Jl,{name:e.name})},"menu-block-"+e.name))),(0,a.jsx)(Rg,{}),n.map((e=>(0,a.jsx)(Rg,{name:e.name,parentMenu:"/blocks/"+encodeURIComponent(e.name)},"screens-block-"+e.name))),"style-book"===s&&(0,a.jsx)(Lg,{}),(0,a.jsx)(Mg,{}),(0,a.jsx)(zg,{}),(0,a.jsx)(Hg,{})]})};const{ComplementaryArea:Ug,ComplementaryAreaMoreMenuItem:qg}=ne(f.privateApis);function Zg({className:e,identifier:t,title:n,icon:s,children:i,closeLabel:r,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ug,{className:e,scope:"core",identifier:t,title:n,icon:s,closeLabel:r,header:o,headerClassName:l,panelClassName:c,isActiveByDefault:u,children:i}),(0,a.jsx)(qg,{scope:"core",identifier:t,icon:s,children:n})]})}const{interfaceStore:Yg}=ne(f.privateApis),{useLocation:Kg}=ne(Lt.privateApis);function Xg(){const{query:e}=Kg(),{canvas:t="view",name:n}=e,{shouldClearCanvasContainerView:s,isStyleBookOpened:i,showListViewByDefault:r,hasRevisions:o,isRevisionsOpened:l,isRevisionsStyleBookOpened:u}=(0,c.useSelect)((e=>{const{getActiveComplementaryArea:n}=e(Yg),{getEditorCanvasContainerView:s}=ne(e(Rt)),i=s(),r="visual"===e(f.store).getEditorMode(),a="edit"===t,o=e(m.store).get("core","showListViewByDefault"),{getEntityRecord:l,__experimentalGetCurrentGlobalStylesId:c}=e(j.store),u=c(),d=u?l("root","globalStyles",u):void 0;return{isStyleBookOpened:"style-book"===i,shouldClearCanvasContainerView:"edit-site/global-styles"!==n("core")||!r||!a,showListViewByDefault:o,hasRevisions:!!d?._links?.["version-history"]?.[0]?.count,isRevisionsStyleBookOpened:"global-styles-revisions:style-book"===i,isRevisionsOpened:"global-styles-revisions"===i}}),[t]),{setEditorCanvasContainerView:d}=ne((0,c.useDispatch)(Rt)),p=(0,y.useViewportMatch)("medium","<");(0,h.useEffect)((()=>{s&&d(void 0)}),[s,d]);const{setIsListViewOpened:g}=(0,c.useDispatch)(f.store),{getActiveComplementaryArea:v}=(0,c.useSelect)(Yg),{enableComplementaryArea:x}=(0,c.useDispatch)(Yg),_=(0,h.useRef)(null);return(0,h.useEffect)((()=>{"styles"===n&&"edit"===t?(_.current=v("core"),x("core","edit-site/global-styles")):_.current&&x("core",_.current)}),[n,x,t,v]),(0,a.jsx)(Zg,{className:"edit-site-global-styles-sidebar",identifier:"edit-site/global-styles",title:(0,w.__)("Styles"),icon:Fa,closeLabel:(0,w.__)("Close Styles"),panelClassName:"edit-site-global-styles-sidebar__panel",header:(0,a.jsxs)(b.Flex,{className:"edit-site-global-styles-sidebar__header",gap:1,children:[(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)("h2",{className:"edit-site-global-styles-sidebar__header-title",children:(0,w.__)("Styles")})}),(0,a.jsxs)(b.Flex,{justify:"flex-end",gap:1,className:"edit-site-global-styles-sidebar__header-actions",children:[!p&&(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{icon:Ao,label:(0,w.__)("Style Book"),isPressed:i||u,accessibleWhenDisabled:!0,disabled:s,onClick:()=>{l?d("global-styles-revisions:style-book"):u?d("global-styles-revisions"):(g(i&&r),d(i?void 0:"style-book"))},size:"compact"})}),(0,a.jsx)(b.FlexItem,{children:(0,a.jsx)(b.Button,{label:(0,w.__)("Revisions"),icon:ba,onClick:()=>{g(!1),d(u?"style-book":l?void 0:i?"global-styles-revisions:style-book":"global-styles-revisions")},accessibleWhenDisabled:!0,disabled:!o,isPressed:l||u,size:"compact"})}),(0,a.jsx)(Ng,{})]})]}),children:(0,a.jsx)(Wg,{})})}var Qg=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});const Jg=window.wp.blob;function $g(){const e=(0,c.useSelect)((e=>{const t=e(j.store).getCurrentTheme()?._links?.["wp:export-theme"]?.[0]?.targetHints??{};return!!t.allow?.includes("GET")}),[]),{createErrorNotice:t}=(0,c.useDispatch)(_.store);if(!e)return null;return(0,a.jsx)(b.MenuItem,{role:"menuitem",icon:Qg,onClick:async function(){try{const e=await ra()({path:"/wp-block-editor/v1/export",parse:!1,headers:{Accept:"application/zip"}}),t=await e.blob(),n=e.headers.get("content-disposition").match(/=(.+)\.zip/),s=n[1]?n[1]:"edit-site-export";(0,Jg.downloadBlob)(s+".zip",t,"application/zip")}catch(e){let n={};try{n=await e.json()}catch(e){}const s=n.message&&"unknown_error"!==n.code?n.message:(0,w.__)("An error occurred while creating the site export.");t(s,{type:"snackbar"})}},info:(0,w.__)("Download your theme with updated templates and styles."),children:(0,w._x)("Export","site exporter menu item")})}function ev(){const{toggle:e}=(0,c.useDispatch)(m.store);return(0,a.jsx)(b.MenuItem,{onClick:()=>e("core/edit-site","welcomeGuide"),children:(0,w.__)("Welcome Guide")})}const{ToolsMoreMenuGroup:tv,PreferencesModal:nv}=ne(f.privateApis);function sv(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(tv,{children:[(0,a.jsx)($g,{}),(0,a.jsx)(ev,{})]}),(0,a.jsx)(nv,{})]})}const{useLocation:iv,useHistory:rv}=ne(Lt.privateApis);const{useLocation:av}=ne(Lt.privateApis);const{getTemplateInfo:ov}=ne(f.privateApis);var lv=function(e,t){const{title:n,isLoaded:s}=(0,c.useSelect)((n=>{const{getEditedEntityRecord:s,getCurrentTheme:i,hasFinishedResolution:r}=n(j.store);if(!t)return{isLoaded:!1};const a=s("postType",e,t),{default_template_types:o=[]}=i()??{},l=ov({template:a,templateTypes:o}),c=r("getEditedEntityRecord",["postType",e,t]);return{title:l.title,isLoaded:c}}),[e,t]);let i;s&&(i=(0,w.sprintf)((0,w._x)("%1$s ‹ %2$s","breadcrumb trail"),(0,qt.decodeEntities)(n),Fe[e]??Fe[Se])),function(e){const t=av(),n=(0,c.useSelect)((e=>e(j.store).getEntityRecord("root","site")?.title),[]),s=(0,h.useRef)(!0);(0,h.useEffect)((()=>{s.current=!1}),[t]),(0,h.useEffect)((()=>{if(!s.current&&e&&n){const t=(0,w.sprintf)((0,w.__)("%1$s ‹ %2$s ‹ Editor — WordPress"),(0,qt.decodeEntities)(e),(0,qt.decodeEntities)(n));document.title=t,(0,ml.speak)(e,"assertive")}}),[e,n,t])}(s&&i)};const{useLocation:cv}=ne(Lt.privateApis),uv=[Se,Ce,je,Ie.user],dv=["page","post"];function hv(){const{name:e,params:t={},query:n}=cv(),{postId:s=n?.postId}=t,i=function(e){let t;return"navigation-item"===e?t=je:"pattern-item"===e?t=Ie.user:"template-part-item"===e?t=Ce:"templates"===e||"template-item"===e?t=Se:"page-item"===e||"pages"===e?t="page":"post-item"!==e&&"posts"!==e||(t="post"),t}(e)??n?.postType,r=(0,c.useSelect)((e=>{const{getHomePage:t}=ne(e(j.store));return t()}),[]),a=(0,c.useSelect)((e=>{if(uv.includes(i)&&s)return;if(s&&s.includes(","))return;const{getTemplateId:t}=ne(e(j.store));return i&&s&&dv.includes(i)?t(i,s):"page"===r?.postType?t("page",r?.postId):"wp_template"===r?.postType?r?.postId:void 0}),[r,s,i]),o=(0,h.useMemo)((()=>uv.includes(i)&&s?{}:i&&s&&dv.includes(i)?{postType:i,postId:s}:"page"===r?.postType?{postType:"page",postId:r?.postId}:{}),[r,i,s]);return uv.includes(i)&&s?{isReady:!0,postType:i,postId:s,context:o}:r?{isReady:void 0!==a,postType:Se,postId:a,context:o}:{isReady:!1}}function pv(){const e=(0,c.useSelect)((e=>{const{getEntityRecord:t}=e(j.store),n=t("root","__unstableBase");return n?.home}),[]);return(0,a.jsx)("iframe",{src:(0,Qt.addQueryArgs)(e,{wp_site_preview:1}),title:(0,w.__)("Site Preview"),style:{display:"block",width:"100%",height:"100%",backgroundColor:"#fff"},onLoad:e=>{const t=e.target.contentDocument;en.focus.focusable.find(t).forEach((e=>{e.style.pointerEvents="none",e.tabIndex=-1,e.setAttribute("aria-hidden","true")}))}})}const{Editor:fv,BackButton:mv}=ne(f.privateApis),{useHistory:gv,useLocation:vv}=ne(Lt.privateApis),{BlockKeyboardShortcuts:yv}=ne(l.privateApis),xv={edit:{opacity:0,scale:.2},hover:{opacity:1,scale:1,clipPath:"inset( 22% round 2px )"}},bv={edit:{clipPath:"inset(0% round 0px)"},hover:{clipPath:"inset( 22% round 2px )"},tap:{clipPath:"inset(0% round 0px)"}};function wv(e){switch(e){case"navigation":return"/navigation";case"wp_block":return"/pattern?postType=wp_block";case"wp_template_part":return"/pattern?postType=wp_template_part";case"wp_template":return"/template";case"page":return"/page";case"post":return"/"}throw"Unknown post type"}function _v({isHomeRoute:e=!1,isPostsList:t=!1}){const n=(0,y.useReducedMotion)(),s=vv(),{canvas:i="view"}=s.query,r=Sn();!function(e){const{clearSelectedBlock:t}=(0,c.useDispatch)(x.store),{setDeviceType:n,closePublishSidebar:s,setIsListViewOpened:i,setIsInserterOpened:r}=(0,c.useDispatch)(f.store),{get:a}=(0,c.useSelect)(m.store),o=(0,c.useRegistry)();(0,h.useLayoutEffect)((()=>{const l=window.matchMedia("(min-width: 782px)").matches;o.batch((()=>{t(),n("Desktop"),s(),r(!1),l&&"edit"===e&&a("core","showListViewByDefault")&&!a("core","distractionFree")?i(!0):i(!1)}))}),[e,o,t,n,s,r,i,a])}(i);const o=hv();!function({postType:e,postId:t,context:n,isReady:s}){const{setEditedEntity:i}=(0,c.useDispatch)(Rt);(0,h.useEffect)((()=>{s&&i(e,String(t),n)}),[s,e,t,n,i])}(o);const{postType:l,postId:u,context:d}=o,{isBlockBasedTheme:p,editorCanvasView:g,currentPostIsTrashed:v,hasSiteIcon:S}=(0,c.useSelect)((e=>{const{getEditorCanvasContainerView:t}=ne(e(Rt)),{getCurrentTheme:n,getEntityRecord:s}=e(j.store),i=s("root","__unstableBase",void 0);return{isBlockBasedTheme:n()?.is_block_theme,editorCanvasView:t(),currentPostIsTrashed:"trash"===e(f.store).getCurrentPostAttribute("status"),hasSiteIcon:!!i?.site_icon_url}}),[]),C=!!d?.postId;lv(C?d.postType:l,C?d.postId:u);const k=Qr(),E=!Ta(),P=function(){const{query:e,path:t}=iv(),n=rv(),{canvas:s="view"}=e,i=(0,c.useSelect)((e=>"trash"===e(f.store).getCurrentPostAttribute("status")),[]),[r,a]=(0,h.useState)(!1);(0,h.useEffect)((()=>{"edit"===s&&a(!1)}),[s]);const o={"aria-label":(0,w.__)("Edit"),"aria-disabled":i,title:null,role:"button",tabIndex:0,onFocus:()=>a(!0),onBlur:()=>a(!1),onKeyDown:e=>{const{keyCode:s}=e;s!==Xt.ENTER&&s!==Xt.SPACE||i||(e.preventDefault(),n.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}))},onClick:()=>n.navigate((0,Qt.addQueryArgs)(t,{canvas:"edit"}),{transition:"canvas-mode-edit-transition"}),onClickCapture:e=>{i&&(e.preventDefault(),e.stopPropagation())},readonly:!0};return{className:Ht("edit-site-visual-editor__editor-canvas",{"is-focused":r&&"view"===s}),..."view"===s?o:{}}}(),I="edit"===i,V=(0,y.useInstanceId)(So,"edit-site-editor__loading-progress"),T=Po(),O=(0,h.useMemo)((()=>[...T.styles,{css:"view"===i?`body{min-height: 100vh; ${v?"":"cursor: pointer;"}}`:void 0}]),[T.styles,i,v]),{resetZoomLevel:A}=ne((0,c.useDispatch)(x.store)),{createSuccessNotice:N}=(0,c.useDispatch)(_.store),F=gv(),M=(0,h.useCallback)(((e,t)=>{switch(e){case"move-to-trash":case"delete-post":F.navigate(wv(C?d.postType:l));break;case"duplicate-post":{const e=t[0],n="string"==typeof e.title?e.title:e.title?.rendered;N((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(n)||(0,w.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,w.__)("Edit"),onClick:()=>{F.navigate(`/${e.type}/${e.id}?canvas=edit`)}}]})}}}),[l,d?.postType,C,F,N]),B=Va(g),D=!r,R={duration:n?0:.2};return!p&&e?(0,a.jsx)(pv,{}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(wo,{disableRootPadding:l!==Se}),(0,a.jsx)(f.EditorKeyboardShortcutsRegister,{}),I&&(0,a.jsx)(yv,{}),D?null:(0,a.jsx)(So,{id:V}),I&&(0,a.jsx)(xo,{postType:C?d.postType:l}),D&&(0,a.jsxs)(fv,{postType:C?d.postType:l,postId:C?d.postId:u,templateId:C?u:void 0,settings:T,className:"edit-site-editor__editor-interface",styles:O,customSaveButton:k&&(0,a.jsx)(ea,{size:"compact"}),customSavePanel:k&&(0,a.jsx)(ua,{}),forceDisableBlockTools:!E,title:B,iframeProps:P,onActionPerformed:M,extraSidebarPanels:!C&&(0,a.jsx)(Oo.Slot,{}),children:[I&&(0,a.jsx)(mv,{children:({length:e})=>e<=1&&(0,a.jsxs)(b.__unstableMotion.div,{className:"edit-site-editor__view-mode-toggle",transition:R,animate:"edit",initial:"edit",whileHover:"hover",whileTap:"tap",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,label:(0,w.__)("Open Navigation"),showTooltip:!0,tooltipPosition:"middle right",onClick:()=>{A(),t&&s.query?.focusMode?F.navigate("/",{transition:"canvas-mode-view-transition"}):F.navigate(function(e,t){const{path:n,name:s}=e;return["pattern-item","template-part-item","page-item","template-item","static-template-item","post-item"].includes(s)?wv(t):(0,Qt.addQueryArgs)(n,{canvas:void 0})}(s,C?d.postType:l),{transition:"canvas-mode-view-transition"})},children:(0,a.jsx)(b.__unstableMotion.div,{variants:bv,children:(0,a.jsx)($t,{className:"edit-site-editor__view-mode-toggle-icon"})})}),(0,a.jsx)(b.__unstableMotion.div,{className:Ht("edit-site-editor__back-icon",{"has-site-icon":S}),variants:xv,children:(0,a.jsx)(qa,{icon:ho})})]})}),(0,a.jsx)(sv,{}),p&&(0,a.jsx)(Xg,{})]})]})}function jv(e){const t=e.currentTheme?.is_block_theme,n=e.currentTheme?.theme_supports["editor-styles"],s=e.editorSettings?.supportsLayout;return!t&&(n||s)}const Sv={name:"home",path:"/",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||jv(e)?(0,a.jsx)(co,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||jv(e)?(0,a.jsx)(_v,{isHomeRoute:!0}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t||jv(e)?(0,a.jsx)(co,{}):(0,a.jsx)(uo,{})}}},{useLocation:Cv}=ne(Lt.privateApis);function kv(){const{query:e={}}=Cv(),{canvas:t}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(Km,{})}const Ev={name:"styles",path:"/styles",areas:{content:(0,a.jsx)(Km,{}),sidebar:(0,a.jsx)(oo,{backPath:"/"}),preview:({query:e})=>"stylebook"===e.preview?(0,a.jsx)(lg,{}):(0,a.jsx)(_v,{}),mobile:(0,a.jsx)(kv,{})},widths:{content:380}},Pv={per_page:100,status:["publish","draft"],order:"desc",orderby:"date"};function Iv({menuTitle:e,onClose:t,onSave:n}){const[s,i]=(0,h.useState)(e),r=s!==e&&(o=s,o?.trim()?.length>0);var o;return(0,a.jsx)(b.Modal,{title:(0,w.__)("Rename"),onRequestClose:t,focusOnMount:"firstContentElement",size:"small",children:(0,a.jsx)("form",{className:"sidebar-navigation__rename-modal-form",children:(0,a.jsxs)(b.__experimentalVStack,{spacing:"3",children:[(0,a.jsx)(b.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:s,placeholder:(0,w.__)("Navigation title"),onChange:i,label:(0,w.__)("Name")}),(0,a.jsxs)(b.__experimentalHStack,{justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,accessibleWhenDisabled:!0,disabled:!r,variant:"primary",type:"submit",onClick:e=>{e.preventDefault(),r&&(n({title:s}),t())},children:(0,w.__)("Save")})]})]})})})}function Vv({onClose:e,onConfirm:t}){return(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:!0,onConfirm:()=>{t(),e()},onCancel:e,confirmButtonText:(0,w.__)("Delete"),size:"medium",children:(0,w.__)("Are you sure you want to delete this Navigation Menu?")})}const{useHistory:Tv}=ne(Lt.privateApis),Ov={position:"bottom right"};function Av(e){const{onDelete:t,onSave:n,onDuplicate:s,menuTitle:i,menuId:r}=e,[o,l]=(0,h.useState)(!1),[c,u]=(0,h.useState)(!1),d=Tv(),p=()=>{l(!1),u(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.DropdownMenu,{className:"sidebar-navigation__more-menu",label:(0,w.__)("Actions"),icon:No,popoverProps:Ov,children:({onClose:e})=>(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(b.MenuItem,{onClick:()=>{l(!0),e()},children:(0,w.__)("Rename")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{d.navigate(`/wp_navigation/${r}?canvas=edit`)},children:(0,w.__)("Edit")}),(0,a.jsx)(b.MenuItem,{onClick:()=>{s(),e()},children:(0,w.__)("Duplicate")}),(0,a.jsx)(b.MenuItem,{isDestructive:!0,onClick:()=>{u(!0),e()},children:(0,w.__)("Delete")})]})}),c&&(0,a.jsx)(Vv,{onClose:p,onConfirm:t}),o&&(0,a.jsx)(Iv,{onClose:p,menuTitle:i,onSave:n})]})}var Nv=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})}),Fv=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})});const Mv={className:"block-editor-block-settings-menu__popover",placement:"bottom-start"},{useHistory:Bv,useLocation:Dv}=ne(Lt.privateApis);function Rv(e){const t=Bv(),{path:n}=Dv(),{block:s}=e,{clientId:i}=s,{moveBlocksDown:r,moveBlocksUp:o,removeBlocks:l}=(0,c.useDispatch)(x.store),u=(0,w.sprintf)((0,w.__)("Remove %s"),(0,x.BlockTitle)({clientId:i,maximumLength:25})),d=(0,w.sprintf)((0,w.__)("Go to %s"),(0,x.BlockTitle)({clientId:i,maximumLength:25})),p=(0,c.useSelect)((e=>{const{getBlockRootClientId:t}=e(x.store);return t(i)}),[i]),f=(0,h.useCallback)((e=>{const{attributes:s,name:i}=e;"post-type"===s.kind&&s.id&&s.type&&t&&t.navigate(`/${s.type}/${s.id}?canvas=edit`,{state:{backPath:n}}),"core/page-list-item"===i&&s.id&&t&&t.navigate(`/page/${s.id}?canvas=edit`,{state:{backPath:n}})}),[n,t]);return(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Options"),className:"block-editor-block-settings-menu",popoverProps:Mv,noIcons:!0,...e,children:({onClose:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(b.MenuItem,{icon:Nv,onClick:()=>{o([i],p),e()},children:(0,w.__)("Move up")}),(0,a.jsx)(b.MenuItem,{icon:Fv,onClick:()=>{r([i],p),e()},children:(0,w.__)("Move down")}),"page"===s.attributes?.type&&s.attributes?.id&&(0,a.jsx)(b.MenuItem,{onClick:()=>{f(s),e()},children:d})]}),(0,a.jsx)(b.MenuGroup,{children:(0,a.jsx)(b.MenuItem,{onClick:()=>{l([i],!1),e()},children:u})})]})})}const{PrivateListView:Lv}=ne(x.privateApis),zv=["postType","page",{per_page:100,_fields:["id","link","menu_order","parent","title","type"],orderby:"menu_order",order:"asc"}];function Hv({rootClientId:e}){const{listViewRootClientId:t,isLoading:n}=(0,c.useSelect)((t=>{const{areInnerBlocksControlled:n,getBlockName:s,getBlockCount:i,getBlockOrder:r}=t(x.store),{isResolving:a}=t(j.store),o=r(e),l=1===o.length&&"core/page-list"===s(o[0])&&i(o[0])>0,c=a("getEntityRecords",zv);return{listViewRootClientId:l?o[0]:e,isLoading:!n(e)||c}}),[e]),{replaceBlock:s,__unstableMarkNextChangeAsNotPersistent:i}=(0,c.useDispatch)(x.store),r=(0,h.useCallback)((e=>{"core/navigation-link"!==e.name||e.attributes.url||(i(),s(e.clientId,(0,o.createBlock)("core/navigation-link",e.attributes)))}),[i,s]);return(0,a.jsxs)(a.Fragment,{children:[!n&&(0,a.jsx)(Lv,{rootClientId:t,onSelect:r,blockSettingsMenu:Rv,showAppender:!1,isExpanded:!0}),(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor",children:(0,a.jsx)(x.BlockList,{})})]})}const Gv=()=>{};function Wv({navigationMenuId:e}){const{storedSettings:t}=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return{storedSettings:t()}}),[]),n=(0,h.useMemo)((()=>e?[(0,o.createBlock)("core/navigation",{ref:e})]:[]),[e]);return e&&n?.length?(0,a.jsx)(x.BlockEditorProvider,{settings:t,value:n,onChange:Gv,onInput:Gv,children:(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-navigation-menus__content",children:(0,a.jsx)(Hv,{rootClientId:n[0].clientId})})}):null}function Uv(e,t,n){return e?.rendered?"publish"===n?(0,qt.decodeEntities)(e?.rendered):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","menu label"),(0,qt.decodeEntities)(e?.rendered),n):(0,w.sprintf)((0,w.__)("(no title %s)"),t)}function qv({navigationMenu:e,backPath:t,handleDelete:n,handleDuplicate:s,handleSave:i}){const r=e?.title?.rendered;return(0,a.jsx)(sy,{actions:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Av,{menuId:e?.id,menuTitle:(0,qt.decodeEntities)(r),onDelete:n,onSave:i,onDuplicate:s})}),backPath:t,title:Uv(e?.title,e?.id,e?.status),description:(0,w.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),children:(0,a.jsx)(Wv,{navigationMenuId:e?.id})})}const{useLocation:Zv}=ne(Lt.privateApis),Yv="wp_navigation";function Kv({backPath:e}){const{params:{postId:t}}=Zv(),{record:n,isResolving:s}=(0,j.useEntityRecord)("postType",Yv,t),{isSaving:i,isDeleting:r}=(0,c.useSelect)((e=>{const{isSavingEntityRecord:n,isDeletingEntityRecord:s}=e(j.store);return{isSaving:n("postType",Yv,t),isDeleting:s("postType",Yv,t)}}),[t]),o=s||i||r,l=n?.title?.rendered||n?.slug,{handleSave:u,handleDelete:d,handleDuplicate:h}=ey(),p=()=>d(n),f=e=>u(n,e),m=()=>h(n);return o?(0,a.jsx)(sy,{description:(0,w.__)("Navigation Menus are a curated collection of blocks that allow visitors to get around your site."),backPath:e,children:(0,a.jsx)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):o||n?n?.content?.raw?(0,a.jsx)(qv,{navigationMenu:n,backPath:e,handleDelete:p,handleSave:f,handleDuplicate:m}):(0,a.jsx)(sy,{actions:(0,a.jsx)(Av,{menuId:n?.id,menuTitle:(0,qt.decodeEntities)(l),onDelete:p,onSave:f,onDuplicate:m}),backPath:e,title:Uv(n?.title,n?.id,n?.status),description:(0,w.__)("This Navigation Menu is empty.")}):(0,a.jsx)(sy,{description:(0,w.__)("Navigation Menu missing."),backPath:e})}const{useHistory:Xv}=ne(Lt.privateApis);function Qv(){const{deleteEntityRecord:e}=(0,c.useDispatch)(j.store),{createSuccessNotice:t,createErrorNotice:n}=(0,c.useDispatch)(_.store),s=Xv();return async i=>{const r=i?.id;try{await e("postType",Yv,r,{force:!0},{throwOnError:!0}),t((0,w.__)("Navigation Menu successfully deleted."),{type:"snackbar"}),s.navigate("/navigation")}catch(e){n((0,w.sprintf)((0,w.__)("Unable to delete Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function Jv(){const{getEditedEntityRecord:e}=(0,c.useSelect)((e=>{const{getEditedEntityRecord:t}=e(j.store);return{getEditedEntityRecord:t}}),[]),{editEntityRecord:t,__experimentalSaveSpecifiedEntityEdits:n}=(0,c.useDispatch)(j.store),{createSuccessNotice:s,createErrorNotice:i}=(0,c.useDispatch)(_.store);return async(r,a)=>{if(!a)return;const o=r?.id,l=e("postType",je,o);t("postType",Yv,o,a);const c=Object.keys(a);try{await n("postType",Yv,o,c,{throwOnError:!0}),s((0,w.__)("Renamed Navigation Menu"),{type:"snackbar"})}catch(e){t("postType",Yv,o,l),i((0,w.sprintf)((0,w.__)("Unable to rename Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function $v(){const e=Xv(),{saveEntityRecord:t}=(0,c.useDispatch)(j.store),{createSuccessNotice:n,createErrorNotice:s}=(0,c.useDispatch)(_.store);return async i=>{const r=i?.title?.rendered||i?.slug;try{const s=await t("postType",Yv,{title:(0,w.sprintf)((0,w._x)("%s (Copy)","navigation menu"),r),content:i?.content?.raw,status:"publish"},{throwOnError:!0});s&&(n((0,w.__)("Duplicated Navigation Menu"),{type:"snackbar"}),e.navigate(`/wp_navigation/${s.id}`))}catch(e){s((0,w.sprintf)((0,w.__)("Unable to duplicate Navigation Menu (%s)."),e?.message),{type:"snackbar"})}}}function ey(){return{handleDelete:Qv(),handleSave:Jv(),handleDuplicate:$v()}}function ty(e,t,n){return e?"publish"===n?(0,qt.decodeEntities)(e):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","menu label"),(0,qt.decodeEntities)(e),n):(0,w.sprintf)((0,w.__)("(no title %s)"),t)}function ny({backPath:e}){const{records:t,isResolving:n,hasResolved:s}=(0,j.useEntityRecords)("postType",je,Pv),i=n&&!s,{getNavigationFallbackId:r}=ne((0,c.useSelect)(j.store)),o=(0,c.useSelect)((e=>e(j.store).isResolving("getNavigationFallbackId")),[]),l=t?.[0];l||n||!s||o||r();const{handleSave:u,handleDelete:d,handleDuplicate:h}=ey(),p=!!t?.length;return i?(0,a.jsx)(sy,{backPath:e,children:(0,a.jsx)(b.Spinner,{className:"edit-site-sidebar-navigation-screen-navigation-menus__loading"})}):i||p?1===t?.length?(0,a.jsx)(qv,{navigationMenu:l,backPath:e,handleDelete:()=>d(l),handleDuplicate:()=>h(l),handleSave:e=>u(l,e)}):(0,a.jsx)(sy,{backPath:e,children:(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-navigation-menus",children:t?.map((({id:e,title:t,status:n},s)=>(0,a.jsx)(iy,{postId:e,withChevron:!0,icon:Ma,children:ty(t?.rendered,s+1,n)},e)))})}):(0,a.jsx)(sy,{description:(0,w.__)("No Navigation Menus found."),backPath:e})}function sy({children:e,actions:t,title:n,description:s,backPath:i}){return(0,a.jsx)(Ua,{title:n||(0,w.__)("Navigation"),actions:t,description:s||(0,w.__)("Manage your Navigation Menus."),backPath:i,content:e})}const iy=({postId:e,...t})=>(0,a.jsx)(Qa,{to:`/wp_navigation/${e}`,...t}),{useLocation:ry}=ne(Lt.privateApis);function ay(){const{query:e={}}=ry(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(ny,{backPath:"/"})}const oy={name:"navigation",path:"/navigation",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ny,{backPath:"/"}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(ay,{}):(0,a.jsx)(uo,{})}}},{useLocation:ly}=ne(Lt.privateApis);function cy(){const{query:e={}}=ly(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(Kv,{backPath:"/navigation"})}const uy={name:"navigation-item",path:"/wp_navigation/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Kv,{backPath:"/navigation"}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(cy,{}):(0,a.jsx)(uo,{})}}};var dy=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z"})});function hy({count:e,icon:t,id:n,isActive:s,label:i,type:r}){if(!e)return;const o=[`postType=${r}`];return n&&o.push(`categoryId=${n}`),(0,a.jsx)(Qa,{icon:t,suffix:(0,a.jsx)("span",{children:e}),"aria-current":s?"true":void 0,to:`/pattern?${o.join("&")}`,children:i})}const py=(e,t,n)=>t===n.findIndex((t=>e.name===t.name));const{extractWords:fy,getNormalizedSearchTerms:my,normalizeString:gy}=ne(x.privateApis),vy=e=>e.type===Ie.user?e.slug:e.type===Ce?"":e.name||"",yy=e=>"string"==typeof e.title?e.title:e.title&&e.title.rendered?e.title.rendered:e.title&&e.title.raw?e.title.raw:"",xy=e=>e.type===Ie.user?e.excerpt.raw:e.description||"",by=e=>e.keywords||[],wy=()=>!1,_y=(e=[],t="",n={})=>{const s=my(t),i=n.categoryId!==Ve&&!s.length,r={...n,onlyFilterByCategory:i},a=i?0:1,o=e.map((e=>[e,jy(e,t,r)])).filter((([,e])=>e>a));return 0===s.length||o.sort((([,e],[,t])=>t-e)),o.map((([e])=>e))};function jy(e,t,n){const{categoryId:s,getName:i=vy,getTitle:r=yy,getDescription:a=xy,getKeywords:o=by,hasCategory:l=wy,onlyFilterByCategory:c}=n;let u=s===Ve||s===Pe||s===Te&&e.type===Ie.user||l(e,s)?1:0;if(!u||c)return u;const d=i(e),h=r(e),p=a(e),f=o(e),m=gy(t),g=gy(h);if(m===g)u+=30;else if(g.startsWith(m))u+=20;else{const e=[d,h,p,...f].join(" ");0===((e,t)=>e.filter((e=>!my(t).some((t=>t.includes(e))))))(fy(m),e).length&&(u+=10)}return u}const Sy=[],Cy=(0,c.createSelector)(((e,t,n="")=>{const{getEntityRecords:s,getCurrentTheme:i,isResolving:r}=e(j.store),a={per_page:-1},o=s("postType",Ce,a)??Sy,l=(i()?.default_template_part_areas||[]).map((e=>e.area)),c=r("getEntityRecords",["postType",Ce,a]);return{patterns:_y(o,n,{categoryId:t,hasCategory:(e,t)=>t!==Ee?e.area===t:e.area===t||!l.includes(e.area)}),isResolving:c}}),(e=>[e(j.store).getEntityRecords("postType",Ce,{per_page:-1}),e(j.store).isResolving("getEntityRecords",["postType",Ce,{per_page:-1}]),e(j.store).getCurrentTheme()?.default_template_part_areas])),ky=(0,c.createSelector)((e=>{const{getSettings:t}=ne(e(Rt)),{isResolving:n}=e(j.store),s=t();return{patterns:[...(s.__experimentalAdditionalBlockPatterns??s.__experimentalBlockPatterns)||[],...e(j.store).getBlockPatterns()||[]].filter((e=>!Oe.includes(e.source))).filter(py).filter((e=>!1!==e.inserter)).map((e=>({...e,keywords:e.keywords||[],type:Ie.theme,blocks:(0,o.parse)(e.content,{__unstableSkipMigrationLogs:!0})}))),isResolving:n("getBlockPatterns")}}),(e=>[e(j.store).getBlockPatterns(),e(j.store).isResolving("getBlockPatterns"),ne(e(Rt)).getSettings()])),Ey=(0,c.createSelector)(((e,t,n,s="")=>{const{patterns:i,isResolving:r}=ky(e),{patterns:a,isResolving:o,categories:l}=Py(e);let c=[...i||[],...a||[]];return n&&(c=c.filter((e=>e.type===Ie.user?(e.wp_pattern_sync_status||Ae.full)===n:n===Ae.unsynced))),c=_y(c,s,t?{categoryId:t,hasCategory:(e,t)=>e.type===Ie.user?e.wp_pattern_category?.some((e=>l.find((t=>t.id===e))?.slug===t)):e.categories?.includes(t)}:{hasCategory:e=>e.type===Ie.user?l?.length&&(!e.wp_pattern_category?.length||!e.wp_pattern_category?.some((e=>l.find((t=>t.id===e))))):!e.hasOwnProperty("categories")}),{patterns:c,isResolving:r||o}}),(e=>[ky(e),Py(e)])),Py=(0,c.createSelector)(((e,t,n="")=>{const{getEntityRecords:s,isResolving:i,getUserPatternCategories:r}=e(j.store),a={per_page:-1},o=s("postType",Ie.user,a),l=r(),c=new Map;l.forEach((e=>c.set(e.id,e)));let u=o??Sy;const d=i("getEntityRecords",["postType",Ie.user,a]);return t&&(u=u.filter((e=>e.wp_pattern_sync_status||Ae.full===t))),u=_y(u,n,{hasCategory:()=>!0}),{patterns:u,isResolving:d,categories:l}}),(e=>[e(j.store).getEntityRecords("postType",Ie.user,{per_page:-1}),e(j.store).isResolving("getEntityRecords",["postType",Ie.user,{per_page:-1}]),e(j.store).getUserPatternCategories()]));var Iy=(e,t,{search:n="",syncStatus:s}={})=>(0,c.useSelect)((i=>{if(e===Ce)return Cy(i,t,n);if(e===Ie.user&&t){return Ey(i,"uncategorized"===t?"":t,s,n)}return e===Ie.user?Py(i,s,n):{patterns:Sy,isResolving:!1}}),[t,e,n,s]);function Vy(){const e=function(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt)),n=t();return n.__experimentalAdditionalBlockPatternCategories??n.__experimentalBlockPatternCategories}));return[...e||[],...(0,c.useSelect)((e=>e(j.store).getBlockPatternCategories()))||[]]}();e.push({name:Ee,label:(0,w.__)("Uncategorized")});const t=function(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return t().__experimentalAdditionalBlockPatterns??t().__experimentalBlockPatterns})),t=(0,c.useSelect)((e=>e(j.store).getBlockPatterns()));return(0,h.useMemo)((()=>[...e||[],...t||[]].filter((e=>!Oe.includes(e.source))).filter(py).filter((e=>!1!==e.inserter))),[e,t])}(),{patterns:n,categories:s}=Iy(Ie.user),i=(0,h.useMemo)((()=>{const i={},r=[];e.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),s.forEach((e=>{i[e.name]||(i[e.name]={...e,count:0})})),t.forEach((e=>{e.categories?.forEach((e=>{i[e]&&(i[e].count+=1)})),e.categories?.length||(i.uncategorized.count+=1)})),n.forEach((e=>{e.wp_pattern_category?.forEach((e=>{const t=s.find((t=>t.id===e))?.name;i[t]&&(i[t].count+=1)})),e.wp_pattern_category?.length&&e.wp_pattern_category?.some((e=>s.find((t=>t.id===e))))||(i.uncategorized.count+=1)})),[...e,...s].forEach((e=>{i[e.name].count&&!r.find((t=>t.name===e.name))&&r.push(i[e.name])}));const a=r.sort(((e,t)=>e.label.localeCompare(t.label)));return a.unshift({name:Te,label:(0,w.__)("My patterns"),count:n.length}),a.unshift({name:Ve,label:(0,w.__)("All patterns"),description:(0,w.__)("A list of all patterns from all sources."),count:t.length+n.length}),a}),[e,t,s,n]);return{patternCategories:i,hasPatterns:!!i.length}}const Ty=e=>{const t=e||[],n=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_part_areas||[]),[]),s={header:{},footer:{},sidebar:{},uncategorized:{}};n.forEach((e=>s[e.area]={...e,templateParts:[]}));return t.reduce(((e,t)=>{const n=e[t.area]?t.area:Ee;return e[n]?.templateParts?.push(t),e}),s)};const{useLocation:Oy}=ne(Lt.privateApis);function Ay({templatePartAreas:e,patternCategories:t,currentCategory:n,currentType:s}){const[i,...r]=t;return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:[(0,a.jsx)(hy,{count:Object.values(e).map((({templateParts:e})=>e?.length||0)).reduce(((e,t)=>e+t),0),icon:(0,f.getTemplatePartIcon)(),label:(0,w.__)("All template parts"),id:Pe,type:Ce,isActive:n===Pe&&s===Ce},"all"),Object.entries(e).map((([e,{label:t,templateParts:i}])=>(0,a.jsx)(hy,{count:i?.length,icon:(0,f.getTemplatePartIcon)(e),label:t,id:e,type:Ce,isActive:n===e&&s===Ce},e))),(0,a.jsx)("div",{className:"edit-site-sidebar-navigation-screen-patterns__divider"}),i&&(0,a.jsx)(hy,{count:i.count,label:i.label,icon:dy,id:i.name,type:Ie.user,isActive:n===`${i.name}`&&s===Ie.user},i.name),r.map((e=>(0,a.jsx)(hy,{count:e.count,label:e.label,icon:dy,id:e.name,type:Ie.user,isActive:n===`${e.name}`&&s===Ie.user},e.name)))]})}function Ny({backPath:e}){const{query:{postType:t="wp_block",categoryId:n}}=Oy(),s=n||(t===Ie.user?Ve:Pe),{templatePartAreas:i,hasTemplateParts:r,isLoading:o}=function(){const{records:e,isResolving:t}=(0,j.useEntityRecords)("postType",Ce,{per_page:-1});return{hasTemplateParts:!!e&&!!e.length,isLoading:t,templatePartAreas:Ty(e)}}(),{patternCategories:l,hasPatterns:c}=Vy();return(0,a.jsx)(Ua,{title:(0,w.__)("Patterns"),description:(0,w.__)("Manage what patterns are available when editing the site."),isRoot:!e,backPath:e,content:(0,a.jsxs)(a.Fragment,{children:[o&&(0,w.__)("Loading items…"),!o&&(0,a.jsxs)(a.Fragment,{children:[!r&&!c&&(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-patterns__group",children:(0,a.jsx)(b.__experimentalItem,{children:(0,w.__)("No items found")})}),(0,a.jsx)(Ay,{templatePartAreas:i,patternCategories:l,currentCategory:s,currentType:t})]})]})})}var Fy=i(9681),My=i.n(Fy);Math.pow(10,8);const By=6048e5,Dy=Symbol.for("constructDateFrom");function Ry(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Dy in e?e[Dy](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ly(e,t){return Ry(t||e,e)}function zy(e,t,n){const s=Ly(e,n?.in);return isNaN(t)?Ry(n?.in||e,NaN):t?(s.setDate(s.getDate()+t),s):s}function Hy(e,t,n){return zy(e,-t,n)}function Gy(e,t,n){return zy(e,7*t,n)}function Wy(e,t,n){return Gy(e,-t,n)}function Uy(e,t,n){const s=Ly(e,n?.in);if(isNaN(t))return Ry(n?.in||e,NaN);if(!t)return s;const i=s.getDate(),r=Ry(n?.in||e,s.getTime());r.setMonth(s.getMonth()+t+1,0);return i>=r.getDate()?r:(s.setFullYear(r.getFullYear(),r.getMonth(),i),s)}function qy(e,t,n){return Uy(e,-t,n)}function Zy(e,t,n){return Uy(e,12*t,n)}function Yy(e,t,n){return Zy(e,-t,n)}var Ky=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})}),Xy=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})});const Qy="is",Jy="isNot",$y="isAny",ex="isNone",tx="isAll",nx="isNotAll",sx="lessThan",ix="greaterThan",rx="lessThanOrEqual",ax="greaterThanOrEqual",ox="before",lx="after",cx="beforeInc",ux="afterInc",dx="contains",hx="notContains",px="startsWith",fx="between",mx="on",gx="notOn",vx="inThePast",yx="over",xx=[Qy,Jy,$y,ex,tx,nx,sx,ix,rx,ax,ox,lx,cx,ux,dx,hx,px,fx,mx,gx,vx,yx],bx=[Qy,Jy,sx,ix,rx,ax,ox,lx,cx,ux,dx,hx,px,mx,gx],wx={[Qy]:{key:"is-filter",label:(0,w.__)("Is")},[Jy]:{key:"is-not-filter",label:(0,w.__)("Is not")},[$y]:{key:"is-any-filter",label:(0,w.__)("Is any")},[ex]:{key:"is-none-filter",label:(0,w.__)("Is none")},[tx]:{key:"is-all-filter",label:(0,w.__)("Is all")},[nx]:{key:"is-not-all-filter",label:(0,w.__)("Is not all")},[sx]:{key:"less-than-filter",label:(0,w.__)("Less than")},[ix]:{key:"greater-than-filter",label:(0,w.__)("Greater than")},[rx]:{key:"less-than-or-equal-filter",label:(0,w.__)("Less than or equal")},[ax]:{key:"greater-than-or-equal-filter",label:(0,w.__)("Greater than or equal")},[ox]:{key:"before-filter",label:(0,w.__)("Before")},[lx]:{key:"after-filter",label:(0,w.__)("After")},[cx]:{key:"before-inc-filter",label:(0,w.__)("Before (inc)")},[ux]:{key:"after-inc-filter",label:(0,w.__)("After (inc)")},[dx]:{key:"contains-filter",label:(0,w.__)("Contains")},[hx]:{key:"not-contains-filter",label:(0,w.__)("Doesn't contain")},[px]:{key:"starts-with-filter",label:(0,w.__)("Starts with")},[fx]:{key:"between-filter",label:(0,w.__)("Between (inc)")},[mx]:{key:"on-filter",label:(0,w.__)("On")},[gx]:{key:"not-on-filter",label:(0,w.__)("Not on")},[vx]:{key:"in-the-past-filter",label:(0,w.__)("In the past")},[yx]:{key:"over-filter",label:(0,w.__)("Over")}},_x=["asc","desc"],jx={asc:"↑",desc:"↓"},Sx={asc:"ascending",desc:"descending"},Cx={asc:(0,w.__)("Sort ascending"),desc:(0,w.__)("Sort descending")},kx={asc:Ky,desc:Xy},Ex="table",Px="grid",Ix=[];function Vx({elements:e,getElements:t}){const n=Array.isArray(e)&&e.length>0?e:Ix,[s,i]=(0,h.useState)(n),[r,a]=(0,h.useState)(!1);return(0,h.useEffect)((()=>{if(!t)return void i(n);let e=!1;return a(!0),t().then((t=>{if(!e){const e=Array.isArray(t)&&t.length>0?t:n;i(e)}})).catch((()=>{e||i(n)})).finally((()=>{e||a(!1)})),()=>{e=!0}}),[t,n]),{elements:s,isLoading:r}}function Tx({item:e,field:t}){const{elements:n,isLoading:s}=Vx({elements:t.elements,getElements:t.getElements}),i=t.getValue({item:e});return s||0===n.length?i:n?.find((e=>e.value===i))?.label||t.getValue({item:e})}const Ox=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;var Ax={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Ox.test(n)?null:(0,w.__)("Value must be a valid email address.")}},Edit:"email",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};var Nx={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Number.isInteger(n)?null:(0,w.__)("Value must be an integer.")}},Edit:"integer",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy,sx,ix,rx,ax,fx],validOperators:[Qy,Jy,sx,ix,rx,ax,fx,$y,ex,tx,nx]}};var Fx={sort:function(e,t,n){return"asc"===n?e-t:t-e},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return function(e){return""===e||null==e}(n)||Number.isFinite(n)?null:(0,w.__)("Value must be a number.")}},Edit:"number",render:({item:e,field:t})=>{t.hasElements;const n=t.getValue({item:e});return[null,void 0].includes(n)?null:Number(n).toFixed(2)},enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy,sx,ix,rx,ax,fx],validOperators:[Qy,Jy,sx,ix,rx,ax,fx,$y,ex,tx,nx]}};var Mx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"text",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};var Bx={sort:function(e,t,n){const s=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?s-i:i-s},isValid:{elements:!0,custom:()=>null},Edit:"datetime",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[mx,gx,ox,lx,cx,ux,vx,yx],validOperators:[mx,gx,ox,lx,cx,ux,vx,yx]}};var Dx={sort:function(e,t,n){const s=new Date(e).getTime(),i=new Date(t).getTime();return"asc"===n?s-i:i-s},Edit:"date",isValid:{elements:!0,custom:()=>null},render:({item:e,field:t})=>{if(t.hasElements)return(0,a.jsx)(Tx,{item:e,field:t});const n=t.getValue({item:e});return n?(s=n,(0,Cg.dateI18n)((0,Cg.getSettings)().formats.date,(0,Cg.getDate)(s))):"";var s},enableSorting:!0,filterBy:{defaultOperators:[mx,gx,ox,lx,cx,ux,vx,yx,fx],validOperators:[mx,gx,ox,lx,cx,ux,vx,yx,fx]}};var Rx={sort:function(e,t,n){const s=Boolean(e);return s===Boolean(t)?0:"asc"===n?s?1:-1:s?-1:1},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||[!0,!1].includes(n)?null:(0,w.__)("Value must be true, false, or undefined")}},Edit:"checkbox",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):!0===t.getValue({item:e})?(0,w.__)("True"):!1===t.getValue({item:e})?(0,w.__)("False"):null,enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy],validOperators:[Qy,Jy]}};var Lx={sort:function(){return 0},isValid:{elements:!0,custom:()=>null},Edit:null,render:()=>null,enableSorting:!1,filterBy:!1};const zx={sort:function(e,t,n){const s=Array.isArray(e)?e:[],i=Array.isArray(t)?t:[];if(s.length!==i.length)return"asc"===n?s.length-i.length:i.length-s.length;const r=s.join(","),a=i.join(",");return"asc"===n?r.localeCompare(a):a.localeCompare(r)},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||Array.isArray(n)?n.every((e=>"string"==typeof e))?null:(0,w.__)("Every value must be a string."):(0,w.__)("Value must be an array.")}},Edit:"array",render:function({item:e,field:t}){return(t.getValue({item:e})||[]).join(", ")},enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[$y,ex,tx,nx]}};var Hx=zx;var Gx={sort:function(e,t,n){return 0},isValid:{elements:!0,custom:()=>null},Edit:"password",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):"••••••••",enableSorting:!1,filterBy:!1};var Wx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"telephone",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};var Ux={sort:function(e,t,n){const s=X(e),i=X(t);if(!s.isValid()&&!i.isValid())return 0;if(!s.isValid())return"asc"===n?1:-1;if(!i.isValid())return"asc"===n?-1:1;const r=s.toHsl(),a=i.toHsl();return r.h!==a.h?"asc"===n?r.h-a.h:a.h-r.h:r.s!==a.s?"asc"===n?r.s-a.s:a.s-r.s:"asc"===n?r.l-a.l:a.l-r.l},isValid:{elements:!0,custom:(e,t)=>{const n=t.getValue({item:e});return[void 0,"",null].includes(n)||X(n).isValid()?null:(0,w.__)("Value must be a valid color.")}},Edit:"color",render:({item:e,field:t})=>{if(t.hasElements)return(0,a.jsx)(Tx,{item:e,field:t});const n=t.getValue({item:e});return n&&X(n).isValid()?(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,a.jsx)("div",{style:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",flexShrink:0}}),(0,a.jsx)("span",{children:n})]}):n},enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy]}};var qx={sort:function(e,t,n){return"asc"===n?e.localeCompare(t):t.localeCompare(e)},isValid:{elements:!0,custom:()=>null},Edit:"url",render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[$y,ex],validOperators:[Qy,Jy,dx,hx,px,$y,ex,tx,nx]}};const{lock:Zx,unlock:Yx}=(0,ee.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/dataviews");function Kx(e,t){let n;return e?.required&&t?.required?n=t?.required?.message?t.required:void 0:e?.elements&&t?.elements?n=t.elements:t?.custom&&(n=t.custom),n}const{ValidatedCheckboxControl:Xx}=Yx(b.privateApis);function Qx(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function Jx(e){return!(!Qx(e)&&"number"!=typeof e||isNaN(+Ly(e)))}const $x={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const tb={date:eb({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eb({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eb({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function sb(e){return(t,n)=>{let s;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):t;s=e.formattingValues[i]||e.formattingValues[t]}else{const t=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;s=e.values[i]||e.values[t]}return s[e.argumentCallback?e.argumentCallback(t):t]}}function ib(e){return(t,n={})=>{const s=n.width,i=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],r=t.match(i);if(!r)return null;const a=r[0],o=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(o,(e=>e.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(o,(e=>e.test(a)));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}var rb;const ab={code:"en-US",formatDistance:(e,t,n)=>{let s;const i=$x[e];return s="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+s:s+" ago":s},formatLong:tb,formatRelative:(e,t,n,s)=>nb[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:sb({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:sb({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:sb({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:sb({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:sb({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rb={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(rb.matchPattern);if(!n)return null;const s=n[0],i=e.match(rb.parsePattern);if(!i)return null;let r=rb.valueCallback?rb.valueCallback(i[0]):i[0];return r=t.valueCallback?t.valueCallback(r):r,{value:r,rest:e.slice(s.length)}}),era:ib({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ib({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:ib({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ib({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ib({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};let ob={};function lb(){return ob}function cb(e){const t=Ly(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ub(e,t){const n=Ly(e,t?.in);return n.setHours(0,0,0,0),n}function db(e,t,n){const[s,i]=function(e,...t){const n=Ry.bind(null,e||t.find((e=>"object"==typeof e)));return t.map(n)}(n?.in,e,t),r=ub(s),a=ub(i),o=+r-cb(r),l=+a-cb(a);return Math.round((o-l)/864e5)}function hb(e,t){const n=Ly(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function pb(e,t){const n=Ly(e,t?.in);return db(n,hb(n))+1}function fb(e,t){const n=lb(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Ly(e,t?.in),r=i.getDay(),a=(r<s?7:0)+r-s;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function mb(e,t){return fb(e,{...t,weekStartsOn:1})}function gb(e,t){const n=Ly(e,t?.in),s=n.getFullYear(),i=Ry(n,0);i.setFullYear(s+1,0,4),i.setHours(0,0,0,0);const r=mb(i),a=Ry(n,0);a.setFullYear(s,0,4),a.setHours(0,0,0,0);const o=mb(a);return n.getTime()>=r.getTime()?s+1:n.getTime()>=o.getTime()?s:s-1}function vb(e,t){const n=gb(e,t),s=Ry(t?.in||e,0);return s.setFullYear(n,0,4),s.setHours(0,0,0,0),mb(s)}function yb(e,t){const n=Ly(e,t?.in),s=+mb(n)-+vb(n);return Math.round(s/By)+1}function xb(e,t){const n=Ly(e,t?.in),s=n.getFullYear(),i=lb(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Ry(t?.in||e,0);a.setFullYear(s+1,0,r),a.setHours(0,0,0,0);const o=fb(a,t),l=Ry(t?.in||e,0);l.setFullYear(s,0,r),l.setHours(0,0,0,0);const c=fb(l,t);return+n>=+o?s+1:+n>=+c?s:s-1}function bb(e,t){const n=lb(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=xb(e,t),r=Ry(t?.in||e,0);r.setFullYear(i,0,s),r.setHours(0,0,0,0);return fb(r,t)}function wb(e,t){const n=Ly(e,t?.in),s=+fb(n,t)-+bb(n,t);return Math.round(s/By)+1}function _b(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const jb={y(e,t){const n=e.getFullYear(),s=n>0?n:1-n;return _b("yy"===t?s%100:s,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):_b(n+1,2)},d:(e,t)=>_b(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>_b(e.getHours()%12||12,t.length),H:(e,t)=>_b(e.getHours(),t.length),m:(e,t)=>_b(e.getMinutes(),t.length),s:(e,t)=>_b(e.getSeconds(),t.length),S(e,t){const n=t.length,s=e.getMilliseconds();return _b(Math.trunc(s*Math.pow(10,n-3)),t.length)}},Sb="midnight",Cb="noon",kb="morning",Eb="afternoon",Pb="evening",Ib="night",Vb={G:function(e,t,n){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});default:return n.era(s,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),s=t>0?t:1-t;return n.ordinalNumber(s,{unit:"year"})}return jb.y(e,t)},Y:function(e,t,n,s){const i=xb(e,s),r=i>0?i:1-i;if("YY"===t){return _b(r%100,2)}return"Yo"===t?n.ordinalNumber(r,{unit:"year"}):_b(r,t.length)},R:function(e,t){return _b(gb(e),t.length)},u:function(e,t){return _b(e.getFullYear(),t.length)},Q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return _b(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,n){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return _b(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,n){const s=e.getMonth();switch(t){case"M":case"MM":return jb.M(e,t);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,n){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return _b(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,n,s){const i=wb(e,s);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):_b(i,t.length)},I:function(e,t,n){const s=yb(e);return"Io"===t?n.ordinalNumber(s,{unit:"week"}):_b(s,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):jb.d(e,t)},D:function(e,t,n){const s=pb(e);return"Do"===t?n.ordinalNumber(s,{unit:"dayOfYear"}):_b(s,t.length)},E:function(e,t,n){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,n,s){const i=e.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return _b(r,2);case"eo":return n.ordinalNumber(r,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,s){const i=e.getDay(),r=(i-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return _b(r,t.length);case"co":return n.ordinalNumber(r,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const s=e.getDay(),i=0===s?7:s;switch(t){case"i":return String(i);case"ii":return _b(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const s=e.getHours();let i;switch(i=12===s?Cb:0===s?Sb:s/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const s=e.getHours();let i;switch(i=s>=17?Pb:s>=12?Eb:s>=4?kb:Ib,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return jb.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):jb.H(e,t)},K:function(e,t,n){const s=e.getHours()%12;return"Ko"===t?n.ordinalNumber(s,{unit:"hour"}):_b(s,t.length)},k:function(e,t,n){let s=e.getHours();return 0===s&&(s=24),"ko"===t?n.ordinalNumber(s,{unit:"hour"}):_b(s,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jb.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jb.s(e,t)},S:function(e,t){return jb.S(e,t)},X:function(e,t,n){const s=e.getTimezoneOffset();if(0===s)return"Z";switch(t){case"X":return Ob(s);case"XXXX":case"XX":return Ab(s);default:return Ab(s,":")}},x:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"x":return Ob(s);case"xxxx":case"xx":return Ab(s);default:return Ab(s,":")}},O:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tb(s,":");default:return"GMT"+Ab(s,":")}},z:function(e,t,n){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tb(s,":");default:return"GMT"+Ab(s,":")}},t:function(e,t,n){return _b(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return _b(+e,t.length)}};function Tb(e,t=""){const n=e>0?"-":"+",s=Math.abs(e),i=Math.trunc(s/60),r=s%60;return 0===r?n+String(i):n+String(i)+t+_b(r,2)}function Ob(e,t){if(e%60==0){return(e>0?"-":"+")+_b(Math.abs(e)/60,2)}return Ab(e,t)}function Ab(e,t=""){const n=e>0?"-":"+",s=Math.abs(e);return n+_b(Math.trunc(s/60),2)+t+_b(s%60,2)}const Nb=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Fb=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Mb={p:Fb,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],s=n[1],i=n[2];if(!i)return Nb(e,t);let r;switch(s){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",Nb(s,t)).replace("{{time}}",Fb(i,t))}},Bb=/^D+$/,Db=/^Y+$/,Rb=["D","DD","YY","YYYY"];const Lb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hb=/^'([^]*?)'?$/,Gb=/''/g,Wb=/[a-zA-Z]/;function Ub(e,t,n){const s=lb(),i=n?.locale??s.locale??ab,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,o=Ly(e,n?.in);if(!Jx(o))throw new RangeError("Invalid time value");let l=t.match(zb).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Mb[t])(e,i.formatLong)}return e})).join("").match(Lb).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:qb(e)};if(Vb[t])return{isToken:!0,value:e};if(t.match(Wb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:r,weekStartsOn:a,locale:i};return l.map((s=>{if(!s.isToken)return s.value;const r=s.value;(!n?.useAdditionalWeekYearTokens&&function(e){return Db.test(e)}(r)||!n?.useAdditionalDayOfYearTokens&&function(e){return Bb.test(e)}(r))&&function(e,t,n){const s=function(e,t,n){const s="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(s),Rb.includes(e))throw new RangeError(s)}(r,t,String(e));return(0,Vb[r[0]])(o,r,i.localize,c)})).join("")}function qb(e){const t=e.match(Hb);return t?t[1].replace(Gb,"'"):e}const Zb={[vx]:[{value:"days",label:(0,w.__)("Days")},{value:"weeks",label:(0,w.__)("Weeks")},{value:"months",label:(0,w.__)("Months")},{value:"years",label:(0,w.__)("Years")}],[yx]:[{value:"days",label:(0,w.__)("Days ago")},{value:"weeks",label:(0,w.__)("Weeks ago")},{value:"months",label:(0,w.__)("Months ago")},{value:"years",label:(0,w.__)("Years ago")}]};function Yb({className:e,data:t,field:n,onChange:s,hideLabelFromVision:i,operator:r}){const o=Zb[r===vx?"inThePast":"over"],{id:l,label:c,getValue:u,setValue:d}=n,p=u({item:t}),{value:f="",unit:m=o[0].value}=p&&"object"==typeof p?p:{},g=(0,h.useCallback)((e=>s(d({item:t,value:{value:Number(e),unit:m}}))),[s,d,t,m]),v=(0,h.useCallback)((e=>s(d({item:t,value:{value:f,unit:e}}))),[s,d,t,f]);return(0,a.jsx)(b.BaseControl,{id:l,__nextHasNoMarginBottom:!0,className:Ht(e,"dataviews-controls__relative-date"),label:c,hideLabelFromVision:i,children:(0,a.jsxs)(b.__experimentalHStack,{spacing:2.5,children:[(0,a.jsx)(b.__experimentalNumberControl,{__next40pxDefaultSize:!0,className:"dataviews-controls__relative-date-number",spinControls:"none",min:1,step:1,value:f,onChange:g}),(0,a.jsx)(b.SelectControl,{className:"dataviews-controls__relative-date-unit",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Unit"),value:m,options:o,onChange:v,hideLabelFromVision:!0})]})})}const{DateCalendar:Kb,ValidatedInputControl:Xb}=Yx(b.privateApis),Qb=e=>{if(!e)return null;const t=(0,Cg.getDate)(e);return t&&Jx(t)?t:null};function Jb({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,description:l,setValue:c,getValue:u,isValid:d}=t,p=u({item:e}),f="string"==typeof p?p:void 0,[m,g]=(0,h.useState)((()=>Qb(f)||new Date)),v=(0,h.useRef)(null),y=(0,h.useRef)(),x=(0,h.useRef)(null),_=(0,h.useCallback)((t=>n(c({item:e,value:t}))),[e,n,c]);(0,h.useEffect)((()=>()=>{y.current&&clearTimeout(y.current)}),[]);const j=(0,h.useCallback)((e=>{let t;if(e){let n=e;if(f){const t=Qb(f);t&&(n=new Date(e),n.setHours(t.getHours()),n.setMinutes(t.getMinutes()))}t=n.toISOString(),_(t),y.current&&clearTimeout(y.current)}else _(void 0);x.current=v.current&&v.current.ownerDocument.activeElement,y.current=setTimeout((()=>{v.current&&(v.current.focus(),v.current.blur(),_(t),x.current&&x.current instanceof HTMLElement&&x.current.focus())}),0)}),[_,f]),S=(0,h.useCallback)((e=>{if(e){const t=new Date(e);_(t.toISOString());const n=Qb(t.toISOString());n&&g(n)}else _(void 0)}),[_]),{timezone:{string:C},l10n:{startOfWeek:k}}=(0,Cg.getSettings)(),E=d?.required&&!s?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,label:E,help:l,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(Kb,{style:{width:"100%"},selected:f&&Qb(f)||void 0,onSelect:j,month:m,onMonthChange:g,timeZone:C||void 0,weekStartsOn:k}),(0,a.jsx)(Xb,{ref:v,__next40pxDefaultSize:!0,required:!!d?.required,customValidity:Kx(d,i),type:"datetime-local",label:(0,w.__)("Date time"),hideLabelFromVision:!0,value:f?(P=Qb(f)||void 0,P?"string"==typeof P?P:Ub(P,"yyyy-MM-dd'T'HH:mm"):""):"",onChange:S})]})});var P}function $b(e,t){const n=Ly(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}var ew=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.218 5.377a.25.25 0 0 0-.436 0l-7.29 12.96a.25.25 0 0 0 .218.373h14.58a.25.25 0 0 0 .218-.372l-7.29-12.96Zm-1.743-.735c.669-1.19 2.381-1.19 3.05 0l7.29 12.96a1.75 1.75 0 0 1-1.525 2.608H4.71a1.75 1.75 0 0 1-1.525-2.608l7.29-12.96ZM12.75 17.46h-1.5v-1.5h1.5v1.5Zm-1.5-3h1.5v-5h-1.5v5Z"})});const{DateCalendar:tw,DateRangeCalendar:nw}=Yx(b.privateApis),sw=[{id:"today",label:(0,w.__)("Today"),getValue:()=>(0,Cg.getDate)(null)},{id:"yesterday",label:(0,w.__)("Yesterday"),getValue:()=>Hy((0,Cg.getDate)(null),1)},{id:"past-week",label:(0,w.__)("Past week"),getValue:()=>Hy((0,Cg.getDate)(null),7)},{id:"past-month",label:(0,w.__)("Past month"),getValue:()=>qy((0,Cg.getDate)(null),1)}],iw=[{id:"last-7-days",label:(0,w.__)("Last 7 days"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Hy(e,7),e]}},{id:"last-30-days",label:(0,w.__)("Last 30 days"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Hy(e,30),e]}},{id:"month-to-date",label:(0,w.__)("Month to date"),getValue:()=>{const e=(0,Cg.getDate)(null);return[$b(e),e]}},{id:"last-year",label:(0,w.__)("Last year"),getValue:()=>{const e=(0,Cg.getDate)(null);return[Yy(e,1),e]}},{id:"year-to-date",label:(0,w.__)("Year to date"),getValue:()=>{const e=(0,Cg.getDate)(null);return[hb(e),e]}}],rw=e=>{if(!e)return null;const t=(0,Cg.getDate)(e);return t&&Jx(t)?t:null},aw=e=>e?"string"==typeof e?e:Ub(e,"yyyy-MM-dd"):"";function ow({field:e,validity:t,inputRefs:n,isTouched:s,setIsTouched:i,children:r}){const{isValid:o}=e,[l,c]=(0,h.useState)(void 0),u=(0,h.useCallback)((()=>{const e=Array.isArray(n)?n:[n];for(const t of e){const e=t.current;if(e&&!e.validity.valid)return void c({type:"invalid",message:e.validationMessage})}c(void 0)}),[n]);(0,h.useEffect)((()=>{if(s){const e=setTimeout((()=>{t?c(Kx(o,t)):u()}),0);return()=>clearTimeout(e)}}),[s,o,t,u]);return(0,a.jsxs)("div",{onBlur:e=>{s||e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||i(!0)},children:[r,(0,a.jsx)("div",{"aria-live":"polite",children:l&&(0,a.jsxs)("p",{className:Ht("components-validated-control__indicator","invalid"===l.type?"is-invalid":void 0,"valid"===l.type?"is-valid":void 0),children:[(0,a.jsx)(b.Icon,{className:"components-validated-control__indicator-icon",icon:ew,size:16,fill:"currentColor"}),l.message]})})]})}function lw({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,setValue:l,getValue:c,isValid:u}=t,[d,p]=(0,h.useState)(null),f=c({item:e}),m="string"==typeof f?f:void 0,[g,v]=(0,h.useState)((()=>rw(m)||new Date)),[y,x]=(0,h.useState)(!1),_=(0,h.useRef)(null),j=(0,h.useCallback)((t=>n(l({item:e,value:t}))),[e,n,l]),S=(0,h.useCallback)((e=>{const t=e?Ub(e,"yyyy-MM-dd"):void 0;j(t),p(null),x(!0)}),[j]),C=(0,h.useCallback)((e=>{const t=e.getValue(),n=aw(t);v(t),j(n),p(e.id),x(!0)}),[j]),k=(0,h.useCallback)((e=>{if(j(e),e){const t=rw(e);t&&v(t)}p(null),x(!0)}),[j]),{timezone:{string:E},l10n:{startOfWeek:P}}=(0,Cg.getSettings)(),I=u?.required?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(ow,{field:t,validity:i,inputRefs:_,isTouched:y,setIsTouched:x,children:(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,className:"dataviews-controls__date",label:I,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[sw.map((e=>{const t=d===e.id;return(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:t,size:"small",onClick:()=>C(e),children:e.label},e.id)})),(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!d,size:"small",disabled:!!d,accessibleWhenDisabled:!1,children:(0,w.__)("Custom")})]}),(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:_,type:"date",label:(0,w.__)("Date"),hideLabelFromVision:!0,value:m,onChange:k,required:!!t.isValid?.required}),(0,a.jsx)(tw,{style:{width:"100%"},selected:m&&rw(m)||void 0,onSelect:S,month:g,onMonthChange:v,timeZone:E||void 0,weekStartsOn:P})]})})})}function cw({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{id:r,label:o,getValue:l,setValue:c}=t;let u;const d=l({item:e});Array.isArray(d)&&2===d.length&&d.every((e=>"string"==typeof e))&&(u=d);const p=(0,h.useCallback)((t=>{n(c({item:e,value:t}))}),[e,n,c]),[f,m]=(0,h.useState)(null),g=(0,h.useMemo)((()=>{if(!u)return{from:void 0,to:void 0};const[e,t]=u;return{from:rw(e)||void 0,to:rw(t)||void 0}}),[u]),[v,y]=(0,h.useState)((()=>g.from||new Date)),[x,_]=(0,h.useState)(!1),j=(0,h.useRef)(null),S=(0,h.useRef)(null),C=(0,h.useCallback)(((e,t)=>{e&&t?p([aw(e),aw(t)]):e||t||p(void 0)}),[p]),k=(0,h.useCallback)((e=>{C(e?.from,e?.to),m(null),_(!0)}),[C]),E=(0,h.useCallback)((e=>{const[t,n]=e.getValue();y(t),C(t,n),m(e.id),_(!0)}),[C]),P=(0,h.useCallback)(((e,t)=>{const[n,s]=u||[void 0,void 0];if(C("from"===e?t:n,"to"===e?t:s),t){const e=rw(t);e&&y(e)}m(null),_(!0)}),[u,C]),{timezone:I,l10n:V}=(0,Cg.getSettings)(),T=t.isValid?.required?`${o} (${(0,w.__)("Required")})`:o;return(0,a.jsx)(ow,{field:t,validity:i,inputRefs:[j,S],isTouched:x,setIsTouched:_,children:(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,id:r,className:"dataviews-controls__date",label:T,hideLabelFromVision:s,children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:2,wrap:!0,justify:"flex-start",children:[iw.map((e=>{const t=f===e.id;return(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:t,size:"small",onClick:()=>E(e),children:e.label},e.id)})),(0,a.jsx)(b.Button,{className:"dataviews-controls__date-preset",variant:"tertiary",isPressed:!f,size:"small",accessibleWhenDisabled:!1,disabled:!!f,children:(0,w.__)("Custom")})]}),(0,a.jsxs)(b.__experimentalHStack,{spacing:2,children:[(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:j,type:"date",label:(0,w.__)("From"),hideLabelFromVision:!0,value:u?.[0],onChange:e=>P("from",e),required:!!t.isValid?.required}),(0,a.jsx)(b.__experimentalInputControl,{__next40pxDefaultSize:!0,ref:S,type:"date",label:(0,w.__)("To"),hideLabelFromVision:!0,value:u?.[1],onChange:e=>P("to",e),required:!!t.isValid?.required})]}),(0,a.jsx)(nw,{style:{width:"100%"},selected:g,onSelect:k,month:v,onMonthChange:y,timeZone:I.string||void 0,weekStartsOn:V.startOfWeek})]})})})}var uw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M12.5939 21C14.1472 21 16.1269 20.5701 17.0711 20.1975L16.6447 18.879C16.0964 19.051 14.3299 19.6242 12.6548 19.6242C7.4467 19.6242 4.67513 16.8726 4.67513 12C4.67513 7.21338 7.50762 4.34713 12.2893 4.34713C17.132 4.34713 19.4162 7.55732 19.4162 10.7675C19.4162 14.035 19.0508 15.4968 17.4975 15.4968C16.5838 15.4968 16.0964 14.7803 16.0964 13.9777V7.5H14.4822V8.30255H14.3909C14.1777 7.67198 12.9898 7.12739 11.467 7.2707C9.18274 7.5 7.4467 9.27707 7.4467 11.8567C7.4467 14.5796 8.81726 16.672 11.467 16.758C13.203 16.8153 14.1168 16.0127 14.4822 15.1815H14.5736C14.7563 16.414 16.401 16.8439 17.467 16.8439C20.6954 16.8439 21 13.5764 21 10.7962C21 6.86943 18.0761 3 12.3807 3C6.50254 3 3 6.3535 3 11.9427C3 17.7325 6.38071 21 12.5939 21ZM11.7107 15.2962C9.73096 15.2962 9.03046 13.6051 9.03046 11.7707C9.03046 10.1083 10.0355 8.67516 11.7716 8.67516C13.599 8.67516 14.5736 9.36306 14.5736 11.7707C14.5736 14.1497 13.7513 15.2962 11.7107 15.2962Z"})});const{ValidatedInputControl:dw}=Yx(b.privateApis);function hw({data:e,field:t,onChange:n,hideLabelFromVision:s,type:i,prefix:r,suffix:o,validity:l}){const{label:c,placeholder:u,description:d,getValue:p,setValue:f,isValid:m}=t,g=p({item:e}),v=(0,h.useCallback)((t=>n(f({item:e,value:t}))),[e,f,n]);return(0,a.jsx)(dw,{required:!!m?.required,customValidity:Kx(m,l),label:c,placeholder:u,value:g??"",help:d,onChange:v,hideLabelFromVision:s,type:i,prefix:r,suffix:o,__next40pxDefaultSize:!0})}var pw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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 fw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const{ValidatedNumberControl:mw}=Yx(b.privateApis);function gw(e){if(""===e||void 0===e)return"";const t=Number(e);return Number.isFinite(t)?t:""}function vw({value:e,onChange:t,hideLabelFromVision:n,step:s}){const[i="",r=""]=e,o=(0,h.useCallback)((e=>t([gw(e),r])),[t,r]),l=(0,h.useCallback)((e=>t([i,gw(e)])),[t,i]);return(0,a.jsx)(b.BaseControl,{__nextHasNoMarginBottom:!0,help:(0,w.__)("The max. value must be greater than the min. value."),children:(0,a.jsxs)(b.Flex,{direction:"row",gap:4,children:[(0,a.jsx)(b.__experimentalNumberControl,{label:(0,w.__)("Min."),value:i,max:r?Number(r)-s:void 0,onChange:o,__next40pxDefaultSize:!0,hideLabelFromVision:n,step:s}),(0,a.jsx)(b.__experimentalNumberControl,{label:(0,w.__)("Max."),value:r,min:i?Number(i)+s:void 0,onChange:l,__next40pxDefaultSize:!0,hideLabelFromVision:n,step:s})]})})}function yw({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,decimals:r,validity:o}){const l=Math.pow(10,-1*Math.abs(r)),{label:c,description:u,getValue:d,setValue:p,isValid:f}=t,m=d({item:e})??"",g=(0,h.useCallback)((t=>{n(p({item:e,value:["",void 0].includes(t)?void 0:Number(t)}))}),[e,n,p]),v=(0,h.useCallback)((t=>{n(p({item:e,value:t}))}),[e,n,p]);if(i===fx){let e=["",""];return Array.isArray(m)&&2===m.length&&m.every((e=>"number"==typeof e||""===e))&&(e=m),(0,a.jsx)(vw,{value:e,onChange:v,hideLabelFromVision:s,step:l})}return(0,a.jsx)(mw,{required:!!f?.required,customValidity:Kx(f,o),label:c,help:u,value:m,onChange:g,__next40pxDefaultSize:!0,hideLabelFromVision:s,step:l})}const{ValidatedRadioControl:xw}=Yx(b.privateApis);const{ValidatedSelectControl:bw}=Yx(b.privateApis);const{ValidatedToggleControl:ww}=Yx(b.privateApis);const{ValidatedTextareaControl:_w}=Yx(b.privateApis);const{ValidatedToggleGroupControl:jw}=Yx(b.privateApis);const{ValidatedFormTokenField:Sw}=Yx(b.privateApis);const{ValidatedInputControl:Cw,Picker:kw}=Yx(b.privateApis),Ew=({color:e,onColorChange:t})=>{const n=e&&X(e).isValid()?e:"#ffffff";return(0,a.jsx)(b.Dropdown,{renderToggle:({onToggle:e,isOpen:t})=>(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)("button",{type:"button",onClick:e,style:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:n,border:"1px solid #ddd",cursor:"pointer",outline:t?"2px solid #007cba":"none",outlineOffset:"2px",display:"flex",alignItems:"center",justifyContent:"center",padding:0,margin:0},"aria-label":"Open color picker"})}),renderContent:()=>(0,a.jsx)("div",{style:{padding:"16px"},children:(0,a.jsx)(kw,{color:X(n),onChange:t,enableAlpha:!0})})})};var Pw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})});function Iw(e){return Array.isArray(e.elements)&&e.elements.length>0||"function"==typeof e.getElements}const Vw={array:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,placeholder:o,getValue:l,setValue:c,isValid:u}=t,d=l({item:e}),{elements:p,isLoading:f}=Vx({elements:t.elements,getElements:t.getElements}),m=(0,h.useMemo)((()=>Array.isArray(d)?d.map((e=>{const t=p?.find((t=>t.value===e));return t||{value:e,label:e}})):[]),[d,p]),g=(0,h.useCallback)((t=>{const s=t.map((e=>"object"==typeof e&&"value"in e?e.value:e));n(c({item:e,value:s}))}),[n,c,e]);return f?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(Sw,{required:!!u?.required,customValidity:Kx(u,i),label:s?void 0:r,value:m,onChange:g,placeholder:o,suggestions:p?.map((e=>e.value)),__experimentalValidateInput:e=>!t.isValid?.elements||!p||p.some((t=>t.value===e||t.label===e)),__experimentalExpandOnFocus:p&&p.length>0,__experimentalShowHowTo:!t.isValid?.elements,displayTransform:e=>{if("object"==typeof e&&"label"in e)return e.label;if("string"==typeof e&&p){const t=p.find((t=>t.value===e));return t?.label||e}return e},__experimentalRenderItem:({item:e})=>{if("string"==typeof e&&p){const t=p.find((t=>t.value===e));return(0,a.jsx)("span",{children:t?.label||e})}return(0,a.jsx)("span",{children:e})}})},checkbox:function({field:e,onChange:t,data:n,hideLabelFromVision:s,validity:i}){const{getValue:r,setValue:o,label:l,description:c,isValid:u}=e,d=(0,h.useCallback)((()=>{t(o({item:n,value:!r({item:n})}))}),[n,r,t,o]);return(0,a.jsx)(Xx,{required:!!e.isValid?.required,customValidity:Kx(u,i),hidden:s,label:l,help:c,checked:r({item:n}),onChange:d})},color:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,placeholder:o,description:l,setValue:c,isValid:u}=t,d=t.getValue({item:e})||"",p=(0,h.useCallback)((t=>{n(c({item:e,value:t.toHex()}))}),[e,n,c]),f=(0,h.useCallback)((t=>{n(c({item:e,value:t||""}))}),[e,n,c]);return(0,a.jsx)(Cw,{required:!!t.isValid?.required,customValidity:Kx(u,i),label:r,placeholder:o,value:d,help:l,onChange:f,hideLabelFromVision:s,type:"text",prefix:(0,a.jsx)(Ew,{color:d,onColorChange:p})})},datetime:function({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,validity:r}){return i===vx||i===yx?(0,a.jsx)(Yb,{className:"dataviews-controls__datetime",data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i}):(0,a.jsx)(Jb,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r})},date:function({data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i,validity:r}){return i===vx||i===yx?(0,a.jsx)(Yb,{className:"dataviews-controls__date",data:e,field:t,onChange:n,hideLabelFromVision:s,operator:i}):i===fx?(0,a.jsx)(cw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r}):(0,a.jsx)(lw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r})},email:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"email",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:uw})})})},telephone:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"tel",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:pw})})})},url:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:"url",prefix:(0,a.jsx)(b.__experimentalInputControlPrefixWrapper,{variant:"icon",children:(0,a.jsx)(b.Icon,{icon:fw})})})},integer:function(e){return(0,a.jsx)(yw,{...e,decimals:0})},number:function(e){return(0,a.jsx)(yw,{...e,decimals:2})},password:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const[r,o]=(0,h.useState)(!1),l=(0,h.useCallback)((()=>{o((e=>!e))}),[]);return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i,type:r?"text":"password",suffix:(0,a.jsx)(b.Button,{icon:r?Pw:Ao,onClick:l,size:"small",variant:"tertiary","aria-label":r?(0,w.__)("Hide password"):(0,w.__)("Show password")})})},radio:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{label:r,description:o,getValue:l,setValue:c,isValid:u}=t,{elements:d,isLoading:p}=Vx({elements:t.elements,getElements:t.getElements}),f=l({item:e}),m=(0,h.useCallback)((t=>n(c({item:e,value:t}))),[e,n,c]);return p?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(xw,{required:!!t.isValid?.required,customValidity:Kx(u,i),label:r,help:o,onChange:m,options:d,selected:f,hideLabelFromVision:s})},select:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{type:r,label:o,description:l,getValue:c,setValue:u,isValid:d}=t,p="array"===r,f=c({item:e})??(p?[]:""),m=(0,h.useCallback)((t=>n(u({item:e,value:t}))),[e,n,u]),{elements:g,isLoading:v}=Vx({elements:t.elements,getElements:t.getElements});return v?(0,a.jsx)(b.Spinner,{}):(0,a.jsx)(bw,{required:!!t.isValid?.required,customValidity:Kx(d,i),label:o,value:f,help:l,options:g,onChange:m,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:s,multiple:p})},text:function({data:e,field:t,onChange:n,hideLabelFromVision:s,config:i,validity:r}){const{prefix:o,suffix:l}=i||{};return(0,a.jsx)(hw,{data:e,field:t,onChange:n,hideLabelFromVision:s,validity:r,prefix:o?(0,h.createElement)(o):void 0,suffix:l?(0,h.createElement)(l):void 0})},toggle:function({field:e,onChange:t,data:n,hideLabelFromVision:s,validity:i}){const{label:r,description:o,getValue:l,setValue:c,isValid:u}=e,d=(0,h.useCallback)((()=>{t(c({item:n,value:!l({item:n})}))}),[t,c,n,l]);return(0,a.jsx)(ww,{required:!!u.required,customValidity:Kx(u,i),hidden:s,__nextHasNoMarginBottom:!0,label:r,help:o,checked:l({item:n}),onChange:d})},textarea:function({data:e,field:t,onChange:n,hideLabelFromVision:s,config:i,validity:r}){const{rows:o=4}=i||{},{label:l,placeholder:c,description:u,setValue:d,isValid:p}=t,f=t.getValue({item:e}),m=(0,h.useCallback)((t=>n(d({item:e,value:t}))),[e,n,d]);return(0,a.jsx)(_w,{required:!!p?.required,customValidity:Kx(p,r),label:l,placeholder:c,value:f??"",help:u,onChange:m,rows:o,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:s})},toggleGroup:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{getValue:r,setValue:o,isValid:l}=t,c=r({item:e}),u=(0,h.useCallback)((t=>n(o({item:e,value:t}))),[e,n,o]),{elements:d,isLoading:p}=Vx({elements:t.elements,getElements:t.getElements});if(p)return(0,a.jsx)(b.Spinner,{});if(0===d.length)return null;const f=d.find((e=>e.value===c));return(0,a.jsx)(jw,{required:!!t.isValid?.required,customValidity:Kx(l,i),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isBlock:!0,label:t.label,help:f?.description||t.description,onChange:u,value:c,hideLabelFromVision:s,children:d.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOption,{label:e.label,value:e.value},e.value)))})}};function Tw(e){return e&&"object"==typeof e&&"string"==typeof e.control}function Ow(e){const{control:t,...n}=e,s=Aw(t);return function(e){return(0,a.jsx)(s,{...e,config:n})}}function Aw(e){if(Object.keys(Vw).includes(e))return Vw[e];throw"Control "+e+" not found"}function Nw(e){return e.map((e=>{const t="email"===(n=e.type)?Ax:"integer"===n?Nx:"number"===n?Fx:"text"===n?Mx:"datetime"===n?Bx:"date"===n?Dx:"boolean"===n?Rx:"media"===n?Lx:"array"===n?Hx:"password"===n?Gx:"telephone"===n?Wx:"color"===n?Ux:"url"===n?qx:{sort:(e,t,n)=>"number"==typeof e&&"number"==typeof t?"asc"===n?e-t:t-e:"asc"===n?e.localeCompare(t):t.localeCompare(e),isValid:{elements:!0,custom:()=>null},Edit:null,render:({item:e,field:t})=>t.hasElements?(0,a.jsx)(Tx,{item:e,field:t}):t.getValue({item:e}),enableSorting:!0,filterBy:{defaultOperators:[Qy,Jy],validOperators:xx}};var n;const s=e.getValue||(i=e.id,({item:e})=>{const t=i.split(".");let n=e;for(const e of t)n=n.hasOwnProperty(e)?n[e]:void 0;return n});var i;const r=e.setValue||(e=>({value:t})=>{const n=e.split("."),s={};let i=s;for(const e of n.slice(0,-1))i[e]={},i=i[e];return i[n.at(-1)]=t,s})(e.id),o=e.sort??function(e,n,i){return t.sort(s({item:e}),s({item:n}),i)},l={...t.isValid,...e.isValid},c=function(e,t){return"function"==typeof e.Edit?e.Edit:"string"==typeof e.Edit?Aw(e.Edit):Tw(e.Edit)?Ow(e.Edit):Iw(e)&&"array"!==e.type?Aw("select"):"string"==typeof t.Edit?Aw(t.Edit):Tw(t.Edit)?Ow(t.Edit):t.Edit}(e,t),u=e.render??function({item:e,field:n}){return t.render({item:e,field:n})},d=function(e,t){if(!1===e.filterBy)return!1;if("object"==typeof e.filterBy){let n=e.filterBy.operators;n&&Array.isArray(n)||(n=t.filterBy?t.filterBy.defaultOperators:[]);let s=xx;return"object"==typeof t.filterBy&&(s=t.filterBy.validOperators),n=n.filter((e=>s.includes(e))),Iw(e)&&n.includes(fx)&&(n=n.filter((e=>e!==fx))),n.some((e=>bx.includes(e)))&&(n=n.filter((e=>[...bx,fx].includes(e)))),0!==n.length&&{isPrimary:!!e.filterBy.isPrimary,operators:n}}if(!1===t.filterBy)return!1;let n=t.filterBy.defaultOperators;return Iw(e)&&n.includes(fx)&&(n=n.filter((e=>e!==fx))),{operators:n}}(e,t);return{...e,label:e.label||e.id,header:e.header||e.label||e.id,getValue:s,setValue:r,render:u,sort:o,isValid:l,Edit:c,hasElements:Iw(e),enableHiding:e.enableHiding??!0,enableSorting:e.enableSorting??t.enableSorting??!0,filterBy:d,readOnly:e.readOnly??t.readOnly??!1}}))}function Fw(e=""){return My()(e.trim().toLowerCase())}const Mw=[];function Bw(e,t){switch(t){case"days":return Hy(new Date,e);case"weeks":return Wy(new Date,e);case"months":return qy(new Date,e);case"years":return Yy(new Date,e);default:return new Date}}function Dw(e,t,n){if(!e)return{data:Mw,paginationInfo:{totalItems:0,totalPages:0}};const s=Nw(n);let i=[...e];if(t.search){const e=Fw(t.search);i=i.filter((t=>s.filter((e=>e.enableGlobalSearch)).some((n=>{const s=n.getValue({item:t});return(Array.isArray(s)?s:[s]).some((t=>Fw(String(t)).includes(e)))}))))}t.filters&&t.filters?.length>0&&t.filters.forEach((e=>{const t=s.find((t=>t.id===e.field));if(t)if(e.operator===$y&&e?.value?.length>0)i=i.filter((n=>{const s=t.getValue({item:n});return Array.isArray(s)?e.value.some((e=>s.includes(e))):"string"==typeof s&&e.value.includes(s)}));else if(e.operator===ex&&e?.value?.length>0)i=i.filter((n=>{const s=t.getValue({item:n});return Array.isArray(s)?!e.value.some((e=>s.includes(e))):"string"==typeof s&&!e.value.includes(s)}));else if(e.operator===tx&&e?.value?.length>0)i=i.filter((n=>e.value.every((e=>t.getValue({item:n})?.includes(e)))));else if(e.operator===nx&&e?.value?.length>0)i=i.filter((n=>e.value.every((e=>!t.getValue({item:n})?.includes(e)))));else if(e.operator===Qy)i=i.filter((n=>e.value===t.getValue({item:n})||void 0===e.value));else if(e.operator===Jy)i=i.filter((n=>e.value!==t.getValue({item:n})));else if(e.operator===mx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return n.getTime()===s.getTime()}))}else if(e.operator===gx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return n.getTime()!==s.getTime()}))}else if(e.operator===sx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})<e.value));else if(e.operator===ix&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})>e.value));else if(e.operator===rx&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})<=e.value));else if(e.operator===ax&&void 0!==e.value)i=i.filter((n=>t.getValue({item:n})>=e.value));else if(e.operator===dx&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&s.toLowerCase().includes(String(e.value).toLowerCase())}));else if(e.operator===hx&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&!s.toLowerCase().includes(String(e.value).toLowerCase())}));else if(e.operator===px&&void 0!==e?.value)i=i.filter((n=>{const s=t.getValue({item:n});return"string"==typeof s&&e.value&&s.toLowerCase().startsWith(String(e.value).toLowerCase())}));else if(e.operator===ox&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<n))}else if(e.operator===lx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))>n))}else if(e.operator===cx&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<=n))}else if(e.operator===ux&&void 0!==e.value){const n=(0,Cg.getDate)(e.value);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))>=n))}else if(e.operator===fx&&Array.isArray(e.value)&&2===e.value.length&&void 0!==e.value[0]&&void 0!==e.value[1])i=i.filter((n=>{const s=t.getValue({item:n});return("number"==typeof s||s instanceof Date||"string"==typeof s)&&(s>=e.value[0]&&s<=e.value[1])}));else if(e.operator===vx&&void 0!==e.value?.value&&void 0!==e.value?.unit){const n=Bw(e.value.value,e.value.unit);i=i.filter((e=>{const s=(0,Cg.getDate)(t.getValue({item:e}));return s>=n&&s<=new Date}))}else if(e.operator===yx&&void 0!==e.value?.value&&void 0!==e.value?.unit){const n=Bw(e.value.value,e.value.unit);i=i.filter((e=>(0,Cg.getDate)(t.getValue({item:e}))<n))}}));const r=t.sort?.field?s.find((e=>e.id===t.sort?.field)):null,a=t.groupByField?s.find((e=>e.id===t.groupByField)):null;(r||a)&&i.sort(((e,n)=>{if(a){const t=a.sort(e,n,"asc");if(0!==t)return t}return r?r.sort(e,n,t.sort?.direction??"desc"):0}));let o=i.length,l=1;if(void 0!==t.page&&void 0!==t.perPage){const e=(t.page-1)*t.perPage;o=i?.length||0,l=Math.ceil(o/t.perPage),i=i?.slice(e,e+t.perPage)}return{data:i,paginationInfo:{totalItems:o,totalPages:l}}}const Rw=(0,h.createContext)({view:{type:Ex},onChangeView:()=>{},fields:[],data:[],paginationInfo:{totalItems:0,totalPages:0},selection:[],onChangeSelection:()=>{},setOpenedFilter:()=>{},openedFilter:null,getItemId:e=>e.id,isItemClickable:()=>!0,renderItemLink:void 0,containerWidth:0,containerRef:(0,h.createRef)(),resizeObserverRef:()=>{},defaultLayouts:{list:{},grid:{},table:{}},filters:[],isShowingFilter:!1,setIsShowingFilter:()=>{},hasInfiniteScrollHandler:!1,config:{perPageSizes:[]}});Rw.displayName="DataViewsContext";var Lw=Rw,zw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})}),Hw=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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"})}),Gw=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Ww=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})});function Uw({selection:e,onChangeSelection:t,item:n,getItemId:s,titleField:i,disabled:r,...o}){const l=s(n),c=!r&&e.includes(l),u=i?.getValue?.({item:n})||(0,w.__)("(no title)");return(0,a.jsx)(b.CheckboxControl,{className:"dataviews-selection-checkbox",__nextHasNoMarginBottom:!0,"aria-label":u,"aria-disabled":r,checked:c,onChange:()=>{r||t(e.includes(l)?e.filter((e=>l!==e)):[...e,l])},...o})}const{Menu:qw,kebabCase:Zw}=Yx(b.privateApis);function Yw({action:e,onClick:t,items:n}){const s="string"==typeof e.label?e.label:e.label(n);return(0,a.jsx)(b.Button,{disabled:!!e.disabled,accessibleWhenDisabled:!0,size:"compact",onClick:t,children:s})}function Kw({action:e,onClick:t,items:n}){const s="string"==typeof e.label?e.label:e.label(n);return(0,a.jsx)(qw.Item,{disabled:e.disabled,onClick:t,children:(0,a.jsx)(qw.ItemLabel,{children:s})})}function Xw({action:e,items:t,closeModal:n}){const s="string"==typeof e.label?e.label:e.label(t),i="function"==typeof e.modalHeader?e.modalHeader(t):e.modalHeader;return(0,a.jsx)(b.Modal,{title:i||s,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:n,focusOnMount:e.modalFocusOnMount??!0,size:e.modalSize||"medium",overlayClassName:`dataviews-action-modal dataviews-action-modal__${Zw(e.id)}`,children:(0,a.jsx)(e.RenderModal,{items:t,closeModal:n})})}function Qw({actions:e,item:t,registry:n,setActiveModalAction:s}){return(0,a.jsx)(qw.Group,{children:e.map((e=>(0,a.jsx)(Kw,{action:e,onClick:()=>{"RenderModal"in e?s(e):e.callback([t],{registry:n})},items:[t]},e.id)))})}function Jw({item:e,actions:t,isCompact:n}){const s=(0,c.useRegistry)(),{primaryActions:i,eligibleActions:r}=(0,h.useMemo)((()=>{const n=t.filter((t=>!t.isEligible||t.isEligible(e)));return{primaryActions:n.filter((e=>e.isPrimary)),eligibleActions:n}}),[t,e]);return n?(0,a.jsx)($w,{item:e,actions:r,isSmall:!0,registry:s}):(0,a.jsxs)(b.__experimentalHStack,{spacing:0,justify:"flex-end",className:"dataviews-item-actions",style:{flexShrink:0,width:"auto"},children:[(0,a.jsx)(e_,{item:e,actions:i,registry:s}),i.length<r.length&&(0,a.jsx)($w,{item:e,actions:r,registry:s})]})}function $w({item:e,actions:t,isSmall:n,registry:s}){const[i,r]=(0,h.useState)(null);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(qw,{placement:"bottom-end",children:[(0,a.jsx)(qw.TriggerButton,{render:(0,a.jsx)(b.Button,{size:n?"small":"compact",icon:No,label:(0,w.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,className:"dataviews-all-actions-button"})}),(0,a.jsx)(qw.Popover,{children:(0,a.jsx)(Qw,{actions:t,item:e,registry:s,setActiveModalAction:r})})]}),!!i&&(0,a.jsx)(Xw,{action:i,items:[e],closeModal:()=>r(null)})]})}function e_({item:e,actions:t,registry:n}){const[s,i]=(0,h.useState)(null);return(0,y.useViewportMatch)("medium","<")?null:Array.isArray(t)&&0!==t.length?(0,a.jsxs)(a.Fragment,{children:[t.map((t=>(0,a.jsx)(Yw,{action:t,onClick:()=>{"RenderModal"in t?i(t):t.callback([e],{registry:n})},items:[e]},t.id))),!!s&&(0,a.jsx)(Xw,{action:s,items:[e],closeModal:()=>i(null)})]}):null}function t_({action:e,items:t,ActionTriggerComponent:n}){const[s,i]=(0,h.useState)(!1),r={action:e,onClick:()=>{i(!0)},items:t};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n,{...r}),s&&(0,a.jsx)(Xw,{action:e,items:t,closeModal:()=>i(!1)})]})}function n_(e,t){return(0,h.useMemo)((()=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))),[e,t])}function s_(e,t){return(0,h.useMemo)((()=>t.some((t=>e.some((e=>e.supportsBulk&&(!e.isEligible||e.isEligible(t))))))),[e,t])}function i_({selection:e,onChangeSelection:t,data:n,actions:s,getItemId:i}){const r=(0,h.useMemo)((()=>n.filter((e=>s.some((t=>t.supportsBulk&&(!t.isEligible||t.isEligible(e))))))),[n,s]),o=n.filter((t=>e.includes(i(t))&&r.includes(t))),l=o.length===r.length;return(0,a.jsx)(b.CheckboxControl,{className:"dataviews-view-table-selection-checkbox",__nextHasNoMarginBottom:!0,checked:l,indeterminate:!l&&!!o.length,onChange:()=>{t(l?[]:r.map((e=>i(e))))},"aria-label":l?(0,w.__)("Deselect all"):(0,w.__)("Select all")})}function r_({action:e,onClick:t,isBusy:n,items:s}){const i="string"==typeof e.label?e.label:e.label(s);return(0,y.useViewportMatch)("medium","<")?(0,a.jsx)(b.Button,{disabled:n,accessibleWhenDisabled:!0,label:i,icon:e.icon,size:"compact",onClick:t,isBusy:n}):(0,a.jsx)(b.Button,{disabled:n,accessibleWhenDisabled:!0,size:"compact",onClick:t,isBusy:n,children:i})}const a_=[];function o_({action:e,selectedItems:t,actionInProgress:n,setActionInProgress:s}){const i=(0,c.useRegistry)(),r=(0,h.useMemo)((()=>t.filter((t=>!e.isEligible||e.isEligible(t)))),[e,t]);return"RenderModal"in e?(0,a.jsx)(t_,{action:e,items:r,ActionTriggerComponent:r_},e.id):(0,a.jsx)(r_,{action:e,onClick:async()=>{s(e.id),await e.callback(t,{registry:i}),s(null)},items:r,isBusy:n===e.id},e.id)}function l_(e,t,n,s,i,r,o,l,c){const u=r.length>0?(0,w.sprintf)((0,w._n)("%d Item selected","%d Items selected",r.length),r.length):(0,w.sprintf)((0,w._n)("%d Item","%d Items",e.length),e.length);return(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"dataviews-bulk-actions-footer__container",spacing:3,children:[(0,a.jsx)(i_,{selection:s,onChangeSelection:c,data:e,actions:t,getItemId:n}),(0,a.jsx)("span",{className:"dataviews-bulk-actions-footer__item-count",children:u}),(0,a.jsxs)(b.__experimentalHStack,{className:"dataviews-bulk-actions-footer__action-buttons",expanded:!1,spacing:1,children:[i.map((e=>(0,a.jsx)(o_,{action:e,selectedItems:r,actionInProgress:o,setActionInProgress:l},e.id))),r.length>0&&(0,a.jsx)(b.Button,{icon:Ea,showTooltip:!0,tooltipPosition:"top",size:"compact",label:(0,w.__)("Cancel"),disabled:!!o,accessibleWhenDisabled:!1,onClick:()=>{c(a_)}})]})]})}function c_({selection:e,actions:t,onChangeSelection:n,data:s,getItemId:i}){const[r,a]=(0,h.useState)(null),o=(0,h.useRef)(null),l=(0,y.useViewportMatch)("medium","<"),c=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk))),[t]),u=(0,h.useMemo)((()=>s.filter((e=>c.some((t=>!t.isEligible||t.isEligible(e)))))),[s,c]),d=(0,h.useMemo)((()=>s.filter((t=>e.includes(i(t))&&u.includes(t)))),[e,s,i,u]),p=(0,h.useMemo)((()=>t.filter((e=>e.supportsBulk&&(!l||e.icon)&&d.some((t=>!e.isEligible||e.isEligible(t)))))),[t,d,l]);return r?(o.current||(o.current=l_(s,t,i,e,p,d,r,a,n)),o.current):(o.current&&(o.current=null),l_(s,t,i,e,p,d,r,a,n))}function u_(){const{data:e,selection:t,actions:n=a_,onChangeSelection:s,getItemId:i}=(0,h.useContext)(Lw);return(0,a.jsx)(c_,{selection:t,onChangeSelection:s,data:e,actions:n,getItemId:i})}var d_=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z"})}),h_=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"})}),p_=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z"})});const{Menu:f_}=Yx(b.privateApis);function m_({children:e}){return h.Children.toArray(e).filter(Boolean).map(((e,t)=>(0,a.jsxs)(h.Fragment,{children:[t>0&&(0,a.jsx)(f_.Separator,{}),e]},t)))}const g_=(0,h.forwardRef)((function({fieldId:e,view:t,fields:n,onChangeView:s,onHide:i,setOpenedFilter:r,canMove:o=!0},l){const c=t.fields??[],u=c?.indexOf(e),d=t.sort?.field===e;let h=!1,p=!1,f=!1,m=[];const g=n.find((t=>t.id===e));if(!g)return null;h=!1!==g.enableHiding,p=!1!==g.enableSorting;const v=g.header;return m=!!g.filterBy&&g.filterBy?.operators||[],f=!(t.filters?.some((t=>e===t.field))||!g.hasElements&&!g.Edit||!1===g.filterBy||g.filterBy?.isPrimary),p||o||h||f?(0,a.jsxs)(f_,{children:[(0,a.jsxs)(f_.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:l,variant:"tertiary"}),children:[v,t.sort&&d&&(0,a.jsx)("span",{"aria-hidden":"true",children:jx[t.sort.direction]})]}),(0,a.jsx)(f_.Popover,{style:{minWidth:"240px"},children:(0,a.jsxs)(m_,{children:[p&&(0,a.jsx)(f_.Group,{children:_x.map((n=>{const i=t.sort&&d&&t.sort.direction===n,r=`${e}-${n}`;return(0,a.jsx)(f_.RadioItem,{name:"view-table-sorting",value:r,checked:i,onChange:()=>{s({...t,sort:{field:e,direction:n},showLevels:!1})},children:(0,a.jsx)(f_.ItemLabel,{children:Cx[n]})},r)}))}),f&&(0,a.jsx)(f_.Group,{children:(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:d_}),onClick:()=>{r(e),s({...t,page:1,filters:[...t.filters||[],{field:e,value:void 0,operator:m[0]}]})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Add filter")})})}),(o||h)&&g&&(0,a.jsxs)(f_.Group,{children:[o&&(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:h_}),disabled:u<1,onClick:()=>{s({...t,fields:[...c.slice(0,u-1)??[],e,c[u-1],...c.slice(u+1)]})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Move left")})}),o&&(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:p_}),disabled:u>=c.length-1,onClick:()=>{s({...t,fields:[...c.slice(0,u)??[],c[u+1],e,...c.slice(u+2)]})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Move right")})}),h&&g&&(0,a.jsx)(f_.Item,{prefix:(0,a.jsx)(b.Icon,{icon:Pw}),onClick:()=>{i(g),s({...t,fields:c.filter((t=>t!==e))})},children:(0,a.jsx)(f_.ItemLabel,{children:(0,w.__)("Hide column")})})]})]})})]}):v}));var v_=g_;function y_({item:e,isItemClickable:t,onClickItem:n,renderItemLink:s,className:i,children:r,...o}){if(!t(e))return(0,a.jsx)("div",{className:i,...o,children:r});if(s){const t=s({item:e,className:`${i} ${i}--clickable`,...o,children:r});return(0,h.cloneElement)(t,{onClick:e=>{e.stopPropagation(),t.props.onClick&&t.props.onClick(e)},onKeyDown:e=>{"Enter"!==e.key&&""!==e.key&&" "!==e.key||(e.stopPropagation(),t.props.onKeyDown&&t.props.onKeyDown(e))}})}const l=function({item:e,isItemClickable:t,onClickItem:n,className:s}){return t(e)&&n?{className:s?`${s} ${s}--clickable`:void 0,role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),n(e)},onKeyDown:t=>{"Enter"!==t.key&&""!==t.key&&" "!==t.key||(t.stopPropagation(),n(e))}}:{className:s}}({item:e,isItemClickable:t,onClickItem:n,className:i});return(0,a.jsx)("div",{...l,...o,children:r})}var x_=function({item:e,level:t,titleField:n,mediaField:s,descriptionField:i,onClickItem:r,renderItemLink:o,isItemClickable:l}){return(0,a.jsxs)(b.__experimentalHStack,{spacing:3,justify:"flex-start",children:[s&&(0,a.jsx)(y_,{item:e,isItemClickable:l,onClickItem:r,renderItemLink:o,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":n?(0,w.sprintf)((0,w.__)("Click item: %s"),n.getValue?.({item:e})):void 0,children:(0,a.jsx)(s.render,{item:e,field:s,config:{sizes:"32px"}})}),(0,a.jsxs)(b.__experimentalVStack,{spacing:0,alignment:"flex-start",className:"dataviews-view-table__primary-column-content",children:[n&&(0,a.jsxs)(y_,{item:e,isItemClickable:l,onClickItem:r,renderItemLink:o,className:"dataviews-view-table__cell-content-wrapper dataviews-title-field",children:[void 0!==t&&t>0&&(0,a.jsxs)("span",{className:"dataviews-view-table__level",children:["—".repeat(t)," "]}),(0,a.jsx)(n.render,{item:e,field:n})]}),i&&(0,a.jsx)(i.render,{item:e,field:i})]})]})};function b_({scrollContainerRef:e,enabled:t=!1}){const[n,s]=(0,h.useState)(!1),i=(0,y.useDebounce)((0,h.useCallback)((()=>{const t=e.current;t&&s((e=>{if((0,w.isRTL)())return Math.abs(e.scrollLeft)<=1;return e.scrollLeft+e.clientWidth>=e.scrollWidth-1})(t))}),[e,s]),200);return(0,h.useEffect)((()=>"undefined"!=typeof window&&t&&e.current?(i(),e.current.addEventListener("scroll",i),window.addEventListener("resize",i),()=>{e.current?.removeEventListener("scroll",i),window.removeEventListener("resize",i)}):()=>{}),[e,t]),n}function w_(e,t){return e.reduce(((e,n)=>{const s=t.getValue({item:n});return e.has(s)||e.set(s,[]),e.get(s)?.push(n),e}),new Map)}function __({item:e,fields:t,column:n,align:s}){const i=t.find((e=>e.id===n));if(!i)return null;const r=Ht("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":"end"===s,"dataviews-view-table__cell-align-center":"center"===s});return(0,a.jsx)("div",{className:r,children:(0,a.jsx)(i.render,{item:e,field:i})})}function j_({hasBulkActions:e,item:t,level:n,actions:s,fields:i,id:r,view:o,titleField:l,mediaField:c,descriptionField:u,selection:d,getItemId:p,isItemClickable:f,onClickItem:m,renderItemLink:g,onChangeSelection:v,isActionsColumnSticky:y,posinset:x}){const{paginationInfo:b}=(0,h.useContext)(Lw),w=n_(s,t),_=w&&d.includes(r),[j,S]=(0,h.useState)(!1),{showTitle:C=!0,showMedia:k=!0,showDescription:E=!0,infiniteScrollEnabled:P}=o,I=(0,h.useRef)(!1),V=o.fields??[],T=l&&C||c&&k||u&&E;return(0,a.jsxs)("tr",{className:Ht("dataviews-view-table__row",{"is-selected":w&&_,"is-hovered":j,"has-bulk-actions":w}),onMouseEnter:()=>{S(!0)},onMouseLeave:()=>{S(!1)},onTouchStart:()=>{I.current=!0},"aria-setsize":P?b.totalItems:void 0,"aria-posinset":x,role:P?"article":void 0,onClick:e=>{w&&(I.current||"Range"===document.getSelection()?.type||(((0,Xt.isAppleOS)()?e.metaKey:e.ctrlKey)?v(d.includes(r)?d.filter((e=>r!==e)):[...d,r]):v(d.includes(r)?d.filter((e=>r!==e)):[r])))},children:[e&&(0,a.jsx)("td",{className:"dataviews-view-table__checkbox-column",children:(0,a.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,a.jsx)(Uw,{item:t,selection:d,onChangeSelection:v,getItemId:p,titleField:l,disabled:!w})})}),T&&(0,a.jsx)("td",{children:(0,a.jsx)(x_,{item:t,level:n,titleField:C?l:void 0,mediaField:k?c:void 0,descriptionField:E?u:void 0,isItemClickable:f,onClickItem:m,renderItemLink:g})}),V.map((e=>{const{width:n,maxWidth:s,minWidth:r,align:l}=o.layout?.styles?.[e]??{};return(0,a.jsx)("td",{style:{width:n,maxWidth:s,minWidth:r},children:(0,a.jsx)(__,{fields:i,item:t,column:e,align:l})},e)})),!!s?.length&&(0,a.jsx)("td",{className:Ht("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":y}),onClick:e=>e.stopPropagation(),children:(0,a.jsx)(Jw,{item:t,actions:s})})]})}var S_=function({actions:e,data:t,fields:n,getItemId:s,getItemLevel:i,isLoading:r=!1,onChangeView:o,onChangeSelection:l,selection:c,setOpenedFilter:u,onClickItem:d,isItemClickable:p,renderItemLink:f,view:m,className:g,empty:v}){const{containerRef:y}=(0,h.useContext)(Lw),x=(0,h.useRef)(new Map),_=(0,h.useRef)(),[j,S]=(0,h.useState)(),C=s_(e,t);(0,h.useEffect)((()=>{_.current&&(_.current.focus(),_.current=void 0)}));const k=(0,h.useId)(),E=b_({scrollContainerRef:y,enabled:!!e?.length});if(j)return _.current=j,void S(void 0);const P=e=>{const t=x.current.get(e.id),n=t?x.current.get(t.fallback):void 0;S(n?.node)},I=!!t?.length,V=n.find((e=>e.id===m.titleField)),T=n.find((e=>e.id===m.mediaField)),O=n.find((e=>e.id===m.descriptionField)),A=m.groupByField?n.find((e=>e.id===m.groupByField)):null,N=A?w_(t,A):null,{showTitle:F=!0,showMedia:M=!0,showDescription:B=!0}=m,D=V&&F||T&&M||O&&B,R=m.fields??[],L=(e,t)=>n=>{n?x.current.set(e,{node:n,fallback:R[t>0?t-1:1]}):x.current.delete(e)},z=m.infiniteScrollEnabled&&!N;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("table",{className:Ht("dataviews-view-table",g,{[`has-${m.layout?.density}-density`]:m.layout?.density&&["compact","comfortable"].includes(m.layout.density)}),"aria-busy":r,"aria-describedby":k,role:z?"feed":void 0,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"dataviews-view-table__row",children:[C&&(0,a.jsx)("th",{className:"dataviews-view-table__checkbox-column",scope:"col",children:(0,a.jsx)(i_,{selection:c,onChangeSelection:l,data:t,actions:e,getItemId:s})}),D&&(0,a.jsx)("th",{scope:"col",children:V&&(0,a.jsx)(v_,{ref:L(V.id,0),fieldId:V.id,view:m,fields:n,onChangeView:o,onHide:P,setOpenedFilter:u,canMove:!1})}),R.map(((e,t)=>{const{width:s,maxWidth:i,minWidth:r,align:l}=m.layout?.styles?.[e]??{};return(0,a.jsx)("th",{style:{width:s,maxWidth:i,minWidth:r,textAlign:l},"aria-sort":m.sort?.direction&&m.sort?.field===e?Sx[m.sort.direction]:void 0,scope:"col",children:(0,a.jsx)(v_,{ref:L(e,t),fieldId:e,view:m,fields:n,onChangeView:o,onHide:P,setOpenedFilter:u,canMove:m.layout?.enableMoving??!0})},e)})),!!e?.length&&(0,a.jsx)("th",{className:Ht("dataviews-view-table__actions-column",{"dataviews-view-table__actions-column--sticky":!0,"dataviews-view-table__actions-column--stuck":!E}),children:(0,a.jsx)("span",{className:"dataviews-view-table-header",children:(0,w.__)("Actions")})})]})}),I&&A&&N?Array.from(N.entries()).map((([t,r])=>(0,a.jsxs)("tbody",{children:[(0,a.jsx)("tr",{className:"dataviews-view-table__group-header-row",children:(0,a.jsx)("td",{colSpan:R.length+(D?1:0)+(C?1:0)+(e?.length?1:0),className:"dataviews-view-table__group-header-cell",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),A.label,t)})}),r.map(((t,r)=>(0,a.jsx)(j_,{item:t,level:m.showLevels&&"function"==typeof i?i(t):void 0,hasBulkActions:C,actions:e,fields:n,id:s(t)||r.toString(),view:m,titleField:V,mediaField:T,descriptionField:O,selection:c,getItemId:s,onChangeSelection:l,onClickItem:d,renderItemLink:f,isItemClickable:p,isActionsColumnSticky:!E},s(t))))]},`group-${t}`))):(0,a.jsx)("tbody",{children:I&&t.map(((t,r)=>(0,a.jsx)(j_,{item:t,level:m.showLevels&&"function"==typeof i?i(t):void 0,hasBulkActions:C,actions:e,fields:n,id:s(t)||r.toString(),view:m,titleField:V,mediaField:T,descriptionField:O,selection:c,getItemId:s,onChangeSelection:l,onClickItem:d,renderItemLink:f,isItemClickable:p,isActionsColumnSticky:!E,posinset:z?r+1:void 0},s(t))))})]}),(0,a.jsxs)("div",{className:Ht({"dataviews-loading":r,"dataviews-no-results":!I&&!r}),id:k,children:[!I&&(r?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):v),I&&r&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})]})};const C_=(0,h.forwardRef)((({className:e,previewSize:t,...n},s)=>(0,a.jsx)("div",{ref:s,className:Ht("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...n}))),{Badge:k_}=Yx(b.privateApis);function E_({view:e,selection:t,onChangeSelection:n,onClickItem:s,isItemClickable:i,renderItemLink:r,getItemId:o,item:l,actions:c,mediaField:u,titleField:d,descriptionField:p,regularFields:f,badgeFields:m,hasBulkActions:g,config:v,posinset:x}){const{showTitle:_=!0,showMedia:j=!0,showDescription:S=!0,infiniteScrollEnabled:C}=e,k=n_(c,l),E=o(l),P=(0,y.useInstanceId)(E_),I=t.includes(E),V=u?.render?(0,a.jsx)(u.render,{item:l,field:u,config:v}):null,T=_&&d?.render?(0,a.jsx)(d.render,{item:l,field:d}):null,O=j&&V;let A,N;i(l)&&s&&(T?(A={"aria-labelledby":`dataviews-view-grid__title-field-${P}`},N={id:`dataviews-view-grid__title-field-${P}`}):A={"aria-label":(0,w.__)("Navigate to item")});const{paginationInfo:F}=(0,h.useContext)(Lw);return(0,a.jsxs)(b.__experimentalVStack,{spacing:0,className:Ht("dataviews-view-grid__card",{"is-selected":k&&I}),onClickCapture:e=>{if((0,Xt.isAppleOS)()?e.metaKey:e.ctrlKey){if(e.stopPropagation(),e.preventDefault(),!k)return;n(t.includes(E)?t.filter((e=>E!==e)):[...t,E])}},role:C?"article":void 0,"aria-setsize":C?F.totalItems:void 0,"aria-posinset":x,children:[O&&(0,a.jsx)(y_,{item:l,isItemClickable:i,onClickItem:s,renderItemLink:r,className:"dataviews-view-grid__media",...A,children:V}),g&&O&&(0,a.jsx)(Uw,{item:l,selection:t,onChangeSelection:n,getItemId:o,titleField:d,disabled:!k}),!_&&O&&!!c?.length&&(0,a.jsx)("div",{className:"dataviews-view-grid__media-actions",children:(0,a.jsx)(Jw,{item:l,actions:c,isCompact:!0})}),_&&(0,a.jsxs)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-grid__title-actions",children:[(0,a.jsx)(y_,{item:l,isItemClickable:i,onClickItem:s,renderItemLink:r,className:"dataviews-view-grid__title-field dataviews-title-field",...N,children:T}),!!c?.length&&(0,a.jsx)(Jw,{item:l,actions:c,isCompact:!0})]}),(0,a.jsxs)(b.__experimentalVStack,{spacing:1,children:[S&&p?.render&&(0,a.jsx)(p.render,{item:l,field:p}),!!m?.length&&(0,a.jsx)(b.__experimentalHStack,{className:"dataviews-view-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:m.map((e=>(0,a.jsx)(k_,{className:"dataviews-view-grid__field-value",children:(0,a.jsx)(e.render,{item:l,field:e})},e.id)))}),!!f?.length&&(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-grid__fields",spacing:1,children:f.map((e=>(0,a.jsx)(b.Flex,{className:"dataviews-view-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Tooltip,{text:e.label,children:(0,a.jsx)(b.FlexItem,{className:"dataviews-view-grid__field-name",children:e.header})}),(0,a.jsx)(b.FlexItem,{className:"dataviews-view-grid__field-value",style:{maxHeight:"none"},children:(0,a.jsx)(e.render,{item:l,field:e})})]})},e.id)))})]})]},E)}var P_=function({actions:e,data:t,fields:n,getItemId:s,isLoading:i,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,selection:u,view:d,className:p,empty:f}){const{resizeObserverRef:m}=(0,h.useContext)(Lw),g=n.find((e=>e.id===d?.titleField)),v=n.find((e=>e.id===d?.mediaField)),y=n.find((e=>e.id===d?.descriptionField)),x=d.fields??[],{regularFields:_,badgeFields:j}=x.reduce(((e,t)=>{const s=n.find((e=>e.id===t));if(!s)return e;return e[d.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(s),e}),{regularFields:[],badgeFields:[]}),S=!!t?.length,C=s_(e,t),k=d.layout?.previewSize,E="900px",P=d.groupByField?n.find((e=>e.id===d.groupByField)):null,I=P?w_(t,P):null,V=d.infiniteScrollEnabled&&!I;return(0,a.jsxs)(a.Fragment,{children:[S&&P&&I&&(0,a.jsx)(b.__experimentalVStack,{spacing:4,children:Array.from(I.entries()).map((([t,n])=>(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)("h3",{className:"dataviews-view-grid__group-header",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),P.label,t)}),(0,a.jsx)(C_,{className:Ht("dataviews-view-grid",p),previewSize:k,"aria-busy":i,ref:m,children:n.map((t=>(0,a.jsx)(E_,{view:d,selection:u,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,getItemId:s,item:t,actions:e,mediaField:v,titleField:g,descriptionField:y,regularFields:_,badgeFields:j,hasBulkActions:C,config:{sizes:E}},s(t))))})]},t)))}),S&&!I&&(0,a.jsx)(C_,{className:Ht("dataviews-view-grid",p),previewSize:k,"aria-busy":i,ref:m,role:V?"feed":void 0,children:t.map(((t,n)=>(0,a.jsx)(E_,{view:d,selection:u,onChangeSelection:r,onClickItem:o,isItemClickable:l,renderItemLink:c,getItemId:s,item:t,actions:e,mediaField:v,titleField:g,descriptionField:y,regularFields:_,badgeFields:j,hasBulkActions:C,config:{sizes:E},posinset:V?n+1:void 0},s(t))))}),!S&&(0,a.jsx)("div",{className:Ht({"dataviews-loading":i,"dataviews-no-results":!i}),children:i?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):f}),S&&i&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})};const{Menu:I_}=Yx(b.privateApis);function V_(e){return`${e}-item-wrapper`}function T_(e){return`${e}-dropdown`}function O_({idPrefix:e,primaryAction:t,item:n}){const s=(0,c.useRegistry)(),[i,r]=(0,h.useState)(!1),o=function(e,t){return`${e}-primary-action-${t}`}(e,t.id),l="string"==typeof t.label?t.label:t.label([n]);return"RenderModal"in t?(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:o,render:(0,a.jsx)(b.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:l,size:"small",onClick:()=>r(!0),variant:"link"}),children:i&&(0,a.jsx)(Xw,{action:t,items:[n],closeModal:()=>r(!1)})})},t.id):(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:o,render:(0,a.jsx)(b.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([n],{registry:s})},variant:"link",children:l})})},t.id)}function A_({view:e,actions:t,idPrefix:n,isSelected:s,item:i,titleField:r,mediaField:o,descriptionField:l,onSelect:u,otherFields:d,onDropdownTriggerKeyDown:p,posinset:f}){const{showTitle:m=!0,showMedia:g=!0,showDescription:v=!0,infiniteScrollEnabled:y}=e,x=(0,h.useRef)(null),_=`${n}-label`,j=`${n}-description`,S=(0,c.useRegistry)(),[C,k]=(0,h.useState)(!1),[E,P]=(0,h.useState)(null),I=({type:e})=>{k("mouseenter"===e)},{paginationInfo:V}=(0,h.useContext)(Lw);(0,h.useEffect)((()=>{s&&x.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}),[s]);const{primaryAction:T,eligibleActions:O}=(0,h.useMemo)((()=>{const e=t.filter((e=>!e.isEligible||e.isEligible(i)));return{primaryAction:e.filter((e=>e.isPrimary))[0],eligibleActions:e}}),[t,i]),A=T&&1===t.length,N=g&&o?.render?(0,a.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,a.jsx)(o.render,{item:i,field:o,config:{sizes:"52px"}})}):null,F=m&&r?.render?(0,a.jsx)(r.render,{item:i,field:r}):null,M=O?.length>0&&(0,a.jsxs)(b.__experimentalHStack,{spacing:3,className:"dataviews-view-list__item-actions",children:[T&&(0,a.jsx)(O_,{idPrefix:n,primaryAction:T,item:i}),!A&&(0,a.jsxs)("div",{role:"gridcell",children:[(0,a.jsxs)(I_,{placement:"bottom-end",children:[(0,a.jsx)(I_.TriggerButton,{render:(0,a.jsx)(b.Composite.Item,{id:T_(n),render:(0,a.jsx)(b.Button,{size:"small",icon:No,label:(0,w.__)("Actions"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:p})})}),(0,a.jsx)(I_.Popover,{children:(0,a.jsx)(Qw,{actions:O,item:i,registry:S,setActiveModalAction:P})})]}),!!E&&(0,a.jsx)(Xw,{action:E,items:[i],closeModal:()=>P(null)})]})]});return(0,a.jsx)(b.Composite.Row,{ref:x,render:(0,a.jsx)("div",{"aria-posinset":f,"aria-setsize":y?V.totalItems:void 0}),role:y?"article":"row",className:Ht({"is-selected":s,"is-hovered":C}),onMouseEnter:I,onMouseLeave:I,children:(0,a.jsxs)(b.__experimentalHStack,{className:"dataviews-view-list__item-wrapper",spacing:0,children:[(0,a.jsx)("div",{role:"gridcell",children:(0,a.jsx)(b.Composite.Item,{id:V_(n),"aria-pressed":s,"aria-labelledby":_,"aria-describedby":j,className:"dataviews-view-list__item",onClick:()=>u(i)})}),(0,a.jsxs)(b.__experimentalHStack,{spacing:3,justify:"start",alignment:"flex-start",children:[N,(0,a.jsxs)(b.__experimentalVStack,{spacing:1,className:"dataviews-view-list__field-wrapper",children:[(0,a.jsxs)(b.__experimentalHStack,{spacing:0,children:[(0,a.jsx)("div",{className:"dataviews-title-field",id:_,children:F}),M]}),v&&l?.render&&(0,a.jsx)("div",{className:"dataviews-view-list__field",children:(0,a.jsx)(l.render,{item:i,field:l})}),(0,a.jsx)("div",{className:"dataviews-view-list__fields",id:j,children:d.map((e=>(0,a.jsxs)("div",{className:"dataviews-view-list__field",children:[(0,a.jsx)(b.VisuallyHidden,{as:"span",className:"dataviews-view-list__field-label",children:e.label}),(0,a.jsx)("span",{className:"dataviews-view-list__field-value",children:(0,a.jsx)(e.render,{item:i,field:e})})]},e.id)))})]})]})]})})}function N_(e){return!!e}function F_(e){return(0,h.useMemo)((()=>e?.every((e=>e.supportsBulk))),[e])}const{Badge:M_}=Yx(b.privateApis);function B_({view:e,multiselect:t,selection:n,onChangeSelection:s,getItemId:i,item:r,mediaField:o,titleField:l,descriptionField:c,regularFields:u,badgeFields:d,config:h,posinset:p,setsize:f}){const{showTitle:m=!0,showMedia:g=!0,showDescription:v=!0}=e,y=i(r),x=n.includes(y),_=o?.render?(0,a.jsx)(o.render,{item:r,field:o,config:h}):null,j=m&&l?.render?(0,a.jsx)(l.render,{item:r,field:l}):null;return(0,a.jsxs)(b.Composite.Item,{"aria-label":l?l.getValue({item:r})||(0,w.__)("(no title)"):void 0,render:({children:e,...t})=>(0,a.jsx)(b.__experimentalVStack,{spacing:0,children:e,...t}),role:"option","aria-posinset":p,"aria-setsize":f,className:Ht("dataviews-view-picker-grid__card",{"is-selected":x}),"aria-selected":x,onClick:()=>{if(x)s(n.filter((e=>y!==e)));else{const e=t?[...n,y]:[y];s(e)}},children:[g&&_&&(0,a.jsx)("div",{className:"dataviews-view-picker-grid__media",children:_}),g&&_&&(0,a.jsx)(Uw,{item:r,selection:n,onChangeSelection:s,getItemId:i,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1}),m&&(0,a.jsx)(b.__experimentalHStack,{justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,a.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:j})}),(0,a.jsxs)(b.__experimentalVStack,{spacing:1,children:[v&&c?.render&&(0,a.jsx)(c.render,{item:r,field:c}),!!d?.length&&(0,a.jsx)(b.__experimentalHStack,{className:"dataviews-view-picker-grid__badge-fields",spacing:2,wrap:!0,alignment:"top",justify:"flex-start",children:d.map((e=>(0,a.jsx)(M_,{className:"dataviews-view-picker-grid__field-value",children:(0,a.jsx)(e.render,{item:r,field:e})},e.id)))}),!!u?.length&&(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-picker-grid__fields",spacing:1,children:u.map((e=>(0,a.jsx)(b.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:e.header}),(0,a.jsx)(b.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,a.jsx)(e.render,{item:r,field:e})})]})},e.id)))})]})]},y)}function D_({groupName:e,groupField:t,children:n}){const s=(0,y.useInstanceId)(D_,"dataviews-view-picker-grid-group__header");return(0,a.jsxs)(b.__experimentalVStack,{spacing:2,role:"group","aria-labelledby":s,children:[(0,a.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:s,children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),t.label,e)}),n]},e)}var R_=function({actions:e,data:t,fields:n,getItemId:s,isLoading:i,onChangeSelection:r,selection:o,view:l,className:c,empty:u}){const{resizeObserverRef:d,paginationInfo:p,itemListLabel:f}=(0,h.useContext)(Lw),m=n.find((e=>e.id===l?.titleField)),g=n.find((e=>e.id===l?.mediaField)),v=n.find((e=>e.id===l?.descriptionField)),y=l.fields??[],{regularFields:x,badgeFields:w}=y.reduce(((e,t)=>{const s=n.find((e=>e.id===t));if(!s)return e;return e[l.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(s),e}),{regularFields:[],badgeFields:[]}),_=!!t?.length,j=l.layout?.previewSize,S=F_(e),C="900px",k=l.groupByField?n.find((e=>e.id===l.groupByField)):null,E=k?w_(t,k):null,P=l.infiniteScrollEnabled&&!E,I=l?.page??1,V=l?.perPage??0,T=P?p?.totalItems:void 0;return(0,a.jsxs)(a.Fragment,{children:[_&&k&&E&&(0,a.jsx)(b.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":S,className:Ht("dataviews-view-picker-grid",c),"aria-label":f,render:({children:e,...t})=>(0,a.jsx)(b.__experimentalVStack,{spacing:4,children:e,...t}),children:Array.from(E.entries()).map((([e,n])=>(0,a.jsx)(D_,{groupName:e,groupField:k,children:(0,a.jsx)(C_,{previewSize:j,style:{gridTemplateColumns:j&&`repeat(auto-fill, minmax(${j}px, 1fr))`},"aria-busy":i,ref:d,children:n.map((e=>{const n=(I-1)*V+t.indexOf(e)+1;return(0,a.jsx)(B_,{view:l,multiselect:S,selection:o,onChangeSelection:r,getItemId:s,item:e,mediaField:g,titleField:m,descriptionField:v,regularFields:x,badgeFields:w,config:{sizes:C},posinset:n,setsize:T},s(e))}))})},e)))}),_&&!E&&(0,a.jsx)(b.Composite,{render:(0,a.jsx)(C_,{className:Ht("dataviews-view-picker-grid",c),previewSize:j,"aria-busy":i,ref:d}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":S,"aria-label":f,children:t.map(((e,t)=>{let n=P?t+1:void 0;return P||(n=(I-1)*V+t+1),(0,a.jsx)(B_,{view:l,multiselect:S,selection:o,onChangeSelection:r,getItemId:s,item:e,mediaField:g,titleField:m,descriptionField:v,regularFields:x,badgeFields:w,config:{sizes:C},posinset:n,setsize:T},s(e))}))}),!_&&(0,a.jsx)("div",{className:Ht({"dataviews-loading":i,"dataviews-no-results":!i}),children:i?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):u}),_&&i&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})};const L_=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function z_(){const e=(0,h.useContext)(Lw),t=e.view,n=L_.filter((t=>e.containerWidth>=t.breakpoint)),s=t.layout?.previewSize??230,i=n.map(((e,t)=>({...e,index:t}))).filter((e=>e.value<=s)).sort(((e,t)=>t.value-e.value))[0]?.index??0,r=n.map(((e,t)=>({value:t})));return(0,a.jsx)(b.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,showTooltip:!1,label:(0,w.__)("Preview size"),value:i,min:0,max:n.length-1,withInputField:!1,onChange:(s=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:n[s].value}})},step:1,marks:r})}const H_=[{type:Ex,label:(0,w.__)("Table"),component:S_,icon:zw,viewConfigOptions:function(){const e=(0,h.useContext)(Lw),t=e.view;return(0,a.jsxs)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,size:"__unstable-large",label:(0,w.__)("Density"),value:t.layout?.density||"balanced",onChange:n=>{e.onChangeView({...t,layout:{...t.layout,density:n}})},isBlock:!0,children:[(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,w._x)("Comfortable","Density option for DataView layout")},"comfortable"),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,w._x)("Balanced","Density option for DataView layout")},"balanced"),(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:"compact",label:(0,w._x)("Compact","Density option for DataView layout")},"compact")]})}},{type:Px,label:(0,w.__)("Grid"),component:P_,icon:Hw,viewConfigOptions:z_},{type:"list",label:(0,w.__)("List"),component:function e(t){const{actions:n,data:s,fields:i,getItemId:r,isLoading:o,onChangeSelection:l,selection:c,view:u,className:d,empty:p}=t,f=(0,y.useInstanceId)(e,"view-list"),m=s?.findLast((e=>c.includes(r(e)))),g=i.find((e=>e.id===u.titleField)),v=i.find((e=>e.id===u.mediaField)),x=i.find((e=>e.id===u.descriptionField)),_=(u?.fields??[]).map((e=>i.find((t=>e===t.id)))).filter(N_),j=e=>l([r(e)]),S=(0,h.useCallback)((e=>`${f}-${r(e)}`),[f,r]),C=(0,h.useCallback)(((e,t)=>t.startsWith(S(e))),[S]),[k,E]=(0,h.useState)(void 0);(0,h.useEffect)((()=>{m&&E(V_(S(m)))}),[m,S]);const P=s.findIndex((e=>C(e,k??""))),I=(0,y.usePrevious)(P),V=-1!==P,T=(0,h.useCallback)(((e,t)=>{const n=Math.min(s.length-1,Math.max(0,e));if(!s[n])return;const i=t(S(s[n]));E(i),document.getElementById(i)?.focus()}),[s,S]);(0,h.useEffect)((()=>{!V&&(void 0!==I&&-1!==I)&&T(I,V_)}),[V,T,I]);const O=(0,h.useCallback)((e=>{"ArrowDown"===e.key&&(e.preventDefault(),T(P+1,T_)),"ArrowUp"===e.key&&(e.preventDefault(),T(P-1,T_))}),[T,P]),A=s?.length;if(!A)return(0,a.jsx)("div",{className:Ht({"dataviews-loading":o,"dataviews-no-results":!A&&!o}),children:!A&&(o?(0,a.jsx)("p",{children:(0,a.jsx)(b.Spinner,{})}):p)});const N=u.groupByField?i.find((e=>e.id===u.groupByField)):null,F=N?w_(s,N):null;return A&&N&&F?(0,a.jsx)(b.Composite,{id:`${f}`,render:(0,a.jsx)("div",{}),className:"dataviews-view-list__group",role:"grid",activeId:k,setActiveId:E,children:(0,a.jsx)(b.__experimentalVStack,{spacing:4,className:Ht("dataviews-view-list",d),children:Array.from(F.entries()).map((([e,t])=>(0,a.jsxs)(b.__experimentalVStack,{spacing:2,children:[(0,a.jsx)("h3",{className:"dataviews-view-list__group-header",children:(0,w.sprintf)((0,w.__)("%1$s: %2$s"),N.label,e)}),t.map((e=>{const t=S(e);return(0,a.jsx)(A_,{view:u,idPrefix:t,actions:n,item:e,isSelected:e===m,onSelect:j,mediaField:v,titleField:g,descriptionField:x,otherFields:_,onDropdownTriggerKeyDown:O},t)}))]},e)))})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Composite,{id:f,render:(0,a.jsx)("div",{}),className:Ht("dataviews-view-list",d),role:u.infiniteScrollEnabled?"feed":"grid",activeId:k,setActiveId:E,children:s.map(((e,t)=>{const s=S(e);return(0,a.jsx)(A_,{view:u,idPrefix:s,actions:n,item:e,isSelected:e===m,onSelect:j,mediaField:v,titleField:g,descriptionField:x,otherFields:_,onDropdownTriggerKeyDown:O,posinset:u.infiniteScrollEnabled?t+1:void 0},s)}))}),A&&o&&(0,a.jsx)("p",{className:"dataviews-loading-more",children:(0,a.jsx)(b.Spinner,{})})]})},icon:(0,w.isRTL)()?Gw:Ww},{type:"pickerGrid",label:(0,w.__)("Grid"),component:R_,icon:Hw,viewConfigOptions:z_,isPicker:!0}],{Menu:G_}=Yx(b.privateApis);function W_({filters:e,view:t,onChangeView:n,setOpenedFilter:s,triggerProps:i}){const r=e.filter((e=>!e.isVisible));return(0,a.jsxs)(G_,{children:[(0,a.jsx)(G_.TriggerButton,{...i}),(0,a.jsx)(G_.Popover,{children:r.map((e=>(0,a.jsx)(G_.Item,{onClick:()=>{s(e.field),n({...t,page:1,filters:[...t.filters||[],{field:e.field,value:void 0,operator:e.operators[0]}]})},children:(0,a.jsx)(G_.ItemLabel,{children:e.name})},e.field)))})]})}var U_=(0,h.forwardRef)((function({filters:e,view:t,onChangeView:n,setOpenedFilter:s},i){if(!e.length||e.every((({isPrimary:e})=>e)))return null;const r=e.filter((e=>!e.isVisible));return(0,a.jsx)(W_,{triggerProps:{render:(0,a.jsx)(b.Button,{accessibleWhenDisabled:!0,size:"compact",className:"dataviews-filters-button",variant:"tertiary",disabled:!r.length,ref:i}),children:(0,w.__)("Add filter")},filters:e,view:t,onChangeView:n,setOpenedFilter:s})}));function q_({buttonRef:e,filtersCount:t,children:n}){return(0,h.useEffect)((()=>()=>{e.current?.focus()}),[e]),(0,a.jsxs)(a.Fragment,{children:[n,!!t&&(0,a.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var Z_=function(){const{filters:e,view:t,onChangeView:n,setOpenedFilter:s,isShowingFilter:i,setIsShowingFilter:r}=(0,h.useContext)(Lw),o=(0,h.useRef)(null),l=(0,h.useCallback)((e=>{n(e),r(!0)}),[n,r]),c=!!e.filter((e=>e.isVisible)).length;if(0===e.length)return null;const u={label:(0,w.__)("Add filter"),"aria-expanded":!1,isPressed:!1},d={label:(0,w._x)("Filter","verb"),"aria-expanded":i,isPressed:i,onClick:()=>{i||s(null),r(!i)}},p=(0,a.jsx)(b.Button,{ref:o,className:"dataviews-filters__visibility-toggle",size:"compact",icon:d_,...c?d:u});return(0,a.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:c?(0,a.jsx)(q_,{buttonRef:o,filtersCount:t.filters?.length,children:p}):(0,a.jsx)(W_,{filters:e,view:t,onChangeView:l,setOpenedFilter:s,triggerProps:{render:p}})})},Y_=Object.defineProperty,K_=Object.defineProperties,X_=Object.getOwnPropertyDescriptors,Q_=Object.getOwnPropertySymbols,J_=Object.prototype.hasOwnProperty,$_=Object.prototype.propertyIsEnumerable,ej=(e,t,n)=>t in e?Y_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tj=(e,t)=>{for(var n in t||(t={}))J_.call(t,n)&&ej(e,n,t[n]);if(Q_)for(var n of Q_(t))$_.call(t,n)&&ej(e,n,t[n]);return e},nj=(e,t)=>K_(e,X_(t)),sj=(e,t)=>{var n={};for(var s in e)J_.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&Q_)for(var s of Q_(e))t.indexOf(s)<0&&$_.call(e,s)&&(n[s]=e[s]);return n},ij=Object.defineProperty,rj=Object.defineProperties,aj=Object.getOwnPropertyDescriptors,oj=Object.getOwnPropertySymbols,lj=Object.prototype.hasOwnProperty,cj=Object.prototype.propertyIsEnumerable,uj=(e,t,n)=>t in e?ij(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dj=(e,t)=>{for(var n in t||(t={}))lj.call(t,n)&&uj(e,n,t[n]);if(oj)for(var n of oj(t))cj.call(t,n)&&uj(e,n,t[n]);return e},hj=(e,t)=>rj(e,aj(t)),pj=(e,t)=>{var n={};for(var s in e)lj.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&oj)for(var s of oj(e))t.indexOf(s)<0&&cj.call(e,s)&&(n[s]=e[s]);return n};function fj(...e){}function mj(e,t){return"function"==typeof Object.hasOwn?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t)}function gj(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}function vj(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function yj(e){return e}function xj(e,t){if(!e){if("string"!=typeof t)throw new Error("Invariant failed");throw new Error(t)}}function bj(e){return e.disabled||!0===e["aria-disabled"]||"true"===e["aria-disabled"]}function wj(e){const t={};for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}function _j(...e){for(const t of e)if(void 0!==t)return t}function jj(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Sj(e){if(!function(e){return!!e&&!!(0,Gn.isValidElement)(e)&&("ref"in e.props||"ref"in e)}(e))return null;return tj({},e.props).ref||e.ref}var Cj,kj="undefined"!=typeof window&&!!(null==(Cj=window.document)?void 0:Cj.createElement);function Ej(e){return e?"self"in e?e.document:e.ownerDocument||document:document}function Pj(e,t=!1){const{activeElement:n}=Ej(e);if(!(null==n?void 0:n.nodeName))return null;if("IFRAME"===n.tagName&&n.contentDocument)return Pj(n.contentDocument.body,t);if(t){const e=n.getAttribute("aria-activedescendant");if(e){const t=Ej(n).getElementById(e);if(t)return t}}return n}function Ij(e,t){return e===t||e.contains(t)}function Vj(e){const t=e.tagName.toLowerCase();return"button"===t||!("input"!==t||!e.type)&&-1!==Tj.indexOf(e.type)}var Tj=["button","color","file","image","reset","submit"];function Oj(e){try{const t=e instanceof HTMLInputElement&&null!==e.selectionStart,n="TEXTAREA"===e.tagName;return t||n||!1}catch(e){return!1}}function Aj(e){return e.isContentEditable||Oj(e)}function Nj(e){let t=0,n=0;if(Oj(e))t=e.selectionStart||0,n=e.selectionEnd||0;else if(e.isContentEditable){const s=Ej(e).getSelection();if((null==s?void 0:s.rangeCount)&&s.anchorNode&&Ij(e,s.anchorNode)&&s.focusNode&&Ij(e,s.focusNode)){const i=s.getRangeAt(0),r=i.cloneRange();r.selectNodeContents(e),r.setEnd(i.startContainer,i.startOffset),t=r.toString().length,r.setEnd(i.endContainer,i.endOffset),n=r.toString().length}}return{start:t,end:n}}function Fj(e,t){const n=null==e?void 0:e.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:t}function Mj(e){if(!e)return null;const t=e=>"auto"===e||"scroll"===e;if(e.clientHeight&&e.scrollHeight>e.clientHeight){const{overflowY:n}=getComputedStyle(e);if(t(n))return e}else if(e.clientWidth&&e.scrollWidth>e.clientWidth){const{overflowX:n}=getComputedStyle(e);if(t(n))return e}return Mj(e.parentElement)||document.scrollingElement||document.body}function Bj(e,...t){/text|search|password|tel|url/i.test(e.type)&&e.setSelectionRange(...t)}function Dj(e,t){const n=e.map(((e,t)=>[t,e]));let s=!1;return n.sort((([e,n],[i,r])=>{const a=t(n),o=t(r);return a===o?0:a&&o?function(e,t){return Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}(a,o)?(e>i&&(s=!0),-1):(e<i&&(s=!0),1):0})),s?n.map((([e,t])=>t)):e}function Rj(){return kj&&!!navigator.maxTouchPoints}function Lj(){return!!kj&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function zj(){return kj&&Lj()&&/apple/i.test(navigator.vendor)}function Hj(e){return Boolean(e.currentTarget&&!Ij(e.currentTarget,e.target))}function Gj(e){return e.target===e.currentTarget}function Wj(e,t){const n=new FocusEvent("blur",t),s=e.dispatchEvent(n),i=hj(dj({},t),{bubbles:!0});return e.dispatchEvent(new FocusEvent("focusout",i)),s}function Uj(e,t){const n=new MouseEvent("click",t);return e.dispatchEvent(n)}function qj(e,t){const n=t||e.currentTarget,s=e.relatedTarget;return!s||!Ij(n,s)}function Zj(e,t,n,s){const i=(e=>{if(s){const t=setTimeout(e,s);return()=>clearTimeout(t)}const t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)})((()=>{e.removeEventListener(t,r,!0),n()})),r=()=>{i(),n()};return e.addEventListener(t,r,{once:!0,capture:!0}),i}function Yj(e,t,n,s=window){const i=[];try{s.document.addEventListener(e,t,n);for(const r of Array.from(s.frames))i.push(Yj(e,t,n,r))}catch(e){}return()=>{try{s.document.removeEventListener(e,t,n)}catch(e){}for(const e of i)e()}}var Kj=tj({},Wn),Xj=Kj.useId,Qj=(Kj.useDeferredValue,Kj.useInsertionEffect),Jj=kj?Gn.useLayoutEffect:Gn.useEffect;function $j(e){const t=(0,Gn.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return Qj?Qj((()=>{t.current=e})):t.current=e,(0,Gn.useCallback)(((...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function eS(...e){return(0,Gn.useMemo)((()=>{if(e.some(Boolean))return t=>{for(const n of e)jj(n,t)}}),e)}function tS(e){if(Xj){const t=Xj();return e||t}const[t,n]=(0,Gn.useState)(e);return Jj((()=>{if(e||t)return;const s=Math.random().toString(36).slice(2,8);n(`id-${s}`)}),[e,t]),e||t}function nS(e,t,n){const s=function(e){const[t]=(0,Gn.useState)(e);return t}(n),[i,r]=(0,Gn.useState)(s);return(0,Gn.useEffect)((()=>{const n=e&&"current"in e?e.current:e;if(!n)return;const i=()=>{const e=n.getAttribute(t);r(null==e?s:e)},a=new MutationObserver(i);return a.observe(n,{attributeFilter:[t]}),i(),()=>a.disconnect()}),[e,t,s]),i}function sS(e,t){const n=(0,Gn.useRef)(!1);(0,Gn.useEffect)((()=>{if(n.current)return e();n.current=!0}),t),(0,Gn.useEffect)((()=>()=>{n.current=!1}),[])}function iS(e){return $j("function"==typeof e?e:()=>e)}function rS(e,t,n=[]){const s=(0,Gn.useCallback)((n=>(e.wrapElement&&(n=e.wrapElement(n)),t(n))),[...n,e.wrapElement]);return nj(tj({},e),{wrapElement:s})}var aS=!1,oS=0,lS=0;function cS(e){(function(e){const t=e.movementX||e.screenX-oS,n=e.movementY||e.screenY-lS;return oS=e.screenX,lS=e.screenY,t||n||!1})(e)&&(aS=!0)}function uS(){aS=!1}function dS(e){const t=Gn.forwardRef(((t,n)=>e(nj(tj({},t),{ref:n}))));return t.displayName=e.displayName||e.name,t}function hS(e,t){return Gn.memo(e,t)}function pS(e,t){const n=t,{wrapElement:s,render:i}=n,r=sj(n,["wrapElement","render"]),o=eS(t.ref,Sj(i));let l;if(Gn.isValidElement(i)){const e=nj(tj({},i.props),{ref:o});l=Gn.cloneElement(i,function(e,t){const n=tj({},e);for(const s in t){if(!mj(t,s))continue;if("className"===s){const s="className";n[s]=e[s]?`${e[s]} ${t[s]}`:t[s];continue}if("style"===s){const s="style";n[s]=e[s]?tj(tj({},e[s]),t[s]):t[s];continue}const i=t[s];if("function"==typeof i&&s.startsWith("on")){const t=e[s];if("function"==typeof t){n[s]=(...e)=>{i(...e),t(...e)};continue}}n[s]=i}return n}(r,e))}else l=i?i(r):(0,a.jsx)(e,tj({},r));return s?s(l):l}function fS(e){const t=(t={})=>e(t);return t.displayName=e.name,t}function mS(e=[],t=[]){const n=Gn.createContext(void 0),s=Gn.createContext(void 0),i=()=>Gn.useContext(n),r=t=>e.reduceRight(((e,n)=>(0,a.jsx)(n,nj(tj({},t),{children:e}))),(0,a.jsx)(n.Provider,tj({},t)));return{context:n,scopedContext:s,useContext:i,useScopedContext:(e=!1)=>{const t=Gn.useContext(s),n=i();return e?t:t||n},useProviderContext:()=>{const e=Gn.useContext(s),t=i();if(!e||e!==t)return t},ContextProvider:r,ScopedContextProvider:e=>(0,a.jsx)(r,nj(tj({},e),{children:t.reduceRight(((t,n)=>(0,a.jsx)(n,nj(tj({},e),{children:t}))),(0,a.jsx)(s.Provider,tj({},e)))}))}}var gS=mS(),vS=gS.useContext,yS=(gS.useScopedContext,gS.useProviderContext,mS([gS.ContextProvider],[gS.ScopedContextProvider])),xS=yS.useContext,bS=(yS.useScopedContext,yS.useProviderContext),wS=yS.ContextProvider,_S=yS.ScopedContextProvider,jS=(0,Gn.createContext)(void 0),SS=(0,Gn.createContext)(void 0),CS=((0,Gn.createContext)(null),(0,Gn.createContext)(null),mS([wS],[_S])),kS=CS.useContext;CS.useScopedContext,CS.useProviderContext,CS.ContextProvider,CS.ScopedContextProvider;function ES(e,t){const n=e.__unstableInternals;return xj(n,"Invalid store"),n[t]}function PS(e,...t){let n=e,s=n,i=Symbol(),r=fj;const a=new Set,o=new Set,l=new Set,c=new Set,u=new Set,d=new WeakMap,h=new WeakMap,p=(e,t,n=c)=>(n.add(t),h.set(t,e),()=>{var e;null==(e=d.get(t))||e(),d.delete(t),h.delete(t),n.delete(t)}),f=(e,r,a=!1)=>{var l;if(!mj(n,e))return;const p=function(e,t){if(function(e){return"function"==typeof e}(e))return e(function(e){return"function"==typeof e}(t)?t():t);return e}(r,n[e]);if(p===n[e])return;if(!a)for(const n of t)null==(l=null==n?void 0:n.setState)||l.call(n,e,p);const f=n;n=hj(dj({},n),{[e]:p});const m=Symbol();i=m,o.add(e);const g=(t,s,i)=>{var r;const a=h.get(t);a&&!a.some((t=>i?i.has(t):t===e))||(null==(r=d.get(t))||r(),d.set(t,t(n,s)))};for(const e of c)g(e,f);queueMicrotask((()=>{if(i!==m)return;const e=n;for(const e of u)g(e,s,o);s=e,o.clear()}))},m={getState:()=>n,setState:f,__unstableInternals:{setup:e=>(l.add(e),()=>l.delete(e)),init:()=>{const e=a.size,s=Symbol();a.add(s);const i=()=>{a.delete(s),a.size||r()};if(e)return i;const o=(c=n,Object.keys(c)).map((e=>gj(...t.map((t=>{var n;const s=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);if(s&&mj(s,e))return OS(t,[e],(t=>{f(e,t[e],!0)}))})))));var c;const u=[];for(const e of l)u.push(e());const d=t.map(VS);return r=gj(...o,...u,...d),i},subscribe:(e,t)=>p(e,t),sync:(e,t)=>(d.set(t,t(n,n)),p(e,t)),batch:(e,t)=>(d.set(t,t(n,s)),p(e,t,u)),pick:e=>PS(function(e,t){const n={};for(const s of t)mj(e,s)&&(n[s]=e[s]);return n}(n,e),m),omit:e=>PS(function(e,t){const n=dj({},e);for(const e of t)mj(n,e)&&delete n[e];return n}(n,e),m)}};return m}function IS(e,...t){if(e)return ES(e,"setup")(...t)}function VS(e,...t){if(e)return ES(e,"init")(...t)}function TS(e,...t){if(e)return ES(e,"subscribe")(...t)}function OS(e,...t){if(e)return ES(e,"sync")(...t)}function AS(e,...t){if(e)return ES(e,"batch")(...t)}function NS(e,...t){if(e)return ES(e,"omit")(...t)}function FS(...e){const t=e.reduce(((e,t)=>{var n;const s=null==(n=null==t?void 0:t.getState)?void 0:n.call(t);return s?Object.assign(e,s):e}),{}),n=PS(t,...e);return Object.assign({},...e,n)}var MS=i(422),{useSyncExternalStore:BS}=MS;function DS(e,t=yj){const n=Gn.useCallback((t=>e?TS(e,null,t):()=>{}),[e]),s=()=>{const n="string"==typeof t?t:null,s="function"==typeof t?t:null,i=null==e?void 0:e.getState();return s?s(i):i&&n&&mj(i,n)?i[n]:void 0};return BS(n,s,s)}function RS(e,t){const n=Gn.useRef({}),s=Gn.useCallback((t=>e?TS(e,null,t):()=>{}),[e]),i=()=>{const s=null==e?void 0:e.getState();let i=!1;const r=n.current;for(const e in t){const n=t[e];if("function"==typeof n){const t=n(s);t!==r[e]&&(r[e]=t,i=!0)}if("string"==typeof n){if(!s)continue;if(!mj(s,n))continue;const t=s[n];t!==r[e]&&(r[e]=t,i=!0)}}return i&&(n.current=tj({},r)),n.current};return BS(s,i,i)}function LS(e,t,n,s){const i=mj(t,n)?t[n]:void 0,r=s?t[s]:void 0,a=function(e){const t=(0,Gn.useRef)(e);return Jj((()=>{t.current=e})),t}({value:i,setValue:r});Jj((()=>OS(e,[n],((e,t)=>{const{value:s,setValue:i}=a.current;i&&e[n]!==t[n]&&e[n]!==s&&i(e[n])}))),[e,n]),Jj((()=>{if(void 0!==i)return e.setState(n,i),AS(e,[n],(()=>{void 0!==i&&e.setState(n,i)}))}))}function zS(e,t,n){return sS(t,[n.store]),LS(e,n,"items","setItems"),e}function HS(e){const t=tS(e.id);return tj({id:t},e)}function GS(e,t,n){return LS(e=zS(e,t,n),n,"activeId","setActiveId"),LS(e,n,"includesBaseElement"),LS(e,n,"virtualFocus"),LS(e,n,"orientation"),LS(e,n,"rtl"),LS(e,n,"focusLoop"),LS(e,n,"focusWrap"),LS(e,n,"focusShift"),e}function WS(e,t,n){return sS(t,[n.store,n.disclosure]),LS(e,n,"open","setOpen"),LS(e,n,"mounted","setMounted"),LS(e,n,"animated"),Object.assign(e,{disclosure:n.disclosure})}function US(e,t,n){return WS(e,t,n)}function qS(e,t,n){return sS(t,[n.popover]),LS(e,n,"placement"),US(e,t,n)}function ZS(e={}){var t;e.store;const n=null==(t=e.store)?void 0:t.getState(),s=_j(e.items,null==n?void 0:n.items,e.defaultItems,[]),i=new Map(s.map((e=>[e.id,e]))),r={items:s,renderedItems:_j(null==n?void 0:n.renderedItems,[])},a=function(e){return null==e?void 0:e.__unstablePrivateStore}(e.store),o=PS({items:s,renderedItems:r.renderedItems},a),l=PS(r,e.store),c=e=>{const t=Dj(e,(e=>e.element));o.setState("renderedItems",t),l.setState("renderedItems",t)};IS(l,(()=>VS(o))),IS(o,(()=>AS(o,["items"],(e=>{l.setState("items",e.items)})))),IS(o,(()=>AS(o,["renderedItems"],(e=>{let t=!0,n=requestAnimationFrame((()=>{const{renderedItems:t}=l.getState();e.renderedItems!==t&&c(e.renderedItems)}));if("function"!=typeof IntersectionObserver)return()=>cancelAnimationFrame(n);const s=function(e){var t;const n=e.find((e=>!!e.element)),s=[...e].reverse().find((e=>!!e.element));let i=null==(t=null==n?void 0:n.element)?void 0:t.parentElement;for(;i&&(null==s?void 0:s.element);){if(s&&i.contains(s.element))return i;i=i.parentElement}return Ej(i).body}(e.renderedItems),i=new IntersectionObserver((()=>{t?t=!1:(cancelAnimationFrame(n),n=requestAnimationFrame((()=>c(e.renderedItems))))}),{root:s});for(const t of e.renderedItems)t.element&&i.observe(t.element);return()=>{cancelAnimationFrame(n),i.disconnect()}}))));const u=(e,t,n=!1)=>{let s;t((t=>{const n=t.findIndex((({id:t})=>t===e.id)),r=t.slice();if(-1!==n){s=t[n];const a=dj(dj({},s),e);r[n]=a,i.set(e.id,a)}else r.push(e),i.set(e.id,e);return r}));return()=>{t((t=>{if(!s)return n&&i.delete(e.id),t.filter((({id:t})=>t!==e.id));const r=t.findIndex((({id:t})=>t===e.id));if(-1===r)return t;const a=t.slice();return a[r]=s,i.set(e.id,s),a}))}},d=e=>u(e,(e=>o.setState("items",e)),!0);return hj(dj({},l),{registerItem:d,renderItem:e=>gj(d(e),u(e,(e=>o.setState("renderedItems",e)))),item:e=>{if(!e)return null;let t=i.get(e);if(!t){const{items:n}=o.getState();t=n.find((t=>t.id===e)),t&&i.set(e,t)}return t||null},__unstablePrivateStore:o})}function YS(e){const t=[];for(const n of e)t.push(...n);return t}function KS(e){return e.slice().reverse()}var XS={id:null};function QS(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}function JS(e,t){return e.filter((e=>e.rowId===t))}function $S(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}function eC(e){let t=0;for(const{length:n}of e)n>t&&(t=n);return t}function tC(e={}){var t;const n=null==(t=e.store)?void 0:t.getState(),s=ZS(e),i=_j(e.activeId,null==n?void 0:n.activeId,e.defaultActiveId),r=PS(hj(dj({},s.getState()),{id:_j(e.id,null==n?void 0:n.id,`id-${Math.random().toString(36).slice(2,8)}`),activeId:i,baseElement:_j(null==n?void 0:n.baseElement,null),includesBaseElement:_j(e.includesBaseElement,null==n?void 0:n.includesBaseElement,null===i),moves:_j(null==n?void 0:n.moves,0),orientation:_j(e.orientation,null==n?void 0:n.orientation,"both"),rtl:_j(e.rtl,null==n?void 0:n.rtl,!1),virtualFocus:_j(e.virtualFocus,null==n?void 0:n.virtualFocus,!1),focusLoop:_j(e.focusLoop,null==n?void 0:n.focusLoop,!1),focusWrap:_j(e.focusWrap,null==n?void 0:n.focusWrap,!1),focusShift:_j(e.focusShift,null==n?void 0:n.focusShift,!1)}),s,e.store);IS(r,(()=>OS(r,["renderedItems","activeId"],(e=>{r.setState("activeId",(t=>{var n;return void 0!==t?t:null==(n=QS(e.renderedItems))?void 0:n.id}))}))));const a=(e="next",t={})=>{var n,s;const i=r.getState(),{skip:a=0,activeId:o=i.activeId,focusShift:l=i.focusShift,focusLoop:c=i.focusLoop,focusWrap:u=i.focusWrap,includesBaseElement:d=i.includesBaseElement,renderedItems:h=i.renderedItems,rtl:p=i.rtl}=t,f="up"===e||"down"===e,m="next"===e||"down"===e,g=m?p&&!f:!p||f,v=l&&!a;let y=f?YS(function(e,t,n){const s=eC(e);for(const i of e)for(let e=0;e<s;e+=1){const s=i[e];if(!s||n&&s.disabled){const s=0===e&&n?QS(i):i[e-1];i[e]=s&&t!==s.id&&n?s:{id:"__EMPTY_ITEM__",disabled:!0,rowId:null==s?void 0:s.rowId}}}return e}($S(h),o,v)):h;if(y=g?KS(y):y,y=f?function(e){const t=$S(e),n=eC(t),s=[];for(let e=0;e<n;e+=1)for(const n of t){const t=n[e];t&&s.push(hj(dj({},t),{rowId:t.rowId?`${e}`:void 0}))}return s}(y):y,null==o)return null==(n=QS(y))?void 0:n.id;const x=y.find((e=>e.id===o));if(!x)return null==(s=QS(y))?void 0:s.id;const b=y.some((e=>e.rowId)),w=y.indexOf(x),_=y.slice(w+1),j=JS(_,x.rowId);if(a){const e=function(e,t){return e.filter((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(j,o),t=e.slice(a)[0]||e[e.length-1];return null==t?void 0:t.id}const S=c&&(f?"horizontal"!==c:"vertical"!==c),C=b&&u&&(f?"horizontal"!==u:"vertical"!==u),k=m?(!b||f)&&S&&d:!!f&&d;if(S){const e=function(e,t,n=!1){const s=e.findIndex((e=>e.id===t));return[...e.slice(s+1),...n?[XS]:[],...e.slice(0,s)]}(C&&!k?y:JS(y,x.rowId),o,k),t=QS(e,o);return null==t?void 0:t.id}if(C){const e=QS(k?j:_,o);return k?(null==e?void 0:e.id)||null:null==e?void 0:e.id}const E=QS(j,o);return!E&&k?null:null==E?void 0:E.id};return hj(dj(dj({},s),r),{setBaseElement:e=>r.setState("baseElement",e),setActiveId:e=>r.setState("activeId",e),move:e=>{void 0!==e&&(r.setState("activeId",e),r.setState("moves",(e=>e+1)))},first:()=>{var e;return null==(e=QS(r.getState().renderedItems))?void 0:e.id},last:()=>{var e;return null==(e=QS(KS(r.getState().renderedItems)))?void 0:e.id},next:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("next",e)),previous:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("previous",e)),down:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("down",e)),up:e=>(void 0!==e&&"number"==typeof e&&(e={skip:e}),a("up",e))})}function nC(e={}){return function(e={}){const t=FS(e.store,NS(e.disclosure,["contentElement","disclosureElement"])),n=null==t?void 0:t.getState(),s=_j(e.open,null==n?void 0:n.open,e.defaultOpen,!1),i=_j(e.animated,null==n?void 0:n.animated,!1),r=PS({open:s,animated:i,animating:!!i&&s,mounted:s,contentElement:_j(null==n?void 0:n.contentElement,null),disclosureElement:_j(null==n?void 0:n.disclosureElement,null)},t);return IS(r,(()=>OS(r,["animated","animating"],(e=>{e.animated||r.setState("animating",!1)})))),IS(r,(()=>TS(r,["open"],(()=>{r.getState().animated&&r.setState("animating",!0)})))),IS(r,(()=>OS(r,["open","animating"],(e=>{r.setState("mounted",e.open||e.animating)})))),hj(dj({},r),{disclosure:e.disclosure,setOpen:e=>r.setState("open",e),show:()=>r.setState("open",!0),hide:()=>r.setState("open",!1),toggle:()=>r.setState("open",(e=>!e)),stopAnimation:()=>r.setState("animating",!1),setContentElement:e=>r.setState("contentElement",e),setDisclosureElement:e=>r.setState("disclosureElement",e)})}(e)}var sC=zj()&&Rj();function iC(e={}){var t=e,{tag:n}=t,s=pj(t,["tag"]);const i=FS(s.store,function(e,...t){if(e)return ES(e,"pick")(...t)}(n,["value","rtl"])),r=null==n?void 0:n.getState(),a=null==i?void 0:i.getState(),o=_j(s.activeId,null==a?void 0:a.activeId,s.defaultActiveId,null),l=tC(hj(dj({},s),{activeId:o,includesBaseElement:_j(s.includesBaseElement,null==a?void 0:a.includesBaseElement,!0),orientation:_j(s.orientation,null==a?void 0:a.orientation,"vertical"),focusLoop:_j(s.focusLoop,null==a?void 0:a.focusLoop,!0),focusWrap:_j(s.focusWrap,null==a?void 0:a.focusWrap,!0),virtualFocus:_j(s.virtualFocus,null==a?void 0:a.virtualFocus,!0)})),c=function(e={}){var t=e,{popover:n}=t,s=pj(t,["popover"]);const i=FS(s.store,NS(n,["arrowElement","anchorElement","contentElement","popoverElement","disclosureElement"])),r=null==i?void 0:i.getState(),a=nC(hj(dj({},s),{store:i})),o=_j(s.placement,null==r?void 0:r.placement,"bottom"),l=PS(hj(dj({},a.getState()),{placement:o,currentPlacement:o,anchorElement:_j(null==r?void 0:r.anchorElement,null),popoverElement:_j(null==r?void 0:r.popoverElement,null),arrowElement:_j(null==r?void 0:r.arrowElement,null),rendered:Symbol("rendered")}),a,i);return hj(dj(dj({},a),l),{setAnchorElement:e=>l.setState("anchorElement",e),setPopoverElement:e=>l.setState("popoverElement",e),setArrowElement:e=>l.setState("arrowElement",e),render:()=>l.setState("rendered",Symbol("rendered"))})}(hj(dj({},s),{placement:_j(s.placement,null==a?void 0:a.placement,"bottom-start")})),u=_j(s.value,null==a?void 0:a.value,s.defaultValue,""),d=_j(s.selectedValue,null==a?void 0:a.selectedValue,null==r?void 0:r.values,s.defaultSelectedValue,""),h=Array.isArray(d),p=hj(dj(dj({},l.getState()),c.getState()),{value:u,selectedValue:d,resetValueOnSelect:_j(s.resetValueOnSelect,null==a?void 0:a.resetValueOnSelect,h),resetValueOnHide:_j(s.resetValueOnHide,null==a?void 0:a.resetValueOnHide,h&&!n),activeValue:null==a?void 0:a.activeValue}),f=PS(p,l,c,i);return sC&&IS(f,(()=>OS(f,["virtualFocus"],(()=>{f.setState("virtualFocus",!1)})))),IS(f,(()=>{if(n)return gj(OS(f,["selectedValue"],(e=>{Array.isArray(e.selectedValue)&&n.setValues(e.selectedValue)})),OS(n,["values"],(e=>{f.setState("selectedValue",e.values)})))})),IS(f,(()=>OS(f,["resetValueOnHide","mounted"],(e=>{e.resetValueOnHide&&(e.mounted||f.setState("value",u))})))),IS(f,(()=>OS(f,["open"],(e=>{e.open||(f.setState("activeId",o),f.setState("moves",0))})))),IS(f,(()=>OS(f,["moves","activeId"],((e,t)=>{e.moves===t.moves&&f.setState("activeValue",void 0)})))),IS(f,(()=>AS(f,["moves","renderedItems"],((e,t)=>{if(e.moves===t.moves)return;const{activeId:n}=f.getState(),s=l.item(n);f.setState("activeValue",null==s?void 0:s.value)})))),hj(dj(dj(dj({},c),l),f),{tag:n,setValue:e=>f.setState("value",e),resetValue:()=>f.setState("value",p.value),setSelectedValue:e=>f.setState("selectedValue",e)})}function rC(e={}){e=function(e){const t=kS();return HS(e=nj(tj({},e),{tag:void 0!==e.tag?e.tag:t}))}(e);const[t,n]=function(e,t){const[n,s]=Gn.useState((()=>e(t)));Jj((()=>VS(n)),[n]);const i=Gn.useCallback((e=>DS(n,e)),[n]);return[Gn.useMemo((()=>nj(tj({},n),{useState:i})),[n,i]),$j((()=>{s((n=>e(tj(tj({},t),n.getState()))))}))]}(iC,e);return function(e,t,n){return sS(t,[n.tag]),LS(e,n,"value","setValue"),LS(e,n,"selectedValue","setSelectedValue"),LS(e,n,"resetValueOnHide"),LS(e,n,"resetValueOnSelect"),Object.assign(GS(qS(e,t,n),t,n),{tag:n.tag})}(t,n,e)}var aC=mS(),oC=(aC.useContext,aC.useScopedContext,aC.useProviderContext),lC=mS([aC.ContextProvider],[aC.ScopedContextProvider]),cC=(lC.useContext,lC.useScopedContext,lC.useProviderContext,lC.ContextProvider),uC=lC.ScopedContextProvider,dC=((0,Gn.createContext)(void 0),(0,Gn.createContext)(void 0),mS([cC],[uC])),hC=(dC.useContext,dC.useScopedContext,dC.useProviderContext),pC=dC.ContextProvider,fC=dC.ScopedContextProvider,mC=(0,Gn.createContext)(void 0),gC=mS([pC,wS],[fC,_S]),vC=gC.useContext,yC=gC.useScopedContext,xC=gC.useProviderContext,bC=gC.ContextProvider,wC=gC.ScopedContextProvider,_C=(0,Gn.createContext)(void 0),jC=(0,Gn.createContext)(!1);function SC(e={}){const t=rC(e);return(0,a.jsx)(bC,{value:t,children:e.children})}var CC=fS((function(e){var t=e,{store:n}=t,s=sj(t,["store"]);const i=xC();xj(n=n||i,!1);const r=n.useState((e=>{var t;return null==(t=e.baseElement)?void 0:t.id}));return wj(s=tj({htmlFor:r},s))})),kC=hS(dS((function(e){return pS("label",CC(e))}))),EC=fS((function(e){var t=e,{store:n}=t,s=sj(t,["store"]);const i=hC();return n=n||i,s=nj(tj({},s),{ref:eS(null==n?void 0:n.setAnchorElement,s.ref)})}));dS((function(e){return pS("div",EC(e))}));function PC(e,t){return t&&e.item(t)||null}var IC=Symbol("FOCUS_SILENTLY");function VC(e,t,n){if(!t)return!1;if(t===n)return!1;const s=e.item(t.id);return!!s&&(!n||s.element!==n)}var TC=(0,Gn.createContext)(!0),OC="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function AC(e){return!!e.matches(OC)&&(!!function(e){if("function"==typeof e.checkVisibility)return e.checkVisibility();const t=e;return t.offsetWidth>0||t.offsetHeight>0||e.getClientRects().length>0}(e)&&!e.closest("[inert]"))}function NC(e){const t=Pj(e);if(!t)return!1;if(t===e)return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&n===e.id}function FC(e){const t=Pj(e);if(!t)return!1;if(Ij(e,t))return!0;const n=t.getAttribute("aria-activedescendant");return!!n&&("id"in e&&(n===e.id||!!e.querySelector(`#${CSS.escape(n)}`)))}var MC=zj(),BC=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"],DC=Symbol("safariFocusAncestor");function RC(e,t){e&&(e[DC]=t)}function LC(e){return!("input"!==e.tagName.toLowerCase()||!e.type)&&("radio"===e.type||"checkbox"===e.type)}function zC(e,t,n,s,i){return e?t?n&&!s?-1:void 0:n?i:i||0:i}function HC(e,t){return $j((n=>{null==e||e(n),n.defaultPrevented||t&&(n.stopPropagation(),n.preventDefault())}))}var GC=!0;function WC(e){const t=e.target;t&&"hasAttribute"in t&&(t.hasAttribute("data-focus-visible")||(GC=!1))}function UC(e){e.metaKey||e.ctrlKey||e.altKey||(GC=!0)}var qC=fS((function(e){var t=e,{focusable:n=!0,accessibleWhenDisabled:s,autoFocus:i,onFocusVisible:r}=t,a=sj(t,["focusable","accessibleWhenDisabled","autoFocus","onFocusVisible"]);const o=(0,Gn.useRef)(null);(0,Gn.useEffect)((()=>{n&&(Yj("mousedown",WC,!0),Yj("keydown",UC,!0))}),[n]),MC&&(0,Gn.useEffect)((()=>{if(!n)return;const e=o.current;if(!e)return;if(!LC(e))return;const t=function(e){return"labels"in e?e.labels:null}(e);if(!t)return;const s=()=>queueMicrotask((()=>e.focus()));for(const e of t)e.addEventListener("mouseup",s);return()=>{for(const e of t)e.removeEventListener("mouseup",s)}}),[n]);const l=n&&bj(a),c=!!l&&!s,[u,d]=(0,Gn.useState)(!1);(0,Gn.useEffect)((()=>{n&&c&&u&&d(!1)}),[n,c,u]),(0,Gn.useEffect)((()=>{if(!n)return;if(!u)return;const e=o.current;if(!e)return;if("undefined"==typeof IntersectionObserver)return;const t=new IntersectionObserver((()=>{AC(e)||d(!1)}));return t.observe(e),()=>t.disconnect()}),[n,u]);const h=HC(a.onKeyPressCapture,l),p=HC(a.onMouseDownCapture,l),f=HC(a.onClickCapture,l),m=a.onMouseDown,g=$j((e=>{if(null==m||m(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget;if(!MC)return;if(Hj(e))return;if(!Vj(t)&&!LC(t))return;let s=!1;const i=()=>{s=!0};t.addEventListener("focusin",i,{capture:!0,once:!0});const r=function(e){for(;e&&!AC(e);)e=e.closest(OC);return e||null}(t.parentElement);RC(r,!0),Zj(t,"mouseup",(()=>{t.removeEventListener("focusin",i,!0),RC(r,!1),s||function(e){!FC(e)&&AC(e)&&e.focus()}(t)}))})),v=(e,t)=>{if(t&&(e.currentTarget=t),!n)return;const s=e.currentTarget;s&&NC(s)&&(null==r||r(e),e.defaultPrevented||(s.dataset.focusVisible="true",d(!0)))},y=a.onKeyDownCapture,x=$j((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;if(u)return;if(e.metaKey)return;if(e.altKey)return;if(e.ctrlKey)return;if(!Gj(e))return;const t=e.currentTarget;Zj(t,"focusout",(()=>v(e,t)))})),b=a.onFocusCapture,w=$j((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!n)return;if(!Gj(e))return void d(!1);const t=e.currentTarget,s=()=>v(e,t);GC||function(e){const{tagName:t,readOnly:n,type:s}=e;return"TEXTAREA"===t&&!n||("SELECT"===t&&!n||("INPUT"!==t||n?!!e.isContentEditable||!("combobox"!==e.getAttribute("role")||!e.dataset.name):BC.includes(s)))}(e.target)?Zj(e.target,"focusout",s):d(!1)})),_=a.onBlur,j=$j((e=>{null==_||_(e),n&&qj(e)&&d(!1)})),S=(0,Gn.useContext)(TC),C=$j((e=>{n&&i&&e&&S&&queueMicrotask((()=>{NC(e)||AC(e)&&e.focus()}))})),k=function(e,t){const n=e=>{if("string"==typeof e)return e},[s,i]=(0,Gn.useState)((()=>n(t)));return Jj((()=>{const s=e&&"current"in e?e.current:e;i((null==s?void 0:s.tagName.toLowerCase())||n(t))}),[e,t]),s}(o),E=n&&function(e){return!e||"button"===e||"summary"===e||"input"===e||"select"===e||"textarea"===e||"a"===e}(k),P=n&&function(e){return!e||"button"===e||"input"===e||"select"===e||"textarea"===e}(k),I=a.style,V=(0,Gn.useMemo)((()=>c?tj({pointerEvents:"none"},I):I),[c,I]);return wj(a=nj(tj({"data-focus-visible":n&&u||void 0,"data-autofocus":i||void 0,"aria-disabled":l||void 0},a),{ref:eS(o,C,a.ref),style:V,tabIndex:zC(n,c,E,P,a.tabIndex),disabled:!(!P||!c)||void 0,contentEditable:l?void 0:a.contentEditable,onKeyPressCapture:h,onClickCapture:f,onMouseDownCapture:p,onMouseDown:g,onKeyDownCapture:x,onFocusCapture:w,onBlur:j}))}));dS((function(e){return pS("div",qC(e))}));function ZC(e,t,n){return $j((s=>{var i;if(null==t||t(s),s.defaultPrevented)return;if(s.isPropagationStopped())return;if(!Gj(s))return;if(function(e){return"Shift"===e.key||"Control"===e.key||"Alt"===e.key||"Meta"===e.key}(s))return;if(function(e){const t=e.target;return!(t&&!Oj(t)||1!==e.key.length||e.ctrlKey||e.metaKey)}(s))return;const r=e.getState(),a=null==(i=PC(e,r.activeId))?void 0:i.element;if(!a)return;const o=s,{view:l}=o,c=sj(o,["view"]);a!==(null==n?void 0:n.current)&&a.focus(),function(e,t,n){const s=new KeyboardEvent(t,n);return e.dispatchEvent(s)}(a,s.type,c)||s.preventDefault(),s.currentTarget.contains(a)&&s.stopPropagation()}))}var YC=fS((function(e){var t=e,{store:n,composite:s=!0,focusOnMove:i=s,moveOnKeyPress:r=!0}=t,o=sj(t,["store","composite","focusOnMove","moveOnKeyPress"]);const l=bS();xj(n=n||l,!1);const c=(0,Gn.useRef)(null),u=(0,Gn.useRef)(null),d=function(e){const[t,n]=(0,Gn.useState)(!1),s=(0,Gn.useCallback)((()=>n(!0)),[]),i=e.useState((t=>PC(e,t.activeId)));return(0,Gn.useEffect)((()=>{const e=null==i?void 0:i.element;t&&e&&(n(!1),e.focus({preventScroll:!0}))}),[i,t]),s}(n),h=n.useState("moves"),[,p]=function(e){const[t,n]=(0,Gn.useState)(null);return Jj((()=>{if(null==t)return;if(!e)return;let n=null;return e((e=>(n=e,t))),()=>{e(n)}}),[t,e]),[t,n]}(s?n.setBaseElement:null);(0,Gn.useEffect)((()=>{var e;if(!n)return;if(!h)return;if(!s)return;if(!i)return;const{activeId:t}=n.getState(),r=null==(e=PC(n,t))?void 0:e.element;var a,o;r&&("scrollIntoView"in(a=r)?(a.focus({preventScroll:!0}),a.scrollIntoView(dj({block:"nearest",inline:"nearest"},o))):a.focus())}),[n,h,s,i]),Jj((()=>{if(!n)return;if(!h)return;if(!s)return;const{baseElement:e,activeId:t}=n.getState();if(!(null===t))return;if(!e)return;const i=u.current;u.current=null,i&&Wj(i,{relatedTarget:e}),NC(e)||e.focus()}),[n,h,s]);const f=n.useState("activeId"),m=n.useState("virtualFocus");Jj((()=>{var e;if(!n)return;if(!s)return;if(!m)return;const t=u.current;if(u.current=null,!t)return;const i=(null==(e=PC(n,f))?void 0:e.element)||Pj(t);i!==t&&Wj(t,{relatedTarget:i})}),[n,f,m,s]);const g=ZC(n,o.onKeyDownCapture,u),v=ZC(n,o.onKeyUpCapture,u),y=o.onFocusCapture,x=$j((e=>{if(null==y||y(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:t}=n.getState();if(!t)return;const s=e.relatedTarget,i=function(e){const t=e[IC];return delete e[IC],t}(e.currentTarget);Gj(e)&&i&&(e.stopPropagation(),u.current=s)})),b=o.onFocus,w=$j((e=>{if(null==b||b(e),e.defaultPrevented)return;if(!s)return;if(!n)return;const{relatedTarget:t}=e,{virtualFocus:i}=n.getState();i?Gj(e)&&!VC(n,t)&&queueMicrotask(d):Gj(e)&&n.setActiveId(null)})),_=o.onBlurCapture,j=$j((e=>{var t;if(null==_||_(e),e.defaultPrevented)return;if(!n)return;const{virtualFocus:s,activeId:i}=n.getState();if(!s)return;const r=null==(t=PC(n,i))?void 0:t.element,a=e.relatedTarget,o=VC(n,a),l=u.current;if(u.current=null,Gj(e)&&o)a===r?l&&l!==a&&Wj(l,e):r?Wj(r,e):l&&Wj(l,e),e.stopPropagation();else{!VC(n,e.target)&&r&&Wj(r,e)}})),S=o.onKeyDown,C=iS(r),k=$j((e=>{var t;if(null==S||S(e),e.defaultPrevented)return;if(!n)return;if(!Gj(e))return;const{orientation:s,renderedItems:i,activeId:r}=n.getState(),a=PC(n,r);if(null==(t=null==a?void 0:a.element)?void 0:t.isConnected)return;const o="horizontal"!==s,l="vertical"!==s,c=i.some((e=>!!e.rowId));if(("ArrowLeft"===e.key||"ArrowRight"===e.key||"Home"===e.key||"End"===e.key)&&Oj(e.currentTarget))return;const u={ArrowUp:(c||o)&&(()=>{if(c){const e=function(e){return function(e,t){return e.find((e=>t?!e.disabled&&e.id!==t:!e.disabled))}(YS(KS(function(e){const t=[];for(const n of e){const e=t.find((e=>{var t;return(null==(t=e[0])?void 0:t.rowId)===n.rowId}));e?e.push(n):t.push([n])}return t}(e))))}(i);return null==e?void 0:e.id}return null==n?void 0:n.last()}),ArrowRight:(c||l)&&n.first,ArrowDown:(c||o)&&n.first,ArrowLeft:(c||l)&&n.last,Home:n.first,End:n.last,PageUp:n.first,PageDown:n.last},d=u[e.key];if(d){const t=d();if(void 0!==t){if(!C(e))return;e.preventDefault(),n.move(t)}}}));o=rS(o,(e=>(0,a.jsx)(wS,{value:n,children:e})),[n]);const E=n.useState((e=>{var t;if(n&&s&&e.virtualFocus)return null==(t=PC(n,e.activeId))?void 0:t.id}));o=nj(tj({"aria-activedescendant":E},o),{ref:eS(c,p,o.ref),onKeyDownCapture:g,onKeyUpCapture:v,onFocusCapture:x,onFocus:w,onBlurCapture:j,onKeyDown:k});const P=n.useState((e=>s&&(e.virtualFocus||null===e.activeId)));return o=qC(tj({focusable:P},o))}));dS((function(e){return pS("div",YC(e))}));function KC(e,t,n){if(!n)return!1;const s=e.find((e=>!e.disabled&&e.value));return(null==s?void 0:s.value)===t}function XC(e,t){return!!t&&(null!=e&&(e=vj(e),t.length>e.length&&0===t.toLowerCase().indexOf(e.toLowerCase())))}var QC=fS((function(e){var t=e,{store:n,focusable:s=!0,autoSelect:i=!1,getAutoSelectId:r,setValueOnChange:a,showMinLength:o=0,showOnChange:l,showOnMouseDown:c,showOnClick:u=c,showOnKeyDown:d,showOnKeyPress:h=d,blurActiveItemOnClick:p,setValueOnClick:f=!0,moveOnKeyPress:m=!0,autoComplete:g="list"}=t,v=sj(t,["store","focusable","autoSelect","getAutoSelectId","setValueOnChange","showMinLength","showOnChange","showOnMouseDown","showOnClick","showOnKeyDown","showOnKeyPress","blurActiveItemOnClick","setValueOnClick","moveOnKeyPress","autoComplete"]);const y=xC();xj(n=n||y,!1);const x=(0,Gn.useRef)(null),[b,w]=(0,Gn.useReducer)((()=>[]),[]),_=(0,Gn.useRef)(!1),j=(0,Gn.useRef)(!1),S=n.useState((e=>e.virtualFocus&&i)),C="inline"===g||"both"===g,[k,E]=(0,Gn.useState)(C);!function(e,t){const n=(0,Gn.useRef)(!1);Jj((()=>{if(n.current)return e();n.current=!0}),t),Jj((()=>()=>{n.current=!1}),[])}((()=>{C&&E(!0)}),[C]);const P=n.useState("value"),I=(0,Gn.useRef)();(0,Gn.useEffect)((()=>OS(n,["selectedValue","activeId"],((e,t)=>{I.current=t.selectedValue}))),[]);const V=n.useState((e=>{var t;if(C&&k){if(e.activeValue&&Array.isArray(e.selectedValue)){if(e.selectedValue.includes(e.activeValue))return;if(null==(t=I.current)?void 0:t.includes(e.activeValue))return}return e.activeValue}})),T=n.useState("renderedItems"),O=n.useState("open"),A=n.useState("contentElement"),N=(0,Gn.useMemo)((()=>{if(!C)return P;if(!k)return P;if(KC(T,V,S)){if(XC(P,V)){const e=(null==V?void 0:V.slice(P.length))||"";return P+e}return P}return V||P}),[C,k,T,V,S,P]);(0,Gn.useEffect)((()=>{const e=x.current;if(!e)return;const t=()=>E(!0);return e.addEventListener("combobox-item-move",t),()=>{e.removeEventListener("combobox-item-move",t)}}),[]),(0,Gn.useEffect)((()=>{if(!C)return;if(!k)return;if(!V)return;if(!KC(T,V,S))return;if(!XC(P,V))return;let e=fj;return queueMicrotask((()=>{const t=x.current;if(!t)return;const{start:n,end:s}=Nj(t),i=P.length,r=V.length;Bj(t,i,r),e=()=>{if(!NC(t))return;const{start:e,end:a}=Nj(t);e===i&&a===r&&Bj(t,n,s)}})),()=>e()}),[b,C,k,V,T,S,P]);const F=(0,Gn.useRef)(null),M=$j(r),B=(0,Gn.useRef)(null);(0,Gn.useEffect)((()=>{if(!O)return;if(!A)return;const e=Mj(A);if(!e)return;F.current=e;const t=()=>{_.current=!1},s=()=>{if(!n)return;if(!_.current)return;const{activeId:e}=n.getState();null!==e&&e!==B.current&&(_.current=!1)},i={passive:!0,capture:!0};return e.addEventListener("wheel",t,i),e.addEventListener("touchmove",t,i),e.addEventListener("scroll",s,i),()=>{e.removeEventListener("wheel",t,!0),e.removeEventListener("touchmove",t,!0),e.removeEventListener("scroll",s,!0)}}),[O,A,n]),Jj((()=>{P&&(j.current||(_.current=!0))}),[P]),Jj((()=>{"always"!==S&&O||(_.current=O)}),[S,O]);const D=n.useState("resetValueOnSelect");sS((()=>{var e,t;const s=_.current;if(!n)return;if(!O)return;if(!s&&!D)return;const{baseElement:i,contentElement:r,activeId:a}=n.getState();if(!i||NC(i)){if(null==r?void 0:r.hasAttribute("data-placing")){const e=new MutationObserver(w);return e.observe(r,{attributeFilter:["data-placing"]}),()=>e.disconnect()}if(S&&s){const t=M(T),s=void 0!==t?t:null!=(e=function(e){const t=e.find((e=>{var t;return!e.disabled&&"tab"!==(null==(t=e.element)?void 0:t.getAttribute("role"))}));return null==t?void 0:t.id}(T))?e:n.first();B.current=s,n.move(null!=s?s:null)}else{const e=null==(t=n.item(a||n.first()))?void 0:t.element;e&&"scrollIntoView"in e&&e.scrollIntoView({block:"nearest",inline:"nearest"})}}}),[n,O,b,P,S,D,M,T]),(0,Gn.useEffect)((()=>{if(!C)return;const e=x.current;if(!e)return;const t=[e,A].filter((e=>!!e)),s=e=>{t.every((t=>qj(e,t)))&&(null==n||n.setValue(N))};for(const e of t)e.addEventListener("focusout",s);return()=>{for(const e of t)e.removeEventListener("focusout",s)}}),[C,A,n,N]);const R=e=>e.currentTarget.value.length>=o,L=v.onChange,z=iS(null!=l?l:R),H=iS(null!=a?a:!n.tag),G=$j((e=>{if(null==L||L(e),e.defaultPrevented)return;if(!n)return;const t=e.currentTarget,{value:s,selectionStart:i,selectionEnd:r}=t,a=e.nativeEvent;if(_.current=!0,function(e){return"input"===e.type}(a)&&(a.isComposing&&(_.current=!1,j.current=!0),C)){const e="insertText"===a.inputType||"insertCompositionText"===a.inputType,t=i===s.length;E(e&&t)}if(H(e)){const e=s===n.getState().value;n.setValue(s),queueMicrotask((()=>{Bj(t,i,r)})),C&&S&&e&&w()}z(e)&&n.show(),S&&_.current||n.setActiveId(null)})),W=v.onCompositionEnd,U=$j((e=>{_.current=!0,j.current=!1,null==W||W(e),e.defaultPrevented||S&&w()})),q=v.onMouseDown,Z=iS(null!=p?p:()=>!!(null==n?void 0:n.getState().includesBaseElement)),Y=iS(f),K=iS(null!=u?u:R),X=$j((e=>{null==q||q(e),e.defaultPrevented||e.button||e.ctrlKey||n&&(Z(e)&&n.setActiveId(null),Y(e)&&n.setValue(N),K(e)&&Zj(e.currentTarget,"mouseup",n.show))})),Q=v.onKeyDown,J=iS(null!=h?h:R),$=$j((e=>{if(null==Q||Q(e),e.repeat||(_.current=!1),e.defaultPrevented)return;if(e.ctrlKey)return;if(e.altKey)return;if(e.shiftKey)return;if(e.metaKey)return;if(!n)return;const{open:t}=n.getState();t||"ArrowUp"!==e.key&&"ArrowDown"!==e.key||J(e)&&(e.preventDefault(),n.show())})),ee=v.onBlur,te=$j((e=>{_.current=!1,null==ee||ee(e),e.defaultPrevented})),ne=tS(v.id),se=function(e){return"inline"===e||"list"===e||"both"===e||"none"===e}(g)?g:void 0,ie=n.useState((e=>null===e.activeId));return v=nj(tj({id:ne,role:"combobox","aria-autocomplete":se,"aria-haspopup":Fj(A,"listbox"),"aria-expanded":O,"aria-controls":null==A?void 0:A.id,"data-active-item":ie||void 0,value:N},v),{ref:eS(x,v.ref),onChange:G,onCompositionEnd:U,onMouseDown:X,onKeyDown:$,onBlur:te}),v=YC(nj(tj({store:n,focusable:s},v),{moveOnKeyPress:e=>!function(e,...t){const n="function"==typeof e?e(...t):e;return null!=n&&!n}(m,e)&&(C&&E(!0),!0)})),v=EC(tj({store:n},v)),tj({autoComplete:"off"},v)})),JC=dS((function(e){return pS("input",QC(e))}));function $C(e,t){const n=setTimeout(t,e);return()=>clearTimeout(n)}function ek(...e){return e.join(", ").split(", ").reduce(((e,t)=>{const n=t.endsWith("ms")?1:1e3,s=Number.parseFloat(t||"0s")*n;return s>e?s:e}),0)}function tk(e,t,n){return!(n||!1===t||e&&!t)}var nk=fS((function(e){var t=e,{store:n,alwaysVisible:s}=t,i=sj(t,["store","alwaysVisible"]);const r=oC();xj(n=n||r,!1);const o=(0,Gn.useRef)(null),l=tS(i.id),[c,u]=(0,Gn.useState)(null),d=n.useState("open"),h=n.useState("mounted"),p=n.useState("animated"),f=n.useState("contentElement"),m=DS(n.disclosure,"contentElement");Jj((()=>{o.current&&(null==n||n.setContentElement(o.current))}),[n]),Jj((()=>{let e;return null==n||n.setState("animated",(t=>(e=t,!0))),()=>{void 0!==e&&(null==n||n.setState("animated",e))}}),[n]),Jj((()=>{if(p){if(null==f?void 0:f.isConnected)return function(e){let t=requestAnimationFrame((()=>{t=requestAnimationFrame(e)}));return()=>cancelAnimationFrame(t)}((()=>{u(d?"enter":h?"leave":null)}));u(null)}}),[p,f,d,h]),Jj((()=>{if(!n)return;if(!p)return;if(!c)return;if(!f)return;const e=()=>null==n?void 0:n.setState("animating",!1),t=()=>(0,Fr.flushSync)(e);if("leave"===c&&d)return;if("enter"===c&&!d)return;if("number"==typeof p){return $C(p,t)}const{transitionDuration:s,animationDuration:i,transitionDelay:r,animationDelay:a}=getComputedStyle(f),{transitionDuration:o="0",animationDuration:l="0",transitionDelay:u="0",animationDelay:h="0"}=m?getComputedStyle(m):{},g=ek(r,a,u,h)+ek(s,i,o,l);if(!g)return"enter"===c&&n.setState("animated",!1),void e();return $C(Math.max(g-1e3/60,0),t)}),[n,p,f,m,d,c]),i=rS(i,(e=>(0,a.jsx)(uC,{value:n,children:e})),[n]);const g=tk(h,i.hidden,s),v=i.style,y=(0,Gn.useMemo)((()=>g?nj(tj({},v),{display:"none"}):v),[g,v]);return wj(i=nj(tj({id:l,"data-open":d||void 0,"data-enter":"enter"===c||void 0,"data-leave":"leave"===c||void 0,hidden:g},i),{ref:eS(l?n.setContentElement:null,o,i.ref),style:y}))})),sk=dS((function(e){return pS("div",nk(e))})),ik=(dS((function(e){var t=e,{unmountOnHide:n}=t,s=sj(t,["unmountOnHide"]);const i=oC();return!1===DS(s.store||i,(e=>!n||(null==e?void 0:e.mounted)))?null:(0,a.jsx)(sk,tj({},s))})),fS((function(e){var t=e,{store:n,alwaysVisible:s}=t,i=sj(t,["store","alwaysVisible"]);const r=yC(!0),o=vC(),l=!!(n=n||o)&&n===r;xj(n,!1);const c=(0,Gn.useRef)(null),u=tS(i.id),d=n.useState("mounted"),h=tk(d,i.hidden,s),p=h?nj(tj({},i.style),{display:"none"}):i.style,f=n.useState((e=>Array.isArray(e.selectedValue))),m=nS(c,"role",i.role),g=("listbox"===m||"tree"===m||"grid"===m)&&f||void 0,[v,y]=(0,Gn.useState)(!1),x=n.useState("contentElement");Jj((()=>{if(!d)return;const e=c.current;if(!e)return;if(x!==e)return;const t=()=>{y(!!e.querySelector("[role='listbox']"))},n=new MutationObserver(t);return n.observe(e,{subtree:!0,childList:!0,attributeFilter:["role"]}),t(),()=>n.disconnect()}),[d,x]),v||(i=tj({role:"listbox","aria-multiselectable":g},i)),i=rS(i,(e=>(0,a.jsx)(wC,{value:n,children:(0,a.jsx)(mC.Provider,{value:m,children:e})})),[n,m]);const b=!u||r&&l?null:n.setContentElement;return wj(i=nj(tj({id:u,hidden:h},i),{ref:eS(b,c,i.ref),style:p}))}))),rk=dS((function(e){return pS("div",ik(e))}));function ak(e){const t=e.relatedTarget;return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE?t:null}var ok=Symbol("composite-hover");var lk=fS((function(e){var t=e,{store:n,focusOnHover:s=!0,blurOnHoverEnd:i=!!s}=t,r=sj(t,["store","focusOnHover","blurOnHoverEnd"]);const a=xS();xj(n=n||a,!1);const o=((0,Gn.useEffect)((()=>{Yj("mousemove",cS,!0),Yj("mousedown",uS,!0),Yj("mouseup",uS,!0),Yj("keydown",uS,!0),Yj("scroll",uS,!0)}),[]),$j((()=>aS))),l=r.onMouseMove,c=iS(s),u=$j((e=>{if(null==l||l(e),!e.defaultPrevented&&o()&&c(e)){if(!FC(e.currentTarget)){const e=null==n?void 0:n.getState().baseElement;e&&!NC(e)&&e.focus()}null==n||n.setActiveId(e.currentTarget.id)}})),d=r.onMouseLeave,h=iS(i),p=$j((e=>{var t;null==d||d(e),e.defaultPrevented||o()&&(function(e){const t=ak(e);return!!t&&Ij(e.currentTarget,t)}(e)||function(e){let t=ak(e);if(!t)return!1;do{if(mj(t,ok)&&t[ok])return!0;t=t.parentElement}while(t);return!1}(e)||c(e)&&h(e)&&(null==n||n.setActiveId(null),null==(t=null==n?void 0:n.getState().baseElement)||t.focus()))})),f=(0,Gn.useCallback)((e=>{e&&(e[ok]=!0)}),[]);return wj(r=nj(tj({},r),{ref:eS(f,r.ref),onMouseMove:u,onMouseLeave:p}))})),ck=(hS(dS((function(e){return pS("div",lk(e))}))),fS((function(e){var t=e,{store:n,shouldRegisterItem:s=!0,getItem:i=yj,element:r}=t,a=sj(t,["store","shouldRegisterItem","getItem","element"]);const o=vS();n=n||o;const l=tS(a.id),c=(0,Gn.useRef)(r);return(0,Gn.useEffect)((()=>{const e=c.current;if(!l)return;if(!e)return;if(!s)return;const t=i({id:l,element:e});return null==n?void 0:n.renderItem(t)}),[l,s,i,n]),wj(a=nj(tj({},a),{ref:eS(c,a.ref)}))})));dS((function(e){return pS("div",ck(e))}));function uk(e){if(!e.isTrusted)return!1;const t=e.currentTarget;return"Enter"===e.key?Vj(t)||"SUMMARY"===t.tagName||"A"===t.tagName:" "===e.key&&(Vj(t)||"SUMMARY"===t.tagName||"INPUT"===t.tagName||"SELECT"===t.tagName)}var dk=Symbol("command"),hk=fS((function(e){var t=e,{clickOnEnter:n=!0,clickOnSpace:s=!0}=t,i=sj(t,["clickOnEnter","clickOnSpace"]);const r=(0,Gn.useRef)(null),[a,o]=(0,Gn.useState)(!1);(0,Gn.useEffect)((()=>{r.current&&o(Vj(r.current))}),[]);const[l,c]=(0,Gn.useState)(!1),u=(0,Gn.useRef)(!1),d=bj(i),[h,p]=function(e,t,n){const s=e.onLoadedMetadataCapture,i=(0,Gn.useMemo)((()=>Object.assign((()=>{}),nj(tj({},s),{[t]:n}))),[s,t,n]);return[null==s?void 0:s[t],{onLoadedMetadataCapture:i}]}(i,dk,!0),f=i.onKeyDown,m=$j((e=>{null==f||f(e);const t=e.currentTarget;if(e.defaultPrevented)return;if(h)return;if(d)return;if(!Gj(e))return;if(Oj(t))return;if(t.isContentEditable)return;const i=n&&"Enter"===e.key,r=s&&" "===e.key,a="Enter"===e.key&&!n,o=" "===e.key&&!s;if(a||o)e.preventDefault();else if(i||r){const n=uk(e);if(i){if(!n){e.preventDefault();const n=e,{view:s}=n,i=sj(n,["view"]),r=()=>Uj(t,i);kj&&/firefox\//i.test(navigator.userAgent)?Zj(t,"keyup",r):queueMicrotask(r)}}else r&&(u.current=!0,n||(e.preventDefault(),c(!0)))}})),g=i.onKeyUp,v=$j((e=>{if(null==g||g(e),e.defaultPrevented)return;if(h)return;if(d)return;if(e.metaKey)return;const t=s&&" "===e.key;if(u.current&&t&&(u.current=!1,!uk(e))){e.preventDefault(),c(!1);const t=e.currentTarget,n=e,{view:s}=n,i=sj(n,["view"]);queueMicrotask((()=>Uj(t,i)))}}));return i=nj(tj(tj({"data-active":l||void 0,type:a?"button":void 0},p),i),{ref:eS(r,i.ref),onKeyDown:m,onKeyUp:v}),i=qC(i)}));dS((function(e){return pS("button",hk(e))}));function pk(e,t=!1){const{top:n}=e.getBoundingClientRect();return t?n+e.clientHeight:n}function fk(e,t,n,s=!1){var i;if(!t)return;if(!n)return;const{renderedItems:r}=t.getState(),a=Mj(e);if(!a)return;const o=function(e,t=!1){const n=e.clientHeight,{top:s}=e.getBoundingClientRect(),i=1.5*Math.max(.875*n,n-40),r=t?n-i+s:i+s;return"HTML"===e.tagName?r+e.scrollTop:r}(a,s);let l,c;for(let e=0;e<r.length;e+=1){const r=l;if(l=n(e),!l)break;if(l===r)continue;const a=null==(i=PC(t,l))?void 0:i.element;if(!a)continue;const u=pk(a,s)-o,d=Math.abs(u);if(s&&u<=0||!s&&u>=0){void 0!==c&&c<d&&(l=r);break}c=d}return l}var mk=fS((function(e){var t=e,{store:n,rowId:s,preventScrollOnKeyDown:i=!1,moveOnKeyPress:r=!0,tabbable:o=!1,getItem:l,"aria-setsize":c,"aria-posinset":u}=t,d=sj(t,["store","rowId","preventScrollOnKeyDown","moveOnKeyPress","tabbable","getItem","aria-setsize","aria-posinset"]);const h=xS();n=n||h;const p=tS(d.id),f=(0,Gn.useRef)(null),m=(0,Gn.useContext)(SS),g=bj(d)&&!d.accessibleWhenDisabled,{rowId:v,baseElement:y,isActiveItem:x,ariaSetSize:b,ariaPosInSet:w,isTabbable:_}=RS(n,{rowId:e=>s||(e&&(null==m?void 0:m.baseElement)&&m.baseElement===e.baseElement?m.id:void 0),baseElement:e=>(null==e?void 0:e.baseElement)||void 0,isActiveItem:e=>!!e&&e.activeId===p,ariaSetSize:e=>null!=c?c:e&&(null==m?void 0:m.ariaSetSize)&&m.baseElement===e.baseElement?m.ariaSetSize:void 0,ariaPosInSet(e){if(null!=u)return u;if(!e)return;if(!(null==m?void 0:m.ariaPosInSet))return;if(m.baseElement!==e.baseElement)return;const t=e.renderedItems.filter((e=>e.rowId===v));return m.ariaPosInSet+t.findIndex((e=>e.id===p))},isTabbable(e){if(!(null==e?void 0:e.renderedItems.length))return!0;if(e.virtualFocus)return!1;if(o)return!0;if(null===e.activeId)return!1;const t=null==n?void 0:n.item(e.activeId);return!!(null==t?void 0:t.disabled)||(!(null==t?void 0:t.element)||e.activeId===p)}}),j=(0,Gn.useCallback)((e=>{var t;const n=nj(tj({},e),{id:p||e.id,rowId:v,disabled:!!g,children:null==(t=e.element)?void 0:t.textContent});return l?l(n):n}),[p,v,g,l]),S=d.onFocus,C=(0,Gn.useRef)(!1),k=$j((e=>{if(null==S||S(e),e.defaultPrevented)return;if(Hj(e))return;if(!p)return;if(!n)return;if(function(e,t){return!Gj(e)&&VC(t,e.target)}(e,n))return;const{virtualFocus:t,baseElement:s}=n.getState();if(n.setActiveId(p),Aj(e.currentTarget)&&function(e,t=!1){if(Oj(e))e.setSelectionRange(t?e.value.length:0,e.value.length);else if(e.isContentEditable){const n=Ej(e).getSelection();null==n||n.selectAllChildren(e),t&&(null==n||n.collapseToEnd())}}(e.currentTarget),!t)return;if(!Gj(e))return;if(Aj(i=e.currentTarget)||"INPUT"===i.tagName&&!Vj(i))return;var i;if(!(null==s?void 0:s.isConnected))return;zj()&&e.currentTarget.hasAttribute("data-autofocus")&&e.currentTarget.scrollIntoView({block:"nearest",inline:"nearest"}),C.current=!0;e.relatedTarget===s||VC(n,e.relatedTarget)?function(e){e[IC]=!0,e.focus({preventScroll:!0})}(s):s.focus()})),E=d.onBlurCapture,P=$j((e=>{if(null==E||E(e),e.defaultPrevented)return;const t=null==n?void 0:n.getState();(null==t?void 0:t.virtualFocus)&&C.current&&(C.current=!1,e.preventDefault(),e.stopPropagation())})),I=d.onKeyDown,V=iS(i),T=iS(r),O=$j((e=>{if(null==I||I(e),e.defaultPrevented)return;if(!Gj(e))return;if(!n)return;const{currentTarget:t}=e,s=n.getState(),i=n.item(p),r=!!(null==i?void 0:i.rowId),a="horizontal"!==s.orientation,o="vertical"!==s.orientation,l=()=>!!r||(!!o||(!s.baseElement||!Oj(s.baseElement))),c={ArrowUp:(r||a)&&n.up,ArrowRight:(r||o)&&n.next,ArrowDown:(r||a)&&n.down,ArrowLeft:(r||o)&&n.previous,Home:()=>{if(l())return!r||e.ctrlKey?null==n?void 0:n.first():null==n?void 0:n.previous(-1)},End:()=>{if(l())return!r||e.ctrlKey?null==n?void 0:n.last():null==n?void 0:n.next(-1)},PageUp:()=>fk(t,n,null==n?void 0:n.up,!0),PageDown:()=>fk(t,n,null==n?void 0:n.down)}[e.key];if(c){if(Aj(t)){const n=Nj(t),s=o&&"ArrowLeft"===e.key,i=o&&"ArrowRight"===e.key,r=a&&"ArrowUp"===e.key,l=a&&"ArrowDown"===e.key;if(i||l){const{length:e}=function(e){if(Oj(e))return e.value;if(e.isContentEditable){const t=Ej(e).createRange();return t.selectNodeContents(e),t.toString()}return""}(t);if(n.end!==e)return}else if((s||r)&&0!==n.start)return}const s=c();if(V(e)||void 0!==s){if(!T(e))return;e.preventDefault(),n.move(s)}}})),A=(0,Gn.useMemo)((()=>({id:p,baseElement:y})),[p,y]);return d=rS(d,(e=>(0,a.jsx)(jS.Provider,{value:A,children:e})),[A]),d=nj(tj({id:p,"data-active-item":x||void 0},d),{ref:eS(f,d.ref),tabIndex:_?d.tabIndex:-1,onFocus:k,onBlurCapture:P,onKeyDown:O}),d=hk(d),d=ck(nj(tj({store:n},d),{getItem:j,shouldRegisterItem:!!p&&d.shouldRegisterItem})),wj(nj(tj({},d),{"aria-setsize":b,"aria-posinset":w}))}));hS(dS((function(e){return pS("button",mk(e))})));function gk(e){var t;return null!=(t={menu:"menuitem",listbox:"option",tree:"treeitem"}[e])?t:"option"}var vk=fS((function(e){var t,n=e,{store:s,value:i,hideOnClick:r,setValueOnClick:o,selectValueOnClick:l=!0,resetValueOnSelect:c,focusOnHover:u=!1,moveOnKeyPress:d=!0,getItem:h}=n,p=sj(n,["store","value","hideOnClick","setValueOnClick","selectValueOnClick","resetValueOnSelect","focusOnHover","moveOnKeyPress","getItem"]);const f=yC();xj(s=s||f,!1);const{resetValueOnSelectState:m,multiSelectable:g,selected:v}=RS(s,{resetValueOnSelectState:"resetValueOnSelect",multiSelectable:e=>Array.isArray(e.selectedValue),selected:e=>function(e,t){if(null!=t)return null!=e&&(Array.isArray(e)?e.includes(t):e===t)}(e.selectedValue,i)}),y=(0,Gn.useCallback)((e=>{const t=nj(tj({},e),{value:i});return h?h(t):t}),[i,h]);o=null!=o?o:!g,r=null!=r?r:null!=i&&!g;const x=p.onClick,b=iS(o),w=iS(l),_=iS(null!=(t=null!=c?c:m)?t:g),j=iS(r),S=$j((e=>{null==x||x(e),e.defaultPrevented||function(e){const t=e.currentTarget;if(!t)return!1;const n=t.tagName.toLowerCase();return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)}(e)||function(e){const t=e.currentTarget;if(!t)return!1;const n=Lj();if(n&&!e.metaKey)return!1;if(!n&&!e.ctrlKey)return!1;const s=t.tagName.toLowerCase();return"a"===s||"button"===s&&"submit"===t.type||"input"===s&&"submit"===t.type}(e)||(null!=i&&(w(e)&&(_(e)&&(null==s||s.resetValue()),null==s||s.setSelectedValue((e=>Array.isArray(e)?e.includes(i)?e.filter((e=>e!==i)):[...e,i]:i))),b(e)&&(null==s||s.setValue(i))),j(e)&&(null==s||s.hide()))})),C=p.onKeyDown,k=$j((e=>{if(null==C||C(e),e.defaultPrevented)return;const t=null==s?void 0:s.getState().baseElement;if(!t)return;if(NC(t))return;(1===e.key.length||"Backspace"===e.key||"Delete"===e.key)&&(queueMicrotask((()=>t.focus())),Oj(t)&&(null==s||s.setValue(t.value)))}));g&&null!=v&&(p=tj({"aria-selected":v},p)),p=rS(p,(e=>(0,a.jsx)(_C.Provider,{value:i,children:(0,a.jsx)(jC.Provider,{value:null!=v&&v,children:e})})),[i,v]);const E=(0,Gn.useContext)(mC);p=nj(tj({role:gk(E),children:i},p),{onClick:S,onKeyDown:k});const P=iS(d);return p=mk(nj(tj({store:s},p),{getItem:y,moveOnKeyPress:e=>{if(!P(e))return!1;const t=new Event("combobox-item-move"),n=null==s?void 0:s.getState().baseElement;return null==n||n.dispatchEvent(t),!0}})),p=lk(tj({store:s,focusOnHover:u},p))})),yk=hS(dS((function(e){return pS("div",vk(e))})));function xk(e){return vj(e).toLowerCase()}function bk(e,t){if(!e)return e;if(!t)return e;const n=(s=t,Array.isArray(s)?s:void 0!==s?[s]:[]).filter(Boolean).map(xk);var s;const i=[],r=(e,t=!1)=>(0,a.jsx)("span",{"data-autocomplete-value":t?"":void 0,"data-user-value":t?void 0:"",children:e},i.length),o=function(e){return e.sort((([e],[t])=>e-t))}(function(e){return e.filter((([e,t],n,s)=>!s.some((([s,i],r)=>r!==n&&s<=e&&s+i>=e+t))))}(function(e,t){const n=[];for(const s of t){let t=0;const i=s.length;for(;-1!==e.indexOf(s,t);){const r=e.indexOf(s,t);-1!==r&&n.push([r,i]),t=r+1}}return n}(xk(e),new Set(n))));if(!o.length)return i.push(r(e,!0)),i;const[l]=o[0],c=[e.slice(0,l),...o.flatMap((([t,n],s)=>{var i;const r=e.slice(t,t+n),a=null==(i=o[s+1])?void 0:i[0];return[r,e.slice(t+n,a)]}))];return c.forEach(((e,t)=>{e&&i.push(r(e,t%2==0))})),i}var wk=fS((function(e){var t=e,{store:n,value:s,userValue:i}=t,r=sj(t,["store","value","userValue"]);const a=yC();n=n||a;const o=(0,Gn.useContext)(_C),l=null!=s?s:o,c=DS(n,(e=>null!=i?i:null==e?void 0:e.value)),u=(0,Gn.useMemo)((()=>{if(l)return c?bk(l,c):l}),[l,c]);return wj(r=tj({children:u},r))})),_k=dS((function(e){return pS("span",wk(e))}));const jk=[],Sk=(e,t)=>e.singleSelection?t?.value:Array.isArray(t?.value)?t.value:!Array.isArray(t?.value)&&t?.value?[t.value]:jk;function Ck(e=""){return My()(e.trim().toLowerCase())}const kk=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter((e=>e!==n)):[...t.value,n]:[n];function Ek(e,t){return`${e}-${t}`}const Pk=({selected:e})=>(0,a.jsx)("span",{className:Ht("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,a.jsx)(b.Icon,{icon:Xr})}),Ik=({selected:e})=>(0,a.jsx)("span",{className:Ht("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function Vk({view:e,filter:t,onChangeView:n}){const s=(0,y.useInstanceId)(Vk,"dataviews-filter-list-box"),[i,r]=(0,h.useState)(1===t.operators?.length?void 0:null),o=e.filters?.find((e=>e.field===t.field)),l=Sk(t,o);return(0,a.jsx)(b.Composite,{virtualFocus:!0,focusLoop:!0,activeId:i,setActiveId:r,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,w.sprintf)((0,w.__)("List of: %1$s"),t.name),onFocusVisible:()=>{!i&&t.elements.length&&r(Ek(s,t.elements[0].value))},render:(0,a.jsx)(b.Composite.Typeahead,{}),children:t.elements.map((i=>(0,a.jsxs)(b.Composite.Hover,{render:(0,a.jsx)(b.Composite.Item,{id:Ek(s,i.value),render:(0,a.jsx)("div",{"aria-label":i.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{const s=o?[...(e.filters??[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:kk(t,o,i.value)}:e))]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:kk(t,o,i.value)}];n({...e,page:1,filters:s})}}),children:[t.singleSelection&&(0,a.jsx)(Ik,{selected:l===i.value}),!t.singleSelection&&(0,a.jsx)(Pk,{selected:l.includes(i.value)}),(0,a.jsx)("span",{children:i.label})]},i.value)))})}function Tk({view:e,filter:t,onChangeView:n}){const[s,i]=(0,h.useState)(""),r=(0,h.useDeferredValue)(s),o=e.filters?.find((e=>e.field===t.field)),l=Sk(t,o),c=(0,h.useMemo)((()=>{const e=Ck(r);return t.elements.filter((t=>Ck(t.label).includes(e)))}),[t.elements,r]);return(0,a.jsxs)(SC,{selectedValue:l,setSelectedValue:s=>{const i=o?[...(e.filters??[]).map((e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:s}:e))]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:s}];n({...e,page:1,filters:i})},setValue:i,children:[(0,a.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,a.jsx)(kC,{render:(0,a.jsx)(b.VisuallyHidden,{children:(0,w.__)("Search items")}),children:(0,w.__)("Search items")}),(0,a.jsx)(JC,{autoSelect:"always",placeholder:(0,w.__)("Search"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,a.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,a.jsx)(b.Icon,{icon:Yt})})]}),(0,a.jsxs)(rk,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[c.map((e=>(0,a.jsxs)(yk,{resetValueOnSelect:!1,value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,a.jsx)(Ik,{selected:l===e.value}),!t.singleSelection&&(0,a.jsx)(Pk,{selected:l.includes(e.value)}),(0,a.jsxs)("span",{children:[(0,a.jsx)(_k,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,a.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value))),!c.length&&(0,a.jsx)("p",{children:(0,w.__)("No results found")})]})]})}function Ok(e){const{elements:t,isLoading:n}=Vx({elements:e.filter.elements,getElements:e.filter.getElements});if(n)return(0,a.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,a.jsx)(b.Spinner,{})});if(0===t.length)return(0,a.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,w.__)("No elements found")});const s=t.length>10?Tk:Vk;return(0,a.jsx)(s,{...e,filter:{...e.filter,elements:t}})}var Ak=i(7734),Nk=i.n(Ak);function Fk({filter:e,view:t,onChangeView:n,fields:s}){const i=t.filters?.find((t=>t.field===e.field)),r=Sk(e,i),o=(0,h.useMemo)((()=>{const t=s.find((t=>t.id===e.field));return t?{...t,isValid:{required:!1,custom:()=>null},getValue:({item:e})=>e[t.id],setValue:({value:e})=>({[t.id]:e})}:t}),[s,e.field]),l=(0,h.useMemo)((()=>(t.filters??[]).reduce(((e,t)=>(e[t.field]=t.value,e)),{})),[t.filters]),c=(0,y.useEvent)((s=>{if(!o||!i)return;const a=o.getValue({item:s});Nk()(a,r)||n({...t,filters:(t.filters??[]).map((t=>t.field===e.field?{...t,operator:i.operator||e.operators[0],value:""===a?void 0:a}:t))})}));return o&&o.Edit&&i?(0,a.jsx)(b.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,a.jsx)(o.Edit,{hideLabelFromVision:!0,data:l,field:o,operator:i.operator,onChange:c})}):null}const Mk="Enter",Bk=" ",Dk=({activeElements:e,filterInView:t,filter:n})=>{if(void 0===e||0===e.length)return n.name;const s={Name:(0,a.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,a.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};if(t?.operator===$y)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is any: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===ex)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is none: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===tx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===nx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not all: </Name><Value>%2$s</Value>"),n.name,e.map((e=>e.label)).join(", ")),s);if(t?.operator===Qy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===Jy)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===sx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ix)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===rx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ax)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===dx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===hx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===px)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ox)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===lx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===cx)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===ux)return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>"),n.name,e[0].label),s);if(t?.operator===fx){const{label:t}=e[0];return(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>"),n.name,t[0],t[1]),s)}return t?.operator===mx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is: </Name><Value>%2$s</Value>"),n.name,e[0].label),s):t?.operator===gx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>"),n.name,e[0].label),s):t?.operator===vx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>"),n.name,`${e[0].value.value} ${e[0].value.unit}`),s):t?.operator===yx?(0,h.createInterpolateElement)((0,w.sprintf)((0,w.__)("<Name>%1$s is over: </Name><Value>%2$s</Value> ago"),n.name,`${e[0].value.value} ${e[0].value.unit}`),s):(0,w.sprintf)((0,w.__)("Unknown status for %1$s"),n.name)};function Rk({filter:e,view:t,onChangeView:n}){const s=e.operators?.map((e=>({value:e,label:wx[e]?.label}))),i=t.filters?.find((t=>t.field===e.field)),r=i?.operator||e.operators[0];return s.length>1&&(0,a.jsxs)(b.__experimentalHStack,{spacing:2,justify:"flex-start",className:"dataviews-filters__summary-operators-container",children:[(0,a.jsx)(b.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,a.jsx)(b.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,w.__)("Conditions"),value:r,options:s,onChange:s=>{const r=s,a=i?.operator,o=i?[...(t.filters??[]).map((t=>{if(t.field===e.field){const e=[fx,vx,yx],n=a&&(e.includes(a)||e.includes(r));return{...t,value:n?void 0:t.value,operator:r}}return t}))]:[...t.filters??[],{field:e.field,operator:r,value:void 0}];n({...t,page:1,filters:o})},size:"small",variant:"minimal",__nextHasNoMarginBottom:!0,hideLabelFromVision:!0})]})}function Lk({addFilterRef:e,openedFilter:t,fields:n,...s}){const i=(0,h.useRef)(null),{filter:r,view:o,onChangeView:l}=s,c=o.filters?.find((e=>e.field===r.field));let u=[];const{elements:d}=Vx({elements:r.elements,getElements:r.getElements});d.length>0?u=d.filter((e=>r.singleSelection?e.value===c?.value:c?.value?.includes(e.value))):void 0!==c?.value&&(u=[{value:c.value,label:c.value}]);const p=r.isPrimary,f=c?.isLocked,m=!f&&void 0!==c?.value,g=!f&&(!p||m);return(0,a.jsx)(b.Dropdown,{defaultOpen:t===r.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{i.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,a.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,a.jsx)(b.Tooltip,{text:(0,w.sprintf)((0,w.__)("Filter by: %1$s"),r.name.toLowerCase()),placement:"top",children:(0,a.jsx)("div",{className:Ht("dataviews-filters__summary-chip",{"has-reset":g,"has-values":m,"is-not-clickable":f}),role:"button",tabIndex:f?-1:0,onClick:()=>{f||n()},onKeyDown:e=>{!f&&[Mk,Bk].includes(e.key)&&(n(),e.preventDefault())},"aria-disabled":f,"aria-pressed":t,"aria-expanded":t,ref:i,children:(0,a.jsx)(Dk,{activeElements:u,filterInView:c,filter:r})})}),g&&(0,a.jsx)(b.Tooltip,{text:p?(0,w.__)("Reset"):(0,w.__)("Remove"),placement:"top",children:(0,a.jsx)("button",{className:Ht("dataviews-filters__summary-chip-remove",{"has-values":m}),onClick:()=>{l({...o,page:1,filters:o.filters?.filter((e=>e.field!==r.field))}),p?i.current?.focus():e.current?.focus()},children:(0,a.jsx)(b.Icon,{icon:Ea})})})]}),renderContent:()=>(0,a.jsxs)(b.__experimentalVStack,{spacing:0,justify:"flex-start",children:[(0,a.jsx)(Rk,{...s}),s.filter.hasElements?(0,a.jsx)(Ok,{...s,filter:{...s.filter,elements:d}}):(0,a.jsx)(Fk,{...s,fields:n})]})})}function zk({filters:e,view:t,onChangeView:n}){const s=!t.search&&!t.filters?.some((t=>{return!(t.isLocked||void 0===t.value&&(n=t.field,e.some((e=>e.field===n&&e.isPrimary))));var n}));return(0,a.jsx)(b.Button,{disabled:s,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:t.filters?.filter((e=>!!e.isLocked))||[]})},children:(0,w.__)("Reset")})}var Hk=function(e,t){return(0,h.useMemo)((()=>{const n=[];return e.forEach((e=>{if(!1===e.filterBy||!e.hasElements&&!e.Edit)return;const s=e.filterBy.operators,i=!!e.filterBy?.isPrimary,r=t.filters?.some((t=>t.field===e.id&&!!t.isLocked))??!1;n.push({field:e.id,name:e.label,elements:e.elements,getElements:e.getElements,hasElements:e.hasElements,singleSelection:s.some((e=>bx.includes(e))),operators:s,isVisible:r||i||!!t.filters?.some((t=>t.field===e.id&&xx.includes(t.operator))),isPrimary:i,isLocked:r})})),n.sort(((e,t)=>e.isLocked&&!t.isLocked?-1:!e.isLocked&&t.isLocked?1:e.isPrimary&&!t.isPrimary?-1:!e.isPrimary&&t.isPrimary?1:e.name.localeCompare(t.name))),n}),[e,t])};var Gk=(0,h.memo)((function({className:e}){const{fields:t,view:n,onChangeView:s,openedFilter:i,setOpenedFilter:r}=(0,h.useContext)(Lw),o=(0,h.useRef)(null),l=Hk(t,n),c=(0,a.jsx)(U_,{filters:l,view:n,onChangeView:s,ref:o,setOpenedFilter:r},"add-filter"),u=l.filter((e=>e.isVisible));if(0===u.length)return null;const d=[...u.map((e=>(0,a.jsx)(Lk,{filter:e,view:n,fields:t,onChangeView:s,addFilterRef:o,openedFilter:i},e.field))),c];return d.push((0,a.jsx)(zk,{filters:l,view:n,onChangeView:s},"reset-filters")),(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",style:{width:"fit-content"},wrap:!0,className:e,children:d})}));var Wk=function(e){const{isShowingFilter:t}=(0,h.useContext)(Lw);return t?(0,a.jsx)(Gk,{...e}):null};function Uk({className:e}){const{actions:t=[],data:n,fields:s,getItemId:i,getItemLevel:r,isLoading:o,view:l,onChangeView:c,selection:u,onChangeSelection:d,setOpenedFilter:p,onClickItem:f,isItemClickable:m,renderItemLink:g,defaultLayouts:v,empty:y=(0,a.jsx)("p",{children:(0,w.__)("No results")})}=(0,h.useContext)(Lw),x=H_.find((e=>e.type===l.type&&v[e.type]))?.component;return(0,a.jsx)(x,{className:e,actions:t,data:n,fields:s,getItemId:i,getItemLevel:r,isLoading:o,onChangeView:c,onChangeSelection:d,selection:u,setOpenedFilter:p,onClickItem:f,renderItemLink:g,isItemClickable:m,view:l,empty:y})}function qk(){const{view:e,onChangeView:t,paginationInfo:{totalItems:n=0,totalPages:s}}=(0,h.useContext)(Lw);if(!n||!s||e.infiniteScrollEnabled)return null;const i=e.page??1,r=Array.from(Array(s)).map(((e,t)=>{const n=t+1;return{value:n.toString(),label:n.toString(),"aria-label":i===n?(0,w.sprintf)((0,w.__)("Page %1$d of %2$d"),i,s):n.toString()}}));return!!n&&1!==s&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,className:"dataviews-pagination",justify:"end",spacing:6,children:[(0,a.jsx)(b.__experimentalHStack,{justify:"flex-start",expanded:!1,spacing:1,className:"dataviews-pagination__page-select",children:(0,h.createInterpolateElement)((0,w.sprintf)((0,w._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging"),"<CurrentPage />",s),{div:(0,a.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,a.jsx)(b.SelectControl,{"aria-label":(0,w.__)("Current page"),value:i.toString(),options:r,onChange:n=>{t({...e,page:+n})},size:"small",__nextHasNoMarginBottom:!0,variant:"minimal"})})}),(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,spacing:1,children:[(0,a.jsx)(b.Button,{onClick:()=>t({...e,page:i-1}),disabled:1===i,accessibleWhenDisabled:!0,label:(0,w.__)("Previous page"),icon:(0,w.isRTL)()?$c:eu,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,a.jsx)(b.Button,{onClick:()=>t({...e,page:i+1}),disabled:i>=s,accessibleWhenDisabled:!0,label:(0,w.__)("Next page"),icon:(0,w.isRTL)()?eu:$c,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var Zk=(0,h.memo)(qk);const Yk=[];function Kk(){const{view:e,paginationInfo:{totalItems:t=0,totalPages:n},data:s,actions:i=Yk}=(0,h.useContext)(Lw),r=s_(i,s)&&[Ex,Px].includes(e.type);return!t||!n||n<=1&&!r?null:!!t&&(0,a.jsxs)(b.__experimentalHStack,{expanded:!1,justify:"end",className:"dataviews-footer",children:[r&&(0,a.jsx)(u_,{}),(0,a.jsx)(Zk,{})]})}var Xk=(0,h.memo)((function({label:e}){const{view:t,onChangeView:n}=(0,h.useContext)(Lw),[s,i,r]=(0,y.useDebouncedInput)(t.search);(0,h.useEffect)((()=>{i(t.search??"")}),[t.search,i]);const o=(0,h.useRef)(n),l=(0,h.useRef)(t);(0,h.useEffect)((()=>{o.current=n,l.current=t}),[n,t]),(0,h.useEffect)((()=>{r!==l.current?.search&&o.current({...l.current,page:1,search:r})}),[r]);const c=e||(0,w.__)("Search");return(0,a.jsx)(b.SearchControl,{className:"dataviews-search",__nextHasNoMarginBottom:!0,onChange:i,value:s,label:c,placeholder:c,size:"compact"})})),Qk=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z"})}),Jk=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});const $k=window.wp.warning;var eE=i.n($k);function tE(){const e=(0,h.useContext)(Lw),{view:t,onChangeView:n}=e,s=t.infiniteScrollEnabled??!1;return e.hasInfiniteScrollHandler?(0,a.jsx)(b.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,w.__)("Enable infinite scroll"),help:(0,w.__)("Automatically load more content as you scroll, instead of showing pagination links."),checked:s,onChange:e=>{n({...t,infiniteScrollEnabled:e})}}):null}const{Menu:nE}=Yx(b.privateApis),sE={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function iE(){const{view:e,onChangeView:t,defaultLayouts:n}=(0,h.useContext)(Lw),s=Object.keys(n);if(s.length<=1)return null;const i=H_.find((t=>e.type===t.type));return(0,a.jsxs)(nE,{children:[(0,a.jsx)(nE.TriggerButton,{render:(0,a.jsx)(b.Button,{size:"compact",icon:i?.icon,label:(0,w.__)("Layout")})}),(0,a.jsx)(nE.Popover,{children:s.map((s=>{const i=H_.find((e=>e.type===s));return i?(0,a.jsx)(nE.RadioItem,{value:s,name:"view-actions-available-view",checked:s===e.type,hideOnClick:!0,onChange:s=>{switch(s.target.value){case"list":case"grid":case"table":case"pickerGrid":const i={...e};return"layout"in i&&delete i.layout,t({...i,type:s.target.value,...n[s.target.value]})}eE()("Invalid dataview")},children:(0,a.jsx)(nE.ItemLabel,{children:i.label})},s):null}))})]})}function rE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Lw),s=(0,h.useMemo)((()=>t.filter((e=>!1!==e.enableSorting)).map((e=>({label:e.label,value:e.id})))),[t]);return(0,a.jsx)(b.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,w.__)("Sort by"),value:e.sort?.field,options:s,onChange:t=>{n({...e,sort:{direction:e?.sort?.direction||"desc",field:t},showLevels:!1})}})}function aE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Lw);if(0===t.filter((e=>!1!==e.enableSorting)).length)return null;let s=e.sort?.direction;return!s&&e.sort?.field&&(s="desc"),(0,a.jsx)(b.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Order"),value:s,onChange:s=>{"asc"!==s&&"desc"!==s?eE()("Invalid direction"):n({...e,sort:{direction:s,field:e.sort?.field||t.find((e=>!1!==e.enableSorting))?.id||""},showLevels:!1})},children:_x.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOptionIcon,{value:e,icon:kx[e],label:Cx[e]},e)))})}function oE(){const{view:e,config:t,onChangeView:n}=(0,h.useContext)(Lw),{infiniteScrollEnabled:s}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||s?null:(0,a.jsx)(b.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:(0,w.__)("Items per page"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:t=>{const s="number"==typeof t||void 0===t?t:parseInt(t,10);n({...e,perPage:s,page:1})},children:t.perPageSizes.map((e=>(0,a.jsx)(b.__experimentalToggleGroupControlOption,{value:e,label:e.toString()},e)))})}function lE({previewOptions:e,onChangePreviewOption:t,onMenuOpenChange:n,activeOption:s}){return(0,a.jsxs)(nE,{onOpenChange:n,children:[(0,a.jsx)(nE.TriggerButton,{render:(0,a.jsx)(b.Button,{className:"dataviews-field-control__field-preview-options-button",size:"compact",icon:No,label:(0,w.__)("Preview")})}),(0,a.jsx)(nE.Popover,{children:e?.map((({id:e,label:n})=>(0,a.jsx)(nE.RadioItem,{value:e,checked:e===s,onChange:()=>{t?.(e),(e=>{setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e} .dataviews-field-control__field-preview-options-button`);t instanceof HTMLElement&&t.focus()}),50)})(e)},children:(0,a.jsx)(nE.ItemLabel,{children:n})},e)))})]})}function cE({field:e,label:t,description:n,isVisible:s,isFirst:i,isLast:r,canMove:o=!0,onToggleVisibility:l,onMoveUp:c,onMoveDown:u,previewOptions:d,onChangePreviewOption:p}){const[f,m]=(0,h.useState)(!1);return(0,a.jsx)(b.__experimentalItem,{children:(0,a.jsxs)(b.__experimentalHStack,{expanded:!0,className:Ht("dataviews-field-control__field",`dataviews-field-control__field-${e.id}`,{"is-interacting":f}),justify:"flex-start",children:[(0,a.jsx)("span",{className:"dataviews-field-control__icon",children:!o&&!e.enableHiding&&(0,a.jsx)(b.Icon,{icon:Qk})}),(0,a.jsxs)("span",{className:"dataviews-field-control__label-sub-label-container",children:[(0,a.jsx)("span",{className:"dataviews-field-control__label",children:t||e.label}),n&&(0,a.jsx)("span",{className:"dataviews-field-control__sub-label",children:n})]}),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-end",expanded:!1,className:"dataviews-field-control__actions",children:[s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{disabled:i||!o,accessibleWhenDisabled:!0,size:"compact",onClick:c,icon:Nv,label:i||!o?(0,w.__)("This field can't be moved up"):(0,w.sprintf)((0,w.__)("Move %s up"),e.label)}),(0,a.jsx)(b.Button,{disabled:r||!o,accessibleWhenDisabled:!0,size:"compact",onClick:u,icon:Fv,label:r||!o?(0,w.__)("This field can't be moved down"):(0,w.sprintf)((0,w.__)("Move %s down"),e.label)})]}),l&&(0,a.jsx)(b.Button,{className:"dataviews-field-control__field-visibility-button",disabled:!e.enableHiding,accessibleWhenDisabled:!0,size:"compact",onClick:()=>{l(),setTimeout((()=>{const t=document.querySelector(`.dataviews-field-control__field-${e.id} .dataviews-field-control__field-visibility-button`);t instanceof HTMLElement&&t.focus()}),50)},icon:s?Pw:Ao,label:s?(0,w.sprintf)((0,w._x)("Hide %s","field"),e.label):(0,w.sprintf)((0,w._x)("Show %s","field"),e.label)}),d&&(0,a.jsx)(lE,{previewOptions:d,onChangePreviewOption:p,onMenuOpenChange:m,activeOption:e.id})]})]})})}function uE({index:e,field:t,view:n,onChangeView:s}){const i=n.fields??[],r=void 0!==e&&i.includes(t.id);return(0,a.jsx)(cE,{field:t,isVisible:r,isFirst:void 0!==e&&e<1,isLast:void 0!==e&&e===i.length-1,onToggleVisibility:()=>{s({...n,fields:r?i.filter((e=>e!==t.id)):[...i,t.id]})},onMoveUp:void 0!==e?()=>{s({...n,fields:[...i.slice(0,e-1)??[],t.id,i[e-1],...i.slice(e+1)]})}:void 0,onMoveDown:void 0!==e?()=>{s({...n,fields:[...i.slice(0,e)??[],i[e+1],t.id,...i.slice(e+2)]})}:void 0})}function dE(e){return!!e}function hE(){const{view:e,fields:t,onChangeView:n}=(0,h.useContext)(Lw),s=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean),i=e.fields??[],r=t.filter((e=>!i.includes(e.id)&&!s.includes(e.id)&&"media"!==e.type&&!1!==e.enableHiding));let o=i.map((e=>t.find((t=>t.id===e)))).filter(dE);if(!o?.length&&!r?.length)return null;const l=t.find((t=>t.id===e.titleField)),c=t.find((t=>t.id===e.mediaField)),u=t.find((t=>t.id===e.descriptionField)),d=t.filter((e=>"media"===e.type));let p;if(d.length>1){const t=dE(c)&&(e.showMedia??!0);p=dE(c)&&(0,a.jsx)(cE,{field:c,label:(0,w.__)("Preview"),description:c.label,isVisible:t,onToggleVisibility:()=>{n({...e,showMedia:!t})},canMove:!1,previewOptions:d.map((e=>({label:e.label,id:e.id}))),onChangePreviewOption:t=>n({...e,mediaField:t})},c.id)}const f=[{field:l,isVisibleFlag:"showTitle"},{field:c,isVisibleFlag:"showMedia",ui:p},{field:u,isVisibleFlag:"showDescription"}].filter((({field:e})=>dE(e)));let m=f.filter((({field:t,isVisibleFlag:n})=>dE(t)&&(e[n]??!0)));1===m.length&&(m=m.map((e=>({...e,field:{...e.field,enableHiding:!1}})))),0===m.length&&1===o.length&&(o=[{...o[0],enableHiding:!1}]);const g=f.filter((({field:t,isVisibleFlag:n})=>dE(t)&&!(e[n]??1)));return(0,a.jsxs)(b.__experimentalVStack,{className:"dataviews-field-control",spacing:6,children:[(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-config__properties",spacing:0,children:(m.length>0||!!o?.length)&&(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[m.map((({field:t,isVisibleFlag:s,ui:i})=>i??(0,a.jsx)(cE,{field:t,isVisible:!0,onToggleVisibility:()=>{n({...e,[s]:!1})},canMove:!1},t.id))),o.map(((t,s)=>(0,a.jsx)(uE,{field:t,view:e,onChangeView:n,index:s},t.id)))]})}),(!!r?.length||!!g.length)&&(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.BaseControl.VisualLabel,{style:{margin:0},children:(0,w.__)("Hidden")}),(0,a.jsx)(b.__experimentalVStack,{className:"dataviews-view-config__properties",spacing:0,children:(0,a.jsxs)(b.__experimentalItemGroup,{isBordered:!0,isSeparated:!0,children:[g.length>0&&g.map((({field:t,isVisibleFlag:s,ui:i})=>i??(0,a.jsx)(cE,{field:t,isVisible:!1,onToggleVisibility:()=>{n({...e,[s]:!0})},canMove:!1},t.id))),r.map((t=>(0,a.jsx)(uE,{field:t,view:e,onChangeView:n},t.id)))]})})]})]})}function pE({title:e,description:t,children:n}){return(0,a.jsxs)(b.__experimentalGrid,{columns:12,className:"dataviews-settings-section",gap:4,children:[(0,a.jsxs)("div",{className:"dataviews-settings-section__sidebar",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,className:"dataviews-settings-section__title",children:e}),t&&(0,a.jsx)(b.__experimentalText,{variant:"muted",className:"dataviews-settings-section__description",children:t})]}),(0,a.jsx)(b.__experimentalGrid,{columns:8,gap:4,className:"dataviews-settings-section__content",children:n})]})}function fE(){const{view:e}=(0,h.useContext)(Lw),t=(0,y.useInstanceId)(mE,"dataviews-view-config-dropdown"),n=H_.find((t=>t.type===e.type));return(0,a.jsx)(b.Dropdown,{expandOnMobile:!0,popoverProps:{...sE,id:t},renderToggle:({onToggle:e,isOpen:n})=>(0,a.jsx)(b.Button,{size:"compact",icon:Jk,label:(0,w._x)("View options","View is used as a noun"),onClick:e,"aria-expanded":n?"true":"false","aria-controls":t}),renderContent:()=>(0,a.jsx)(b.__experimentalDropdownContentWrapper,{paddingSize:"medium",className:"dataviews-config__popover-content-wrapper",children:(0,a.jsxs)(b.__experimentalVStack,{className:"dataviews-view-config",spacing:6,children:[(0,a.jsxs)(pE,{title:(0,w.__)("Appearance"),children:[(0,a.jsxs)(b.__experimentalHStack,{expanded:!0,className:"is-divided-in-two",children:[(0,a.jsx)(rE,{}),(0,a.jsx)(aE,{})]}),!!n?.viewConfigOptions&&(0,a.jsx)(n.viewConfigOptions,{}),(0,a.jsx)(tE,{}),(0,a.jsx)(oE,{})]}),(0,a.jsx)(pE,{title:(0,w.__)("Properties"),children:(0,a.jsx)(hE,{})})]})})})}function mE(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(iE,{}),(0,a.jsx)(fE,{})]})}var gE=(0,h.memo)(mE);const vE=e=>e.id,yE=()=>!0,xE=[],bE=H_.filter((e=>!e.isPicker));function wE({header:e,search:t=!0,searchLabel:n}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.__experimentalHStack,{alignment:"top",justify:"space-between",className:"dataviews__view-actions",spacing:1,children:[(0,a.jsxs)(b.__experimentalHStack,{justify:"start",expanded:!1,className:"dataviews__search",children:[t&&(0,a.jsx)(Xk,{label:n}),(0,a.jsx)(Z_,{})]}),(0,a.jsxs)(b.__experimentalHStack,{spacing:1,expanded:!1,style:{flexShrink:0},children:[(0,a.jsx)(gE,{}),e]})]}),(0,a.jsx)(Wk,{className:"dataviews-filters__container"}),(0,a.jsx)(Uk,{}),(0,a.jsx)(Kk,{})]})}const _E=function({view:e,onChangeView:t,fields:n,search:s=!0,searchLabel:i,actions:r=xE,data:o,getItemId:l=vE,getItemLevel:c,isLoading:u=!1,paginationInfo:d,defaultLayouts:p,selection:f,onChangeSelection:m,onClickItem:g,renderItemLink:v,isItemClickable:x=yE,header:b,children:w,config:_={perPageSizes:[10,20,50,100]},empty:j}){const{infiniteScrollHandler:S}=d,C=(0,h.useRef)(null),[k,E]=(0,h.useState)(0),P=(0,y.useResizeObserver)((e=>{E(e[0].borderBoxSize[0].inlineSize)}),{box:"border-box"}),[I,V]=(0,h.useState)([]),T=void 0===f||void 0===m,O=T?I:f,[A,N]=(0,h.useState)(null),F=(0,h.useMemo)((()=>Nw(n)),[n]),M=(0,h.useMemo)((()=>O.filter((e=>o.some((t=>l(t)===e))))),[O,o,l]),B=Hk(F,e),D=(0,h.useMemo)((()=>(B||[]).some((e=>e.isPrimary||e.isLocked))),[B]),[R,L]=(0,h.useState)(D);(0,h.useEffect)((()=>{D&&!R&&L(!0)}),[D,R]),(0,h.useEffect)((()=>{if(!e.infiniteScrollEnabled||!C.current)return;const t=(0,y.throttle)((e=>{const t=e.target,n=t.scrollTop,s=t.scrollHeight;n+t.clientHeight>=s-100&&S?.()}),100),n=C.current;return n.addEventListener("scroll",t),()=>{n.removeEventListener("scroll",t),t.cancel()}}),[S,e.infiniteScrollEnabled]);const z=(0,h.useMemo)((()=>Object.fromEntries(Object.entries(p).filter((([e])=>bE.some((t=>t.type===e)))))),[p]);return z[e.type]?(0,a.jsx)(Lw.Provider,{value:{view:e,onChangeView:t,fields:F,actions:r,data:o,isLoading:u,paginationInfo:d,selection:M,onChangeSelection:function(e){const t="function"==typeof e?e(O):e;T&&V(t),m&&m(t)},openedFilter:A,setOpenedFilter:N,getItemId:l,getItemLevel:c,isItemClickable:x,onClickItem:g,renderItemLink:v,containerWidth:k,containerRef:C,resizeObserverRef:P,defaultLayouts:z,filters:B,isShowingFilter:R,setIsShowingFilter:L,config:_,empty:j,hasInfiniteScrollHandler:!!S},children:(0,a.jsx)("div",{className:"dataviews-wrapper",ref:C,children:w??(0,a.jsx)(wE,{header:b,search:s,searchLabel:i})})}):null};_E.BulkActionToolbar=u_,_E.Filters=Gk,_E.FiltersToggled=Wk,_E.FiltersToggle=Z_,_E.Layout=Uk,_E.LayoutSwitcher=iE,_E.Pagination=qk,_E.Search=Xk,_E.ViewConfig=fE,_E.Footer=Kk;var jE=_E,SE=i(7951);function CE(){const e=(0,c.useSelect)((e=>{const{getSettings:t}=ne(e(Rt));return t()}),[]),t=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,n=(0,c.useSelect)((e=>e(j.store).getBlockPatterns()),[]),s=(0,h.useMemo)((()=>[...t||[],...n||[]].filter(py)),[t,n]);return(0,h.useMemo)((()=>{const{__experimentalAdditionalBlockPatterns:t,...n}=e;return{...n,__experimentalBlockPatterns:s,isPreviewMode:!0}}),[e,s])}var kE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),EE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"})});const{useHistory:PE,useLocation:IE}=ne(Lt.privateApis),{CreatePatternModal:VE,useAddPatternCategory:TE}=ne(_e.privateApis),{CreateTemplatePartModal:OE}=ne(f.privateApis);function AE(){const e=PE(),t=IE(),[n,s]=(0,h.useState)(!1),[i,r]=(0,h.useState)(!1),{createPatternFromFile:o}=ne((0,c.useDispatch)(_e.store)),{createSuccessNotice:l,createErrorNotice:u}=(0,c.useDispatch)(_.store),d=(0,h.useRef)(),{isBlockBasedTheme:p,addNewPatternLabel:f,addNewTemplatePartLabel:m,canCreatePattern:g,canCreateTemplatePart:v}=(0,c.useSelect)((e=>{const{getCurrentTheme:t,getPostType:n,canUser:s}=e(j.store);return{isBlockBasedTheme:t()?.is_block_theme,addNewPatternLabel:n(Ie.user)?.labels?.add_new_item,addNewTemplatePartLabel:n(Ce)?.labels?.add_new_item,canCreatePattern:s("create",{kind:"postType",name:Ie.user}),canCreateTemplatePart:s("create",{kind:"postType",name:Ce})}}),[]);function y(){s(!1),r(!1)}const x=[];g&&x.push({icon:Ra,onClick:()=>s(!0),title:f}),p&&v&&x.push({icon:kE,onClick:()=>r(!0),title:m}),g&&x.push({icon:EE,onClick:()=>{d.current.click()},title:(0,w.__)("Import pattern from JSON")});const{categoryMap:S,findOrCreateTerm:C}=TE();return 0===x.length?null:(0,a.jsxs)(a.Fragment,{children:[f&&(0,a.jsx)(b.DropdownMenu,{controls:x,icon:null,toggleProps:{variant:"primary",showTooltip:!1,__next40pxDefaultSize:!0},text:f,label:f}),n&&(0,a.jsx)(VE,{onClose:()=>s(!1),onSuccess:function({pattern:t}){s(!1),e.navigate(`/${Ie.user}/${t.id}?canvas=edit`)},onError:y}),i&&(0,a.jsx)(OE,{closeModal:()=>r(!1),blocks:[],onCreate:function(t){r(!1),e.navigate(`/${Ce}/${t.id}?canvas=edit`)},onError:y}),(0,a.jsx)("input",{type:"file",accept:".json",hidden:!0,ref:d,onChange:async n=>{const s=n.target.files?.[0];if(s)try{let n;if(t.query.postType!==Ce){const e=Array.from(S.values()).find((e=>e.name===t.query.categoryId));e&&(n=e.id||await C(e.label))}const i=await o(s,n?[n]:void 0);n||"my-patterns"===t.query.categoryId||e.navigate(`/pattern?categoryId=${Ve}`),l((0,w.sprintf)((0,w.__)('Imported "%s" from JSON.'),i.title.raw),{type:"snackbar",id:"import-pattern-success"})}catch(e){u(e.message,{type:"snackbar",id:"import-pattern-error"})}finally{n.target.value=""}}})]})}const{RenamePatternCategoryModal:NE}=ne(_e.privateApis);function FE({category:e,onClose:t}){const[n,s]=(0,h.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.MenuItem,{onClick:()=>s(!0),children:(0,w.__)("Rename")}),n&&(0,a.jsx)(ME,{category:e,onClose:()=>{s(!1),t()}})]})}function ME({category:e,onClose:t}){const n={id:e.id,slug:e.slug,name:e.label},s=Vy();return(0,a.jsx)(NE,{category:n,existingCategories:s,onClose:t,overlayClassName:"edit-site-list__rename-modal",focusOnMount:"firstContentElement",size:"small"})}const{useHistory:BE}=ne(Lt.privateApis);function DE({category:e,onClose:t}){const[n,s]=(0,h.useState)(!1),i=BE(),{createSuccessNotice:r,createErrorNotice:o}=(0,c.useDispatch)(_.store),{deleteEntityRecord:l,invalidateResolution:u}=(0,c.useDispatch)(j.store);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.MenuItem,{isDestructive:!0,onClick:()=>s(!0),children:(0,w.__)("Delete")}),(0,a.jsx)(b.__experimentalConfirmDialog,{isOpen:n,onConfirm:async()=>{try{await l("taxonomy","wp_pattern_category",e.id,{force:!0},{throwOnError:!0}),u("getUserPatternCategories"),u("getEntityRecords",["postType",Ie.user,{per_page:-1}]),r((0,w.sprintf)((0,w._x)('"%s" deleted.',"pattern category"),e.label),{type:"snackbar",id:"pattern-category-delete"}),t?.(),i.navigate(`/pattern?categoryId=${Ve}`)}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while deleting the pattern category.");o(t,{type:"snackbar",id:"pattern-category-delete"})}},onCancel:()=>s(!1),confirmButtonText:(0,w.__)("Delete"),className:"edit-site-patterns__delete-modal",title:(0,w.sprintf)((0,w._x)('Delete "%s"?',"pattern category"),(0,qt.decodeEntities)(e.label)),size:"medium",__experimentalHideHeader:!1,children:(0,w.sprintf)((0,w.__)('Are you sure you want to delete the category "%s"? The patterns will not be deleted.'),(0,qt.decodeEntities)(e.label))})]})}function RE({categoryId:e,type:t}){const{patternCategories:n}=Vy();let s;return t===Ie.user&&e&&(s=n.find((t=>t.name===e))),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(AE,{}),!!s?.id&&(0,a.jsx)(b.DropdownMenu,{icon:No,label:(0,w.__)("Actions"),toggleProps:{className:"edit-site-patterns__button",size:"compact"},children:({onClose:e})=>(0,a.jsxs)(b.MenuGroup,{children:[(0,a.jsx)(FE,{category:s,onClose:e}),(0,a.jsx)(DE,{category:s,onClose:e})]})})]})}var LE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})});const{useHistory:zE}=ne(Lt.privateApis),HE=()=>{const e=zE();return(0,h.useMemo)((()=>({id:"edit-post",label:(0,w.__)("Edit"),isPrimary:!0,icon:LE,isEligible:e=>"trash"!==e.status&&e.type!==Ie.theme,callback(t){const n=t[0];e.navigate(`/${n.type}/${n.id}?canvas=edit`)}})),[e])};var GE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z"})}),WE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})}),UE=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})});function qE(e,t){return(0,c.useSelect)((n=>{const{getEntityRecord:s,getUser:i,getEditedEntityRecord:r}=n(j.store),a=r("postType",e,t),o=a?.original_source,l=a?.author_text;switch(o){case"theme":return{type:o,icon:Da,text:l,isCustomized:a.source===ke};case"plugin":return{type:o,icon:GE,text:l,isCustomized:a.source===ke};case"site":{const e=s("root","__unstableBase");return{type:o,icon:WE,imageUrl:e?.site_logo?s("postType","attachment",e.site_logo)?.source_url:void 0,text:l,isCustomized:!1}}default:{const e=i(a.author);return{type:"user",icon:UE,imageUrl:e?.avatar_urls?.[48],text:l??e?.name,isCustomized:!1}}}}),[e,t])}const{useGlobalStyle:ZE}=ne(x.privateApis);const YE={label:(0,w.__)("Preview"),id:"preview",render:function({item:e}){const t=(0,h.useId)(),n=e.description||e?.excerpt?.raw,s=e.type===Ce,[i]=ZE("color.background"),r=(0,h.useMemo)((()=>e.blocks??(0,o.parse)(e.content.raw,{__unstableSkipMigrationLogs:!0})),[e?.content?.raw,e.blocks]),l=!r?.length;return(0,a.jsxs)("div",{className:"page-patterns-preview-field",style:{backgroundColor:i},"aria-describedby":n?t:void 0,children:[l&&s&&(0,w.__)("Empty template part"),l&&!s&&(0,w.__)("Empty pattern"),!l&&(0,a.jsx)(x.BlockPreview.Async,{children:(0,a.jsx)(x.BlockPreview,{blocks:r,viewportWidth:e.viewportWidth})}),!!n&&(0,a.jsx)("div",{hidden:!0,id:t,children:n})]})},enableSorting:!1},KE=[{value:Ae.full,label:(0,w._x)("Synced","pattern (singular)"),description:(0,w.__)("Patterns that are kept in sync across the site.")},{value:Ae.unsynced,label:(0,w._x)("Not synced","pattern (singular)"),description:(0,w.__)("Patterns that can be changed freely without affecting the site.")}],XE={label:(0,w.__)("Sync status"),id:"sync-status",render:({item:e})=>{const t="wp_pattern_sync_status"in e?e.wp_pattern_sync_status||Ae.full:Ae.unsynced;return(0,a.jsx)("span",{className:`edit-site-patterns__field-sync-status-${t}`,children:KE.find((({value:e})=>e===t)).label})},elements:KE,filterBy:{operators:["is"],isPrimary:!0},enableSorting:!1};const QE={label:(0,w.__)("Author"),id:"author",getValue:({item:e})=>e.author_text,render:function({item:e}){const[t,n]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:r}=qE(e.type,e.id);return(0,a.jsxs)(b.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,a.jsx)("div",{className:Ht("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,a.jsx)("img",{onLoad:()=>n(!0),alt:"",src:r})}),!r&&(0,a.jsx)("div",{className:"page-templates-author-field__icon",children:(0,a.jsx)(qa,{icon:i})}),(0,a.jsx)("span",{className:"page-templates-author-field__name",children:s})]})},filterBy:{isPrimary:!0}},{ExperimentalBlockEditorProvider:JE}=ne(x.privateApis),{usePostActions:$E,patternTitleField:eP}=ne(f.privateApis),{useLocation:tP,useHistory:nP}=ne(Lt.privateApis),sP=[],iP={[Be]:{layout:{styles:{author:{width:"1%"}}}},[Me]:{layout:{badgeFields:["sync-status"]}}},rP={type:Me,perPage:20,titleField:"title",mediaField:"preview",fields:["sync-status"],filters:[],...iP[Me]};function aP(){const{path:e,query:t}=tP(),{postType:n="wp_block",categoryId:s}=t,i=nP(),r=s||Ve,{view:o,updateView:l,isModified:u,resetToDefault:d}=(0,SE.useView)({kind:"postType",name:n,slug:r,defaultView:rP,queryParams:{page:Number(t.pageNumber??1),search:t.search},onChangeQueryParams:n=>{i.navigate((0,Qt.addQueryArgs)(e,{...t,pageNumber:n.page,search:n.search}))}}),p=o.filters?.find((({field:e})=>"sync-status"===e))?.value,{patterns:f,isResolving:m}=Iy(n,r,{search:o.search,syncStatus:p}),{records:g}=(0,j.useEntityRecords)("postType",Ce,{per_page:-1}),v=(0,h.useMemo)((()=>{if(!g)return sP;const e=new Set;return g.forEach((t=>{e.add(t.author_text)})),Array.from(e).map((e=>({value:e,label:e})))}),[g]),y=(0,h.useMemo)((()=>{const e=[YE,eP];return n===Ie.user?e.push(XE):n===Ce&&e.push({...QE,elements:v}),e}),[n,v]),{data:x,paginationInfo:_}=(0,h.useMemo)((()=>{const e={...o};return delete e.search,n!==Ce&&(e.filters=[]),Dw(f,e,y)}),[f,o,y,n]),S=function(e){const t=(0,h.useMemo)((()=>e?.filter((e=>e.type!==Ie.theme)).map((e=>[e.type,e.id]))??[]),[e]),n=(0,c.useSelect)((e=>{const{getEntityRecordPermissions:n}=ne(e(j.store));return t.reduce(((e,[t,s])=>(e[s]=n("postType",t,s),e)),{})}),[t]);return(0,h.useMemo)((()=>e?.map((e=>({...e,permissions:n?.[e.id]??{}})))??[]),[e,n])}(x),C=$E({postType:Ce,context:"list"}),k=$E({postType:Ie.user,context:"list"}),E=HE(),P=(0,h.useMemo)((()=>n===Ce?[E,...C].filter(Boolean):[E,...k].filter(Boolean)),[E,n,C,k]),I=CE(),{title:V,description:T}=function(e,t){const{patternCategories:n}=Vy(),s=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_part_areas||[]),[]);let i,r,a;if(e===Ce){const e=s.find((e=>e.area===t));i=e?.label||(0,w.__)("All Template Parts"),r=e?.description||(0,w.__)("Includes every template part defined for any area.")}else e===Ie.user&&t&&(a=n.find((e=>e.name===t)),i=a?.label,r=a?.description);return{title:i,description:r}}(n,r);return(0,a.jsx)(JE,{settings:I,children:(0,a.jsx)(Wm,{className:"edit-site-page-patterns-dataviews",title:V,subTitle:T,actions:(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:d,children:(0,w.__)("Reset view")}),(0,a.jsx)(RE,{})]}),children:(0,a.jsx)(jE,{paginationInfo:_,fields:y,actions:P,data:S||sP,getItemId:e=>e.name??e.id,isLoading:m,isItemClickable:e=>e.type!==Ie.theme,onClickItem:e=>{i.navigate(`/${e.type}/${[Ie.user,Ce].includes(e.type)?e.id:e.name}?canvas=edit`)},view:o,onChangeView:l,defaultLayouts:iP},r+n)})})}const oP={name:"patterns",path:"/pattern",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme,n=t||jv(e)?"/":void 0;return(0,a.jsx)(Ny,{backPath:n})},content:(0,a.jsx)(aP,{}),mobile({siteData:e,query:t}){const{categoryId:n}=t,s=e.currentTheme?.is_block_theme,i=s||jv(e)?"/":void 0;return n?(0,a.jsx)(aP,{}):(0,a.jsx)(Ny,{backPath:i})}}},lP={name:"pattern-item",path:"/wp_block/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme,n=t||jv(e)?"/":void 0;return(0,a.jsx)(Ny,{backPath:n})},mobile:(0,a.jsx)(_v,{}),preview:(0,a.jsx)(_v,{})}},cP={name:"template-part-item",path:"/wp_template_part/*postId",areas:{sidebar:(0,a.jsx)(Ny,{backPath:"/"}),mobile:(0,a.jsx)(_v,{}),preview:(0,a.jsx)(_v,{})}};var uP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});const{useLocation:dP}=ne(Lt.privateApis),hP=[];function pP({template:e,isActive:t}){const{text:n,icon:s}=qE(e.type,e.id);return(0,a.jsx)(Qa,{to:(0,Qt.addQueryArgs)("/template",{activeView:n}),icon:s,"aria-current":t,children:n})}function fP(){const{query:{activeView:e="active"}}=dP(),{records:t}=(0,j.useEntityRecords)("root","registeredTemplate",{per_page:-1}),n=(0,h.useMemo)((()=>{const e=t?.reduce(((e,t)=>{const n=t.author_text;return n&&!e[n]&&(e[n]=t),e}),{});return(e&&Object.values(e))??hP}),[t]);return(0,a.jsxs)(b.__experimentalItemGroup,{className:"edit-site-sidebar-navigation-screen-templates-browse",children:[(0,a.jsx)(Qa,{to:"/template",icon:uP,"aria-current":"active"===e,children:(0,w.__)("Active templates")}),(0,a.jsx)(Qa,{to:(0,Qt.addQueryArgs)("/template",{activeView:"user"}),icon:UE,"aria-current":"user"===e,children:(0,w.__)("Created templates")}),n.map((t=>(0,a.jsx)(pP,{template:t,isActive:e===t.author_text},t.author_text)))]})}function mP({backPath:e}){return(0,a.jsx)(Ua,{title:(0,w.__)("Templates"),description:(0,w.__)("Create new templates, or reset any customizations made to the templates supplied by your theme."),backPath:e,content:(0,a.jsx)(fP,{})})}var gP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z"})}),vP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})}),yP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.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"})}),xP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z"})}),bP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z"})}),wP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.Path,{d:"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z"})}),_P=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",d:"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z",clipRule:"evenodd"})}),jP=(0,a.jsx)(Zt.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(Zt.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"})}),SP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),CP=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"})]}),kP=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})});const EP={},PP=(e,t)=>{let n=e;return t.split(".").forEach((e=>{n=n?.[e]})),n};function IP(e,t){return`${e}-${(0,Qt.safeDecodeURI)(t)}`}const VP=()=>(0,c.useSelect)((e=>e(j.store).getEntityRecords("postType",Se,{per_page:-1})),[]),TP=()=>(0,c.useSelect)((e=>e(j.store).getCurrentTheme()?.default_template_types||[]),[]),OP=()=>{const e=(0,c.useSelect)((e=>e(j.store).getPostTypes({per_page:-1})),[]);return(0,h.useMemo)((()=>{const t=["attachment"];return e?.filter((({viewable:e,slug:n})=>e&&!t.includes(n))).sort(((e,t)=>"post"===e.slug||"post"===t.slug?0:e.name.localeCompare(t.name)))}),[e])};function AP(){const e=OP(),t=(0,h.useMemo)((()=>e?.filter((e=>e.has_archive))),[e]),n=VP(),s=(0,h.useMemo)((()=>e?.reduce(((e,{labels:t})=>{const n=t.singular_name.toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[e]),i=(0,h.useCallback)((({labels:e,slug:t})=>{const n=e.singular_name.toLowerCase();return s[n]>1&&n!==t}),[s]);return(0,h.useMemo)((()=>t?.filter((e=>!(n||[]).some((t=>t.slug==="archive-"+e.slug)))).map((e=>{let t;return t=i(e)?(0,w.sprintf)((0,w.__)("Archive: %1$s (%2$s)"),e.labels.singular_name,e.slug):(0,w.sprintf)((0,w.__)("Archive: %s"),e.labels.singular_name),{slug:"archive-"+e.slug,description:(0,w.sprintf)((0,w.__)("Displays an archive with the latest posts of type: %s."),e.labels.singular_name),title:t,icon:"string"==typeof e.icon&&e.icon.startsWith("dashicons-")?e.icon.slice(10):xP,templatePrefix:"archive"}}))||[]),[t,n,i])}const NP=e=>{const t=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getTaxonomies({per_page:-1})),[]);return(0,h.useMemo)((()=>e?.filter((({visibility:e})=>e?.publicly_queryable))),[e])})(),n=VP(),s=TP(),i=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return["category","post_tag"].includes(t)||(n=`taxonomy-${n}`),"post_tag"===t&&(n="tag"),e[t]=n,e}),{})),[t]),r=t?.reduce(((e,{labels:t})=>{const n=(t.template_name||t.singular_name).toLowerCase();return e[n]=(e[n]||0)+1,e}),{}),a=BP("taxonomy",i),o=(n||[]).map((({slug:e})=>e)),l=(t||[]).reduce(((t,n)=>{const{slug:l,labels:c}=n,u=i[l],d=s?.find((({slug:e})=>e===u)),h=o?.includes(u),p=((e,t)=>{if(["category","post_tag"].includes(t))return!1;const n=(e.template_name||e.singular_name).toLowerCase();return r[n]>1&&n!==t})(c,l);let f=c.template_name||c.singular_name;p&&(f=c.template_name?(0,w.sprintf)((0,w._x)("%1$s (%2$s)","taxonomy template menu label"),c.template_name,l):(0,w.sprintf)((0,w._x)("%1$s (%2$s)","taxonomy menu label"),c.singular_name,l));const m=d?{...d,templatePrefix:i[l]}:{slug:u,title:f,description:(0,w.sprintf)((0,w.__)("Displays taxonomy: %s."),c.singular_name),icon:_P,templatePrefix:i[l]},g=a?.[l]?.hasEntities;return g&&(m.onClick=t=>{e({type:"taxonomy",slug:l,config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"count",exclude:a[l].existingEntitiesIds}),getSpecificTemplate:e=>{const t=IP(i[l],e.slug);return{title:t,slug:t,templatePrefix:i[l]}}},labels:c,hasGeneralTemplate:h,template:t})}),h&&!g||t.push(m),t}),[]);return(0,h.useMemo)((()=>l.reduce(((e,t)=>{const{slug:n}=t;let s="taxonomiesMenuItems";return["category","tag"].includes(n)&&(s="defaultTaxonomiesMenuItems"),e[s].push(t),e}),{defaultTaxonomiesMenuItems:[],taxonomiesMenuItems:[]})),[l])},FP={user:"author"},MP={user:{who:"authors"}};const BP=(e,t,n=EP)=>{const s=(0,c.useSelect)((s=>Object.keys(t||{}).reduce(((t,i)=>(t[i]=!!s(j.store).getEntityRecords(e,i,{per_page:1,_fields:"id",context:"view",...n[i]})?.length,t)),{})),[t,e,n]);return(0,h.useMemo)((()=>Object.keys(t||{}).reduce(((e,t)=>(e[t]={hasEntities:s[t]},e)),{})),[t,s])},DP=[];function RP({suggestion:e,search:t,onSelect:n,entityForSuggestions:s}){const i="edit-site-custom-template-modal__suggestions_list__list-item";return(0,a.jsxs)(b.Composite.Item,{render:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,role:"option",className:i,onClick:()=>n(s.config.getSpecificTemplate(e))}),children:[(0,a.jsx)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,weight:500,className:`${i}__title`,children:(0,a.jsx)(b.TextHighlight,{text:(0,qt.decodeEntities)(e.name),highlight:t})}),e.link&&(0,a.jsx)(b.__experimentalText,{size:"body",lineHeight:1.53846153846,className:`${i}__info`,children:(0,Qt.safeDecodeURI)(e.link)})]})}function LP(e,t){const{config:n}=e,s=(0,h.useMemo)((()=>({order:"asc",context:"view",search:t,per_page:t?20:10,...n.queryArgs(t)})),[t,n]),{records:i,hasResolved:r}=(0,j.useEntityRecords)(e.type,e.slug,s),[a,o]=(0,h.useState)(DP);return(0,h.useEffect)((()=>{if(!r)return;let e=DP;var t,s;i?.length&&(e=i,n.recordNamePath&&(t=e,s=n.recordNamePath,e=(t||[]).map((e=>({...e,name:(0,qt.decodeEntities)(PP(e,s))}))))),o(e)}),[i,r]),a}function zP({entityForSuggestions:e,onSelect:t}){const[n,s,i]=(0,y.useDebouncedInput)(),r=LP(e,i),{labels:o}=e,[l,c]=(0,h.useState)(!1);return!l&&r?.length>9&&c(!0),(0,a.jsxs)(a.Fragment,{children:[l&&(0,a.jsx)(b.SearchControl,{__nextHasNoMarginBottom:!0,onChange:s,value:n,label:o.search_items,placeholder:o.search_items}),!!r?.length&&(0,a.jsx)(b.Composite,{orientation:"vertical",role:"listbox",className:"edit-site-custom-template-modal__suggestions_list","aria-label":(0,w.__)("Suggestions list"),children:r.map((n=>(0,a.jsx)(RP,{suggestion:n,search:i,onSelect:t,entityForSuggestions:e},n.slug)))}),i&&!r?.length&&(0,a.jsx)(b.__experimentalText,{as:"p",className:"edit-site-custom-template-modal__no-results",children:o.not_found})]})}var HP=function({onSelect:e,entityForSuggestions:t,onBack:n,containerRef:s}){const[i,r]=(0,h.useState)();return(0,h.useEffect)((()=>{if(s.current){const[e]=en.focus.focusable.find(s.current);e?.focus()}}),[i]),(0,a.jsxs)(b.__experimentalVStack,{spacing:4,className:"edit-site-custom-template-modal__contents-wrapper",alignment:"left",children:[!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("Select whether to create a single template for all items or a specific one.")}),(0,a.jsxs)(b.Flex,{className:"edit-site-custom-template-modal__contents",gap:"4",align:"initial",children:[(0,a.jsxs)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{const{slug:n,title:s,description:i,templatePrefix:r}=t.template;e({slug:n,title:s,description:i,templatePrefix:r})},children:[(0,a.jsx)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.all_items}),(0,a.jsx)(b.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,w.__)("For all items")})]}),(0,a.jsxs)(b.FlexItem,{isBlock:!0,as:b.Button,onClick:()=>{r(!0)},children:[(0,a.jsx)(b.__experimentalText,{as:"span",weight:500,lineHeight:1.53846153846,children:t.labels.singular_name}),(0,a.jsx)(b.__experimentalText,{as:"span",lineHeight:1.53846153846,children:(0,w.__)("For a specific item")})]})]}),(0,a.jsx)(b.Flex,{justify:"right",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,w.__)("Back")})})]}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.__experimentalText,{as:"p",children:(0,w.__)("This template will be used only for the specific item chosen.")}),(0,a.jsx)(zP,{entityForSuggestions:t,onSelect:e}),(0,a.jsx)(b.Flex,{justify:"right",children:(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t.hasGeneralTemplate?n():r(!1)},children:(0,w.__)("Back")})})]})]})};var GP=function(){return GP=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},GP.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function WP(e){return e.toLowerCase()}var UP=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],qP=/[^A-Z0-9]+/gi;function ZP(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}function YP(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,s=void 0===n?UP:n,i=t.stripRegexp,r=void 0===i?qP:i,a=t.transform,o=void 0===a?WP:a,l=t.delimiter,c=void 0===l?" ":l,u=ZP(ZP(e,s,"$1\0$2"),r,"\0"),d=0,h=u.length;"\0"===u.charAt(d);)d++;for(;"\0"===u.charAt(h-1);)h--;return u.slice(d,h).split("\0").map(o).join(c)}(e,GP({delimiter:"."},t))}var KP=function({createTemplate:e,onBack:t}){const[n,s]=(0,h.useState)(""),i=(0,w.__)("Custom Template"),[r,o]=(0,h.useState)(!1),l=(0,h.useRef)();return(0,h.useEffect)((()=>{l.current&&l.current.focus()}),[]),(0,a.jsx)("form",{onSubmit:async function(t){if(t.preventDefault(),!r){o(!0);try{await e({slug:(s=n||i,void 0===a&&(a={}),YP(s,GP({delimiter:"-"},a))||"wp-custom-template"),title:n||i},!1)}finally{o(!1)}var s,a}},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:6,children:[(0,a.jsx)(b.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Name"),value:n,onChange:s,placeholder:i,disabled:r,ref:l,help:(0,w.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,a.jsxs)(b.__experimentalHStack,{className:"edit-site-custom-generic-template__modal-actions",justify:"right",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,children:(0,w.__)("Back")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,children:(0,w.__)("Create")})]})]})})};const{useHistory:XP}=ne(Lt.privateApis),QP=["front-page","home","single","page","index","archive","author","category","date","tag","search","404"],JP={"front-page":gP,home:vP,single:yP,page:Ba,archive:xP,search:Yt,404:bP,index:wP,category:Hw,author:UE,taxonomy:_P,date:jP,tag:SP,attachment:CP};function $P({title:e,direction:t,className:n,description:s,icon:i,onClick:r,children:o}){return(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,className:n,onClick:r,label:s,showTooltip:!!s,children:(0,a.jsxs)(b.Flex,{as:"span",spacing:2,align:"center",justify:"center",style:{width:"100%"},direction:t,children:[(0,a.jsx)("div",{className:"edit-site-add-new-template__template-icon",children:(0,a.jsx)(b.Icon,{icon:i})}),(0,a.jsxs)(b.__experimentalVStack,{className:"edit-site-add-new-template__template-name",alignment:"center",spacing:0,children:[(0,a.jsx)(b.__experimentalText,{align:"center",weight:500,lineHeight:1.53846153846,children:e}),o]})]})})}const eI=1,tI=2,nI=3;function sI({onClose:e}){const[t,n]=(0,h.useState)(eI),[s,i]=(0,h.useState)({}),[r,o]=(0,h.useState)(!1),l=function(e,t){const n=(TP()||[]).filter((e=>QP.includes(e.slug))),s=n=>{t?.(),e(n)},i=[...n],{defaultTaxonomiesMenuItems:r,taxonomiesMenuItems:a}=NP(s),{defaultPostTypesMenuItems:o,postTypesMenuItems:l}=(e=>{const t=OP(),n=TP(),s=(0,h.useMemo)((()=>t?.reduce(((e,{labels:t})=>{const n=(t.template_name||t.singular_name).toLowerCase();return e[n]=(e[n]||0)+1,e}),{})),[t]),i=(0,h.useCallback)((({labels:e,slug:t})=>{const n=(e.template_name||e.singular_name).toLowerCase();return s[n]>1&&n!==t}),[s]),r=(0,h.useMemo)((()=>t?.reduce(((e,{slug:t})=>{let n=t;return"page"!==t&&(n=`single-${n}`),e[t]=n,e}),{})),[t]),a=BP("postType",r),o=(t||[]).reduce(((t,s)=>{const{slug:o,labels:l,icon:c}=s,u=r[o],d=n?.find((({slug:e})=>e===u)),h=i(s);let p=l.template_name||(0,w.sprintf)((0,w.__)("Single item: %s"),l.singular_name);h&&(p=l.template_name?(0,w.sprintf)((0,w._x)("%1$s (%2$s)","post type menu label"),l.template_name,o):(0,w.sprintf)((0,w._x)("Single item: %1$s (%2$s)","post type menu label"),l.singular_name,o));const f=d?{...d,templatePrefix:r[o]}:{slug:u,title:p,description:(0,w.sprintf)((0,w.__)("Displays a single item: %s."),l.singular_name),icon:"string"==typeof c&&c.startsWith("dashicons-")?c.slice(10):kP,templatePrefix:r[o]},m=a?.[o]?.hasEntities;return m&&(f.onClick=t=>{e({type:"postType",slug:o,config:{recordNamePath:"title.rendered",queryArgs:({search:e})=>({_fields:"id,title,slug,link",orderBy:e?"relevance":"modified",exclude:a[o].existingEntitiesIds}),getSpecificTemplate:e=>{const t=IP(r[o],e.slug);return{title:t,slug:t,templatePrefix:r[o]}}},labels:l,template:t})}),m&&t.push(f),t}),[]),l=(0,h.useMemo)((()=>o.reduce(((e,t)=>{const{slug:n}=t;let s="postTypesMenuItems";return"page"===n&&(s="defaultPostTypesMenuItems"),e[s].push(t),e}),{defaultPostTypesMenuItems:[],postTypesMenuItems:[]})),[o]);return l})(s),c=function(e){const t=VP(),n=TP(),s=BP("root",FP,MP);let i=n?.find((({slug:e})=>"author"===e));i||(i={description:(0,w.__)("Displays latest posts written by a single author."),slug:"author",title:"Author"});const r=!!t?.find((({slug:e})=>"author"===e));if(s.user?.hasEntities&&(i={...i,templatePrefix:"author"},i.onClick=t=>{e({type:"root",slug:"user",config:{queryArgs:({search:e})=>({_fields:"id,name,slug,link",orderBy:e?"name":"registered_date",exclude:s.user.existingEntitiesIds,who:"authors"}),getSpecificTemplate:e=>{const t=IP("author",e.slug);return{title:(0,w.sprintf)((0,w.__)("Author: %s"),e.name),slug:t,templatePrefix:"author"}}},labels:{singular_name:(0,w.__)("Author"),search_items:(0,w.__)("Search Authors"),not_found:(0,w.__)("No authors found."),all_items:(0,w.__)("All Authors")},hasGeneralTemplate:r,template:t})}),!r||s.user?.hasEntities)return i}(s);[...r,...o,c].forEach((e=>{if(!e)return;const t=i.findIndex((t=>t.slug===e.slug));t>-1?i[t]=e:i.push(e)})),i?.sort(((e,t)=>QP.indexOf(e.slug)-QP.indexOf(t.slug)));const u=[...i,...AP(),...l,...a];return u}(i,(()=>n(tI))),u=XP(),{saveEntityRecord:d}=(0,c.useDispatch)(j.store),{createErrorNotice:p,createSuccessNotice:f}=(0,c.useDispatch)(_.store),m=(0,h.useRef)(null),g=(0,y.useViewportMatch)("medium","<"),v=(0,c.useSelect)((e=>e(j.store).getEntityRecord("root","__unstableBase")?.home),[]),x={"front-page":v,date:(0,w.sprintf)((0,w.__)("E.g. %s"),v+"/"+(new Date).getFullYear())};async function S(e,t=!0){if(!r){o(!0);try{const{title:n,description:s,slug:i}=e,r=await d("postType",Se,{description:s,slug:i.toString(),status:"publish",title:n,meta:{is_wp_suggestion:t}},{throwOnError:!0});u.navigate(`/${Se}/${r.id}?canvas=edit`),f((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(r.title?.rendered||n)||(0,w.__)("(no title)")),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while creating the template.");p(t,{type:"snackbar"})}finally{o(!1)}}}(0,h.useEffect)((()=>{if(m.current&&t===eI){const[e]=en.focus.focusable.find(m.current);e?.focus()}}),[t]);let C=(0,w.__)("Add template");return t===tI?C=(0,w.sprintf)((0,w.__)("Add template: %s"),s.labels.singular_name):t===nI&&(C=(0,w.__)("Create custom template")),(0,a.jsxs)(b.Modal,{title:C,className:Ht("edit-site-add-new-template__modal",{"edit-site-add-new-template__modal_template_list":t===eI,"edit-site-custom-template-modal":t===tI}),onRequestClose:()=>{e(),n(eI)},overlayClassName:t===nI?"edit-site-custom-generic-template__modal":void 0,ref:m,children:[t===eI&&(0,a.jsxs)(b.__experimentalGrid,{columns:g?2:3,gap:4,align:"flex-start",justify:"center",className:"edit-site-add-new-template__template-list__contents",children:[(0,a.jsx)(b.Flex,{className:"edit-site-add-new-template__template-list__prompt",children:(0,w.__)("Select what the new template should apply to:")}),l.map((e=>{const{title:t,slug:n,onClick:s}=e;return(0,a.jsx)($P,{title:t,direction:"column",className:"edit-site-add-new-template__template-button",description:x[n],icon:JP[n]||Da,onClick:()=>s?s(e):S(e)},n)})),(0,a.jsx)($P,{title:(0,w.__)("Custom template"),direction:"row",className:"edit-site-add-new-template__custom-template-button",icon:LE,onClick:()=>n(nI),children:(0,a.jsx)(b.__experimentalText,{lineHeight:1.53846153846,children:(0,w.__)("A custom template can be manually applied to any post or page.")})})]}),t===tI&&(0,a.jsx)(HP,{onSelect:S,entityForSuggestions:s,onBack:()=>n(eI),containerRef:m}),t===nI&&(0,a.jsx)(KP,{createTemplate:S,onBack:()=>n(eI)})]})}var iI=(0,h.memo)((function(){const[e,t]=(0,h.useState)(!1),{postType:n}=(0,c.useSelect)((e=>{const{getPostType:t}=e(j.store);return{postType:t(Se)}}),[]);return n?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>t(!0),label:n.labels.add_new_item,__next40pxDefaultSize:!0,children:n.labels.add_new_item}),e&&(0,a.jsx)(sI,{onClose:()=>t(!1)})]}):null}));const{useGlobalStyle:rI}=ne(x.privateApis),{Badge:aI}=ne(b.privateApis),{useEntityRecordsWithPermissions:oI}=ne(j.privateApis);function lI(){const e=TP(),{records:t}=oI("root","registeredTemplate");return[...e,...t?.filter((e=>!e.is_custom)).map((e=>({slug:e.slug,title:e.title.rendered,description:e.description})))]}const cI={label:(0,w.__)("Preview"),id:"preview",render:function({item:e}){const t=CE(),[n="white"]=rI("color.background"),s=(0,h.useMemo)((()=>(0,o.parse)(e.content.raw)),[e.content.raw]),i=!s?.length;return(0,a.jsx)(f.EditorProvider,{post:e,settings:t,children:(0,a.jsxs)("div",{className:"page-templates-preview-field",style:{backgroundColor:n},children:[i&&(0,w.__)("Empty template"),!i&&(0,a.jsx)(x.BlockPreview.Async,{children:(0,a.jsx)(x.BlockPreview,{blocks:s})})]})})},enableSorting:!1},uI={label:(0,w.__)("Description"),id:"description",render:function({item:e}){const t=lI().find((t=>t.slug===e.slug));return e.description?(0,qt.decodeEntities)(e.description):t?.description},enableSorting:!1,enableGlobalSearch:!0};const dI={label:(0,w.__)("Author"),id:"author",getValue:({item:e})=>e.author_text??e.author,render:function({item:e}){const[t,n]=(0,h.useState)(!1),{text:s,icon:i,imageUrl:r}=qE(e.type,e.id);return(0,a.jsxs)(b.__experimentalHStack,{alignment:"left",spacing:0,children:[r&&(0,a.jsx)("div",{className:Ht("page-templates-author-field__avatar",{"is-loaded":t}),children:(0,a.jsx)("img",{onLoad:()=>n(!0),alt:"",src:r})}),!r&&(0,a.jsx)("div",{className:"page-templates-author-field__icon",children:(0,a.jsx)(b.Icon,{icon:i})}),(0,a.jsx)("span",{className:"page-templates-author-field__name",children:s})]})}},hI={label:(0,w.__)("Status"),id:"active",type:"boolean",getValue:({item:e})=>e._isActive,render:function({item:e}){const t=e._isCustom?(0,w._x)("Active when used","template"):(0,w._x)("Active","template"),n=e._isCustom?"info":"success",s=e._isActive;return(0,a.jsx)(aI,{intent:s?n:"default",children:s?t:(0,w._x)("Inactive","template")})}},pI={label:(0,w.__)("Template Type"),id:"slug",getValue:({item:e})=>e.slug,render:function({item:e}){const t=lI().find((t=>t.slug===e.slug));return t?.title||(0,w._x)("Custom","template type")}},fI={table:{showMedia:!1},grid:{showMedia:!0},list:{showMedia:!1}},mI={type:"grid",perPage:20,sort:{field:"title",direction:"asc"},titleField:"title",descriptionField:"description",mediaField:"preview",fields:["author","active","slug","theme"],filters:[],...fI.grid};function gI(e){return{...mI,sort:"user"===e?{field:"date",direction:"desc"}:mI.sort,filters:["active","user"].includes(e)?[]:[{field:"author",operator:"isAny",value:[e]}]}}const{usePostActions:vI,usePostFields:yI,templateTitleField:xI}=ne(f.privateApis),{useHistory:bI,useLocation:wI}=ne(Lt.privateApis),{useEntityRecordsWithPermissions:_I}=ne(j.privateApis);function jI(){const{path:e,query:t}=wI(),{activeView:n="active",postId:s}=t,[i,r]=(0,h.useState)([s]),[o,l]=(0,h.useState)(!1),u=(0,h.useMemo)((()=>gI(n)),[n]),{view:d,updateView:p,isModified:f,resetToDefault:m}=(0,SE.useView)({kind:"postType",name:Se,slug:n,defaultView:u,queryParams:{page:t.pageNumber,search:t.search},onChangeQueryParams:n=>{O.navigate((0,Qt.addQueryArgs)(e,{...t,pageNumber:n.page,search:n.search||void 0}))}}),{activeTemplatesOption:g,activeTheme:v,defaultTemplateTypes:x}=(0,c.useSelect)((e=>{const{getEntityRecord:t,getCurrentTheme:n}=e(j.store);return{activeTemplatesOption:t("root","site")?.active_templates,activeTheme:n(),defaultTemplateTypes:e(j.store).getCurrentTheme()?.default_template_types}})),{records:S,isResolving:C}=_I("postType",Se,{per_page:-1,combinedTemplates:!1}),{records:k,isResolving:E}=_I("root","registeredTemplate",{per_page:-1}),P=(0,h.useMemo)((()=>{const e=[...k];if(g)for(const t in g){const n=g[t],s=S.find((e=>e.id===n&&e.theme===v.stylesheet));if(s){const t=e.findIndex((({slug:e})=>e===s.slug));-1!==t?e[t]=s:e.push(s)}}return e}),[S,k,g,v]);let I;I="active"===n?C||E:"user"===n?C:E;const V=(0,h.useMemo)((()=>{function e(e){return e.is_custom??(!e.meta?.is_wp_suggestion&&!x.some((t=>t.slug===e.slug)))}let t;return t="active"===n?P.filter((t=>!e(t))):"user"===n?S:k,t.map((t=>({...t,_isActive:P.some((e=>e.id===t.id)),_isCustom:e(t)})))}),[P,x,S,k,n]),T=(0,c.useSelect)((e=>{const{getUser:t}=e(j.store);return V.reduce(((e,n)=>(n.author_text?e[n.author_text]||(e[n.author_text]=n.author_text):n.author&&(e[n.author]||(e[n.author]=t(n.author))),e)),{})}),[V]),O=bI(),A=(0,h.useCallback)((t=>{r(t),"list"===d?.type&&O.navigate((0,Qt.addQueryArgs)(e,{postId:1===t.length?t[0]:void 0}))}),[O,e,d?.type]),N=yI({postType:Se}).find((e=>"date"===e.id)),F=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getCurrentTheme()));return(0,h.useMemo)((()=>({label:(0,w.__)("Compatible Theme"),id:"theme",getValue:({item:e})=>e.theme,render:function({item:t}){return t.theme===e.stylesheet?(0,a.jsx)(aI,{intent:"success",children:t.theme}):(0,a.jsx)(aI,{intent:"error",children:t.theme})}})),[e])})(),M=(0,h.useMemo)((()=>{const e=[cI,xI,uI,hI,pI];"user"===n&&(e.push(F),N&&e.push(N));const t=[];for(const e in T)t.push({value:T[e]?.id??e,label:T[e]?.name??e});return e.push({...dI,elements:t}),e}),[T,n,F,N]),{data:B,paginationInfo:D}=(0,h.useMemo)((()=>Dw(V,d,M)),[V,d,M]),{createSuccessNotice:R}=(0,c.useDispatch)(_.store),L=(0,h.useCallback)(((e,t)=>{if("duplicate-post"===e){const e=t[0],n="string"==typeof e.title?e.title:e.title?.rendered;O.navigate("/template?activeView=user"),R((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(n)||(0,w.__)("(no title)")),{type:"snackbar",id:"duplicate-post-action",actions:[{label:(0,w.__)("Edit"),onClick:()=>{O.navigate(`/${e.type}/${e.id}?canvas=edit`)}}]})}}),[O,R]),z=vI({postType:Se,context:"list",onActionPerformed:L}),H=HE(),G=(()=>{const e=(0,c.useSelect)((e=>e(j.store).getCurrentTheme())),{getEntityRecord:t}=(0,c.useSelect)(j.store),{editEntityRecord:n,saveEditedEntityRecord:s}=(0,c.useDispatch)(j.store);return(0,h.useMemo)((()=>({id:"set-active-template",label:e=>e.some((e=>e._isActive))?(0,w.__)("Deactivate"):(0,w.__)("Activate"),isPrimary:!0,icon:LE,isEligible:t=>t.theme===e.stylesheet&&("number"==typeof t.id||!1===t._isActive),async callback(e){const i=e.some((e=>e._isActive)),r={...await t("root","site").active_templates??{}};for(const t of e)i?delete r[t.slug]:r[t.slug]=t.id;await n("root","site",void 0,{active_templates:r}),await s("root","site")}})),[n,s,t,e])})(),W=(0,h.useMemo)((()=>"user"===n?[G,H,...z]:[G,...z]),[z,G,H,n]),U=(0,y.useEvent)((e=>{e.type!==d.type&&O.invalidate(),p(e)})),q=W.find((e=>"duplicate-post"===e.id));return(0,a.jsxs)(Wm,{className:"edit-site-page-templates",title:(0,w.__)("Templates"),actions:(0,a.jsxs)(a.Fragment,{children:[f&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{m(),O.invalidate()},children:(0,w.__)("Reset view")}),(0,a.jsx)(iI,{})]}),children:[(0,a.jsx)(jE,{paginationInfo:D,fields:M,actions:W,data:B,isLoading:I,view:d,onChangeView:U,onChangeSelection:A,isItemClickable:()=>!0,onClickItem:e=>{"string"==typeof e.id?l(e):O.navigate(`/${e.type}/${e.id}?canvas=edit`)},selection:i,defaultLayouts:fI},n),o&&q&&(0,a.jsx)(b.Modal,{title:(0,w.__)("Duplicate"),onRequestClose:()=>l(),size:"small",children:(0,a.jsx)(q.RenderModal,{items:[o],closeModal:()=>l()})})]})}async function SI(e){const{activeView:t="active"}=e;return"list"===(await(0,SE.loadView)({kind:"postType",name:"wp_template",slug:t,defaultView:gI(t)})).type}const CI={name:"templates",path:"/template",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(mP,{backPath:"/"}):(0,a.jsx)(uo,{})},content({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(jI,{}):void 0},async preview({query:e,siteData:t}){const n=t.currentTheme?.is_block_theme;if(!n)return;return await SI(e)?(0,a.jsx)(_v,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(jI,{}):(0,a.jsx)(uo,{})}},widths:{content:async({query:e})=>await SI(e)?380:void 0}},kI={name:"template-item",path:"/wp_template/*postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(mP,{backPath:"/"}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})}}},{useLocation:EI}=ne(Lt.privateApis);function PI({title:e,slug:t,type:n,icon:s,isActive:i,suffix:r}){const{path:o}=EI(),l=s||H_.find((e=>e.type===n)).icon;return"all"===t&&(t=void 0),(0,a.jsxs)(b.__experimentalHStack,{justify:"flex-start",className:Ht("edit-site-sidebar-dataviews-dataview-item",{"is-selected":i}),children:[(0,a.jsx)(Qa,{icon:l,to:(0,Qt.addQueryArgs)(o,{activeView:t}),"aria-current":i?"true":void 0,children:e}),r]})}var II=(0,a.jsxs)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(Zt.Path,{d:"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z"}),(0,a.jsx)(Zt.Path,{d:"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"}),(0,a.jsx)(Zt.Path,{d:"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z"})]}),VI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),TI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),OI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),AI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),NI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});const FI={table:{},grid:{},list:{}},MI={type:"list",filters:[],perPage:20,sort:{field:"title",direction:"asc"},showLevels:!0,titleField:"title",mediaField:"featured_media",fields:["author","status"],...FI.list};function BI(e){return[{title:e?.labels?.all_items||(0,w.__)("All items"),slug:"all",icon:II,view:MI},{title:(0,w.__)("Published"),slug:"published",icon:uP,view:{...MI,filters:[{field:"status",operator:De,value:"publish",isLocked:!0}]}},{title:(0,w.__)("Scheduled"),slug:"future",icon:VI,view:{...MI,filters:[{field:"status",operator:De,value:"future",isLocked:!0}]}},{title:(0,w.__)("Drafts"),slug:"drafts",icon:TI,view:{...MI,filters:[{field:"status",operator:De,value:"draft",isLocked:!0}]}},{title:(0,w.__)("Pending"),slug:"pending",icon:OI,view:{...MI,filters:[{field:"status",operator:De,value:"pending",isLocked:!0}]}},{title:(0,w.__)("Private"),slug:"private",icon:AI,view:{...MI,filters:[{field:"status",operator:De,value:"private",isLocked:!0}]}},{title:(0,w.__)("Trash"),slug:"trash",icon:NI,view:{...MI,type:"table",layout:FI.table.layout,filters:[{field:"status",operator:De,value:"trash",isLocked:!0}]}}]}const DI=(e,t)=>BI(e).find((({slug:e})=>e===t))?.view,{useLocation:RI}=ne(Lt.privateApis);function LI({postType:e}){const{query:{activeView:t="all"}}=RI(),n=(0,c.useSelect)((t=>{const{getPostType:n}=t(j.store);return n(e)}),[e]),s=(0,h.useMemo)((()=>BI(n)),[n]);return e?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.__experimentalItemGroup,{className:"edit-site-sidebar-dataviews",children:s.map((e=>(0,a.jsx)(PI,{slug:e.slug,title:e.title,icon:e.icon,type:e.view.type,isActive:e.slug===t},e.slug)))})}):null}var zI=(0,a.jsx)(Zt.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(Zt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})});function HI({postType:e,onSave:t,onClose:n}){const s=(0,c.useSelect)((t=>t(j.store).getPostType(e)?.labels),[e]),[i,r]=(0,h.useState)(!1),[l,u]=(0,h.useState)(""),{saveEntityRecord:d}=(0,c.useDispatch)(j.store),{createErrorNotice:p,createSuccessNotice:f}=(0,c.useDispatch)(_.store),{resolveSelect:m}=(0,c.useRegistry)();return(0,a.jsx)(b.Modal,{title:(0,w.sprintf)((0,w.__)("Draft new: %s"),s?.singular_name),onRequestClose:n,focusOnMount:"firstContentElement",size:"small",children:(0,a.jsx)("form",{onSubmit:async function(n){if(n.preventDefault(),!i){r(!0);try{const n=await m(j.store).getPostType(e),s=await d("postType",e,{status:"draft",title:l,slug:l??void 0,content:n.template&&n.template.length?(0,o.serialize)((0,o.synchronizeBlocksWithTemplate)([],n.template)):void 0},{throwOnError:!0});t(s),f((0,w.sprintf)((0,w.__)('"%s" successfully created.'),(0,qt.decodeEntities)(s.title?.rendered||l)||(0,w.__)("(no title)")),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,w.__)("An error occurred while creating the item.");p(t,{type:"snackbar"})}finally{r(!1)}}},children:(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(b.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,w.__)("Title"),onChange:u,placeholder:(0,w.__)("No title"),value:l}),(0,a.jsxs)(b.__experimentalHStack,{spacing:2,justify:"end",children:[(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:n,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,w.__)("Create draft")})]})]})})})}const{usePostActions:GI,usePostFields:WI}=ne(f.privateApis),{useLocation:UI,useHistory:qI}=ne(Lt.privateApis),{useEntityRecordsWithPermissions:ZI}=ne(j.privateApis),YI=[];function KI(e){return e.id.toString()}function XI(e){return e.level}function QI({postType:e}){const{path:t,query:n}=UI(),{activeView:s="all",postId:i,quickEdit:r=!1}=n,o=qI(),l=(0,c.useSelect)((t=>{const{getPostType:n}=t(j.store);return n(e)}),[e]),{view:u,updateView:d,isModified:p,resetToDefault:f}=(0,SE.useView)({kind:"postType",name:e,slug:s,queryParams:{page:n.pageNumber,search:n.search},onChangeQueryParams:e=>{o.navigate((0,Qt.addQueryArgs)(t,{...n,pageNumber:e.page,search:e.search||void 0}))},defaultView:DI(l,s)}),m=(0,y.useEvent)((e=>{e.type!==u.type&&o.invalidate(),d(e)})),[g,v]=(0,h.useState)(i?.split(",")??[]),x=(0,h.useCallback)((e=>{v(e),o.navigate((0,Qt.addQueryArgs)(t,{postId:e.join(",")}))}),[t,o]),_=WI({postType:e}),S=(0,h.useMemo)((()=>{const e={};return u.filters?.forEach((t=>{"status"===t.field&&t.operator===De&&(e.status=t.value),"author"===t.field&&t.operator===De?e.author=t.value:"author"===t.field&&"isNone"===t.operator&&(e.author_exclude=t.value)})),e.status&&""!==e.status||(e.status="draft,future,pending,private,publish"),{per_page:u.perPage,page:u.page,_embed:"author,wp:featuredmedia",order:u.sort?.direction,orderby:u.sort?.field,orderby_hierarchy:!!u.showLevels,search:u.search,...e}}),[u]),{records:C,isResolving:k,totalItems:E,totalPages:P}=ZI("postType",e,S),I=(0,h.useMemo)((()=>"author"===u?.sort?.field?Dw(C,{sort:{...u.sort}},_).data:C),[C,_,u?.sort]),V=I?.map((e=>KI(e)))??[],T=((0,y.usePrevious)(V)??[]).filter((e=>!V.includes(e))).includes(i);(0,h.useEffect)((()=>{T&&o.navigate((0,Qt.addQueryArgs)(t,{postId:void 0}))}),[o,T,t]);const O=(0,h.useMemo)((()=>({totalItems:E,totalPages:P})),[E,P]),{labels:A,canCreateRecord:N}=(0,c.useSelect)((t=>{const{getPostType:n,canUser:s}=t(j.store);return{labels:n(e)?.labels,canCreateRecord:s("create",{kind:"postType",name:e})}}),[e]),F=GI({postType:e,context:"list"}),M=HE(),B=(0,h.useMemo)((()=>[M,...F]),[F,M]),[D,R]=(0,h.useState)(!1),L=()=>R(!1);return(0,a.jsx)(Wm,{title:A?.name,actions:(0,a.jsxs)(a.Fragment,{children:[p&&(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,onClick:()=>{f(),o.invalidate()},children:(0,w.__)("Reset view")}),A?.add_new_item&&N&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>R(!0),__next40pxDefaultSize:!0,children:A.add_new_item}),D&&(0,a.jsx)(HI,{postType:e,onSave:({type:e,id:t})=>{o.navigate(`/${e}/${t}?canvas=edit`),L()},onClose:L})]})]}),children:(0,a.jsx)(jE,{paginationInfo:O,fields:_,actions:B,data:I||YI,isLoading:k,view:u,onChangeView:m,selection:g,onChangeSelection:x,isItemClickable:e=>"trash"!==e.status,onClickItem:({id:t})=>{o.navigate(`/${e}/${t}?canvas=edit`)},getItemId:KI,getItemLevel:XI,defaultLayouts:FI,header:window.__experimentalQuickEditDataViews&&"list"!==u.type&&"page"===e&&(0,a.jsx)(b.Button,{size:"compact",isPressed:r,icon:zI,label:(0,w.__)("Details"),onClick:()=>{o.navigate((0,Qt.addQueryArgs)(t,{quickEdit:!r||void 0}))}})},s)})}const JI=(0,h.createContext)({fields:[]});function $I({fields:e,children:t}){return(0,a.jsx)(JI.Provider,{value:{fields:e},children:t})}JI.displayName="DataFormContext";var eV=JI;function tV(e){return void 0!==e.children}const nV={type:"regular",labelPosition:"top"};function sV(e){let t=nV;if("regular"===e?.type)t={type:"regular",labelPosition:e?.labelPosition??"top"};else if("panel"===e?.type){const n=e.summary??[],s=Array.isArray(n)?n:[n];t={type:"panel",labelPosition:e?.labelPosition??"side",openAs:e?.openAs??"dropdown",summary:s}}else if("card"===e?.type)if(!1===e.withHeader)t={type:"card",withHeader:!1,isOpened:!0,summary:[]};else{const s=e.summary??[];t={type:"card",withHeader:!0,isOpened:"boolean"!=typeof e.isOpened||e.isOpened,summary:(n=s,"string"==typeof n?[{id:n,visibility:"when-collapsed"}]:n.map((e=>"string"==typeof e?{id:e,visibility:"when-collapsed"}:{id:e.id,visibility:e.visibility})))}}else"row"===e?.type&&(t={type:"row",alignment:e?.alignment??"center",styles:e?.styles??{}});var n;return t}function iV(e){const t=sV(e?.layout);return(e.fields??[]).map((e=>{if("string"==typeof e)return{id:e,layout:t};const n=e.layout?sV(e.layout):t;return{...e,layout:n}}))}function rV({title:e}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-regular__header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{})]})})}var aV=function({summaryFields:e,data:t,labelPosition:n,fieldLabel:s,disabled:i,onClick:r,"aria-expanded":o}){return(0,a.jsx)(b.Button,{className:"dataforms-layouts-panel__summary-button",size:"compact",variant:["none","top"].includes(n)?"link":"tertiary","aria-expanded":o,"aria-label":(0,w.sprintf)((0,w._x)("Edit %s","field"),s||""),onClick:r,disabled:i,accessibleWhenDisabled:!0,style:e.length>1?{minHeight:"auto",height:"auto",alignItems:"flex-start"}:void 0,children:e.length>1?(0,a.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",gap:"2px"},children:e.map((e=>(0,a.jsx)("div",{style:{width:"100%"},children:(0,a.jsx)(e.render,{item:t,field:e})},e.id)))}):e.map((e=>(0,a.jsx)(e.render,{item:t,field:e},e.id)))})};function oV({title:e,onClose:t}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-panel__dropdown-header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[e&&(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{}),t&&(0,a.jsx)(b.Button,{label:(0,w.__)("Close"),icon:Ea,onClick:t,size:"small"})]})})}var lV=function({data:e,field:t,onChange:n,validity:s,labelPosition:i="side",summaryFields:r,fieldDefinition:o,popoverAnchor:l}){const c=tV(t)?t.label:o?.label,u=(0,h.useMemo)((()=>({layout:nV,fields:tV(t)?t.children:[{id:t.id}]})),[t]),d=(0,h.useMemo)((()=>{if(void 0!==s)return tV(t)?s?.children:{[t.id]:s}}),[s,t]),p=(0,h.useMemo)((()=>({anchor:l,placement:"left-start",offset:36,shift:!0})),[l]);return(0,a.jsx)(b.Dropdown,{contentClassName:"dataforms-layouts-panel__field-dropdown",popoverProps:p,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},renderToggle:({isOpen:t,onToggle:n})=>(0,a.jsx)(aV,{summaryFields:r,data:e,labelPosition:i,fieldLabel:c,disabled:!0===o.readOnly,onClick:n,"aria-expanded":t}),renderContent:({onClose:t})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oV,{title:c,onClose:t}),(0,a.jsx)(CV,{data:e,form:u,onChange:n,validity:d,children:(t,s,i)=>(0,a.jsx)(t,{data:e,field:s,onChange:n,hideLabelFromVision:(u?.fields??[]).length<2,validity:i},s.id)})]})})},cV=i(66),uV=i.n(cV);const dV=e=>[void 0,"",null].includes(e);function hV(e,t){return!!(void 0===e&&dV(t)||"text"===e&&dV(t)||"email"===e&&dV(t)||"url"===e&&dV(t)||"telephone"===e&&dV(t)||"password"===e&&dV(t)||"integer"===e&&dV(t)||"number"===e&&dV(t)||"array"===e&&(e=>!Array.isArray(e)||0===e.length||e.every((e=>dV(e))))(t)||"boolean"===e&&!0!==t)}function pV(e){return!e||Object.values(e).every((e=>Object.entries(e).every((([e,t])=>"children"===e&&t&&"object"==typeof t?pV(t):"valid"===t.type))))}function fV(e,t,n,s){e(t?e=>({...e,[t]:{...e?.[t],children:{...e?.[t]?.children,[n]:{...s}}}}):e=>({...e,[n]:{...s}}))}var mV=function(e,t,n){const[s,i]=(0,h.useState)(),r=(0,h.useRef)({}),a=(0,h.useRef)({}),o=(0,h.useRef)({}),l=(0,h.useCallback)((()=>{const{fields:s,fieldToParent:l}=function(e,t){const n=iV(t);if(0===n.length)return{fields:[],fieldToParent:new Map};const s=new Map,i=[];return n.forEach((e=>{e.children?e.children.forEach((t=>{const n="string"==typeof t?t:t.id;i.push(n),s.set(n,e.id)})):i.push(e.id)})),{fields:Nw(e.filter((e=>i.includes(e.id)))),fieldToParent:s}}(t,n);0!==s.length?s.forEach((t=>{const n=t.getValue({item:e});if(r.current.hasOwnProperty(t.id)&&n===r.current[t.id])return;r.current[t.id]=n;const s=l.get(t.id);if(t.isValid.required&&hV(t.type,n))return void fV(i,s,t.id,{required:{type:"invalid"}});if(t.isValid.elements&&t.hasElements&&!t.getElements&&Array.isArray(t.elements)){const e=t.elements.map((e=>e.value));if("array"!==t.type&&!e.includes(n))return void fV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}});if("array"===t.type&&!Array.isArray(n))return void fV(i,s,t.id,{elements:{type:"invalid",message:"Value must be an array."}});if("array"===t.type&&n.some((t=>!e.includes(t))))return void fV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}})}if(t.isValid.elements&&t.hasElements&&"function"==typeof t.getElements){const e=(o.current[t.id]||0)+1;o.current[t.id]=e,fV(i,s,t.id,{elements:{type:"validating",message:"Validating..."}}),t.getElements().then((r=>{if(o.current[t.id]!==e)return;if(!Array.isArray(r))return void fV(i,s,t.id,{elements:{type:"invalid",message:"Could not validate elements."}});const a=r.map((e=>e.value));"array"===t.type||a.includes(n)?"array"!==t.type||Array.isArray(n)?"array"===t.type&&n.some((e=>!a.includes(e)))&&fV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}}):fV(i,s,t.id,{elements:{type:"invalid",message:"Value must be an array."}}):fV(i,s,t.id,{elements:{type:"invalid",message:"Value must be one of the elements."}})})).catch((n=>{o.current[t.id]===e&&fV(i,s,t.id,{elements:{type:"invalid",message:n.message}})}))}let c;try{c=t.isValid?.custom?.(uV()(e,t.setValue({item:e,value:n})),t)}catch(e){let n;n=e instanceof Error?e.message:String(e)||(0,w.__)("Unknown error when running custom validation."),fV(i,s,t.id,{custom:{type:"invalid",message:n}})}if("string"!=typeof c){if(c instanceof Promise){const e=(a.current[t.id]||0)+1;return a.current[t.id]=e,fV(i,s,t.id,{custom:{type:"validating",message:"Validating..."}}),void c.then((n=>{a.current[t.id]===e&&(null!==n?"string"==typeof n&&fV(i,s,t.id,{custom:{type:"invalid",message:n}}):fV(i,s,t.id,{custom:{type:"valid",message:"Valid"}}))})).catch((n=>{a.current[t.id]===e&&fV(i,s,t.id,{custom:{type:"invalid",message:n.message}})}))}i((e=>{if(!e)return e;if(s){const n=e[s];if(!n?.children)return e;const{[t.id]:i,...r}=n.children;if(0===Object.keys(r).length){const{children:t,...i}=n;if(0===Object.keys(i).length){const{[s]:t,...n}=e;return 0===Object.keys(n).length?void 0:n}return{...e,[s]:i}}return{...e,[s]:{...n,children:r}}}if(!e[t.id])return e;const{[t.id]:n,...i}=e;return 0!==Object.keys(i).length?i:void 0}))}else fV(i,s,t.id,{custom:{type:"invalid",message:c}})})):i(void 0)}),[e,t,n]);return(0,h.useEffect)((()=>{l()}),[l]),{validity:s,isValid:pV(s)}};function gV({data:e,field:t,onChange:n,fieldLabel:s,onClose:i}){const{fields:r}=(0,h.useContext)(eV),[o,l]=(0,h.useState)({}),c=(0,h.useMemo)((()=>uV()(e,o)),[e,o]),u=(0,h.useMemo)((()=>({layout:nV,fields:tV(t)?t.children:[{id:t.id}]})),[t]),{validity:d}=mV(c,r,u),p=e=>{l((t=>uV()(t,e)))};return(0,a.jsxs)(b.Modal,{className:"dataforms-layouts-panel__modal",onRequestClose:i,isFullScreen:!1,title:s,size:"medium",children:[(0,a.jsx)(CV,{data:c,form:u,onChange:p,validity:d,children:(e,t,n)=>(0,a.jsx)(e,{data:c,field:t,onChange:p,hideLabelFromVision:(u?.fields??[]).length<2,validity:n},t.id)}),(0,a.jsxs)(b.__experimentalHStack,{className:"dataforms-layouts-panel__modal-footer",spacing:3,children:[(0,a.jsx)(b.__experimentalSpacer,{}),(0,a.jsx)(b.Button,{variant:"tertiary",onClick:i,__next40pxDefaultSize:!0,children:(0,w.__)("Cancel")}),(0,a.jsx)(b.Button,{variant:"primary",onClick:()=>{n(o),i()},__next40pxDefaultSize:!0,children:(0,w.__)("Apply")})]})]})}var vV=function({data:e,field:t,onChange:n,labelPosition:s,summaryFields:i,fieldDefinition:r}){const[o,l]=(0,h.useState)(!1),c=tV(t)?t.label:r?.label;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(aV,{summaryFields:i,data:e,labelPosition:s,fieldLabel:c,disabled:!0===r.readOnly,onClick:()=>l(!0),"aria-expanded":o}),o&&(0,a.jsx)(gV,{data:e,field:t,onChange:n,fieldLabel:c??"",onClose:()=>l(!1)})]})};const yV=(e,t)=>{if(Array.isArray(e)&&e.length>0){return(n=e,Array.isArray(n)?n.map((e=>"string"==typeof e?e:e.id)):[]).map((e=>t.find((t=>t.id===e)))).filter((e=>void 0!==e))}var n;return[]},xV=(e,t,n)=>{const s=yV(e.summary,n),i=((e,t)=>{const n=t.find((t=>t.id===e.id));return n||t.find((t=>{if(tV(e)){const n=e.children.filter((e=>"string"==typeof e||!tV(e)));if(0===n.length)return!1;const s="string"==typeof n[0]?n[0]:n[0].id;return t.id===s}return t.id===e.id}))})(t,n);return 0===s.length?{summaryFields:i?[i]:[],fieldDefinition:i}:{summaryFields:s,fieldDefinition:i}};function bV({title:e}){return(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts-row__header",spacing:4,children:(0,a.jsxs)(b.__experimentalHStack,{alignment:"center",children:[(0,a.jsx)(b.__experimentalHeading,{level:2,size:13,children:e}),(0,a.jsx)(b.__experimentalSpacer,{})]})})}const wV=({children:e})=>(0,a.jsx)(a.Fragment,{children:e});const _V=[{type:"regular",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)(eV),o=(0,h.useMemo)((()=>({layout:nV,fields:tV(t)?t.children:[]})),[t]);if(tV(t))return(0,a.jsxs)(a.Fragment,{children:[!s&&t.label&&(0,a.jsx)(rV,{title:t.label}),(0,a.jsx)(CV,{data:e,form:o,onChange:n,validity:i?.children})]});const l=sV({...t.layout,type:"regular"}).labelPosition,c=r.find((e=>e.id===t.id));return c&&c.Edit?"side"===l?(0,a.jsxs)(b.__experimentalHStack,{className:"dataforms-layouts-regular__field",children:[(0,a.jsx)("div",{className:Ht("dataforms-layouts-regular__field-label",`dataforms-layouts-regular__field-label--label-position-${l}`),children:c.label}),(0,a.jsx)("div",{className:"dataforms-layouts-regular__field-control",children:!0===c.readOnly?(0,a.jsx)(c.render,{item:e,field:c}):(0,a.jsx)(c.Edit,{data:e,field:c,onChange:n,hideLabelFromVision:!0,validity:i},c.id)})]}):(0,a.jsx)("div",{className:"dataforms-layouts-regular__field",children:!0===c.readOnly?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(a.Fragment,{children:[!s&&"none"!==l&&(0,a.jsx)(b.BaseControl.VisualLabel,{children:c.label}),(0,a.jsx)(c.render,{item:e,field:c})]})}):(0,a.jsx)(c.Edit,{data:e,field:c,onChange:n,hideLabelFromVision:"none"===l||s,validity:i})}):null},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e})},{type:"panel",component:function({data:e,field:t,onChange:n,validity:s}){const{fields:i}=(0,h.useContext)(eV),r=sV({...t.layout,type:"panel"}),[o,l]=(0,h.useState)(null),{fieldDefinition:c,summaryFields:u}=xV(r,t,i);if(!c)return null;const d=r.labelPosition,p=Ht("dataforms-layouts-panel__field-label",`dataforms-layouts-panel__field-label--label-position-${d}`),f=tV(t)?t.label:c?.label,m="modal"===r.openAs?(0,a.jsx)(vV,{data:e,field:t,onChange:n,labelPosition:d,summaryFields:u,fieldDefinition:c}):(0,a.jsx)(lV,{data:e,field:t,onChange:n,validity:s,labelPosition:d,summaryFields:u,fieldDefinition:c,popoverAnchor:o});return"top"===d?(0,a.jsxs)(b.__experimentalVStack,{className:"dataforms-layouts-panel__field",spacing:0,children:[(0,a.jsx)("div",{className:p,style:{paddingBottom:0},children:f}),(0,a.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:m})]}):"none"===d?(0,a.jsx)("div",{className:"dataforms-layouts-panel__field",children:m}):(0,a.jsxs)(b.__experimentalHStack,{ref:l,className:"dataforms-layouts-panel__field",children:[(0,a.jsx)("div",{className:p,children:f}),(0,a.jsx)("div",{className:"dataforms-layouts-panel__field-control",children:m})]})},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:2,children:e})},{type:"card",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)(eV),o=sV({...t.layout,type:"card"}),l=(0,h.useMemo)((()=>({layout:nV,fields:tV(t)?t.children:[]})),[t]),{isOpen:c,CollapsibleCardHeader:u}=function(e=!0){const[t,n]=(0,h.useState)(e),s=(0,h.useCallback)((()=>{n((e=>!e))}),[]),i=(0,h.useCallback)((({children:e,...n})=>(0,a.jsxs)(b.CardHeader,{...n,onClick:s,style:{cursor:"pointer",...n.style},children:[(0,a.jsx)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:e}),(0,a.jsx)(b.Button,{__next40pxDefaultSize:!0,variant:"tertiary",icon:t?Nv:Fv,"aria-expanded":t,"aria-label":t?"Collapse":"Expand"})]})),[s,t]);return{isOpen:t,CollapsibleCardHeader:i}}(o.isOpened),d=yV(o.summary,r).filter((e=>function(e,t,n){if(!t||Array.isArray(t)&&0===t.length)return!1;const s=(Array.isArray(t)?t:[t]).find((t=>"string"==typeof t?t===e.id:"object"==typeof t&&"id"in t&&t.id===e.id));return!!s&&("string"==typeof s||"object"!=typeof s||!("visibility"in s)||"always"===s.visibility||"when-collapsed"===s.visibility&&!n)}(e,o.summary,c)));if(tV(t)){const s=!!t.label&&o.withHeader;return(0,a.jsxs)(b.Card,{className:"dataforms-layouts-card__field",children:[s&&(0,a.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,a.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:t.label}),d.length>0&&o.withHeader&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:d.map((t=>(0,a.jsx)(t.render,{item:e,field:t},t.id)))})]}),(c||!s)&&(0,a.jsxs)(b.CardBody,{className:"dataforms-layouts-card__field-control",children:[t.description&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-description",children:t.description}),(0,a.jsx)(CV,{data:e,form:l,onChange:n,validity:i?.children})]})]})}const p=r.find((e=>e.id===t.id));if(!p||!p.Edit)return null;const f=jV("regular")?.component;if(!f)return null;const m=!!p.label&&o.withHeader;return(0,a.jsxs)(b.Card,{className:"dataforms-layouts-card__field",children:[m&&(0,a.jsxs)(u,{className:"dataforms-layouts-card__field-header",children:[(0,a.jsx)("span",{className:"dataforms-layouts-card__field-header-label",children:p.label}),d.length>0&&o.withHeader&&(0,a.jsx)("div",{className:"dataforms-layouts-card__field-summary",children:d.map((t=>(0,a.jsx)(t.render,{item:e,field:t},t.id)))})]}),(c||!m)&&(0,a.jsx)(b.CardBody,{className:"dataforms-layouts-card__field-control",children:(0,a.jsx)(f,{data:e,field:t,onChange:n,hideLabelFromVision:s||m,validity:i})})]})},wrapper:({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:6,children:e})},{type:"row",component:function({data:e,field:t,onChange:n,hideLabelFromVision:s,validity:i}){const{fields:r}=(0,h.useContext)(eV),o=sV({...t.layout,type:"row"});if(tV(t)){const r={fields:t.children.map((e=>"string"==typeof e?{id:e}:e))};return(0,a.jsxs)("div",{className:"dataforms-layouts-row__field",children:[!s&&t.label&&(0,a.jsx)(bV,{title:t.label}),(0,a.jsx)(b.__experimentalHStack,{alignment:o.alignment,spacing:4,children:(0,a.jsx)(CV,{data:e,form:r,onChange:n,validity:i?.children,as:wV,children:(t,i,r)=>(0,a.jsx)("div",{className:"dataforms-layouts-row__field-control",style:o.styles[i.id],children:(0,a.jsx)(t,{data:e,field:i,onChange:n,hideLabelFromVision:s,validity:r})},i.id)})})]})}const l=r.find((e=>e.id===t.id));if(!l||!l.Edit)return null;const c=jV("regular")?.component;return c?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"dataforms-layouts-row__field-control",children:(0,a.jsx)(c,{data:e,field:l,onChange:n,validity:i})})}):null},wrapper:({children:e,layout:t})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:(0,a.jsx)("div",{className:"dataforms-layouts-row__field",children:(0,a.jsx)(b.__experimentalHStack,{spacing:4,alignment:t.alignment,children:e})})})}];function jV(e){return _V.find((t=>t.type===e))}const SV=({children:e})=>(0,a.jsx)(b.__experimentalVStack,{className:"dataforms-layouts__wrapper",spacing:4,children:e});function CV({data:e,form:t,onChange:n,validity:s,children:i,as:r}){const{fields:o}=(0,h.useContext)(eV);const l=(0,h.useMemo)((()=>iV(t)),[t]),c=sV(t.layout),u=r??jV(c.type)?.wrapper??SV;return(0,a.jsx)(u,{layout:c,children:l.map((t=>{const r=jV(t.layout.type)?.component;if(!r)return null;const l=tV(t)?void 0:function(e){const t="string"==typeof e?e:e.id;return o.find((e=>e.id===t))}(t);return l&&l.isVisible&&!l.isVisible(e)?null:i?i(r,t,s?.[t.id]):(0,a.jsx)(r,{data:e,field:t,onChange:n,validity:s?.[t.id]},t.id)}))})}function kV({data:e,form:t,fields:n,onChange:s,validity:i}){const r=(0,h.useMemo)((()=>Nw(n)),[n]);return t.fields?(0,a.jsx)($I,{fields:r,children:(0,a.jsx)(CV,{data:e,form:t,onChange:s,validity:i})}):null}const{usePostFields:EV,PostCardPanel:PV}=ne(f.privateApis),IV=["title","status","date","author","discussion"];function VV({postType:e,postId:t}){const n=(0,h.useMemo)((()=>t.split(",")),[t]),{record:s,hasFinishedResolution:i}=(0,c.useSelect)((t=>{const s=["postType",e,n[0]],{getEditedEntityRecord:i,hasFinishedResolution:r}=t(j.store);return{record:1===n.length?i(...s):null,hasFinishedResolution:r("getEditedEntityRecord",s)}}),[e,n]),[r,o]=(0,h.useState)({}),{editEntityRecord:l}=(0,c.useDispatch)(j.store),u=EV({postType:e}),d=(0,h.useMemo)((()=>u?.map((e=>"status"===e.id?{...e,elements:e.elements.filter((e=>"trash"!==e.value))}:e))),[u]),p=(0,h.useMemo)((()=>({layout:{type:"panel"},fields:[{id:"featured_media",layout:{type:"regular"}},{id:"status",label:(0,w.__)("Status & Visibility"),children:["status","password"]},"author","date","slug","parent",{id:"discussion",label:(0,w.__)("Discussion"),children:["comment_status","ping_status"]},{label:(0,w.__)("Template"),id:"template",layout:{type:"regular",labelPosition:"side"}}].filter((e=>1===n.length||IV.includes("string"==typeof e?e:e.id)))})),[n]);(0,h.useEffect)((()=>{o({})}),[n]);const{ExperimentalBlockEditorProvider:f}=ne(x.privateApis),m=CE(),g=(0,h.useMemo)((()=>d.map((e=>"template"===e.id?{...e,Edit:t=>(0,a.jsx)(f,{settings:m,children:(0,a.jsx)(e.Edit,{...t})})}:e))),[d,m]);return(0,a.jsxs)(b.__experimentalVStack,{spacing:4,children:[(0,a.jsx)(PV,{postType:e,postId:n}),i&&(0,a.jsx)(kV,{data:1===n.length?s:r,fields:g,form:p,onChange:t=>{for(const i of n)t.status&&"future"!==t.status&&"future"===s?.status&&new Date(s.date)>new Date&&(t.date=null),t.status&&"private"===t.status&&s.password&&(t.password=""),l("postType",e,i,t),n.length>1&&o((e=>({...e,...t})))}})]})}function TV({postType:e,postId:t}){return(0,a.jsxs)(Wm,{className:Ht("edit-site-post-edit",{"is-empty":!t}),label:(0,w.__)("Post Edit"),children:[t&&(0,a.jsx)(VV,{postType:e,postId:t}),!t&&(0,a.jsx)("p",{children:(0,w.__)("Select a page to edit")})]})}const{useLocation:OV}=ne(Lt.privateApis);async function AV(e){const{activeView:t="all"}=e,n=await(0,c.resolveSelect)(j.store).getPostType("page");return"list"===(await(0,SE.loadView)({kind:"postType",name:"page",slug:t,defaultView:DI(n,t)})).type}function NV(){const{query:e={}}=OV(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(QI,{postType:"page"})}const FV={name:"pages",path:"/page",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Ua,{title:(0,w.__)("Pages"),backPath:"/",content:(0,a.jsx)(LI,{postType:"page"})}):(0,a.jsx)(uo,{})},content({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(QI,{postType:"page"}):void 0},async preview({query:e,siteData:t}){const n=t.currentTheme?.is_block_theme;if(!n)return;return await AV(e)?(0,a.jsx)(_v,{}):void 0},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(NV,{}):(0,a.jsx)(uo,{})},edit:async({query:e})=>!await AV(e)&&!!e.quickEdit?(0,a.jsx)(TV,{postType:"page",postId:e.postId}):void 0},widths:{content:async({query:e})=>await AV(e)?380:void 0,edit:async({query:e})=>!await AV(e)&&!!e.quickEdit?380:void 0}};function MV(){return(0,a.jsx)(b.Notice,{status:"error",isDismissible:!1,children:(0,w.__)("The requested page could not be found. Please check the URL.")})}const BV=[{name:"page-item",path:"/page/:postId",areas:{sidebar({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(Ua,{title:(0,w.__)("Pages"),backPath:"/",content:(0,a.jsx)(LI,{postType:"page"})}):(0,a.jsx)(uo,{})},mobile({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})},preview({siteData:e}){const t=e.currentTheme?.is_block_theme;return t?(0,a.jsx)(_v,{}):(0,a.jsx)(uo,{})}}},FV,kI,CI,cP,lP,oP,uy,oy,Ev,Sv,{name:"stylebook",path:"/stylebook",areas:{sidebar:({siteData:e})=>jv(e)?(0,a.jsx)(Ua,{title:(0,w.__)("Styles"),backPath:"/",description:(0,w.__)("Preview your website's visual identity: colors, typography, and blocks.")}):(0,a.jsx)(uo,{}),preview:({siteData:e})=>jv(e)?(0,a.jsx)(lg,{isStatic:!0}):void 0,mobile:({siteData:e})=>jv(e)?(0,a.jsx)(lg,{isStatic:!0}):void 0}},{name:"notfound",path:"*",areas:{sidebar:(0,a.jsx)(co,{}),mobile:(0,a.jsx)(co,{customDescription:(0,a.jsx)(MV,{})}),content:(0,a.jsx)(b.__experimentalSpacer,{padding:2,children:(0,a.jsx)(MV,{})})}}];const{RouterProvider:DV}=ne(Lt.privateApis);function RV(){return(0,Kt.useCommandLoader)({name:"core/edit-site/toggle-styles-welcome-guide",hook:Sa()}),(0,Kt.useCommandLoader)({name:"core/edit-site/reset-global-styles",hook:Ca()}),(0,Kt.useCommandLoader)({name:"core/edit-site/open-styles-revisions",hook:ka()}),function(){const{query:e={}}=Na(),{canvas:t="view"}=e;let n="site-editor";"edit"===t&&(n="entity-edit"),(0,c.useSelect)((e=>e(x.store).getBlockSelectionStart()),[])&&(n="block-selection-edit"),Ta()&&(n=""),Aa(n)}(),(0,a.jsx)(ga,{})}function LV(){!function(){const e=(0,c.useRegistry)(),{registerRoute:t}=ne((0,c.useDispatch)(Rt));(0,h.useEffect)((()=>{e.batch((()=>{BV.forEach(t)}))}),[e,t])}();const{routes:e,currentTheme:t,editorSettings:n}=(0,c.useSelect)((e=>({routes:ne(e(Rt)).getRoutes(),currentTheme:e(j.store).getCurrentTheme(),editorSettings:e(Rt).getSettings()})),[]),s=(0,h.useCallback)((({path:e,query:t})=>Qr()?{path:e,query:{...t,wp_theme_preview:"wp_theme_preview"in t?t.wp_theme_preview:Jr()}}:{path:e,query:t}),[]),i=(0,h.useMemo)((()=>({siteData:{currentTheme:t,editorSettings:n}})),[t,n]);return(0,a.jsx)(DV,{routes:e,pathArg:"p",beforeNavigate:s,matchResolverArgs:i,children:(0,a.jsx)(RV,{})})}const zV=(0,Qt.getPath)(window.location.href)?.includes("site-editor.php"),HV=e=>{d()(`wp.editPost.${e}`,{since:"6.6",alternative:`wp.editor.${e}`})};function GV(e){return zV?(HV("PluginMoreMenuItem"),(0,a.jsx)(f.PluginMoreMenuItem,{...e})):null}function WV(e){return zV?(HV("PluginSidebar"),(0,a.jsx)(f.PluginSidebar,{...e})):null}function UV(e){return zV?(HV("PluginSidebarMoreMenuItem"),(0,a.jsx)(f.PluginSidebarMoreMenuItem,{...e})):null}const{useLocation:qV}=ne(Lt.privateApis);async function ZV(e){const{activeView:t="all"}=e,n=await(0,c.resolveSelect)(j.store).getPostType("post");return"list"===(await(0,SE.loadView)({kind:"postType",name:"post",slug:t,defaultView:DI(n,t)})).type}function YV(){const{query:e={}}=qV(),{canvas:t="view"}=e;return"edit"===t?(0,a.jsx)(_v,{}):(0,a.jsx)(QI,{postType:"post"})}const KV={name:"posts",path:"/",areas:{sidebar:(0,a.jsx)(Ua,{title:(0,w.__)("Posts"),isRoot:!0,content:(0,a.jsx)(LI,{postType:"post"})}),content:(0,a.jsx)(QI,{postType:"post"}),preview:async({query:e})=>await ZV(e)?(0,a.jsx)(_v,{isPostsList:!0}):void 0,mobile:(0,a.jsx)(YV,{}),edit:async({query:e})=>!await ZV(e)&&!!e.quickEdit?(0,a.jsx)(TV,{postType:"post",postId:e.postId}):void 0},widths:{content:async({query:e})=>await ZV(e)?380:void 0,edit:async({query:e})=>!await ZV(e)&&!!e.quickEdit?380:void 0}};(0,w.__)("Posts");const{RouterProvider:XV}=ne(Lt.privateApis);function QV(e,t){}const{registerCoreBlockBindingsSources:JV}=ne(f.privateApis);function $V(e,t){const n=document.getElementById(e),s=(0,h.createRoot)(n);(0,c.dispatch)(o.store).reapplyBlockTypeFilters();const i=(0,l.__experimentalGetCoreBlocks)().filter((({name:e})=>"core/freeform"!==e));return(0,l.registerCoreBlocks)(i),JV(),(0,c.dispatch)(o.store).setFreeformFallbackBlockName("core/html"),(0,g.registerLegacyWidgetBlock)({inserter:!1}),(0,g.registerWidgetGroupBlock)({inserter:!1}),(0,c.dispatch)(m.store).setDefaults("core/edit-site",{welcomeGuide:!0,welcomeGuideStyles:!0,welcomeGuidePage:!0,welcomeGuideTemplate:!0}),(0,c.dispatch)(m.store).setDefaults("core",{allowRightClickOverrides:!0,distractionFree:!1,editorMode:"visual",editorTool:"edit",fixedToolbar:!1,focusMode:!1,inactivePanels:[],keepCaretInsideBlock:!1,openPanels:["post-status"],showBlockBreadcrumbs:!0,showListViewByDefault:!1,enableChoosePatternModal:!0}),window.__experimentalMediaProcessing&&(0,c.dispatch)(m.store).setDefaults("core/media",{requireApproval:!0,optimizeOnUpload:!0}),(0,c.dispatch)(Rt).updateSettings(t),window.addEventListener("dragover",(e=>e.preventDefault()),!1),window.addEventListener("drop",(e=>e.preventDefault()),!1),s.render((0,a.jsx)(h.StrictMode,{children:(0,a.jsx)(LV,{})})),s}function eT(){d()("wp.editSite.reinitializeEditor",{since:"6.2",version:"6.3"})}})(),(window.wp=window.wp||{}).editSite=r})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/editor.js b/wp-includes/js/dist/editor.js
index 452f28e24e..c615937858 100644
--- a/wp-includes/js/dist/editor.js
+++ b/wp-includes/js/dist/editor.js
@@ -1870,6 +1870,7 @@ __webpack_require__.d(store_private_actions_namespaceObject, {
removeTemplates: () => (removeTemplates),
revertTemplate: () => (private_actions_revertTemplate),
saveDirtyEntities: () => (saveDirtyEntities),
+ setCanvasMinHeight: () => (setCanvasMinHeight),
setCurrentTemplateId: () => (setCurrentTemplateId),
setDefaultRenderingMode: () => (setDefaultRenderingMode),
setIsReady: () => (setIsReady),
@@ -1882,6 +1883,7 @@ __webpack_require__.d(store_private_actions_namespaceObject, {
var store_private_selectors_namespaceObject = {};
__webpack_require__.r(store_private_selectors_namespaceObject);
__webpack_require__.d(store_private_selectors_namespaceObject, {
+ getCanvasMinHeight: () => (getCanvasMinHeight),
getDefaultRenderingMode: () => (getDefaultRenderingMode),
getEntityActions: () => (private_selectors_getEntityActions),
getEntityFields: () => (private_selectors_getEntityFields),
@@ -2171,6 +2173,13 @@ function publishSidebarActive(state = false, action) {
}
return state;
}
+function canvasMinHeight(state = 0, action) {
+ switch (action.type) {
+ case "SET_CANVAS_MIN_HEIGHT":
+ return action.minHeight;
+ }
+ return state;
+}
var reducer_reducer_default = (0,external_wp_data_namespaceObject.combineReducers)({
postId,
postType,
@@ -2190,6 +2199,7 @@ var reducer_reducer_default = (0,external_wp_data_namespaceObject.combineReducer
listViewPanel,
listViewToggleRef,
publishSidebarActive,
+ canvasMinHeight,
dataviews: reducer_default
});
@@ -4910,6 +4920,9 @@ const renamePost = {
if (post.status === "trash") {
return false;
}
+ if (post.type === "wp_template" && typeof post.id === "string") {
+ return false;
+ }
if (![
"wp_template_part",
...Object.values(PATTERN_TYPES)
@@ -5816,6 +5829,9 @@ const trash_post_trashPost = {
if (item.type === "wp_template_part" || item.type === "wp_block") {
return false;
}
+ if (item.type === "wp_template" && typeof item.id === "string") {
+ return false;
+ }
return !!item.status && !["auto-draft", "trash"].includes(item.status) && item.permissions?.delete;
},
supportsBulk: true,
@@ -12170,6 +12186,12 @@ const setDefaultRenderingMode = (mode) => ({ select, registry }) => {
};
registry.dispatch(external_wp_preferences_namespaceObject.store).set("core", "renderingModes", newModes);
};
+function setCanvasMinHeight(minHeight) {
+ return {
+ type: "SET_CANVAS_MIN_HEIGHT",
+ minHeight
+ };
+}
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/index.js
@@ -12359,6 +12381,9 @@ const getDefaultRenderingMode = (0,external_wp_data_namespaceObject.createRegist
return defaultMode;
}
);
+function getCanvasMinHeight(state) {
+ return state.canvasMinHeight;
+}
;// ./node_modules/@wordpress/editor/build-module/store/index.js
@@ -22590,7 +22615,7 @@ function MoreMenu() {
action_item_default.Slot,
{
name: "core/plugin-more-menu",
- label: (0,external_wp_i18n_namespaceObject.__)("Plugins"),
+ label: (0,external_wp_i18n_namespaceObject.__)("Panels"),
fillProps: { onClick: onClose }
}
),
@@ -23946,7 +23971,8 @@ function VisualEditor({
isFocusedEntity,
isDesignPostType,
postType,
- isPreview
+ isPreview,
+ canvasMinHeight
} = (0,external_wp_data_namespaceObject.useSelect)((select) => {
const {
getCurrentPostId,
@@ -23954,8 +23980,9 @@ function VisualEditor({
getCurrentTemplateId,
getEditorSettings,
getRenderingMode,
- getDeviceType
- } = select(store_store);
+ getDeviceType,
+ getCanvasMinHeight
+ } = unlock(select(store_store));
const { getPostType, getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
const postTypeSlug = getCurrentPostType();
const _renderingMode = getRenderingMode();
@@ -23986,7 +24013,8 @@ function VisualEditor({
deviceType: getDeviceType(),
isFocusedEntity: !!editorSettings.onNavigateToPreviousEntityRecord,
postType: postTypeSlug,
- isPreview: editorSettings.isPreviewMode
+ isPreview: editorSettings.isPreviewMode,
+ canvasMinHeight: getCanvasMinHeight()
};
}, []);
const { isCleanNewPost } = (0,external_wp_data_namespaceObject.useSelect)(store_store);
@@ -24007,6 +24035,7 @@ function VisualEditor({
isZoomedOut: _isZoomOut()
};
}, []);
+ const localRef = (0,external_wp_element_namespaceObject.useRef)();
const deviceStyles = (0,external_wp_blockEditor_namespaceObject.__experimentalUseResizeCanvas)(deviceType);
const [globalLayoutSettings] = (0,external_wp_blockEditor_namespaceObject.useSettings)("layout");
const fallbackLayout = (0,external_wp_element_namespaceObject.useMemo)(() => {
@@ -24095,23 +24124,30 @@ function VisualEditor({
!isPreview && // Disable resizing in mobile viewport.
!isMobileViewport && // Disable resizing in zoomed-out mode.
!isZoomedOut;
+ const calculatedMinHeight = (0,external_wp_element_namespaceObject.useMemo)(() => {
+ if (!localRef.current) {
+ return canvasMinHeight;
+ }
+ const { ownerDocument } = localRef.current;
+ const scrollTop = ownerDocument.documentElement.scrollTop || ownerDocument.body.scrollTop;
+ return canvasMinHeight + scrollTop;
+ }, [canvasMinHeight]);
const iframeStyles = (0,external_wp_element_namespaceObject.useMemo)(() => {
return [
...styles ?? [],
{
// Ensures margins of children are contained so that the body background paints behind them.
- // Otherwise, the background of html (when zoomed out) would show there and appear broken. It’s
+ // Otherwise, the background of html (when zoomed out) would show there and appear broken. It's
// important mostly for post-only views yet conceivably an issue in templated views too.
- css: `:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${// Some themes will have `min-height: 100vh` for the root container,
+ css: `:where(.block-editor-iframe__body){display:flow-root;${calculatedMinHeight ? `min-height:${calculatedMinHeight}px;` : ""}}.is-root-container{display:flow-root;${// Some themes will have `min-height: 100vh` for the root container,
// which isn't a requirement in auto resize mode.
enableResizing ? "min-height:0!important;" : ""}}
- ${enableResizing ? ".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}" : ""}`
+ ${enableResizing ? `.block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}` : ""}`
// The CSS above centers the body content vertically when resizing is enabled and applies a background
// color to the iframe HTML element to match the background color of the editor canvas.
}
];
- }, [styles, enableResizing]);
- const localRef = (0,external_wp_element_namespaceObject.useRef)();
+ }, [styles, enableResizing, calculatedMinHeight]);
const typewriterRef = (0,external_wp_blockEditor_namespaceObject.__unstableUseTypewriter)();
contentRef = (0,external_wp_compose_namespaceObject.useMergeRefs)([
localRef,
@@ -26176,13 +26212,16 @@ function getCommentExcerpt(text, excerptLength = 10) {
const isTrimmed = trimmedExcerpt !== rawText;
return isTrimmed ? trimmedExcerpt + "\u2026" : trimmedExcerpt;
}
-function focusCommentThread(commentId, container, additionalSelector) {
- if (!container) {
+function focusCommentThread(commentId, threadContainer, additionalSelector) {
+ if (!threadContainer) {
return;
}
- const threadSelector = commentId ? `[role=listitem][id="comment-thread-${commentId}"]` : "[role=listitem]:not([id])";
+ const threadSelector = commentId ? `[role=treeitem][id="comment-thread-${commentId}"]` : "[role=treeitem]:not([id])";
const selector = additionalSelector ? `${threadSelector} ${additionalSelector}` : threadSelector;
return new Promise((resolve) => {
+ const container = threadContainer.closest(
+ ".interface-interface-skeleton__sidebar"
+ );
if (container.querySelector(selector)) {
return resolve(container.querySelector(selector));
}
@@ -26216,26 +26255,38 @@ function focusCommentThread(commentId, container, additionalSelector) {
function CommentAuthorInfo({ avatar, name, date, userId }) {
+ const hasAvatar = !!avatar;
const dateSettings = (0,external_wp_date_namespaceObject.getSettings)();
const {
currentUserAvatar,
currentUserName,
currentUserId,
dateFormat = dateSettings.formats.date
- } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
- const { getCurrentUser, getEntityRecord } = select(external_wp_coreData_namespaceObject.store);
- const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
- const userData = getCurrentUser();
- const { __experimentalDiscussionSettings } = getSettings();
- const defaultAvatar = __experimentalDiscussionSettings?.avatarURL;
- const siteSettings = getEntityRecord("root", "site");
- return {
- currentUserAvatar: userData?.avatar_urls?.[48] ?? defaultAvatar,
- currentUserName: userData?.name,
- currentUserId: userData?.id,
- dateFormat: siteSettings?.date_format
- };
- }, []);
+ } = (0,external_wp_data_namespaceObject.useSelect)(
+ (select) => {
+ const { canUser, getCurrentUser, getEntityRecord } = select(external_wp_coreData_namespaceObject.store);
+ const siteSettings = canUser("read", {
+ kind: "root",
+ name: "site"
+ }) ? getEntityRecord("root", "site") : void 0;
+ if (hasAvatar) {
+ return {
+ dateFormat: siteSettings?.date_format
+ };
+ }
+ const { getSettings } = select(external_wp_blockEditor_namespaceObject.store);
+ const { __experimentalDiscussionSettings } = getSettings();
+ const defaultAvatar = __experimentalDiscussionSettings?.avatarURL;
+ const userData = getCurrentUser();
+ return {
+ currentUserAvatar: userData?.avatar_urls?.[48] ?? defaultAvatar,
+ currentUserName: userData?.name,
+ currentUserId: userData?.id,
+ dateFormat: siteSettings?.date_format
+ };
+ },
+ [hasAvatar]
+ );
const commentDate = (0,external_wp_date_namespaceObject.getDate)(date);
const commentDateTime = (0,external_wp_date_namespaceObject.dateI18n)("c", commentDate);
const shouldShowHumanTimeDiff = Math.floor((/* @__PURE__ */ new Date() - commentDate) / (1e3 * 60 * 60 * 24)) < 30;
@@ -26263,7 +26314,7 @@ function CommentAuthorInfo({ avatar, name, date, userId }) {
),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "0", children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("span", { className: "editor-collab-sidebar-panel__user-name", children: name ?? currentUserName }),
- date && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, { placement: "top", text: tooltipText, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ date && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Tooltip, { text: tooltipText, children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
"time",
{
dateTime: commentDateTime,
@@ -28783,6 +28834,9 @@ function useBlockComments(postId) {
};
}, []);
const { resultComments, unresolvedSortedThreads } = (0,external_wp_element_namespaceObject.useMemo)(() => {
+ if (!threads || threads.length === 0) {
+ return { resultComments: [], unresolvedSortedThreads: [] };
+ }
const blocksWithComments = clientIds.reduce((results, clientId) => {
const commentId = getBlockAttributes(clientId)?.metadata?.noteId;
if (commentId) {
@@ -28792,8 +28846,7 @@ function useBlockComments(postId) {
}, {});
const compare = {};
const result = [];
- const allComments = threads ?? [];
- allComments.forEach((item) => {
+ threads.forEach((item) => {
const itemBlock = Object.keys(blocksWithComments).find(
(key) => blocksWithComments[key] === item.id
);
@@ -28803,7 +28856,7 @@ function useBlockComments(postId) {
blockClientId: item.parent === 0 ? itemBlock : null
};
});
- allComments.forEach((item) => {
+ threads.forEach((item) => {
if (item.parent === 0) {
result.push(compare[item.id]);
} else if (compare[item.parent]) {
@@ -29104,6 +29157,12 @@ function AddComment({
};
}, []);
const blockElement = useBlockElement(clientId);
+ const { toggleBlockSpotlight } = unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store));
+ const unselectThread = () => {
+ setShowCommentBoard(false);
+ blockElement?.focus();
+ toggleBlockSpotlight(clientId, false);
+ };
if (!showCommentBoard || !clientId || void 0 !== blockCommentId) {
return null;
}
@@ -29119,7 +29178,7 @@ function AddComment({
spacing: "3",
tabIndex: 0,
"aria-label": (0,external_wp_i18n_namespaceObject.__)("New note"),
- role: "listitem",
+ role: "treeitem",
ref: isFloating ? refs.setFloating : void 0,
style: isFloating ? (
// Delay showing the floating note box until a Y position is known to prevent blink.
@@ -29129,6 +29188,7 @@ function AddComment({
if (event.currentTarget.contains(event.relatedTarget)) {
return;
}
+ toggleBlockSpotlight(clientId, false);
setShowCommentBoard(false);
},
children: [
@@ -29141,10 +29201,7 @@ function AddComment({
focusCommentThread(id, commentSidebarRef.current);
setShowCommentBoard(false);
},
- onCancel: () => {
- setShowCommentBoard(false);
- blockElement?.focus();
- },
+ onCancel: unselectThread,
reflowComments,
submitButtonText: (0,external_wp_i18n_namespaceObject.__)("Add note"),
labelText: (0,external_wp_i18n_namespaceObject.__)("New note")
@@ -29173,6 +29230,7 @@ function AddComment({
+
const { useBlockElement: comments_useBlockElement } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const { Menu: comments_Menu } = unlock(external_wp_components_namespaceObject.privateApis);
function Comments({
@@ -29191,6 +29249,7 @@ function Comments({
const [selectedThread, setSelectedThread] = (0,external_wp_element_namespaceObject.useState)(null);
const [boardOffsets, setBoardOffsets] = (0,external_wp_element_namespaceObject.useState)({});
const [blockRefs, setBlockRefs] = (0,external_wp_element_namespaceObject.useState)({});
+ const { setCanvasMinHeight } = unlock((0,external_wp_data_namespaceObject.useDispatch)(store_store));
const { blockCommentId, selectedBlockClientId, orderedBlockIds } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
const { getBlockAttributes, getSelectedBlockClientId } = select(external_wp_blockEditor_namespaceObject.store);
const clientId = getSelectedBlockClientId();
@@ -29256,8 +29315,9 @@ function Comments({
}
};
(0,external_wp_element_namespaceObject.useEffect)(() => {
- setSelectedThread(blockCommentId ?? void 0);
- }, [blockCommentId]);
+ const fallback = showCommentBoard ? "new-note-thread" : null;
+ setSelectedThread(blockCommentId ?? fallback);
+ }, [blockCommentId, showCommentBoard]);
const setBlockRef = (0,external_wp_element_namespaceObject.useCallback)((id, blockRef) => {
setBlockRefs((prev) => ({ ...prev, [id]: blockRef }));
}, []);
@@ -29265,7 +29325,7 @@ function Comments({
const calculateAllOffsets = () => {
const offsets = {};
if (!isFloating) {
- return offsets;
+ return { offsets, minHeight: 0 };
}
const selectedThreadIndex = threads.findIndex(
(t) => t.id === selectedThread
@@ -29273,7 +29333,7 @@ function Comments({
const breakIndex = selectedThreadIndex === -1 ? 0 : selectedThreadIndex;
const selectedThreadData = threads[breakIndex];
if (!selectedThreadData || !blockRefs[selectedThreadData.id]) {
- return offsets;
+ return { offsets, minHeight: 0 };
}
let blockElement = blockRefs[selectedThreadData.id];
let blockRect = blockElement?.getBoundingClientRect();
@@ -29326,28 +29386,34 @@ function Comments({
threadTop: threadTop + additionalOffset
};
}
- return offsets;
+ let editorMinHeight = 0;
+ const lastThread = threads[threads.length - 1];
+ if (blockRefs[lastThread.id]) {
+ const lastBlockElement = blockRefs[lastThread.id];
+ const lastBlockRect = lastBlockElement?.getBoundingClientRect();
+ const lastThreadTop = lastBlockRect?.top || 0;
+ const lastThreadHeight = heights[lastThread.id] || 0;
+ const lastThreadOffset = offsets[lastThread.id] || 0;
+ editorMinHeight = lastThreadTop + lastThreadHeight + lastThreadOffset + 32;
+ }
+ return { offsets, minHeight: editorMinHeight };
};
- const newOffsets = calculateAllOffsets();
+ const { offsets: newOffsets, minHeight } = calculateAllOffsets();
if (Object.keys(newOffsets).length > 0) {
setBoardOffsets(newOffsets);
}
- }, [heights, blockRefs, isFloating, threads, selectedThread]);
+ setCanvasMinHeight(minHeight);
+ }, [
+ heights,
+ blockRefs,
+ isFloating,
+ threads,
+ selectedThread,
+ setCanvasMinHeight
+ ]);
const hasThreads = Array.isArray(threads) && threads.length > 0;
if (!hasThreads && !isFloating) {
- return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- AddComment,
- {
- onSubmit: onAddReply,
- showCommentBoard,
- setShowCommentBoard,
- commentSidebarRef
- }
- ),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, { as: "p", children: (0,external_wp_i18n_namespaceObject.__)("No notes available.") }),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, { as: "p", variant: "muted", children: (0,external_wp_i18n_namespaceObject.__)("Only logged in users can see Notes.") })
- ] });
+ return null;
}
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
!isFloating && showCommentBoard && void 0 === blockCommentId && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
@@ -29467,185 +29533,181 @@ function Thread({
}
);
}
- return (
- // Disable reason: role="listitem" does in fact support aria-expanded.
- // eslint-disable-next-line jsx-a11y/role-supports-aria-props
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
- external_wp_components_namespaceObject.__experimentalVStack,
- {
- className: dist_clsx("editor-collab-sidebar-panel__thread", {
- "is-selected": isSelected,
- "is-floating": isFloating
- }),
- id: `comment-thread-${thread.id}`,
- spacing: "3",
- onClick: handleCommentSelect,
- onMouseEnter,
- onMouseLeave,
- onFocus: onMouseEnter,
- onBlur: onMouseLeave,
- onKeyDown: (event) => {
- if (event.defaultPrevented) {
- return;
- }
- if (event.key === "Enter" && event.currentTarget === event.target) {
- if (isSelected) {
- unselectThread();
- } else {
- handleCommentSelect();
- }
- }
- if (event.key === "Escape") {
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
+ external_wp_components_namespaceObject.__experimentalVStack,
+ {
+ className: dist_clsx("editor-collab-sidebar-panel__thread", {
+ "is-selected": isSelected,
+ "is-floating": isFloating
+ }),
+ id: `comment-thread-${thread.id}`,
+ spacing: "3",
+ onClick: handleCommentSelect,
+ onMouseEnter,
+ onMouseLeave,
+ onFocus: onMouseEnter,
+ onBlur: onMouseLeave,
+ onKeyDown: (event) => {
+ if (event.defaultPrevented) {
+ return;
+ }
+ if (event.key === "Enter" && event.currentTarget === event.target) {
+ if (isSelected) {
unselectThread();
- focusCommentThread(thread.id, commentSidebarRef.current);
+ } else {
+ handleCommentSelect();
}
- },
- tabIndex: 0,
- role: "listitem",
- "aria-label": ariaLabel,
- "aria-expanded": isSelected,
- ref: isFloating ? refs.setFloating : void 0,
- style: isFloating ? { top: y } : void 0,
- children: [
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.Button,
- {
- className: "editor-collab-sidebar-panel__skip-to-comment",
- variant: "secondary",
- size: "compact",
- onClick: () => {
+ }
+ if (event.key === "Escape") {
+ unselectThread();
+ focusCommentThread(thread.id, commentSidebarRef.current);
+ }
+ },
+ tabIndex: 0,
+ role: "treeitem",
+ "aria-label": ariaLabel,
+ "aria-expanded": isSelected,
+ ref: isFloating ? refs.setFloating : void 0,
+ style: isFloating ? { top: y } : void 0,
+ children: [
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.Button,
+ {
+ className: "editor-collab-sidebar-panel__skip-to-comment",
+ variant: "secondary",
+ size: "compact",
+ onClick: () => {
+ focusCommentThread(
+ thread.id,
+ commentSidebarRef.current,
+ "textarea"
+ );
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)("Add new note")
+ }
+ ),
+ !thread.blockClientId && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, { as: "p", weight: 500, variant: "muted", children: (0,external_wp_i18n_namespaceObject.__)("Original block deleted.") }),
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ CommentBoard,
+ {
+ thread,
+ isExpanded: isSelected,
+ onEdit: (params = {}) => {
+ const { status } = params;
+ onEditComment(params);
+ if (status === "approved") {
+ unselectThread();
focusCommentThread(
thread.id,
- commentSidebarRef.current,
- "textarea"
+ commentSidebarRef.current
);
- },
- children: (0,external_wp_i18n_namespaceObject.__)("Add new note")
- }
- ),
- !thread.blockClientId && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, { as: "p", weight: 500, variant: "muted", children: (0,external_wp_i18n_namespaceObject.__)("Original block deleted.") }),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- CommentBoard,
+ }
+ },
+ onDelete: onCommentDelete,
+ reflowComments
+ }
+ ),
+ isSelected && allReplies.map((reply) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ CommentBoard,
+ {
+ thread: reply,
+ parent: thread,
+ isExpanded: isSelected,
+ onEdit: onEditComment,
+ onDelete: onCommentDelete,
+ reflowComments
+ },
+ reply.id
+ )),
+ !isSelected && restReplies.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { className: "editor-collab-sidebar-panel__more-reply-separator", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.Button,
+ {
+ size: "compact",
+ variant: "tertiary",
+ className: "editor-collab-sidebar-panel__more-reply-button",
+ onClick: () => {
+ setSelectedThread(thread.id);
+ focusCommentThread(
+ thread.id,
+ commentSidebarRef.current
+ );
+ },
+ children: (0,external_wp_i18n_namespaceObject.sprintf)(
+ // translators: %s: number of replies.
+ (0,external_wp_i18n_namespaceObject._n)(
+ "%s more reply",
+ "%s more replies",
+ restReplies.length
+ ),
+ restReplies.length
+ )
+ }
+ ) }),
+ !isSelected && lastReply && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ CommentBoard,
+ {
+ thread: lastReply,
+ parent: thread,
+ isExpanded: isSelected,
+ onEdit: onEditComment,
+ onDelete: onCommentDelete,
+ reflowComments
+ }
+ ),
+ isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "2", role: "treeitem", children: [
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "left", spacing: "3", justify: "flex-start", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comment_author_info_default, {}) }),
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "2", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ comment_form_default,
{
- thread,
- isExpanded: isSelected,
- onEdit: (params = {}) => {
- const { status } = params;
- onEditComment(params);
- if (status === "approved") {
- unselectThread();
- focusCommentThread(
- thread.id,
- commentSidebarRef.current
- );
+ onSubmit: (inputComment) => {
+ if ("approved" === thread.status) {
+ onEditComment({
+ id: thread.id,
+ status: "hold",
+ content: inputComment
+ });
+ } else {
+ onAddReply({
+ content: inputComment,
+ parent: thread.id
+ });
}
},
- onDelete: onCommentDelete,
- reflowComments
- }
- ),
- isSelected && allReplies.map((reply) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- CommentBoard,
- {
- thread: reply,
- parent: thread,
- isExpanded: isSelected,
- onEdit: onEditComment,
- onDelete: onCommentDelete,
- reflowComments
- },
- reply.id
- )),
- !isSelected && restReplies.length > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { className: "editor-collab-sidebar-panel__more-reply-separator", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.Button,
- {
- size: "compact",
- variant: "tertiary",
- className: "editor-collab-sidebar-panel__more-reply-button",
- onClick: () => {
- setSelectedThread(thread.id);
+ onCancel: (event) => {
+ event.stopPropagation();
+ unselectThread();
focusCommentThread(
thread.id,
commentSidebarRef.current
);
},
- children: (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %s: number of replies.
- (0,external_wp_i18n_namespaceObject._n)(
- "%s more reply",
- "%s more replies",
- restReplies.length
- ),
- restReplies.length
- )
- }
- ) }),
- !isSelected && lastReply && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- CommentBoard,
- {
- thread: lastReply,
- parent: thread,
- isExpanded: isSelected,
- onEdit: onEditComment,
- onDelete: onCommentDelete,
+ submitButtonText: "approved" === thread.status ? (0,external_wp_i18n_namespaceObject.__)("Reopen & Reply") : (0,external_wp_i18n_namespaceObject.__)("Reply"),
+ rows: "approved" === thread.status ? 2 : 4,
+ labelText: (0,external_wp_i18n_namespaceObject.sprintf)(
+ // translators: %1$s: note identifier, %2$s: author name
+ (0,external_wp_i18n_namespaceObject.__)("Reply to note %1$s by %2$s"),
+ thread.id,
+ thread.author_name
+ ),
reflowComments
}
- ),
- isSelected && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "2", children: [
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "left", spacing: "3", justify: "flex-start", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comment_author_info_default, {}) }),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "2", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- comment_form_default,
- {
- onSubmit: (inputComment) => {
- if ("approved" === thread.status) {
- onEditComment({
- id: thread.id,
- status: "hold",
- content: inputComment
- });
- } else {
- onAddReply({
- content: inputComment,
- parent: thread.id
- });
- }
- },
- onCancel: (event) => {
- event.stopPropagation();
- unselectThread();
- focusCommentThread(
- thread.id,
- commentSidebarRef.current
- );
- },
- submitButtonText: "approved" === thread.status ? (0,external_wp_i18n_namespaceObject.__)("Reopen & Reply") : (0,external_wp_i18n_namespaceObject.__)("Reply"),
- rows: "approved" === thread.status ? 2 : 4,
- labelText: (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %1$s: note identifier, %2$s: author name
- (0,external_wp_i18n_namespaceObject.__)("Reply to note %1$s by %2$s"),
- thread.id,
- thread.author_name
- ),
- reflowComments
- }
- ) })
- ] }),
- !!thread.blockClientId && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.Button,
- {
- className: "editor-collab-sidebar-panel__skip-to-block",
- variant: "secondary",
- size: "compact",
- onClick: (event) => {
- event.stopPropagation();
- relatedBlockElement?.focus();
- },
- children: (0,external_wp_i18n_namespaceObject.__)("Back to block")
- }
- )
- ]
- }
- )
+ ) })
+ ] }),
+ !!thread.blockClientId && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.Button,
+ {
+ className: "editor-collab-sidebar-panel__skip-to-block",
+ variant: "secondary",
+ size: "compact",
+ onClick: (event) => {
+ event.stopPropagation();
+ relatedBlockElement?.focus();
+ },
+ children: (0,external_wp_i18n_namespaceObject.__)("Back to block")
+ }
+ )
+ ]
+ }
);
}
const CommentBoard = ({
@@ -29658,6 +29720,7 @@ const CommentBoard = ({
}) => {
const [actionState, setActionState] = (0,external_wp_element_namespaceObject.useState)(false);
const [showConfirmDialog, setShowConfirmDialog] = (0,external_wp_element_namespaceObject.useState)(false);
+ const actionButtonRef = (0,external_wp_element_namespaceObject.useRef)(null);
const handleConfirmDelete = () => {
onDelete(thread);
setActionState(false);
@@ -29666,6 +29729,7 @@ const CommentBoard = ({
const handleCancel = () => {
setActionState(false);
setShowConfirmDialog(false);
+ actionButtonRef.current?.focus();
};
const isResolutionComment = thread.type === "note" && thread.meta && (thread.meta._wp_note_status === "resolved" || thread.meta._wp_note_status === "reopen");
const actions = [
@@ -29697,131 +29761,140 @@ const CommentBoard = ({
];
const canResolve = thread.parent === 0;
const moreActions = parent?.status !== "approved" ? actions.filter((item) => item.isEligible(thread)) : [];
- return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, { spacing: "2", children: [
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "left", spacing: "3", justify: "flex-start", children: [
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- comment_author_info_default,
- {
- avatar: thread?.author_avatar_urls?.[48],
- name: thread?.author_name,
- date: thread?.date,
- userId: thread?.author
- }
- ),
- isExpanded && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.FlexItem,
- {
- className: "editor-collab-sidebar-panel__comment-status",
- onClick: (event) => {
- event.stopPropagation();
- },
- children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { spacing: "0", children: [
- canResolve && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.Button,
- {
- label: (0,external_wp_i18n_namespaceObject._x)(
- "Resolve",
- "Mark note as resolved"
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(
+ external_wp_components_namespaceObject.__experimentalVStack,
+ {
+ spacing: "2",
+ role: thread.parent !== 0 ? "treeitem" : void 0,
+ children: [
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { alignment: "left", spacing: "3", justify: "flex-start", children: [
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ comment_author_info_default,
+ {
+ avatar: thread?.author_avatar_urls?.[48],
+ name: thread?.author_name,
+ date: thread?.date,
+ userId: thread?.author
+ }
+ ),
+ isExpanded && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.FlexItem,
+ {
+ className: "editor-collab-sidebar-panel__comment-status",
+ onClick: (event) => {
+ event.stopPropagation();
+ },
+ children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { spacing: "0", children: [
+ canResolve && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.Button,
+ {
+ label: (0,external_wp_i18n_namespaceObject._x)(
+ "Resolve",
+ "Mark note as resolved"
+ ),
+ size: "small",
+ icon: published_default,
+ disabled: thread.status === "approved",
+ accessibleWhenDisabled: thread.status === "approved",
+ onClick: () => {
+ onEdit({
+ id: thread.id,
+ status: "approved"
+ });
+ }
+ }
),
- size: "small",
- icon: published_default,
- disabled: thread.status === "approved",
- accessibleWhenDisabled: thread.status === "approved",
- onClick: () => {
- onEdit({
- id: thread.id,
- status: "approved"
- });
- }
- }
- ),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(comments_Menu, { placement: "bottom-end", children: [
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- comments_Menu.TriggerButton,
- {
- render: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.Button,
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(comments_Menu, { placement: "bottom-end", children: [
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ comments_Menu.TriggerButton,
{
- size: "small",
- icon: more_vertical_default,
- label: (0,external_wp_i18n_namespaceObject.__)("Actions"),
- disabled: !moreActions.length,
- accessibleWhenDisabled: true
+ render: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.Button,
+ {
+ ref: actionButtonRef,
+ size: "small",
+ icon: more_vertical_default,
+ label: (0,external_wp_i18n_namespaceObject.__)("Actions"),
+ disabled: !moreActions.length,
+ accessibleWhenDisabled: true
+ }
+ )
}
- )
- }
- ),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comments_Menu.Popover, { children: moreActions.map((action) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- comments_Menu.Item,
- {
- onClick: () => action.onClick(),
- children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comments_Menu.ItemLabel, { children: action.title })
- },
- action.id
- )) })
- ] })
- ] })
- }
- )
- ] }),
- "edit" === actionState ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- comment_form_default,
- {
- onSubmit: (value) => {
- onEdit({
- id: thread.id,
- content: value
- });
- setActionState(false);
- },
- onCancel: () => handleCancel(),
- thread,
- submitButtonText: (0,external_wp_i18n_namespaceObject._x)("Update", "verb"),
- labelText: (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %1$s: note identifier, %2$s: author name.
- (0,external_wp_i18n_namespaceObject.__)("Edit note %1$s by %2$s"),
- thread.id,
- thread.author_name
- ),
- reflowComments
- }
- ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_element_namespaceObject.RawHTML,
- {
- className: dist_clsx(
- "editor-collab-sidebar-panel__user-comment",
+ ),
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comments_Menu.Popover, { children: moreActions.map((action) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ comments_Menu.Item,
+ {
+ onClick: () => action.onClick(),
+ children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comments_Menu.ItemLabel, { children: action.title })
+ },
+ action.id
+ )) })
+ ] })
+ ] })
+ }
+ )
+ ] }),
+ "edit" === actionState ? /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ comment_form_default,
{
- "editor-collab-sidebar-panel__resolution-text": isResolutionComment
+ onSubmit: (value) => {
+ onEdit({
+ id: thread.id,
+ content: value
+ });
+ setActionState(false);
+ actionButtonRef.current?.focus();
+ },
+ onCancel: () => handleCancel(),
+ thread,
+ submitButtonText: (0,external_wp_i18n_namespaceObject._x)("Update", "verb"),
+ labelText: (0,external_wp_i18n_namespaceObject.sprintf)(
+ // translators: %1$s: note identifier, %2$s: author name.
+ (0,external_wp_i18n_namespaceObject.__)("Edit note %1$s by %2$s"),
+ thread.id,
+ thread.author_name
+ ),
+ reflowComments
+ }
+ ) : /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_element_namespaceObject.RawHTML,
+ {
+ className: dist_clsx(
+ "editor-collab-sidebar-panel__user-comment",
+ {
+ "editor-collab-sidebar-panel__resolution-text": isResolutionComment
+ }
+ ),
+ children: isResolutionComment ? (() => {
+ const actionText = thread.meta._wp_note_status === "resolved" ? (0,external_wp_i18n_namespaceObject.__)("Marked as resolved") : (0,external_wp_i18n_namespaceObject.__)("Reopened");
+ const content = thread?.content?.raw;
+ if (content && typeof content === "string" && content.trim() !== "") {
+ return (0,external_wp_i18n_namespaceObject.sprintf)(
+ // translators: %1$s: action label ("Marked as resolved" or "Reopened"); %2$s: note text.
+ (0,external_wp_i18n_namespaceObject.__)("%1$s: %2$s"),
+ actionText,
+ content
+ );
+ }
+ return actionText;
+ })() : thread?.content?.rendered
}
),
- children: isResolutionComment ? (() => {
- const actionText = thread.meta._wp_note_status === "resolved" ? (0,external_wp_i18n_namespaceObject.__)("Marked as resolved") : (0,external_wp_i18n_namespaceObject.__)("Reopened");
- const content = thread?.content?.raw;
- if (content && typeof content === "string" && content.trim() !== "") {
- return (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %1$s: action label ("Marked as resolved" or "Reopened"); %2$s: note text.
- (0,external_wp_i18n_namespaceObject.__)("%1$s: %2$s"),
- actionText,
- content
- );
+ "delete" === actionState && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ external_wp_components_namespaceObject.__experimentalConfirmDialog,
+ {
+ isOpen: showConfirmDialog,
+ onConfirm: handleConfirmDelete,
+ onCancel: handleCancel,
+ confirmButtonText: (0,external_wp_i18n_namespaceObject.__)("Delete"),
+ children: (0,external_wp_i18n_namespaceObject.__)(
+ "Are you sure you want to delete this note? This will also delete all of this note's replies."
+ )
}
- return actionText;
- })() : thread?.content?.rendered
- }
- ),
- "delete" === actionState && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- external_wp_components_namespaceObject.__experimentalConfirmDialog,
- {
- isOpen: showConfirmDialog,
- onConfirm: handleConfirmDelete,
- onCancel: handleCancel,
- confirmButtonText: (0,external_wp_i18n_namespaceObject.__)("Delete"),
- children: (0,external_wp_i18n_namespaceObject.__)(
- "Are you sure you want to delete this note? This will also delete all of this note's replies."
)
- }
- )
- ] });
+ ]
+ }
+ );
};
var comments_default = (/* unused pure expression or super */ null && (Comments));
@@ -29833,22 +29906,52 @@ var comments_default = (/* unused pure expression or super */ null && (Comments)
+
+
const { CommentIconSlotFill } = unlock(external_wp_blockEditor_namespaceObject.privateApis);
-const AddCommentMenuItem = ({ onClick }) => {
- return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentIconSlotFill.Fill, { children: ({ onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+const AddCommentMenuItem = ({ clientId, onClick, isDistractionFree }) => {
+ const block = (0,external_wp_data_namespaceObject.useSelect)(
+ (select) => {
+ return select(external_wp_blockEditor_namespaceObject.store).getBlock(clientId);
+ },
+ [clientId]
+ );
+ if (!block?.isValid || block?.name === (0,external_wp_blocks_namespaceObject.getUnregisteredTypeHandlerName)()) {
+ return null;
+ }
+ const isDisabled = isDistractionFree || block?.name === "core/freeform";
+ let infoText;
+ if (isDistractionFree) {
+ infoText = (0,external_wp_i18n_namespaceObject.__)("Notes are disabled in distraction free mode.");
+ } else if (block?.name === "core/freeform") {
+ infoText = (0,external_wp_i18n_namespaceObject.__)("Convert to blocks to add notes.");
+ }
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.MenuItem,
{
icon: comment_default,
+ onClick,
+ "aria-haspopup": "dialog",
+ disabled: isDisabled,
+ info: infoText,
+ children: (0,external_wp_i18n_namespaceObject.__)("Add note")
+ }
+ );
+};
+const AddCommentMenuItemFill = ({ onClick, isDistractionFree }) => {
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentIconSlotFill.Fill, { children: ({ clientId, onClose }) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ AddCommentMenuItem,
+ {
+ clientId,
+ isDistractionFree,
onClick: () => {
onClick();
onClose();
- },
- "aria-haspopup": "dialog",
- children: (0,external_wp_i18n_namespaceObject.__)("Add note")
+ }
}
) });
};
-var comment_menu_item_default = AddCommentMenuItem;
+var comment_menu_item_default = AddCommentMenuItemFill;
;// ./node_modules/@wordpress/editor/build-module/components/collab-sidebar/comment-indicator-toolbar.js
@@ -29886,23 +29989,18 @@ const CommentAvatarIndicator = ({ onClick, thread }) => {
return null;
}
const maxAvatars = 3;
- const visibleParticipants = threadParticipants.slice(0, maxAvatars);
- const overflowCount = Math.max(0, threadParticipants.length - maxAvatars);
+ const isOverflow = threadParticipants.length > maxAvatars;
+ const visibleParticipants = isOverflow ? threadParticipants.slice(0, maxAvatars - 1) : threadParticipants;
+ const overflowCount = Math.max(
+ 0,
+ threadParticipants.length - visibleParticipants.length
+ );
const threadHasMoreParticipants = threadParticipants.length > 100;
const overflowText = threadHasMoreParticipants && overflowCount > 0 ? (0,external_wp_i18n_namespaceObject.__)("100+") : (0,external_wp_i18n_namespaceObject.sprintf)(
// translators: %s: Number of participants.
(0,external_wp_i18n_namespaceObject.__)("+%s"),
overflowCount
);
- const overflowTitle = threadHasMoreParticipants && overflowCount > 0 ? (0,external_wp_i18n_namespaceObject.__)("100+ participants") : (0,external_wp_i18n_namespaceObject.sprintf)(
- // translators: %s: Number of participants.
- (0,external_wp_i18n_namespaceObject._n)(
- "+%s more participant",
- "+%s more participants",
- overflowCount
- ),
- overflowCount
- );
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(CommentIconToolbarSlotFill.Fill, { children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
external_wp_components_namespaceObject.ToolbarButton,
{
@@ -29910,15 +30008,14 @@ const CommentAvatarIndicator = ({ onClick, thread }) => {
label: (0,external_wp_i18n_namespaceObject.__)("View notes"),
onClick,
showTooltip: true,
- children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", { className: "comment-avatar-stack", children: [
- visibleParticipants.map((participant, index) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, { spacing: "1", children: [
+ visibleParticipants.map((participant) => /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
"img",
{
src: participant.avatar,
alt: participant.name,
className: "comment-avatar",
style: {
- zIndex: maxAvatars - index,
borderColor: getAvatarBorderColor(
participant.id
)
@@ -29926,15 +30023,7 @@ const CommentAvatarIndicator = ({ onClick, thread }) => {
},
participant.id
)),
- overflowCount > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
- "div",
- {
- className: "comment-avatar-overflow",
- style: { zIndex: 0 },
- title: overflowTitle,
- children: overflowText
- }
- )
+ overflowCount > 0 && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalText, { weight: 500, children: overflowText })
] })
}
) });
@@ -29962,6 +30051,7 @@ var comment_indicator_toolbar_default = CommentAvatarIndicator;
+
function NotesSidebarContent({
showCommentBoard,
setShowCommentBoard,
@@ -29978,7 +30068,7 @@ function NotesSidebarContent({
{
className: "editor-collab-sidebar-panel",
style: styles,
- role: "list",
+ role: "tree",
spacing: "3",
justify: "flex-start",
ref: (node) => {
@@ -29986,6 +30076,7 @@ function NotesSidebarContent({
commentSidebarRef.current = node;
}
},
+ "aria-label": isFloating ? (0,external_wp_i18n_namespaceObject.__)("Unresolved notes") : (0,external_wp_i18n_namespaceObject.__)("All notes"),
children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
Comments,
{
@@ -30008,14 +30099,26 @@ function NotesSidebar({ postId, mode }) {
const [showCommentBoard, setShowCommentBoard] = (0,external_wp_element_namespaceObject.useState)(false);
const { getActiveComplementaryArea } = (0,external_wp_data_namespaceObject.useSelect)(store);
const { enableComplementaryArea } = (0,external_wp_data_namespaceObject.useDispatch)(store);
+ const { toggleBlockSpotlight } = unlock((0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store));
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)("medium");
const commentSidebarRef = (0,external_wp_element_namespaceObject.useRef)(null);
const showFloatingSidebar = isLargeViewport && mode === "post-only";
- const blockCommentId = (0,external_wp_data_namespaceObject.useSelect)((select) => {
- const { getBlockAttributes, getSelectedBlockClientId } = select(external_wp_blockEditor_namespaceObject.store);
- const clientId = getSelectedBlockClientId();
- return clientId ? getBlockAttributes(clientId)?.metadata?.noteId : null;
- }, []);
+ const { clientId, blockCommentId, isDistractionFree } = (0,external_wp_data_namespaceObject.useSelect)(
+ (select) => {
+ const {
+ getBlockAttributes,
+ getSelectedBlockClientId,
+ getSettings
+ } = select(external_wp_blockEditor_namespaceObject.store);
+ const _clientId = getSelectedBlockClientId();
+ return {
+ clientId: _clientId,
+ blockCommentId: _clientId ? getBlockAttributes(_clientId)?.metadata?.noteId : null,
+ isDistractionFree: getSettings().isDistractionFree
+ };
+ },
+ []
+ );
const {
resultComments,
unresolvedSortedThreads,
@@ -30028,6 +30131,7 @@ function NotesSidebar({ postId, mode }) {
const { merged: GlobalStyles } = useGlobalStylesContext();
const backgroundColor = GlobalStyles?.styles?.color?.background;
const currentThread = blockCommentId ? resultComments.find((thread) => thread.id === blockCommentId) : null;
+ const showAllNotesSidebar = resultComments.length > 0 || !showFloatingSidebar;
async function openTheSidebar() {
const prevArea = await getActiveComplementaryArea("core");
const activeNotesArea = SIDEBARS.find((name) => name === prevArea);
@@ -30050,6 +30154,10 @@ function NotesSidebar({ postId, mode }) {
// Focus a comment thread when there's a selected block with a comment.
!blockCommentId ? "textarea" : void 0
);
+ toggleBlockSpotlight(clientId, true);
+ }
+ if (isDistractionFree) {
+ return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comment_menu_item_default, { isDistractionFree: true });
}
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
blockCommentId && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
@@ -30060,12 +30168,13 @@ function NotesSidebar({ postId, mode }) {
}
),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(comment_menu_item_default, { onClick: openTheSidebar }),
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
+ showAllNotesSidebar && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
PluginSidebar,
{
identifier: collabHistorySidebarName,
name: collabHistorySidebarName,
- title: (0,external_wp_i18n_namespaceObject.__)("Notes"),
+ title: (0,external_wp_i18n_namespaceObject.__)("All notes"),
+ header: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)("h2", { className: "interface-complementary-area-header__title", children: (0,external_wp_i18n_namespaceObject.__)("All notes") }),
icon: comment_default,
closeLabel: (0,external_wp_i18n_namespaceObject.__)("Close Notes"),
children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
@@ -30110,16 +30219,20 @@ function NotesSidebar({ postId, mode }) {
] });
}
function NotesSidebarContainer() {
- const { postId, mode } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
- const { getCurrentPostId, getRenderingMode } = select(store_store);
+ const { postId, mode, editorMode } = (0,external_wp_data_namespaceObject.useSelect)((select) => {
+ const { getCurrentPostId, getRenderingMode, getEditorMode } = select(store_store);
return {
postId: getCurrentPostId(),
- mode: getRenderingMode()
+ mode: getRenderingMode(),
+ editorMode: getEditorMode()
};
}, []);
if (!postId || typeof postId !== "number") {
return null;
}
+ if (editorMode === "text") {
+ return null;
+ }
return /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(post_type_support_check_default, { supportKeys: "editor.notes", children: /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NotesSidebar, { postId, mode }) });
}
@@ -30196,14 +30309,14 @@ function Editor({
children: [
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorInterface, { ...props, children: extraContent }),
children,
- /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NotesSidebarContainer, {}),
/* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(
sidebar_sidebar_default,
{
onActionPerformed,
extraPanels: extraSidebarPanels
}
- )
+ ),
+ /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsx)(NotesSidebarContainer, {})
]
}
)
@@ -30820,59 +30933,56 @@ const NAVIGATION_BLOCK_TYPES = [
"core/navigation-link",
"core/navigation-submenu"
];
-function getPostDataFields(select, context, clientId) {
- const { getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
- const { getBlockAttributes, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
- let entityDataValues, dataFields;
- const blockName = getBlockName?.(clientId);
- const isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes(blockName);
- let postId, postType;
- if (isNavigationBlock) {
- const blockAttributes = getBlockAttributes?.(clientId);
- postId = blockAttributes?.id;
- postType = blockAttributes?.type;
- } else {
- postId = context?.postId;
- postType = context?.postType;
+const postDataFields = [
+ {
+ label: (0,external_wp_i18n_namespaceObject.__)("Post Date"),
+ args: { field: "date" },
+ type: "string"
+ },
+ {
+ label: (0,external_wp_i18n_namespaceObject.__)("Post Modified Date"),
+ args: { field: "modified" },
+ type: "string"
+ },
+ {
+ label: (0,external_wp_i18n_namespaceObject.__)("Post Link"),
+ args: { field: "link" },
+ type: "string"
}
- if (postType && postId) {
- entityDataValues = getEditedEntityRecord(
+];
+var post_data_default = {
+ name: "core/post-data",
+ getValues({ select, context, bindings, clientId }) {
+ const allowedFields = postDataFields.map(
+ (field) => field.args.field
+ );
+ const { getBlockAttributes, getBlockName } = select(external_wp_blockEditor_namespaceObject.store);
+ const blockName = getBlockName?.(clientId);
+ const isNavigationBlock = NAVIGATION_BLOCK_TYPES.includes(blockName);
+ let postId, postType;
+ if (isNavigationBlock) {
+ const blockAttributes = getBlockAttributes?.(clientId);
+ postId = blockAttributes?.id;
+ postType = blockAttributes?.type;
+ } else {
+ postId = context?.postId;
+ postType = context?.postType;
+ }
+ const { getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
+ const entityDataValues = getEditedEntityRecord(
"postType",
postType,
postId
);
- dataFields = {
- date: {
- label: (0,external_wp_i18n_namespaceObject.__)("Post Date"),
- value: entityDataValues?.date,
- type: "string"
- },
- modified: {
- label: (0,external_wp_i18n_namespaceObject.__)("Post Modified Date"),
- value: entityDataValues?.modified,
- type: "string"
- },
- link: {
- label: (0,external_wp_i18n_namespaceObject.__)("Post Link"),
- value: entityDataValues?.link,
- type: "string"
- }
- };
- }
- if (!Object.keys(dataFields || {}).length) {
- return null;
- }
- return dataFields;
-}
-var post_data_default = {
- name: "core/post-data",
- getValues({ select, context, bindings, clientId }) {
- const dataFields = getPostDataFields(select, context, clientId);
const newValues = {};
- for (const [attributeName, source] of Object.entries(bindings)) {
- const fieldKey = source.args.field;
- const { value: fieldValue, label: fieldLabel } = dataFields?.[fieldKey] || {};
- newValues[attributeName] = fieldValue ?? fieldLabel ?? fieldKey;
+ for (const [attributeName, binding] of Object.entries(bindings)) {
+ if (!allowedFields.includes(binding.args.field)) {
+ newValues[attributeName] = {};
+ continue;
+ }
+ newValues[attributeName] = entityDataValues?.[binding.args.field] ?? postDataFields.find(
+ (field) => field.args.field === binding.args.field
+ ).label;
}
return newValues;
},
@@ -30893,7 +31003,7 @@ var post_data_default = {
newData
);
},
- canUserEditValue({ select, context, args }) {
+ canUserEditValue({ select, context }) {
const { getBlockName, getSelectedBlockClientId } = select(external_wp_blockEditor_namespaceObject.store);
const clientId = getSelectedBlockClientId();
const blockName = getBlockName?.(clientId);
@@ -30906,10 +31016,6 @@ var post_data_default = {
if (!context?.postType) {
return false;
}
- const fieldValue = getPostDataFields(select, context, void 0)?.[args.field]?.value;
- if (fieldValue === void 0) {
- return false;
- }
const canUserEdit = select(external_wp_coreData_namespaceObject.store).canUser("update", {
kind: "postType",
name: context?.postType,
@@ -30920,7 +31026,7 @@ var post_data_default = {
}
return true;
},
- getFieldsList({ select, context }) {
+ getFieldsList({ select }) {
const selectedBlock = select(external_wp_blockEditor_namespaceObject.store).getSelectedBlock();
if (selectedBlock?.name !== "core/post-date") {
return [];
@@ -30928,16 +31034,7 @@ var post_data_default = {
if (NAVIGATION_BLOCK_TYPES.includes(selectedBlock?.name)) {
return [];
}
- const clientId = select(external_wp_blockEditor_namespaceObject.store).getSelectedBlockClientId();
- const postDataFields = getPostDataFields(select, context, clientId);
- if (!postDataFields) {
- return [];
- }
- return Object.entries(postDataFields).map(([key, field]) => ({
- label: field.label,
- type: field.type,
- args: { field: key }
- }));
+ return postDataFields;
}
};
@@ -30947,45 +31044,51 @@ var post_data_default = {
function getPostMetaFields(select, context) {
- const { getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
const { getRegisteredPostMeta } = unlock(select(external_wp_coreData_namespaceObject.store));
- let entityMetaValues;
- if (context?.postType && context?.postId) {
- entityMetaValues = getEditedEntityRecord(
- "postType",
- context?.postType,
- context?.postId
- ).meta;
- }
const registeredFields = getRegisteredPostMeta(context?.postType);
- const metaFields = {};
- Object.entries(registeredFields || {}).forEach(([key, props]) => {
- if (key !== "footnotes" && key.charAt(0) !== "_") {
- metaFields[key] = {
- label: props.title || key,
- value: (
- // When using the entity value, an empty string IS a valid value.
- entityMetaValues?.[key] ?? // When using the default, an empty string IS NOT a valid value.
- (props.default || void 0)
- ),
- type: props.type
- };
+ const metaFields = [];
+ Object.entries(registeredFields).forEach(([key, props]) => {
+ if (key === "footnotes" || key.charAt(0) === "_") {
+ return;
}
+ metaFields.push({
+ label: props.title || key,
+ args: { key },
+ default: props.default,
+ type: props.type
+ });
});
- if (!Object.keys(metaFields || {}).length) {
- return null;
- }
return metaFields;
}
+function getValue({ select, context, args }) {
+ const metaFields = getPostMetaFields(select, context);
+ const metaField = metaFields.find(
+ (field) => field.args.key === args.key
+ );
+ if (!metaField) {
+ return args.key;
+ }
+ if (!context?.postId) {
+ return metaField.default || metaField.label || args.key;
+ }
+ const { getEditedEntityRecord } = select(external_wp_coreData_namespaceObject.store);
+ const entityMetaValues = getEditedEntityRecord(
+ "postType",
+ context?.postType,
+ context?.postId
+ ).meta;
+ return entityMetaValues?.[args.key] ?? metaField?.label ?? args.key;
+}
var post_meta_default = {
name: "core/post-meta",
getValues({ select, context, bindings }) {
- const metaFields = getPostMetaFields(select, context);
const newValues = {};
- for (const [attributeName, source] of Object.entries(bindings)) {
- const fieldKey = source.args.key;
- const { value: fieldValue, label: fieldLabel } = metaFields?.[fieldKey] || {};
- newValues[attributeName] = fieldValue ?? fieldLabel ?? fieldKey;
+ for (const [attributeName, binding] of Object.entries(bindings)) {
+ newValues[attributeName] = getValue({
+ select,
+ context,
+ args: binding.args
+ });
}
return newValues;
},
@@ -31010,8 +31113,11 @@ var post_meta_default = {
if (!context?.postType) {
return false;
}
- const fieldValue = getPostMetaFields(select, context)?.[args.key]?.value;
- if (fieldValue === void 0) {
+ const metaFields = getPostMetaFields(select, context);
+ const hasMatchingMetaField = metaFields.some(
+ (field) => field.args.key === args.key
+ );
+ if (!hasMatchingMetaField) {
return false;
}
const areCustomFieldsEnabled = select(store_store).getEditorSettings().enableCustomFields;
@@ -31030,14 +31136,11 @@ var post_meta_default = {
},
getFieldsList({ select, context }) {
const metaFields = getPostMetaFields(select, context);
- if (!metaFields) {
- return [];
- }
- return Object.entries(metaFields).map(([key, field]) => ({
- label: field.label,
- type: field.type,
- args: { key }
- }));
+ return metaFields.map(
+ ({ default: defaultProp, ...otherProps }) => ({
+ ...otherProps
+ })
+ );
}
};
diff --git a/wp-includes/js/dist/editor.min.js b/wp-includes/js/dist/editor.min.js
index 123120dfe6..8b293e8210 100644
--- a/wp-includes/js/dist/editor.min.js
+++ b/wp-includes/js/dist/editor.min.js
@@ -4,11 +4,11 @@
autosize 4.0.4
license: MIT
http://www.jacklmoore.com/autosize
-*/n=[e,t],s=function(e,t){"use strict";var s,n,o="function"==typeof Map?new Map:(s=[],n=[],{has:function(e){return s.indexOf(e)>-1},get:function(e){return n[s.indexOf(e)]},set:function(e,t){-1===s.indexOf(e)&&(s.push(e),n.push(t))},delete:function(e){var t=s.indexOf(e);t>-1&&(s.splice(t,1),n.splice(t,1))}}),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,s=null,n=null,i=function(){e.clientWidth!==s&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(s){e.style[s]=t[s]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:p}),l()}function l(){var s=window.getComputedStyle(e,null);"vertical"===s.resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var s=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=s,e.style.overflowY=t}function d(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function u(){if(0!==e.scrollHeight){var n=d(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",s=e.clientWidth,n.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function p(){u();var t=Math.round(parseFloat(e.style.height)),s=window.getComputedStyle(e,null),o="content-box"===s.boxSizing?Math.round(parseFloat(s.height)):e.offsetHeight;if(o<t?"hidden"===s.overflowY&&(c("scroll"),u(),o="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==s.overflowY&&(c("hidden"),u(),o="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),n!==o){n=o;var i=r("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(o="function"==typeof s?s.apply(t,n):s)||(e.exports=o)},4462:function(e,t,s){"use strict";var n,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},function(e,t){function s(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}),r=this&&this.__assign||Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var o in t=arguments[s])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(s[n[o]]=e[n[o]])}return s};t.__esModule=!0;var a=s(1609),l=s(5826),c=s(4306),d=s(461),u="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:d(t.textarea)})},t.onChange=function(e){var s=t.props.onChange;t.currentValue=e.currentTarget.value,s&&s(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,s=t.maxRows,n=t.async;"number"==typeof s&&this.updateLineHeight(),"number"==typeof s||n?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(u,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(u,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,s=(t.onResize,t.maxRows),n=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,d=s&&c?c*s:null;return a.createElement("textarea",r({},l,{onChange:this.onChange,style:d?r({},n,{maxHeight:d}):n,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,r({},e,{innerRef:t}))}))},5215:e=>{"use strict";e.exports=function e(t,s){if(t===s)return!0;if(t&&s&&"object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;var n,o,r;if(Array.isArray(t)){if((n=t.length)!=s.length)return!1;for(o=n;0!=o--;)if(!e(t[o],s[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(s,r[o]))return!1;for(o=n;0!=o--;){var i=r[o];if(!e(t[i],s[i]))return!1}return!0}return t!=t&&s!=s}},5826:(e,t,s)=>{e.exports=s(628)()},6109:e=>{e.exports=function(e,t,s){return((s=window.getComputedStyle)?s(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},s=Object.keys(t).join("|"),n=new RegExp(s,"g"),o=new RegExp(s,"");function r(e){return t[e]}var i=function(e){return e.replace(n,r)};e.exports=i,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=i}},t={};function s(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";s.r(n),s.d(n,{AlignmentToolbar:()=>Zh,Autocomplete:()=>Wh,AutosaveMonitor:()=>Lc,BlockAlignmentToolbar:()=>Yh,BlockControls:()=>qh,BlockEdit:()=>Kh,BlockEditorKeyboardShortcuts:()=>Qh,BlockFormatControls:()=>Xh,BlockIcon:()=>Jh,BlockInspector:()=>eg,BlockList:()=>tg,BlockMover:()=>sg,BlockNavigationDropdown:()=>ng,BlockSelectionClearer:()=>og,BlockSettingsMenu:()=>rg,BlockTitle:()=>ig,BlockToolbar:()=>ag,CharacterCount:()=>Lh,ColorPalette:()=>lg,ContrastChecker:()=>cg,CopyHandler:()=>dg,DefaultBlockAppender:()=>ug,DocumentBar:()=>Hc,DocumentOutline:()=>Jc,DocumentOutlineCheck:()=>ed,EditorHistoryRedo:()=>od,EditorHistoryUndo:()=>rd,EditorKeyboardShortcuts:()=>Cl,EditorKeyboardShortcutsRegister:()=>td,EditorNotices:()=>ad,EditorProvider:()=>Ml,EditorSnackbars:()=>cd,EntitiesSavedStates:()=>bd,ErrorBoundary:()=>Sd,FontSizePicker:()=>pg,InnerBlocks:()=>hg,Inserter:()=>mg,InspectorAdvancedControls:()=>gg,InspectorControls:()=>_g,LocalAutosaveMonitor:()=>jd,MediaPlaceholder:()=>wg,MediaUpload:()=>Sg,MediaUploadCheck:()=>kg,MultiSelectScrollIntoView:()=>Cg,NavigableToolbar:()=>Pg,ObserveTyping:()=>jg,PageAttributesCheck:()=>Ed,PageAttributesOrder:()=>Id,PageAttributesPanel:()=>$d,PageAttributesParent:()=>Ud,PageTemplate:()=>su,PanelColorSettings:()=>fg,PlainText:()=>bg,PluginBlockSettingsMenuItem:()=>gu,PluginDocumentSettingPanel:()=>hu,PluginMoreMenuItem:()=>_u,PluginPostPublishPanel:()=>xu,PluginPostStatusInfo:()=>ku,PluginPrePublishPanel:()=>Eu,PluginPreviewMenuItem:()=>Tu,PluginSidebar:()=>Bu,PluginSidebarMoreMenuItem:()=>Iu,PostAuthor:()=>$u,PostAuthorCheck:()=>Wu,PostAuthorPanel:()=>Yu,PostComments:()=>Ku,PostDiscussionPanel:()=>tp,PostExcerpt:()=>sp,PostExcerptCheck:()=>np,PostExcerptPanel:()=>dp,PostFeaturedImage:()=>vp,PostFeaturedImageCheck:()=>hp,PostFeaturedImagePanel:()=>Sp,PostFormat:()=>Pp,PostFormatCheck:()=>kp,PostLastRevision:()=>Bp,PostLastRevisionCheck:()=>jp,PostLastRevisionPanel:()=>Ip,PostLockedModal:()=>Np,PostPendingStatus:()=>Dp,PostPendingStatusCheck:()=>Rp,PostPingbacks:()=>Qu,PostPreviewButton:()=>Ap,PostPublishButton:()=>Fp,PostPublishButtonLabel:()=>Mp,PostPublishPanel:()=>Zm,PostSavedState:()=>sh,PostSchedule:()=>im,PostScheduleCheck:()=>nh,PostScheduleLabel:()=>lm,PostSchedulePanel:()=>rh,PostSticky:()=>Qm,PostStickyCheck:()=>Km,PostSwitchToDraftButton:()=>ih,PostSyncStatus:()=>ah,PostTaxonomies:()=>ch,PostTaxonomiesCheck:()=>dh,PostTaxonomiesFlatTermSelector:()=>vm,PostTaxonomiesHierarchicalTermSelector:()=>Rm,PostTaxonomiesPanel:()=>ph,PostTemplatePanel:()=>Fu,PostTextEditor:()=>hh,PostTitle:()=>xh,PostTitleRaw:()=>vh,PostTrash:()=>Sh,PostTrashCheck:()=>wh,PostTypeSupportCheck:()=>Td,PostURL:()=>kh,PostURLCheck:()=>Ch,PostURLLabel:()=>Ph,PostURLPanel:()=>Eh,PostVisibility:()=>Up,PostVisibilityCheck:()=>Ih,PostVisibilityLabel:()=>Hp,RichText:()=>$h,RichTextShortcut:()=>yg,RichTextToolbarButton:()=>xg,ServerSideRender:()=>Uh(),SkipToSelectedBlock:()=>Eg,TableOfContents:()=>Fh,TextEditorGlobalKeyboardShortcuts:()=>Gg,ThemeSupportCheck:()=>mp,TimeToRead:()=>Mh,URLInput:()=>Tg,URLInputButton:()=>Bg,URLPopover:()=>Ig,UnsavedChangesWarning:()=>Vh,VisualEditorGlobalKeyboardShortcuts:()=>Hg,Warning:()=>Ng,WordCount:()=>Dh,WritingFlow:()=>Rg,__unstableRichTextInputEvent:()=>vg,cleanForSlug:()=>$g,createCustomColorsHOC:()=>Dg,getColorClassName:()=>Ag,getColorObjectByAttributeValues:()=>Mg,getColorObjectByColorValue:()=>Lg,getFontSize:()=>Og,getFontSizeClass:()=>Fg,getTemplatePartIcon:()=>U,mediaUpload:()=>xi,privateApis:()=>qy,registerEntityAction:()=>Ky,registerEntityField:()=>Xy,store:()=>xc,storeConfig:()=>yc,transformStyles:()=>g.transformStyles,unregisterEntityAction:()=>Qy,unregisterEntityField:()=>Jy,useEntitiesSavedStatesIsDirty:()=>_d,usePostScheduleLabel:()=>cm,usePostURLLabel:()=>jh,usePostVisibilityLabel:()=>Gp,userAutocompleter:()=>wc,withColorContext:()=>Vg,withColors:()=>zg,withFontSizes:()=>Ug});var e={};s.r(e),s.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>ls,__experimentalGetDefaultTemplateType:()=>cs,__experimentalGetDefaultTemplateTypes:()=>as,__experimentalGetTemplateInfo:()=>ds,__unstableIsEditorReady:()=>et,canInsertBlockType:()=>ns,canUserUseUnfilteredHTML:()=>$e,didPostSaveRequestFail:()=>Ee,didPostSaveRequestSucceed:()=>je,getActivePostLock:()=>Ge,getAdjacentBlockClientId:()=>Et,getAutosaveAttribute:()=>me,getBlock:()=>mt,getBlockAttributes:()=>pt,getBlockCount:()=>yt,getBlockHierarchyRootClientId:()=>jt,getBlockIndex:()=>Ut,getBlockInsertionPoint:()=>Xt,getBlockListSettings:()=>is,getBlockMode:()=>qt,getBlockName:()=>dt,getBlockOrder:()=>zt,getBlockRootClientId:()=>Pt,getBlockSelectionEnd:()=>vt,getBlockSelectionStart:()=>xt,getBlocks:()=>ht,getBlocksByClientId:()=>bt,getClientIdsOfDescendants:()=>gt,getClientIdsWithDescendants:()=>_t,getCurrentPost:()=>ne,getCurrentPostAttribute:()=>de,getCurrentPostId:()=>re,getCurrentPostLastRevisionId:()=>le,getCurrentPostRevisionsCount:()=>ae,getCurrentPostType:()=>oe,getCurrentTemplateId:()=>ie,getDeviceType:()=>nt,getEditedPostAttribute:()=>pe,getEditedPostContent:()=>Re,getEditedPostPreviewLink:()=>Ie,getEditedPostSlug:()=>Le,getEditedPostVisibility:()=>he,getEditorBlocks:()=>Ze,getEditorMode:()=>it,getEditorSelection:()=>Je,getEditorSelectionEnd:()=>Xe,getEditorSelectionStart:()=>Qe,getEditorSettings:()=>tt,getFirstMultiSelectedBlockClientId:()=>Dt,getGlobalBlockCount:()=>ft,getInserterItems:()=>os,getLastMultiSelectedBlockClientId:()=>At,getMultiSelectedBlockClientIds:()=>Nt,getMultiSelectedBlocks:()=>Rt,getMultiSelectedBlocksEndClientId:()=>Vt,getMultiSelectedBlocksStartClientId:()=>Ft,getNextBlockClientId:()=>Bt,getPermalink:()=>Me,getPermalinkParts:()=>Oe,getPostEdits:()=>ce,getPostLockUser:()=>He,getPostTypeLabel:()=>us,getPreviousBlockClientId:()=>Tt,getRenderingMode:()=>st,getSelectedBlock:()=>Ct,getSelectedBlockClientId:()=>kt,getSelectedBlockCount:()=>wt,getSelectedBlocksInitialCaretPosition:()=>It,getStateBeforeOptimisticTransaction:()=>at,getSuggestedPostFormat:()=>Ne,getTemplate:()=>ts,getTemplateLock:()=>ss,hasChangedContent:()=>J,hasEditorRedo:()=>Q,hasEditorUndo:()=>K,hasInserterItems:()=>rs,hasMultiSelection:()=>Wt,hasNonPostEntityChanges:()=>te,hasSelectedBlock:()=>St,hasSelectedInnerBlock:()=>Gt,inSomeHistory:()=>lt,isAncestorMultiSelected:()=>Ot,isAutosavingPost:()=>Te,isBlockInsertionPointVisible:()=>Jt,isBlockMultiSelected:()=>Lt,isBlockSelected:()=>Ht,isBlockValid:()=>ut,isBlockWithinSelection:()=>$t,isCaretWithinFormattedText:()=>Qt,isCleanNewPost:()=>se,isCurrentPostPending:()=>ge,isCurrentPostPublished:()=>_e,isCurrentPostScheduled:()=>fe,isDeletingPost:()=>ke,isEditedPostAutosaveable:()=>ve,isEditedPostBeingScheduled:()=>we,isEditedPostDateFloating:()=>Se,isEditedPostDirty:()=>ee,isEditedPostEmpty:()=>xe,isEditedPostNew:()=>X,isEditedPostPublishable:()=>be,isEditedPostSaveable:()=>ye,isEditorPanelEnabled:()=>qe,isEditorPanelOpened:()=>Ke,isEditorPanelRemoved:()=>Ye,isFirstMultiSelectedBlock:()=>Mt,isInserterOpened:()=>rt,isListViewOpened:()=>ot,isMultiSelecting:()=>Zt,isPermalinkEditable:()=>Ae,isPostAutosavingLocked:()=>ze,isPostLockTakeover:()=>Ue,isPostLocked:()=>Fe,isPostSavingLocked:()=>Ve,isPreviewingPost:()=>Be,isPublishSidebarEnabled:()=>We,isPublishSidebarOpened:()=>ps,isPublishingPost:()=>De,isSavingNonPostEntityChanges:()=>Pe,isSavingPost:()=>Ce,isSelectionEnabled:()=>Yt,isTyping:()=>Kt,isValidTemplate:()=>es});var t={};s.r(t),s.d(t,{__experimentalTearDownEditor:()=>vs,__unstableSaveForPreview:()=>Is,autosave:()=>Bs,clearSelectedBlock:()=>hn,closePublishSidebar:()=>sn,createUndoLevel:()=>Ds,disablePublishSidebar:()=>Ls,editPost:()=>Ps,enablePublishSidebar:()=>Ms,enterFormattedText:()=>Rn,exitFormattedText:()=>Dn,hideInsertionPoint:()=>kn,insertBlock:()=>vn,insertBlocks:()=>wn,insertDefaultBlock:()=>An,lockPostAutosaving:()=>Vs,lockPostSaving:()=>Os,mergeBlocks:()=>jn,moveBlockToPosition:()=>xn,moveBlocksDown:()=>bn,moveBlocksUp:()=>yn,multiSelect:()=>mn,openPublishSidebar:()=>tn,receiveBlocks:()=>an,redo:()=>Ns,refreshPost:()=>Es,removeBlock:()=>Tn,removeBlocks:()=>En,removeEditorPanel:()=>Ys,replaceBlock:()=>fn,replaceBlocks:()=>_n,resetBlocks:()=>rn,resetEditorBlocks:()=>Us,resetPost:()=>ws,savePost:()=>js,selectBlock:()=>dn,setDeviceType:()=>$s,setEditedPost:()=>Cs,setIsInserterOpened:()=>qs,setIsListViewOpened:()=>Ks,setRenderingMode:()=>Gs,setTemplateValidity:()=>Cn,setupEditor:()=>xs,setupEditorState:()=>ks,showInsertionPoint:()=>Sn,startMultiSelect:()=>un,startTyping:()=>In,stopMultiSelect:()=>pn,stopTyping:()=>Nn,switchEditorMode:()=>en,synchronizeTemplate:()=>Pn,toggleBlockMode:()=>Bn,toggleDistractionFree:()=>Qs,toggleEditorPanelEnabled:()=>Ws,toggleEditorPanelOpened:()=>Zs,togglePublishSidebar:()=>nn,toggleSelection:()=>gn,toggleSpotlightMode:()=>Xs,toggleTopToolbar:()=>Js,trashPost:()=>Ts,undo:()=>Rs,unlockPostAutosaving:()=>zs,unlockPostSaving:()=>Fs,updateBlock:()=>ln,updateBlockAttributes:()=>cn,updateBlockListSettings:()=>Mn,updateEditorSettings:()=>Hs,updatePost:()=>Ss,updatePostLock:()=>As});var o={};s.r(o),s.d(o,{closeModal:()=>va,disableComplementaryArea:()=>ha,enableComplementaryArea:()=>ma,openModal:()=>xa,pinItem:()=>ga,setDefaultComplementaryArea:()=>pa,setFeatureDefaults:()=>ya,setFeatureValue:()=>ba,toggleFeature:()=>fa,unpinItem:()=>_a});var r={};s.r(r),s.d(r,{getActiveComplementaryArea:()=>wa,isComplementaryAreaLoading:()=>Sa,isFeatureActive:()=>Ca,isItemPinned:()=>ka,isModalActive:()=>Pa});var i={};s.r(i),s.d(i,{ActionItem:()=>Ra,ComplementaryArea:()=>za,ComplementaryAreaMoreMenuItem:()=>Aa,FullscreenMode:()=>Ua,InterfaceSkeleton:()=>Za,PinnedItems:()=>La,store:()=>Ea});var a={};s.r(a),s.d(a,{createTemplate:()=>Yl,hideBlockTypes:()=>Kl,registerEntityAction:()=>zl,registerEntityField:()=>Hl,registerPostTypeSchema:()=>Wl,removeTemplates:()=>Jl,revertTemplate:()=>Xl,saveDirtyEntities:()=>Ql,setCurrentTemplateId:()=>Zl,setDefaultRenderingMode:()=>ec,setIsReady:()=>$l,showBlockTypes:()=>ql,unregisterEntityAction:()=>Ul,unregisterEntityField:()=>Gl});var l={};s.r(l),s.d(l,{getDefaultRenderingMode:()=>bc,getEntityActions:()=>hc,getEntityFields:()=>_c,getInserter:()=>lc,getInserterSidebarToggleRef:()=>dc,getListViewToggleRef:()=>cc,getPostBlocksByName:()=>fc,getPostIcon:()=>pc,hasPostMetaChanges:()=>mc,isEntityReady:()=>gc});const c=window.ReactJSXRuntime,d=window.wp.data,u=window.wp.coreData,p=window.wp.element,m=window.wp.compose,h=window.wp.hooks,g=window.wp.blockEditor,_={...g.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var f=(0,d.combineReducers)({actions:function(e={},t){switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.config.id)),t.config]}};case"UNREGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.actionId))}}}return e},fields:function(e={},t){switch(t.type){case"REGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.config.id)),t.config]}};case"UNREGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.fieldId))}}}return e},isReady:function(e={},t){return"SET_IS_READY"===t.type?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}});function b(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}var y=(0,d.combineReducers)({postId:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postId:e},postType:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postType:e},templateId:function(e=null,t){return"SET_CURRENT_TEMPLATE_ID"===t.type?t.id:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:s,...n}=e;return n}}return e},editorSettings:function(e=_,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:s,...n}=e;return n}}return e},renderingMode:function(e="post-only",t){return"SET_RENDERING_MODE"===t.type?t.mode:e},deviceType:function(e="Desktop",t){return"SET_DEVICE_TYPE"===t.type?t.deviceType:e},removedPanels:function(e=[],t){if("REMOVE_PANEL"===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},inserterSidebarToggleRef:function(e={current:null}){return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e},publishSidebarActive:function(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},dataviews:f});const x=window.wp.blocks,v=window.wp.date,w=window.wp.url,S=window.wp.deprecated;var k=s.n(S);const C=window.wp.preferences,P=new Set(["meta"]),j=/%(?:postname|pagename)%/,E=6e4,T=["title","excerpt","content"],B="wp_template",I="wp_template_part",N="wp_block",R="wp_navigation",D="custom",A=["wp_template","wp_template_part"],M=[...A,"wp_block","wp_navigation"],L=window.wp.primitives;var O=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),F=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),V=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),z=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});function U(e){return"header"===e?O:"footer"===e?F:"sidebar"===e?V:z}const H=window.wp.privateApis,{lock:G,unlock:$}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor");var W=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});const Z={},Y=e=>{if(!e)return Z;const{templateTypes:t,templateAreas:s,template:n}=e,{description:o,slug:r,title:i,area:a}=n,{title:l,description:c}=Object.values(t).find((e=>e.slug===r))??Z,d="string"==typeof i?i:i?.rendered,u="string"==typeof o?o:o?.raw,p=s?.map((e=>({...e,icon:U(e.icon)}))),m=p?.find((e=>a===e.area))?.icon||W;return{title:d&&d!==r?d:l||r,description:u||c,icon:m}},q={},K=(0,d.createRegistrySelector)((e=>()=>e(u.store).hasUndo())),Q=(0,d.createRegistrySelector)((e=>()=>e(u.store).hasRedo()));function X(e){return"auto-draft"===ne(e).status}function J(e){return"content"in ce(e)}const ee=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return e(u.store).hasEditsForEntityRecord("postType",s,n)})),te=(0,d.createRegistrySelector)((e=>t=>{const s=e(u.store).__experimentalGetDirtyEntityRecords(),{type:n,id:o}=ne(t);return s.some((e=>"postType"!==e.kind||e.name!==n||e.key!==o))}));function se(e){return!ee(e)&&X(e)}const ne=(0,d.createRegistrySelector)((e=>t=>{const s=re(t),n=oe(t),o=e(u.store).getRawEntityRecord("postType",n,s);return o||q}));function oe(e){return e.postType}function re(e){return e.postId}function ie(e){return e.templateId}function ae(e){return ne(e)._links?.["version-history"]?.[0]?.count??0}function le(e){return ne(e)._links?.["predecessor-version"]?.[0]?.id??null}const ce=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return e(u.store).getEntityRecordEdits("postType",s,n)||q}));function de(e,t){switch(t){case"type":return oe(e);case"id":return re(e);default:const s=ne(e);if(!s.hasOwnProperty(t))break;return b(s[t])}}const ue=(0,d.createSelector)(((e,t)=>{const s=ce(e);return s.hasOwnProperty(t)?{...de(e,t),...s[t]}:de(e,t)}),((e,t)=>[de(e,t),ce(e)[t]]));function pe(e,t){if("content"===t)return Re(e);const s=ce(e);return s.hasOwnProperty(t)?P.has(t)?ue(e,t):s[t]:de(e,t)}const me=(0,d.createRegistrySelector)((e=>(t,s)=>{if(!T.includes(s)&&"preview_link"!==s)return;const n=oe(t);if("wp_template"===n)return!1;const o=re(t),r=e(u.store).getCurrentUser()?.id,i=e(u.store).getAutosave(n,o,r);return i?b(i[s]):void 0}));function he(e){if("private"===pe(e,"status"))return"private";return pe(e,"password")?"password":"public"}function ge(e){return"pending"===ne(e).status}function _e(e,t){const s=t||ne(e);return-1!==["publish","private"].indexOf(s.status)||"future"===s.status&&!(0,v.isInTheFuture)(new Date(Number((0,v.getDate)(s.date))-E))}function fe(e){return"future"===ne(e).status&&!_e(e)}function be(e){const t=ne(e);return ee(e)||-1===["publish","private","future"].indexOf(t.status)}function ye(e){return!Ce(e)&&(!!pe(e,"title")||!!pe(e,"excerpt")||!xe(e)||"native"===p.Platform.OS)}const xe=(0,d.createRegistrySelector)((e=>t=>{const s=re(t),n=oe(t),o=e(u.store).getEditedEntityRecord("postType",n,s);if("function"!=typeof o.content)return!o.content;const r=pe(t,"blocks");if(0===r.length)return!0;if(r.length>1)return!1;const i=r[0].name;return(i===(0,x.getDefaultBlockName)()||i===(0,x.getFreeformContentHandlerName)())&&!Re(t)})),ve=(0,d.createRegistrySelector)((e=>t=>{if(!ye(t))return!1;if(ze(t))return!1;const s=oe(t),n=e(u.store).getPostType(s);if("wp_template"===s||!n?.supports?.autosave)return!1;const o=re(t),r=e(u.store).hasFetchedAutosaves(s,o),i=e(u.store).getCurrentUser()?.id,a=e(u.store).getAutosave(s,o,i);return!!r&&(!a||(!!J(t)||["title","excerpt","meta"].some((e=>b(a[e])!==pe(t,e)))))}));function we(e){const t=pe(e,"date"),s=new Date(Number((0,v.getDate)(t))-E);return(0,v.isInTheFuture)(s)}function Se(e){const t=pe(e,"date"),s=pe(e,"modified"),n=ne(e).status;return("draft"===n||"auto-draft"===n||"pending"===n)&&(t===s||null===t)}function ke(e){return!!e.deleting.pending}function Ce(e){return!!e.saving.pending}const Pe=(0,d.createRegistrySelector)((e=>t=>{const s=e(u.store).__experimentalGetEntitiesBeingSaved(),{type:n,id:o}=ne(t);return s.some((e=>"postType"!==e.kind||e.name!==n||e.key!==o))})),je=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return!e(u.store).getLastEntitySaveError("postType",s,n)})),Ee=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return!!e(u.store).getLastEntitySaveError("postType",s,n)}));function Te(e){return Ce(e)&&Boolean(e.saving.options?.isAutosave)}function Be(e){return Ce(e)&&Boolean(e.saving.options?.isPreview)}function Ie(e){if(e.saving.pending||Ce(e))return;let t=me(e,"preview_link");t&&"draft"!==ne(e).status||(t=pe(e,"link"),t&&(t=(0,w.addQueryArgs)(t,{preview:!0})));const s=pe(e,"featured_media");return t&&s?(0,w.addQueryArgs)(t,{_thumbnail_id:s}):t}const Ne=(0,d.createRegistrySelector)((e=>()=>{const t=e(g.store).getBlocks();if(t.length>2)return null;let s;if(1===t.length&&(s=t[0].name,"core/embed"===s)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?s="core/video":["spotify","soundcloud"].includes(e)&&(s="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(s=t[0].name),s){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}})),Re=(0,d.createRegistrySelector)((e=>t=>{const s=re(t),n=oe(t),o=e(u.store).getEditedEntityRecord("postType",n,s);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return(0,x.__unstableSerializeAndClean)(o.blocks);if(o.content)return o.content}return""}));function De(e){return Ce(e)&&!_e(e)&&"publish"===pe(e,"status")}function Ae(e){const t=pe(e,"permalink_template");return j.test(t)}function Me(e){const t=Oe(e);if(!t)return null;const{prefix:s,postName:n,suffix:o}=t;return Ae(e)?s+n+o:s}function Le(e){return pe(e,"slug")||(0,w.cleanForSlug)(pe(e,"title"))||re(e)}function Oe(e){const t=pe(e,"permalink_template");if(!t)return null;const s=pe(e,"slug")||pe(e,"generated_slug"),[n,o]=t.split(j);return{prefix:n,postName:s,suffix:o}}function Fe(e){return e.postLock.isLocked}function Ve(e){return Object.keys(e.postSavingLock).length>0}function ze(e){return Object.keys(e.postAutosavingLock).length>0}function Ue(e){return e.postLock.isTakeover}function He(e){return e.postLock.user}function Ge(e){return e.postLock.activePostLock}function $e(e){return Boolean(ne(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const We=(0,d.createRegistrySelector)((e=>()=>!!e(C.store).get("core","isPublishSidebarEnabled"))),Ze=(0,d.createSelector)((e=>pe(e,"blocks")||(0,x.parse)(Re(e))),(e=>[pe(e,"blocks"),Re(e)]));function Ye(e,t){return e.removedPanels.includes(t)}const qe=(0,d.createRegistrySelector)((e=>(t,s)=>{const n=e(C.store).get("core","inactivePanels");return!Ye(t,s)&&!n?.includes(s)})),Ke=(0,d.createRegistrySelector)((e=>(t,s)=>{const n=e(C.store).get("core","openPanels");return!!n?.includes(s)}));function Qe(e){return k()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),pe(e,"selection")?.selectionStart}function Xe(e){return k()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),pe(e,"selection")?.selectionEnd}function Je(e){return pe(e,"selection")}function et(e){return!!e.postId}function tt(e){return e.editorSettings}function st(e){return e.renderingMode}const nt=(0,d.createRegistrySelector)((e=>t=>$(e(g.store)).isZoomOut()?"Desktop":t.deviceType));function ot(e){return e.listViewPanel}function rt(e){return!!e.blockInserterPanel}const it=(0,d.createRegistrySelector)((e=>()=>e(C.store).get("core","editorMode")??"visual"));function at(){return k()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function lt(){return k()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function ct(e){return(0,d.createRegistrySelector)((t=>(s,...n)=>(k()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(g.store)[e](...n))))}const dt=ct("getBlockName"),ut=ct("isBlockValid"),pt=ct("getBlockAttributes"),mt=ct("getBlock"),ht=ct("getBlocks"),gt=ct("getClientIdsOfDescendants"),_t=ct("getClientIdsWithDescendants"),ft=ct("getGlobalBlockCount"),bt=ct("getBlocksByClientId"),yt=ct("getBlockCount"),xt=ct("getBlockSelectionStart"),vt=ct("getBlockSelectionEnd"),wt=ct("getSelectedBlockCount"),St=ct("hasSelectedBlock"),kt=ct("getSelectedBlockClientId"),Ct=ct("getSelectedBlock"),Pt=ct("getBlockRootClientId"),jt=ct("getBlockHierarchyRootClientId"),Et=ct("getAdjacentBlockClientId"),Tt=ct("getPreviousBlockClientId"),Bt=ct("getNextBlockClientId"),It=ct("getSelectedBlocksInitialCaretPosition"),Nt=ct("getMultiSelectedBlockClientIds"),Rt=ct("getMultiSelectedBlocks"),Dt=ct("getFirstMultiSelectedBlockClientId"),At=ct("getLastMultiSelectedBlockClientId"),Mt=ct("isFirstMultiSelectedBlock"),Lt=ct("isBlockMultiSelected"),Ot=ct("isAncestorMultiSelected"),Ft=ct("getMultiSelectedBlocksStartClientId"),Vt=ct("getMultiSelectedBlocksEndClientId"),zt=ct("getBlockOrder"),Ut=ct("getBlockIndex"),Ht=ct("isBlockSelected"),Gt=ct("hasSelectedInnerBlock"),$t=ct("isBlockWithinSelection"),Wt=ct("hasMultiSelection"),Zt=ct("isMultiSelecting"),Yt=ct("isSelectionEnabled"),qt=ct("getBlockMode"),Kt=ct("isTyping"),Qt=ct("isCaretWithinFormattedText"),Xt=ct("getBlockInsertionPoint"),Jt=ct("isBlockInsertionPointVisible"),es=ct("isValidTemplate"),ts=ct("getTemplate"),ss=ct("getTemplateLock"),ns=ct("canInsertBlockType"),os=ct("getInserterItems"),rs=ct("hasInserterItems"),is=ct("getBlockListSettings"),as=(0,d.createRegistrySelector)((e=>()=>(k()("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(u.store).getCurrentTheme()?.default_template_types))),ls=(0,d.createRegistrySelector)((e=>(0,d.createSelector)((()=>{k()("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"});return(e(u.store).getCurrentTheme()?.default_template_part_areas||[]).map((e=>({...e,icon:U(e.icon)})))})))),cs=(0,d.createRegistrySelector)((e=>(0,d.createSelector)(((t,s)=>{k()("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});const n=e(u.store).getCurrentTheme()?.default_template_types;return n?Object.values(n).find((e=>e.slug===s))??q:q})))),ds=(0,d.createRegistrySelector)((e=>(0,d.createSelector)(((t,s)=>{if(k()("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!s)return q;const n=e(u.store).getCurrentTheme(),o=n?.default_template_types||[];return Y({template:s,templateAreas:n?.default_template_part_areas||[],templateTypes:o})})))),us=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=e(u.store).getPostType(s);return n?.labels?.singular_name}));function ps(e){return e.publishSidebarActive}const ms=window.wp.a11y,hs=window.wp.apiFetch;var gs=s.n(hs);const _s=window.wp.notices,fs=window.wp.i18n;function bs(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function ys(e,t){window.sessionStorage.removeItem(bs(e,t))}const xs=(e,t,s)=>({dispatch:n})=>{n.setEditedPost(e.type,e.id);if("auto-draft"===e.status&&s){let o;o="content"in t?t.content:e.content.raw;let r=(0,x.parse)(o);r=(0,x.synchronizeBlocksWithTemplate)(r,s),n.resetEditorBlocks(r,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,s])=>s!==(e[t]?.raw??e[t])))&&n.editPost(t)};function vs(){return k()("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function ws(){return k()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function Ss(){return k()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function ks(e){return k()("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),Cs(e.type,e.id)}function Cs(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}const Ps=(e,t)=>({select:s,registry:n})=>{const{id:o,type:r}=s.getCurrentPost();n.dispatch(u.store).editEntityRecord("postType",r,o,e,t)},js=(e={})=>async({select:t,dispatch:s,registry:n})=>{if(!t.isEditedPostSaveable())return;const o=t.getEditedPostContent();e.isAutosave||s.editPost({content:o},{undoIgnore:!0});const r=t.getCurrentPost();let i={id:r.id,...n.select(u.store).getEntityRecordNonTransientEdits("postType",r.type,r.id),content:o};s({type:"REQUEST_POST_UPDATE_START",options:e});let a=!1;try{i=await(0,h.applyFiltersAsync)("editor.preSavePost",i,e)}catch(e){a=e}if(!a)try{await n.dispatch(u.store).saveEntityRecord("postType",r.type,i,e)}catch(e){a=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while updating.")}if(a||(a=n.select(u.store).getLastEntitySaveError("postType",r.type,r.id)),!a)try{await(0,h.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(e){a=e}if(!a)try{await(0,h.doActionAsync)("editor.savePost",{id:r.id,type:r.type},e)}catch(e){a=e}if(s({type:"REQUEST_POST_UPDATE_FINISH",options:e}),e.isAutosave||"wp_template"!==r.type||"number"!=typeof r.id&&!/^\d+$/.test(r.id)||async function({select:e,registry:t}){const s=e.getEditorSettings();if(s.onNavigateToPreviousEntityRecord)return;const{id:n,slug:o}=e.getCurrentPost(),r=await t.select(u.store).getEntityRecord("root","site");if(r.active_templates[o]===n)return;const i=await t.resolveSelect(u.store).getCurrentTheme(),a=i?.default_template_types.find((e=>e.slug===o));await t.dispatch(_s.store).createNotice("info",(0,fs.sprintf)((0,fs.__)('Do you want to activate this "%s" template?'),a?.title??o),{id:"template-activate-notice",actions:[{label:(0,fs.__)("Activate"),onClick:async()=>{await t.dispatch(_s.store).createNotice("info",(0,fs.__)("Activating template…"),{id:"template-activate-notice"});try{const e=await t.select(u.store).getEntityRecord("root","site");await t.dispatch(u.store).saveEntityRecord("root","site",{active_templates:{...e.active_templates,[o]:n}},{throwOnError:!0}),await t.dispatch(_s.store).createSuccessNotice((0,fs.__)("Template activated."),{id:"template-activate-notice"})}catch(e){throw await t.dispatch(_s.store).createErrorNotice((0,fs.__)("Template activation failed."),{id:"template-activate-notice"}),e}}}]})}({select:t,dispatch:s,registry:n}),a){const e=function(e){const{post:t,edits:s,error:n}=e;if(n&&"rest_autosave_no_changes"===n.code)return[];const o=-1!==["publish","private","future"].indexOf(t.status);if("offline_error"===n.code){const e={publish:(0,fs.__)("Publishing failed because you were offline."),private:(0,fs.__)("Publishing failed because you were offline."),future:(0,fs.__)("Scheduling failed because you were offline."),default:(0,fs.__)("Updating failed because you were offline.")};return[!o&&s.status in e?e[s.status]:e.default,{id:"editor-save"}]}const r={publish:(0,fs.__)("Publishing failed."),private:(0,fs.__)("Publishing failed."),future:(0,fs.__)("Scheduling failed."),default:(0,fs.__)("Updating failed.")};let i=!o&&s.status in r?r[s.status]:r.default;return n.message&&!/<\/?[^>]*>/.test(n.message)&&(i=[i,n.message].join(" ")),[i,{id:"editor-save"}]}({post:r,edits:i,error:a});e.length&&n.dispatch(_s.store).createErrorNotice(...e)}else{const s=t.getCurrentPost(),o=function(e){const{previousPost:t,post:s,postType:n}=e;if(e.options?.isAutosave)return[];const o=["publish","private","future"],r=o.includes(t.status),i=o.includes(s.status),a="trash"===s.status&&"trash"!==t.status;let l,c,d=n?.viewable??!1;a?(l=n.labels.item_trashed,d=!1):r||i?r&&!i?(l=n.labels.item_reverted_to_draft,d=!1):l=!r&&i?{publish:n.labels.item_published,private:n.labels.item_published_privately,future:n.labels.item_scheduled}[s.status]:n.labels.item_updated:(l=(0,fs.__)("Draft saved."),c=!0);const u=[];return d&&u.push({label:c?(0,fs.__)("View Preview"):n.labels.view_item,url:s.link,openInNewTab:!0}),[l,{id:"editor-save",type:"snackbar",actions:u}]}({previousPost:r,post:s,postType:await n.resolveSelect(u.store).getPostType(s.type),options:e});o.length&&n.dispatch(_s.store).createSuccessNotice(...o),e.isAutosave||n.dispatch(g.store).__unstableMarkLastChangeAsPersistent()}};function Es(){return k()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const Ts=()=>async({select:e,dispatch:t,registry:s})=>{const n=e.getCurrentPostType(),o=await s.resolveSelect(u.store).getPostType(n),{rest_base:r,rest_namespace:i="wp/v2"}=o;t({type:"REQUEST_POST_DELETE_START"});try{const s=e.getCurrentPost();await gs()({path:`/${i}/${r}/${s.id}`,method:"DELETE"}),await t.savePost()}catch(e){s.dispatch(_s.store).createErrorNotice(...(a={error:e},[a.error.message&&"unknown_error"!==a.error.code?a.error.message:(0,fs.__)("Trashing failed"),{id:"editor-trash-fail"}]))}var a;t({type:"REQUEST_POST_DELETE_FINISH"})},Bs=({local:e=!1,...t}={})=>async({select:s,dispatch:n})=>{const o=s.getCurrentPost();if("wp_template"!==o.type)if(e){const e=s.isEditedPostNew(),t=s.getEditedPostAttribute("title"),n=s.getEditedPostAttribute("content"),r=s.getEditedPostAttribute("excerpt");!function(e,t,s,n,o){window.sessionStorage.setItem(bs(e,t),JSON.stringify({post_title:s,content:n,excerpt:o}))}(o.id,e,t,n,r)}else await n.savePost({isAutosave:!0,...t})},Is=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:s})=>{if((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()){["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await s.savePost({isPreview:!0}):await s.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},Ns=()=>({registry:e})=>{e.dispatch(u.store).redo()},Rs=()=>({registry:e})=>{e.dispatch(u.store).undo()};function Ds(){return k()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function As(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Ms=()=>({registry:e})=>{e.dispatch(C.store).set("core","isPublishSidebarEnabled",!0)},Ls=()=>({registry:e})=>{e.dispatch(C.store).set("core","isPublishSidebarEnabled",!1)};function Os(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Fs(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Vs(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function zs(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Us=(e,t={})=>({select:s,dispatch:n,registry:o})=>{const{__unstableShouldCreateUndoLevel:r,selection:i}=t,a={blocks:e,selection:i};if(!1!==r){const{id:e,type:t}=s.getCurrentPost();if(o.select(u.store).getEditedEntityRecord("postType",t,e).blocks===a.blocks)return void o.dispatch(u.store).__unstableCreateUndoLevel("postType",t,e);a.content=({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e)}n.editPost(a)};function Hs(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Gs=e=>({dispatch:t,registry:s,select:n})=>{n.__unstableIsEditorReady()&&!n.getEditorSettings().isPreviewMode&&(s.dispatch(g.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:"SET_RENDERING_MODE",mode:e})};function $s(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}const Ws=e=>({registry:t})=>{const s=t.select(C.store).get("core","inactivePanels")??[];let n;n=!!s?.includes(e)?s.filter((t=>t!==e)):[...s,e],t.dispatch(C.store).set("core","inactivePanels",n)},Zs=e=>({registry:t})=>{const s=t.select(C.store).get("core","openPanels")??[];let n;n=!!s?.includes(e)?s.filter((t=>t!==e)):[...s,e],t.dispatch(C.store).set("core","openPanels",n)};function Ys(e){return{type:"REMOVE_PANEL",panelName:e}}const qs=e=>({dispatch:t,registry:s})=>{"object"==typeof e&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&$(s.dispatch(g.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function Ks(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const Qs=({createNotice:e=!0}={})=>({dispatch:t,registry:s})=>{const n=s.select(C.store).get("core","distractionFree");n&&s.dispatch(C.store).set("core","fixedToolbar",!1),n||s.batch((()=>{s.dispatch(C.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),$(s.dispatch(g.store)).resetZoomLevel()})),s.batch((()=>{s.dispatch(C.store).set("core","distractionFree",!n),e&&s.dispatch(_s.store).createInfoNotice(n?(0,fs.__)("Distraction free mode deactivated."):(0,fs.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,fs.__)("Undo"),onClick:()=>{s.batch((()=>{s.dispatch(C.store).set("core","fixedToolbar",n),s.dispatch(C.store).toggle("core","distractionFree")}))}}]})}))},Xs=()=>({registry:e})=>{e.dispatch(C.store).toggle("core","focusMode");const t=e.select(C.store).get("core","focusMode");e.dispatch(_s.store).createInfoNotice(t?(0,fs.__)("Spotlight mode activated."):(0,fs.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,fs.__)("Undo"),onClick:()=>{e.dispatch(C.store).toggle("core","focusMode")}}]})},Js=()=>({registry:e})=>{e.dispatch(C.store).toggle("core","fixedToolbar");const t=e.select(C.store).get("core","fixedToolbar");e.dispatch(_s.store).createInfoNotice(t?(0,fs.__)("Top toolbar activated."):(0,fs.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,fs.__)("Undo"),onClick:()=>{e.dispatch(C.store).toggle("core","fixedToolbar")}}]})},en=e=>({dispatch:t,registry:s})=>{if(s.dispatch(C.store).set("core","editorMode",e),"visual"!==e&&(s.dispatch(g.store).clearSelectedBlock(),$(s.dispatch(g.store)).resetZoomLevel()),"visual"===e)(0,ms.speak)((0,fs.__)("Visual editor selected"),"assertive");else if("text"===e){s.select(C.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,ms.speak)((0,fs.__)("Code editor selected"),"assertive")}};function tn(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function sn(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function nn(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}const on=e=>(...t)=>({registry:s})=>{k()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),s.dispatch(g.store)[e](...t)},rn=on("resetBlocks"),an=on("receiveBlocks"),ln=on("updateBlock"),cn=on("updateBlockAttributes"),dn=on("selectBlock"),un=on("startMultiSelect"),pn=on("stopMultiSelect"),mn=on("multiSelect"),hn=on("clearSelectedBlock"),gn=on("toggleSelection"),_n=on("replaceBlocks"),fn=on("replaceBlock"),bn=on("moveBlocksDown"),yn=on("moveBlocksUp"),xn=on("moveBlockToPosition"),vn=on("insertBlock"),wn=on("insertBlocks"),Sn=on("showInsertionPoint"),kn=on("hideInsertionPoint"),Cn=on("setTemplateValidity"),Pn=on("synchronizeTemplate"),jn=on("mergeBlocks"),En=on("removeBlocks"),Tn=on("removeBlock"),Bn=on("toggleBlockMode"),In=on("startTyping"),Nn=on("stopTyping"),Rn=on("enterFormattedText"),Dn=on("exitFormattedText"),An=on("insertDefaultBlock"),Mn=on("updateBlockListSettings"),Ln=window.wp.htmlEntities;function On(e){return!!e&&(e.source===D&&(Boolean(e?.plugin)||e?.has_theme_file))}const Fn=window.wp.components;function Vn(e){return"wp_template"===e.type||"wp_template_part"===e.type}function zn(e,t=(0,fs.__)("(no title)")){let s="";return"string"==typeof e.title?s=(0,Ln.decodeEntities)(e.title):e.title&&"rendered"in e.title?s=(0,Ln.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(s=(0,Ln.decodeEntities)(e.title.raw)),s||t}const Un={id:"duplicate-post",label:(0,fs._x)("Duplicate","action label"),isEligible:({status:e})=>"trash"!==e,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)({...e[0],title:(0,fs.sprintf)((0,fs._x)("%s (Copy)","post"),zn(e[0]))}),[r,i]=(0,p.useState)(!1),{saveEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:m}=(0,d.useDispatch)(_s.store);return(0,c.jsx)("form",{onSubmit:async function(e){if(e.preventDefault(),r)return;const o="wp_template"===n.type,c={status:o?"publish":"draft",title:n.title,slug:o?n.slug:n.title||(0,fs.__)("No title"),comment_status:n.comment_status,content:"string"==typeof n.content?n.content:n.content.raw,excerpt:"string"==typeof n.excerpt?n.excerpt:n.excerpt?.raw,meta:n.meta,parent:n.parent,password:n.password,template:n.template,format:n.format,featured_media:n.featured_media,menu_order:n.menu_order,ping_status:n.ping_status},d="wp:action-assign-";Object.keys(n?._links||{}).filter((e=>e.startsWith(d))).map((e=>e.slice(17))).forEach((e=>{n.hasOwnProperty(e)&&(c[e]=n[e])})),i(!0);try{const e=await a("postType",n.type,c,{throwOnError:!0});l((0,fs.sprintf)((0,fs.__)('"%s" successfully created.'),zn(e)),{id:"duplicate-post-action",type:"snackbar"}),s&&s([e])}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,fs.__)("An error occurred while duplicating the page.");m(s,{type:"snackbar"})}finally{i(!1),t?.()}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:3,children:["string"==typeof n.id&&(0,c.jsx)("div",{children:(0,fs.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),value:zn(n),onChange:e=>o((t=>({...t,title:e||(0,fs.__)("No title")})))}),(0,c.jsxs)(Fn.__experimentalHStack,{spacing:2,justify:"end",children:[(0,c.jsx)(Fn.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,__next40pxDefaultSize:!0,children:(0,fs._x)("Duplicate","action label")})]})]})})}};var Hn=Un,Gn=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});var $n={id:"view-post",label:(0,fs._x)("View","verb"),isPrimary:!0,icon:Gn,isEligible:e=>"trash"!==e.status,callback(e,{onActionPerformed:t}){const s=e[0];window.open(s?.link,"_blank"),t&&t(e)}};var Wn={id:"view-post-revisions",context:"list",label(e){const t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,fs.sprintf)((0,fs.__)("View revisions (%d)"),t)},isEligible(e){if("trash"===e.status)return!1;return!!(e?._links?.["predecessor-version"]?.[0]?.id??null)&&(e?._links?.["version-history"]?.[0]?.count??0)>1},callback(e,{onActionPerformed:t}){const s=e[0],n=(0,w.addQueryArgs)("revision.php",{revision:s?._links?.["predecessor-version"]?.[0]?.id});document.location.href=n,t&&t(e)}},Zn=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Yn=function(){return Yn=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var o in t=arguments[s])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yn.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function qn(e){return e.toLowerCase()}var Kn=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Qn=/[^A-Z0-9]+/gi;function Xn(e,t,s){return t instanceof RegExp?e.replace(t,s):t.reduce((function(e,t){return e.replace(t,s)}),e)}function Jn(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var s=t.splitRegexp,n=void 0===s?Kn:s,o=t.stripRegexp,r=void 0===o?Qn:o,i=t.transform,a=void 0===i?qn:i,l=t.delimiter,c=void 0===l?" ":l,d=Xn(Xn(e,n,"$1\0$2"),r,"\0"),u=0,p=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(p-1);)p--;return d.slice(u,p).split("\0").map(a).join(c)}(e,Yn({delimiter:"."},t))}function eo(e,t){return void 0===t&&(t={}),Jn(e,Yn({delimiter:"-"},t))}function to(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function so(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function no({modalTitle:e,...t}){const s=(0,d.useSelect)((e=>e(u.store).getPostType("wp_template_part")?.labels?.add_new_item),[]);return(0,c.jsx)(Fn.Modal,{title:e||s,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,c.jsx)(ro,{...t})})}const oo=e=>"header"===e?O:"footer"===e?F:"sidebar"===e?V:z;function ro({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:s=(0,fs.__)("Add"),closeModal:n,onCreate:o,onError:r,defaultTitle:i=""}){const{createErrorNotice:a}=(0,d.useDispatch)(_s.store),{saveEntityRecord:l}=(0,d.useDispatch)(u.store),h=(0,d.useSelect)((e=>e(u.store).getEntityRecords("postType","wp_template_part",{per_page:-1})),[])??[],[g,_]=(0,p.useState)(i),[f,b]=(0,p.useState)(e),[y,v]=(0,p.useState)(!1),w=(0,m.useInstanceId)(no),S=(0,d.useSelect)((e=>e(u.store).getCurrentTheme()?.default_template_part_areas),[]);async function k(){if(g&&!y)try{v(!0);const e=((e,t)=>{const s=e.toLowerCase(),n=t.map((e=>e.title.rendered.toLowerCase()));if(!n.includes(s))return e;let o=2;for(;n.includes(`${s} ${o}`);)o++;return`${e} ${o}`})(g,h),s=(e=>eo(e).replace(/[^\w-]+/g,"")||"wp-custom-part")(e),n=await l("postType","wp_template_part",{slug:s,title:e,content:(0,x.serialize)(t),area:f},{throwOnError:!0});await o(n)}catch(e){const t=e instanceof Error&&"code"in e&&e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while creating the template part.");a(t,{type:"snackbar"}),r?.()}finally{v(!1)}}return(0,c.jsx)("form",{onSubmit:async e=>{e.preventDefault(),await k()},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"4",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,fs.__)("Name"),value:g,onChange:_,required:!0}),(0,c.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,c.jsx)(Fn.BaseControl.VisualLabel,{as:"legend",children:(0,fs.__)("Area")}),(0,c.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(S??[]).map((e=>{const t=oo(e.icon);return(0,c.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,c.jsx)("input",{type:"radio",id:to(e.area,w),name:`fields-create-template-part-modal__area-${w}`,value:e.area,checked:f===e.area,onChange:()=>{b(e.area)},"aria-describedby":so(e.area,w)}),(0,c.jsx)(Fn.Icon,{icon:t,className:"fields-create-template-part-modal__area-radio-icon"}),(0,c.jsx)("label",{htmlFor:to(e.area,w),className:"fields-create-template-part-modal__area-radio-label",children:e.label}),(0,c.jsx)(Fn.Icon,{icon:Zn,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,c.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:so(e.area,w),children:e.description})]},e.area)}))})]}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{n()},children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!g||y,isBusy:y,children:s})]})]})})}const io={id:"duplicate-template-part",label:(0,fs._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"===e.type,modalHeader:(0,fs._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{const[s]=e,n=(0,p.useMemo)((()=>s.blocks??(0,x.parse)("string"==typeof s.content?s.content:s.content.raw,{__unstableSkipMigrationLogs:!0})),[s.content,s.blocks]),{createSuccessNotice:o}=(0,d.useDispatch)(_s.store);return(0,c.jsx)(ro,{blocks:n,defaultArea:s.area,defaultTitle:(0,fs.sprintf)((0,fs._x)("%s (Copy)","template part"),zn(s)),onCreate:function(e){o((0,fs.sprintf)((0,fs._x)('"%s" duplicated.',"template part"),zn(e)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()},onError:t,confirmLabel:(0,fs._x)("Duplicate","action label"),closeModal:t??(()=>{})})}};var ao=io;const lo=window.wp.patterns,{lock:co,unlock:uo}=(0,H.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields"),{CreatePatternModalContents:po,useDuplicatePatternProps:mo}=uo(lo.privateApis),ho={id:"duplicate-pattern",label:(0,fs._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"!==e.type,modalHeader:(0,fs._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{const[s]=e,n=mo({pattern:s,onSuccess:()=>t?.()});return(0,c.jsx)(po,{onClose:t,confirmLabel:(0,fs._x)("Duplicate","action label"),...n})}};var go=ho;const{PATTERN_TYPES:_o}=uo(lo.privateApis),fo={id:"rename-post",label:(0,fs.__)("Rename"),modalFocusOnMount:"firstContentElement",isEligible:e=>"trash"!==e.status&&(["wp_template_part",...Object.values(_o)].includes(e.type)?function(e){return"wp_template_part"===e.type}(e)?"custom"===e.source&&!e?.has_theme_file&&e.permissions?.update:e.type===_o.user&&e.permissions?.update:e.permissions?.update),RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n]=e,[o,r]=(0,p.useState)((()=>zn(n,""))),{editEntityRecord:i,saveEditedEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:m}=(0,d.useDispatch)(_s.store);return(0,c.jsx)("form",{onSubmit:async function(c){c.preventDefault();try{await i("postType",n.type,n.id,{title:o}),r(""),t?.(),await a("postType",n.type,n.id,{throwOnError:!0}),l((0,fs.__)("Name updated"),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,fs.__)("An error occurred while updating the name");m(s,{type:"snackbar"})}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)("Name"),value:o,onChange:r,required:!0}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,fs.__)("Save")})]})]})})}};var bo=fo;const yo={id:"order-pages",label:(0,fs.__)("Order"),isEligible:({status:e})=>"trash"!==e,modalFocusOnMount:"firstContentElement",RenderModal:function({items:e,closeModal:t,onActionPerformed:s}){const[n,o]=(0,p.useState)(e[0]),{editEntityRecord:r,saveEditedEntityRecord:i}=(0,d.useDispatch)(u.store),{createSuccessNotice:a,createErrorNotice:l}=(0,d.useDispatch)(_s.store),m=function(e){return"number"==typeof e.menu_order&&Number.isInteger(e.menu_order)&&e.menu_order>0}(n);return(0,c.jsx)("form",{onSubmit:async function(o){if(o.preventDefault(),m)try{await r("postType",n.type,n.id,{menu_order:n.menu_order}),t?.(),await i("postType",n.type,n.id,{throwOnError:!0}),a((0,fs.__)("Order updated."),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,fs.__)("An error occurred while updating the order");l(s,{type:"snackbar"})}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)("div",{children:(0,fs.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,fs.__)("Order"),type:"number",value:"number"==typeof n.menu_order&&Number.isInteger(n.menu_order)?String(n.menu_order):"",onChange:e=>{const t=parseInt(e,10);o({...n,menu_order:isNaN(t)?void 0:t})}}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!m,children:(0,fs.__)("Save")})]})]})})}};var xo=yo;"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,s){const n=Number(0xffffffffn&t),o=Number(t>>32n);this.setUint32(e+(s?0:4),n,s),this.setUint32(e+(s?4:0),o,s)}});var vo=e=>new DataView(new ArrayBuffer(e)),wo=e=>new Uint8Array(e.buffer||e),So=e=>(new TextEncoder).encode(String(e)),ko=e=>Math.min(4294967295,Number(e)),Co=e=>Math.min(65535,Number(e));function Po(e,t,s){void 0===t||t instanceof Date||(t=new Date(t));const n=void 0!==e;if(s||(s=n?436:509),e instanceof File)return{isFile:n,t:t||new Date(e.lastModified),bytes:e.stream(),mode:s};if(e instanceof Response)return{isFile:n,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),bytes:e.body,mode:s};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(!n)return{isFile:n,t,mode:s};if("string"==typeof e)return{isFile:n,t,bytes:So(e),mode:s};if(e instanceof Blob)return{isFile:n,t,bytes:e.stream(),mode:s};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:n,t,bytes:e,mode:s};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:n,t,bytes:wo(e),mode:s};if(Symbol.asyncIterator in e)return{isFile:n,t,bytes:jo(e[Symbol.asyncIterator]()),mode:s};throw new TypeError("Unsupported input format.")}function jo(e,t=e){return new ReadableStream({async pull(t){let s=0;for(;t.desiredSize>s;){const n=await e.next();if(!n.value){t.close();break}{const e=Eo(n.value);t.enqueue(e),s+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function Eo(e){return"string"==typeof e?So(e):e instanceof Uint8Array?e:wo(e)}function To(e,t,s){let[n,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[wo(e),1]:[So(e),0]:[void 0,0]}(t);if(e instanceof File)return{i:Io(n||So(e.name)),o:BigInt(e.size),u:o};if(e instanceof Response){const t=e.headers.get("content-disposition"),r=t&&t.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),i=r&&r[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),a=i&&decodeURIComponent(i),l=s||+e.headers.get("content-length");return{i:Io(n||So(a)),o:BigInt(l),u:o}}return n=Io(n,void 0!==e||void 0!==s),"string"==typeof e?{i:n,o:BigInt(So(e).length),u:o}:e instanceof Blob?{i:n,o:BigInt(e.size),u:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{i:n,o:BigInt(e.byteLength),u:o}:{i:n,o:Bo(e,s),u:o}}function Bo(e,t){return t>-1?BigInt(t):e?void 0:0n}function Io(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var No=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);No[e]=t}function Ro(e,t=0){t=~t;for(var s=0,n=e.length;s<n;s++)t=t>>>8^No[255&t^e[s]];return~t>>>0}function Do(e,t,s=0){const n=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,o=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(s,n,1),t.setUint16(s+2,o,1)}function Ao({i:e,u:t},s){return 8*(!t||(s??function(e){try{Mo.decode(e)}catch{return 0}return 1}(e)))}var Mo=new TextDecoder("utf8",{fatal:1});function Lo(e,t=0){const s=vo(30);return s.setUint32(0,1347093252),s.setUint32(4,754976768|t),Do(e.t,s,10),s.setUint16(26,e.i.length,1),wo(s)}async function*Oo(e){let{bytes:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.l=Ro(t,0),e.o=BigInt(t.length);else{e.o=0n;const s=t.getReader();for(;;){const{value:t,done:n}=await s.read();if(n)break;e.l=Ro(t,e.l),e.o+=BigInt(t.length),yield t}}}function Fo(e,t){const s=vo(16+(t?8:0));return s.setUint32(0,1347094280),s.setUint32(4,e.isFile?e.l:0,1),t?(s.setBigUint64(8,e.o,1),s.setBigUint64(16,e.o,1)):(s.setUint32(8,ko(e.o),1),s.setUint32(12,ko(e.o),1)),wo(s)}function Vo(e,t,s=0,n=0){const o=vo(46);return o.setUint32(0,1347092738),o.setUint32(4,755182848),o.setUint16(8,2048|s),Do(e.t,o,12),o.setUint32(16,e.isFile?e.l:0,1),o.setUint32(20,ko(e.o),1),o.setUint32(24,ko(e.o),1),o.setUint16(28,e.i.length,1),o.setUint16(30,n,1),o.setUint16(40,e.mode|(e.isFile?32768:16384),1),o.setUint32(42,ko(t),1),wo(o)}function zo(e,t,s){const n=vo(s);return n.setUint16(0,1,1),n.setUint16(2,s-4,1),16&s&&(n.setBigUint64(4,e.o,1),n.setBigUint64(12,e.o,1)),n.setBigUint64(s-8,t,1),wo(n)}function Uo(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified,e.mode]]}function Ho(e,t={}){const s={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(s["Content-Length"]=String(t.length)),t.metadata&&(s["Content-Length"]=String((e=>function(e){let t=BigInt(22),s=0n,n=0;for(const o of e){if(!o.i)throw new Error("Every file must have a non-empty name.");if(void 0===o.o)throw new Error(`Missing size for file "${(new TextDecoder).decode(o.i)}".`);const e=o.o>=0xffffffffn,r=s>=0xffffffffn;s+=BigInt(46+o.i.length+(e&&8))+o.o,t+=BigInt(o.i.length+46+(12*r|28*e)),n||(n=e)}return(n||s>=0xffffffffn)&&(t+=BigInt(76)),t+s}(function*(e){for(const t of e)yield To(...Uo(t)[0])}(e)))(t.metadata))),new Response(Go(e,t),{headers:s})}function Go(e,t={}){const s=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[s,n]=Uo(e.value);return{done:0,value:Object.assign(Po(...n),To(...s))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return jo(async function*(e,t){const s=[];let n=0n,o=0n,r=0;for await(const i of e){const e=Ao(i,t.buffersAreUTF8);yield Lo(i,e),yield new Uint8Array(i.i),i.isFile&&(yield*Oo(i));const a=i.o>=0xffffffffn,l=12*(n>=0xffffffffn)|28*a;yield Fo(i,a),s.push(Vo(i,n,e,l)),s.push(i.i),l&&s.push(zo(i,n,l)),a&&(n+=8n),o++,n+=BigInt(46+i.i.length)+i.o,r||(r=a)}let i=0n;for(const e of s)yield e,i+=BigInt(e.length);if(r||n>=0xffffffffn){const e=vo(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,o,1),e.setBigUint64(32,o,1),e.setBigUint64(40,i,1),e.setBigUint64(48,n,1),e.setUint32(56,1347094023),e.setBigUint64(64,n+i,1),e.setUint32(72,1,1),yield wo(e)}const a=vo(22);a.setUint32(0,1347093766),a.setUint16(8,Co(o),1),a.setUint16(10,Co(o),1),a.setUint32(12,ko(i),1),a.setUint32(16,ko(n),1),yield wo(a)}(s,t),s)}const $o=window.wp.blob;var Wo=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});function Zo(e){return JSON.stringify({__file:e.type,title:zn(e),content:"string"==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var Yo={id:"export-pattern",label:(0,fs.__)("Export as JSON"),icon:Wo,supportsBulk:!0,isEligible:e=>"wp_block"===e.type,callback:async e=>{if(1===e.length)return(0,$o.downloadBlob)(`${eo(zn(e[0])||e[0].slug)}.json`,Zo(e[0]),"application/json");const t={},s=e.map((e=>{const s=eo(zn(e)||e.slug);return t[s]=(t[s]||0)+1,{name:s+(t[s]>1?"-"+(t[s]-1):"")+".json",lastModified:new Date,input:Zo(e)}}));return(0,$o.downloadBlob)((0,fs.__)("patterns-export")+".zip",await Ho(s).blob(),"application/zip")}},qo=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});var Ko={id:"restore",label:(0,fs.__)("Restore"),isPrimary:!0,icon:qo,supportsBulk:!0,isEligible:e=>!Vn(e)&&"wp_block"!==e.type&&"trash"===e.status&&e.permissions?.update,async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:n,createErrorNotice:o}=t.dispatch(_s.store),{editEntityRecord:r,saveEditedEntityRecord:i}=t.dispatch(u.store);await Promise.allSettled(e.map((e=>r("postType",e.type,e.id,{status:"draft"}))));const a=await Promise.allSettled(e.map((e=>i("postType",e.type,e.id,{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let t;t=1===e.length?(0,fs.sprintf)((0,fs.__)('"%s" has been restored.'),zn(e[0])):"page"===e[0].type?(0,fs.sprintf)((0,fs.__)("%d pages have been restored."),e.length):(0,fs.sprintf)((0,fs.__)("%d posts have been restored."),e.length),n(t,{type:"snackbar",id:"restore-post-action"}),s&&s(e)}else{let e;if(1===a.length){const t=a[0];e=t.reason?.message?t.reason.message:(0,fs.__)("An error occurred while restoring the post.")}else{const t=new Set,s=a.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,fs.__)("An error occurred while restoring the posts."):1===t.size?(0,fs.sprintf)((0,fs.__)("An error occurred while restoring the posts: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("Some errors occurred while restoring the posts: %s"),[...t].join(","))}o(e,{type:"snackbar"})}}};const Qo=async(e,{allowUndo:t=!0}={})=>{const s="edit-site-template-reverted";var n;if((0,d.dispatch)(_s.store).removeNotice(s),(n=e)&&"custom"===n.source&&(Boolean(n?.plugin)||n?.has_theme_file))try{const n=(0,d.select)(u.store).getEntityConfig("postType",e.type);if(!n)return void(0,d.dispatch)(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const o=(0,w.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),r=await gs()({path:o});if(!r)return void(0,d.dispatch)(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const i=({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e),a=(0,d.select)(u.store).getEditedEntityRecord("postType",e.type,e.id);(0,d.dispatch)(u.store).editEntityRecord("postType",e.type,e.id,{content:i,blocks:a.blocks,source:"custom"},{undoIgnore:!0});const l=(0,x.parse)(r?.content?.raw);if((0,d.dispatch)(u.store).editEntityRecord("postType",e.type,r.id,{content:i,blocks:l,source:"theme"}),t){const t=()=>{(0,d.dispatch)(u.store).editEntityRecord("postType",e.type,a.id,{content:i,blocks:a.blocks,source:"custom"})};(0,d.dispatch)(_s.store).createSuccessNotice((0,fs.__)("Template reset."),{type:"snackbar",id:s,actions:[{label:(0,fs.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("Template revert failed. Please reload.");(0,d.dispatch)(_s.store).createErrorNotice(t,{type:"snackbar"})}else(0,d.dispatch)(_s.store).createErrorNotice((0,fs.__)("This template is not revertable."),{type:"snackbar"})},Xo={id:"reset-post",label:(0,fs.__)("Reset"),isEligible:e=>"wp_template_part"===e.type&&"custom"===e?.source&&e?.has_theme_file,icon:qo,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),{saveEditedEntityRecord:r}=(0,d.useDispatch)(u.store),{createSuccessNotice:i,createErrorNotice:a}=(0,d.useDispatch)(_s.store);return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Reset to default and clear all customizations?")}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(!0),await(async()=>{try{for(const t of e)await Qo(t,{allowUndo:!1}),await r("postType",t.type,t.id);i(e.length>1?(0,fs.sprintf)((0,fs.__)("%d items reset."),e.length):(0,fs.sprintf)((0,fs.__)('"%s" reset.'),zn(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(t){const s=1===e.length?(0,fs.__)("An error occurred while reverting the template part."):(0,fs.__)("An error occurred while reverting the template parts."),n=t,o=n.message&&"unknown_error"!==n.code?n.message:s;a(o,{type:"snackbar"})}})(),s?.(e),o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,children:(0,fs.__)("Reset")})]})]})}};var Jo=Xo,er=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});function tr(e){const t=new Set;if(1===e.length){const s=e[0];s.reason?.message&&t.add(s.reason.message)}else{const s=e.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}}return t}const{PATTERN_TYPES:sr}=uo(lo.privateApis),nr={id:"delete-post",label:(0,fs.__)("Delete"),isPrimary:!0,icon:er,isEligible:e=>Vn(e)?function(e){return!!e&&[e.source,e.source].includes("custom")&&!Boolean("wp_template"===e.type&&e?.plugin)&&!e.has_theme_file}(e):e.type===sr.user,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),r=e.every((e=>Vn(e)&&e?.has_theme_file));return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:e.length>1?(0,fs.sprintf)((0,fs._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,fs.sprintf)((0,fs._x)('Delete "%s"?',"template part"),zn(e[0]))}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{variant:"primary",onClick:async()=>{o(!0);const n={success:{messages:{getMessage:e=>r?(0,fs.sprintf)((0,fs.__)('"%s" reset.'),(0,Ln.decodeEntities)(zn(e))):(0,fs.sprintf)((0,fs._x)('"%s" deleted.',"template part"),(0,Ln.decodeEntities)(zn(e))),getBatchMessage:()=>r?(0,fs.__)("Items reset."):(0,fs.__)("Items deleted.")}},error:{messages:{getMessage:e=>1===e.size?[...e][0]:r?(0,fs.__)("An error occurred while reverting the item."):(0,fs.__)("An error occurred while deleting the item."),getBatchMessage:e=>0===e.size?r?(0,fs.__)("An error occurred while reverting the items."):(0,fs.__)("An error occurred while deleting the items."):1===e.size?r?(0,fs.sprintf)((0,fs.__)("An error occurred while reverting the items: %s"),[...e][0]):(0,fs.sprintf)((0,fs.__)("An error occurred while deleting the items: %s"),[...e][0]):r?(0,fs.sprintf)((0,fs.__)("Some errors occurred while reverting the items: %s"),[...e].join(",")):(0,fs.sprintf)((0,fs.__)("Some errors occurred while deleting the items: %s"),[...e].join(","))}}};await(async(e,t,s)=>{const{createSuccessNotice:n,createErrorNotice:o}=(0,d.dispatch)(_s.store),{deleteEntityRecord:r}=(0,d.dispatch)(u.store),i=await Promise.allSettled(e.map((e=>r("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(i.every((({status:e})=>"fulfilled"===e))){let o;o=1===i.length?t.success.messages.getMessage(e[0]):t.success.messages.getBatchMessage(e),n(o,{type:t.success.type??"snackbar",id:t.success.id}),s.onActionPerformed?.(e)}else{const e=tr(i);let n="";n=1===i.length?t.error.messages.getMessage(e):t.error.messages.getBatchMessage(e),o(n,{type:t.error.type??"snackbar",id:t.error.id}),s.onActionError?.()}})(e,n,{onActionPerformed:s}),o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Delete")})]})]})}};var or=nr;const rr={id:"move-to-trash",label:(0,fs.__)("Trash"),isPrimary:!0,icon:er,isEligible:e=>"wp_template_part"!==e.type&&"wp_block"!==e.type&&(!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete),supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),{createSuccessNotice:r,createErrorNotice:i}=(0,d.useDispatch)(_s.store),{deleteEntityRecord:a}=(0,d.useDispatch)(u.store);return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:1===e.length?(0,fs.sprintf)((0,fs.__)('Are you sure you want to move "%s" to the trash?'),zn(e[0])):(0,fs.sprintf)((0,fs._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(!0);const n=await Promise.allSettled(e.map((e=>a("postType",e.type,e.id.toString(),{},{throwOnError:!0}))));if(n.every((({status:e})=>"fulfilled"===e))){let t;t=1===n.length?(0,fs.sprintf)((0,fs.__)('"%s" moved to the trash.'),zn(e[0])):(0,fs.sprintf)((0,fs._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),r(t,{type:"snackbar",id:"move-to-trash-action"})}else{let e;if(1===n.length){const t=n[0];e=t.reason?.message?t.reason.message:(0,fs.__)("An error occurred while moving the item to the trash.")}else{const t=new Set,s=n.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,fs.__)("An error occurred while moving the items to the trash."):1===t.size?(0,fs.sprintf)((0,fs.__)("An error occurred while moving the item to the trash: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("Some errors occurred while moving the items to the trash: %s"),[...t].join(","))}i(e,{type:"snackbar"})}s&&s(e),o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,children:(0,fs._x)("Trash","verb")})]})]})}};var ir=rr;const ar={id:"permanently-delete",label:(0,fs.__)("Permanently delete"),supportsBulk:!0,icon:er,isEligible(e){if(Vn(e)||"wp_block"===e.type)return!1;const{status:t,permissions:s}=e;return"trash"===t&&s?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),{createSuccessNotice:r,createErrorNotice:i}=(0,d.useDispatch)(_s.store),{deleteEntityRecord:a}=(0,d.useDispatch)(u.store);return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:e.length>1?(0,fs.sprintf)((0,fs._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length),e.length):(0,fs.sprintf)((0,fs.__)('Are you sure you want to permanently delete "%s"?'),(0,Ln.decodeEntities)(zn(e[0])))}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{variant:"primary",onClick:async()=>{o(!0);const n=await Promise.allSettled(e.map((e=>a("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(n.every((({status:e})=>"fulfilled"===e))){let t;t=1===n.length?(0,fs.sprintf)((0,fs.__)('"%s" permanently deleted.'),zn(e[0])):(0,fs.__)("The items were permanently deleted."),r(t,{type:"snackbar",id:"permanently-delete-post-action"}),s?.(e)}else{let e;if(1===n.length){const t=n[0];e=t.reason?.message?t.reason.message:(0,fs.__)("An error occurred while permanently deleting the item.")}else{const t=new Set,s=n.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,fs.__)("An error occurred while permanently deleting the items."):1===t.size?(0,fs.sprintf)((0,fs.__)("An error occurred while permanently deleting the items: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("Some errors occurred while permanently deleting the items: %s"),[...t].join(","))}i(e,{type:"snackbar"})}o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Delete permanently")})]})]})}};var lr=ar;const cr=window.wp.mediaUtils;var dr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M5 11.25h14v1.5H5z"})});const ur={id:"featured_media",type:"media",label:(0,fs.__)("Featured Image"),Edit:({data:e,field:t,onChange:s})=>{const{id:n}=t,o=t.getValue({item:e}),r=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(u.store);return t("postType","attachment",o)}),[o]),i=(0,p.useCallback)((e=>s({[n]:e})),[n,s]),a=r?.source_url,l=r?.title?.rendered,m=(0,p.useRef)(null);return(0,c.jsx)("fieldset",{className:"fields-controls__featured-image",children:(0,c.jsx)("div",{className:"fields-controls__featured-image-container",children:(0,c.jsx)(cr.MediaUpload,{onSelect:e=>{i(e.id)},allowedTypes:["image"],render:({open:e})=>(0,c.jsx)("div",{ref:m,role:"button",tabIndex:-1,onClick:()=>{e()},onKeyDown:e,children:(0,c.jsxs)(Fn.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr 24px",children:[a&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("img",{className:"fields-controls__featured-image-image",alt:"",width:24,height:24,src:a}),(0,c.jsx)("span",{className:"fields-controls__featured-image-title",children:l})]}),!a&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"fields-controls__featured-image-placeholder",style:{width:"24px",height:"24px"}}),(0,c.jsx)("span",{className:"fields-controls__featured-image-title",children:(0,fs.__)("Choose an image…")})]}),a&&(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Fn.Button,{size:"small",className:"fields-controls__featured-image-remove-button",icon:dr,onClick:e=>{e.stopPropagation(),i(0)}})})]})})})})})},render:({item:e,config:t})=>{const s=e?._embedded?.["wp:featuredmedia"]?.[0],n=s?.source_url;return n?(0,c.jsx)("img",{className:"fields-controls__featured-image-image",src:n,alt:"",srcSet:s?.media_details?.sizes?Object.values(s.media_details.sizes).map((e=>`${e.source_url} ${e.width}w`)).join(", "):void 0,sizes:t?.sizes||"100vw"}):(0,c.jsx)("span",{className:"fields-controls__featured-image-placeholder"})},enableSorting:!1,filterBy:!1};var pr=ur;function mr(e){var t,s,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=mr(e[t]))&&(n&&(n+=" "),n+=s)}else for(s in e)e[s]&&(n&&(n+=" "),n+=s);return n}const hr=function(){for(var e,t,s=0,n="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=mr(e))&&(n&&(n+=" "),n+=t);return n};var gr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})});var _r=function({item:e}){const t=e?._embedded?.author?.[0]?.name,s=e?._embedded?.author?.[0]?.avatar_urls?.[48],[n,o]=(0,p.useState)(!1);return(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,c.jsx)("div",{className:hr("page-templates-author-field__avatar",{"is-loaded":n}),children:(0,c.jsx)("img",{onLoad:()=>o(!0),alt:(0,fs.__)("Author avatar"),src:s})}),!s&&(0,c.jsx)("div",{className:"page-templates-author-field__icon",children:(0,c.jsx)(Fn.Icon,{icon:gr})}),(0,c.jsx)("span",{className:"page-templates-author-field__name",children:t})]})};const fr={label:(0,fs.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,d.resolveSelect)(u.store).getEntityRecords("root","user",{per_page:-1})??[]).map((({id:e,name:t})=>({value:e,label:t}))),render:_r,sort:(e,t,s)=>{const n=e._embedded?.author?.[0]?.name||"",o=t._embedded?.author?.[0]?.name||"";return"asc"===s?n.localeCompare(o):o.localeCompare(n)},filterBy:{operators:["isAny","isNone"]}};var br=fr,yr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),xr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),vr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),wr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),Sr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var kr=[{value:"draft",label:(0,fs.__)("Draft"),icon:yr,description:(0,fs.__)("Not ready to publish.")},{value:"future",label:(0,fs.__)("Scheduled"),icon:xr,description:(0,fs.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,fs.__)("Pending Review"),icon:vr,description:(0,fs.__)("Waiting for review before publishing.")},{value:"private",label:(0,fs.__)("Private"),icon:wr,description:(0,fs.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,fs.__)("Published"),icon:Sr,description:(0,fs.__)("Visible to everyone.")},{value:"trash",label:(0,fs.__)("Trash"),icon:er}];var Cr=function({item:e}){const t=kr.find((({value:t})=>t===e.status)),s=t?.label||e.status,n=t?.icon;return(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"left",spacing:0,children:[n&&(0,c.jsx)("div",{className:"edit-site-post-list__status-icon",children:(0,c.jsx)(Fn.Icon,{icon:n})}),(0,c.jsx)("span",{children:s})]})};var Pr={label:(0,fs.__)("Status"),id:"status",type:"text",elements:kr,render:Cr,Edit:"radio",enableSorting:!1,filterBy:{operators:["isAny"]}};const jr=e=>(0,v.dateI18n)((0,v.getSettings)().formats.datetimeAbbreviated,(0,v.getDate)(e));var Er=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Modified: <time>%s</time></span>"),jr(e.date??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})});if("future"===e.status)return(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Scheduled: <time>%s</time></span>"),jr(e.date??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})});if("publish"===e.status)return(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Published: <time>%s</time></span>"),jr(e.date??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})});const t=(0,v.getDate)(e.modified??null)>(0,v.getDate)(e.date??null)?e.modified:e.date;return"pending"===e.status?(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Modified: <time>%s</time></span>"),jr(t??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})}):(0,c.jsx)("time",{children:jr(e.date??null)})};var Tr={id:"date",type:"datetime",label:(0,fs.__)("Date"),render:Er,filterBy:!1},Br=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});const Ir=e=>"object"!=typeof e?"":e.slug||(0,w.cleanForSlug)(zn(e))||e.id.toString(),Nr=({field:e,onChange:t,data:s})=>{const{id:n}=e,o=e.getValue({item:s})||Ir(s),r=s.permalink_template||"",i=/%(?:postname|pagename)%/,[a,l]=r.split(i),u=a,h=l,g=i.test(r),_=(0,p.useRef)(o),f=o||_.current,b=g?`${u}${f}${h}`:(0,w.safeDecodeURIComponent)(s.link||"");(0,p.useEffect)((()=>{o&&void 0===_.current&&(_.current=o)}),[o]);const y=(0,p.useCallback)((e=>t({[n]:e})),[n,t]),{createNotice:x}=(0,d.useDispatch)(_s.store),v=(0,m.useCopyToClipboard)(b,(()=>{x("info",(0,fs.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})})),S="editor-post-url__slug-description-"+(0,m.useInstanceId)(Nr);return(0,c.jsxs)("fieldset",{className:"fields-controls__slug",children:[g&&(0,c.jsxs)(Fn.__experimentalVStack,{children:[(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"0px",children:[(0,c.jsx)("span",{children:(0,fs.__)("Customize the last part of the Permalink.")}),(0,c.jsx)(Fn.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,fs.__)("Learn more")})]}),(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,c.jsx)(Fn.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,icon:Br,ref:v,label:(0,fs.__)("Copy")}),label:(0,fs.__)("Link"),hideLabelFromVision:!0,value:o,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:e=>{y(e)},onBlur:()=>{""===o&&y(_.current)},"aria-describedby":S}),(0,c.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,c.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,fs.__)("Permalink:")}),(0,c.jsxs)(Fn.ExternalLink,{className:"fields-controls__slug-help-link",href:b,children:[(0,c.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,c.jsx)("span",{className:"fields-controls__slug-help-slug",children:f}),(0,c.jsx)("span",{className:"fields-controls__slug-help-suffix",children:h})]})]})]}),!g&&(0,c.jsx)(Fn.ExternalLink,{className:"fields-controls__slug-help",href:b,children:b})]})};var Rr=Nr;var Dr=({item:e})=>{const t=Ir(e),s=(0,p.useRef)(t);(0,p.useEffect)((()=>{t&&void 0===s.current&&(s.current=t)}),[t]);return`${t||s.current}`};var Ar={id:"slug",type:"text",label:(0,fs.__)("Slug"),Edit:Rr,render:Dr,filterBy:!1},Mr=s(9681),Lr=s.n(Mr);function Or(e){return"object"==typeof e.title&&"rendered"in e.title&&e.title.rendered?(0,Ln.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,fs.__)("no title")})`}const Fr=(e,t)=>{const s=Lr()(e||"").toLowerCase(),n=Lr()(t||"").toLowerCase();return s===n?0:s.startsWith(n)?s.length:1/0};function Vr({data:e,onChangeControl:t}){const[s,n]=(0,p.useState)(null),o=e.parent,r=e.id,i=e.type,{parentPostTitle:a,pageItems:l,isHierarchical:h}=(0,d.useSelect)((e=>{const{getEntityRecord:t,getEntityRecords:n,getPostType:a}=e(u.store),l=a(i),c=l?.hierarchical&&l.viewable,d=o?t("postType",i,o):null,p={per_page:100,exclude:r,parent_exclude:r,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...null!==s&&{search:s}};return{isHierarchical:c,parentPostTitle:d?Or(d):"",pageItems:c?n("postType",i,p):null}}),[s,o,r,i]),g=(0,p.useMemo)((()=>{const e=(t,n=0)=>{const o=t.map((t=>[{value:t.id,label:"— ".repeat(n)+(0,Ln.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],n+1)])).sort((([e],[t])=>Fr(e.rawName,s??"")>=Fr(t.rawName,s??"")?1:-1));return o.flat()};if(!l)return[];let t=l.map((e=>({id:e.id,parent:e.parent??null,name:Or(e)})));s||(t=function(e){const t=e.map((e=>({children:[],...e})));if(t.some((({parent:e})=>null==e)))return t;const s=t.reduce(((e,t)=>{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),n=e=>e.map((e=>{const t=s[e.id];return{...e,children:t&&t.length?n(t):[]}}));return n(s[0]||[])}(t));const n=e(t),r=n.find((e=>e.value===o));return o&&a&&!r&&n.unshift({value:o,label:a,rawName:""}),n.map((e=>({...e,value:e.value.toString()})))}),[l,s,a,o]);if(!h)return null;return(0,c.jsx)(Fn.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)("Parent"),help:(0,fs.__)("Choose a parent page."),value:o?.toString(),options:g,onFilterValueChange:(0,m.debounce)((e=>{n(e)}),300),onChange:e=>{if(e)return t(parseInt(e,10)??0);t(0)},hideLabelFromVision:!0})}var zr={id:"parent",type:"text",label:(0,fs.__)("Parent"),Edit:({data:e,field:t,onChange:s})=>{const{id:n}=t,o=(0,d.useSelect)((e=>e(u.store).getEntityRecord("root","__unstableBase")?.home),[]),r=(0,p.useCallback)((e=>s({[n]:e})),[n,s]);return(0,c.jsx)("fieldset",{className:"fields-controls__parent",children:(0,c.jsxs)("div",{children:[(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'),(0,w.filterURLForDisplay)(o).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,c.jsx)("wbr",{})}),(0,c.jsx)("p",{children:(0,p.createInterpolateElement)((0,fs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,c.jsx)(Vr,{data:e,onChangeControl:r})]})})},render:({item:e})=>{const t=(0,d.useSelect)((t=>{const{getEntityRecord:s}=t(u.store);return e?.parent?s("postType",e.type,e.parent):null}),[e.parent,e.type]);return t?(0,c.jsx)(c.Fragment,{children:Or(t)}):(0,c.jsx)(c.Fragment,{children:(0,fs.__)("None")})},enableSorting:!0,filterBy:!1};var Ur={id:"comment_status",label:(0,fs.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,fs.__)("Open"),description:(0,fs.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,fs.__)("Closed"),description:(0,fs.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]};var Hr={id:"ping_status",label:(0,fs.__)("Trackbacks & Pingbacks"),type:"text",Edit:function({data:e,onChange:t}){const s=e?.ping_status??"open";return(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Enable pingbacks & trackbacks"),checked:"open"===s,onChange:s=>{t({...e,ping_status:s?"open":"closed"})},help:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fs.__)("Learn more about pingbacks & trackbacks")})})},enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,fs.__)("Allow"),description:(0,fs.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,fs.__)("Don't allow"),description:(0,fs.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]};var Gr={id:"discussion",label:(0,fs.__)("Discussion"),type:"text",render:({item:e})=>{const t="open"===e.comment_status,s="open"===e.ping_status;return t&&s?(0,fs.__)("Open"):t&&!s?(0,fs.__)("Comments only"):!t&&s?(0,fs.__)("Pings only"):(0,fs.__)("Closed")},filterBy:!1};const $r=[],Wr={id:"template",type:"text",label:(0,fs.__)("Template"),Edit:({data:e,field:t,onChange:s})=>{const{id:n}=t,o=e.type,r="number"==typeof e.id?e.id:parseInt(e.id,10),i=e.slug,{canSwitchTemplate:a,templates:l}=(0,d.useSelect)((e=>{const t=e(u.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??$r,{getHomePage:s,getPostsPageId:n}=uo(e(u.store)),i=n()===+r,a="page"===o&&s()?.postId===+r;return{templates:t,canSwitchTemplate:!i&&!a}}),[r,o]),h=(0,p.useMemo)((()=>a?l.filter((t=>t.is_custom&&t.slug!==e.template&&!!t.content.raw)).map((e=>({name:e.slug,blocks:(0,x.parse)(e.content.raw),title:(0,Ln.decodeEntities)(e.title.rendered),id:e.id}))):[]),[a,e.template,l]),_=(0,m.useAsyncList)(h),f=t.getValue({item:e}),b=l.find((e=>e.slug===f)),y=(0,d.useSelect)((e=>{if(b)return b;let t;if(t=i?"page"===o?`${o}-${i}`:`single-${o}-${i}`:"page"===o?"page":`single-${o}`,o){const s=e(u.store).getDefaultTemplateId({slug:t});return e(u.store).getEntityRecord("postType","wp_template",s)}}),[b,o,i]),[v,w]=(0,p.useState)(!1),S=(0,p.useCallback)((e=>s({[n]:e})),[n,s]);return(0,c.jsxs)("fieldset",{className:"fields-controls__template",children:[(0,c.jsx)(Fn.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",size:"compact",onClick:e,children:y?zn(y):""}),renderContent:({onToggle:e})=>(0,c.jsxs)(Fn.MenuGroup,{children:[(0,c.jsx)(Fn.MenuItem,{onClick:()=>{w(!0),e()},children:(0,fs.__)("Change template")}),""!==f&&(0,c.jsx)(Fn.MenuItem,{onClick:()=>{S(""),e()},children:(0,fs.__)("Use default template")})]})}),v&&(0,c.jsx)(Fn.Modal,{title:(0,fs.__)("Choose a template"),onRequestClose:()=>w(!1),overlayClassName:"fields-controls__template-modal",isFullScreen:!0,children:(0,c.jsx)("div",{className:"fields-controls__template-content",children:(0,c.jsx)(g.__experimentalBlockPatternsList,{label:(0,fs.__)("Templates"),blockPatterns:h,shownPatterns:_,onClickPattern:e=>{S(e.name),w(!1)}})})})]})},enableSorting:!1,filterBy:!1};var Zr=Wr;var Yr=function({data:e,onChange:t,field:s}){const[n,o]=(0,p.useState)(!!s.getValue({item:e}));return(0,c.jsxs)(Fn.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Password protected"),help:(0,fs.__)("Only visible to those who know the password"),checked:n,onChange:e=>{o(e),e||t({password:""})}}),n&&(0,c.jsx)("div",{className:"fields-controls__password-input",children:(0,c.jsx)(Fn.TextControl,{label:(0,fs.__)("Password"),onChange:e=>t({password:e}),value:s.getValue({item:e})||"",placeholder:(0,fs.__)("Use a secure password"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]})};var qr={id:"password",type:"text",label:(0,fs.__)("Password"),Edit:Yr,enableSorting:!1,enableHiding:!1,isVisible:e=>"private"!==e.status,filterBy:!1};function Kr({item:e,className:t,children:s}){const n=zn(e);return(0,c.jsxs)(Fn.__experimentalHStack,{className:hr("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,c.jsx)("span",{children:n||(0,fs.__)("(no title)")}),s]})}function Qr({item:e}){return(0,c.jsx)(Kr,{item:e})}const{Badge:Xr}=uo(Fn.privateApis);var Jr={type:"text",id:"title",label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),getValue:({item:e})=>zn(e),render:function({item:e}){const{frontPageId:t,postsPageId:s}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(u.store),s=t("root","site");return{frontPageId:s?.page_on_front,postsPageId:s?.page_for_posts}}),[]);return(0,c.jsx)(Kr,{item:e,className:"fields-field__page-title",children:[t,s].includes(e.id)&&(0,c.jsx)(Xr,{children:e.id===t?(0,fs.__)("Homepage"):(0,fs.__)("Posts Page")})})},enableHiding:!1,enableGlobalSearch:!0,filterBy:!1};var ei={type:"text",label:(0,fs.__)("Template"),placeholder:(0,fs.__)("No title"),id:"title",getValue:({item:e})=>zn(e),render:Qr,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},ti=(0,p.forwardRef)((({icon:e,size:t=24,...s},n)=>(0,p.cloneElement)(e,{width:t,height:t,...s,ref:n}))),si=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});const{PATTERN_TYPES:ni}=uo(lo.privateApis);var oi={type:"text",id:"title",label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),getValue:({item:e})=>zn(e),render:function({item:e}){return(0,c.jsx)(Kr,{item:e,className:"fields-field__pattern-title",children:e.type===ni.theme&&(0,c.jsx)(Fn.Tooltip,{placement:"top",text:(0,fs.__)("This pattern cannot be edited."),children:(0,c.jsx)(ti,{icon:si,size:24})})})},enableHiding:!1,enableGlobalSearch:!0,filterBy:!1};var ri={type:"text",id:"title",label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),getValue:({item:e})=>zn(e),render:Qr,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1};var ii=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...s})=>{const n=(0,d.useRegistry)(),[o]=(0,p.useState)((()=>new WeakMap)),r=function(e,t,s){if(!s)return t;let n=e.get(t);return n||(n=(0,d.createRegistry)({"core/block-editor":g.storeConfig},t),n.registerStore("core/editor",yc),e.set(t,n)),n}(o,n,t);return r===n?(0,c.jsx)(e,{registry:n,...s}):(0,c.jsx)(d.RegistryProvider,{value:r,children:(0,c.jsx)(e,{registry:r,...s})})}),"withRegistryProvider");const ai=(e,t)=>`<a ${li(e)}>${t}</a>`,li=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,ci=e=>{const{title:t,foreign_landing_url:s,creator:n,creator_url:o,license:r,license_version:i,license_url:a}=e,l=((e,t)=>{let s=e.trim();return"pdm"!==e&&(s=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(s+=` ${t}`),["pdm","cc0"].includes(e)||(s=`CC ${s}`),s})(r,i),c=(0,Ln.decodeEntities)(n);let d;return d=c?t?(0,fs.sprintf)((0,fs._x)('"%1$s" by %2$s/ %3$s',"caption"),ai(s,(0,Ln.decodeEntities)(t)),o?ai(o,c):c,a?ai(`${a}?ref=openverse`,l):l):(0,fs.sprintf)((0,fs._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),li(s),o?ai(o,c):c,a?ai(`${a}?ref=openverse`,l):l):t?(0,fs.sprintf)((0,fs._x)('"%1$s"/ %2$s',"caption"),ai(s,(0,Ln.decodeEntities)(t)),a?ai(`${a}?ref=openverse`,l):l):(0,fs.sprintf)((0,fs._x)("<a %1$s>Work</a>/ %2$s","caption"),li(s),a?ai(`${a}?ref=openverse`,l):l),d.replace(/\s{2}/g," ")},di=async(e={})=>(await(0,d.resolveSelect)(u.store).getEntityRecords("postType","attachment",{...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw})));var ui=[{name:"images",labels:{name:(0,fs.__)("Images"),search_items:(0,fs.__)("Search images")},mediaType:"image",fetch:async(e={})=>di({...e,media_type:"image"})},{name:"videos",labels:{name:(0,fs.__)("Videos"),search_items:(0,fs.__)("Search videos")},mediaType:"video",fetch:async(e={})=>di({...e,media_type:"video"})},{name:"audio",labels:{name:(0,fs.__)("Audio"),search_items:(0,fs.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>di({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,fs.__)("Openverse"),search_items:(0,fs.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},s={per_page:"page_size",search:"q"},n=new URL("https://api.openverse.org/v1/images/");Object.entries(t).forEach((([e,t])=>{const o=s[e]||e;n.searchParams.set(o,t)}));const o=await window.fetch(n,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await o.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:ci(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}];const pi={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let mi;const hi=new Uint8Array(16);function gi(){if(!mi&&(mi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mi(hi)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function fi(e,t=0){return _i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]}const bi=function(e,t,s){if(pi.randomUUID&&!t&&!e)return pi.randomUUID();const n=(e=e||{}).random||(e.rng||gi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){s=s||0;for(let e=0;e<16;++e)t[s+e]=n[e];return t}return fi(n)},yi=()=>{};function xi({additionalData:e={},allowedTypes:t,filesList:s,maxUploadFileSize:n,onError:o=yi,onFileChange:r,onSuccess:i,multiple:a=!0}){const{receiveEntityRecords:l}=(0,d.dispatch)(u.store),{getCurrentPost:c,getEditorSettings:p}=(0,d.select)(xc),{lockPostAutosaving:m,unlockPostAutosaving:h,lockPostSaving:g,unlockPostSaving:_}=(0,d.dispatch)(xc),f=p().allowedMimeTypes,b=`image-upload-${bi()}`;let y=!1;n=n||p().maxUploadFileSize;const x=c(),v="number"==typeof x?.id?x.id:x?.wp_id,w=v?{post:v}:{},S=()=>{_(b),h(b),y=!1};(0,cr.uploadMedia)({allowedTypes:t,filesList:s,onFileChange:e=>{y?S():(g(b),m(b),y=!0),r?.(e);const t=e.filter((e=>e?.id));if(t?.length){l("postType","attachment",t,void 0,!0)}},onSuccess:i,additionalData:{...w,...e},maxUploadFileSize:n,onError:({message:e})=>{S(),o(e)},wpAllowedMimeTypes:f,multiple:a})}const{sideloadMedia:vi}=$(cr.privateApis);var wi=vi,Si=s(66),ki=s.n(Si);
+*/n=[e,t],s=function(e,t){"use strict";var s,n,o="function"==typeof Map?new Map:(s=[],n=[],{has:function(e){return s.indexOf(e)>-1},get:function(e){return n[s.indexOf(e)]},set:function(e,t){-1===s.indexOf(e)&&(s.push(e),n.push(t))},delete:function(e){var t=s.indexOf(e);t>-1&&(s.splice(t,1),n.splice(t,1))}}),r=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){r=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function i(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t=null,s=null,n=null,i=function(){e.clientWidth!==s&&p()},a=function(t){window.removeEventListener("resize",i,!1),e.removeEventListener("input",p,!1),e.removeEventListener("keyup",p,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",p,!1),Object.keys(t).forEach((function(s){e.style[s]=t[s]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",p,!1),window.addEventListener("resize",i,!1),e.addEventListener("input",p,!1),e.addEventListener("autosize:update",p,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:p}),l()}function l(){var s=window.getComputedStyle(e,null);"vertical"===s.resize?e.style.resize="none":"both"===s.resize&&(e.style.resize="horizontal"),t="content-box"===s.boxSizing?-(parseFloat(s.paddingTop)+parseFloat(s.paddingBottom)):parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),isNaN(t)&&(t=0),p()}function c(t){var s=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=s,e.style.overflowY=t}function d(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function u(){if(0!==e.scrollHeight){var n=d(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+t+"px",s=e.clientWidth,n.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function p(){u();var t=Math.round(parseFloat(e.style.height)),s=window.getComputedStyle(e,null),o="content-box"===s.boxSizing?Math.round(parseFloat(s.height)):e.offsetHeight;if(o<t?"hidden"===s.overflowY&&(c("scroll"),u(),o="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==s.overflowY&&(c("hidden"),u(),o="content-box"===s.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),n!==o){n=o;var i=r("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function l(e){var t=o.get(e);t&&t.update()}var c=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((c=function(e){return e}).destroy=function(e){return e},c.update=function(e){return e}):((c=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return i(e,t)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},c.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],l),e}),t.default=c,e.exports=t.default},void 0===(o="function"==typeof s?s.apply(t,n):s)||(e.exports=o)},4462:function(e,t,s){"use strict";var n,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var s in t)t.hasOwnProperty(s)&&(e[s]=t[s])},function(e,t){function s(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(s.prototype=t.prototype,new s)}),r=this&&this.__assign||Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var o in t=arguments[s])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i=this&&this.__rest||function(e,t){var s={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(s[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&(s[n[o]]=e[n[o]])}return s};t.__esModule=!0;var a=s(1609),l=s(5826),c=s(4306),d=s(461),u="autosize:resized",p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.textarea=null,t.onResize=function(e){t.props.onResize&&t.props.onResize(e)},t.updateLineHeight=function(){t.textarea&&t.setState({lineHeight:d(t.textarea)})},t.onChange=function(e){var s=t.props.onChange;t.currentValue=e.currentTarget.value,s&&s(e)},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,s=t.maxRows,n=t.async;"number"==typeof s&&this.updateLineHeight(),"number"==typeof s||n?setTimeout((function(){return e.textarea&&c(e.textarea)})):this.textarea&&c(this.textarea),this.textarea&&this.textarea.addEventListener(u,this.onResize)},t.prototype.componentWillUnmount=function(){this.textarea&&(this.textarea.removeEventListener(u,this.onResize),c.destroy(this.textarea))},t.prototype.render=function(){var e=this,t=this.props,s=(t.onResize,t.maxRows),n=(t.onChange,t.style),o=(t.innerRef,t.children),l=i(t,["onResize","maxRows","onChange","style","innerRef","children"]),c=this.state.lineHeight,d=s&&c?c*s:null;return a.createElement("textarea",r({},l,{onChange:this.onChange,style:d?r({},n,{maxHeight:d}):n,ref:function(t){e.textarea=t,"function"==typeof e.props.innerRef?e.props.innerRef(t):e.props.innerRef&&(e.props.innerRef.current=t)}}),o)},t.prototype.componentDidUpdate=function(){this.textarea&&c.update(this.textarea)},t.defaultProps={rows:1,async:!1},t.propTypes={rows:l.number,maxRows:l.number,onResize:l.func,innerRef:l.any,async:l.bool},t}(a.Component);t.TextareaAutosize=a.forwardRef((function(e,t){return a.createElement(p,r({},e,{innerRef:t}))}))},5215:e=>{"use strict";e.exports=function e(t,s){if(t===s)return!0;if(t&&s&&"object"==typeof t&&"object"==typeof s){if(t.constructor!==s.constructor)return!1;var n,o,r;if(Array.isArray(t)){if((n=t.length)!=s.length)return!1;for(o=n;0!=o--;)if(!e(t[o],s[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(s).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(s,r[o]))return!1;for(o=n;0!=o--;){var i=r[o];if(!e(t[i],s[i]))return!1}return!0}return t!=t&&s!=s}},5826:(e,t,s)=>{e.exports=s(628)()},6109:e=>{e.exports=function(e,t,s){return((s=window.getComputedStyle)?s(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},9681:e=>{var t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ả:"A",Ạ:"A",Ẩ:"A",Ẫ:"A",Ậ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ẻ:"E",Ẽ:"E",Ẹ:"E",Ể:"E",Ễ:"E",Ệ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ỉ:"I",Ị:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ỏ:"O",Ọ:"O",Ổ:"O",Ỗ:"O",Ộ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ớ:"O",Ợ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ủ:"U",Ụ:"U",Ử:"U",Ữ:"U",Ự:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ả:"a",ạ:"a",ẩ:"a",ẫ:"a",ậ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ẻ:"e",ẽ:"e",ẹ:"e",ể:"e",ễ:"e",ệ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ỉ:"i",ị:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ỏ:"o",ọ:"o",ổ:"o",ỗ:"o",ộ:"o",ờ:"o",ở:"o",ỡ:"o",ớ:"o",ợ:"o",ù:"u",ú:"u",û:"u",ü:"u",ủ:"u",ụ:"u",ử:"u",ữ:"u",ự:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z",й:"и",Й:"И",ё:"е",Ё:"Е"},s=Object.keys(t).join("|"),n=new RegExp(s,"g"),o=new RegExp(s,"");function r(e){return t[e]}var i=function(e){return e.replace(n,r)};e.exports=i,e.exports.has=function(e){return!!e.match(o)},e.exports.remove=i}},t={};function s(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n].call(r.exports,r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";s.r(n),s.d(n,{AlignmentToolbar:()=>qh,Autocomplete:()=>Yh,AutosaveMonitor:()=>Fc,BlockAlignmentToolbar:()=>Kh,BlockControls:()=>Qh,BlockEdit:()=>Xh,BlockEditorKeyboardShortcuts:()=>Jh,BlockFormatControls:()=>eg,BlockIcon:()=>tg,BlockInspector:()=>sg,BlockList:()=>ng,BlockMover:()=>og,BlockNavigationDropdown:()=>rg,BlockSelectionClearer:()=>ig,BlockSettingsMenu:()=>ag,BlockTitle:()=>lg,BlockToolbar:()=>cg,CharacterCount:()=>Fh,ColorPalette:()=>dg,ContrastChecker:()=>ug,CopyHandler:()=>pg,DefaultBlockAppender:()=>mg,DocumentBar:()=>$c,DocumentOutline:()=>td,DocumentOutlineCheck:()=>sd,EditorHistoryRedo:()=>id,EditorHistoryUndo:()=>ad,EditorKeyboardShortcuts:()=>Cl,EditorKeyboardShortcutsRegister:()=>nd,EditorNotices:()=>cd,EditorProvider:()=>Ml,EditorSnackbars:()=>ud,EntitiesSavedStates:()=>xd,ErrorBoundary:()=>Cd,FontSizePicker:()=>hg,InnerBlocks:()=>_g,Inserter:()=>gg,InspectorAdvancedControls:()=>fg,InspectorControls:()=>bg,LocalAutosaveMonitor:()=>Td,MediaPlaceholder:()=>kg,MediaUpload:()=>Cg,MediaUploadCheck:()=>Pg,MultiSelectScrollIntoView:()=>jg,NavigableToolbar:()=>Eg,ObserveTyping:()=>Tg,PageAttributesCheck:()=>Bd,PageAttributesOrder:()=>Rd,PageAttributesPanel:()=>Zd,PageAttributesParent:()=>Gd,PageTemplate:()=>ou,PanelColorSettings:()=>yg,PlainText:()=>xg,PluginBlockSettingsMenuItem:()=>fu,PluginDocumentSettingPanel:()=>_u,PluginMoreMenuItem:()=>bu,PluginPostPublishPanel:()=>wu,PluginPostStatusInfo:()=>Pu,PluginPrePublishPanel:()=>Bu,PluginPreviewMenuItem:()=>Iu,PluginSidebar:()=>Nu,PluginSidebarMoreMenuItem:()=>Ru,PostAuthor:()=>Zu,PostAuthorCheck:()=>Yu,PostAuthorPanel:()=>Ku,PostComments:()=>Xu,PostDiscussionPanel:()=>np,PostExcerpt:()=>op,PostExcerptCheck:()=>rp,PostExcerptPanel:()=>pp,PostFeaturedImage:()=>Sp,PostFeaturedImageCheck:()=>_p,PostFeaturedImagePanel:()=>Cp,PostFormat:()=>Ep,PostFormatCheck:()=>Pp,PostLastRevision:()=>Np,PostLastRevisionCheck:()=>Tp,PostLastRevisionPanel:()=>Rp,PostLockedModal:()=>Dp,PostPendingStatus:()=>Mp,PostPendingStatusCheck:()=>Ap,PostPingbacks:()=>Ju,PostPreviewButton:()=>Lp,PostPublishButton:()=>Up,PostPublishButtonLabel:()=>Op,PostPublishPanel:()=>qm,PostSavedState:()=>oh,PostSchedule:()=>lm,PostScheduleCheck:()=>rh,PostScheduleLabel:()=>dm,PostSchedulePanel:()=>ah,PostSticky:()=>Jm,PostStickyCheck:()=>Xm,PostSwitchToDraftButton:()=>lh,PostSyncStatus:()=>ch,PostTaxonomies:()=>uh,PostTaxonomiesCheck:()=>ph,PostTaxonomiesFlatTermSelector:()=>Sm,PostTaxonomiesHierarchicalTermSelector:()=>Am,PostTaxonomiesPanel:()=>hh,PostTemplatePanel:()=>Uu,PostTextEditor:()=>_h,PostTitle:()=>wh,PostTitleRaw:()=>Sh,PostTrash:()=>Ch,PostTrashCheck:()=>kh,PostTypeSupportCheck:()=>Id,PostURL:()=>Ph,PostURLCheck:()=>jh,PostURLLabel:()=>Eh,PostURLPanel:()=>Bh,PostVisibility:()=>Gp,PostVisibilityCheck:()=>Rh,PostVisibilityLabel:()=>$p,RichText:()=>Zh,RichTextShortcut:()=>vg,RichTextToolbarButton:()=>wg,ServerSideRender:()=>Gh(),SkipToSelectedBlock:()=>Bg,TableOfContents:()=>Uh,TextEditorGlobalKeyboardShortcuts:()=>Wg,ThemeSupportCheck:()=>gp,TimeToRead:()=>Oh,URLInput:()=>Ig,URLInputButton:()=>Ng,URLPopover:()=>Rg,UnsavedChangesWarning:()=>Hh,VisualEditorGlobalKeyboardShortcuts:()=>$g,Warning:()=>Dg,WordCount:()=>Mh,WritingFlow:()=>Ag,__unstableRichTextInputEvent:()=>Sg,cleanForSlug:()=>Zg,createCustomColorsHOC:()=>Mg,getColorClassName:()=>Lg,getColorObjectByAttributeValues:()=>Og,getColorObjectByColorValue:()=>Fg,getFontSize:()=>Vg,getFontSizeClass:()=>Ug,getTemplatePartIcon:()=>H,mediaUpload:()=>xi,privateApis:()=>Jy,registerEntityAction:()=>ex,registerEntityField:()=>sx,store:()=>wc,storeConfig:()=>vc,transformStyles:()=>g.transformStyles,unregisterEntityAction:()=>tx,unregisterEntityField:()=>nx,useEntitiesSavedStatesIsDirty:()=>bd,usePostScheduleLabel:()=>um,usePostURLLabel:()=>Th,usePostVisibilityLabel:()=>Wp,userAutocompleter:()=>kc,withColorContext:()=>Hg,withColors:()=>zg,withFontSizes:()=>Gg});var e={};s.r(e),s.d(e,{__experimentalGetDefaultTemplatePartAreas:()=>ls,__experimentalGetDefaultTemplateType:()=>cs,__experimentalGetDefaultTemplateTypes:()=>as,__experimentalGetTemplateInfo:()=>ds,__unstableIsEditorReady:()=>et,canInsertBlockType:()=>ns,canUserUseUnfilteredHTML:()=>$e,didPostSaveRequestFail:()=>Ee,didPostSaveRequestSucceed:()=>je,getActivePostLock:()=>Ge,getAdjacentBlockClientId:()=>Et,getAutosaveAttribute:()=>me,getBlock:()=>mt,getBlockAttributes:()=>pt,getBlockCount:()=>yt,getBlockHierarchyRootClientId:()=>jt,getBlockIndex:()=>Ht,getBlockInsertionPoint:()=>Xt,getBlockListSettings:()=>is,getBlockMode:()=>qt,getBlockName:()=>dt,getBlockOrder:()=>Ut,getBlockRootClientId:()=>Pt,getBlockSelectionEnd:()=>vt,getBlockSelectionStart:()=>xt,getBlocks:()=>ht,getBlocksByClientId:()=>bt,getClientIdsOfDescendants:()=>gt,getClientIdsWithDescendants:()=>_t,getCurrentPost:()=>ne,getCurrentPostAttribute:()=>de,getCurrentPostId:()=>re,getCurrentPostLastRevisionId:()=>le,getCurrentPostRevisionsCount:()=>ae,getCurrentPostType:()=>oe,getCurrentTemplateId:()=>ie,getDeviceType:()=>nt,getEditedPostAttribute:()=>pe,getEditedPostContent:()=>Re,getEditedPostPreviewLink:()=>Ie,getEditedPostSlug:()=>Le,getEditedPostVisibility:()=>he,getEditorBlocks:()=>Ze,getEditorMode:()=>it,getEditorSelection:()=>Je,getEditorSelectionEnd:()=>Xe,getEditorSelectionStart:()=>Qe,getEditorSettings:()=>tt,getFirstMultiSelectedBlockClientId:()=>Dt,getGlobalBlockCount:()=>ft,getInserterItems:()=>os,getLastMultiSelectedBlockClientId:()=>At,getMultiSelectedBlockClientIds:()=>Nt,getMultiSelectedBlocks:()=>Rt,getMultiSelectedBlocksEndClientId:()=>Vt,getMultiSelectedBlocksStartClientId:()=>Ft,getNextBlockClientId:()=>Bt,getPermalink:()=>Me,getPermalinkParts:()=>Oe,getPostEdits:()=>ce,getPostLockUser:()=>ze,getPostTypeLabel:()=>us,getPreviousBlockClientId:()=>Tt,getRenderingMode:()=>st,getSelectedBlock:()=>Ct,getSelectedBlockClientId:()=>kt,getSelectedBlockCount:()=>wt,getSelectedBlocksInitialCaretPosition:()=>It,getStateBeforeOptimisticTransaction:()=>at,getSuggestedPostFormat:()=>Ne,getTemplate:()=>ts,getTemplateLock:()=>ss,hasChangedContent:()=>J,hasEditorRedo:()=>Q,hasEditorUndo:()=>K,hasInserterItems:()=>rs,hasMultiSelection:()=>Wt,hasNonPostEntityChanges:()=>te,hasSelectedBlock:()=>St,hasSelectedInnerBlock:()=>Gt,inSomeHistory:()=>lt,isAncestorMultiSelected:()=>Ot,isAutosavingPost:()=>Te,isBlockInsertionPointVisible:()=>Jt,isBlockMultiSelected:()=>Lt,isBlockSelected:()=>zt,isBlockValid:()=>ut,isBlockWithinSelection:()=>$t,isCaretWithinFormattedText:()=>Qt,isCleanNewPost:()=>se,isCurrentPostPending:()=>ge,isCurrentPostPublished:()=>_e,isCurrentPostScheduled:()=>fe,isDeletingPost:()=>ke,isEditedPostAutosaveable:()=>ve,isEditedPostBeingScheduled:()=>we,isEditedPostDateFloating:()=>Se,isEditedPostDirty:()=>ee,isEditedPostEmpty:()=>xe,isEditedPostNew:()=>X,isEditedPostPublishable:()=>be,isEditedPostSaveable:()=>ye,isEditorPanelEnabled:()=>qe,isEditorPanelOpened:()=>Ke,isEditorPanelRemoved:()=>Ye,isFirstMultiSelectedBlock:()=>Mt,isInserterOpened:()=>rt,isListViewOpened:()=>ot,isMultiSelecting:()=>Zt,isPermalinkEditable:()=>Ae,isPostAutosavingLocked:()=>Ue,isPostLockTakeover:()=>He,isPostLocked:()=>Fe,isPostSavingLocked:()=>Ve,isPreviewingPost:()=>Be,isPublishSidebarEnabled:()=>We,isPublishSidebarOpened:()=>ps,isPublishingPost:()=>De,isSavingNonPostEntityChanges:()=>Pe,isSavingPost:()=>Ce,isSelectionEnabled:()=>Yt,isTyping:()=>Kt,isValidTemplate:()=>es});var t={};s.r(t),s.d(t,{__experimentalTearDownEditor:()=>vs,__unstableSaveForPreview:()=>Is,autosave:()=>Bs,clearSelectedBlock:()=>hn,closePublishSidebar:()=>sn,createUndoLevel:()=>Ds,disablePublishSidebar:()=>Ls,editPost:()=>Ps,enablePublishSidebar:()=>Ms,enterFormattedText:()=>Rn,exitFormattedText:()=>Dn,hideInsertionPoint:()=>kn,insertBlock:()=>vn,insertBlocks:()=>wn,insertDefaultBlock:()=>An,lockPostAutosaving:()=>Vs,lockPostSaving:()=>Os,mergeBlocks:()=>jn,moveBlockToPosition:()=>xn,moveBlocksDown:()=>bn,moveBlocksUp:()=>yn,multiSelect:()=>mn,openPublishSidebar:()=>tn,receiveBlocks:()=>an,redo:()=>Ns,refreshPost:()=>Es,removeBlock:()=>Tn,removeBlocks:()=>En,removeEditorPanel:()=>Ys,replaceBlock:()=>fn,replaceBlocks:()=>_n,resetBlocks:()=>rn,resetEditorBlocks:()=>Hs,resetPost:()=>ws,savePost:()=>js,selectBlock:()=>dn,setDeviceType:()=>$s,setEditedPost:()=>Cs,setIsInserterOpened:()=>qs,setIsListViewOpened:()=>Ks,setRenderingMode:()=>Gs,setTemplateValidity:()=>Cn,setupEditor:()=>xs,setupEditorState:()=>ks,showInsertionPoint:()=>Sn,startMultiSelect:()=>un,startTyping:()=>In,stopMultiSelect:()=>pn,stopTyping:()=>Nn,switchEditorMode:()=>en,synchronizeTemplate:()=>Pn,toggleBlockMode:()=>Bn,toggleDistractionFree:()=>Qs,toggleEditorPanelEnabled:()=>Ws,toggleEditorPanelOpened:()=>Zs,togglePublishSidebar:()=>nn,toggleSelection:()=>gn,toggleSpotlightMode:()=>Xs,toggleTopToolbar:()=>Js,trashPost:()=>Ts,undo:()=>Rs,unlockPostAutosaving:()=>Us,unlockPostSaving:()=>Fs,updateBlock:()=>ln,updateBlockAttributes:()=>cn,updateBlockListSettings:()=>Mn,updateEditorSettings:()=>zs,updatePost:()=>Ss,updatePostLock:()=>As});var o={};s.r(o),s.d(o,{closeModal:()=>va,disableComplementaryArea:()=>ha,enableComplementaryArea:()=>ma,openModal:()=>xa,pinItem:()=>ga,setDefaultComplementaryArea:()=>pa,setFeatureDefaults:()=>ya,setFeatureValue:()=>ba,toggleFeature:()=>fa,unpinItem:()=>_a});var r={};s.r(r),s.d(r,{getActiveComplementaryArea:()=>wa,isComplementaryAreaLoading:()=>Sa,isFeatureActive:()=>Ca,isItemPinned:()=>ka,isModalActive:()=>Pa});var i={};s.r(i),s.d(i,{ActionItem:()=>Ra,ComplementaryArea:()=>Ua,ComplementaryAreaMoreMenuItem:()=>Aa,FullscreenMode:()=>Ha,InterfaceSkeleton:()=>Za,PinnedItems:()=>La,store:()=>Ea});var a={};s.r(a),s.d(a,{createTemplate:()=>Yl,hideBlockTypes:()=>Kl,registerEntityAction:()=>Ul,registerEntityField:()=>zl,registerPostTypeSchema:()=>Wl,removeTemplates:()=>Jl,revertTemplate:()=>Xl,saveDirtyEntities:()=>Ql,setCanvasMinHeight:()=>tc,setCurrentTemplateId:()=>Zl,setDefaultRenderingMode:()=>ec,setIsReady:()=>$l,showBlockTypes:()=>ql,unregisterEntityAction:()=>Hl,unregisterEntityField:()=>Gl});var l={};s.r(l),s.d(l,{getCanvasMinHeight:()=>xc,getDefaultRenderingMode:()=>yc,getEntityActions:()=>gc,getEntityFields:()=>fc,getInserter:()=>cc,getInserterSidebarToggleRef:()=>uc,getListViewToggleRef:()=>dc,getPostBlocksByName:()=>bc,getPostIcon:()=>mc,hasPostMetaChanges:()=>hc,isEntityReady:()=>_c});const c=window.ReactJSXRuntime,d=window.wp.data,u=window.wp.coreData,p=window.wp.element,m=window.wp.compose,h=window.wp.hooks,g=window.wp.blockEditor,_={...g.SETTINGS_DEFAULTS,richEditingEnabled:!0,codeEditingEnabled:!0,fontLibraryEnabled:!0,enableCustomFields:void 0,defaultRenderingMode:"post-only"};var f=(0,d.combineReducers)({actions:function(e={},t){switch(t.type){case"REGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.config.id)),t.config]}};case"UNREGISTER_ENTITY_ACTION":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.actionId))}}}return e},fields:function(e={},t){switch(t.type){case"REGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:[...(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.config.id)),t.config]}};case"UNREGISTER_ENTITY_FIELD":return{...e,[t.kind]:{...e[t.kind],[t.name]:(e[t.kind]?.[t.name]??[]).filter((e=>e.id!==t.fieldId))}}}return e},isReady:function(e={},t){return"SET_IS_READY"===t.type?{...e,[t.kind]:{...e[t.kind],[t.name]:!0}}:e}});function b(e){return e&&"object"==typeof e&&"raw"in e?e.raw:e}var y=(0,d.combineReducers)({postId:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postId:e},postType:function(e=null,t){return"SET_EDITED_POST"===t.type?t.postType:e},templateId:function(e=null,t){return"SET_CURRENT_TEMPLATE_ID"===t.type?t.id:e},saving:function(e={},t){switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},deleting:function(e={},t){switch(t.type){case"REQUEST_POST_DELETE_START":case"REQUEST_POST_DELETE_FINISH":return{pending:"REQUEST_POST_DELETE_START"===t.type}}return e},postLock:function(e={isLocked:!1},t){return"UPDATE_POST_LOCK"===t.type?t.lock:e},template:function(e={isValid:!0},t){return"SET_TEMPLATE_VALIDITY"===t.type?{...e,isValid:t.isValid}:e},postSavingLock:function(e={},t){switch(t.type){case"LOCK_POST_SAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_SAVING":{const{[t.lockName]:s,...n}=e;return n}}return e},editorSettings:function(e=_,t){return"UPDATE_EDITOR_SETTINGS"===t.type?{...e,...t.settings}:e},postAutosavingLock:function(e={},t){switch(t.type){case"LOCK_POST_AUTOSAVING":return{...e,[t.lockName]:!0};case"UNLOCK_POST_AUTOSAVING":{const{[t.lockName]:s,...n}=e;return n}}return e},renderingMode:function(e="post-only",t){return"SET_RENDERING_MODE"===t.type?t.mode:e},deviceType:function(e="Desktop",t){return"SET_DEVICE_TYPE"===t.type?t.deviceType:e},removedPanels:function(e=[],t){if("REMOVE_PANEL"===t.type)if(!e.includes(t.panelName))return[...e,t.panelName];return e},blockInserterPanel:function(e=!1,t){switch(t.type){case"SET_IS_LIST_VIEW_OPENED":return!t.isOpen&&e;case"SET_IS_INSERTER_OPENED":return t.value}return e},inserterSidebarToggleRef:function(e={current:null}){return e},listViewPanel:function(e=!1,t){switch(t.type){case"SET_IS_INSERTER_OPENED":return!t.value&&e;case"SET_IS_LIST_VIEW_OPENED":return t.isOpen}return e},listViewToggleRef:function(e={current:null}){return e},publishSidebarActive:function(e=!1,t){switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},canvasMinHeight:function(e=0,t){return"SET_CANVAS_MIN_HEIGHT"===t.type?t.minHeight:e},dataviews:f});const x=window.wp.blocks,v=window.wp.date,w=window.wp.url,S=window.wp.deprecated;var k=s.n(S);const C=window.wp.preferences,P=new Set(["meta"]),j=/%(?:postname|pagename)%/,E=6e4,T=["title","excerpt","content"],B="wp_template",I="wp_template_part",N="wp_block",R="wp_navigation",D="custom",A=["wp_template","wp_template_part"],M=[...A,"wp_block","wp_navigation"],L=window.wp.primitives;var O=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),F=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",d:"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),V=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})}),U=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})});function H(e){return"header"===e?O:"footer"===e?F:"sidebar"===e?V:U}const z=window.wp.privateApis,{lock:G,unlock:$}=(0,z.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/editor");var W=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});const Z={},Y=e=>{if(!e)return Z;const{templateTypes:t,templateAreas:s,template:n}=e,{description:o,slug:r,title:i,area:a}=n,{title:l,description:c}=Object.values(t).find((e=>e.slug===r))??Z,d="string"==typeof i?i:i?.rendered,u="string"==typeof o?o:o?.raw,p=s?.map((e=>({...e,icon:H(e.icon)}))),m=p?.find((e=>a===e.area))?.icon||W;return{title:d&&d!==r?d:l||r,description:u||c,icon:m}},q={},K=(0,d.createRegistrySelector)((e=>()=>e(u.store).hasUndo())),Q=(0,d.createRegistrySelector)((e=>()=>e(u.store).hasRedo()));function X(e){return"auto-draft"===ne(e).status}function J(e){return"content"in ce(e)}const ee=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return e(u.store).hasEditsForEntityRecord("postType",s,n)})),te=(0,d.createRegistrySelector)((e=>t=>{const s=e(u.store).__experimentalGetDirtyEntityRecords(),{type:n,id:o}=ne(t);return s.some((e=>"postType"!==e.kind||e.name!==n||e.key!==o))}));function se(e){return!ee(e)&&X(e)}const ne=(0,d.createRegistrySelector)((e=>t=>{const s=re(t),n=oe(t),o=e(u.store).getRawEntityRecord("postType",n,s);return o||q}));function oe(e){return e.postType}function re(e){return e.postId}function ie(e){return e.templateId}function ae(e){return ne(e)._links?.["version-history"]?.[0]?.count??0}function le(e){return ne(e)._links?.["predecessor-version"]?.[0]?.id??null}const ce=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return e(u.store).getEntityRecordEdits("postType",s,n)||q}));function de(e,t){switch(t){case"type":return oe(e);case"id":return re(e);default:const s=ne(e);if(!s.hasOwnProperty(t))break;return b(s[t])}}const ue=(0,d.createSelector)(((e,t)=>{const s=ce(e);return s.hasOwnProperty(t)?{...de(e,t),...s[t]}:de(e,t)}),((e,t)=>[de(e,t),ce(e)[t]]));function pe(e,t){if("content"===t)return Re(e);const s=ce(e);return s.hasOwnProperty(t)?P.has(t)?ue(e,t):s[t]:de(e,t)}const me=(0,d.createRegistrySelector)((e=>(t,s)=>{if(!T.includes(s)&&"preview_link"!==s)return;const n=oe(t);if("wp_template"===n)return!1;const o=re(t),r=e(u.store).getCurrentUser()?.id,i=e(u.store).getAutosave(n,o,r);return i?b(i[s]):void 0}));function he(e){if("private"===pe(e,"status"))return"private";return pe(e,"password")?"password":"public"}function ge(e){return"pending"===ne(e).status}function _e(e,t){const s=t||ne(e);return-1!==["publish","private"].indexOf(s.status)||"future"===s.status&&!(0,v.isInTheFuture)(new Date(Number((0,v.getDate)(s.date))-E))}function fe(e){return"future"===ne(e).status&&!_e(e)}function be(e){const t=ne(e);return ee(e)||-1===["publish","private","future"].indexOf(t.status)}function ye(e){return!Ce(e)&&(!!pe(e,"title")||!!pe(e,"excerpt")||!xe(e)||"native"===p.Platform.OS)}const xe=(0,d.createRegistrySelector)((e=>t=>{const s=re(t),n=oe(t),o=e(u.store).getEditedEntityRecord("postType",n,s);if("function"!=typeof o.content)return!o.content;const r=pe(t,"blocks");if(0===r.length)return!0;if(r.length>1)return!1;const i=r[0].name;return(i===(0,x.getDefaultBlockName)()||i===(0,x.getFreeformContentHandlerName)())&&!Re(t)})),ve=(0,d.createRegistrySelector)((e=>t=>{if(!ye(t))return!1;if(Ue(t))return!1;const s=oe(t),n=e(u.store).getPostType(s);if("wp_template"===s||!n?.supports?.autosave)return!1;const o=re(t),r=e(u.store).hasFetchedAutosaves(s,o),i=e(u.store).getCurrentUser()?.id,a=e(u.store).getAutosave(s,o,i);return!!r&&(!a||(!!J(t)||["title","excerpt","meta"].some((e=>b(a[e])!==pe(t,e)))))}));function we(e){const t=pe(e,"date"),s=new Date(Number((0,v.getDate)(t))-E);return(0,v.isInTheFuture)(s)}function Se(e){const t=pe(e,"date"),s=pe(e,"modified"),n=ne(e).status;return("draft"===n||"auto-draft"===n||"pending"===n)&&(t===s||null===t)}function ke(e){return!!e.deleting.pending}function Ce(e){return!!e.saving.pending}const Pe=(0,d.createRegistrySelector)((e=>t=>{const s=e(u.store).__experimentalGetEntitiesBeingSaved(),{type:n,id:o}=ne(t);return s.some((e=>"postType"!==e.kind||e.name!==n||e.key!==o))})),je=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return!e(u.store).getLastEntitySaveError("postType",s,n)})),Ee=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=re(t);return!!e(u.store).getLastEntitySaveError("postType",s,n)}));function Te(e){return Ce(e)&&Boolean(e.saving.options?.isAutosave)}function Be(e){return Ce(e)&&Boolean(e.saving.options?.isPreview)}function Ie(e){if(e.saving.pending||Ce(e))return;let t=me(e,"preview_link");t&&"draft"!==ne(e).status||(t=pe(e,"link"),t&&(t=(0,w.addQueryArgs)(t,{preview:!0})));const s=pe(e,"featured_media");return t&&s?(0,w.addQueryArgs)(t,{_thumbnail_id:s}):t}const Ne=(0,d.createRegistrySelector)((e=>()=>{const t=e(g.store).getBlocks();if(t.length>2)return null;let s;if(1===t.length&&(s=t[0].name,"core/embed"===s)){const e=t[0].attributes?.providerNameSlug;["youtube","vimeo"].includes(e)?s="core/video":["spotify","soundcloud"].includes(e)&&(s="core/audio")}switch(2===t.length&&"core/paragraph"===t[1].name&&(s=t[0].name),s){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":return"video";case"core/audio":return"audio";default:return null}})),Re=(0,d.createRegistrySelector)((e=>t=>{const s=re(t),n=oe(t),o=e(u.store).getEditedEntityRecord("postType",n,s);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return(0,x.__unstableSerializeAndClean)(o.blocks);if(o.content)return o.content}return""}));function De(e){return Ce(e)&&!_e(e)&&"publish"===pe(e,"status")}function Ae(e){const t=pe(e,"permalink_template");return j.test(t)}function Me(e){const t=Oe(e);if(!t)return null;const{prefix:s,postName:n,suffix:o}=t;return Ae(e)?s+n+o:s}function Le(e){return pe(e,"slug")||(0,w.cleanForSlug)(pe(e,"title"))||re(e)}function Oe(e){const t=pe(e,"permalink_template");if(!t)return null;const s=pe(e,"slug")||pe(e,"generated_slug"),[n,o]=t.split(j);return{prefix:n,postName:s,suffix:o}}function Fe(e){return e.postLock.isLocked}function Ve(e){return Object.keys(e.postSavingLock).length>0}function Ue(e){return Object.keys(e.postAutosavingLock).length>0}function He(e){return e.postLock.isTakeover}function ze(e){return e.postLock.user}function Ge(e){return e.postLock.activePostLock}function $e(e){return Boolean(ne(e)._links?.hasOwnProperty("wp:action-unfiltered-html"))}const We=(0,d.createRegistrySelector)((e=>()=>!!e(C.store).get("core","isPublishSidebarEnabled"))),Ze=(0,d.createSelector)((e=>pe(e,"blocks")||(0,x.parse)(Re(e))),(e=>[pe(e,"blocks"),Re(e)]));function Ye(e,t){return e.removedPanels.includes(t)}const qe=(0,d.createRegistrySelector)((e=>(t,s)=>{const n=e(C.store).get("core","inactivePanels");return!Ye(t,s)&&!n?.includes(s)})),Ke=(0,d.createRegistrySelector)((e=>(t,s)=>{const n=e(C.store).get("core","openPanels");return!!n?.includes(s)}));function Qe(e){return k()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),pe(e,"selection")?.selectionStart}function Xe(e){return k()("select('core/editor').getEditorSelectionStart",{since:"5.8",alternative:"select('core/editor').getEditorSelection"}),pe(e,"selection")?.selectionEnd}function Je(e){return pe(e,"selection")}function et(e){return!!e.postId}function tt(e){return e.editorSettings}function st(e){return e.renderingMode}const nt=(0,d.createRegistrySelector)((e=>t=>$(e(g.store)).isZoomOut()?"Desktop":t.deviceType));function ot(e){return e.listViewPanel}function rt(e){return!!e.blockInserterPanel}const it=(0,d.createRegistrySelector)((e=>()=>e(C.store).get("core","editorMode")??"visual"));function at(){return k()("select('core/editor').getStateBeforeOptimisticTransaction",{since:"5.7",hint:"No state history is kept on this store anymore"}),null}function lt(){return k()("select('core/editor').inSomeHistory",{since:"5.7",hint:"No state history is kept on this store anymore"}),!1}function ct(e){return(0,d.createRegistrySelector)((t=>(s,...n)=>(k()("`wp.data.select( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.select( 'core/block-editor' )."+e+"`",version:"6.2"}),t(g.store)[e](...n))))}const dt=ct("getBlockName"),ut=ct("isBlockValid"),pt=ct("getBlockAttributes"),mt=ct("getBlock"),ht=ct("getBlocks"),gt=ct("getClientIdsOfDescendants"),_t=ct("getClientIdsWithDescendants"),ft=ct("getGlobalBlockCount"),bt=ct("getBlocksByClientId"),yt=ct("getBlockCount"),xt=ct("getBlockSelectionStart"),vt=ct("getBlockSelectionEnd"),wt=ct("getSelectedBlockCount"),St=ct("hasSelectedBlock"),kt=ct("getSelectedBlockClientId"),Ct=ct("getSelectedBlock"),Pt=ct("getBlockRootClientId"),jt=ct("getBlockHierarchyRootClientId"),Et=ct("getAdjacentBlockClientId"),Tt=ct("getPreviousBlockClientId"),Bt=ct("getNextBlockClientId"),It=ct("getSelectedBlocksInitialCaretPosition"),Nt=ct("getMultiSelectedBlockClientIds"),Rt=ct("getMultiSelectedBlocks"),Dt=ct("getFirstMultiSelectedBlockClientId"),At=ct("getLastMultiSelectedBlockClientId"),Mt=ct("isFirstMultiSelectedBlock"),Lt=ct("isBlockMultiSelected"),Ot=ct("isAncestorMultiSelected"),Ft=ct("getMultiSelectedBlocksStartClientId"),Vt=ct("getMultiSelectedBlocksEndClientId"),Ut=ct("getBlockOrder"),Ht=ct("getBlockIndex"),zt=ct("isBlockSelected"),Gt=ct("hasSelectedInnerBlock"),$t=ct("isBlockWithinSelection"),Wt=ct("hasMultiSelection"),Zt=ct("isMultiSelecting"),Yt=ct("isSelectionEnabled"),qt=ct("getBlockMode"),Kt=ct("isTyping"),Qt=ct("isCaretWithinFormattedText"),Xt=ct("getBlockInsertionPoint"),Jt=ct("isBlockInsertionPointVisible"),es=ct("isValidTemplate"),ts=ct("getTemplate"),ss=ct("getTemplateLock"),ns=ct("canInsertBlockType"),os=ct("getInserterItems"),rs=ct("hasInserterItems"),is=ct("getBlockListSettings"),as=(0,d.createRegistrySelector)((e=>()=>(k()("select('core/editor').__experimentalGetDefaultTemplateTypes",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_types"}),e(u.store).getCurrentTheme()?.default_template_types))),ls=(0,d.createRegistrySelector)((e=>(0,d.createSelector)((()=>{k()("select('core/editor').__experimentalGetDefaultTemplatePartAreas",{since:"6.8",alternative:"select('core/core-data').getCurrentTheme()?.default_template_part_areas"});return(e(u.store).getCurrentTheme()?.default_template_part_areas||[]).map((e=>({...e,icon:H(e.icon)})))})))),cs=(0,d.createRegistrySelector)((e=>(0,d.createSelector)(((t,s)=>{k()("select('core/editor').__experimentalGetDefaultTemplateType",{since:"6.8"});const n=e(u.store).getCurrentTheme()?.default_template_types;return n?Object.values(n).find((e=>e.slug===s))??q:q})))),ds=(0,d.createRegistrySelector)((e=>(0,d.createSelector)(((t,s)=>{if(k()("select('core/editor').__experimentalGetTemplateInfo",{since:"6.8"}),!s)return q;const n=e(u.store).getCurrentTheme(),o=n?.default_template_types||[];return Y({template:s,templateAreas:n?.default_template_part_areas||[],templateTypes:o})})))),us=(0,d.createRegistrySelector)((e=>t=>{const s=oe(t),n=e(u.store).getPostType(s);return n?.labels?.singular_name}));function ps(e){return e.publishSidebarActive}const ms=window.wp.a11y,hs=window.wp.apiFetch;var gs=s.n(hs);const _s=window.wp.notices,fs=window.wp.i18n;function bs(e,t){return`wp-autosave-block-editor-post-${t?"auto-draft":e}`}function ys(e,t){window.sessionStorage.removeItem(bs(e,t))}const xs=(e,t,s)=>({dispatch:n})=>{n.setEditedPost(e.type,e.id);if("auto-draft"===e.status&&s){let o;o="content"in t?t.content:e.content.raw;let r=(0,x.parse)(o);r=(0,x.synchronizeBlocksWithTemplate)(r,s),n.resetEditorBlocks(r,{__unstableShouldCreateUndoLevel:!1})}t&&Object.values(t).some((([t,s])=>s!==(e[t]?.raw??e[t])))&&n.editPost(t)};function vs(){return k()("wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor",{since:"6.5"}),{type:"DO_NOTHING"}}function ws(){return k()("wp.data.dispatch( 'core/editor' ).resetPost",{since:"6.0",version:"6.3",alternative:"Initialize the editor with the setupEditorState action"}),{type:"DO_NOTHING"}}function Ss(){return k()("wp.data.dispatch( 'core/editor' ).updatePost",{since:"5.7",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function ks(e){return k()("wp.data.dispatch( 'core/editor' ).setupEditorState",{since:"6.5",alternative:"wp.data.dispatch( 'core/editor' ).setEditedPost"}),Cs(e.type,e.id)}function Cs(e,t){return{type:"SET_EDITED_POST",postType:e,postId:t}}const Ps=(e,t)=>({select:s,registry:n})=>{const{id:o,type:r}=s.getCurrentPost();n.dispatch(u.store).editEntityRecord("postType",r,o,e,t)},js=(e={})=>async({select:t,dispatch:s,registry:n})=>{if(!t.isEditedPostSaveable())return;const o=t.getEditedPostContent();e.isAutosave||s.editPost({content:o},{undoIgnore:!0});const r=t.getCurrentPost();let i={id:r.id,...n.select(u.store).getEntityRecordNonTransientEdits("postType",r.type,r.id),content:o};s({type:"REQUEST_POST_UPDATE_START",options:e});let a=!1;try{i=await(0,h.applyFiltersAsync)("editor.preSavePost",i,e)}catch(e){a=e}if(!a)try{await n.dispatch(u.store).saveEntityRecord("postType",r.type,i,e)}catch(e){a=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while updating.")}if(a||(a=n.select(u.store).getLastEntitySaveError("postType",r.type,r.id)),!a)try{await(0,h.applyFilters)("editor.__unstableSavePost",Promise.resolve(),e)}catch(e){a=e}if(!a)try{await(0,h.doActionAsync)("editor.savePost",{id:r.id,type:r.type},e)}catch(e){a=e}if(s({type:"REQUEST_POST_UPDATE_FINISH",options:e}),e.isAutosave||"wp_template"!==r.type||"number"!=typeof r.id&&!/^\d+$/.test(r.id)||async function({select:e,registry:t}){const s=e.getEditorSettings();if(s.onNavigateToPreviousEntityRecord)return;const{id:n,slug:o}=e.getCurrentPost(),r=await t.select(u.store).getEntityRecord("root","site");if(r.active_templates[o]===n)return;const i=await t.resolveSelect(u.store).getCurrentTheme(),a=i?.default_template_types.find((e=>e.slug===o));await t.dispatch(_s.store).createNotice("info",(0,fs.sprintf)((0,fs.__)('Do you want to activate this "%s" template?'),a?.title??o),{id:"template-activate-notice",actions:[{label:(0,fs.__)("Activate"),onClick:async()=>{await t.dispatch(_s.store).createNotice("info",(0,fs.__)("Activating template…"),{id:"template-activate-notice"});try{const e=await t.select(u.store).getEntityRecord("root","site");await t.dispatch(u.store).saveEntityRecord("root","site",{active_templates:{...e.active_templates,[o]:n}},{throwOnError:!0}),await t.dispatch(_s.store).createSuccessNotice((0,fs.__)("Template activated."),{id:"template-activate-notice"})}catch(e){throw await t.dispatch(_s.store).createErrorNotice((0,fs.__)("Template activation failed."),{id:"template-activate-notice"}),e}}}]})}({select:t,dispatch:s,registry:n}),a){const e=function(e){const{post:t,edits:s,error:n}=e;if(n&&"rest_autosave_no_changes"===n.code)return[];const o=-1!==["publish","private","future"].indexOf(t.status);if("offline_error"===n.code){const e={publish:(0,fs.__)("Publishing failed because you were offline."),private:(0,fs.__)("Publishing failed because you were offline."),future:(0,fs.__)("Scheduling failed because you were offline."),default:(0,fs.__)("Updating failed because you were offline.")};return[!o&&s.status in e?e[s.status]:e.default,{id:"editor-save"}]}const r={publish:(0,fs.__)("Publishing failed."),private:(0,fs.__)("Publishing failed."),future:(0,fs.__)("Scheduling failed."),default:(0,fs.__)("Updating failed.")};let i=!o&&s.status in r?r[s.status]:r.default;return n.message&&!/<\/?[^>]*>/.test(n.message)&&(i=[i,n.message].join(" ")),[i,{id:"editor-save"}]}({post:r,edits:i,error:a});e.length&&n.dispatch(_s.store).createErrorNotice(...e)}else{const s=t.getCurrentPost(),o=function(e){const{previousPost:t,post:s,postType:n}=e;if(e.options?.isAutosave)return[];const o=["publish","private","future"],r=o.includes(t.status),i=o.includes(s.status),a="trash"===s.status&&"trash"!==t.status;let l,c,d=n?.viewable??!1;a?(l=n.labels.item_trashed,d=!1):r||i?r&&!i?(l=n.labels.item_reverted_to_draft,d=!1):l=!r&&i?{publish:n.labels.item_published,private:n.labels.item_published_privately,future:n.labels.item_scheduled}[s.status]:n.labels.item_updated:(l=(0,fs.__)("Draft saved."),c=!0);const u=[];return d&&u.push({label:c?(0,fs.__)("View Preview"):n.labels.view_item,url:s.link,openInNewTab:!0}),[l,{id:"editor-save",type:"snackbar",actions:u}]}({previousPost:r,post:s,postType:await n.resolveSelect(u.store).getPostType(s.type),options:e});o.length&&n.dispatch(_s.store).createSuccessNotice(...o),e.isAutosave||n.dispatch(g.store).__unstableMarkLastChangeAsPersistent()}};function Es(){return k()("wp.data.dispatch( 'core/editor' ).refreshPost",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}const Ts=()=>async({select:e,dispatch:t,registry:s})=>{const n=e.getCurrentPostType(),o=await s.resolveSelect(u.store).getPostType(n),{rest_base:r,rest_namespace:i="wp/v2"}=o;t({type:"REQUEST_POST_DELETE_START"});try{const s=e.getCurrentPost();await gs()({path:`/${i}/${r}/${s.id}`,method:"DELETE"}),await t.savePost()}catch(e){s.dispatch(_s.store).createErrorNotice(...(a={error:e},[a.error.message&&"unknown_error"!==a.error.code?a.error.message:(0,fs.__)("Trashing failed"),{id:"editor-trash-fail"}]))}var a;t({type:"REQUEST_POST_DELETE_FINISH"})},Bs=({local:e=!1,...t}={})=>async({select:s,dispatch:n})=>{const o=s.getCurrentPost();if("wp_template"!==o.type)if(e){const e=s.isEditedPostNew(),t=s.getEditedPostAttribute("title"),n=s.getEditedPostAttribute("content"),r=s.getEditedPostAttribute("excerpt");!function(e,t,s,n,o){window.sessionStorage.setItem(bs(e,t),JSON.stringify({post_title:s,content:n,excerpt:o}))}(o.id,e,t,n,r)}else await n.savePost({isAutosave:!0,...t})},Is=({forceIsAutosaveable:e}={})=>async({select:t,dispatch:s})=>{if((e||t.isEditedPostAutosaveable())&&!t.isPostLocked()){["draft","auto-draft"].includes(t.getEditedPostAttribute("status"))?await s.savePost({isPreview:!0}):await s.autosave({isPreview:!0})}return t.getEditedPostPreviewLink()},Ns=()=>({registry:e})=>{e.dispatch(u.store).redo()},Rs=()=>({registry:e})=>{e.dispatch(u.store).undo()};function Ds(){return k()("wp.data.dispatch( 'core/editor' ).createUndoLevel",{since:"6.0",version:"6.3",alternative:"Use the core entities store instead"}),{type:"DO_NOTHING"}}function As(e){return{type:"UPDATE_POST_LOCK",lock:e}}const Ms=()=>({registry:e})=>{e.dispatch(C.store).set("core","isPublishSidebarEnabled",!0)},Ls=()=>({registry:e})=>{e.dispatch(C.store).set("core","isPublishSidebarEnabled",!1)};function Os(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Fs(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Vs(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Us(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}const Hs=(e,t={})=>({select:s,dispatch:n,registry:o})=>{const{__unstableShouldCreateUndoLevel:r,selection:i}=t,a={blocks:e,selection:i};if(!1!==r){const{id:e,type:t}=s.getCurrentPost();if(o.select(u.store).getEditedEntityRecord("postType",t,e).blocks===a.blocks)return void o.dispatch(u.store).__unstableCreateUndoLevel("postType",t,e);a.content=({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e)}n.editPost(a)};function zs(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}const Gs=e=>({dispatch:t,registry:s,select:n})=>{n.__unstableIsEditorReady()&&!n.getEditorSettings().isPreviewMode&&(s.dispatch(g.store).clearSelectedBlock(),t.editPost({selection:void 0},{undoIgnore:!0})),t({type:"SET_RENDERING_MODE",mode:e})};function $s(e){return{type:"SET_DEVICE_TYPE",deviceType:e}}const Ws=e=>({registry:t})=>{const s=t.select(C.store).get("core","inactivePanels")??[];let n;n=!!s?.includes(e)?s.filter((t=>t!==e)):[...s,e],t.dispatch(C.store).set("core","inactivePanels",n)},Zs=e=>({registry:t})=>{const s=t.select(C.store).get("core","openPanels")??[];let n;n=!!s?.includes(e)?s.filter((t=>t!==e)):[...s,e],t.dispatch(C.store).set("core","openPanels",n)};function Ys(e){return{type:"REMOVE_PANEL",panelName:e}}const qs=e=>({dispatch:t,registry:s})=>{"object"==typeof e&&e.hasOwnProperty("rootClientId")&&e.hasOwnProperty("insertionIndex")&&$(s.dispatch(g.store)).setInsertionPoint({rootClientId:e.rootClientId,index:e.insertionIndex}),t({type:"SET_IS_INSERTER_OPENED",value:e})};function Ks(e){return{type:"SET_IS_LIST_VIEW_OPENED",isOpen:e}}const Qs=({createNotice:e=!0}={})=>({dispatch:t,registry:s})=>{const n=s.select(C.store).get("core","distractionFree");n&&s.dispatch(C.store).set("core","fixedToolbar",!1),n||s.batch((()=>{s.dispatch(C.store).set("core","fixedToolbar",!0),t.setIsInserterOpened(!1),t.setIsListViewOpened(!1),$(s.dispatch(g.store)).resetZoomLevel()})),s.batch((()=>{s.dispatch(C.store).set("core","distractionFree",!n),e&&s.dispatch(_s.store).createInfoNotice(n?(0,fs.__)("Distraction free mode deactivated."):(0,fs.__)("Distraction free mode activated."),{id:"core/editor/distraction-free-mode/notice",type:"snackbar",actions:[{label:(0,fs.__)("Undo"),onClick:()=>{s.batch((()=>{s.dispatch(C.store).set("core","fixedToolbar",n),s.dispatch(C.store).toggle("core","distractionFree")}))}}]})}))},Xs=()=>({registry:e})=>{e.dispatch(C.store).toggle("core","focusMode");const t=e.select(C.store).get("core","focusMode");e.dispatch(_s.store).createInfoNotice(t?(0,fs.__)("Spotlight mode activated."):(0,fs.__)("Spotlight mode deactivated."),{id:"core/editor/toggle-spotlight-mode/notice",type:"snackbar",actions:[{label:(0,fs.__)("Undo"),onClick:()=>{e.dispatch(C.store).toggle("core","focusMode")}}]})},Js=()=>({registry:e})=>{e.dispatch(C.store).toggle("core","fixedToolbar");const t=e.select(C.store).get("core","fixedToolbar");e.dispatch(_s.store).createInfoNotice(t?(0,fs.__)("Top toolbar activated."):(0,fs.__)("Top toolbar deactivated."),{id:"core/editor/toggle-top-toolbar/notice",type:"snackbar",actions:[{label:(0,fs.__)("Undo"),onClick:()=>{e.dispatch(C.store).toggle("core","fixedToolbar")}}]})},en=e=>({dispatch:t,registry:s})=>{if(s.dispatch(C.store).set("core","editorMode",e),"visual"!==e&&(s.dispatch(g.store).clearSelectedBlock(),$(s.dispatch(g.store)).resetZoomLevel()),"visual"===e)(0,ms.speak)((0,fs.__)("Visual editor selected"),"assertive");else if("text"===e){s.select(C.store).get("core","distractionFree")&&t.toggleDistractionFree(),(0,ms.speak)((0,fs.__)("Code editor selected"),"assertive")}};function tn(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function sn(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function nn(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}const on=e=>(...t)=>({registry:s})=>{k()("`wp.data.dispatch( 'core/editor' )."+e+"`",{since:"5.3",alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`",version:"6.2"}),s.dispatch(g.store)[e](...t)},rn=on("resetBlocks"),an=on("receiveBlocks"),ln=on("updateBlock"),cn=on("updateBlockAttributes"),dn=on("selectBlock"),un=on("startMultiSelect"),pn=on("stopMultiSelect"),mn=on("multiSelect"),hn=on("clearSelectedBlock"),gn=on("toggleSelection"),_n=on("replaceBlocks"),fn=on("replaceBlock"),bn=on("moveBlocksDown"),yn=on("moveBlocksUp"),xn=on("moveBlockToPosition"),vn=on("insertBlock"),wn=on("insertBlocks"),Sn=on("showInsertionPoint"),kn=on("hideInsertionPoint"),Cn=on("setTemplateValidity"),Pn=on("synchronizeTemplate"),jn=on("mergeBlocks"),En=on("removeBlocks"),Tn=on("removeBlock"),Bn=on("toggleBlockMode"),In=on("startTyping"),Nn=on("stopTyping"),Rn=on("enterFormattedText"),Dn=on("exitFormattedText"),An=on("insertDefaultBlock"),Mn=on("updateBlockListSettings"),Ln=window.wp.htmlEntities;function On(e){return!!e&&(e.source===D&&(Boolean(e?.plugin)||e?.has_theme_file))}const Fn=window.wp.components;function Vn(e){return"wp_template"===e.type||"wp_template_part"===e.type}function Un(e,t=(0,fs.__)("(no title)")){let s="";return"string"==typeof e.title?s=(0,Ln.decodeEntities)(e.title):e.title&&"rendered"in e.title?s=(0,Ln.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title&&(s=(0,Ln.decodeEntities)(e.title.raw)),s||t}const Hn={id:"duplicate-post",label:(0,fs._x)("Duplicate","action label"),isEligible:({status:e})=>"trash"!==e,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)({...e[0],title:(0,fs.sprintf)((0,fs._x)("%s (Copy)","post"),Un(e[0]))}),[r,i]=(0,p.useState)(!1),{saveEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:m}=(0,d.useDispatch)(_s.store);return(0,c.jsx)("form",{onSubmit:async function(e){if(e.preventDefault(),r)return;const o="wp_template"===n.type,c={status:o?"publish":"draft",title:n.title,slug:o?n.slug:n.title||(0,fs.__)("No title"),comment_status:n.comment_status,content:"string"==typeof n.content?n.content:n.content.raw,excerpt:"string"==typeof n.excerpt?n.excerpt:n.excerpt?.raw,meta:n.meta,parent:n.parent,password:n.password,template:n.template,format:n.format,featured_media:n.featured_media,menu_order:n.menu_order,ping_status:n.ping_status},d="wp:action-assign-";Object.keys(n?._links||{}).filter((e=>e.startsWith(d))).map((e=>e.slice(17))).forEach((e=>{n.hasOwnProperty(e)&&(c[e]=n[e])})),i(!0);try{const e=await a("postType",n.type,c,{throwOnError:!0});l((0,fs.sprintf)((0,fs.__)('"%s" successfully created.'),Un(e)),{id:"duplicate-post-action",type:"snackbar"}),s&&s([e])}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,fs.__)("An error occurred while duplicating the page.");m(s,{type:"snackbar"})}finally{i(!1),t?.()}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:3,children:["string"==typeof n.id&&(0,c.jsx)("div",{children:(0,fs.__)("You are about to duplicate a bundled template. Changes will not be live until you activate the new template.")}),(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),value:Un(n),onChange:e=>o((t=>({...t,title:e||(0,fs.__)("No title")})))}),(0,c.jsxs)(Fn.__experimentalHStack,{spacing:2,justify:"end",children:[(0,c.jsx)(Fn.Button,{variant:"tertiary",onClick:t,__next40pxDefaultSize:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{variant:"primary",type:"submit",isBusy:r,"aria-disabled":r,__next40pxDefaultSize:!0,children:(0,fs._x)("Duplicate","action label")})]})]})})}};var zn=Hn,Gn=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})});var $n={id:"view-post",label:(0,fs._x)("View","verb"),isPrimary:!0,icon:Gn,isEligible:e=>"trash"!==e.status,callback(e,{onActionPerformed:t}){const s=e[0];window.open(s?.link,"_blank"),t&&t(e)}};var Wn={id:"view-post-revisions",context:"list",label(e){const t=e[0]._links?.["version-history"]?.[0]?.count??0;return(0,fs.sprintf)((0,fs.__)("View revisions (%d)"),t)},isEligible(e){if("trash"===e.status)return!1;return!!(e?._links?.["predecessor-version"]?.[0]?.id??null)&&(e?._links?.["version-history"]?.[0]?.count??0)>1},callback(e,{onActionPerformed:t}){const s=e[0],n=(0,w.addQueryArgs)("revision.php",{revision:s?._links?.["predecessor-version"]?.[0]?.id});document.location.href=n,t&&t(e)}},Zn=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M16.5 7.5 10 13.9l-2.5-2.4-1 1 3.5 3.6 7.5-7.6z"})});var Yn=function(){return Yn=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++)for(var o in t=arguments[s])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yn.apply(this,arguments)};Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function qn(e){return e.toLowerCase()}var Kn=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],Qn=/[^A-Z0-9]+/gi;function Xn(e,t,s){return t instanceof RegExp?e.replace(t,s):t.reduce((function(e,t){return e.replace(t,s)}),e)}function Jn(e,t){return void 0===t&&(t={}),function(e,t){void 0===t&&(t={});for(var s=t.splitRegexp,n=void 0===s?Kn:s,o=t.stripRegexp,r=void 0===o?Qn:o,i=t.transform,a=void 0===i?qn:i,l=t.delimiter,c=void 0===l?" ":l,d=Xn(Xn(e,n,"$1\0$2"),r,"\0"),u=0,p=d.length;"\0"===d.charAt(u);)u++;for(;"\0"===d.charAt(p-1);)p--;return d.slice(u,p).split("\0").map(a).join(c)}(e,Yn({delimiter:"."},t))}function eo(e,t){return void 0===t&&(t={}),Jn(e,Yn({delimiter:"-"},t))}function to(e,t){return`fields-create-template-part-modal__area-option-${e}-${t}`}function so(e,t){return`fields-create-template-part-modal__area-option-description-${e}-${t}`}function no({modalTitle:e,...t}){const s=(0,d.useSelect)((e=>e(u.store).getPostType("wp_template_part")?.labels?.add_new_item),[]);return(0,c.jsx)(Fn.Modal,{title:e||s,onRequestClose:t.closeModal,overlayClassName:"fields-create-template-part-modal",focusOnMount:"firstContentElement",size:"medium",children:(0,c.jsx)(ro,{...t})})}const oo=e=>"header"===e?O:"footer"===e?F:"sidebar"===e?V:U;function ro({defaultArea:e="uncategorized",blocks:t=[],confirmLabel:s=(0,fs.__)("Add"),closeModal:n,onCreate:o,onError:r,defaultTitle:i=""}){const{createErrorNotice:a}=(0,d.useDispatch)(_s.store),{saveEntityRecord:l}=(0,d.useDispatch)(u.store),h=(0,d.useSelect)((e=>e(u.store).getEntityRecords("postType","wp_template_part",{per_page:-1})),[])??[],[g,_]=(0,p.useState)(i),[f,b]=(0,p.useState)(e),[y,v]=(0,p.useState)(!1),w=(0,m.useInstanceId)(no),S=(0,d.useSelect)((e=>e(u.store).getCurrentTheme()?.default_template_part_areas),[]);async function k(){if(g&&!y)try{v(!0);const e=((e,t)=>{const s=e.toLowerCase(),n=t.map((e=>e.title.rendered.toLowerCase()));if(!n.includes(s))return e;let o=2;for(;n.includes(`${s} ${o}`);)o++;return`${e} ${o}`})(g,h),s=(e=>eo(e).replace(/[^\w-]+/g,"")||"wp-custom-part")(e),n=await l("postType","wp_template_part",{slug:s,title:e,content:(0,x.serialize)(t),area:f},{throwOnError:!0});await o(n)}catch(e){const t=e instanceof Error&&"code"in e&&e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while creating the template part.");a(t,{type:"snackbar"}),r?.()}finally{v(!1)}}return(0,c.jsx)("form",{onSubmit:async e=>{e.preventDefault(),await k()},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"4",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,fs.__)("Name"),value:g,onChange:_,required:!0}),(0,c.jsxs)("fieldset",{className:"fields-create-template-part-modal__area-fieldset",children:[(0,c.jsx)(Fn.BaseControl.VisualLabel,{as:"legend",children:(0,fs.__)("Area")}),(0,c.jsx)("div",{className:"fields-create-template-part-modal__area-radio-group",children:(S??[]).map((e=>{const t=oo(e.icon);return(0,c.jsxs)("div",{className:"fields-create-template-part-modal__area-radio-wrapper",children:[(0,c.jsx)("input",{type:"radio",id:to(e.area,w),name:`fields-create-template-part-modal__area-${w}`,value:e.area,checked:f===e.area,onChange:()=>{b(e.area)},"aria-describedby":so(e.area,w)}),(0,c.jsx)(Fn.Icon,{icon:t,className:"fields-create-template-part-modal__area-radio-icon"}),(0,c.jsx)("label",{htmlFor:to(e.area,w),className:"fields-create-template-part-modal__area-radio-label",children:e.label}),(0,c.jsx)(Fn.Icon,{icon:Zn,className:"fields-create-template-part-modal__area-radio-checkmark"}),(0,c.jsx)("p",{className:"fields-create-template-part-modal__area-radio-description",id:so(e.area,w),children:e.description})]},e.area)}))})]}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{n()},children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit","aria-disabled":!g||y,isBusy:y,children:s})]})]})})}const io={id:"duplicate-template-part",label:(0,fs._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"===e.type,modalHeader:(0,fs._x)("Duplicate template part","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{const[s]=e,n=(0,p.useMemo)((()=>s.blocks??(0,x.parse)("string"==typeof s.content?s.content:s.content.raw,{__unstableSkipMigrationLogs:!0})),[s.content,s.blocks]),{createSuccessNotice:o}=(0,d.useDispatch)(_s.store);return(0,c.jsx)(ro,{blocks:n,defaultArea:s.area,defaultTitle:(0,fs.sprintf)((0,fs._x)("%s (Copy)","template part"),Un(s)),onCreate:function(e){o((0,fs.sprintf)((0,fs._x)('"%s" duplicated.',"template part"),Un(e)),{type:"snackbar",id:"edit-site-patterns-success"}),t?.()},onError:t,confirmLabel:(0,fs._x)("Duplicate","action label"),closeModal:t??(()=>{})})}};var ao=io;const lo=window.wp.patterns,{lock:co,unlock:uo}=(0,z.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/fields"),{CreatePatternModalContents:po,useDuplicatePatternProps:mo}=uo(lo.privateApis),ho={id:"duplicate-pattern",label:(0,fs._x)("Duplicate","action label"),isEligible:e=>"wp_template_part"!==e.type,modalHeader:(0,fs._x)("Duplicate pattern","action label"),modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t})=>{const[s]=e,n=mo({pattern:s,onSuccess:()=>t?.()});return(0,c.jsx)(po,{onClose:t,confirmLabel:(0,fs._x)("Duplicate","action label"),...n})}};var go=ho;const{PATTERN_TYPES:_o}=uo(lo.privateApis),fo={id:"rename-post",label:(0,fs.__)("Rename"),modalFocusOnMount:"firstContentElement",isEligible:e=>"trash"!==e.status&&(("wp_template"!==e.type||"string"!=typeof e.id)&&(["wp_template_part",...Object.values(_o)].includes(e.type)?function(e){return"wp_template_part"===e.type}(e)?"custom"===e.source&&!e?.has_theme_file&&e.permissions?.update:e.type===_o.user&&e.permissions?.update:e.permissions?.update)),RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n]=e,[o,r]=(0,p.useState)((()=>Un(n,""))),{editEntityRecord:i,saveEditedEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:m}=(0,d.useDispatch)(_s.store);return(0,c.jsx)("form",{onSubmit:async function(c){c.preventDefault();try{await i("postType",n.type,n.id,{title:o}),r(""),t?.(),await a("postType",n.type,n.id,{throwOnError:!0}),l((0,fs.__)("Name updated"),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,fs.__)("An error occurred while updating the name");m(s,{type:"snackbar"})}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)("Name"),value:o,onChange:r,required:!0}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",children:(0,fs.__)("Save")})]})]})})}};var bo=fo;const yo={id:"order-pages",label:(0,fs.__)("Order"),isEligible:({status:e})=>"trash"!==e,modalFocusOnMount:"firstContentElement",RenderModal:function({items:e,closeModal:t,onActionPerformed:s}){const[n,o]=(0,p.useState)(e[0]),{editEntityRecord:r,saveEditedEntityRecord:i}=(0,d.useDispatch)(u.store),{createSuccessNotice:a,createErrorNotice:l}=(0,d.useDispatch)(_s.store),m=function(e){return"number"==typeof e.menu_order&&Number.isInteger(e.menu_order)&&e.menu_order>0}(n);return(0,c.jsx)("form",{onSubmit:async function(o){if(o.preventDefault(),m)try{await r("postType",n.type,n.id,{menu_order:n.menu_order}),t?.(),await i("postType",n.type,n.id,{throwOnError:!0}),a((0,fs.__)("Order updated."),{type:"snackbar"}),s?.(e)}catch(e){const t=e,s=t.message&&"unknown_error"!==t.code?t.message:(0,fs.__)("An error occurred while updating the order");l(s,{type:"snackbar"})}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)("div",{children:(0,fs.__)("Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.")}),(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,label:(0,fs.__)("Order"),type:"number",value:"number"==typeof n.menu_order&&Number.isInteger(n.menu_order)?String(n.menu_order):"",onChange:e=>{const t=parseInt(e,10);o({...n,menu_order:isNaN(t)?void 0:t})}}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",accessibleWhenDisabled:!0,disabled:!m,children:(0,fs.__)("Save")})]})]})})}};var xo=yo;"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(e,t,s){const n=Number(0xffffffffn&t),o=Number(t>>32n);this.setUint32(e+(s?0:4),n,s),this.setUint32(e+(s?4:0),o,s)}});var vo=e=>new DataView(new ArrayBuffer(e)),wo=e=>new Uint8Array(e.buffer||e),So=e=>(new TextEncoder).encode(String(e)),ko=e=>Math.min(4294967295,Number(e)),Co=e=>Math.min(65535,Number(e));function Po(e,t,s){void 0===t||t instanceof Date||(t=new Date(t));const n=void 0!==e;if(s||(s=n?436:509),e instanceof File)return{isFile:n,t:t||new Date(e.lastModified),bytes:e.stream(),mode:s};if(e instanceof Response)return{isFile:n,t:t||new Date(e.headers.get("Last-Modified")||Date.now()),bytes:e.body,mode:s};if(void 0===t)t=new Date;else if(isNaN(t))throw new Error("Invalid modification date.");if(!n)return{isFile:n,t,mode:s};if("string"==typeof e)return{isFile:n,t,bytes:So(e),mode:s};if(e instanceof Blob)return{isFile:n,t,bytes:e.stream(),mode:s};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:n,t,bytes:e,mode:s};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:n,t,bytes:wo(e),mode:s};if(Symbol.asyncIterator in e)return{isFile:n,t,bytes:jo(e[Symbol.asyncIterator]()),mode:s};throw new TypeError("Unsupported input format.")}function jo(e,t=e){return new ReadableStream({async pull(t){let s=0;for(;t.desiredSize>s;){const n=await e.next();if(!n.value){t.close();break}{const e=Eo(n.value);t.enqueue(e),s+=e.byteLength}}},cancel(e){t.throw?.(e)}})}function Eo(e){return"string"==typeof e?So(e):e instanceof Uint8Array?e:wo(e)}function To(e,t,s){let[n,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[wo(e),1]:[So(e),0]:[void 0,0]}(t);if(e instanceof File)return{i:Io(n||So(e.name)),o:BigInt(e.size),u:o};if(e instanceof Response){const t=e.headers.get("content-disposition"),r=t&&t.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),i=r&&r[1]||e.url&&new URL(e.url).pathname.split("/").findLast(Boolean),a=i&&decodeURIComponent(i),l=s||+e.headers.get("content-length");return{i:Io(n||So(a)),o:BigInt(l),u:o}}return n=Io(n,void 0!==e||void 0!==s),"string"==typeof e?{i:n,o:BigInt(So(e).length),u:o}:e instanceof Blob?{i:n,o:BigInt(e.size),u:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{i:n,o:BigInt(e.byteLength),u:o}:{i:n,o:Bo(e,s),u:o}}function Bo(e,t){return t>-1?BigInt(t):e?void 0:0n}function Io(e,t=1){if(!e||e.every((e=>47===e)))throw new Error("The file must have a name.");if(t)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var No=new Uint32Array(256);for(let e=0;e<256;++e){let t=e;for(let e=0;e<8;++e)t=t>>>1^(1&t&&3988292384);No[e]=t}function Ro(e,t=0){t=~t;for(var s=0,n=e.length;s<n;s++)t=t>>>8^No[255&t^e[s]];return~t>>>0}function Do(e,t,s=0){const n=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,o=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;t.setUint16(s,n,1),t.setUint16(s+2,o,1)}function Ao({i:e,u:t},s){return 8*(!t||(s??function(e){try{Mo.decode(e)}catch{return 0}return 1}(e)))}var Mo=new TextDecoder("utf8",{fatal:1});function Lo(e,t=0){const s=vo(30);return s.setUint32(0,1347093252),s.setUint32(4,754976768|t),Do(e.t,s,10),s.setUint16(26,e.i.length,1),wo(s)}async function*Oo(e){let{bytes:t}=e;if("then"in t&&(t=await t),t instanceof Uint8Array)yield t,e.l=Ro(t,0),e.o=BigInt(t.length);else{e.o=0n;const s=t.getReader();for(;;){const{value:t,done:n}=await s.read();if(n)break;e.l=Ro(t,e.l),e.o+=BigInt(t.length),yield t}}}function Fo(e,t){const s=vo(16+(t?8:0));return s.setUint32(0,1347094280),s.setUint32(4,e.isFile?e.l:0,1),t?(s.setBigUint64(8,e.o,1),s.setBigUint64(16,e.o,1)):(s.setUint32(8,ko(e.o),1),s.setUint32(12,ko(e.o),1)),wo(s)}function Vo(e,t,s=0,n=0){const o=vo(46);return o.setUint32(0,1347092738),o.setUint32(4,755182848),o.setUint16(8,2048|s),Do(e.t,o,12),o.setUint32(16,e.isFile?e.l:0,1),o.setUint32(20,ko(e.o),1),o.setUint32(24,ko(e.o),1),o.setUint16(28,e.i.length,1),o.setUint16(30,n,1),o.setUint16(40,e.mode|(e.isFile?32768:16384),1),o.setUint32(42,ko(t),1),wo(o)}function Uo(e,t,s){const n=vo(s);return n.setUint16(0,1,1),n.setUint16(2,s-4,1),16&s&&(n.setBigUint64(4,e.o,1),n.setBigUint64(12,e.o,1)),n.setBigUint64(s-8,t,1),wo(n)}function Ho(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified,e.mode]]}function zo(e,t={}){const s={"Content-Type":"application/zip","Content-Disposition":"attachment"};return("bigint"==typeof t.length||Number.isInteger(t.length))&&t.length>0&&(s["Content-Length"]=String(t.length)),t.metadata&&(s["Content-Length"]=String((e=>function(e){let t=BigInt(22),s=0n,n=0;for(const o of e){if(!o.i)throw new Error("Every file must have a non-empty name.");if(void 0===o.o)throw new Error(`Missing size for file "${(new TextDecoder).decode(o.i)}".`);const e=o.o>=0xffffffffn,r=s>=0xffffffffn;s+=BigInt(46+o.i.length+(e&&8))+o.o,t+=BigInt(o.i.length+46+(12*r|28*e)),n||(n=e)}return(n||s>=0xffffffffn)&&(t+=BigInt(76)),t+s}(function*(e){for(const t of e)yield To(...Ho(t)[0])}(e)))(t.metadata))),new Response(Go(e,t),{headers:s})}function Go(e,t={}){const s=function(e){const t=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await t.next();if(e.done)return e;const[s,n]=Ho(e.value);return{done:0,value:Object.assign(Po(...n),To(...s))}},throw:t.throw?.bind(t),[Symbol.asyncIterator](){return this}}}(e);return jo(async function*(e,t){const s=[];let n=0n,o=0n,r=0;for await(const i of e){const e=Ao(i,t.buffersAreUTF8);yield Lo(i,e),yield new Uint8Array(i.i),i.isFile&&(yield*Oo(i));const a=i.o>=0xffffffffn,l=12*(n>=0xffffffffn)|28*a;yield Fo(i,a),s.push(Vo(i,n,e,l)),s.push(i.i),l&&s.push(Uo(i,n,l)),a&&(n+=8n),o++,n+=BigInt(46+i.i.length)+i.o,r||(r=a)}let i=0n;for(const e of s)yield e,i+=BigInt(e.length);if(r||n>=0xffffffffn){const e=vo(76);e.setUint32(0,1347094022),e.setBigUint64(4,BigInt(44),1),e.setUint32(12,755182848),e.setBigUint64(24,o,1),e.setBigUint64(32,o,1),e.setBigUint64(40,i,1),e.setBigUint64(48,n,1),e.setUint32(56,1347094023),e.setBigUint64(64,n+i,1),e.setUint32(72,1,1),yield wo(e)}const a=vo(22);a.setUint32(0,1347093766),a.setUint16(8,Co(o),1),a.setUint16(10,Co(o),1),a.setUint32(12,ko(i),1),a.setUint32(16,ko(n),1),yield wo(a)}(s,t),s)}const $o=window.wp.blob;var Wo=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z"})});function Zo(e){return JSON.stringify({__file:e.type,title:Un(e),content:"string"==typeof e.content?e.content:e.content?.raw,syncStatus:e.wp_pattern_sync_status},null,2)}var Yo={id:"export-pattern",label:(0,fs.__)("Export as JSON"),icon:Wo,supportsBulk:!0,isEligible:e=>"wp_block"===e.type,callback:async e=>{if(1===e.length)return(0,$o.downloadBlob)(`${eo(Un(e[0])||e[0].slug)}.json`,Zo(e[0]),"application/json");const t={},s=e.map((e=>{const s=eo(Un(e)||e.slug);return t[s]=(t[s]||0)+1,{name:s+(t[s]>1?"-"+(t[s]-1):"")+".json",lastModified:new Date,input:Zo(e)}}));return(0,$o.downloadBlob)((0,fs.__)("patterns-export")+".zip",await zo(s).blob(),"application/zip")}},qo=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"})});var Ko={id:"restore",label:(0,fs.__)("Restore"),isPrimary:!0,icon:qo,supportsBulk:!0,isEligible:e=>!Vn(e)&&"wp_block"!==e.type&&"trash"===e.status&&e.permissions?.update,async callback(e,{registry:t,onActionPerformed:s}){const{createSuccessNotice:n,createErrorNotice:o}=t.dispatch(_s.store),{editEntityRecord:r,saveEditedEntityRecord:i}=t.dispatch(u.store);await Promise.allSettled(e.map((e=>r("postType",e.type,e.id,{status:"draft"}))));const a=await Promise.allSettled(e.map((e=>i("postType",e.type,e.id,{throwOnError:!0}))));if(a.every((({status:e})=>"fulfilled"===e))){let t;t=1===e.length?(0,fs.sprintf)((0,fs.__)('"%s" has been restored.'),Un(e[0])):"page"===e[0].type?(0,fs.sprintf)((0,fs.__)("%d pages have been restored."),e.length):(0,fs.sprintf)((0,fs.__)("%d posts have been restored."),e.length),n(t,{type:"snackbar",id:"restore-post-action"}),s&&s(e)}else{let e;if(1===a.length){const t=a[0];e=t.reason?.message?t.reason.message:(0,fs.__)("An error occurred while restoring the post.")}else{const t=new Set,s=a.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,fs.__)("An error occurred while restoring the posts."):1===t.size?(0,fs.sprintf)((0,fs.__)("An error occurred while restoring the posts: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("Some errors occurred while restoring the posts: %s"),[...t].join(","))}o(e,{type:"snackbar"})}}};const Qo=async(e,{allowUndo:t=!0}={})=>{const s="edit-site-template-reverted";var n;if((0,d.dispatch)(_s.store).removeNotice(s),(n=e)&&"custom"===n.source&&(Boolean(n?.plugin)||n?.has_theme_file))try{const n=(0,d.select)(u.store).getEntityConfig("postType",e.type);if(!n)return void(0,d.dispatch)(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const o=(0,w.addQueryArgs)(`${n.baseURL}/${e.id}`,{context:"edit",source:e.origin}),r=await gs()({path:o});if(!r)return void(0,d.dispatch)(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const i=({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e),a=(0,d.select)(u.store).getEditedEntityRecord("postType",e.type,e.id);(0,d.dispatch)(u.store).editEntityRecord("postType",e.type,e.id,{content:i,blocks:a.blocks,source:"custom"},{undoIgnore:!0});const l=(0,x.parse)(r?.content?.raw);if((0,d.dispatch)(u.store).editEntityRecord("postType",e.type,r.id,{content:i,blocks:l,source:"theme"}),t){const t=()=>{(0,d.dispatch)(u.store).editEntityRecord("postType",e.type,a.id,{content:i,blocks:a.blocks,source:"custom"})};(0,d.dispatch)(_s.store).createSuccessNotice((0,fs.__)("Template reset."),{type:"snackbar",id:s,actions:[{label:(0,fs.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("Template revert failed. Please reload.");(0,d.dispatch)(_s.store).createErrorNotice(t,{type:"snackbar"})}else(0,d.dispatch)(_s.store).createErrorNotice((0,fs.__)("This template is not revertable."),{type:"snackbar"})},Xo={id:"reset-post",label:(0,fs.__)("Reset"),isEligible:e=>"wp_template_part"===e.type&&"custom"===e?.source&&e?.has_theme_file,icon:qo,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),{saveEditedEntityRecord:r}=(0,d.useDispatch)(u.store),{createSuccessNotice:i,createErrorNotice:a}=(0,d.useDispatch)(_s.store);return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Reset to default and clear all customizations?")}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(!0),await(async()=>{try{for(const t of e)await Qo(t,{allowUndo:!1}),await r("postType",t.type,t.id);i(e.length>1?(0,fs.sprintf)((0,fs.__)("%d items reset."),e.length):(0,fs.sprintf)((0,fs.__)('"%s" reset.'),Un(e[0])),{type:"snackbar",id:"revert-template-action"})}catch(t){const s=1===e.length?(0,fs.__)("An error occurred while reverting the template part."):(0,fs.__)("An error occurred while reverting the template parts."),n=t,o=n.message&&"unknown_error"!==n.code?n.message:s;a(o,{type:"snackbar"})}})(),s?.(e),o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,children:(0,fs.__)("Reset")})]})]})}};var Jo=Xo,er=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})});function tr(e){const t=new Set;if(1===e.length){const s=e[0];s.reason?.message&&t.add(s.reason.message)}else{const s=e.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}}return t}const{PATTERN_TYPES:sr}=uo(lo.privateApis),nr={id:"delete-post",label:(0,fs.__)("Delete"),isPrimary:!0,icon:er,isEligible:e=>Vn(e)?function(e){return!!e&&[e.source,e.source].includes("custom")&&!Boolean("wp_template"===e.type&&e?.plugin)&&!e.has_theme_file}(e):e.type===sr.user,supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),r=e.every((e=>Vn(e)&&e?.has_theme_file));return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:e.length>1?(0,fs.sprintf)((0,fs._n)("Delete %d item?","Delete %d items?",e.length),e.length):(0,fs.sprintf)((0,fs._x)('Delete "%s"?',"template part"),Un(e[0]))}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{variant:"primary",onClick:async()=>{o(!0);const n={success:{messages:{getMessage:e=>r?(0,fs.sprintf)((0,fs.__)('"%s" reset.'),(0,Ln.decodeEntities)(Un(e))):(0,fs.sprintf)((0,fs._x)('"%s" deleted.',"template part"),(0,Ln.decodeEntities)(Un(e))),getBatchMessage:()=>r?(0,fs.__)("Items reset."):(0,fs.__)("Items deleted.")}},error:{messages:{getMessage:e=>1===e.size?[...e][0]:r?(0,fs.__)("An error occurred while reverting the item."):(0,fs.__)("An error occurred while deleting the item."),getBatchMessage:e=>0===e.size?r?(0,fs.__)("An error occurred while reverting the items."):(0,fs.__)("An error occurred while deleting the items."):1===e.size?r?(0,fs.sprintf)((0,fs.__)("An error occurred while reverting the items: %s"),[...e][0]):(0,fs.sprintf)((0,fs.__)("An error occurred while deleting the items: %s"),[...e][0]):r?(0,fs.sprintf)((0,fs.__)("Some errors occurred while reverting the items: %s"),[...e].join(",")):(0,fs.sprintf)((0,fs.__)("Some errors occurred while deleting the items: %s"),[...e].join(","))}}};await(async(e,t,s)=>{const{createSuccessNotice:n,createErrorNotice:o}=(0,d.dispatch)(_s.store),{deleteEntityRecord:r}=(0,d.dispatch)(u.store),i=await Promise.allSettled(e.map((e=>r("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(i.every((({status:e})=>"fulfilled"===e))){let o;o=1===i.length?t.success.messages.getMessage(e[0]):t.success.messages.getBatchMessage(e),n(o,{type:t.success.type??"snackbar",id:t.success.id}),s.onActionPerformed?.(e)}else{const e=tr(i);let n="";n=1===i.length?t.error.messages.getMessage(e):t.error.messages.getBatchMessage(e),o(n,{type:t.error.type??"snackbar",id:t.error.id}),s.onActionError?.()}})(e,n,{onActionPerformed:s}),o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Delete")})]})]})}};var or=nr;const rr={id:"move-to-trash",label:(0,fs.__)("Trash"),isPrimary:!0,icon:er,isEligible:e=>"wp_template_part"!==e.type&&"wp_block"!==e.type&&(("wp_template"!==e.type||"string"!=typeof e.id)&&(!!e.status&&!["auto-draft","trash"].includes(e.status)&&e.permissions?.delete)),supportsBulk:!0,hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),{createSuccessNotice:r,createErrorNotice:i}=(0,d.useDispatch)(_s.store),{deleteEntityRecord:a}=(0,d.useDispatch)(u.store);return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:1===e.length?(0,fs.sprintf)((0,fs.__)('Are you sure you want to move "%s" to the trash?'),Un(e[0])):(0,fs.sprintf)((0,fs._n)("Are you sure you want to move %d item to the trash ?","Are you sure you want to move %d items to the trash ?",e.length),e.length)}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",onClick:async()=>{o(!0);const n=await Promise.allSettled(e.map((e=>a("postType",e.type,e.id.toString(),{},{throwOnError:!0}))));if(n.every((({status:e})=>"fulfilled"===e))){let t;t=1===n.length?(0,fs.sprintf)((0,fs.__)('"%s" moved to the trash.'),Un(e[0])):(0,fs.sprintf)((0,fs._n)("%d item moved to the trash.","%d items moved to the trash.",e.length),e.length),r(t,{type:"snackbar",id:"move-to-trash-action"})}else{let e;if(1===n.length){const t=n[0];e=t.reason?.message?t.reason.message:(0,fs.__)("An error occurred while moving the item to the trash.")}else{const t=new Set,s=n.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,fs.__)("An error occurred while moving the items to the trash."):1===t.size?(0,fs.sprintf)((0,fs.__)("An error occurred while moving the item to the trash: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("Some errors occurred while moving the items to the trash: %s"),[...t].join(","))}i(e,{type:"snackbar"})}s&&s(e),o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,children:(0,fs._x)("Trash","verb")})]})]})}};var ir=rr;const ar={id:"permanently-delete",label:(0,fs.__)("Permanently delete"),supportsBulk:!0,icon:er,isEligible(e){if(Vn(e)||"wp_block"===e.type)return!1;const{status:t,permissions:s}=e;return"trash"===t&&s?.delete},hideModalHeader:!0,modalFocusOnMount:"firstContentElement",RenderModal:({items:e,closeModal:t,onActionPerformed:s})=>{const[n,o]=(0,p.useState)(!1),{createSuccessNotice:r,createErrorNotice:i}=(0,d.useDispatch)(_s.store),{deleteEntityRecord:a}=(0,d.useDispatch)(u.store);return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:e.length>1?(0,fs.sprintf)((0,fs._n)("Are you sure you want to permanently delete %d item?","Are you sure you want to permanently delete %d items?",e.length),e.length):(0,fs.sprintf)((0,fs.__)('Are you sure you want to permanently delete "%s"?'),(0,Ln.decodeEntities)(Un(e[0])))}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{variant:"tertiary",onClick:t,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{variant:"primary",onClick:async()=>{o(!0);const n=await Promise.allSettled(e.map((e=>a("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(n.every((({status:e})=>"fulfilled"===e))){let t;t=1===n.length?(0,fs.sprintf)((0,fs.__)('"%s" permanently deleted.'),Un(e[0])):(0,fs.__)("The items were permanently deleted."),r(t,{type:"snackbar",id:"permanently-delete-post-action"}),s?.(e)}else{let e;if(1===n.length){const t=n[0];e=t.reason?.message?t.reason.message:(0,fs.__)("An error occurred while permanently deleting the item.")}else{const t=new Set,s=n.filter((({status:e})=>"rejected"===e));for(const e of s){const s=e;s.reason?.message&&t.add(s.reason.message)}e=0===t.size?(0,fs.__)("An error occurred while permanently deleting the items."):1===t.size?(0,fs.sprintf)((0,fs.__)("An error occurred while permanently deleting the items: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("Some errors occurred while permanently deleting the items: %s"),[...t].join(","))}i(e,{type:"snackbar"})}o(!1),t?.()},isBusy:n,disabled:n,accessibleWhenDisabled:!0,__next40pxDefaultSize:!0,children:(0,fs.__)("Delete permanently")})]})]})}};var lr=ar;const cr=window.wp.mediaUtils;var dr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M5 11.25h14v1.5H5z"})});const ur={id:"featured_media",type:"media",label:(0,fs.__)("Featured Image"),Edit:({data:e,field:t,onChange:s})=>{const{id:n}=t,o=t.getValue({item:e}),r=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(u.store);return t("postType","attachment",o)}),[o]),i=(0,p.useCallback)((e=>s({[n]:e})),[n,s]),a=r?.source_url,l=r?.title?.rendered,m=(0,p.useRef)(null);return(0,c.jsx)("fieldset",{className:"fields-controls__featured-image",children:(0,c.jsx)("div",{className:"fields-controls__featured-image-container",children:(0,c.jsx)(cr.MediaUpload,{onSelect:e=>{i(e.id)},allowedTypes:["image"],render:({open:e})=>(0,c.jsx)("div",{ref:m,role:"button",tabIndex:-1,onClick:()=>{e()},onKeyDown:e,children:(0,c.jsxs)(Fn.__experimentalGrid,{rowGap:0,columnGap:8,templateColumns:"24px 1fr 24px",children:[a&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("img",{className:"fields-controls__featured-image-image",alt:"",width:24,height:24,src:a}),(0,c.jsx)("span",{className:"fields-controls__featured-image-title",children:l})]}),!a&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"fields-controls__featured-image-placeholder",style:{width:"24px",height:"24px"}}),(0,c.jsx)("span",{className:"fields-controls__featured-image-title",children:(0,fs.__)("Choose an image…")})]}),a&&(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Fn.Button,{size:"small",className:"fields-controls__featured-image-remove-button",icon:dr,onClick:e=>{e.stopPropagation(),i(0)}})})]})})})})})},render:({item:e,config:t})=>{const s=e?._embedded?.["wp:featuredmedia"]?.[0],n=s?.source_url;return n?(0,c.jsx)("img",{className:"fields-controls__featured-image-image",src:n,alt:"",srcSet:s?.media_details?.sizes?Object.values(s.media_details.sizes).map((e=>`${e.source_url} ${e.width}w`)).join(", "):void 0,sizes:t?.sizes||"100vw"}):(0,c.jsx)("span",{className:"fields-controls__featured-image-placeholder"})},enableSorting:!1,filterBy:!1};var pr=ur;function mr(e){var t,s,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(s=mr(e[t]))&&(n&&(n+=" "),n+=s)}else for(s in e)e[s]&&(n&&(n+=" "),n+=s);return n}const hr=function(){for(var e,t,s=0,n="",o=arguments.length;s<o;s++)(e=arguments[s])&&(t=mr(e))&&(n&&(n+=" "),n+=t);return n};var gr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})});var _r=function({item:e}){const t=e?._embedded?.author?.[0]?.name,s=e?._embedded?.author?.[0]?.avatar_urls?.[48],[n,o]=(0,p.useState)(!1);return(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"left",spacing:0,children:[!!s&&(0,c.jsx)("div",{className:hr("page-templates-author-field__avatar",{"is-loaded":n}),children:(0,c.jsx)("img",{onLoad:()=>o(!0),alt:(0,fs.__)("Author avatar"),src:s})}),!s&&(0,c.jsx)("div",{className:"page-templates-author-field__icon",children:(0,c.jsx)(Fn.Icon,{icon:gr})}),(0,c.jsx)("span",{className:"page-templates-author-field__name",children:t})]})};const fr={label:(0,fs.__)("Author"),id:"author",type:"integer",getElements:async()=>(await(0,d.resolveSelect)(u.store).getEntityRecords("root","user",{per_page:-1})??[]).map((({id:e,name:t})=>({value:e,label:t}))),render:_r,sort:(e,t,s)=>{const n=e._embedded?.author?.[0]?.name||"",o=t._embedded?.author?.[0]?.name||"";return"asc"===s?n.localeCompare(o):o.localeCompare(n)},filterBy:{operators:["isAny","isNone"]}};var br=fr,yr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z"})}),xr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z"})}),vr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z"})}),wr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"})}),Sr=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z"})});var kr=[{value:"draft",label:(0,fs.__)("Draft"),icon:yr,description:(0,fs.__)("Not ready to publish.")},{value:"future",label:(0,fs.__)("Scheduled"),icon:xr,description:(0,fs.__)("Publish automatically on a chosen date.")},{value:"pending",label:(0,fs.__)("Pending Review"),icon:vr,description:(0,fs.__)("Waiting for review before publishing.")},{value:"private",label:(0,fs.__)("Private"),icon:wr,description:(0,fs.__)("Only visible to site admins and editors.")},{value:"publish",label:(0,fs.__)("Published"),icon:Sr,description:(0,fs.__)("Visible to everyone.")},{value:"trash",label:(0,fs.__)("Trash"),icon:er}];var Cr=function({item:e}){const t=kr.find((({value:t})=>t===e.status)),s=t?.label||e.status,n=t?.icon;return(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"left",spacing:0,children:[n&&(0,c.jsx)("div",{className:"edit-site-post-list__status-icon",children:(0,c.jsx)(Fn.Icon,{icon:n})}),(0,c.jsx)("span",{children:s})]})};var Pr={label:(0,fs.__)("Status"),id:"status",type:"text",elements:kr,render:Cr,Edit:"radio",enableSorting:!1,filterBy:{operators:["isAny"]}};const jr=e=>(0,v.dateI18n)((0,v.getSettings)().formats.datetimeAbbreviated,(0,v.getDate)(e));var Er=({item:e})=>{if(["draft","private"].includes(e.status??""))return(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Modified: <time>%s</time></span>"),jr(e.date??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})});if("future"===e.status)return(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Scheduled: <time>%s</time></span>"),jr(e.date??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})});if("publish"===e.status)return(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Published: <time>%s</time></span>"),jr(e.date??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})});const t=(0,v.getDate)(e.modified??null)>(0,v.getDate)(e.date??null)?e.modified:e.date;return"pending"===e.status?(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)("<span>Modified: <time>%s</time></span>"),jr(t??null)),{span:(0,c.jsx)("span",{}),time:(0,c.jsx)("time",{})}):(0,c.jsx)("time",{children:jr(e.date??null)})};var Tr={id:"date",type:"datetime",label:(0,fs.__)("Date"),render:Er,filterBy:!1},Br=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z"})});const Ir=e=>"object"!=typeof e?"":e.slug||(0,w.cleanForSlug)(Un(e))||e.id.toString(),Nr=({field:e,onChange:t,data:s})=>{const{id:n}=e,o=e.getValue({item:s})||Ir(s),r=s.permalink_template||"",i=/%(?:postname|pagename)%/,[a,l]=r.split(i),u=a,h=l,g=i.test(r),_=(0,p.useRef)(o),f=o||_.current,b=g?`${u}${f}${h}`:(0,w.safeDecodeURIComponent)(s.link||"");(0,p.useEffect)((()=>{o&&void 0===_.current&&(_.current=o)}),[o]);const y=(0,p.useCallback)((e=>t({[n]:e})),[n,t]),{createNotice:x}=(0,d.useDispatch)(_s.store),v=(0,m.useCopyToClipboard)(b,(()=>{x("info",(0,fs.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})})),S="editor-post-url__slug-description-"+(0,m.useInstanceId)(Nr);return(0,c.jsxs)("fieldset",{className:"fields-controls__slug",children:[g&&(0,c.jsxs)(Fn.__experimentalVStack,{children:[(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"0px",children:[(0,c.jsx)("span",{children:(0,fs.__)("Customize the last part of the Permalink.")}),(0,c.jsx)(Fn.ExternalLink,{href:"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink",children:(0,fs.__)("Learn more")})]}),(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,c.jsx)(Fn.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,icon:Br,ref:v,label:(0,fs.__)("Copy")}),label:(0,fs.__)("Link"),hideLabelFromVision:!0,value:o,autoComplete:"off",spellCheck:"false",type:"text",className:"fields-controls__slug-input",onChange:e=>{y(e)},onBlur:()=>{""===o&&y(_.current)},"aria-describedby":S}),(0,c.jsxs)("div",{className:"fields-controls__slug-help",children:[(0,c.jsx)("span",{className:"fields-controls__slug-help-visual-label",children:(0,fs.__)("Permalink:")}),(0,c.jsxs)(Fn.ExternalLink,{className:"fields-controls__slug-help-link",href:b,children:[(0,c.jsx)("span",{className:"fields-controls__slug-help-prefix",children:u}),(0,c.jsx)("span",{className:"fields-controls__slug-help-slug",children:f}),(0,c.jsx)("span",{className:"fields-controls__slug-help-suffix",children:h})]})]})]}),!g&&(0,c.jsx)(Fn.ExternalLink,{className:"fields-controls__slug-help",href:b,children:b})]})};var Rr=Nr;var Dr=({item:e})=>{const t=Ir(e),s=(0,p.useRef)(t);(0,p.useEffect)((()=>{t&&void 0===s.current&&(s.current=t)}),[t]);return`${t||s.current}`};var Ar={id:"slug",type:"text",label:(0,fs.__)("Slug"),Edit:Rr,render:Dr,filterBy:!1},Mr=s(9681),Lr=s.n(Mr);function Or(e){return"object"==typeof e.title&&"rendered"in e.title&&e.title.rendered?(0,Ln.decodeEntities)(e.title.rendered):`#${e?.id} (${(0,fs.__)("no title")})`}const Fr=(e,t)=>{const s=Lr()(e||"").toLowerCase(),n=Lr()(t||"").toLowerCase();return s===n?0:s.startsWith(n)?s.length:1/0};function Vr({data:e,onChangeControl:t}){const[s,n]=(0,p.useState)(null),o=e.parent,r=e.id,i=e.type,{parentPostTitle:a,pageItems:l,isHierarchical:h}=(0,d.useSelect)((e=>{const{getEntityRecord:t,getEntityRecords:n,getPostType:a}=e(u.store),l=a(i),c=l?.hierarchical&&l.viewable,d=o?t("postType",i,o):null,p={per_page:100,exclude:r,parent_exclude:r,orderby:"menu_order",order:"asc",_fields:"id,title,parent",...null!==s&&{search:s}};return{isHierarchical:c,parentPostTitle:d?Or(d):"",pageItems:c?n("postType",i,p):null}}),[s,o,r,i]),g=(0,p.useMemo)((()=>{const e=(t,n=0)=>{const o=t.map((t=>[{value:t.id,label:"— ".repeat(n)+(0,Ln.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],n+1)])).sort((([e],[t])=>Fr(e.rawName,s??"")>=Fr(t.rawName,s??"")?1:-1));return o.flat()};if(!l)return[];let t=l.map((e=>({id:e.id,parent:e.parent??null,name:Or(e)})));s||(t=function(e){const t=e.map((e=>({children:[],...e})));if(t.some((({parent:e})=>null==e)))return t;const s=t.reduce(((e,t)=>{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),n=e=>e.map((e=>{const t=s[e.id];return{...e,children:t&&t.length?n(t):[]}}));return n(s[0]||[])}(t));const n=e(t),r=n.find((e=>e.value===o));return o&&a&&!r&&n.unshift({value:o,label:a,rawName:""}),n.map((e=>({...e,value:e.value.toString()})))}),[l,s,a,o]);if(!h)return null;return(0,c.jsx)(Fn.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)("Parent"),help:(0,fs.__)("Choose a parent page."),value:o?.toString(),options:g,onFilterValueChange:(0,m.debounce)((e=>{n(e)}),300),onChange:e=>{if(e)return t(parseInt(e,10)??0);t(0)},hideLabelFromVision:!0})}var Ur={id:"parent",type:"text",label:(0,fs.__)("Parent"),Edit:({data:e,field:t,onChange:s})=>{const{id:n}=t,o=(0,d.useSelect)((e=>e(u.store).getEntityRecord("root","__unstableBase")?.home),[]),r=(0,p.useCallback)((e=>s({[n]:e})),[n,s]);return(0,c.jsx)("fieldset",{className:"fields-controls__parent",children:(0,c.jsxs)("div",{children:[(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %1$s<wbr />/services<wbr />/pricing.'),(0,w.filterURLForDisplay)(o).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,c.jsx)("wbr",{})}),(0,c.jsx)("p",{children:(0,p.createInterpolateElement)((0,fs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes"),children:void 0})})}),(0,c.jsx)(Vr,{data:e,onChangeControl:r})]})})},render:({item:e})=>{const t=(0,d.useSelect)((t=>{const{getEntityRecord:s}=t(u.store);return e?.parent?s("postType",e.type,e.parent):null}),[e.parent,e.type]);return t?(0,c.jsx)(c.Fragment,{children:Or(t)}):(0,c.jsx)(c.Fragment,{children:(0,fs.__)("None")})},enableSorting:!0,filterBy:!1};var Hr={id:"comment_status",label:(0,fs.__)("Comments"),type:"text",Edit:"radio",enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,fs.__)("Open"),description:(0,fs.__)("Visitors can add new comments and replies.")},{value:"closed",label:(0,fs.__)("Closed"),description:(0,fs.__)("Visitors cannot add new comments or replies. Existing comments remain visible.")}]};var zr={id:"ping_status",label:(0,fs.__)("Trackbacks & Pingbacks"),type:"text",Edit:function({data:e,onChange:t}){const s=e?.ping_status??"open";return(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Enable pingbacks & trackbacks"),checked:"open"===s,onChange:s=>{t({...e,ping_status:s?"open":"closed"})},help:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fs.__)("Learn more about pingbacks & trackbacks")})})},enableSorting:!1,enableHiding:!1,filterBy:!1,elements:[{value:"open",label:(0,fs.__)("Allow"),description:(0,fs.__)("Allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")},{value:"closed",label:(0,fs.__)("Don't allow"),description:(0,fs.__)("Don't allow link notifications from other blogs (pingbacks and trackbacks) on new articles.")}]};var Gr={id:"discussion",label:(0,fs.__)("Discussion"),type:"text",render:({item:e})=>{const t="open"===e.comment_status,s="open"===e.ping_status;return t&&s?(0,fs.__)("Open"):t&&!s?(0,fs.__)("Comments only"):!t&&s?(0,fs.__)("Pings only"):(0,fs.__)("Closed")},filterBy:!1};const $r=[],Wr={id:"template",type:"text",label:(0,fs.__)("Template"),Edit:({data:e,field:t,onChange:s})=>{const{id:n}=t,o=e.type,r="number"==typeof e.id?e.id:parseInt(e.id,10),i=e.slug,{canSwitchTemplate:a,templates:l}=(0,d.useSelect)((e=>{const t=e(u.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:o})??$r,{getHomePage:s,getPostsPageId:n}=uo(e(u.store)),i=n()===+r,a="page"===o&&s()?.postId===+r;return{templates:t,canSwitchTemplate:!i&&!a}}),[r,o]),h=(0,p.useMemo)((()=>a?l.filter((t=>t.is_custom&&t.slug!==e.template&&!!t.content.raw)).map((e=>({name:e.slug,blocks:(0,x.parse)(e.content.raw),title:(0,Ln.decodeEntities)(e.title.rendered),id:e.id}))):[]),[a,e.template,l]),_=(0,m.useAsyncList)(h),f=t.getValue({item:e}),b=l.find((e=>e.slug===f)),y=(0,d.useSelect)((e=>{if(b)return b;let t;if(t=i?"page"===o?`${o}-${i}`:`single-${o}-${i}`:"page"===o?"page":`single-${o}`,o){const s=e(u.store).getDefaultTemplateId({slug:t});return e(u.store).getEntityRecord("postType","wp_template",s)}}),[b,o,i]),[v,w]=(0,p.useState)(!1),S=(0,p.useCallback)((e=>s({[n]:e})),[n,s]);return(0,c.jsxs)("fieldset",{className:"fields-controls__template",children:[(0,c.jsx)(Fn.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:e})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",size:"compact",onClick:e,children:y?Un(y):""}),renderContent:({onToggle:e})=>(0,c.jsxs)(Fn.MenuGroup,{children:[(0,c.jsx)(Fn.MenuItem,{onClick:()=>{w(!0),e()},children:(0,fs.__)("Change template")}),""!==f&&(0,c.jsx)(Fn.MenuItem,{onClick:()=>{S(""),e()},children:(0,fs.__)("Use default template")})]})}),v&&(0,c.jsx)(Fn.Modal,{title:(0,fs.__)("Choose a template"),onRequestClose:()=>w(!1),overlayClassName:"fields-controls__template-modal",isFullScreen:!0,children:(0,c.jsx)("div",{className:"fields-controls__template-content",children:(0,c.jsx)(g.__experimentalBlockPatternsList,{label:(0,fs.__)("Templates"),blockPatterns:h,shownPatterns:_,onClickPattern:e=>{S(e.name),w(!1)}})})})]})},enableSorting:!1,filterBy:!1};var Zr=Wr;var Yr=function({data:e,onChange:t,field:s}){const[n,o]=(0,p.useState)(!!s.getValue({item:e}));return(0,c.jsxs)(Fn.__experimentalVStack,{as:"fieldset",spacing:4,className:"fields-controls__password",children:[(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Password protected"),help:(0,fs.__)("Only visible to those who know the password"),checked:n,onChange:e=>{o(e),e||t({password:""})}}),n&&(0,c.jsx)("div",{className:"fields-controls__password-input",children:(0,c.jsx)(Fn.TextControl,{label:(0,fs.__)("Password"),onChange:e=>t({password:e}),value:s.getValue({item:e})||"",placeholder:(0,fs.__)("Use a secure password"),type:"text",__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]})};var qr={id:"password",type:"text",label:(0,fs.__)("Password"),Edit:Yr,enableSorting:!1,enableHiding:!1,isVisible:e=>"private"!==e.status,filterBy:!1};function Kr({item:e,className:t,children:s}){const n=Un(e);return(0,c.jsxs)(Fn.__experimentalHStack,{className:hr("fields-field__title",t),alignment:"center",justify:"flex-start",children:[(0,c.jsx)("span",{children:n||(0,fs.__)("(no title)")}),s]})}function Qr({item:e}){return(0,c.jsx)(Kr,{item:e})}const{Badge:Xr}=uo(Fn.privateApis);var Jr={type:"text",id:"title",label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),getValue:({item:e})=>Un(e),render:function({item:e}){const{frontPageId:t,postsPageId:s}=(0,d.useSelect)((e=>{const{getEntityRecord:t}=e(u.store),s=t("root","site");return{frontPageId:s?.page_on_front,postsPageId:s?.page_for_posts}}),[]);return(0,c.jsx)(Kr,{item:e,className:"fields-field__page-title",children:[t,s].includes(e.id)&&(0,c.jsx)(Xr,{children:e.id===t?(0,fs.__)("Homepage"):(0,fs.__)("Posts Page")})})},enableHiding:!1,enableGlobalSearch:!0,filterBy:!1};var ei={type:"text",label:(0,fs.__)("Template"),placeholder:(0,fs.__)("No title"),id:"title",getValue:({item:e})=>Un(e),render:Qr,enableHiding:!1,enableGlobalSearch:!0,filterBy:!1},ti=(0,p.forwardRef)((({icon:e,size:t=24,...s},n)=>(0,p.cloneElement)(e,{width:t,height:t,...s,ref:n}))),si=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z"})});const{PATTERN_TYPES:ni}=uo(lo.privateApis);var oi={type:"text",id:"title",label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),getValue:({item:e})=>Un(e),render:function({item:e}){return(0,c.jsx)(Kr,{item:e,className:"fields-field__pattern-title",children:e.type===ni.theme&&(0,c.jsx)(Fn.Tooltip,{placement:"top",text:(0,fs.__)("This pattern cannot be edited."),children:(0,c.jsx)(ti,{icon:si,size:24})})})},enableHiding:!1,enableGlobalSearch:!0,filterBy:!1};var ri={type:"text",id:"title",label:(0,fs.__)("Title"),placeholder:(0,fs.__)("No title"),getValue:({item:e})=>Un(e),render:Qr,enableHiding:!0,enableGlobalSearch:!0,filterBy:!1};var ii=(0,m.createHigherOrderComponent)((e=>({useSubRegistry:t=!0,...s})=>{const n=(0,d.useRegistry)(),[o]=(0,p.useState)((()=>new WeakMap)),r=function(e,t,s){if(!s)return t;let n=e.get(t);return n||(n=(0,d.createRegistry)({"core/block-editor":g.storeConfig},t),n.registerStore("core/editor",vc),e.set(t,n)),n}(o,n,t);return r===n?(0,c.jsx)(e,{registry:n,...s}):(0,c.jsx)(d.RegistryProvider,{value:r,children:(0,c.jsx)(e,{registry:r,...s})})}),"withRegistryProvider");const ai=(e,t)=>`<a ${li(e)}>${t}</a>`,li=e=>`href="${e}" target="_blank" rel="noreferrer noopener"`,ci=e=>{const{title:t,foreign_landing_url:s,creator:n,creator_url:o,license:r,license_version:i,license_url:a}=e,l=((e,t)=>{let s=e.trim();return"pdm"!==e&&(s=e.toUpperCase().replace("SAMPLING","Sampling")),t&&(s+=` ${t}`),["pdm","cc0"].includes(e)||(s=`CC ${s}`),s})(r,i),c=(0,Ln.decodeEntities)(n);let d;return d=c?t?(0,fs.sprintf)((0,fs._x)('"%1$s" by %2$s/ %3$s',"caption"),ai(s,(0,Ln.decodeEntities)(t)),o?ai(o,c):c,a?ai(`${a}?ref=openverse`,l):l):(0,fs.sprintf)((0,fs._x)("<a %1$s>Work</a> by %2$s/ %3$s","caption"),li(s),o?ai(o,c):c,a?ai(`${a}?ref=openverse`,l):l):t?(0,fs.sprintf)((0,fs._x)('"%1$s"/ %2$s',"caption"),ai(s,(0,Ln.decodeEntities)(t)),a?ai(`${a}?ref=openverse`,l):l):(0,fs.sprintf)((0,fs._x)("<a %1$s>Work</a>/ %2$s","caption"),li(s),a?ai(`${a}?ref=openverse`,l):l),d.replace(/\s{2}/g," ")},di=async(e={})=>(await(0,d.resolveSelect)(u.store).getEntityRecords("postType","attachment",{...e,orderBy:e?.search?"relevance":"date"})).map((e=>({...e,alt:e.alt_text,url:e.source_url,previewUrl:e.media_details?.sizes?.medium?.source_url,caption:e.caption?.raw})));var ui=[{name:"images",labels:{name:(0,fs.__)("Images"),search_items:(0,fs.__)("Search images")},mediaType:"image",fetch:async(e={})=>di({...e,media_type:"image"})},{name:"videos",labels:{name:(0,fs.__)("Videos"),search_items:(0,fs.__)("Search videos")},mediaType:"video",fetch:async(e={})=>di({...e,media_type:"video"})},{name:"audio",labels:{name:(0,fs.__)("Audio"),search_items:(0,fs.__)("Search audio")},mediaType:"audio",fetch:async(e={})=>di({...e,media_type:"audio"})},{name:"openverse",labels:{name:(0,fs.__)("Openverse"),search_items:(0,fs.__)("Search Openverse")},mediaType:"image",async fetch(e={}){const t={...e,mature:!1,excluded_source:"flickr,inaturalist,wikimedia",license:"pdm,cc0"},s={per_page:"page_size",search:"q"},n=new URL("https://api.openverse.org/v1/images/");Object.entries(t).forEach((([e,t])=>{const o=s[e]||e;n.searchParams.set(o,t)}));const o=await window.fetch(n,{headers:{"User-Agent":"WordPress/inserter-media-fetch"}});return(await o.json()).results.map((e=>({...e,title:e.title?.toLowerCase().startsWith("file:")?e.title.slice(5):e.title,sourceId:e.id,id:void 0,caption:ci(e),previewUrl:e.thumbnail})))},getReportUrl:({sourceId:e})=>`https://wordpress.org/openverse/image/${e}/report/`,isExternalResource:!0}];const pi={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let mi;const hi=new Uint8Array(16);function gi(){if(!mi&&(mi="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!mi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return mi(hi)}const _i=[];for(let e=0;e<256;++e)_i.push((e+256).toString(16).slice(1));function fi(e,t=0){return _i[e[t+0]]+_i[e[t+1]]+_i[e[t+2]]+_i[e[t+3]]+"-"+_i[e[t+4]]+_i[e[t+5]]+"-"+_i[e[t+6]]+_i[e[t+7]]+"-"+_i[e[t+8]]+_i[e[t+9]]+"-"+_i[e[t+10]]+_i[e[t+11]]+_i[e[t+12]]+_i[e[t+13]]+_i[e[t+14]]+_i[e[t+15]]}const bi=function(e,t,s){if(pi.randomUUID&&!t&&!e)return pi.randomUUID();const n=(e=e||{}).random||(e.rng||gi)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){s=s||0;for(let e=0;e<16;++e)t[s+e]=n[e];return t}return fi(n)},yi=()=>{};function xi({additionalData:e={},allowedTypes:t,filesList:s,maxUploadFileSize:n,onError:o=yi,onFileChange:r,onSuccess:i,multiple:a=!0}){const{receiveEntityRecords:l}=(0,d.dispatch)(u.store),{getCurrentPost:c,getEditorSettings:p}=(0,d.select)(wc),{lockPostAutosaving:m,unlockPostAutosaving:h,lockPostSaving:g,unlockPostSaving:_}=(0,d.dispatch)(wc),f=p().allowedMimeTypes,b=`image-upload-${bi()}`;let y=!1;n=n||p().maxUploadFileSize;const x=c(),v="number"==typeof x?.id?x.id:x?.wp_id,w=v?{post:v}:{},S=()=>{_(b),h(b),y=!1};(0,cr.uploadMedia)({allowedTypes:t,filesList:s,onFileChange:e=>{y?S():(g(b),m(b),y=!0),r?.(e);const t=e.filter((e=>e?.id));if(t?.length){l("postType","attachment",t,void 0,!0)}},onSuccess:i,additionalData:{...w,...e},maxUploadFileSize:n,onError:({message:e})=>{S(),o(e)},wpAllowedMimeTypes:f,multiple:a})}const{sideloadMedia:vi}=$(cr.privateApis);var wi=vi,Si=s(66),ki=s.n(Si);
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
-function Ci(e){return"[object Object]"===Object.prototype.toString.call(e)}function Pi(e){var t,s;return!1!==Ci(e)&&(void 0===(t=e.constructor)||!1!==Ci(s=t.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:ji,cleanEmptyObject:Ei}=$(g.privateApis);function Ti(e,t){return ki()(e,t,{isMergeableObject:Pi,customMerge:e=>{if("backgroundImage"===e)return(e,t)=>t}})}function Bi(){const[e,t,s]=function(){const{globalStylesId:e,isReady:t,settings:s,styles:n,_links:o}=(0,d.useSelect)((e=>{const{getEntityRecord:t,getEditedEntityRecord:s,hasFinishedResolution:n,canUser:o}=e(u.store),r=e(u.store).__experimentalGetCurrentGlobalStylesId();let i;const a=r?o("update",{kind:"root",name:"globalStyles",id:r}):null;r&&"boolean"==typeof a&&(i=a?s("root","globalStyles",r):t("root","globalStyles",r,{context:"view"}));let l=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(l=!r||(a?n("getEditedEntityRecord",["root","globalStyles",r]):n("getEntityRecord",["root","globalStyles",r,{context:"view"}]))),{globalStylesId:r,isReady:l,settings:i?.settings,styles:i?.styles,_links:i?._links}}),[]),{getEditedEntityRecord:r}=(0,d.useSelect)(u.store),{editEntityRecord:i}=(0,d.useDispatch)(u.store);return[t,(0,p.useMemo)((()=>({settings:s??{},styles:n??{},_links:o??{}})),[s,n,o]),(0,p.useCallback)(((t,s={})=>{const n=r("root","globalStyles",e),o="function"==typeof t?t({styles:n?.styles??{},settings:n?.settings??{},_links:n?._links??{}}):t;i("root","globalStyles",e,{styles:Ei(o.styles)||{},settings:Ei(o.settings)||{},_links:Ei(o._links)||{}},s)}),[e,i,r])]}(),[n,o]=function(){const e=(0,d.useSelect)((e=>e(u.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),r=(0,p.useMemo)((()=>o&&t?Ti(o,t):{}),[t,o]);return(0,p.useMemo)((()=>({isReady:e&&n,user:t,base:o,merged:r,setUserConfig:s})),[r,t,o,s,e,n])}const Ii={};function Ni(e){const{RECEIVE_INTERMEDIATE_RESULTS:t}=$(u.privateApis),{getEntityRecords:s}=e(u.store);return s("postType","wp_block",{per_page:-1,[t]:!0})}const Ri=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isPreviewMode","isRTL","locale","maxWidth","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableResolvedAssets","__unstableIsBlockBasedTheme"],{globalStylesDataKey:Di,globalStylesLinksDataKey:Ai,selectBlockPatternsKey:Mi,reusableBlocksSelectKey:Li,sectionRootClientIdKey:Oi,mediaEditKey:Fi}=$(g.privateApis);var Vi=function(e,t,s,n){const o=(0,m.useViewportMatch)("medium"),{allowRightClickOverrides:r,blockTypes:i,focusMode:a,hasFixedToolbar:l,isDistractionFree:c,keepCaretInsideBlock:h,hasUploadPermissions:_,hiddenBlockTypes:f,canUseUnfilteredHTML:b,userCanCreatePages:y,pageOnFront:v,pageForPosts:w,userPatternCategories:S,restBlockPatternCategories:k,sectionRootClientId:P}=(0,d.useSelect)((e=>{const{canUser:r,getRawEntityRecord:i,getEntityRecord:a,getUserPatternCategories:l,getBlockPatternCategories:c}=e(u.store),{get:d}=e(C.store),{getBlockTypes:p}=e(x.store),{getBlocksByName:m,getBlockAttributes:h}=e(g.store),_=r("read",{kind:"root",name:"site"})?a("root","site"):void 0;return{allowRightClickOverrides:d("core","allowRightClickOverrides"),blockTypes:p(),canUseUnfilteredHTML:i("postType",t,s)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:d("core","focusMode"),hasFixedToolbar:d("core","fixedToolbar")||!o,hiddenBlockTypes:d("core","hiddenBlockTypes"),isDistractionFree:d("core","distractionFree"),keepCaretInsideBlock:d("core","keepCaretInsideBlock"),hasUploadPermissions:r("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:r("create",{kind:"postType",name:"page"}),pageOnFront:_?.page_on_front,pageForPosts:_?.page_for_posts,userPatternCategories:l(),restBlockPatternCategories:c(),sectionRootClientId:"template-locked"===n?m("core/post-content")?.[0]??"":m("core/group").find((e=>"main"===h(e)?.tagName))??""}}),[t,s,o,n]),{merged:j}=Bi(),E=j.styles??Ii,T=j._links??Ii,B=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,I=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,N=(0,p.useMemo)((()=>[...B||[]].filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(t)))),[B,t]),R=(0,p.useMemo)((()=>[...I||[],...k||[]].filter(((e,t,s)=>t===s.findIndex((t=>e.name===t.name))))),[I,k]),{undo:D,setIsInserterOpened:A}=(0,d.useDispatch)(xc),{editMediaEntity:M}=$((0,d.useDispatch)(u.store)),{saveEntityRecord:L}=(0,d.useDispatch)(u.store),O=(0,p.useCallback)((e=>y?L("postType","page",e):Promise.reject({message:(0,fs.__)("You do not have permission to create Pages.")})),[L,y]),F=(0,p.useMemo)((()=>{if(f&&f.length>0){return(!0===e.allowedBlockTypes?i.map((({name:e})=>e)):e.allowedBlockTypes||[]).filter((e=>!f.includes(e)))}return e.allowedBlockTypes}),[e.allowedBlockTypes,f,i]),V=!1===e.focusMode;return(0,p.useMemo)((()=>{const s={...Object.fromEntries(Object.entries(e).filter((([e])=>Ri.includes(e)))),[Di]:E,[Ai]:T,allowedBlockTypes:F,allowRightClickOverrides:r,focusMode:a&&!V,hasFixedToolbar:l,isDistractionFree:c,keepCaretInsideBlock:h,[Fi]:_?M:void 0,mediaUpload:_?xi:void 0,mediaSideload:_?wi:void 0,__experimentalBlockPatterns:N,[Mi]:e=>{const{hasFinishedResolution:s,getBlockPatternsForPostType:n}=$(e(u.store)),o=n(t);return s("getBlockPatterns")?o:void 0},[Li]:Ni,__experimentalBlockPatternCategories:R,__experimentalUserPatternCategories:S,__experimentalFetchLinkSuggestions:(t,s)=>(0,u.__experimentalFetchLinkSuggestions)(t,s,e),inserterMediaCategories:ui,__experimentalFetchRichUrlData:u.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:b,__experimentalUndo:D,outlineMode:!c&&"wp_template"===t,__experimentalCreatePageEntity:O,__experimentalUserCanCreatePages:y,pageOnFront:v,pageForPosts:w,__experimentalPreferPatternsOnRoot:"wp_template"===t,templateLock:"wp_navigation"===t?"insert":e.templateLock,template:"wp_navigation"===t?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:A,[Oi]:P,editorTool:"post-only"===n&&"wp_template"!==t?"edit":void 0};return s}),[F,r,a,V,l,c,h,e,_,S,N,R,b,D,O,y,v,w,t,A,P,E,T,n,M])};const zi=["core/post-title","core/post-featured-image","core/post-content"];function Ui(){const e=(0,p.useMemo)((()=>[...(0,h.applyFilters)("editor.postContentBlockTypes",zi)]),[]),t=(0,d.useSelect)((t=>{const{getPostBlocksByName:s}=$(t(xc));return s(e)}),[e]);return t}function Hi(){const e=Ui(),{templateParts:t}=(0,d.useSelect)((e=>{const{getBlocksByName:t}=e(g.store);return{templateParts:t("core/template-part")}}),[]),s=(0,d.useSelect)((e=>{const{getBlockOrder:s}=e(g.store);return t.flatMap((e=>s(e)))}),[t]),n=(0,d.useRegistry)();return(0,p.useEffect)((()=>{const{setBlockEditingMode:e,unsetBlockEditingMode:t}=n.dispatch(g.store);return e("","disabled"),()=>{t("")}}),[n]),(0,p.useEffect)((()=>{const{setBlockEditingMode:t,unsetBlockEditingMode:s}=n.dispatch(g.store);return n.batch((()=>{for(const s of e)t(s,"contentOnly")})),()=>{n.batch((()=>{for(const t of e)s(t)}))}}),[e,n]),(0,p.useEffect)((()=>{const{setBlockEditingMode:e,unsetBlockEditingMode:s}=n.dispatch(g.store);return n.batch((()=>{for(const s of t)e(s,"contentOnly")})),()=>{n.batch((()=>{for(const e of t)s(e)}))}}),[t,n]),(0,p.useEffect)((()=>{const{setBlockEditingMode:e,unsetBlockEditingMode:t}=n.dispatch(g.store);return n.batch((()=>{for(const t of s)e(t,"disabled")})),()=>{n.batch((()=>{for(const e of s)t(e)}))}}),[s,n]),null}function Gi(){const e=(0,d.useSelect)((e=>e(g.store).getBlockOrder()?.[0]),[]),{setBlockEditingMode:t,unsetBlockEditingMode:s}=(0,d.useDispatch)(g.store);(0,p.useEffect)((()=>{if(e)return t(e,"contentOnly"),()=>{s(e)}}),[e,s,t])}const $i=["wp_block","wp_template","wp_template_part"];var Wi=(0,c.jsxs)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,c.jsx)(L.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,c.jsx)(L.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})]}),Zi=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})}),Yi=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.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"})}),qi=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})}),Ki=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})}),Qi=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})}),Xi=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Ji=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),ea=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),ta=(0,c.jsxs)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,c.jsx)(L.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,c.jsx)(L.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),sa=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})}),na=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})});const oa=window.wp.commands;var ra=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),ia=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})});const aa=window.wp.viewport,la=window.wp.plugins;var ca=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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 da(e){return["core/edit-post","core/edit-site"].includes(e)?(k()(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function ua(e,t){return"core"===e&&"edit-site/template"===t?(k()("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):"core"===e&&"edit-site/block-inspector"===t?(k()("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}const pa=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e=da(e),area:t=ua(e,t)}),ma=(e,t)=>({registry:s,dispatch:n})=>{if(!t)return;e=da(e),t=ua(e,t);s.select(C.store).get(e,"isComplementaryAreaVisible")||s.dispatch(C.store).set(e,"isComplementaryAreaVisible",!0),n({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},ha=e=>({registry:t})=>{e=da(e);t.select(C.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(C.store).set(e,"isComplementaryAreaVisible",!1)},ga=(e,t)=>({registry:s})=>{if(!t)return;e=da(e),t=ua(e,t);const n=s.select(C.store).get(e,"pinnedItems");!0!==n?.[t]&&s.dispatch(C.store).set(e,"pinnedItems",{...n,[t]:!0})},_a=(e,t)=>({registry:s})=>{if(!t)return;e=da(e),t=ua(e,t);const n=s.select(C.store).get(e,"pinnedItems");s.dispatch(C.store).set(e,"pinnedItems",{...n,[t]:!1})};function fa(e,t){return function({registry:s}){k()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),s.dispatch(C.store).toggle(e,t)}}function ba(e,t,s){return function({registry:n}){k()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),n.dispatch(C.store).set(e,t,!!s)}}function ya(e,t){return function({registry:s}){k()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),s.dispatch(C.store).setDefaults(e,t)}}function xa(e){return{type:"OPEN_MODAL",name:e}}function va(){return{type:"CLOSE_MODAL"}}const wa=(0,d.createRegistrySelector)((e=>(t,s)=>{s=da(s);const n=e(C.store).get(s,"isComplementaryAreaVisible");if(void 0!==n)return!1===n?null:t?.complementaryAreas?.[s]})),Sa=(0,d.createRegistrySelector)((e=>(t,s)=>{s=da(s);const n=e(C.store).get(s,"isComplementaryAreaVisible"),o=t?.complementaryAreas?.[s];return n&&void 0===o})),ka=(0,d.createRegistrySelector)((e=>(t,s,n)=>{n=ua(s=da(s),n);const o=e(C.store).get(s,"pinnedItems");return o?.[n]??!0})),Ca=(0,d.createRegistrySelector)((e=>(t,s,n)=>(k()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(C.store).get(s,n))));function Pa(e,t){return e.activeModal===t}var ja=(0,d.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:s,area:n}=t;return e[s]?e:{...e,[s]:n}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:s,area:n}=t;return{...e,[s]:n}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}});const Ea=(0,d.createReduxStore)("core/interface",{reducer:ja,actions:o,selectors:r});function Ta({as:e=Fn.Button,scope:t,identifier:s,icon:n,selectedIcon:o,name:r,shortcut:i,...a}){const l=e,u=(0,la.usePluginContext)(),p=n||u.icon,m=s||`${u.name}/${r}`,h=(0,d.useSelect)((e=>e(Ea).getActiveComplementaryArea(t)===m),[m,t]),{enableComplementaryArea:g,disableComplementaryArea:_}=(0,d.useDispatch)(Ea);return(0,c.jsx)(l,{icon:o&&h?o:p,"aria-controls":m.replace("/",":"),"aria-checked":(f=a.role,["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(f)?h:void 0),onClick:()=>{h?_(t):g(t,m)},shortcut:i,...a});var f}(0,d.register)(Ea);var Ba=({children:e,className:t,toggleButtonProps:s})=>{const n=(0,c.jsx)(Ta,{icon:ca,...s});return(0,c.jsxs)("div",{className:hr("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,n]})};const Ia=()=>{};function Na({name:e,as:t=Fn.Button,onClick:s,...n}){return(0,c.jsx)(Fn.Fill,{name:e,children:({onClick:e})=>(0,c.jsx)(t,{onClick:s||e?(...t)=>{(s||Ia)(...t),(e||Ia)(...t)}:void 0,...n})})}Na.Slot=function({name:e,as:t=Fn.MenuGroup,fillProps:s={},bubblesVirtually:n,...o}){return(0,c.jsx)(Fn.Slot,{name:e,bubblesVirtually:n,fillProps:s,children:e=>{if(!p.Children.toArray(e).length)return null;const s=[];p.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&s.push(t)}));const n=p.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&s.includes(e.props.__unstableTarget)?null:e));return(0,c.jsx)(t,{...o,children:n})}})};var Ra=Na;const Da=({__unstableExplicitMenuItem:e,__unstableTarget:t,...s})=>(0,c.jsx)(Fn.MenuItem,{...s});function Aa({scope:e,target:t,__unstableExplicitMenuItem:s,...n}){return(0,c.jsx)(Ta,{as:n=>(0,c.jsx)(Ra,{__unstableExplicitMenuItem:s,__unstableTarget:`${e}/${t}`,as:Da,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Zn,name:t,scope:e,...n})}function Ma({scope:e,...t}){return(0,c.jsx)(Fn.Fill,{name:`PinnedItems/${e}`,...t})}Ma.Slot=function({scope:e,className:t,...s}){return(0,c.jsx)(Fn.Slot,{name:`PinnedItems/${e}`,...s,children:e=>e?.length>0&&(0,c.jsx)("div",{className:hr(t,"interface-pinned-items"),children:e})})};var La=Ma;const Oa={open:{width:280},closed:{width:0},mobileOpen:{width:"100vw"}};function Fa({activeArea:e,isActive:t,scope:s,children:n,className:o,id:r}){const i=(0,m.useReducedMotion)(),a=(0,m.useViewportMatch)("medium","<"),l=(0,m.usePrevious)(e),d=(0,m.usePrevious)(t),[,u]=(0,p.useState)({});(0,p.useEffect)((()=>{u({})}),[t]);const h={type:"tween",duration:i||a||l&&e&&e!==l?0:.3,ease:[.6,0,.4,1]};return(0,c.jsx)(Fn.Fill,{name:`ComplementaryArea/${s}`,children:(0,c.jsx)(Fn.__unstableAnimatePresence,{initial:!1,children:(d||t)&&(0,c.jsx)(Fn.__unstableMotion.div,{variants:Oa,initial:"closed",animate:a?"mobileOpen":"open",exit:"closed",transition:h,className:"interface-complementary-area__fill",children:(0,c.jsx)("div",{id:r,className:o,style:{width:a?"100vw":280},children:n})})})})}function Va({children:e,className:t,closeLabel:s=(0,fs.__)("Close plugin"),identifier:n,header:o,headerClassName:r,icon:i,isPinnable:a=!0,panelClassName:l,scope:u,name:h,title:g,toggleShortcut:_,isActiveByDefault:f}){const b=(0,la.usePluginContext)(),y=i||b.icon,x=n||`${b.name}/${h}`,[v,w]=(0,p.useState)(!1),{isLoading:S,isActive:k,isPinned:P,activeArea:j,isSmall:E,isLarge:T,showIconLabels:B}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:s,isItemPinned:n}=e(Ea),{get:o}=e(C.store),r=t(u);return{isLoading:s(u),isActive:r===x,isPinned:n(u,x),activeArea:r,isSmall:e(aa.store).isViewportMatch("< medium"),isLarge:e(aa.store).isViewportMatch("large"),showIconLabels:o("core","showIconLabels")}}),[x,u]),I=(0,m.useViewportMatch)("medium","<");!function(e,t,s,n,o){const r=(0,p.useRef)(!1),i=(0,p.useRef)(!1),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,d.useDispatch)(Ea);(0,p.useEffect)((()=>{n&&o&&!r.current?(l(e),i.current=!0):i.current&&!o&&r.current?(i.current=!1,a(e,t)):i.current&&s&&s!==t&&(i.current=!1),o!==r.current&&(r.current=o)}),[n,o,e,t,s,l,a])}(u,x,j,k,E);const{enableComplementaryArea:N,disableComplementaryArea:R,pinItem:D,unpinItem:A}=(0,d.useDispatch)(Ea);if((0,p.useEffect)((()=>{f&&void 0===j&&!E?N(u,x):void 0===j&&E&&R(u,x),w(!0)}),[j,f,u,x,E,N,R]),v)return(0,c.jsxs)(c.Fragment,{children:[a&&(0,c.jsx)(La,{scope:u,children:P&&(0,c.jsx)(Ta,{scope:u,identifier:x,isPressed:k&&(!B||T),"aria-expanded":k,"aria-disabled":S,label:g,icon:B?Zn:y,showTooltip:!B,variant:B?"tertiary":void 0,size:"compact",shortcut:_})}),h&&a&&(0,c.jsx)(Aa,{target:h,scope:u,icon:y,identifier:x,children:g}),(0,c.jsxs)(Fa,{activeArea:j,isActive:k,className:hr("interface-complementary-area",t),scope:u,id:x.replace("/",":"),children:[(0,c.jsx)(Ba,{className:r,closeLabel:s,onClose:()=>R(u),toggleButtonProps:{label:s,size:"compact",shortcut:_,scope:u,identifier:x},children:o||(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h2",{className:"interface-complementary-area-header__title",children:g}),a&&!I&&(0,c.jsx)(Fn.Button,{className:"interface-complementary-area__pin-unpin-item",icon:P?ra:ia,label:P?(0,fs.__)("Unpin from toolbar"):(0,fs.__)("Pin to toolbar"),onClick:()=>(P?A:D)(u,x),isPressed:P,"aria-expanded":P,size:"compact"})]})}),(0,c.jsx)(Fn.Panel,{className:l,children:e})]})]})}Va.Slot=function({scope:e,...t}){return(0,c.jsx)(Fn.Slot,{name:`ComplementaryArea/${e}`,...t})};var za=Va;var Ua=({isActive:e})=>((0,p.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,p.useEffect)((()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")})),[e]),null);const Ha=(0,p.forwardRef)((({children:e,className:t,ariaLabel:s,as:n="div",...o},r)=>(0,c.jsx)(n,{ref:r,className:hr("admin-ui-navigable-region",t),"aria-label":s,role:"region",tabIndex:"-1",...o,children:e})));Ha.displayName="NavigableRegion";var Ga=Ha;const $a={type:"tween",duration:.25,ease:[.6,0,.4,1]};const Wa={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...$a,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...$a,delay:.8,delayChildren:.8}}};var Za=(0,p.forwardRef)((function({isDistractionFree:e,footer:t,header:s,editorNotices:n,sidebar:o,secondarySidebar:r,content:i,actions:a,labels:l,className:d},u){const[h,g]=(0,m.useResizeObserver)(),_=(0,m.useViewportMatch)("medium","<"),f={type:"tween",duration:(0,m.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]};!function(e){(0,p.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const b={...{header:(0,fs._x)("Header","header landmark area"),body:(0,fs.__)("Content"),secondarySidebar:(0,fs.__)("Block Library"),sidebar:(0,fs._x)("Settings","settings landmark area"),actions:(0,fs.__)("Publish"),footer:(0,fs.__)("Footer")},...l};return(0,c.jsxs)("div",{ref:u,className:hr(d,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,c.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{initial:!1,children:!!s&&(0,c.jsx)(Ga,{as:Fn.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":b.header,initial:e&&!_?"distractionFreeHidden":"hidden",whileHover:e&&!_?"distractionFreeHover":"visible",animate:e&&!_?"distractionFreeDisabled":"visible",exit:e&&!_?"distractionFreeHidden":"hidden",variants:Wa,transition:f,children:s})}),e&&(0,c.jsx)("div",{className:"interface-interface-skeleton__header",children:n}),(0,c.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:b.secondarySidebar,as:Fn.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:g.width},closed:{width:0}},transition:f,children:(0,c.jsxs)(Fn.__unstableMotion.div,{style:{position:"absolute",width:_?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:f,children:[h,r]})})}),(0,c.jsx)(Ga,{className:"interface-interface-skeleton__content",ariaLabel:b.body,children:i}),!!o&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__sidebar",ariaLabel:b.sidebar,children:o}),!!a&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__actions",ariaLabel:b.actions,children:a})]})]}),!!t&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__footer",ariaLabel:b.footer,children:t})]})}));const{RenamePatternModal:Ya}=$(lo.privateApis),qa="editor/pattern-rename";function Ka(){const{record:e,postType:t}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(xc),{getEditedEntityRecord:n}=e(u.store),o=t();return{record:n("postType",o,s()),postType:o}}),[]),{closeModal:s}=(0,d.useDispatch)(Ea);return(0,d.useSelect)((e=>e(Ea).isModalActive(qa)))&&t===N?(0,c.jsx)(Ya,{onClose:s,pattern:e}):null}const{DuplicatePatternModal:Qa}=$(lo.privateApis),Xa="editor/pattern-duplicate";function Ja(){const{record:e,postType:t}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(xc),{getEditedEntityRecord:n}=e(u.store),o=t();return{record:n("postType",o,s()),postType:o}}),[]),{closeModal:s}=(0,d.useDispatch)(Ea);return(0,d.useSelect)((e=>e(Ea).isModalActive(Xa)))&&t===N?(0,c.jsx)(Qa,{onClose:s,onSuccess:()=>s(),pattern:e}):null}const{BlockRemovalWarningModal:el}=$(g.privateApis),tl=["core/post-content","core/post-template","core/query"],sl=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter((({name:e})=>tl.includes(e))).length)return(0,fs._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",e.length)}},{postTypes:["wp_block"],callback(e){if(e.filter((({attributes:e})=>e?.metadata?.bindings&&Object.values(e.metadata.bindings).some((e=>"core/pattern-overrides"===e.source)))).length)return(0,fs._n)("The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?","Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",e.length)}}];function nl(){const e=(0,d.useSelect)((e=>e(xc).getCurrentPostType()),[]),t=(0,p.useMemo)((()=>sl.filter((t=>t.postTypes.includes(e)))),[e]);return el&&t?(0,c.jsx)(el,{rules:t}):null}function ol({blockPatterns:e,onChoosePattern:t}){const{editEntityRecord:s}=(0,d.useDispatch)(u.store),{postType:n,postId:o}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(xc);return{postType:t(),postId:s()}}),[]);return(0,c.jsx)(g.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(e,r)=>{s("postType",n,o,{blocks:r,content:({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e)}),t()}})}function rl({onClose:e}){const[t,s]=(0,p.useState)(!0),{set:n}=(0,d.useDispatch)(C.store),o=function(){const{blockPatternsWithPostContentBlockType:e,postType:t}=(0,d.useSelect)((e=>{const{getPatternsByBlockTypes:t,getBlocksByName:s}=e(g.store),{getCurrentPostType:n,getRenderingMode:o}=e(xc);return{blockPatternsWithPostContentBlockType:t("core/post-content","post-only"===o()?"":s("core/post-content")?.[0]),postType:n()}}),[]);return(0,p.useMemo)((()=>e?.length?e.filter((e=>"page"===t&&!e.postTypes||Array.isArray(e.postTypes)&&e.postTypes.includes(t))):[]),[t,e])}();if(!(o.length>0))return null;function r(){e(),n("core","enableChoosePatternModal",t)}return(0,c.jsxs)(Fn.Modal,{className:"editor-start-page-options__modal",title:(0,fs.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:r,children:[(0,c.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,c.jsx)(ol,{blockPatterns:o,onChoosePattern:r})}),(0,c.jsx)(Fn.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.ToggleControl,{__nextHasNoMarginBottom:!0,checked:t,label:(0,fs.__)("Show starter patterns"),help:(0,fs.__)("Shows starter patterns when creating a new page."),onChange:e=>{s(e)}})})})]})}function il(){const[e,t]=(0,p.useState)(!1),{isEditedPostDirty:s,isEditedPostEmpty:n}=(0,d.useSelect)(xc),{isModalActive:o}=(0,d.useSelect)(Ea),{enabled:r,postId:i}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(xc),n=e(C.store).get("core","enableChoosePatternModal");return{postId:t(),enabled:n&&B!==s()}}),[]);return(0,p.useEffect)((()=>{const e=!s()&&n(),i=o("editor/preferences");r&&e&&!i&&t(!0)}),[r,i,s,n,o]),e?(0,c.jsx)(rl,{onClose:()=>t(!1)}):null}const al=window.wp.keyboardShortcuts,ll=[{keyCombination:{modifier:"primary",character:"b"},description:(0,fs.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,fs.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,fs.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,fs.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,fs.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,fs.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,fs.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,fs.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,fs.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,fs.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,fs.__)("Add non breaking space.")}],cl=window.wp.keycodes;function dl({keyCombination:e,forceAriaLabel:t}){const s=e.modifier?cl.displayShortcutList[e.modifier](e.character):e.character,n=e.modifier?cl.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,c.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||n,children:(Array.isArray(s)?s:[s]).map(((e,t)=>"+"===e?(0,c.jsx)(p.Fragment,{children:e},t):(0,c.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:e},t)))})}var ul=function({description:e,keyCombination:t,aliases:s=[],ariaLabel:n}){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,c.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,c.jsx)(dl,{keyCombination:t,forceAriaLabel:n}),s.map(((e,t)=>(0,c.jsx)(dl,{keyCombination:e,forceAriaLabel:n},t)))]})]})};var pl=function({name:e}){const{keyCombination:t,description:s,aliases:n}=(0,d.useSelect)((t=>{const{getShortcutKeyCombination:s,getShortcutDescription:n,getShortcutAliases:o}=t(al.store);return{keyCombination:s(e),aliases:o(e),description:n(e)}}),[e]);return t?(0,c.jsx)(ul,{keyCombination:t,description:s,aliases:n}):null};const ml="editor/keyboard-shortcut-help",hl=({shortcuts:e})=>(0,c.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map(((e,t)=>(0,c.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:"string"==typeof e?(0,c.jsx)(pl,{name:e}):(0,c.jsx)(ul,{...e})},t)))}),gl=({title:e,shortcuts:t,className:s})=>(0,c.jsxs)("section",{className:hr("editor-keyboard-shortcut-help-modal__section",s),children:[!!e&&(0,c.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,c.jsx)(hl,{shortcuts:t})]}),_l=({title:e,categoryName:t,additionalShortcuts:s=[]})=>{const n=(0,d.useSelect)((e=>e(al.store).getCategoryShortcuts(t)),[t]);return(0,c.jsx)(gl,{title:e,shortcuts:n.concat(s)})};var fl=function(){const e=(0,d.useSelect)((e=>e(Ea).isModalActive(ml)),[]),{openModal:t,closeModal:s}=(0,d.useDispatch)(Ea),n=()=>{e?s():t(ml)};return(0,al.useShortcut)("core/editor/keyboard-shortcuts",n),e?(0,c.jsxs)(Fn.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,fs.__)("Keyboard shortcuts"),closeButtonLabel:(0,fs.__)("Close"),onRequestClose:n,children:[(0,c.jsx)(gl,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,c.jsx)(_l,{title:(0,fs.__)("Global shortcuts"),categoryName:"global"}),(0,c.jsx)(_l,{title:(0,fs.__)("Selection shortcuts"),categoryName:"selection"}),(0,c.jsx)(_l,{title:(0,fs.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,fs.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,fs.__)("Forward-slash")}]}),(0,c.jsx)(gl,{title:(0,fs.__)("Text formatting"),shortcuts:ll}),(0,c.jsx)(_l,{title:(0,fs.__)("List View shortcuts"),categoryName:"list-view"})]}):null};function bl({clientId:e,onClose:t}){const s=Ui(),{entity:n,onNavigateToEntityRecord:o,canEditTemplates:r}=(0,d.useSelect)((t=>{const{getBlockParentsByBlockName:n,getSettings:o,getBlockAttributes:r,getBlockParents:i}=t(g.store),{getCurrentTemplateId:a,getRenderingMode:l}=t(xc),c=n(e,"core/block",!0)[0];let d;if(c?d=t(u.store).getEntityRecord("postType","wp_block",r(c).ref):"template-locked"!==l()||i(e).some((e=>s.includes(e)))||(d=t(u.store).getEntityRecord("postType","wp_template",a())),!d)return{};return{canEditTemplates:t(u.store).canUser("create",{kind:"postType",name:"wp_template"}),entity:d,onNavigateToEntityRecord:o().onNavigateToEntityRecord}}),[e,s]);if(!n)return(0,c.jsx)(yl,{clientId:e,onClose:t});const i="wp_block"===n.type;let a=i?(0,fs.__)("Edit the pattern to move, delete, or make further changes to this block."):(0,fs.__)("Edit the template to move, delete, or make further changes to this block.");return r||(a=(0,fs.__)("Only users with permissions to edit the template can move or delete this block")),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__unstableBlockSettingsMenuFirstItem,{children:(0,c.jsx)(Fn.MenuItem,{onClick:()=>{o({postId:n.id,postType:n.type})},disabled:!r,children:i?(0,fs.__)("Edit pattern"):(0,fs.__)("Edit template")})}),(0,c.jsx)(Fn.__experimentalText,{variant:"muted",as:"p",className:"editor-content-only-settings-menu__description",children:a})]})}function yl({clientId:e,onClose:t}){const{contentLockingParent:s}=(0,d.useSelect)((t=>{const{getContentLockingParent:s}=$(t(g.store));return{contentLockingParent:s(e)}}),[e]),n=(0,g.useBlockDisplayInformation)(s),o=(0,d.useDispatch)(g.store);if(!n?.title)return null;const{modifyContentLockBlock:r}=$(o);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__unstableBlockSettingsMenuFirstItem,{children:(0,c.jsx)(Fn.MenuItem,{onClick:()=>{r(s),t()},children:(0,fs._x)("Unlock","Unlock content locked blocks")})}),(0,c.jsx)(Fn.__experimentalText,{variant:"muted",as:"p",className:"editor-content-only-settings-menu__description",children:(0,fs.__)("Temporarily unlock the parent block to edit, delete or make further changes to this block.")})]})}function xl(){return(0,c.jsx)(g.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>1===e.length&&(0,c.jsx)(bl,{clientId:e[0],onClose:t})})}function vl(e){const{slug:t,patterns:s}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(xc),{getEntityRecord:n,getBlockPatterns:o}=e(u.store),r=s();return{slug:n("postType",t(),r).slug,patterns:o()}}),[]),n=(0,d.useSelect)((e=>e(u.store).getCurrentTheme().stylesheet));return(0,p.useMemo)((()=>[{name:"fallback",blocks:(0,x.parse)(e),title:(0,fs.__)("Fallback content")},...s.filter((e=>Array.isArray(e.templateTypes)&&e.templateTypes.some((e=>t.startsWith(e))))).map((e=>({...e,blocks:(0,x.parse)(e.content).map((e=>function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=n),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=n),e}(e)))})))]),[e,t,s])}function wl({fallbackContent:e,onChoosePattern:t,postType:s}){const[,,n]=(0,u.useEntityBlockEditor)("postType",s),o=vl(e);return(0,c.jsx)(g.__experimentalBlockPatternsList,{blockPatterns:o,onClickPattern:(e,s)=>{n(s,{selection:void 0}),t()}})}function Sl({slug:e,isCustom:t,onClose:s,postType:n}){const o=function(e,t=!1){return(0,d.useSelect)((s=>{const{getEntityRecord:n,getDefaultTemplateId:o}=s(u.store),r=o({slug:e,is_custom:t,ignore_empty:!0});return r?n("postType",B,r)?.content?.raw:void 0}),[e,t])}(e,t);return o?(0,c.jsxs)(Fn.Modal,{className:"editor-start-template-options__modal",title:(0,fs.__)("Choose a pattern"),closeLabel:(0,fs.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:s,isFullScreen:!0,children:[(0,c.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,c.jsx)(wl,{fallbackContent:o,slug:e,isCustom:t,postType:n,onChoosePattern:()=>{s()}})}),(0,c.jsx)(Fn.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,fs.__)("Skip")})})})]}):null}function kl(){const[e,t]=(0,p.useState)(!1),{shouldOpenModal:s,slug:n,isCustom:o,postType:r,postId:i}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(xc),n=t(),o=s(),{getEditedEntityRecord:r,hasEditsForEntityRecord:i}=e(u.store),a=r("postType",n,o);return{shouldOpenModal:!i("postType",n,o)&&""===a.content&&B===n,slug:a.slug,isCustom:a.is_custom,postType:n,postId:o}}),[]);return(0,p.useEffect)((()=>{t(!1)}),[r,i]),!s||e?null:(0,c.jsx)(Sl,{slug:n,isCustom:o,postType:r,onClose:()=>t(!0)})}function Cl(){const e=(0,d.useSelect)((e=>{const{richEditingEnabled:t,codeEditingEnabled:s}=e(xc).getEditorSettings();return!t||!s}),[]),{getBlockSelectionStart:t}=(0,d.useSelect)(g.store),{getActiveComplementaryArea:s}=(0,d.useSelect)(Ea),{enableComplementaryArea:n,disableComplementaryArea:o}=(0,d.useDispatch)(Ea),{redo:r,undo:i,savePost:a,setIsListViewOpened:l,switchEditorMode:c,toggleDistractionFree:u}=(0,d.useDispatch)(xc),{isEditedPostDirty:p,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:_}=(0,d.useSelect)(xc);return(0,al.useShortcut)("core/editor/toggle-mode",(()=>{c("visual"===_()?"text":"visual")}),{isDisabled:e}),(0,al.useShortcut)("core/editor/toggle-distraction-free",(()=>{u()})),(0,al.useShortcut)("core/editor/undo",(e=>{i(),e.preventDefault()})),(0,al.useShortcut)("core/editor/redo",(e=>{r(),e.preventDefault()})),(0,al.useShortcut)("core/editor/save",(e=>{e.preventDefault(),m()||p()&&a()})),(0,al.useShortcut)("core/editor/toggle-list-view",(e=>{h()||(e.preventDefault(),l(!0))})),(0,al.useShortcut)("core/editor/toggle-sidebar",(e=>{e.preventDefault();if(["edit-post/document","edit-post/block"].includes(s("core")))o("core");else{const e=t()?"edit-post/block":"edit-post/document";n("core",e)}})),null}function Pl({clientId:e,onClose:t}){const{getBlocks:s}=(0,d.useSelect)(g.store),{replaceBlocks:n}=(0,d.useDispatch)(g.store);return(0,d.useSelect)((t=>t(g.store).canRemoveBlock(e)),[e])?(0,c.jsx)(Fn.MenuItem,{onClick:()=>{n(e,s(e)),t()},children:(0,fs.__)("Detach")}):null}function jl({clientIds:e,blocks:t}){const[s,n]=(0,p.useState)(!1),{replaceBlocks:o}=(0,d.useDispatch)(g.store),{createSuccessNotice:r}=(0,d.useDispatch)(_s.store),{isBlockBasedTheme:i,canCreate:a}=(0,d.useSelect)((e=>({isBlockBasedTheme:e(u.store).getCurrentTheme()?.is_block_theme,canCreate:e(g.store).canInsertBlockType("core/template-part")})),[]);if(!i||!a)return null;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuItem,{icon:z,onClick:()=>{n(!0)},"aria-expanded":s,"aria-haspopup":"dialog",children:(0,fs.__)("Create template part")}),s&&(0,c.jsx)(no,{closeModal:()=>{n(!1)},blocks:t,onCreate:async t=>{o(e,(0,x.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),r((0,fs.__)("Template part created."),{type:"snackbar"})}})]})}function El(){return(0,c.jsx)(g.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,c.jsx)(Tl,{clientIds:e,onClose:t})})}function Tl({clientIds:e,onClose:t}){const{blocks:s}=(0,d.useSelect)((t=>{const{getBlocksByClientId:s}=t(g.store);return{blocks:s(e)}}),[e]);return 1===s.length&&"core/template-part"===s[0]?.name?(0,c.jsx)(Pl,{clientId:e[0],onClose:t}):(0,c.jsx)(jl,{clientIds:e,blocks:s})}const{ExperimentalBlockEditorProvider:Bl}=$(g.privateApis),{PatternsMenuItems:Il}=$(lo.privateApis),Nl=()=>{},Rl=["wp_block","wp_navigation","wp_template_part"];const Dl=ii((({post:e,settings:t,recovery:s,initialEdits:n,children:o,BlockEditorProviderComponent:r=Bl,__unstableTemplate:i})=>{const a=!!i,{editorSettings:l,selection:m,isReady:_,mode:f,defaultMode:b,postTypeEntities:y}=(0,d.useSelect)((t=>{const{getEditorSettings:s,getEditorSelection:n,getRenderingMode:o,__unstableIsEditorReady:r,getDefaultRenderingMode:i}=$(t(xc)),{getEntitiesConfig:l}=t(u.store),c=o(),d=i(e.type),p="template-locked"===d?a:void 0!==d,m=void 0!==d;return{editorSettings:s(),isReady:r(),mode:m?c:void 0,defaultMode:p?d:void 0,selection:n(),postTypeEntities:"wp_template"===e.type?l("postType"):null}}),[e.type,a]),v=a&&"post-only"!==f,w=v?i:e,S=(0,p.useMemo)((()=>{const t={};if("wp_template"===e.type){if("page"===e.slug)t.postType="page";else if("single"===e.slug)t.postType="post";else if("single"===e.slug.split("-")[0]){const s=y?.map((e=>e.name))||[],n=e.slug.match(`^single-(${s.join("|")})(?:-.+)?$`);n&&(t.postType=n[1])}}else Rl.includes(w.type)&&!v||(t.postId=e.id,t.postType=e.type);return{...t,templateSlug:"wp_template"===w.type?w.slug:void 0}}),[v,e.id,e.type,e.slug,w.type,w.slug,y]),{id:k,type:P}=w,j=Vi(l,P,k,f),[E,T,R]=function(e,t,s){const n="template-locked"===s?"template":"post",[o,r,i]=(0,u.useEntityBlockEditor)("postType",e.type,{id:e.id}),[a,l,c]=(0,u.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),d=(0,p.useMemo)((()=>{if("wp_navigation"===e.type)return[(0,x.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]}),[e.type,e.id]),m=(0,p.useMemo)((()=>d||("template"===n?a:o)),[d,n,a,o]);return t&&"template-locked"===s||"wp_navigation"===e.type?[m,Nl,Nl]:[m,"post"===n?r:l,"post"===n?i:c]}(e,i,f),{updatePostLock:D,setupEditor:A,updateEditorSettings:M,setCurrentTemplateId:L,setEditedPost:O,setRenderingMode:F}=$((0,d.useDispatch)(xc)),{createWarningNotice:V,removeNotice:z}=(0,d.useDispatch)(_s.store);return(0,p.useLayoutEffect)((()=>{s||(D(t.postLock),A(e,n,t.template),t.autosave&&V((0,fs.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,fs.__)("View the autosave"),url:t.autosave.editLink}]}))}),[]),(0,p.useEffect)((()=>{O(e.type,e.id),z("template-activate-notice")}),[e.type,e.id,O,z]),(0,p.useEffect)((()=>{M(t)}),[t,M]),(0,p.useEffect)((()=>{L(i?.id)}),[i?.id,L]),(0,p.useEffect)((()=>{b&&F(b)}),[b,F]),function(e,t){(0,p.useEffect)((()=>((0,h.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",((s,n)=>!(!$i.includes(e)&&"core/template-part"===n.name&&"post-only"===t)&&s)),(0,h.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",((t,s,n,{getBlockParentsByBlockName:o})=>$i.includes(e)||"core/post-content"!==s.name?t:o(n,"core/query").length>0)),()=>{(0,h.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,h.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")})),[e,t])}(e.type,f),(0,oa.useCommandLoader)({name:"core/editor/edit-ui",hook:function(){const{editorMode:e,isListViewOpen:t,showBlockBreadcrumbs:s,isDistractionFree:n,isFocusMode:o,isPreviewMode:r,isViewable:i,isCodeEditingEnabled:a,isRichEditingEnabled:l,isPublishSidebarEnabled:c}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{isListViewOpened:s,getCurrentPostType:n,getEditorSettings:o}=e(xc),{getSettings:r}=e(g.store),{getPostType:i}=e(u.store);return{editorMode:t("core","editorMode")??"visual",isListViewOpen:s(),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),isDistractionFree:t("core","distractionFree"),isFocusMode:t("core","focusMode"),isPreviewMode:r().isPreviewMode,isViewable:i(n())?.viewable??!1,isCodeEditingEnabled:o().codeEditingEnabled,isRichEditingEnabled:o().richEditingEnabled,isPublishSidebarEnabled:e(xc).isPublishSidebarEnabled()}}),[]),{getActiveComplementaryArea:p}=(0,d.useSelect)(Ea),{toggle:m}=(0,d.useDispatch)(C.store),{createInfoNotice:h}=(0,d.useDispatch)(_s.store),{__unstableSaveForPreview:_,setIsListViewOpened:f,switchEditorMode:b,toggleDistractionFree:y,toggleSpotlightMode:x,toggleTopToolbar:v}=(0,d.useDispatch)(xc),{openModal:w,enableComplementaryArea:S,disableComplementaryArea:k}=(0,d.useDispatch)(Ea),{getCurrentPostId:P}=(0,d.useSelect)(xc),j=a&&l;if(r)return{commands:[],isLoading:!1};const E=[];return E.push({name:"core/open-shortcut-help",label:(0,fs.__)("Keyboard shortcuts"),icon:Wi,callback:({close:e})=>{e(),w("editor/keyboard-shortcut-help")}}),E.push({name:"core/toggle-distraction-free",label:n?(0,fs.__)("Exit Distraction free"):(0,fs.__)("Enter Distraction free"),callback:({close:e})=>{y(),e()}}),E.push({name:"core/open-preferences",label:(0,fs.__)("Editor preferences"),callback:({close:e})=>{e(),w("editor/preferences")}}),E.push({name:"core/toggle-spotlight-mode",label:o?(0,fs.__)("Exit Spotlight mode"):(0,fs.__)("Enter Spotlight mode"),callback:({close:e})=>{x(),e()}}),E.push({name:"core/toggle-list-view",label:t?(0,fs.__)("Close List View"):(0,fs.__)("Open List View"),icon:Zi,callback:({close:e})=>{f(!t),e(),h(t?(0,fs.__)("List View off."):(0,fs.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),E.push({name:"core/toggle-top-toolbar",label:(0,fs.__)("Top toolbar"),callback:({close:e})=>{v(),e()}}),j&&E.push({name:"core/toggle-code-editor",label:"visual"===e?(0,fs.__)("Open code editor"):(0,fs.__)("Exit code editor"),icon:Yi,callback:({close:t})=>{b("visual"===e?"text":"visual"),t()}}),E.push({name:"core/toggle-breadcrumbs",label:s?(0,fs.__)("Hide block breadcrumbs"):(0,fs.__)("Show block breadcrumbs"),callback:({close:e})=>{m("core","showBlockBreadcrumbs"),e(),h(s?(0,fs.__)("Breadcrumbs hidden."):(0,fs.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),E.push({name:"core/open-settings-sidebar",label:(0,fs.__)("Show or hide the Settings panel"),icon:(0,fs.isRTL)()?qi:Ki,callback:({close:e})=>{const t=p("core");e(),"edit-post/document"===t?k("core"):S("core","edit-post/document")}}),E.push({name:"core/open-block-inspector",label:(0,fs.__)("Show or hide the Block settings panel"),icon:Qi,callback:({close:e})=>{const t=p("core");e(),"edit-post/block"===t?k("core"):S("core","edit-post/block")}}),E.push({name:"core/toggle-publish-sidebar",label:c?(0,fs.__)("Disable pre-publish checks"):(0,fs.__)("Enable pre-publish checks"),icon:Xi,callback:({close:e})=>{e(),m("core","isPublishSidebarEnabled"),h(c?(0,fs.__)("Pre-publish checks disabled."):(0,fs.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),i&&E.push({name:"core/preview-link",label:(0,fs.__)("Preview in a new tab"),icon:Gn,callback:async({close:e})=>{e();const t=P(),s=await _();window.open(s,`wp-preview-${t}`)}}),{commands:E,isLoading:!1}}}),(0,oa.useCommandLoader)({name:"core/editor/contextual-commands",hook:function(){const{postType:e}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(xc);return{postType:t()}}),[]),{openModal:t}=(0,d.useDispatch)(Ea),s=[];return e===N&&(s.push({name:"core/rename-pattern",label:(0,fs.__)("Rename pattern"),icon:Ji,callback:({close:e})=>{t(qa),e()}}),s.push({name:"core/duplicate-pattern",label:(0,fs.__)("Duplicate pattern"),icon:ea,callback:({close:e})=>{t(Xa),e()}})),{isLoading:!1,commands:s}},context:"entity-edit"}),(0,oa.useCommandLoader)({name:"core/editor/page-content-focus",hook:function(){const{onNavigateToEntityRecord:e,goBack:t,templateId:s,isPreviewMode:n}=(0,d.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:s,getCurrentTemplateId:n}=$(e(xc)),o=s();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,goBack:o.onNavigateToPreviousEntityRecord,templateId:n(),isPreviewMode:o.isPreviewMode}}),[]),{editedRecord:o,hasResolved:r}=(0,u.useEntityRecord)("postType","wp_template",s);if(n)return{isLoading:!1,commands:[]};const i=[];return s&&r&&i.push({name:"core/switch-to-template-focus",label:(0,fs.sprintf)((0,fs.__)("Edit template: %s"),(0,Ln.decodeEntities)(o.title)),icon:W,callback:({close:t})=>{e({postId:s,postType:"wp_template"}),t()}}),t&&i.push({name:"core/switch-to-previous-entity",label:(0,fs.__)("Go back"),icon:ta,callback:({close:e})=>{t(),e()}}),{isLoading:!1,commands:i}},context:"entity-edit"}),(0,oa.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:function(){const{postType:e,postId:t}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(xc);return{postType:s(),postId:t()}}),[]),{editedRecord:s,hasResolved:n}=(0,u.useEntityRecord)("postType",e,t),{revertTemplate:o}=$((0,d.useDispatch)(xc));if(!n||![I,B].includes(e))return{isLoading:!0,commands:[]};const r=[];if(On(s)){const e=s.type===B?(0,fs.sprintf)((0,fs.__)("Reset template: %s"),(0,Ln.decodeEntities)(s.title)):(0,fs.sprintf)((0,fs.__)("Reset template part: %s"),(0,Ln.decodeEntities)(s.title));r.push({name:"core/reset-template",label:e,icon:(0,fs.isRTL)()?sa:na,callback:({close:e})=>{o(s),e()}})}return{isLoading:!n,commands:r}}}),_&&f?(0,c.jsx)(u.EntityProvider,{kind:"root",type:"site",children:(0,c.jsx)(u.EntityProvider,{kind:"postType",type:e.type,id:e.id,children:(0,c.jsx)(g.BlockContextProvider,{value:S,children:(0,c.jsxs)(r,{value:E,onChange:R,onInput:T,selection:m,settings:j,useSubRegistry:!1,children:[o,!t.isPreviewMode&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Il,{}),(0,c.jsx)(El,{}),(0,c.jsx)(xl,{}),"template-locked"===f&&(0,c.jsx)(Hi,{}),"wp_navigation"===P&&(0,c.jsx)(Gi,{}),(0,c.jsx)(Cl,{}),(0,c.jsx)(fl,{}),(0,c.jsx)(nl,{}),(0,c.jsx)(il,{}),(0,c.jsx)(kl,{}),(0,c.jsx)(Ka,{}),(0,c.jsx)(Ja,{})]})]})})})}):null}));function Al(e){return(0,c.jsx)(Dl,{...e,BlockEditorProviderComponent:g.BlockEditorProvider,children:e.children})}var Ml=Al;const{useGlobalStyle:Ll}=$(g.privateApis);function Ol({template:e,post:t}){const[s="white"]=Ll("color.background"),[n]=(0,u.useEntityBlockEditor)("postType",t.type,{id:t.id}),[o]=(0,u.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),r=e&&o?o:n,i=!r?.length;return(0,c.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:s},children:[i&&(0,c.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,fs.__)("Empty content")}),!i&&(0,c.jsx)(g.BlockPreview.Async,{children:(0,c.jsx)(g.BlockPreview,{blocks:r})})]})}const Fl={type:"media",id:"content-preview",label:(0,fs.__)("Content preview"),render:function({item:e}){const{settings:t,template:s}=(0,d.useSelect)((t=>{const{canUser:s,getPostType:n,getTemplateId:o,getEntityRecord:r}=$(t(u.store)),i=s("read",{kind:"postType",name:"wp_template"}),a=t(xc).getEditorSettings(),l=a.supportsTemplateMode,c=n(e.type)?.viewable??!1,d=l&&c&&i?o(e.type,e.id):null;return{settings:a,template:d?r("postType","wp_template",d):void 0}}),[e.type,e.id]);return(0,c.jsx)(Al,{post:e,settings:t,__unstableTemplate:s,children:(0,c.jsx)(Ol,{template:s,post:e})})},enableSorting:!1};var Vl=Fl;function zl(e,t,s){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:s}}function Ul(e,t,s){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:s}}function Hl(e,t,s){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:s}}function Gl(e,t,s){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:s}}function $l(e,t){return{type:"SET_IS_READY",kind:e,name:t}}const Wl=e=>async({registry:t})=>{if($(t.select(xc)).isEntityReady("postType",e))return;$(t.dispatch(xc)).setIsReady("postType",e);const s=await t.resolveSelect(u.store).getPostType(e),n=await t.resolveSelect(u.store).canUser("create",{kind:"postType",name:e}),o=await t.resolveSelect(u.store).getCurrentTheme();let r=!["wp_block","wp_template_part"].includes(s.slug)&&n&&Hn;"wp_template"!==s.slug&&(r=void 0);const i=[s.viewable?$n:void 0,s.supports?.revisions?Wn:void 0,r,"wp_template_part"===s.slug&&n&&o?.is_block_theme?ao:void 0,n&&"wp_block"===s.slug?go:void 0,s.supports?.title?bo:void 0,s.supports?.["page-attributes"]?xo:void 0,"wp_block"===s.slug?Yo:void 0,Ko,Jo,or,ir,lr].filter(Boolean),a=[s.supports?.thumbnail&&o?.theme_supports?.["post-thumbnails"]&&pr,s.supports?.author&&br,Pr,Tr,Ar,s.supports?.["page-attributes"]&&zr,s.supports?.comments&&Ur,s.supports?.trackbacks&&Hr,(s.supports?.comments||s.supports?.trackbacks)&&Gr,Zr,qr,s.supports?.editor&&s.viewable&&Vl].filter(Boolean);if(s.supports?.title){let t;t="page"===e?Jr:"wp_template"===e?ei:"wp_block"===e?oi:ri,a.push(t)}t.batch((()=>{i.forEach((s=>{$(t.dispatch(xc)).registerEntityAction("postType",e,s)})),a.forEach((s=>{$(t.dispatch(xc)).registerEntityField("postType",e,s)}))})),(0,h.doAction)("core.registerPostTypeSchema",e)};function Zl(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}const Yl=e=>async({select:t,dispatch:s,registry:n})=>{const o=await n.dispatch(u.store).saveEntityRecord("postType","wp_template",e);return n.dispatch(u.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:o.slug}),n.dispatch(_s.store).createSuccessNotice((0,fs.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,fs.__)("Go back"),onClick:()=>s.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),o},ql=e=>({registry:t})=>{const s=(t.select(C.store).get("core","hiddenBlockTypes")??[]).filter((t=>!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(C.store).set("core","hiddenBlockTypes",s)},Kl=e=>({registry:t})=>{const s=t.select(C.store).get("core","hiddenBlockTypes")??[],n=new Set([...s,...Array.isArray(e)?e:[e]]);t.dispatch(C.store).set("core","hiddenBlockTypes",[...n])},Ql=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:s=[],close:n}={})=>({registry:o})=>{const r=[{kind:"postType",name:"wp_navigation"}],i="site-editor-save-success",a=o.select(u.store).getEntityRecord("root","__unstableBase")?.home;o.dispatch(_s.store).removeNotice(i);const l=t.filter((({kind:e,name:t,key:n,property:o})=>!s.some((s=>s.kind===e&&s.name===t&&s.key===n&&s.property===o))));n?.(l);const c=[],d=[];l.forEach((({kind:e,name:t,key:s,property:n})=>{"root"===e&&"site"===t?c.push(n):(r.some((s=>s.kind===e&&s.name===t))&&o.dispatch(u.store).editEntityRecord(e,t,s,{status:"publish"}),d.push(o.dispatch(u.store).saveEditedEntityRecord(e,t,s)))})),c.length&&d.push(o.dispatch(u.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,c)),o.dispatch(g.store).__unstableMarkLastChangeAsPersistent(),Promise.all(d).then((t=>e?e(t):t)).then((e=>{e.some((e=>void 0===e))?o.dispatch(_s.store).createErrorNotice((0,fs.__)("Saving failed.")):o.dispatch(_s.store).createSuccessNotice((0,fs.__)("Site updated."),{type:"snackbar",id:i,actions:[{label:(0,fs.__)("View site"),url:a,openInNewTab:!0}]})})).catch((e=>o.dispatch(_s.store).createErrorNotice(`${(0,fs.__)("Saving failed.")} ${e}`)))},Xl=(e,{allowUndo:t=!0}={})=>async({registry:s})=>{const n="edit-site-template-reverted";if(s.dispatch(_s.store).removeNotice(n),On(e))try{const o=s.select(u.store).getEntityConfig("postType",e.type);if(!o)return void s.dispatch(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const r=(0,w.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await gs()({path:r});if(!i)return void s.dispatch(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const a=({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e),l=s.select(u.store).getEditedEntityRecord("postType",e.type,e.id);s.dispatch(u.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const c=(0,x.parse)(i?.content?.raw);if(s.dispatch(u.store).editEntityRecord("postType",e.type,i.id,{content:a,blocks:c,source:"theme"}),t){const t=()=>{s.dispatch(u.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};s.dispatch(_s.store).createSuccessNotice((0,fs.__)("Template reset."),{type:"snackbar",id:n,actions:[{label:(0,fs.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("Template revert failed. Please reload.");s.dispatch(_s.store).createErrorNotice(t,{type:"snackbar"})}else s.dispatch(_s.store).createErrorNotice((0,fs.__)("This template is not revertable."),{type:"snackbar"})},Jl=e=>async({registry:t})=>{const s=e.every((e=>e?.has_theme_file)),n=await Promise.allSettled(e.map((e=>t.dispatch(u.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(n.every((({status:e})=>"fulfilled"===e))){let n;if(1===e.length){let t;"string"==typeof e[0].title?t=e[0].title:"string"==typeof e[0].title?.rendered?t=e[0].title?.rendered:"string"==typeof e[0].title?.raw&&(t=e[0].title?.raw),n=s?(0,fs.sprintf)((0,fs.__)('"%s" reset.'),(0,Ln.decodeEntities)(t)):(0,fs.sprintf)((0,fs._x)('"%s" deleted.',"template part"),(0,Ln.decodeEntities)(t))}else n=s?(0,fs.__)("Items reset."):(0,fs.__)("Items deleted.");t.dispatch(_s.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let e;if(1===n.length)e=n[0].reason?.message?n[0].reason.message:s?(0,fs.__)("An error occurred while reverting the item."):(0,fs.__)("An error occurred while deleting the item.");else{const t=new Set,o=n.filter((({status:e})=>"rejected"===e));for(const e of o)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,fs.__)("An error occurred while deleting the items."):1===t.size?s?(0,fs.sprintf)((0,fs.__)("An error occurred while reverting the items: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("An error occurred while deleting the items: %s"),[...t][0]):s?(0,fs.sprintf)((0,fs.__)("Some errors occurred while reverting the items: %s"),[...t].join(",")):(0,fs.sprintf)((0,fs.__)("Some errors occurred while deleting the items: %s"),[...t].join(","))}t.dispatch(_s.store).createErrorNotice(e,{type:"snackbar"})}},ec=e=>({select:t,registry:s})=>{const n=t.getCurrentPostType(),o=s.select(u.store).getCurrentTheme()?.stylesheet,r=s.select(C.store).get("core","renderingModes")?.[o]??{};if(r[n]===e)return;const i={[o]:{...r,[n]:e}};s.dispatch(C.store).set("core","renderingModes",i)};var tc=s(5215),sc=s.n(tc),nc=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),oc=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});const rc=[];const ic={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},ac=["post-only","template-locked"],lc=(0,d.createRegistrySelector)((e=>(0,d.createSelector)((t=>{if("object"==typeof t.blockInserterPanel)return t.blockInserterPanel;if("template-locked"===st(t)){const[t]=e(g.store).getBlocksByName("core/post-content");if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return ic}),(t=>{const[s]=e(g.store).getBlocksByName("core/post-content");return[t.blockInserterPanel,st(t),s]}))));function cc(e){return e.listViewToggleRef}function dc(e){return e.inserterSidebarToggleRef}const uc={wp_block:ea,wp_navigation:nc,page:ta,post:oc},pc=(0,d.createRegistrySelector)((e=>(t,s,n)=>{{if("wp_template_part"===s||"wp_template"===s){const t=(e(u.store).getCurrentTheme()?.default_template_part_areas||[]).find((e=>n.area===e.area));return t?.icon?U(t.icon):W}if(uc[s])return uc[s];const t=e(u.store).getPostType(s);return"string"==typeof t?.icon&&t.icon.startsWith("dashicons-")?t.icon.slice(10):ta}})),mc=(0,d.createRegistrySelector)((e=>(t,s,n)=>{const{type:o,id:r}=ne(t),i=e(u.store).getEntityRecordNonTransientEdits("postType",s||o,n||r);if(!i?.meta)return!1;const a=e(u.store).getEntityRecord("postType",s||o,n||r)?.meta;return!sc()({...a,footnotes:void 0},{...i.meta,footnotes:void 0})}));function hc(e,...t){return function(e,t,s){return e.actions[t]?.[s]??rc}(e.dataviews,...t)}function gc(e,...t){return function(e,t,s){return e.isReady[t]?.[s]}(e.dataviews,...t)}function _c(e,...t){return function(e,t,s){return e.fields[t]?.[s]??rc}(e.dataviews,...t)}const fc=(0,d.createRegistrySelector)((e=>(0,d.createSelector)(((t,s)=>{s=Array.isArray(s)?s:[s];const{getBlocksByName:n,getBlockParents:o,getBlockName:r}=e(g.store);return n(s).filter((e=>o(e).every((e=>{const t=r(e);return"core/query"!==t&&!s.includes(t)}))))}),(()=>[e(g.store).getBlocks()])))),bc=(0,d.createRegistrySelector)((e=>(t,s)=>{const{getPostType:n,getCurrentTheme:o,hasFinishedResolution:r}=e(u.store),i=o(),a=n(s);if(!r("getPostType",[s])||!r("getCurrentTheme"))return;const l=i?.stylesheet,c=e(C.store).get("core","renderingModes")?.[l]?.[s],d=Array.isArray(a?.supports?.editor)?a.supports.editor.find((e=>"default-mode"in e))?.["default-mode"]:void 0,p=c||d;return ac.includes(p)?p:"post-only"})),yc={reducer:y,selectors:e,actions:t},xc=(0,d.createReduxStore)("core/editor",{...yc});(0,d.register)(xc),$(xc).registerPrivateActions(a),$(xc).registerPrivateSelectors(l);function vc(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,c.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,c.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,c.jsxs)(c.Fragment,{children:[t,(0,c.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,c.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}(0,h.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){const t=Object.fromEntries(Object.entries(e.attributes??{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(t).length&&(e.edit=(e=>(0,m.createHigherOrderComponent)((t=>({attributes:s,setAttributes:n,...o})=>{const r=(0,d.useSelect)((e=>e(xc).getCurrentPostType()),[]),[i,a]=(0,u.useEntityProp)("postType",r,"meta"),l=(0,p.useMemo)((()=>({...s,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,i[t]])))})),[s,i]);return(0,c.jsx)(t,{attributes:l,setAttributes:t=>{const s=Object.fromEntries(Object.entries(t??{}).filter((([t])=>t in e)).map((([t,s])=>[e[t],s])));Object.entries(s).length&&a(s),n(t)},...o})}),"withMetaAttributeSource"))(t)(e.edit)),e}));var wc={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,d.useSelect)((t=>{const{getUsers:s}=t(u.store);return s({context:"view",search:encodeURIComponent(e)})}),[e]);return[(0,p.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:vc(e)}))):[]),[t])]},getOptionCompletion:e=>`@${e.slug}`};(0,h.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...wc}),e})),(0,h.addFilter)("editor.MediaUpload","core/editor/components/media-upload",(()=>cr.MediaUpload));const{PatternOverridesControls:Sc,ResetOverridesControl:kc,PatternOverridesBlockControls:Cc,PATTERN_TYPES:Pc,PARTIAL_SYNCING_SUPPORTED_BLOCKS:jc,PATTERN_SYNC_TYPES:Ec}=$(lo.privateApis),Tc=(0,m.createHigherOrderComponent)((e=>t=>{const s=!!jc[t.name];return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,c.jsx)(Bc,{...t}),s&&(0,c.jsx)(Cc,{})]})}),"withPatternOverrideControls");function Bc(e){const t=(0,g.useBlockEditingMode)(),{hasPatternOverridesSource:s,isEditingSyncedPattern:n}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(xc);return{hasPatternOverridesSource:!!(0,x.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:t()===Pc.user&&s("meta")?.wp_pattern_sync_status!==Ec.unsynced&&s("wp_pattern_sync_status")!==Ec.unsynced}}),[]),o=e.attributes.metadata?.bindings,r=!!o&&Object.values(o).some((e=>"core/pattern-overrides"===e.source)),i=n&&"default"===t,a=!n&&!!e.attributes.metadata?.name&&"disabled"!==t&&r;return s?(0,c.jsxs)(c.Fragment,{children:[i&&(0,c.jsx)(Sc,{...e}),a&&(0,c.jsx)(kc,{...e})]}):null}(0,h.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Tc);const Ic=["core/navigation-link","core/navigation-submenu"];function Nc({attributes:e}){const{kind:t,id:s,type:n}=e,o=(0,g.useBlockEditingMode)(),r=(0,d.useSelect)((e=>e(g.store).getSettings().onNavigateToEntityRecord),[]),i=(0,p.useCallback)((()=>{"post-type"===t&&"page"===n&&s&&r&&r({postId:s,postType:n})}),[t,s,n,r]);return"post-type"===t&&"page"===n&&s&&r&&"contentOnly"===o?(0,c.jsx)(g.__unstableBlockToolbarLastItem,{children:(0,c.jsx)(Fn.ToolbarGroup,{children:(0,c.jsx)(Fn.ToolbarButton,{name:"view",title:(0,fs.__)("View"),onClick:i,children:(0,fs.__)("View")})})}):null}const Rc=(0,m.createHigherOrderComponent)((e=>t=>{const s=Ic.includes(t.name);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,c.jsx)(Nc,{...t})]})}),"withNavigationViewButton");(0,h.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",Rc);function Dc({clientId:e}){const{selectBlock:t,flashBlock:s}=(0,d.useDispatch)(g.store),{enableComplementaryArea:n}=(0,d.useDispatch)(Ea),{hasNavigationBlocks:o,firstNavigationBlockId:r,isNavigationEditable:i}=(0,d.useSelect)((t=>{const{getClientIdsOfDescendants:s,getBlockName:n,getBlockEditingMode:o}=t(g.store),r=s(e).filter((e=>"core/navigation"===n(e))),i=r.length>0,a=i?r[0]:null;return{hasNavigationBlocks:i,firstNavigationBlockId:a,isNavigationEditable:"disabled"!==o(a)}}),[e]),a=(0,p.useCallback)((()=>{r&&(t(r),s(r,500),n("core","edit-post/block"))}),[r,t,s,n]);return o&&i?(0,c.jsx)(g.BlockControls,{group:"other",children:(0,c.jsxs)(Fn.ToolbarGroup,{children:[(0,c.jsx)(Fn.__experimentalDivider,{orientation:"vertical",marginEnd:3}),(0,c.jsx)(Fn.ToolbarButton,{label:(0,fs.__)("Edit navigation"),onClick:a,children:(0,fs.__)("Edit navigation")})]})}):null}const Ac=(0,m.createHigherOrderComponent)((e=>t=>{const s="core/template-part"===t.name;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,c.jsx)(Dc,{clientId:t.clientId})]})}),"withTemplatePartNavigationEditButton");(0,h.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",Ac);class Mc extends p.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}var Lc=(0,m.compose)([(0,d.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:s}=e(u.store),{isEditedPostDirty:n,isEditedPostAutosaveable:o,isAutosavingPost:r,getEditorSettings:i}=e(xc),{interval:a=i().autosaveInterval}=t;return{editsReference:s(),isDirty:n(),isAutosaveable:o(),isAutosaving:r(),interval:a}})),(0,d.withDispatch)(((e,t)=>({autosave(){const{autosave:s=e(xc).autosave}=t;s()}})))])(Mc),Oc=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Fc=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});const Vc=window.wp.dom;function zc(e){const{isFrontPage:t,isPostsPage:s}=(0,d.useSelect)((t=>{const{canUser:s,getEditedEntityRecord:n}=t(u.store),o=s("read",{kind:"root",name:"site"})?n("root","site"):void 0,r=parseInt(e,10);return{isFrontPage:o?.page_on_front===r,isPostsPage:o?.page_for_posts===r}}));return t?(0,fs.__)("Homepage"):!!s&&(0,fs.__)("Posts Page")}const Uc=Fn.__unstableMotion.create(Fn.Button);function Hc(e){const{postId:t,postType:s,postTypeLabel:n,documentTitle:o,isNotFound:r,templateTitle:i,onNavigateToPreviousEntityRecord:a,isTemplatePreview:l}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditorSettings:n,getRenderingMode:o}=e(xc),{getEditedEntityRecord:r,getPostType:i,getCurrentTheme:a,isResolving:l}=e(u.store),c=t(),d=s(),p=r("postType",c,d),{default_template_types:m=[]}=a()??{},h=Y({templateTypes:m,template:p}),g=i(c)?.labels?.singular_name;return{postId:d,postType:c,postTypeLabel:g,documentTitle:p.title,isNotFound:!p&&!l("getEditedEntityRecord","postType",c,d),templateTitle:h.title,onNavigateToPreviousEntityRecord:n().onNavigateToPreviousEntityRecord,isTemplatePreview:"template-locked"===o()}}),[]),{open:h}=(0,d.useDispatch)(oa.store),_=(0,m.useReducedMotion)(),f=A.includes(s),b=!!a,y=f?i:o,x=e.title||y,v=e.icon,w=zc(t),S=(0,p.useRef)(!1);return(0,p.useEffect)((()=>{S.current=!0}),[]),(0,c.jsxs)("div",{className:hr("editor-document-bar",{"has-back-button":b}),children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{children:b&&(0,c.jsx)(Uc,{className:"editor-document-bar__back",icon:(0,fs.isRTL)()?Oc:Fc,onClick:e=>{e.stopPropagation(),a()},size:"compact",initial:!!S.current&&{opacity:0,transform:"translateX(15%)"},animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:_?{duration:0}:void 0,children:(0,fs.__)("Back")})}),!f&&l&&!b&&(0,c.jsx)(g.BlockIcon,{icon:W,className:"editor-document-bar__icon-layout"}),r?(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Document not found")}):(0,c.jsxs)(Fn.Button,{className:"editor-document-bar__command",onClick:()=>h(),size:"compact",children:[(0,c.jsxs)(Fn.__unstableMotion.div,{className:"editor-document-bar__title",initial:!!S.current&&{opacity:0,transform:b?"translateX(15%)":"translateX(-15%)"},animate:{opacity:1,transform:"translateX(0%)"},transition:_?{duration:0}:void 0,children:[v&&(0,c.jsx)(g.BlockIcon,{icon:v}),(0,c.jsxs)(Fn.__experimentalText,{size:"body",as:"h1",children:[(0,c.jsx)("span",{className:"editor-document-bar__post-title",children:x?(0,Vc.__unstableStripHTML)(x):(0,fs.__)("No title")}),w&&(0,c.jsx)("span",{className:"editor-document-bar__post-type-label",children:`· ${w}`}),n&&!e.title&&!w&&(0,c.jsx)("span",{className:"editor-document-bar__post-type-label",children:`· ${(0,Ln.decodeEntities)(n)}`})]})]},b),(0,c.jsx)("span",{className:"editor-document-bar__shortcut",children:cl.displayShortcut.primary("k")})]})]})}const Gc=window.wp.richText;var $c=({children:e,isValid:t,isDisabled:s,level:n,href:o,onSelect:r})=>(0,c.jsx)("li",{className:hr("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t,"is-disabled":s}),children:(0,c.jsxs)("a",{href:o,className:"document-outline__button","aria-disabled":s,onClick:function(e){s?e.preventDefault():r()},children:[(0,c.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,c.jsx)("strong",{className:"document-outline__level",children:n}),(0,c.jsx)("span",{className:"document-outline__item-content",children:e})]})});const Wc=(0,c.jsx)("em",{children:(0,fs.__)("(Empty heading)")}),Zc=[(0,c.jsx)("br",{},"incorrect-break"),(0,c.jsx)("em",{children:(0,fs.__)("(Incorrect heading level)")},"incorrect-message")],Yc=[(0,c.jsx)("br",{},"incorrect-break-h1"),(0,c.jsx)("em",{children:(0,fs.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],qc=[(0,c.jsx)("br",{},"incorrect-break-multiple-h1"),(0,c.jsx)("em",{children:(0,fs.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function Kc(){return(0,c.jsxs)(Fn.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,c.jsx)(Fn.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,c.jsx)(Fn.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,c.jsx)(Fn.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,c.jsx)(Fn.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,c.jsx)(Fn.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,c.jsx)(Fn.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,c.jsx)(Fn.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,c.jsx)(Fn.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,c.jsx)(Fn.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}const Qc=(e=[])=>e.filter((e=>"core/heading"===e.name)).map((e=>({...e,level:e.attributes.level,isEmpty:Xc(e)}))),Xc=e=>!e.attributes.content||0===e.attributes.content.trim().length;function Jc({onSelect:e,hasOutlineItemsDisabled:t}){const{selectBlock:s}=(0,d.useDispatch)(g.store),{title:n,isTitleSupported:o}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc),{getPostType:s}=e(u.store),n=s(t("type"));return{title:t("title"),isTitleSupported:n?.supports?.title??!1}})),r=(0,d.useSelect)((e=>{const{getClientIdsWithDescendants:t,getBlock:s}=e(g.store);return t().map((e=>s(e)))})),i=(0,d.useSelect)((e=>{if("post-only"===e(xc).getRenderingMode())return;const{getBlocksByName:t,getClientIdsOfDescendants:s}=e(g.store),[n]=t("core/post-content");return n?s(n):void 0}),[]),a=(0,p.useRef)(1),l=(0,p.useMemo)((()=>Qc(r)),[r]);if(l.length<1)return(0,c.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,c.jsx)(Kc,{}),(0,c.jsx)("p",{children:(0,fs.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});const m=document.querySelector(".editor-post-title__input"),h=o&&n&&m,_=l.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,c.jsx)("div",{className:"document-outline",children:(0,c.jsxs)("ul",{children:[h&&(0,c.jsx)($c,{level:(0,fs.__)("Title"),isValid:!0,onSelect:e,href:`#${m.id}`,isDisabled:t,children:n}),l.map((n=>{const o=n.level>a.current+1,r=!(n.isEmpty||o||!n.level||1===n.level&&(_||h));return a.current=n.level,(0,c.jsxs)($c,{level:`H${n.level}`,isValid:r,isDisabled:t||(l=n.clientId,!(!Array.isArray(i)||i.includes(l))),href:`#block-${n.clientId}`,onSelect:()=>{s(n.clientId),e?.()},children:[n.isEmpty?Wc:(0,Gc.getTextContent)((0,Gc.create)({html:n.attributes.content})),o&&Zc,1===n.level&&_&&qc,h&&1===n.level&&!_&&Yc]},n.clientId);var l}))]})})}function ed({children:e}){const t=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t}=e(g.store);return t("core/heading")>0}));return t?e:null}var td=function(){const{registerShortcut:e}=(0,d.useDispatch)(al.store);return(0,p.useEffect)((()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,fs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,fs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,fs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,fs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,cl.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,fs.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,fs.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,fs.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,fs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/next-region",category:"global",description:(0,fs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,fs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})}),[e]),(0,c.jsx)(g.BlockEditorKeyboardShortcuts.Register,{})},sd=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),nd=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});var od=(0,p.forwardRef)((function(e,t){const s=(0,cl.isAppleOS)()?cl.displayShortcut.primaryShift("z"):cl.displayShortcut.primary("y"),n=(0,d.useSelect)((e=>e(xc).hasEditorRedo()),[]),{redo:o}=(0,d.useDispatch)(xc);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,fs.isRTL)()?nd:sd,label:(0,fs.__)("Redo"),shortcut:s,"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__redo"})}));var rd=(0,p.forwardRef)((function(e,t){const s=(0,d.useSelect)((e=>e(xc).hasEditorUndo()),[]),{undo:n}=(0,d.useDispatch)(xc);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,fs.isRTL)()?sd:nd,label:(0,fs.__)("Undo"),shortcut:cl.displayShortcut.primary("z"),"aria-disabled":!s,onClick:s?n:void 0,className:"editor-history__undo"})}));function id(){const[e,t]=(0,p.useState)(!1),s=(0,d.useSelect)((e=>e(g.store).isValidTemplate()),[]),{setTemplateValidity:n,synchronizeTemplate:o}=(0,d.useDispatch)(g.store);return s?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,fs.__)("Keep it as is"),onClick:()=>n(!0)},{label:(0,fs.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,fs.__)("The content of your post doesn’t match the template assigned to your post type.")}),(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,fs.__)("Reset"),onConfirm:()=>{t(!1),o()},onCancel:()=>t(!1),size:"medium",children:(0,fs.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var ad=function(){const{notices:e}=(0,d.useSelect)((e=>({notices:e(_s.store).getNotices()})),[]),{removeNotice:t}=(0,d.useDispatch)(_s.store),s=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),n=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.NoticeList,{notices:n,className:"components-editor-notices__pinned"}),(0,c.jsx)(Fn.NoticeList,{notices:s,className:"components-editor-notices__dismissible",onRemove:t,children:(0,c.jsx)(id,{})})]})};const ld=-3;function cd(){const e=(0,d.useSelect)((e=>e(_s.store).getNotices()),[]),{removeNotice:t}=(0,d.useDispatch)(_s.store),s=e.filter((({type:e})=>"snackbar"===e)).slice(ld);return(0,c.jsx)(Fn.SnackbarList,{notices:s,className:"components-editor-notices__snackbar",onRemove:t})}function dd({record:e,checked:t,onChange:s}){const{name:n,kind:o,title:r,key:i}=e,{entityRecordTitle:a,hasPostMetaChanges:l}=(0,d.useSelect)((e=>{if("postType"!==o||"wp_template"!==n)return{entityRecordTitle:r,hasPostMetaChanges:$(e(xc)).hasPostMetaChanges(n,i)};const t=e(u.store).getEditedEntityRecord(o,n,i),{default_template_types:s=[]}=e(u.store).getCurrentTheme()??{};return{entityRecordTitle:Y({template:t,templateTypes:s}).title,hasPostMetaChanges:$(e(xc)).hasPostMetaChanges(n,i)}}),[n,o,r,i]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.PanelRow,{children:(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ln.decodeEntities)(a)||(0,fs.__)("Untitled"),checked:t,onChange:s,className:"entities-saved-states__change-control"})}),l&&(0,c.jsx)("ul",{className:"entities-saved-states__changes",children:(0,c.jsx)("li",{children:(0,fs.__)("Post Meta.")})})]})}const{getGlobalStylesChanges:ud,GlobalStylesContext:pd}=$(g.privateApis);function md({record:e}){const{user:t}=(0,p.useContext)(pd),s=(0,d.useSelect)((t=>t(u.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),n=ud(t,s,{maxResults:10});return n.length?(0,c.jsx)("ul",{className:"entities-saved-states__changes",children:n.map((e=>(0,c.jsx)("li",{children:e},e)))}):null}function hd({record:e,count:t}){if("globalStyles"===e?.name)return null;const s=function(e,t){switch(e){case"site":return 1===t?(0,fs.__)("This change will affect your whole site."):(0,fs.__)("These changes will affect your whole site.");case"wp_template":return(0,fs.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,fs.__)("The following has been modified.")}}(e?.name,t);return s?(0,c.jsx)(Fn.PanelRow,{children:s}):null}function gd({list:e,unselectedEntities:t,setUnselectedEntities:s}){const n=e.length,o=e[0];let r=(0,d.useSelect)((e=>e(u.store).getEntityConfig(o.kind,o.name)),[o.kind,o.name]).label;return"wp_template_part"===o?.name&&(r=1===n?(0,fs.__)("Template Part"):(0,fs.__)("Template Parts")),(0,c.jsxs)(Fn.PanelBody,{title:r,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,c.jsx)(hd,{record:o,count:n}),e.map((e=>(0,c.jsx)(dd,{record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>s(e,t)},e.key||e.property))),"globalStyles"===o?.name&&(0,c.jsx)(md,{record:o})]})}const _d=()=>{const{editedEntities:e,siteEdits:t,siteEntityConfig:s}=(0,d.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:s,getEntityConfig:n}=e(u.store);return{editedEntities:t(),siteEdits:s("root","site"),siteEntityConfig:n("root","site")}}),[]),n=(0,p.useMemo)((()=>{const n=e.filter((e=>!("root"===e.kind&&"site"===e.name))),o=s?.meta?.labels??{},r=[];for(const e in t)r.push({kind:"root",name:"site",title:o[e]||e,property:e});return[...n,...r]}),[e,t,s]),[o,r]=(0,p.useState)([]);return{dirtyEntityRecords:n,isDirty:n.length-o.length>0,setUnselectedEntities:({kind:e,name:t,key:s,property:n},i)=>{r(i?o.filter((o=>o.kind!==e||o.name!==t||o.key!==s||o.property!==n)):[...o,{kind:e,name:t,key:s,property:n}])},unselectedEntities:o}};function fd(e){return e}function bd({close:e,renderDialog:t,variant:s}){const n=_d();return(0,c.jsx)(yd,{close:e,renderDialog:t,variant:s,...n})}function yd({additionalPrompt:e,close:t,onSave:s=fd,saveEnabled:n,saveLabel:o=(0,fs.__)("Save"),renderDialog:r,dirtyEntityRecords:i,isDirty:a,setUnselectedEntities:l,unselectedEntities:u,variant:h="default"}){const g=(0,p.useRef)(),{saveDirtyEntities:_}=$((0,d.useDispatch)(xc)),f=i.reduce(((e,t)=>{const{name:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),{site:b,wp_template:y,wp_template_part:x,...v}=f,w=[b,y,x,...Object.values(v)].filter(Array.isArray),S=n??a,k=(0,p.useCallback)((()=>t()),[t]),[C,P]=(0,m.__experimentalUseDialog)({onClose:()=>k()}),j=(0,m.useInstanceId)(yd,"entities-saved-states__panel-label"),E=(0,m.useInstanceId)(yd,"entities-saved-states__panel-description"),T=i.length?(0,fs.__)("Select the items you want to save."):void 0,B="inline"===h,I=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.FlexItem,{isBlock:!B,as:Fn.Button,variant:B?"tertiary":"secondary",size:B?void 0:"compact",onClick:k,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.FlexItem,{isBlock:!B,as:Fn.Button,ref:g,variant:"primary",size:B?void 0:"compact",disabled:!S,accessibleWhenDisabled:!0,onClick:()=>_({onSave:s,dirtyEntityRecords:i,entitiesToSkip:u,close:t}),className:"editor-entities-saved-states__save-button",children:o})]});return(0,c.jsxs)("div",{ref:r?C:void 0,...r&&P,className:hr("entities-saved-states__panel",{"is-inline":B}),role:r?"dialog":void 0,"aria-labelledby":r?j:void 0,"aria-describedby":r?E:void 0,children:[!B&&(0,c.jsx)(Fn.Flex,{className:"entities-saved-states__panel-header",gap:2,children:I}),(0,c.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,c.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,c.jsx)("strong",{id:r?j:void 0,className:"entities-saved-states__text-prompt--header",children:(0,fs.__)("Are you ready to save?")})}),(0,c.jsxs)("div",{id:r?E:void 0,children:[e,(0,c.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:a?(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",i.length),i.length),{strong:(0,c.jsx)("strong",{})}):T})]})]}),w.map((e=>(0,c.jsx)(gd,{list:e,unselectedEntities:u,setUnselectedEntities:l},e[0].name))),B&&(0,c.jsx)(Fn.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:I})]})}function xd(){try{return(0,d.select)(xc).getEditedPostContent()}catch(e){}}function vd({text:e,children:t,variant:s="secondary"}){const n=(0,m.useCopyToClipboard)(e);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:s,ref:n,children:t})}class wd extends p.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,h.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,c.jsxs)(Fn.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,c.jsx)(Fn.__experimentalText,{as:"p",children:(0,fs.__)("The editor has encountered an unexpected error.")}),(0,c.jsxs)(Fn.__experimentalHStack,{expanded:!1,children:[t&&(0,c.jsx)(vd,{text:xd,children:(0,fs.__)("Copy contents")}),(0,c.jsx)(vd,{variant:"primary",text:e?.stack,children:(0,fs.__)("Copy error")})]})]}):this.props.children}}var Sd=wd;const kd=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let Cd;function Pd(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:s}=(0,d.useSelect)((e=>({postId:e(xc).getCurrentPostId(),isEditedPostNew:e(xc).isEditedPostNew(),hasRemoteAutosave:!!e(xc).getEditorSettings().autosave})),[]),{getEditedPostAttribute:n}=(0,d.useSelect)(xc),{createWarningNotice:o,removeNotice:r}=(0,d.useDispatch)(_s.store),{editPost:i,resetEditorBlocks:a}=(0,d.useDispatch)(xc);(0,p.useEffect)((()=>{let l=function(e,t){return window.sessionStorage.getItem(bs(e,t))}(e,t);if(!l)return;try{l=JSON.parse(l)}catch{return}const{post_title:c,content:d,excerpt:u}=l,p={title:c,content:d,excerpt:u};if(!Object.keys(p).some((e=>p[e]!==n(e))))return void ys(e,t);if(s)return;const m="wpEditorAutosaveRestore";o((0,fs.__)("The backup of this post in your browser is different from the version below."),{id:m,actions:[{label:(0,fs.__)("Restore the backup"),onClick(){const{content:e,...t}=p;i(t),a((0,x.parse)(p.content)),r(m)}}]})}),[t,e])}var jd=(0,m.ifCondition)((()=>{if(void 0!==Cd)return Cd;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),Cd=!0}catch{Cd=!1}return Cd}))((function(){const{autosave:e}=(0,d.useDispatch)(xc),t=(0,p.useCallback)((()=>{kd((()=>e({local:!0})))}),[]);Pd(),function(){const{postId:e,isEditedPostNew:t,isDirty:s,isAutosaving:n,didError:o}=(0,d.useSelect)((e=>({postId:e(xc).getCurrentPostId(),isEditedPostNew:e(xc).isEditedPostNew(),isDirty:e(xc).isEditedPostDirty(),isAutosaving:e(xc).isAutosavingPost(),didError:e(xc).didPostSaveRequestFail()})),[]),r=(0,p.useRef)(s),i=(0,p.useRef)(n);(0,p.useEffect)((()=>{!o&&(i.current&&!n||r.current&&!s)&&ys(e,t),r.current=s,i.current=n}),[s,n,o]);const a=(0,m.usePrevious)(t),l=(0,m.usePrevious)(e);(0,p.useEffect)((()=>{l===e&&a&&!t&&ys(e,!0)}),[t,e])}();const s=(0,d.useSelect)((e=>e(xc).getEditorSettings().localAutosaveInterval),[]);return(0,c.jsx)(Lc,{interval:s,autosave:t})}));var Ed=function({children:e}){const t=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc),{getPostType:s}=e(u.store),n=s(t("type"));return!!n?.supports?.["page-attributes"]}),[]);return t?e:null};var Td=function({children:e,supportKeys:t}){const s=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc),{getPostType:s}=e(u.store);return s(t("type"))}),[]);let n=!!s;return s&&(n=(Array.isArray(t)?t:[t]).some((e=>function(e={},t){if(void 0!==e[t])return!!e[t];const[s,n]=t.split("."),[o]=Array.isArray(e[s])?e[s]:[];return Array.isArray(o)?o.includes(n):!!o?.[n]}(s.supports,e)))),n?e:null};function Bd(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("menu_order")??0),[]),{editPost:t}=(0,d.useDispatch)(xc),[s,n]=(0,p.useState)(null),o=s??e;return(0,c.jsx)(Fn.Flex,{children:(0,c.jsx)(Fn.FlexBlock,{children:(0,c.jsx)(Fn.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,fs.__)("Order"),help:(0,fs.__)("Set the page order."),value:o,onChange:e=>{n(e);const s=Number(e);Number.isInteger(s)&&""!==e.trim?.()&&t({menu_order:s})},hideLabelFromVision:!0,onBlur:()=>{n(null)}})})})}function Id(){return(0,c.jsx)(Td,{supportKeys:"page-attributes",children:(0,c.jsx)(Bd,{})})}var Nd=(0,p.forwardRef)((({className:e,label:t,children:s},n)=>(0,c.jsxs)(Fn.__experimentalHStack,{className:hr("editor-post-panel__row",e),ref:n,children:[t&&(0,c.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,c.jsx)("div",{className:"editor-post-panel__row-control",children:s})]})));function Rd(e){const t=e.map((e=>({children:[],parent:void 0,...e})));if(t.some((({parent:e})=>void 0===e)))return t;const s=t.reduce(((e,t)=>{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),n=e=>e.map((e=>{const t=s[e.id];return{...e,children:t&&t.length?n(t):[]}}));return n(s[0]||[])}const Dd=e=>(0,Ln.decodeEntities)(e),Ad=e=>({...e,name:Dd(e.name)}),Md=e=>(e??[]).map(Ad);function Ld(e){return e?.title?.rendered?(0,Ln.decodeEntities)(e.title.rendered):`#${e.id} (${(0,fs.__)("no title")})`}const Od=(e,t)=>{const s=Lr()(e||"").toLowerCase(),n=Lr()(t||"").toLowerCase();return s===n?0:s.startsWith(n)?s.length:1/0};function Fd(){const{editPost:e}=(0,d.useDispatch)(xc),[t,s]=(0,p.useState)(!1),{isHierarchical:n,parentPostId:o,parentPostTitle:r,pageItems:i,isLoading:a}=(0,d.useSelect)((e=>{const{getPostType:s,getEntityRecords:n,getEntityRecord:o,isResolving:r}=e(u.store),{getCurrentPostId:i,getEditedPostAttribute:a}=e(xc),l=a("type"),c=a("parent"),d=s(l),p=i(),m=d?.hierarchical??!1,h={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(h.search=t);const g=c?o("postType",l,c):null;return{isHierarchical:m,parentPostId:c,parentPostTitle:g?Ld(g):"",pageItems:m?n("postType",l,h):null,isLoading:!!m&&r("getEntityRecords",["postType",l,h])}}),[t]),l=(0,p.useMemo)((()=>{const e=(s,n=0)=>{const o=s.map((t=>[{value:t.id,label:"— ".repeat(n)+(0,Ln.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],n+1)])).sort((([e],[s])=>Od(e.rawName,t)>=Od(s.rawName,t)?1:-1));return o.flat()};if(!i)return[];let s=i.map((e=>({id:e.id,parent:e.parent,name:Ld(e)})));t||(s=Rd(s));const n=e(s),a=n.find((e=>e.value===o));return r&&!a&&n.unshift({value:o,label:r}),n}),[i,t,r,o]);if(!n)return null;return(0,c.jsx)(Fn.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,fs.__)("Parent"),help:(0,fs.__)("Choose a parent page."),value:o,options:l,onFilterValueChange:(0,m.debounce)((e=>{s(e)}),300),onChange:t=>{e({parent:t})},hideLabelFromVision:!0,isLoading:a})}function Vd({isOpen:e,onClick:t}){const s=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc),s=t("parent");if(!s)return null;const{getEntityRecord:n}=e(u.store);return n("postType",t("type"),s)}),[]),n=(0,p.useMemo)((()=>s?Ld(s):(0,fs.__)("None")),[s]);return(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change parent: %s"),n),onClick:t,children:n})}function zd(){const e=(0,d.useSelect)((e=>e(u.store).getEntityRecord("root","__unstableBase")?.home),[]),[t,s]=(0,p.useState)(null),n=(0,p.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return(0,c.jsx)(Nd,{label:(0,fs.__)("Parent"),ref:s,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:n,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Vd,{isOpen:e,onClick:t}),renderContent:({onClose:t})=>(0,c.jsxs)("div",{className:"editor-post-parent",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Parent"),onClose:t}),(0,c.jsxs)("div",{children:[(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,w.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,c.jsx)("wbr",{})}),(0,c.jsx)("p",{children:(0,p.createInterpolateElement)((0,fs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,c.jsx)(Fd,{})]})})})}var Ud=Fd;const Hd="page-attributes";function Gd(){const{isEnabled:e,postType:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s}=e(xc),{getPostType:n}=e(u.store);return{isEnabled:s(Hd),postType:n(t("type"))}}),[]);return e&&t?(0,c.jsx)(zd,{}):null}function $d(){return(0,c.jsx)(Ed,{children:(0,c.jsx)(Gd,{})})}var Wd=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})});const Zd=(0,fs.__)("Custom Template");function Yd({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:s}=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:s}=e(xc);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:s}})),{createTemplate:n}=$((0,d.useDispatch)(xc)),[o,r]=(0,p.useState)(""),[i,a]=(0,p.useState)(!1),l=()=>{r(""),e()};return(0,c.jsx)(Fn.Modal,{title:(0,fs.__)("Create custom template"),onRequestClose:l,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,c.jsx)("form",{className:"editor-post-template__create-form",onSubmit:async e=>{if(e.preventDefault(),i)return;a(!0);const r=t??(0,x.serialize)([(0,x.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,x.createBlock)("core/site-title"),(0,x.createBlock)("core/site-tagline")]),(0,x.createBlock)("core/separator"),(0,x.createBlock)("core/group",{tagName:"main"},[(0,x.createBlock)("core/group",{layout:{inherit:!0}},[(0,x.createBlock)("core/post-title")]),(0,x.createBlock)("core/post-content",{layout:{inherit:!0}})])]),c=await n({slug:eo(o||Zd)||"wp-custom-template",content:r,title:o||Zd,status:"publish"});a(!1),s({postId:c.id,postType:"wp_template"}),l()},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"3",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,fs.__)("Name"),value:o,onChange:r,placeholder:Zd,disabled:i,help:(0,fs.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:l,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,fs.__)("Create")})]})]})})})}function qd(){return(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(xc);return{postId:t(),postType:s()}}),[])}function Kd(){const{postType:e,postId:t}=qd();return(0,d.useSelect)((s=>{const{canUser:n,getEntityRecord:o,getEntityRecords:r}=s(u.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0,a=+t===i?.page_for_posts,l="page"===e&&+t===i?.page_on_front,c=l?r("postType","wp_template",{per_page:-1}):[],d=l&&!!c?.some((({slug:e})=>"front-page"===e));return!a&&!d}),[t,e])}function Qd(e){return(0,d.useSelect)((t=>t(u.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e})),[e])}function Xd(e){const t=Jd(),s=Kd(),n=Qd(e);return(0,p.useMemo)((()=>s&&n?.filter((e=>(e.is_custom||"wp_template"===e.type)&&e.slug!==t&&!!e.content.raw))),[n,t,s])}function Jd(){const{postType:e,postId:t}=qd(),s=Qd(e),n=(0,d.useSelect)((s=>{const n=s(u.store).getEditedEntityRecord("postType",e,t);return n?.template}),[e,t]);if(n)return s?.find((e=>e.slug===n))?.slug}function eu({isOpen:e,onClick:t}){const s=(0,d.useSelect)((e=>{const t=e(xc).getEditedPostAttribute("template"),{supportsTemplateMode:s,availableTemplates:n}=e(xc).getEditorSettings();if(!s&&n[t])return n[t];const o=e(u.store).canUser("create",{kind:"postType",name:"wp_template"})&&e(xc).getCurrentTemplateId();return o?.title||o?.slug||n?.[t]}),[]);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.__)("Template options"),onClick:t,children:s??(0,fs.__)("Default template")})}function tu({onClose:e}){const t=Kd(),{availableTemplates:s,fetchedTemplates:n,selectedTemplateSlug:o,canCreate:r,canEdit:i,currentTemplateId:a,onNavigateToEntityRecord:l,getEditorSettings:m}=(0,d.useSelect)((e=>{const{canUser:s,getEntityRecords:n}=e(u.store),o=e(xc).getEditorSettings(),r=s("create",{kind:"postType",name:"wp_template"}),i=e(xc).getCurrentTemplateId();return{availableTemplates:o.availableTemplates,fetchedTemplates:r?n("postType","wp_template",{post_type:e(xc).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(xc).getEditedPostAttribute("template"),canCreate:t&&r&&o.supportsTemplateMode,canEdit:t&&r&&o.supportsTemplateMode&&!!i,currentTemplateId:i,onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:e(xc).getEditorSettings}}),[t]),h=(0,p.useMemo)((()=>Object.entries({...s,...Object.fromEntries((n??[]).map((({slug:e,title:t})=>[e,t.rendered])))}).map((([e,t])=>({value:e,label:t})))),[s,n]),_=h.find((e=>e.value===o))??h.find((e=>!e.value)),{editPost:f}=(0,d.useDispatch)(xc),{createSuccessNotice:b}=(0,d.useDispatch)(_s.store),[y,x]=(0,p.useState)(!1);return(0,c.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Template"),help:(0,fs.__)("Templates define the way content is displayed when viewing your site."),actions:r?[{icon:Wd,label:(0,fs.__)("Add template"),onClick:()=>x(!0)}]:[],onClose:e}),t?(0,c.jsx)(Fn.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,fs.__)("Template"),value:_?.value??"",options:h,onChange:e=>f({template:e||""})}):(0,c.jsx)(Fn.Notice,{status:"warning",isDismissible:!1,children:(0,fs.__)("The posts page template cannot be changed.")}),i&&l&&(0,c.jsx)("p",{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{l({postId:a,postType:"wp_template"}),e(),b((0,fs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,fs.__)("Go back"),onClick:()=>m().onNavigateToPreviousEntityRecord()}]})},children:(0,fs.__)("Edit template")})}),y&&(0,c.jsx)(Yd,{onClose:()=>x(!1)})]})}var su=function(){const[e,t]=(0,p.useState)(null),s=(0,p.useMemo)((()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0})),[e]);return(0,c.jsx)(Nd,{label:(0,fs.__)("Template"),ref:t,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:s,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(eu,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsx)(tu,{onClose:e})})})};const nu=window.wp.warning;var ou=s.n(nu);const{PreferenceBaseOption:ru}=$(C.privateApis);function iu(e){const{toggleEditorPanelEnabled:t}=(0,d.useDispatch)(xc),{isChecked:s,isRemoved:n}=(0,d.useSelect)((t=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:n}=t(xc);return{isChecked:s(e.panelName),isRemoved:n(e.panelName)}}),[e.panelName]);return n?null:(0,c.jsx)(ru,{isChecked:s,onChange:()=>t(e.panelName),...e})}const{Fill:au,Slot:lu}=(0,Fn.createSlotFill)("EnablePluginDocumentSettingPanelOption"),cu=({label:e,panelName:t})=>(0,c.jsx)(au,{children:(0,c.jsx)(iu,{label:e,panelName:t})});cu.Slot=lu;var du=cu;const{Fill:uu,Slot:pu}=(0,Fn.createSlotFill)("PluginDocumentSettingPanel"),mu=({name:e,className:t,title:s,icon:n,children:o})=>{const{name:r}=(0,la.usePluginContext)(),i=`${r}/${e}`,{opened:a,isEnabled:l}=(0,d.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s}=e(xc);return{opened:t(i),isEnabled:s(i)}}),[i]),{toggleEditorPanelOpened:u}=(0,d.useDispatch)(xc);return void 0===e&&ou()("PluginDocumentSettingPanel requires a name property."),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(du,{label:s,panelName:i}),(0,c.jsx)(uu,{children:l&&(0,c.jsx)(Fn.PanelBody,{className:t,title:s,icon:n,opened:a,onToggle:()=>u(i),children:o})})]})};mu.Slot=pu;var hu=mu;var gu=({allowedBlocks:e,icon:t,label:s,onClick:n,small:o,role:r})=>(0,c.jsx)(g.BlockSettingsMenuControls,{children:({selectedBlocks:i,onClose:a})=>((e,t)=>{return!Array.isArray(t)||(s=t,0===e.filter((e=>!s.includes(e))).length);var s})(i,e)?(0,c.jsx)(Fn.MenuItem,{onClick:(0,m.compose)(n,a),icon:t,label:o?s:void 0,role:r,children:!o&&s}):null});function _u(e){const t=(0,la.usePluginContext)();return(0,c.jsx)(Ra,{name:"core/plugin-more-menu",as:e.as??Fn.MenuItem,icon:e.icon||t.icon,...e})}const{Fill:fu,Slot:bu}=(0,Fn.createSlotFill)("PluginPostPublishPanel"),yu=({children:e,className:t,title:s,initialOpen:n=!1,icon:o})=>{const{icon:r}=(0,la.usePluginContext)();return(0,c.jsx)(fu,{children:(0,c.jsx)(Fn.PanelBody,{className:t,initialOpen:n||!s,title:s,icon:o??r,children:e})})};yu.Slot=bu;var xu=yu;const{Fill:vu,Slot:wu}=(0,Fn.createSlotFill)("PluginPostStatusInfo"),Su=({children:e,className:t})=>(0,c.jsx)(vu,{children:(0,c.jsx)(Fn.PanelRow,{className:t,children:e})});Su.Slot=wu;var ku=Su;const{Fill:Cu,Slot:Pu}=(0,Fn.createSlotFill)("PluginPrePublishPanel"),ju=({children:e,className:t,title:s,initialOpen:n=!1,icon:o})=>{const{icon:r}=(0,la.usePluginContext)();return(0,c.jsx)(Cu,{children:(0,c.jsx)(Fn.PanelBody,{className:t,initialOpen:n||!s,title:s,icon:o??r,children:e})})};ju.Slot=Pu;var Eu=ju;function Tu(e){const t=(0,la.usePluginContext)();return(0,c.jsx)(Ra,{name:"core/plugin-preview-menu",as:e.as??Fn.MenuItem,icon:e.icon||t.icon,...e})}function Bu({className:e,...t}){return(0,c.jsx)(za,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}function Iu(e){return(0,c.jsx)(Aa,{__unstableExplicitMenuItem:!0,scope:"core",...e})}function Nu(e=""){return e=(e=Lr()(e)).trim().toLowerCase()}function Ru(e,t){const s=Nu(t),n=Nu(e.title);let o=0;if(s===n)o+=30;else if(n.startsWith(s))o+=20;else{s.split(" ").every((e=>n.includes(e)))&&(o+=10)}return o}function Du({onClick:e}){const[t,s]=(0,p.useState)(!1),{postType:n,postId:o}=qd(),r=Xd(n),{editEntityRecord:i}=(0,d.useDispatch)(u.store);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuItem,{disabled:!r?.length,accessibleWhenDisabled:!0,onClick:()=>s(!0),children:(0,fs.__)("Change template")}),t&&(0,c.jsx)(Fn.Modal,{title:(0,fs.__)("Choose a template"),onRequestClose:()=>s(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,c.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,c.jsx)(Au,{postType:n,onSelect:async t=>{i("postType",n,o,{template:t.name},{undoIgnore:!0}),s(!1),e()}})})})]})}function Au({postType:e,onSelect:t}){const[s,n]=(0,p.useState)(""),o=Xd(e),r=(0,p.useMemo)((()=>o.map((e=>({name:e.slug,blocks:(0,x.parse)(e.content.raw),title:(0,Ln.decodeEntities)(e.title.rendered),id:e.id})))),[o]),i=(0,p.useMemo)((()=>function(e=[],t=""){if(!t)return e;const s=e.map((e=>[e,Ru(e,t)])).filter((([,e])=>e>0));return s.sort((([,e],[,t])=>t-e)),s.map((([e])=>e))}(r,s)),[r,s]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:s,label:(0,fs.__)("Search"),placeholder:(0,fs.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,c.jsx)(g.__experimentalBlockPatternsList,{label:(0,fs.__)("Templates"),blockPatterns:i,onClickPattern:t})]})}function Mu({onClick:e}){const t=Jd(),s=Kd(),{postType:n,postId:o}=qd(),{editEntityRecord:r}=(0,d.useDispatch)(u.store);return t&&s?(0,c.jsx)(Fn.MenuItem,{onClick:()=>{r("postType",n,o,{template:""},{undoIgnore:!0}),e()},children:(0,fs.__)("Use default template")}):null}function Lu(){const{canCreateTemplates:e}=(0,d.useSelect)((e=>{const{canUser:t}=e(u.store);return{canCreateTemplates:t("create",{kind:"postType",name:"wp_template"})}}),[]),[t,s]=(0,p.useState)(!1),n=Kd();return e&&n?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuItem,{onClick:()=>{s(!0)},children:(0,fs.__)("Create new template")}),t&&(0,c.jsx)(Yd,{onClose:()=>{s(!1)}})]}):null}function Ou({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:s,getEditorSettings:n,hasGoBack:o,hasSpecificTemplate:r}=(0,d.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:s,getCurrentPost:n}=$(e(xc)),o=s(),r=n();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,hasGoBack:o.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!r.template}}),[]),{get:i}=(0,d.useSelect)(C.store),{editedRecord:a,hasResolved:l}=(0,u.useEntityRecord)("postType","wp_template",e),{getEntityRecord:m}=(0,d.useSelect)(u.store),{editEntityRecord:h}=(0,d.useDispatch)(u.store),{createSuccessNotice:g}=(0,d.useDispatch)(_s.store),{setRenderingMode:_,setDefaultRenderingMode:f}=$((0,d.useDispatch)(xc)),b=(0,d.useSelect)((e=>!!e(u.store).canUser("create",{kind:"postType",name:"wp_template"})),[]),[y,x]=(0,p.useState)(null),v=(0,p.useMemo)((()=>({anchor:y,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0})),[y]);if(!l)return null;const w=o?[{label:(0,fs.__)("Go back"),onClick:()=>n().onNavigateToPreviousEntityRecord()}]:void 0;return(0,c.jsx)(Nd,{label:(0,fs.__)("Template"),ref:x,children:(0,c.jsx)(Fn.DropdownMenu,{popoverProps:v,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,fs.__)("Template options"),text:(0,Ln.decodeEntities)(a.title),icon:null,children:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Fn.MenuGroup,{children:[b&&(0,c.jsx)(Fn.MenuItem,{onClick:async()=>{if(s({postId:a.id,postType:"wp_template"}),!r){const e=await m("root","site").active_templates;e[a.slug]!==a.id&&h("root","site",void 0,{active_templates:{...e,[a.slug]:a.id}})}e(),i("core/edit-site","welcomeGuideTemplate")||g((0,fs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:w})},children:(0,fs.__)("Edit template")}),(0,c.jsx)(Du,{onClick:e}),(0,c.jsx)(Mu,{onClick:e}),b&&(0,c.jsx)(Lu,{})]}),(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItem,{icon:t?void 0:Zn,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{const e=t?"template-locked":"post-only";_(e),f(e)},children:(0,fs.__)("Show template")})})]})})})}function Fu(){const{templateId:e,isBlockTheme:t}=(0,d.useSelect)((e=>{const{getCurrentTemplateId:t,getEditorSettings:s}=e(xc);return{templateId:t(),isBlockTheme:s().__unstableIsBlockBasedTheme}}),[]),s=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPostType(),s=e(u.store).getPostType(t);if(!s?.viewable)return!1;const n=e(xc).getEditorSettings();if(!!n.availableTemplates&&Object.keys(n.availableTemplates).length>0)return!0;if(!n.supportsTemplateMode)return!1;return e(u.store).canUser("create",{kind:"postType",name:"wp_template"})??!1}),[]),n=(0,d.useSelect)((e=>e(u.store).canUser("read",{kind:"postType",name:"wp_template"})??!1),[]);return t&&n||!s?t&&e?(0,c.jsx)(Ou,{id:e}):null:(0,c.jsx)(su,{})}const Vu={_fields:"id,name",context:"view"},zu={who:"authors",per_page:100,...Vu};function Uu(e){const{authorId:t,authors:s,postAuthor:n,isLoading:o}=(0,d.useSelect)((t=>{const{getUser:s,getUsers:n,isResolving:o}=t(u.store),{getEditedPostAttribute:r}=t(xc),i=r("author"),a={...zu};return e&&(a.search=e,a.search_columns=["name"]),{authorId:i,authors:n(a),postAuthor:s(i,Vu),isLoading:o("getUsers",[a])}}),[e]);return{authorId:t,authorOptions:(0,p.useMemo)((()=>{const e=(s??[]).map((e=>({value:e.id,label:(0,Ln.decodeEntities)(e.name)}))),t=e.findIndex((({value:e})=>n?.id===e));let o=[];return t<0&&n?o=[{value:n.id,label:(0,Ln.decodeEntities)(n.name)}]:t<0&&!n&&(o=[{value:0,label:(0,fs.__)("(No author)")}]),[...o,...e]}),[s,n]),postAuthor:n,isLoading:o}}function Hu(){const[e,t]=(0,p.useState)(),{editPost:s}=(0,d.useDispatch)(xc),{authorId:n,authorOptions:o,isLoading:r}=Uu(e);return(0,c.jsx)(Fn.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)("Author"),options:o,value:n,onFilterValueChange:(0,m.debounce)(t,300),onChange:e=>{e&&s({author:e})},allowReset:!1,hideLabelFromVision:!0,isLoading:r})}function Gu(){const{editPost:e}=(0,d.useDispatch)(xc),{authorId:t,authorOptions:s}=Uu();return(0,c.jsx)(Fn.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,fs.__)("Author"),options:s,onChange:t=>{const s=Number(t);e({author:s})},value:t,hideLabelFromVision:!0})}var $u=function(){return(0,d.useSelect)((e=>{const t=e(u.store).getUsers(zu);return t?.length>=25}),[])?(0,c.jsx)(Hu,{}):(0,c.jsx)(Gu,{})};function Wu({children:e}){const{hasAssignAuthorAction:t}=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPost();return{hasAssignAuthorAction:!!t?._links?.["wp:action-assign-author"]}}),[]);return t?(0,c.jsx)(Td,{supportKeys:"author",children:e}):null}function Zu({isOpen:e,onClick:t}){const{postAuthor:s}=(0,d.useSelect)((e=>{const t=e(xc).getEditedPostAttribute("author");return{postAuthor:e(u.store).getUser(t,Vu)}}),[]),n=(0,Ln.decodeEntities)(s?.name)||(0,fs.__)("(No author)");return(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change author: %s"),n),onClick:t,children:n})}var Yu=function(){const[e,t]=(0,p.useState)(null),s=(0,p.useMemo)((()=>({anchor:e,placement:"left-start",offset:36,shift:!0})),[e]);return(0,c.jsx)(Wu,{children:(0,c.jsx)(Nd,{label:(0,fs.__)("Author"),ref:t,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:s,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Zu,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsxs)("div",{className:"editor-post-author",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Author"),onClose:e}),(0,c.jsx)($u,{onClose:e})]})})})})};const qu=[{label:(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,fs.__)("Visitors can add new comments and replies.")},{label:(0,fs.__)("Closed"),value:"closed",description:[(0,fs.__)("Visitors cannot add new comments or replies."),(0,fs.__)("Existing comments remain visible.")].join(" ")}];var Ku=function(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("comment_status")??"open"),[]),{editPost:t}=(0,d.useDispatch)(xc);return(0,c.jsx)("form",{children:(0,c.jsx)(Fn.__experimentalVStack,{spacing:4,children:(0,c.jsx)(Fn.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,fs.__)("Comment status"),options:qu,onChange:e=>t({comment_status:e}),selected:e})})})};var Qu=function(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("ping_status")??"open"),[]),{editPost:t}=(0,d.useDispatch)(xc);return(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Enable pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t({ping_status:"open"===e?"closed":"open"}),help:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fs.__)("Learn more about pingbacks & trackbacks")})})};const Xu="discussion-panel";function Ju({onClose:e}){return(0,c.jsxs)("div",{className:"editor-post-discussion",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Discussion"),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(Td,{supportKeys:"comments",children:(0,c.jsx)(Ku,{})}),(0,c.jsx)(Td,{supportKeys:"trackbacks",children:(0,c.jsx)(Qu,{})})]})]})}function ep({isOpen:e,onClick:t}){const{commentStatus:s,pingStatus:n,commentsSupported:o,trackbacksSupported:r}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc),{getPostType:s}=e(u.store),n=s(t("type"));return{commentStatus:t("comment_status")??"open",pingStatus:t("ping_status")??"open",commentsSupported:!!n.supports.comments,trackbacksSupported:!!n.supports.trackbacks}}),[]);let i;return i="open"===s?"open"===n?(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'):r?(0,fs.__)("Comments only"):(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'):"open"===n?o?(0,fs.__)("Pings only"):(0,fs.__)("Pings enabled"):(0,fs.__)("Closed"),(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,fs.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:i})}function tp(){const{isEnabled:e}=(0,d.useSelect)((e=>{const{isEditorPanelEnabled:t}=e(xc);return{isEnabled:t(Xu)}}),[]),[t,s]=(0,p.useState)(null),n=(0,p.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return e?(0,c.jsx)(Td,{supportKeys:["comments","trackbacks"],children:(0,c.jsx)(Nd,{label:(0,fs.__)("Discussion"),ref:s,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:n,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(ep,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsx)(Ju,{onClose:e})})})}):null}function sp({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){const{excerpt:s,shouldUseDescriptionLabel:n,usedAttribute:o}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(xc),n=t(),o=["wp_template","wp_template_part"].includes(n)?"description":"excerpt";return{excerpt:s(o),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(n),usedAttribute:o}}),[]),{editPost:r}=(0,d.useDispatch)(xc),[i,a]=(0,p.useState)((0,Ln.decodeEntities)(s)),l=e=>{r({[o]:e})},u=n?(0,fs.__)("Write a description (optional)"):(0,fs.__)("Write an excerpt (optional)");return(0,c.jsx)("div",{className:"editor-post-excerpt",children:(0,c.jsx)(Fn.TextareaControl,{__nextHasNoMarginBottom:!0,label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?a:l,onBlur:t?()=>l(i):void 0,value:t?i:s,help:n?(0,fs.__)("Write a description"):(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,fs.__)("Learn more about manual excerpts")})})})}var np=function({children:e}){return(0,c.jsx)(Td,{supportKeys:"excerpt",children:e})};const{Fill:op,Slot:rp}=(0,Fn.createSlotFill)("PluginPostExcerpt"),ip=({children:e,className:t})=>(0,c.jsx)(op,{children:(0,c.jsx)(Fn.PanelRow,{className:t,children:e})});ip.Slot=rp;var ap=ip;const lp="post-excerpt";function cp(){const{isOpened:e,isEnabled:t,postType:s}=(0,d.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s,getCurrentPostType:n}=e(xc);return{isOpened:t(lp),isEnabled:s(lp),postType:n()}}),[]),{toggleEditorPanelOpened:n}=(0,d.useDispatch)(xc);if(!t)return null;const o=["wp_template","wp_template_part","wp_block"].includes(s);return(0,c.jsx)(Fn.PanelBody,{title:o?(0,fs.__)("Description"):(0,fs.__)("Excerpt"),opened:e,onToggle:()=>n(lp),children:(0,c.jsx)(ap.Slot,{children:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(sp,{}),e]})})})}function dp(){return(0,c.jsx)(np,{children:(0,c.jsx)(cp,{})})}function up(){return(0,c.jsx)(np,{children:(0,c.jsx)(pp,{})})}function pp(){const{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:s,allowEditing:n}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditedPostAttribute:n,isEditorPanelEnabled:o}=e(xc),r=t(),i=["wp_template","wp_template_part"].includes(r),a="wp_block"===r,l=i||a,c=n(i?"description":"excerpt"),d=i&&e(u.store).getEntityRecord("postType",r,s()),p=!c&&i?Y({template:d,templateTypes:e(u.store).getCurrentTheme()?.default_template_types})?.description:void 0,m=o(lp)||l;return{excerpt:c??p,shouldRender:m,shouldBeUsedAsDescription:l,allowEditing:m&&(!l||a||d&&d.source===D&&!d.has_theme_file&&d.is_custom)}}),[]),[o,r]=(0,p.useState)(null),i=s?(0,fs.__)("Description"):(0,fs.__)("Excerpt"),a=(0,p.useMemo)((()=>({anchor:o,"aria-label":i,headerTitle:i,placement:"left-start",offset:36,shift:!0})),[o,i]);if(!e)return!1;const l=!!t&&(0,c.jsx)(Fn.__experimentalText,{align:"left",numberOfLines:4,truncate:n,children:(0,Ln.decodeEntities)(t)});if(!n)return l;const m=s?(0,fs.__)("Add a description…"):(0,fs.__)("Add an excerpt…"),h=s?(0,fs.__)("Edit description"):(0,fs.__)("Edit excerpt");return(0,c.jsxs)(Fn.__experimentalVStack,{children:[l,(0,c.jsx)(Fn.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:a,focusOnMount:!0,ref:r,renderToggle:({onToggle:e})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"link",children:l?h:m}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:i,onClose:e}),(0,c.jsx)(Fn.__experimentalVStack,{spacing:4,children:(0,c.jsx)(ap.Slot,{children:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(sp,{hideLabelFromVision:!0,updateOnBlur:!0}),e]})})})]})})]})}function mp({children:e,supportKeys:t}){const{postType:s,themeSupports:n}=(0,d.useSelect)((e=>({postType:e(xc).getEditedPostAttribute("type"),themeSupports:e(u.store).getThemeSupports()})),[]);return(Array.isArray(t)?t:[t]).some((e=>{const t=n?.[e]??!1;return"post-thumbnails"===e&&Array.isArray(t)?t.includes(s):t}))?e:null}var hp=function({children:e}){return(0,c.jsx)(mp,{supportKeys:"post-thumbnails",children:(0,c.jsx)(Td,{supportKeys:"thumbnail",children:e})})};const gp=["image"],_p=(0,fs.__)("Featured image"),fp=(0,fs.__)("Add a featured image"),bp=(0,c.jsx)("p",{children:(0,fs.__)("To edit the featured image, you need permission to upload media.")});const yp=(0,d.withSelect)((e=>{const{getEntityRecord:t,getPostType:s,hasFinishedResolution:n}=e(u.store),{getCurrentPostId:o,getEditedPostAttribute:r}=e(xc),i=r("featured_media");return{media:i?t("postType","attachment",i,{context:"view"}):null,currentPostId:o(),postType:s(r("type")),featuredImageId:i,isRequestingFeaturedImageMedia:!!i&&!n("getEntityRecord",["postType","attachment",i,{context:"view"}])}})),xp=(0,d.withDispatch)(((e,{noticeOperations:t},{select:s})=>{const{editPost:n}=e(xc);return{onUpdateImage(e){n({featured_media:e.id})},onDropImage(e){s(g.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){n({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)},multiple:!1})},onRemoveImage(){n({featured_media:0})}}}));var vp=(0,m.compose)(Fn.withNotices,yp,xp,(0,Fn.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:s,onRemoveImage:n,media:o,postType:r,noticeUI:i,noticeOperations:a,isRequestingFeaturedImageMedia:l}){const u=(0,p.useRef)(!1),[m,_]=(0,p.useState)(!1),{getSettings:f}=(0,d.useSelect)(g.store),{mediaSourceUrl:b}=function(e,t){if(!e)return{};const s=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(s in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[s].width,mediaHeight:e.media_details.sizes[s].height,mediaSourceUrl:e.media_details.sizes[s].source_url};const n=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return n in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[n].width,mediaHeight:e.media_details.sizes[n].height,mediaSourceUrl:e.media_details.sizes[n].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(o,e);function y(e){f().mediaUpload({allowedTypes:gp,filesList:e,onFileChange([e]){(0,$o.isBlobURL)(e?.url)?_(!0):(e&&s(e),_(!1))},onError(e){a.removeAllNotices(),a.createErrorNotice(e)},multiple:!1})}function x(e){return e.alt_text?(0,fs.sprintf)((0,fs.__)("Current image: %s"),e.alt_text):(0,fs.sprintf)((0,fs.__)("The current image has no alternative text. The file name is: %s"),e.media_details.sizes?.full?.file||e.slug)}function v(e){u.current&&e&&(e.focus(),u.current=!1)}const w=!l&&!!t&&!o;return(0,c.jsxs)(hp,{children:[i,(0,c.jsxs)("div",{className:"editor-post-featured-image",children:[o&&(0,c.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:x(o)}),(0,c.jsx)(g.MediaUploadCheck,{fallback:bp,children:(0,c.jsx)(g.MediaUpload,{title:r?.labels?.featured_image||_p,onSelect:s,unstableFeaturedImageFlow:!0,allowedTypes:gp,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,c.jsxs)("div",{className:"editor-post-featured-image__container",children:[w?(0,c.jsx)(Fn.Notice,{status:"warning",isDismissible:!1,children:(0,fs.__)("Could not retrieve the featured image data.")}):(0,c.jsxs)(Fn.Button,{__next40pxDefaultSize:!0,ref:v,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,fs.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:m,accessibleWhenDisabled:!0,children:[!!t&&o&&(0,c.jsx)("img",{className:"editor-post-featured-image__preview-image",src:b,alt:x(o)}),(m||l)&&(0,c.jsx)(Fn.Spinner,{}),!t&&!m&&(r?.labels?.set_featured_image||fp)]}),!!t&&(0,c.jsxs)(Fn.__experimentalHStack,{className:hr("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":w,"editor-post-featured-image__actions-is-requesting-image":l}),children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:e,"aria-haspopup":"dialog",variant:w?"secondary":void 0,children:(0,fs.__)("Replace")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{n(),u.current=!0},variant:w?"secondary":void 0,isDestructive:w,children:(0,fs.__)("Remove")})]}),(0,c.jsx)(Fn.DropZone,{onFilesDrop:y})]}),value:t})})]})]})}));const wp="featured-image";function Sp({withPanelBody:e=!0}){const{postType:t,isEnabled:s,isOpened:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s,isEditorPanelOpened:n}=e(xc),{getPostType:o}=e(u.store);return{postType:o(t("type")),isEnabled:s(wp),isOpened:n(wp)}}),[]),{toggleEditorPanelOpened:o}=(0,d.useDispatch)(xc);return s?e?(0,c.jsx)(hp,{children:(0,c.jsx)(Fn.PanelBody,{title:t?.labels?.featured_image??(0,fs.__)("Featured image"),opened:n,onToggle:()=>o(wp),children:(0,c.jsx)(vp,{})})}):(0,c.jsx)(hp,{children:(0,c.jsx)(vp,{})}):null}function kp({children:e}){return(0,d.useSelect)((e=>e(xc).getEditorSettings().disablePostFormats),[])?null:(0,c.jsx)(Td,{supportKeys:"post-formats",children:e})}const Cp=[{id:"aside",caption:(0,fs.__)("Aside")},{id:"audio",caption:(0,fs.__)("Audio")},{id:"chat",caption:(0,fs.__)("Chat")},{id:"gallery",caption:(0,fs.__)("Gallery")},{id:"image",caption:(0,fs.__)("Image")},{id:"link",caption:(0,fs.__)("Link")},{id:"quote",caption:(0,fs.__)("Quote")},{id:"standard",caption:(0,fs.__)("Standard")},{id:"status",caption:(0,fs.__)("Status")},{id:"video",caption:(0,fs.__)("Video")}].sort(((e,t)=>{const s=e.caption.toUpperCase(),n=t.caption.toUpperCase();return s<n?-1:s>n?1:0}));function Pp(){const e=`post-format-selector-${(0,m.useInstanceId)(Pp)}`,{postFormat:t,suggestedFormat:s,supportedFormats:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(xc),n=t("format"),o=e(u.store).getThemeSupports();return{postFormat:n??"standard",suggestedFormat:s(),supportedFormats:o.formats}}),[]),o=Cp.filter((e=>n?.includes(e.id)||t===e.id)),r=o.find((e=>e.id===s)),{editPost:i}=(0,d.useDispatch)(xc),a=e=>i({format:e});return(0,c.jsx)(kp,{children:(0,c.jsxs)("div",{className:"editor-post-format",children:[(0,c.jsx)(Fn.RadioControl,{className:"editor-post-format__options",label:(0,fs.__)("Post Format"),selected:t,onChange:e=>a(e),id:e,options:o.map((e=>({label:e.caption,value:e.id}))),hideLabelFromVision:!0}),r&&r.id!==t&&(0,c.jsx)("p",{className:"editor-post-format__suggestion",children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>a(r.id),children:(0,fs.sprintf)((0,fs.__)("Apply suggested format: %s"),r.caption)})})]})})}var jp=function({children:e}){const{lastRevisionId:t,revisionsCount:s}=(0,d.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(xc);return{lastRevisionId:t(),revisionsCount:s()}}),[]);return!t||s<2?null:(0,c.jsx)(Td,{supportKeys:"revisions",children:e})};function Ep(){return(0,d.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(xc);return{lastRevisionId:t(),revisionsCount:s()}}),[])}function Tp(){const{lastRevisionId:e,revisionsCount:t}=Ep();return(0,c.jsx)(jp,{children:(0,c.jsx)(Nd,{label:(0,fs.__)("Revisions"),children:(0,c.jsx)(Fn.Button,{href:(0,w.addQueryArgs)("revision.php",{revision:e}),className:"editor-private-post-last-revision__button",text:t,variant:"tertiary",size:"compact"})})})}var Bp=function(){const{lastRevisionId:e,revisionsCount:t}=Ep();return(0,c.jsx)(jp,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,href:(0,w.addQueryArgs)("revision.php",{revision:e}),className:"editor-post-last-revision__title",icon:qo,iconPosition:"right",text:(0,fs.sprintf)((0,fs.__)("Revisions (%s)"),t)})})};var Ip=function(){return(0,c.jsx)(jp,{children:(0,c.jsx)(Fn.PanelBody,{className:"editor-post-last-revision__panel",children:(0,c.jsx)(Bp,{})})})};var Np=function e(){const t="core/editor/post-locked-modal-"+(0,m.useInstanceId)(e),{autosave:s,updatePostLock:n}=(0,d.useDispatch)(xc),{isLocked:o,isTakeover:r,user:i,postId:a,postLockUtils:l,activePostLock:g,postType:_,previewLink:f}=(0,d.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:s,getPostLockUser:n,getCurrentPostId:o,getActivePostLock:r,getEditedPostAttribute:i,getEditedPostPreviewLink:a,getEditorSettings:l}=e(xc),{getPostType:c}=e(u.store);return{isLocked:t(),isTakeover:s(),user:n(),postId:o(),postLockUtils:l().postLockUtils,activePostLock:r(),postType:c(i("type")),previewLink:a()}}),[]);if((0,p.useEffect)((()=>{function e(){if(o||!g)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",l.unlockNonce),e.append("post_ID",a),e.append("active_post_lock",g),window.navigator.sendBeacon)window.navigator.sendBeacon(l.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",l.ajaxUrl,!1),t.send(e)}}return(0,h.addAction)("heartbeat.send",t,(function(e){o||(e["wp-refresh-post-lock"]={lock:g,post_id:a})})),(0,h.addAction)("heartbeat.tick",t,(function(e){if(!e["wp-refresh-post-lock"])return;const t=e["wp-refresh-post-lock"];t.lock_error?(s(),n({isLocked:!0,isTakeover:!0,user:{name:t.lock_error.name,avatar:t.lock_error.avatar_src_2x}})):t.new_lock&&n({isLocked:!1,activePostLock:t.new_lock})})),window.addEventListener("beforeunload",e),()=>{(0,h.removeAction)("heartbeat.send",t),(0,h.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",e)}}),[]),!o)return null;const b=i.name,y=i.avatar,x=(0,w.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:a,action:"edit",_wpnonce:l.nonce}),v=(0,w.addQueryArgs)("edit.php",{post_type:_?.slug}),S=(0,fs.__)("Exit editor");return(0,c.jsx)(Fn.Modal,{title:r?(0,fs.__)("Someone else has taken over this post"):(0,fs.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"top",spacing:6,children:[!!y&&(0,c.jsx)("img",{src:y,alt:(0,fs.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,c.jsxs)("div",{children:[!!r&&(0,c.jsx)("p",{children:(0,p.createInterpolateElement)(b?(0,fs.sprintf)((0,fs.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),b):(0,fs.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,c.jsx)("strong",{}),PreviewLink:(0,c.jsx)(Fn.ExternalLink,{href:f,children:(0,fs.__)("preview")})})}),!r&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{children:(0,p.createInterpolateElement)(b?(0,fs.sprintf)((0,fs.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),b):(0,fs.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,c.jsx)("strong",{}),PreviewLink:(0,c.jsx)(Fn.ExternalLink,{href:f,children:(0,fs.__)("preview")})})}),(0,c.jsx)("p",{children:(0,fs.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,c.jsxs)(Fn.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!r&&(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:x,children:(0,fs.__)("Take over")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",href:v,children:S})]})]})]})})};var Rp=function({children:e}){const{hasPublishAction:t,isPublished:s}=(0,d.useSelect)((e=>{const{isCurrentPostPublished:t,getCurrentPost:s}=e(xc);return{hasPublishAction:s()._links?.["wp:action-publish"]??!1,isPublished:t()}}),[]);return s||!t?null:e};var Dp=function(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("status")),[]),{editPost:t}=(0,d.useDispatch)(xc);return(0,c.jsx)(Rp,{children:(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Pending review"),checked:"pending"===e,onChange:()=>{t({status:"pending"===e?"draft":"pending"})}})})};function Ap({className:e,textContent:t,forceIsAutosaveable:s,role:n,onPreview:o}){const{postId:r,currentPostLink:i,previewLink:a,isSaveable:l,isViewable:m}=(0,d.useSelect)((e=>{const t=e(xc),s=e(u.store).getPostType(t.getCurrentPostType("type")),n=s?.viewable??!1;return n?{postId:t.getCurrentPostId(),currentPostLink:t.getCurrentPostAttribute("link"),previewLink:t.getEditedPostPreviewLink(),isSaveable:t.isEditedPostSaveable(),isViewable:n}:{isViewable:n}}),[]),{__unstableSaveForPreview:g}=(0,d.useDispatch)(xc);if(!m)return null;const _=`wp-preview-${r}`,f=a||i;return(0,c.jsx)(Fn.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:f,target:_,accessibleWhenDisabled:!0,disabled:!l,onClick:async e=>{e.preventDefault();const t=window.open("",_);t.focus(),function(e){let t=(0,p.renderToString)((0,c.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,c.jsxs)(Fn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,c.jsx)(Fn.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,c.jsx)(Fn.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,c.jsx)("p",{children:(0,fs.__)("Generating preview…")})]}));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,h.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,fs.__)("Generating preview…"),e.close()}(t.document);const n=await g({forceIsAutosaveable:s});t.location=n,o?.()},role:n,size:"compact",children:t||(0,c.jsxs)(c.Fragment,{children:[(0,fs._x)("Preview","imperative verb"),(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]})})}function Mp(){const e=(0,m.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:s,isSaving:n,isPublishing:o,hasPublishAction:r,isAutosaving:i,hasNonPostEntityChanges:a,postStatusHasChanged:l,postStatus:c}=(0,d.useSelect)((e=>{const{isCurrentPostPublished:t,isEditedPostBeingScheduled:s,isSavingPost:n,isPublishingPost:o,getCurrentPost:r,getCurrentPostType:i,isAutosavingPost:a,getPostEdits:l,getEditedPostAttribute:c}=e(xc);return{isPublished:t(),isBeingScheduled:s(),isSaving:n(),isPublishing:o(),hasPublishAction:r()._links?.["wp:action-publish"]??!1,postType:i(),isAutosaving:a(),hasNonPostEntityChanges:e(xc).hasNonPostEntityChanges(),postStatusHasChanged:!!l()?.status,postStatus:c("status")}}),[]);return o?(0,fs.__)("Publishing…"):(t||s)&&n&&!i?(0,fs.__)("Saving…"):r?a||t||l&&!["future","publish"].includes(c)||!l&&"future"===c?(0,fs.__)("Save"):s?(0,fs.__)("Schedule"):(0,fs.__)("Publish"):e?(0,fs.__)("Publish"):(0,fs.__)("Submit for Review")}const Lp=()=>{};class Op extends p.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:s,setEntitiesSavedStatesCallback:n}=this.props;return s&&n?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),n((()=>this.closeEntitiesSavedStates)),Lp):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:s}=this.props,{entitiesSavedStatesCallback:n}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===s))&&n()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:s,isOpen:n,isPostSavingLocked:o,isPublishable:r,isPublished:i,isSaveable:a,isSaving:l,isAutoSaving:d,isToggle:u,savePostStatus:p,onSubmit:m=Lp,onToggle:h,visibility:g,hasNonPostEntityChanges:_,isSavingNonPostEntityChanges:f,postStatus:b,postStatusHasChanged:y}=this.props,x=(l||!a||o||!r&&!e)&&(!_||f),v=(i||l||!a||!r&&!e)&&(!_||f);let w="publish";y?w=b:t?"private"===g?w="private":s&&(w="future"):w="pending";const S={"aria-disabled":x,className:"editor-post-publish-button",isBusy:!d&&l,variant:"primary",onClick:this.createOnClick((()=>{x||(m(),p(w))})),"aria-haspopup":_?"dialog":void 0},k={"aria-disabled":v,"aria-expanded":n,className:"editor-post-publish-panel__toggle",isBusy:l&&i,variant:"primary",size:"compact",onClick:this.createOnClick((()=>{v||h()})),"aria-haspopup":_?"dialog":void 0},C=u?k:S;return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Fn.Button,{...C,className:`${C.className} editor-post-publish-button__button`,size:"compact",children:(0,c.jsx)(Mp,{})})})}}var Fp=(0,m.compose)([(0,d.withSelect)((e=>{const{isSavingPost:t,isAutosavingPost:s,isEditedPostBeingScheduled:n,getEditedPostVisibility:o,isCurrentPostPublished:r,isEditedPostSaveable:i,isEditedPostPublishable:a,isPostSavingLocked:l,getCurrentPost:c,getCurrentPostType:d,getCurrentPostId:u,hasNonPostEntityChanges:p,isSavingNonPostEntityChanges:m,getEditedPostAttribute:h,getPostEdits:g}=e(xc);return{isSaving:t(),isAutoSaving:s(),isBeingScheduled:n(),visibility:o(),isSaveable:i(),isPostSavingLocked:l(),isPublishable:a(),isPublished:r(),hasPublishAction:c()._links?.["wp:action-publish"]??!1,postType:d(),postId:u(),postStatus:h("status"),postStatusHasChanged:g()?.status,hasNonPostEntityChanges:p(),isSavingNonPostEntityChanges:m()}})),(0,d.withDispatch)((e=>{const{editPost:t,savePost:s}=e(xc);return{savePostStatus:e=>{t({status:e},{undoIgnore:!0}),s()}}}))])(Op),Vp=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,c.jsx)(L.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});const zp=[{label:(0,fs.__)("Public"),value:"public",description:(0,fs.__)("Visible to everyone.")},{label:(0,fs.__)("Private"),value:"private",description:(0,fs.__)("Only visible to site admins and editors.")},{label:(0,fs.__)("Password protected"),value:"password",description:(0,fs.__)("Only visible to those who know the password.")}];function Up({onClose:e}){const t=(0,m.useInstanceId)(Up),{status:s,visibility:n,password:o}=(0,d.useSelect)((e=>({status:e(xc).getEditedPostAttribute("status"),visibility:e(xc).getEditedPostVisibility(),password:e(xc).getEditedPostAttribute("password")}))),{editPost:r}=(0,d.useDispatch)(xc),[i,a]=(0,p.useState)(!!o);return(0,c.jsxs)("div",{className:"editor-post-visibility",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Visibility"),help:(0,fs.__)("Control how this post is viewed."),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(Fn.RadioControl,{label:(0,fs.__)("Visibility"),hideLabelFromVision:!0,options:zp,selected:i?"password":n,onChange:function(e){r({public:{status:"private"===n?"draft":s,password:""},private:{status:"private",password:""},password:{status:"private"===n?"draft":s,password:o||""}}[e]),a("password"===e)}}),i&&(0,c.jsx)(Fn.TextControl,{label:(0,fs.__)("Password"),onChange:e=>{r({password:e})},value:o,placeholder:(0,fs.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})]})]})}function Hp(){return Gp()}function Gp(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostVisibility()),[]);return zp.find((t=>t.value===e))?.label}function $p(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Wp(e){const t=$p(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Zp(e){const t=$p(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);const Yp=6e4,qp=36e5;function Kp(e,t){const s=t?.additionalDigits??2,n=function(e){const t={},s=e.split(Qp.dateTimeDelimiter);let n;if(s.length>2)return t;/:/.test(s[0])?n=s[0]:(t.date=s[0],n=s[1],Qp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Qp.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length)));if(n){const e=Qp.timezone.exec(n);e?(t.time=n.replace(e[1],""),t.timezone=e[1]):t.time=n}return t}(e);let o;if(n.date){const e=function(e,t){const s=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(s);if(!n)return{year:NaN,restDateString:""};const o=n[1]?parseInt(n[1]):null,r=n[2]?parseInt(n[2]):null;return{year:null===r?o:100*r,restDateString:e.slice((n[1]||n[2]).length)}}(n.date,s);o=function(e,t){if(null===t)return new Date(NaN);const s=e.match(Xp);if(!s)return new Date(NaN);const n=!!s[4],o=tm(s[1]),r=tm(s[2])-1,i=tm(s[3]),a=tm(s[4]),l=tm(s[5])-1;if(n)return function(e,t,s){return t>=1&&t<=53&&s>=0&&s<=6}(0,a,l)?function(e,t,s){const n=new Date(0);n.setUTCFullYear(e,0,4);const o=n.getUTCDay()||7,r=7*(t-1)+s+1-o;return n.setUTCDate(n.getUTCDate()+r),n}(t,a,l):new Date(NaN);{const e=new Date(0);return function(e,t,s){return t>=0&&t<=11&&s>=1&&s<=(nm[t]||(om(e)?29:28))}(t,r,i)&&function(e,t){return t>=1&&t<=(om(e)?366:365)}(t,o)?(e.setUTCFullYear(t,r,Math.max(o,i)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const r=o.getTime();let i,a=0;if(n.time&&(a=function(e){const t=e.match(Jp);if(!t)return NaN;const s=sm(t[1]),n=sm(t[2]),o=sm(t[3]);if(!function(e,t,s){if(24===e)return 0===t&&0===s;return s>=0&&s<60&&t>=0&&t<60&&e>=0&&e<25}(s,n,o))return NaN;return s*qp+n*Yp+1e3*o}(n.time),isNaN(a)))return new Date(NaN);if(!n.timezone){const e=new Date(r+a),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return i=function(e){if("Z"===e)return 0;const t=e.match(em);if(!t)return 0;const s="+"===t[1]?-1:1,n=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,o))return NaN;return s*(n*qp+o*Yp)}(n.timezone),isNaN(i)?new Date(NaN):new Date(r+a+i)}const Qp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Xp=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Jp=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,em=/^([+-])(\d{2})(?::?(\d{2}))?$/;function tm(e){return e?parseInt(e):1}function sm(e){return e&&parseFloat(e.replace(",","."))||0}const nm=[31,null,31,30,31,30,31,31,30,31,30,31];function om(e){return e%400==0||e%4==0&&e%100!=0}const{PrivatePublishDateTimePicker:rm}=$(g.privateApis);function im(e){return(0,c.jsx)(am,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function am({onClose:e,showPopoverHeaderActions:t,isCompact:s}){const{postDate:n,postType:o}=(0,d.useSelect)((e=>({postDate:e(xc).getEditedPostAttribute("date"),postType:e(xc).getCurrentPostType()})),[]),{editPost:r}=(0,d.useDispatch)(xc),[i,a]=(0,p.useState)(Wp(new Date(n))),l=(0,d.useSelect)((e=>e(u.store).getEntityRecords("postType",o,{status:"publish,future",after:Wp(i).toISOString(),before:Zp(i).toISOString(),exclude:[e(xc).getCurrentPostId()],per_page:100,_fields:"id,date"})),[i,o]),m=(0,p.useMemo)((()=>(l||[]).map((({date:e})=>({date:new Date(e)})))),[l]),h=(0,v.getSettings)(),g=/a(?!\\)/i.test(h.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,c.jsx)(rm,{currentDate:n,onChange:e=>r({date:e}),is12Hour:g,dateOrder:(0,fs._x)("dmy","date order"),events:m,onMonthPreviewed:e=>a(Kp(e)),onClose:e,isCompact:s,showPopoverHeaderActions:t})}function lm(e){return cm(e)}function cm({full:e=!1}={}){const{date:t,isFloating:s}=(0,d.useSelect)((e=>({date:e(xc).getEditedPostAttribute("date"),isFloating:e(xc).isEditedPostDateFloating()})),[]);return e?dm(t):function(e,{isFloating:t=!1,now:s=new Date}={}){if(!e||t)return(0,fs.__)("Immediately");if(!function(e){const{timezone:t}=(0,v.getSettings)(),s=Number(t.offset),n=e.getTimezoneOffset()/60*-1;return s===n}(s))return dm(e);const n=(0,v.getDate)(e);if(um(n,s))return(0,fs.sprintf)((0,fs.__)("Today at %s"),(0,v.dateI18n)((0,fs._x)("g:i a","post schedule time format"),n));const o=new Date(s);if(o.setDate(o.getDate()+1),um(n,o))return(0,fs.sprintf)((0,fs.__)("Tomorrow at %s"),(0,v.dateI18n)((0,fs._x)("g:i a","post schedule time format"),n));if(n.getFullYear()===s.getFullYear())return(0,v.dateI18n)((0,fs._x)("F j g:i a","post schedule date format without year"),n);return(0,v.dateI18n)((0,fs._x)("F j, Y g:i a","post schedule full date format"),n)}(t,{isFloating:s})}function dm(e){const t=(0,v.getDate)(e),s=function(){const{timezone:e}=(0,v.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;return`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}(),n=(0,v.dateI18n)((0,fs._x)("F j, Y g:i a","post schedule full date format"),t);return(0,fs.isRTL)()?`${s} ${n}`:`${n} ${s}`}function um(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const pm=3,mm={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function hm({onSelect:e,taxonomy:t}){const{_terms:s,showTerms:n}=(0,d.useSelect)((e=>{const s=e(u.store).getEntityRecords("taxonomy",t.slug,mm);return{_terms:s,showTerms:s?.length>=pm}}),[t.slug]);if(!n)return null;const o=Md(s);return(0,c.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,c.jsx)(Fn.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,c.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:o.map((t=>(0,c.jsx)("li",{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(t),children:t.name})},t.id)))})]})}const gm=[],_m=100,fm={per_page:_m,_fields:"id,name",context:"view"},bm=(e,t)=>Dd(e).toLowerCase()===Dd(t).toLowerCase(),ym=(e,t)=>e.map((e=>t.find((t=>bm(t.name,e)))?.id)).filter((e=>void 0!==e)),xm=({children:e,__nextHasNoMarginBottom:t})=>t?(0,c.jsx)(Fn.__experimentalVStack,{spacing:4,children:e}):(0,c.jsx)(p.Fragment,{children:e});function vm({slug:e,__nextHasNoMarginBottom:t}){const[s,n]=(0,p.useState)([]),[o,r]=(0,p.useState)(""),i=(0,m.useDebounce)(r,500);t||k()("Bottom margin styles for wp.editor.PostTaxonomiesFlatTermSelector",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const{terms:a,termIds:l,taxonomy:h,hasAssignAction:g,hasCreateAction:_,hasResolvedTerms:f}=(0,d.useSelect)((t=>{const{getCurrentPost:s,getEditedPostAttribute:n}=t(xc),{getEntityRecords:o,getEntityRecord:r,hasFinishedResolution:i}=t(u.store),a=s(),l=r("root","taxonomy",e),c=l?n(l.rest_base):gm,d={...fm,include:c?.join(","),per_page:-1};return{hasCreateAction:!!l&&(a._links?.["wp:action-create-"+l.rest_base]??!1),hasAssignAction:!!l&&(a._links?.["wp:action-assign-"+l.rest_base]??!1),taxonomy:l,termIds:c,terms:c?.length?o("taxonomy",e,d):gm,hasResolvedTerms:i("getEntityRecords",["taxonomy",e,d])}}),[e]),{searchResults:b}=(0,d.useSelect)((t=>{const{getEntityRecords:s}=t(u.store);return{searchResults:o?s("taxonomy",e,{...fm,search:o}):gm}}),[o,e]);(0,p.useEffect)((()=>{if(f){const e=(a??[]).map((e=>Dd(e.name)));n(e)}}),[a,f]);const y=(0,p.useMemo)((()=>(b??[]).map((e=>Dd(e.name)))),[b]),{editPost:x}=(0,d.useDispatch)(xc),{saveEntityRecord:v}=(0,d.useDispatch)(u.store),{createErrorNotice:w}=(0,d.useDispatch)(_s.store);if(!g)return null;function S(e){x({[h.rest_base]:e})}const C=h?.labels?.add_new_item??("post_tag"===e?(0,fs.__)("Add Tag"):(0,fs.__)("Add Term")),P=h?.labels?.singular_name??("post_tag"===e?(0,fs.__)("Tag"):(0,fs.__)("Term")),j=(0,fs.sprintf)((0,fs._x)("%s added","term"),P),E=(0,fs.sprintf)((0,fs._x)("%s removed","term"),P),T=(0,fs.sprintf)((0,fs._x)("Remove %s","term"),P);return(0,c.jsxs)(xm,{__nextHasNoMarginBottom:t,children:[(0,c.jsx)(Fn.FormTokenField,{__next40pxDefaultSize:!0,value:s,suggestions:y,onChange:function(t){const s=[...a??[],...b??[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),r=o.filter((e=>!s.find((t=>bm(t.name,e)))));n(o),0!==r.length?_&&Promise.all(r.map((t=>async function(t){try{const s=await v("taxonomy",e,t,{throwOnError:!0});return Ad(s)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=s.concat(e);S(ym(o,t))})).catch((e=>{w(e.message,{type:"snackbar"}),S(ym(o,s))})):S(ym(o,s))},onInputChange:i,maxSuggestions:_m,label:C,messages:{added:j,removed:E,remove:T},__nextHasNoMarginBottom:t}),(0,c.jsx)(hm,{taxonomy:h,onSelect:function(t){if(l.includes(t.id))return;const s=[...l,t.id],n="post_tag"===e?(0,fs.__)("Tag"):(0,fs.__)("Term"),o=(0,fs.sprintf)((0,fs._x)("%s added","term"),h?.labels?.singular_name??n);(0,ms.speak)(o,"assertive"),S(s)}})]})}var wm=(0,Fn.withFilters)("editor.PostTaxonomyType")(vm);const Sm=()=>{const e=(0,d.useSelect)((e=>{const t=e(u.store).getTaxonomy("post_tag");return t?.labels}),[]),t=e?.add_new_item??(0,fs.__)("Add tag"),s=e?.name??(0,fs.__)("Tags"),n=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,c.jsxs)(Fn.PanelBody,{initialOpen:!1,title:n,children:[(0,c.jsx)("p",{children:(0,fs.sprintf)((0,fs.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),s)}),(0,c.jsx)(wm,{slug:"post_tag",__nextHasNoMarginBottom:!0})]})};var km=()=>{const{postHasTags:e,siteHasTags:t,isPostTypeSupported:s}=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPostType(),s=e(u.store).getEntityRecord("root","taxonomy","post_tag"),n=s?.types?.includes(t),o=void 0!==s,r=s&&e(xc).getEditedPostAttribute(s.rest_base),i=!!n&&!!e(u.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length;return{postHasTags:!!r?.length,siteHasTags:i,isPostTypeSupported:o&&n}}),[]),[n]=(0,p.useState)(e);return s&&t?n?null:(0,c.jsx)(Sm,{}):null};const Cm=(e,t)=>Cp.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),Pm=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:s})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>s(e),children:t});function jm(){const{currentPostFormat:e,suggestion:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(xc),n=e(u.store).getThemeSupports().formats??[];return{currentPostFormat:t("format"),suggestion:Cm(n,s())}}),[]),{editPost:s}=(0,d.useDispatch)(xc),n=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,fs.__)("Use a post format")},"label")];return t&&t.id!==e?(0,c.jsxs)(Fn.PanelBody,{initialOpen:!1,title:n,children:[(0,c.jsx)("p",{children:(0,fs.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,c.jsx)("p",{children:(0,c.jsx)(Pm,{onUpdatePostFormat:e=>s({format:e}),suggestedPostFormat:t.id,suggestionText:(0,fs.sprintf)((0,fs.__)('Apply the "%1$s" format.'),t.caption)})})]}):null}const{normalizeTextString:Em}=$(Fn.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:Tm}=$(u.privateApis),Bm={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[Tm]:!0},Im=8,Nm=[];function Rm({slug:e}){const[t,s]=(0,p.useState)(!1),[n,o]=(0,p.useState)(""),[r,i]=(0,p.useState)(""),[a,l]=(0,p.useState)(!1),[h,g]=(0,p.useState)(""),[_,f]=(0,p.useState)([]),b=(0,m.useDebounce)(ms.speak,500),{hasCreateAction:y,hasAssignAction:x,terms:v,loading:w,availableTerms:S,taxonomy:k}=(0,d.useSelect)((t=>{const{getCurrentPost:s,getEditedPostAttribute:n}=t(xc),{getEntityRecord:o,getEntityRecords:r,isResolving:i}=t(u.store),a=o("root","taxonomy",e),l=s();return{hasCreateAction:!!a&&!!l._links?.["wp:action-create-"+a.rest_base],hasAssignAction:!!a&&!!l._links?.["wp:action-assign-"+a.rest_base],terms:a?n(a.rest_base):Nm,loading:i("getEntityRecords",["taxonomy",e,Bm]),availableTerms:r("taxonomy",e,Bm)||Nm,taxonomy:a}}),[e]),{editPost:C}=(0,d.useDispatch)(xc),{saveEntityRecord:P}=(0,d.useDispatch)(u.store),j=(0,p.useMemo)((()=>function(e,t){const s=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(s).filter((e=>e)).length>0,n=[...e];return n.sort(((e,t)=>{const n=s(e),o=s(t);return n===o?0:n&&!o?-1:!n&&o?1:0})),n}(Rd(S),v)),[S]),{createErrorNotice:E}=(0,d.useDispatch)(_s.store);if(!x)return null;const T=e=>{C({[k.rest_base]:e})},B=e=>e.map((e=>(0,c.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==v.indexOf(e.id),onChange:()=>{(e=>{const t=v.includes(e)?v.filter((t=>t!==e)):[...v,e];T(t)})(parseInt(e.id,10))},label:(0,Ln.decodeEntities)(e.name)}),!!e.children.length&&(0,c.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:B(e.children)})]},e.id))),I=(t,s,n)=>k?.labels?.[t]??("category"===e?s:n),N=I("add_new_item",(0,fs.__)("Add Category"),(0,fs.__)("Add Term")),R=I("new_item_name",(0,fs.__)("Add Category"),(0,fs.__)("Add Term")),D=I("parent_item",(0,fs.__)("Parent Category"),(0,fs.__)("Parent Term")),A=`— ${D} —`,M=N,L=k?.labels?.search_items??(0,fs.__)("Search Terms"),O=k?.name??(0,fs.__)("Terms"),F=S.length>=Im;return(0,c.jsxs)(Fn.Flex,{direction:"column",gap:"4",children:[F&&!w&&(0,c.jsx)(Fn.SearchControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:L,placeholder:L,value:h,onChange:e=>{const t=j.map(function(e){const t=s=>{if(""===e)return s;const n={...s};return n.children.length>0&&(n.children=n.children.map(t).filter((e=>e))),(-1!==Em(n.name).indexOf(Em(e))||n.children.length>0)&&n};return t}(e)).filter((e=>e)),s=e=>{let t=0;for(let n=0;n<e.length;n++)t++,void 0!==e[n].children&&(t+=s(e[n].children));return t};g(e),f(t);const n=s(t),o=(0,fs.sprintf)((0,fs._n)("%d result found.","%d results found.",n),n);b(o,"assertive")}}),w&&(0,c.jsx)(Fn.Flex,{justify:"center",style:{height:"40px"},children:(0,c.jsx)(Fn.Spinner,{})}),(0,c.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":O,children:B(""!==h?_:j)}),!w&&y&&(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,onClick:()=>{l(!a)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":a,variant:"link",children:N})}),a&&(0,c.jsx)("form",{onSubmit:async a=>{if(a.preventDefault(),""===n||t)return;const l=function(e,t,s){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===s.toLowerCase()))}(S,r,n);if(l)return v.some((e=>e===l.id))||T([...v,l.id]),o(""),void i("");let c;s(!0);try{c=await(d={name:n,parent:r||void 0},P("taxonomy",e,d,{throwOnError:!0}))}catch(e){return void E(e.message,{type:"snackbar"})}var d;const u="category"===e?(0,fs.__)("Category"):(0,fs.__)("Term"),p=(0,fs.sprintf)((0,fs._x)("%s added","term"),k?.labels?.singular_name??u);(0,ms.speak)(p,"assertive"),s(!1),o(""),i(""),T([...v,c.id])},children:(0,c.jsxs)(Fn.Flex,{direction:"column",gap:"4",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:R,value:n,onChange:e=>{o(e)},required:!0}),!!S.length&&(0,c.jsx)(Fn.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:D,noOptionLabel:A,onChange:e=>{i(e)},selectedId:r,tree:j}),(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:M})})]})})]})}var Dm=(0,Fn.withFilters)("editor.PostTaxonomyType")(Rm);var Am=function(){const{hasNoCategory:e,hasSiteCategories:t}=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPostType(),{canUser:s,getEntityRecord:n}=e(u.store),o=n("root","taxonomy","category"),r=s("read",{kind:"root",name:"site"})?n("root","site")?.default_category:void 0,i=r?n("taxonomy","category",r):void 0,a=o&&o.types.some((e=>e===t)),l=o&&e(xc).getEditedPostAttribute(o.rest_base),c=!!a&&!!e(u.store).getEntityRecords("taxonomy","category",{exclude:[r],per_page:1})?.length;return{hasNoCategory:!!o&&!!i&&a&&(0===l?.length||1===l?.length&&i?.id===l[0]),hasSiteCategories:c}}),[]),[s,n]=(0,p.useState)(!1);if((0,p.useEffect)((()=>{e&&n(!0)}),[e]),!s||!t)return null;const o=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,fs.__)("Assign a category")},"label")];return(0,c.jsxs)(Fn.PanelBody,{initialOpen:!1,title:o,children:[(0,c.jsx)("p",{children:(0,fs.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,c.jsx)(Dm,{slug:"category"})]})};function Mm(e){return Object.fromEntries(Object.entries(function(e){const t=new Set;return Object.fromEntries(e.map((e=>{const s=(0,w.getFilename)(e);let n="";if(s){const e=s.split(".");e.length>1&&e.pop(),n=e.join(".")}return n||(n=bi()),t.has(n)&&(n=`${n}-${bi()}`),t.add(n),[e,n]})))}(e)).map((([e,t])=>{const s=window.fetch(e.includes("?")?e:e+"?").then((e=>e.blob())).then((e=>new File([e],`${t}.png`,{type:e.type})));return[e,s]})))}function Lm(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...Lm(e.innerBlocks))})),t}function Om(e){if("core/image"===e.name||"core/cover"===e.name){const{url:t,alt:s,id:n}=e.attributes;return{url:t,alt:s,id:n}}if("core/media-text"===e.name){const{mediaUrl:t,mediaAlt:s,mediaId:n}=e.attributes;return{url:t,alt:s,id:n}}return{}}function Fm({clientId:e,alt:t,url:s}){const{selectBlock:n}=(0,d.useDispatch)(g.store);return(0,c.jsx)(Fn.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,fs.__)("Select image block."),onClick:()=>{n(e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(n(e),t.preventDefault())},alt:t,src:s,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function Vm(){const[e,t]=(0,p.useState)(!1),[s,n]=(0,p.useState)(!1),[o,r]=(0,p.useState)(!1),{editorBlocks:i,mediaUpload:a}=(0,d.useSelect)((e=>({editorBlocks:e(g.store).getBlocks(),mediaUpload:e(g.store).getSettings().mediaUpload})),[]),l=Lm(i).filter((e=>function(e){return"core/image"===e.name||"core/cover"===e.name?e.attributes.url&&!e.attributes.id:"core/media-text"===e.name?e.attributes.mediaUrl&&!e.attributes.mediaId:void 0}(e))),{updateBlockAttributes:u}=(0,d.useDispatch)(g.store);if(!a||!l.length)return null;const m=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,fs.__)("External media")},"label")];return(0,c.jsxs)(Fn.PanelBody,{initialOpen:!0,title:m,children:[(0,c.jsx)("p",{children:(0,fs.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,c.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{onExitComplete:()=>n(!1),children:l.map((e=>{const{url:t,alt:s}=Om(e);return(0,c.jsx)(Fm,{clientId:e.clientId,url:t,alt:s},e.clientId)}))}),e||s?(0,c.jsx)(Fn.Spinner,{}):(0,c.jsx)(Fn.Button,{size:"compact",variant:"primary",onClick:function(){t(!0),r(!1);const e=new Set(l.map((e=>{const{url:t}=Om(e);return t}))),s=Object.fromEntries(Object.entries(Mm([...e])).map((([e,t])=>[e,t.then((e=>new Promise(((t,s)=>{a({filesList:[e],onFileChange:([e])=>{(0,$o.isBlobURL)(e.url)||t(e)},onError(){s()}})}))))])));Promise.allSettled(l.map((e=>{const{url:t}=Om(e);return s[t].then((t=>function(e,t){"core/image"!==e.name&&"core/cover"!==e.name||u(e.clientId,{id:t.id,url:t.url}),"core/media-text"===e.name&&u(e.clientId,{mediaId:t.id,mediaUrl:t.url})}(e,t))).then((()=>n(!0))).catch((()=>r(!0)))}))).finally((()=>{t(!1)}))},children:(0,fs._x)("Upload","verb")})]}),o&&(0,c.jsx)("p",{children:(0,fs.__)("Upload failed, try again.")})]})}var zm=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:s,hasPublishAction:n,siteIconUrl:o,siteTitle:r,siteHome:i}=(0,d.useSelect)((e=>{const{getCurrentPost:t,isEditedPostBeingScheduled:s}=e(xc),{getEntityRecord:n,isResolving:o}=e(u.store),r=n("root","__unstableBase",void 0)||{};return{hasPublishAction:t()._links?.["wp:action-publish"]??!1,isBeingScheduled:s(),isRequestingSiteIcon:o("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.site_icon_url,siteTitle:r.name,siteHome:r.home&&(0,w.filterURLForDisplay)(r.home)}}),[]);let a,l,p=(0,c.jsx)(Fn.Icon,{className:"components-site-icon",size:"36px",icon:Vp});return o&&(p=(0,c.jsx)("img",{alt:(0,fs.__)("Site Icon"),className:"components-site-icon",src:o})),s&&(p=null),n?t?(a=(0,fs.__)("Are you ready to schedule?"),l=(0,fs.__)("Your work will be published at the specified date and time.")):(a=(0,fs.__)("Are you ready to publish?"),l=(0,fs.__)("Double-check your settings before publishing.")):(a=(0,fs.__)("Are you ready to submit for review?"),l=(0,fs.__)("Your work will be reviewed and then approved.")),(0,c.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,c.jsx)("div",{children:(0,c.jsx)("strong",{children:a})}),(0,c.jsx)("p",{children:l}),(0,c.jsxs)("div",{className:"components-site-card",children:[p,(0,c.jsxs)("div",{className:"components-site-info",children:[(0,c.jsx)("span",{className:"components-site-name",children:(0,Ln.decodeEntities)(r)||(0,fs.__)("(Untitled)")}),(0,c.jsx)("span",{className:"components-site-home",children:i})]})]}),(0,c.jsx)(Vm,{}),n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.PanelBody,{initialOpen:!1,title:[(0,fs.__)("Visibility:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,c.jsx)(Hp,{})},"label")],children:(0,c.jsx)(Up,{})}),(0,c.jsx)(Fn.PanelBody,{initialOpen:!1,title:[(0,fs.__)("Publish:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,c.jsx)(lm,{})},"label")],children:(0,c.jsx)(im,{})})]}),(0,c.jsx)(jm,{}),(0,c.jsx)(km,{}),(0,c.jsx)(Am,{}),e]})};const Um="%postname%",Hm="%pagename%";function Gm({text:e}){const[t,s]=(0,p.useState)(!1),n=(0,p.useRef)(),o=(0,m.useCopyToClipboard)(e,(()=>{s(!0),n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{s(!1)}),4e3)}));return(0,p.useEffect)((()=>()=>{n.current&&clearTimeout(n.current)}),[]),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:o,children:t?(0,fs.__)("Copied!"):(0,fs.__)("Copy")})}function $m({focusOnMount:e,children:t}){const{post:s,postType:n,isScheduled:o}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:s,isCurrentPostScheduled:n}=e(xc),{getPostType:o}=e(u.store);return{post:s(),postType:o(t("type")),isScheduled:n()}}),[]),r=n?.labels?.singular_name,i=n?.labels?.view_item,a=n?.labels?.add_new_item,l="future"===s.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(Um)?e.permalink_template.replace(Um,t):e.permalink_template.includes(Hm)?e.permalink_template.replace(Hm,t):e.permalink_template})(s):s.link,m=(0,w.addQueryArgs)("post-new.php",{post_type:s.type}),h=(0,p.useCallback)((t=>{e&&t&&t.focus()}),[e]),g=o?(0,c.jsxs)(c.Fragment,{children:[(0,fs.__)("is now scheduled. It will go live on")," ",(0,c.jsx)(lm,{}),"."]}):(0,fs.__)("is now live.");return(0,c.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,c.jsxs)(Fn.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,c.jsx)(Fn.ExternalLink,{ref:h,href:l,children:(0,Ln.decodeEntities)(s.title)||(0,fs.__)("(no title)")})," ",g]}),(0,c.jsxs)(Fn.PanelBody,{children:[(0,c.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,c.jsx)("strong",{children:(0,fs.__)("What’s next?")})}),(0,c.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,fs.sprintf)((0,fs.__)("%s address"),r),value:(0,w.safeDecodeURIComponent)(l),onFocus:e=>e.target.select()}),(0,c.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,c.jsx)(Gm,{text:l})})]}),(0,c.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!o&&(0,c.jsxs)(Fn.Button,{variant:"primary",href:l,__next40pxDefaultSize:!0,icon:Gn,iconPosition:"right",target:"_blank",children:[i,(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]}),(0,c.jsx)(Fn.Button,{variant:o?"primary":"secondary",__next40pxDefaultSize:!0,href:m,children:a})]})]}),t]})}class Wm extends p.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,p.createRef)()}componentDidMount(){this.timeoutID=setTimeout((()=>{this.cancelButtonNode.current.focus()}),0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){(e.isPublished&&!this.props.isSaving&&this.props.isDirty||this.props.currentPostId!==e.currentPostId)&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:s}=this.props;t&&s||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:s,isPublishSidebarEnabled:n,isScheduled:o,isSaving:r,isSavingNonPostEntityChanges:i,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:d,PrePublishExtension:u,currentPostId:p,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:_,...f}=m,b=s||o&&t,y=!b&&!r,x=b&&!r;return(0,c.jsxs)("div",{className:"editor-post-publish-panel",...f,children:[(0,c.jsx)("div",{className:"editor-post-publish-panel__header",children:x?(0,c.jsx)(Fn.Button,{size:"compact",onClick:a,icon:ca,label:(0,fs.__)("Close panel")}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,c.jsx)(Fn.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:i,onClick:a,variant:"secondary",size:"compact",children:(0,fs.__)("Cancel")})}),(0,c.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,c.jsx)(Fp,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,c.jsxs)("div",{className:"editor-post-publish-panel__content",children:[y&&(0,c.jsx)(zm,{children:u&&(0,c.jsx)(u,{})}),x&&(0,c.jsx)($m,{focusOnMount:!0,children:d&&(0,c.jsx)(d,{})}),r&&(0,c.jsx)(Fn.Spinner,{})]}),(0,c.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Always show pre-publish checks."),checked:n,onChange:l})})]})}}var Zm=(0,m.compose)([(0,d.withSelect)((e=>{const{getPostType:t}=e(u.store),{getCurrentPost:s,getCurrentPostId:n,getEditedPostAttribute:o,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isAutosavingPost:c,isSavingPost:d,isSavingNonPostEntityChanges:p}=e(xc),{isPublishSidebarEnabled:m}=e(xc),h=t(o("type"));return{hasPublishAction:s()._links?.["wp:action-publish"]??!1,isPostTypeViewable:h?.viewable,isBeingScheduled:a(),isDirty:l(),isPublished:r(),isPublishSidebarEnabled:m(),isSaving:d()&&!c(),isSavingNonPostEntityChanges:p(),isScheduled:i(),currentPostId:n()}})),(0,d.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:s,enablePublishSidebar:n}=e(xc);return{onTogglePublishSidebar:()=>{t?s():n()}}})),Fn.withFocusReturn,Fn.withConstrainedTabbing])(Wm),Ym=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})}),qm=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})});function Km({children:e}){const{hasStickyAction:t,postType:s}=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPost();return{hasStickyAction:t._links?.["wp:action-sticky"]??!1,postType:e(xc).getCurrentPostType()}}),[]);return"post"===s&&t?e:null}function Qm(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("sticky")??!1),[]),{editPost:t}=(0,d.useDispatch)(xc);return(0,c.jsx)(Km,{children:(0,c.jsx)(Fn.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,fs.__)("Sticky"),help:(0,fs.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e}),__nextHasNoMarginBottom:!0})})}const Xm={"auto-draft":{label:(0,fs.__)("Draft"),icon:yr},draft:{label:(0,fs.__)("Draft"),icon:yr},pending:{label:(0,fs.__)("Pending"),icon:vr},private:{label:(0,fs.__)("Private"),icon:wr},future:{label:(0,fs.__)("Scheduled"),icon:xr},publish:{label:(0,fs.__)("Published"),icon:Sr}},Jm=[{label:(0,fs.__)("Draft"),value:"draft",description:(0,fs.__)("Not ready to publish.")},{label:(0,fs.__)("Pending"),value:"pending",description:(0,fs.__)("Waiting for review before publishing.")},{label:(0,fs.__)("Private"),value:"private",description:(0,fs.__)("Only visible to site admins and editors.")},{label:(0,fs.__)("Scheduled"),value:"future",description:(0,fs.__)("Publish automatically on a chosen date.")},{label:(0,fs.__)("Published"),value:"publish",description:(0,fs.__)("Visible to everyone.")}],eh=[B,I,N,R];function th(){const{status:e,date:t,password:s,postId:n,postType:o,canEdit:r}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostId:s,getCurrentPostType:n,getCurrentPost:o}=e(xc);return{status:t("status"),date:t("date"),password:t("password"),postId:s(),postType:n(),canEdit:o()._links?.["wp:action-publish"]??!1}}),[]),[i,a]=(0,p.useState)(!!s),l=(0,m.useInstanceId)(th,"editor-change-status__password-input"),{editEntityRecord:h}=(0,d.useDispatch)(u.store),[_,f]=(0,p.useState)(null),b=(0,p.useMemo)((()=>({anchor:_,"aria-label":(0,fs.__)("Status & visibility"),headerTitle:(0,fs.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0})),[_]);if(eh.includes(o))return null;const y=({status:r=e,password:i=s,date:a=t})=>{h("postType",o,n,{status:r,date:a,password:i})},x=e=>{a(e),e||y({password:""})},v=n=>{let o=t,r=s;"future"===e&&new Date(t)>new Date&&(o=null),"private"===n&&s&&(r=""),y({status:n,date:o,password:r})};return(0,c.jsx)(Nd,{label:(0,fs.__)("Status"),ref:f,children:r?(0,c.jsx)(Fn.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:b,focusOnMount:!0,renderToggle:({onToggle:t,isOpen:s})=>(0,c.jsx)(Fn.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:t,icon:Xm[e]?.icon,"aria-label":(0,fs.sprintf)((0,fs.__)("Change status: %s"),Xm[e]?.label),"aria-expanded":s,children:Xm[e]?.label}),renderContent:({onClose:t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Status & visibility"),onClose:t}),(0,c.jsx)("form",{onSubmit:e=>{e.preventDefault(),t()},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(Fn.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,fs.__)("Status"),options:Jm,onChange:v,selected:"auto-draft"===e?"draft":e}),"future"===e&&(0,c.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,c.jsx)(am,{showPopoverHeaderActions:!1,isCompact:!0})}),"private"!==e&&(0,c.jsxs)(Fn.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Password protected"),help:(0,fs.__)("Only visible to those who know the password."),checked:i,onChange:x}),i&&(0,c.jsx)("div",{className:"editor-change-status__password-input",children:(0,c.jsx)(Fn.TextControl,{label:(0,fs.__)("Password"),onChange:e=>y({password:e}),value:s,placeholder:(0,fs.__)("Use a secure password"),type:"text",id:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]}),(0,c.jsx)(Qm,{})]})})]})}):(0,c.jsx)("div",{className:"editor-post-status is-read-only",children:Xm[e]?.label})})}function sh({forceIsDirty:e}){const[t,s]=(0,p.useState)(!1),n=(0,m.useViewportMatch)("small"),{isAutosaving:o,isDirty:r,isNew:i,isPublished:a,isSaveable:l,isSaving:u,isScheduled:h,hasPublishAction:g,showIconLabels:_,postStatus:f,postStatusHasChanged:b}=(0,d.useSelect)((t=>{const{isEditedPostNew:s,isCurrentPostPublished:n,isCurrentPostScheduled:o,isEditedPostDirty:r,isSavingPost:i,isEditedPostSaveable:a,getCurrentPost:l,isAutosavingPost:c,getEditedPostAttribute:d,getPostEdits:u}=t(xc),{get:p}=t(C.store);return{isAutosaving:c(),isDirty:e||r(),isNew:s(),isPublished:n(),isSaving:i(),isSaveable:a(),isScheduled:o(),hasPublishAction:l()?._links?.["wp:action-publish"]??!1,showIconLabels:p("core","showIconLabels"),postStatus:d("status"),postStatusHasChanged:!!u()?.status}}),[e]),y="pending"===f,{savePost:x}=(0,d.useDispatch)(xc),v=(0,m.usePrevious)(u);if((0,p.useEffect)((()=>{let e;return v&&!u&&(s(!0),e=setTimeout((()=>{s(!1)}),1e3)),()=>clearTimeout(e)}),[u]),!g&&y)return null;const w=!["pending","draft","auto-draft"].includes(f)&&Jm.map((({value:e})=>e)).includes(f);if(a||h||w||b&&["pending","draft"].includes(f))return null;const S=y?(0,fs.__)("Save as pending"):(0,fs.__)("Save draft"),k=(0,fs.__)("Save"),P=t||!i&&!r,j=u||P,E=u||P||!l;let T;return u?T=o?(0,fs.__)("Autosaving"):(0,fs.__)("Saving"):P?T=(0,fs.__)("Saved"):n?T=S:_&&(T=k),(0,c.jsxs)(Fn.Button,{className:l||u?hr({"editor-post-save-draft":!j,"editor-post-saved-state":j,"is-saving":u,"is-autosaving":o,"is-saved":P,[(0,Fn.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:E?void 0:()=>x(),shortcut:E?void 0:cl.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:n?void 0:Ym,label:T||S,"aria-disabled":E,children:[j&&(0,c.jsx)(ti,{icon:P?Zn:qm}),T]})}function nh({children:e}){return(0,d.useSelect)((e=>e(xc).getCurrentPost()._links?.["wp:action-publish"]??!1),[])?e:null}const oh=[B,I,N,R];function rh(){const[e,t]=(0,p.useState)(null),s=(0,d.useSelect)((e=>e(xc).getCurrentPostType()),[]),n=(0,p.useMemo)((()=>({anchor:e,"aria-label":(0,fs.__)("Change publish date"),placement:"left-start",offset:36,shift:!0})),[e]),o=cm(),r=cm({full:!0});return oh.includes(s)?null:(0,c.jsx)(nh,{children:(0,c.jsx)(Nd,{label:(0,fs.__)("Publish"),ref:t,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:n,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change date: %s"),o),label:r,showTooltip:o!==r,"aria-expanded":t,children:o}),renderContent:({onClose:e})=>(0,c.jsx)(im,{onClose:e})})})})}function ih(){k()("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});const[e,t]=(0,p.useState)(!1),{editPost:s,savePost:n}=(0,d.useDispatch)(xc),{isSaving:o,isPublished:r,isScheduled:i}=(0,d.useSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:s,isCurrentPostScheduled:n}=e(xc);return{isSaving:t(),isPublished:s(),isScheduled:n()}}),[]),a=o||!r&&!i;let l,u;r?(l=(0,fs.__)("Are you sure you want to unpublish this post?"),u=(0,fs.__)("Unpublish")):i&&(l=(0,fs.__)("Are you sure you want to unschedule this post?"),u=(0,fs.__)("Unschedule"));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{a||t(!0)},"aria-disabled":a,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,fs.__)("Switch to draft")}),(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=>{t(!1),s({status:"draft"}),n()},onCancel:()=>t(!1),confirmButtonText:u,children:l})]})}function ah(){const{syncStatus:e,postType:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc),s=t("meta");return{syncStatus:"unsynced"===s?.wp_pattern_sync_status?"unsynced":t("wp_pattern_sync_status"),postType:t("type")}}));return"wp_block"!==t?null:(0,c.jsx)(Nd,{label:(0,fs.__)("Sync status"),children:(0,c.jsx)("div",{className:"editor-post-sync-status__value",children:"unsynced"===e?(0,fs._x)("Not synced","pattern (singular)"):(0,fs._x)("Synced","pattern (singular)")})})}const lh=e=>e;var ch=function({taxonomyWrapper:e=lh}){const{postType:t,taxonomies:s}=(0,d.useSelect)((e=>({postType:e(xc).getCurrentPostType(),taxonomies:e(u.store).getEntityRecords("root","taxonomy",{per_page:-1})})),[]);return(s??[]).filter((e=>e.types.includes(t)&&e.visibility?.show_ui)).map((t=>{const s=t.hierarchical?Dm:wm,n={slug:t.slug,...t.hierarchical?{}:{__nextHasNoMarginBottom:!0}};return(0,c.jsx)(p.Fragment,{children:e((0,c.jsx)(s,{...n}),t)},`taxonomy-${t.slug}`)}))};function dh({children:e}){const t=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPostType(),s=e(u.store).getEntityRecords("root","taxonomy",{per_page:-1});return s?.some((e=>e.types.includes(t)))}),[]);return t?e:null}function uh({taxonomy:e,children:t}){const s=e?.slug,n=s?`taxonomy-panel-${s}`:"",{isEnabled:o,isOpened:r}=(0,d.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:o}=e(xc);return{isEnabled:!!s&&t(n),isOpened:!!s&&o(n)}}),[n,s]),{toggleEditorPanelOpened:i}=(0,d.useDispatch)(xc);if(!o)return null;const a=e?.labels?.menu_name;return a?(0,c.jsx)(Fn.PanelBody,{title:a,opened:r,onToggle:()=>i(n),children:t}):null}function ph(){return(0,c.jsx)(dh,{children:(0,c.jsx)(ch,{taxonomyWrapper:(e,t)=>(0,c.jsx)(uh,{taxonomy:t,children:e})})})}var mh=s(4132);function hh(){const e=(0,m.useInstanceId)(hh),{content:t,blocks:s,type:n,id:o}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t}=e(u.store),{getCurrentPostType:s,getCurrentPostId:n}=e(xc),o=s(),r=n(),i=t("postType",o,r);return{content:i?.content,blocks:i?.blocks,type:o,id:r}}),[]),{editEntityRecord:r}=(0,d.useDispatch)(u.store),i=(0,p.useMemo)((()=>t instanceof Function?t({blocks:s}):s?(0,x.__unstableSerializeAndClean)(s):t),[t,s]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,fs.__)("Type text or HTML")}),(0,c.jsx)(mh.A,{autoComplete:"off",dir:"auto",value:i,onChange:e=>{r("postType",n,o,{content:e.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,fs.__)("Start writing with text or HTML")})]})}const gh="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",_h=/[\r\n]+/g;function fh(e){const t=(0,p.useRef)(),{isCleanNewPost:s}=(0,d.useSelect)((e=>{const{isCleanNewPost:t}=e(xc);return{isCleanNewPost:t()}}),[]);return(0,p.useImperativeHandle)(e,(()=>({focus:()=>{t?.current?.focus()}}))),(0,p.useEffect)((()=>{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:n,parent:o}=e,r="editor-canvas"===n?o.document:e.document,{activeElement:i,body:a}=r;!s||i&&a!==i||t.current.focus()}),[s]),{ref:t}}function bh(){const{editPost:e}=(0,d.useDispatch)(xc),{title:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc);return{title:t("title")}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const yh=(0,p.forwardRef)(((e,t)=>{const{placeholder:s}=(0,d.useSelect)((e=>{const{getSettings:t}=e(g.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[n,o]=(0,p.useState)(!1),{ref:r}=fh(t),{title:i,setTitle:a}=bh(),[l,u]=(0,p.useState)({}),{clearSelectedBlock:h,insertBlocks:_,insertDefaultBlock:f}=(0,d.useDispatch)(g.store),b=(0,Ln.decodeEntities)(s)||(0,fs.__)("Add title"),{value:y,onChange:v,ref:w}=(0,Gc.__unstableUseRichText)({value:i,onChange(e){a(e.replace(_h," "))},placeholder:b,selectionStart:l.start,selectionEnd:l.end,onSelectionChange(e,t){u((s=>{const{start:n,end:o}=s;return n===e&&o===t?s:{start:e,end:t}}))},__unstableDisableFormats:!1});function S(e){_(e,0)}const k=hr(gh,{"is-selected":n});return(0,c.jsx)("h1",{ref:(0,m.useMergeRefs)([w,r]),contentEditable:!0,className:k,"aria-label":b,role:"textbox","aria-multiline":"true",onFocus:function(){o(!0),h()},onBlur:function(){o(!1),u({})},onKeyDown:function(e){e.keyCode===cl.ENTER&&(e.preventDefault(),f(void 0,void 0,0))},onPaste:function(e){const t=e.clipboardData;let s="",n="";try{s=t.getData("text/plain"),n=t.getData("text/html")}catch(e){return}window.console.log("Received HTML:\n\n",n),window.console.log("Received plain text:\n\n",s);const o=(0,x.pasteHandler)({HTML:n,plainText:s});if(e.preventDefault(),o.length)if("string"!=typeof o){const[e]=o;if(i||"core/heading"!==e.name&&"core/paragraph"!==e.name)S(o);else{const t=(0,Vc.__unstableStripHTML)(e.attributes.content);a(t),S(o.slice(1))}}else{const e=(0,Vc.__unstableStripHTML)(o);v((0,Gc.insert)(y,(0,Gc.create)({html:e})))}}})}));var xh=(0,p.forwardRef)(((e,t)=>(0,c.jsx)(Td,{supportKeys:"title",children:(0,c.jsx)(yh,{ref:t})})));var vh=(0,p.forwardRef)((function(e,t){const{placeholder:s}=(0,d.useSelect)((e=>{const{getSettings:t}=e(g.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[n,o]=(0,p.useState)(!1),{title:r,setTitle:i}=bh(),{ref:a}=fh(t),l=hr(gh,{"is-selected":n,"is-raw-text":!0}),u=(0,Ln.decodeEntities)(s)||(0,fs.__)("Add title");return(0,c.jsx)(Fn.TextareaControl,{ref:a,value:r,onChange:function(e){i(e.replace(_h," "))},onFocus:function(){o(!0)},onBlur:function(){o(!1)},label:s,className:l,placeholder:u,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1,__nextHasNoMarginBottom:!0})}));function wh({children:e}){const{canTrashPost:t}=(0,d.useSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:s,getCurrentPostType:n}=e(xc),{canUser:o}=e(u.store),r=n(),i=s(),a=t(),l=!!i&&o("delete",{kind:"postType",name:r,id:i});return{canTrashPost:(!a||i)&&l&&!M.includes(r)}}),[]);return t?e:null}function Sh({onActionPerformed:e}){const t=(0,d.useRegistry)(),{isNew:s,isDeleting:n,postId:o,title:r}=(0,d.useSelect)((e=>{const t=e(xc);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId(),title:t.getCurrentPostAttribute("title")}}),[]),{trashPost:i}=(0,d.useDispatch)(xc),[a,l]=(0,p.useState)(!1);if(s||!o)return null;return(0,c.jsxs)(wh,{children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:n,"aria-disabled":n,onClick:n?void 0:()=>l(!0),children:(0,fs.__)("Move to trash")}),(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:a,onConfirm:async()=>{l(!1),await i();const s=await t.resolveSelect(xc).getCurrentPost();e?.("move-to-trash",[s])},onCancel:()=>l(!1),confirmButtonText:(0,fs.__)("Move to trash"),size:"small",children:(0,fs.sprintf)((0,fs.__)('Are you sure you want to move "%s" to the trash?'),r)})]})}function kh({onClose:e}){const{isEditable:t,postSlug:s,postLink:n,permalinkPrefix:o,permalinkSuffix:r,permalink:i}=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPost(),s=e(xc).getCurrentPostType(),n=e(u.store).getPostType(s),o=e(xc).getPermalinkParts(),r=t?._links?.["wp:action-publish"]??!1;return{isEditable:e(xc).isPermalinkEditable()&&r,postSlug:(0,w.safeDecodeURIComponent)(e(xc).getEditedPostSlug()),viewPostLabel:n?.labels.view_item,postLink:t.link,permalinkPrefix:o?.prefix,permalinkSuffix:o?.suffix,permalink:(0,w.safeDecodeURIComponent)(e(xc).getPermalink())}}),[]),{editPost:a}=(0,d.useDispatch)(xc),{createNotice:l}=(0,d.useDispatch)(_s.store),[h,_]=(0,p.useState)(!1),f=(0,m.useCopyToClipboard)(i,(()=>{l("info",(0,fs.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})})),b="editor-post-url__slug-description-"+(0,m.useInstanceId)(kh);return(0,c.jsxs)("div",{className:"editor-post-url",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Slug"),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:3,children:[t&&(0,c.jsx)("p",{className:"editor-post-url__intro",children:(0,p.createInterpolateElement)((0,fs.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,c.jsx)("span",{id:b}),a:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,c.jsxs)("div",{children:[t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,c.jsx)(Fn.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,c.jsx)(Fn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,c.jsx)(Fn.Button,{icon:Br,ref:f,size:"small",label:"Copy"})}),label:(0,fs.__)("Slug"),hideLabelFromVision:!0,value:h?"":s,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:e=>{a({slug:e}),e?h&&_(!1):h||_(!0)},onBlur:e=>{a({slug:(0,w.cleanForSlug)(e.target.value)}),h&&_(!1)},"aria-describedby":b}),(0,c.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,c.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,fs.__)("Permalink:")}),(0,c.jsxs)(Fn.ExternalLink,{className:"editor-post-url__link",href:n,target:"_blank",children:[(0,c.jsx)("span",{className:"editor-post-url__link-prefix",children:o}),(0,c.jsx)("span",{className:"editor-post-url__link-slug",children:s}),(0,c.jsx)("span",{className:"editor-post-url__link-suffix",children:r})]})]})]}),!t&&(0,c.jsx)(Fn.ExternalLink,{className:"editor-post-url__link",href:n,target:"_blank",children:n})]})]})]})}function Ch({children:e}){const t=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPostType(),s=e(u.store).getPostType(t);if(!s?.viewable)return!1;if(!e(xc).getCurrentPost().link)return!1;return!!e(xc).getPermalinkParts()}),[]);return t?e:null}function Ph(){return jh()}function jh(){const e=(0,d.useSelect)((e=>e(xc).getPermalink()),[]);return(0,w.filterURLForDisplay)((0,w.safeDecodeURIComponent)(e))}function Eh(){const{isFrontPage:e}=(0,d.useSelect)((e=>{const{getCurrentPostId:t}=e(xc),{getEditedEntityRecord:s,canUser:n}=e(u.store),o=n("read",{kind:"root",name:"site"})?s("root","site"):void 0,r=t();return{isFrontPage:o?.page_on_front===r}}),[]),[t,s]=(0,p.useState)(null),n=(0,p.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]),o=e?(0,fs.__)("Link"):(0,fs.__)("Slug");return(0,c.jsx)(Ch,{children:(0,c.jsxs)(Nd,{label:o,ref:s,children:[!e&&(0,c.jsx)(Fn.Dropdown,{popoverProps:n,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Th,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsx)(kh,{onClose:e})}),e&&(0,c.jsx)(Bh,{})]})})}function Th({isOpen:e,onClick:t}){const{slug:s}=(0,d.useSelect)((e=>({slug:e(xc).getEditedPostSlug()})),[]),n=(0,w.safeDecodeURIComponent)(s);return(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change link: %s"),n),onClick:t,children:(0,c.jsx)(c.Fragment,{children:n})})}function Bh(){const{postLink:e}=(0,d.useSelect)((e=>{const{getCurrentPost:t}=e(xc);return{postLink:t()?.link}}),[]);return(0,c.jsx)(Fn.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}function Ih({render:e}){return e({canEdit:(0,d.useSelect)((e=>e(xc).getCurrentPost()._links?.["wp:action-publish"]??!1))})}var Nh=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});const Rh=window.wp.wordcount;function Dh(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("content")),[]),t=(0,fs._x)("words","Word count type. Do not translate!");return(0,c.jsx)("span",{className:"word-count",children:(0,Rh.count)(e,t)})}const Ah=189;function Mh(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("content")),[]),t=(0,fs._x)("words","Word count type. Do not translate!"),s=Math.round((0,Rh.count)(e,t)/Ah),n=0===s?(0,p.createInterpolateElement)((0,fs.__)("<span>< 1</span> minute"),{span:(0,c.jsx)("span",{})}):(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs._n)("<span>%s</span> minute","<span>%s</span> minutes",s),s),{span:(0,c.jsx)("span",{})});return(0,c.jsx)("span",{className:"time-to-read",children:n})}function Lh(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("content")),[]);return(0,Rh.count)(e,"characters_including_spaces")}var Oh=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:s,paragraphCount:n,numberOfBlocks:o}=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t}=e(g.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,fs.__)("Document Statistics"),tabIndex:"0",children:(0,c.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Words"),(0,c.jsx)(Dh,{})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Characters"),(0,c.jsx)("span",{className:"table-of-contents__number",children:(0,c.jsx)(Lh,{})})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Time to read"),(0,c.jsx)(Mh,{})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Headings"),(0,c.jsx)("span",{className:"table-of-contents__number",children:s})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Paragraphs"),(0,c.jsx)("span",{className:"table-of-contents__number",children:n})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Blocks"),(0,c.jsx)("span",{className:"table-of-contents__number",children:o})]})]})}),s>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("hr",{}),(0,c.jsx)("h2",{className:"table-of-contents__title",children:(0,fs.__)("Document Outline")}),(0,c.jsx)(Jc,{onSelect:t,hasOutlineItemsDisabled:e})]})]})};var Fh=(0,p.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...s},n){const o=(0,d.useSelect)((e=>!!e(g.store).getBlockCount()),[]);return(0,c.jsx)(Fn.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,...s,ref:n,onClick:o?t:void 0,icon:Nh,"aria-expanded":e,"aria-haspopup":"true",label:(0,fs.__)("Details"),tooltipPosition:"bottom","aria-disabled":!o}),renderContent:({onClose:t})=>(0,c.jsx)(Oh,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Vh(){const{__experimentalGetDirtyEntityRecords:e}=(0,d.useSelect)(u.store);return(0,p.useEffect)((()=>{const t=t=>{if(e().length>0)return t.returnValue=(0,fs.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}const zh=window.wp.serverSideRender;var Uh=s.n(zh);function Hh(e,t,s=[]){const n=(0,p.forwardRef)(((s,n)=>(k()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,c.jsx)(t,{ref:n,...s}))));return s.forEach((s=>{n[s]=Hh(e+"."+s,t[s])})),n}function Gh(e,t){return(...s)=>(k()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...s))}const $h=Hh("RichText",g.RichText,["Content"]);$h.isEmpty=Gh("RichText.isEmpty",g.RichText.isEmpty);const Wh=Hh("Autocomplete",g.Autocomplete),Zh=Hh("AlignmentToolbar",g.AlignmentToolbar),Yh=Hh("BlockAlignmentToolbar",g.BlockAlignmentToolbar),qh=Hh("BlockControls",g.BlockControls,["Slot"]),Kh=Hh("BlockEdit",g.BlockEdit),Qh=Hh("BlockEditorKeyboardShortcuts",g.BlockEditorKeyboardShortcuts),Xh=Hh("BlockFormatControls",g.BlockFormatControls,["Slot"]),Jh=Hh("BlockIcon",g.BlockIcon),eg=Hh("BlockInspector",g.BlockInspector),tg=Hh("BlockList",g.BlockList),sg=Hh("BlockMover",g.BlockMover),ng=Hh("BlockNavigationDropdown",g.BlockNavigationDropdown),og=Hh("BlockSelectionClearer",g.BlockSelectionClearer),rg=Hh("BlockSettingsMenu",g.BlockSettingsMenu),ig=Hh("BlockTitle",g.BlockTitle),ag=Hh("BlockToolbar",g.BlockToolbar),lg=Hh("ColorPalette",g.ColorPalette),cg=Hh("ContrastChecker",g.ContrastChecker),dg=Hh("CopyHandler",g.CopyHandler),ug=Hh("DefaultBlockAppender",g.DefaultBlockAppender),pg=Hh("FontSizePicker",g.FontSizePicker),mg=Hh("Inserter",g.Inserter),hg=Hh("InnerBlocks",g.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),gg=Hh("InspectorAdvancedControls",g.InspectorAdvancedControls,["Slot"]),_g=Hh("InspectorControls",g.InspectorControls,["Slot"]),fg=Hh("PanelColorSettings",g.PanelColorSettings),bg=Hh("PlainText",g.PlainText),yg=Hh("RichTextShortcut",g.RichTextShortcut),xg=Hh("RichTextToolbarButton",g.RichTextToolbarButton),vg=Hh("__unstableRichTextInputEvent",g.__unstableRichTextInputEvent),wg=Hh("MediaPlaceholder",g.MediaPlaceholder),Sg=Hh("MediaUpload",g.MediaUpload),kg=Hh("MediaUploadCheck",g.MediaUploadCheck),Cg=Hh("MultiSelectScrollIntoView",g.MultiSelectScrollIntoView),Pg=Hh("NavigableToolbar",g.NavigableToolbar),jg=Hh("ObserveTyping",g.ObserveTyping),Eg=Hh("SkipToSelectedBlock",g.SkipToSelectedBlock),Tg=Hh("URLInput",g.URLInput),Bg=Hh("URLInputButton",g.URLInputButton),Ig=Hh("URLPopover",g.URLPopover),Ng=Hh("Warning",g.Warning),Rg=Hh("WritingFlow",g.WritingFlow),Dg=Gh("createCustomColorsHOC",g.createCustomColorsHOC),Ag=Gh("getColorClassName",g.getColorClassName),Mg=Gh("getColorObjectByAttributeValues",g.getColorObjectByAttributeValues),Lg=Gh("getColorObjectByColorValue",g.getColorObjectByColorValue),Og=Gh("getFontSize",g.getFontSize),Fg=Gh("getFontSizeClass",g.getFontSizeClass),Vg=Gh("withColorContext",g.withColorContext),zg=Gh("withColors",g.withColors),Ug=Gh("withFontSizes",g.withFontSizes),Hg=Cl,Gg=Cl;function $g(e){return k()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,w.cleanForSlug)(e)}var Wg=(0,Fn.createSlotFill)(Symbol("EditCanvasContainerSlot"));const Zg="__experimentalMainDashboardButton",{Fill:Yg,Slot:qg}=(0,Fn.createSlotFill)(Zg),Kg=Yg;Kg.Slot=()=>{const e=(0,Fn.__experimentalUseSlotFills)(Zg);return(0,c.jsx)(qg,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};var Qg=Kg,Xg=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),Jg=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});const{useHasBlockToolbar:e_}=$(g.privateApis);function t_({isCollapsed:e,onToggle:t}){const{blockSelectionStart:s}=(0,d.useSelect)((e=>({blockSelectionStart:e(g.store).getBlockSelectionStart()})),[]),n=e_(),o=!!s;return(0,p.useEffect)((()=>{s&&t(!1)}),[s,t]),n?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:hr("editor-collapsible-block-toolbar",{"is-collapsed":e||!o}),children:(0,c.jsx)(g.BlockToolbar,{hideDragHandle:!0})}),(0,c.jsx)(Fn.Popover.Slot,{name:"block-toolbar"}),(0,c.jsx)(Fn.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?Xg:Jg,onClick:()=>{t(!e)},label:e?(0,fs.__)("Show block tools"):(0,fs.__)("Hide block tools"),size:"compact"})]}):null}var s_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var n_=function({className:e,disableBlockTools:t=!1}){const{setIsInserterOpened:s,setIsListViewOpened:n}=(0,d.useDispatch)(xc),{isDistractionFree:o,isInserterOpened:r,isListViewOpen:i,listViewShortcut:a,inserterSidebarToggleRef:l,listViewToggleRef:u,showIconLabels:h}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{isListViewOpened:s,getEditorMode:n,getInserterSidebarToggleRef:o,getListViewToggleRef:r}=$(e(xc)),{getShortcutRepresentation:i}=e(al.store);return{isInserterOpened:e(xc).isInserterOpened(),isListViewOpen:s(),listViewShortcut:i("core/editor/toggle-list-view"),inserterSidebarToggleRef:o(),listViewToggleRef:r(),showIconLabels:t("core","showIconLabels"),isDistractionFree:t("core","distractionFree"),isVisualMode:"visual"===n()}}),[]),_=(0,m.useViewportMatch)("wide"),f=(0,fs.__)("Document tools"),b=(0,p.useCallback)((()=>n(!i)),[n,i]),y=(0,p.useCallback)((()=>s(!r)),[r,s]),x=(0,fs._x)("Block Inserter","Generic label for block inserter button"),v=r?(0,fs.__)("Close"):(0,fs.__)("Add");return(0,c.jsx)(g.NavigableToolbar,{className:hr("editor-document-tools","edit-post-header-toolbar",e),"aria-label":f,variant:"unstyled",children:(0,c.jsxs)("div",{className:"editor-document-tools__left",children:[!o&&(0,c.jsx)(Fn.ToolbarButton,{ref:l,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:r,onMouseDown:e=>{r&&e.preventDefault()},onClick:y,disabled:t,icon:s_,label:h?v:x,showTooltip:!h,"aria-expanded":r}),(_||!h)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.ToolbarItem,{as:rd,showTooltip:!h,variant:h?"tertiary":void 0,size:"compact"}),(0,c.jsx)(Fn.ToolbarItem,{as:od,showTooltip:!h,variant:h?"tertiary":void 0,size:"compact"}),!o&&(0,c.jsx)(Fn.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Zi,disabled:t,isPressed:i,label:(0,fs.__)("Document Overview"),onClick:b,shortcut:a,showTooltip:!h,variant:h?"tertiary":void 0,"aria-expanded":i,ref:u})]})]})})},o_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});function r_(){const{createNotice:e}=(0,d.useDispatch)(_s.store),{getCurrentPostId:t,getCurrentPostType:s}=(0,d.useSelect)(xc),{getEditedEntityRecord:n}=(0,d.useSelect)(u.store);const o=(0,m.useCopyToClipboard)((function(){const e=n("postType",s(),t());return e?"function"==typeof e.content?e.content(e):e.blocks?(0,x.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:""}),(function(){e("info",(0,fs.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,c.jsx)(Fn.MenuItem,{ref:o,children:(0,fs.__)("Copy all blocks")})}const i_=[{value:"visual",label:(0,fs.__)("Visual editor")},{value:"text",label:(0,fs.__)("Code editor")}];var a_=function(){const{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:s,mode:n}=(0,d.useSelect)((e=>({shortcut:e(al.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:e(xc).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:e(xc).getEditorSettings().codeEditingEnabled,mode:e(xc).getEditorMode()})),[]),{switchEditorMode:o}=(0,d.useDispatch)(xc);let r=n;t||"visual"!==n||(r="text"),s||"text"!==n||(r="visual");const i=i_.map((n=>(s||"text"!==n.value||(n={...n,disabled:!0}),t||"visual"!==n.value||(n={...n,disabled:!0,info:(0,fs.__)("You can enable the visual editor in your profile settings.")}),n.value===r||n.disabled?n:{...n,shortcut:e})));return(0,c.jsx)(Fn.MenuGroup,{label:(0,fs.__)("Editor"),children:(0,c.jsx)(Fn.MenuItemsChoice,{choices:i,value:r,onSelect:o})})};const{Fill:l_,Slot:c_}=(0,Fn.createSlotFill)("ToolsMoreMenuGroup");l_.Slot=({fillProps:e})=>(0,c.jsx)(c_,{fillProps:e});var d_=l_;const{Fill:u_,Slot:p_}=(0,Fn.createSlotFill)("web"===p.Platform.OS?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");u_.Slot=({fillProps:e})=>(0,c.jsx)(p_,{fillProps:e});var m_=u_;function h_(){const{openModal:e}=(0,d.useDispatch)(Ea),{set:t}=(0,d.useDispatch)(C.store),{toggleDistractionFree:s}=(0,d.useDispatch)(xc),n=(0,d.useSelect)((e=>e(C.store).get("core","showIconLabels")),[]),o=()=>{t("core","distractionFree",!1)};return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Fn.DropdownMenu,{icon:o_,label:(0,fs.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact"},children:({onClose:t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Fn.MenuGroup,{label:(0,fs._x)("View","noun"),children:[(0,c.jsx)(C.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:o,label:(0,fs.__)("Top toolbar"),info:(0,fs.__)("Access all block and document tools in a single place"),messageActivated:(0,fs.__)("Top toolbar activated."),messageDeactivated:(0,fs.__)("Top toolbar deactivated.")}),(0,c.jsx)(C.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,fs.__)("Distraction free"),info:(0,fs.__)("Write with calmness"),handleToggling:!1,onToggle:()=>s({createNotice:!1}),messageActivated:(0,fs.__)("Distraction free mode activated."),messageDeactivated:(0,fs.__)("Distraction free mode deactivated."),shortcut:cl.displayShortcut.primaryShift("\\")}),(0,c.jsx)(C.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,fs.__)("Spotlight mode"),info:(0,fs.__)("Focus on one block at a time"),messageActivated:(0,fs.__)("Spotlight mode activated."),messageDeactivated:(0,fs.__)("Spotlight mode deactivated.")}),(0,c.jsx)(m_.Slot,{fillProps:{onClose:t}})]}),(0,c.jsx)(a_,{}),(0,c.jsx)(Ra.Slot,{name:"core/plugin-more-menu",label:(0,fs.__)("Plugins"),fillProps:{onClick:t}}),(0,c.jsxs)(Fn.MenuGroup,{label:(0,fs.__)("Tools"),children:[(0,c.jsx)(Fn.MenuItem,{onClick:()=>e("editor/keyboard-shortcut-help"),shortcut:cl.displayShortcut.access("h"),children:(0,fs.__)("Keyboard shortcuts")}),(0,c.jsx)(r_,{}),(0,c.jsxs)(Fn.MenuItem,{icon:Gn,href:(0,fs.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,fs.__)("Help"),(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]}),(0,c.jsx)(d_.Slot,{fillProps:{onClose:t}})]}),(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItem,{onClick:()=>e("editor/preferences"),children:(0,fs.__)("Preferences")})})]})})})}const g_="toggle",__="button";function f_({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let s;const n=(0,m.useViewportMatch)("medium","<"),{togglePublishSidebar:o}=(0,d.useDispatch)(xc),{hasPublishAction:r,isBeingScheduled:i,isPending:a,isPublished:l,isPublishSidebarEnabled:u,isPublishSidebarOpened:p,isScheduled:h,postStatus:g,postStatusHasChanged:_}=(0,d.useSelect)((e=>({hasPublishAction:!!e(xc).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:e(xc).isEditedPostBeingScheduled(),isPending:e(xc).isCurrentPostPending(),isPublished:e(xc).isCurrentPostPublished(),isPublishSidebarEnabled:e(xc).isPublishSidebarEnabled(),isPublishSidebarOpened:e(xc).isPublishSidebarOpened(),isScheduled:e(xc).isCurrentPostScheduled(),postStatus:e(xc).getEditedPostAttribute("status"),postStatusHasChanged:e(xc).getPostEdits()?.status})),[]);return s=l||_&&!["future","publish"].includes(g)||h&&i||a&&!r&&!n?__:n||u?g_:__,(0,c.jsx)(Fp,{forceIsDirty:e,isOpen:p,isToggle:s===g_,onToggle:o,setEntitiesSavedStatesCallback:t})}function b_(){const{hasLoaded:e,permalink:t,isPublished:s,label:n,showIconLabels:o}=(0,d.useSelect)((e=>{const t=e(xc).getCurrentPostType(),s=e(u.store).getPostType(t),{get:n}=e(C.store);return{permalink:e(xc).getPermalink(),isPublished:e(xc).isCurrentPostPublished(),label:s?.labels.view_item,hasLoaded:!!s,showIconLabels:n("core","showIconLabels")}}),[]);return s&&t&&e?(0,c.jsx)(Fn.Button,{icon:Gn,label:n||(0,fs.__)("View post"),href:t,target:"_blank",showTooltip:!o,size:"compact"}):null}var y_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})}),x_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})}),v_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})});function w_({forceIsAutosaveable:e,disabled:t}){const{deviceType:s,homeUrl:n,isTemplate:o,isViewable:r,showIconLabels:i,isTemplateHidden:a,templateId:l}=(0,d.useSelect)((e=>{const{getDeviceType:t,getCurrentPostType:s,getCurrentTemplateId:n,getRenderingMode:o}=e(xc),{getEntityRecord:r,getPostType:i}=e(u.store),{get:a}=e(C.store),l=s();return{deviceType:t(),homeUrl:r("root","__unstableBase")?.home,isTemplate:"wp_template"===l,isViewable:i(l)?.viewable??!1,showIconLabels:a("core","showIconLabels"),isTemplateHidden:"post-only"===o(),templateId:n()}}),[]),{setDeviceType:p,setRenderingMode:h,setDefaultRenderingMode:_}=$((0,d.useDispatch)(xc)),{resetZoomLevel:f}=$((0,d.useDispatch)(g.store)),b=e=>{p(e),f()};if((0,m.useViewportMatch)("medium","<"))return null;const y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!i,disabled:t,accessibleWhenDisabled:t},x={"aria-label":(0,fs.__)("View options")},v={desktop:y_,mobile:x_,tablet:v_},w=[{value:"Desktop",label:(0,fs.__)("Desktop"),icon:y_},{value:"Tablet",label:(0,fs.__)("Tablet"),icon:v_},{value:"Mobile",label:(0,fs.__)("Mobile"),icon:x_}];return(0,c.jsx)(Fn.DropdownMenu,{className:hr("editor-preview-dropdown",`editor-preview-dropdown--${s.toLowerCase()}`),popoverProps:{placement:"bottom-end"},toggleProps:y,menuProps:x,icon:v[s.toLowerCase()],label:(0,fs.__)("View"),disableOpenOnArrowDown:t,children:({onClose:t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItemsChoice,{choices:w,value:s,onSelect:b})}),o&&(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsxs)(Fn.MenuItem,{href:n,target:"_blank",icon:Gn,onClick:t,children:[(0,fs.__)("View site"),(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]})}),!o&&!!l&&(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItem,{icon:a?void 0:Zn,isSelected:!a,role:"menuitemcheckbox",onClick:()=>{const e=a?"template-locked":"post-only";h(e),_(e),f()},children:(0,fs.__)("Show template")})}),r&&(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Ap,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,fs.__)("Preview in new tab"),textContent:(0,c.jsxs)(c.Fragment,{children:[(0,fs.__)("Preview in new tab"),(0,c.jsx)(Fn.Icon,{icon:Gn})]}),onPreview:t})}),(0,c.jsx)(Ra.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:t}})]})})}var S_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var k_=({disabled:e})=>{const{isZoomOut:t,showIconLabels:s,isDistractionFree:n}=(0,d.useSelect)((e=>({isZoomOut:$(e(g.store)).isZoomOut(),showIconLabels:e(C.store).get("core","showIconLabels"),isDistractionFree:e(C.store).get("core","distractionFree")}))),{resetZoomLevel:o,setZoomLevel:r}=$((0,d.useDispatch)(g.store)),{registerShortcut:i,unregisterShortcut:a}=(0,d.useDispatch)(al.store);(0,p.useEffect)((()=>(i({name:"core/editor/zoom",category:"global",description:(0,fs.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,cl.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{a("core/editor/zoom")})),[i,a]),(0,al.useShortcut)("core/editor/zoom",(()=>{t?o():r("auto-scaled")}),{isDisabled:n});return(0,c.jsx)(Fn.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?o():r("auto-scaled")},icon:S_,label:(0,fs.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!s,className:"editor-zoom-out-toggle"})};const C_={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},P_={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};var j_=function({customSaveButton:e,forceIsDirty:t,forceDisableBlockTools:s,setEntitiesSavedStatesCallback:n,title:o}){const r=(0,m.useViewportMatch)("large"),i=(0,m.useViewportMatch)("medium"),a=(0,m.useMediaQuery)("(max-width: 403px)"),{postType:l,isTextEditor:u,isPublishSidebarOpened:h,showIconLabels:_,hasFixedToolbar:f,hasBlockSelection:b,hasSectionRootClientId:y}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{getEditorMode:s,getCurrentPostType:n,isPublishSidebarOpened:o}=e(xc),{getBlockSelectionStart:r,getSectionRootClientId:i}=$(e(g.store));return{postType:n(),isTextEditor:"text"===s(),isPublishSidebarOpened:o(),showIconLabels:t("core","showIconLabels"),hasFixedToolbar:t("core","fixedToolbar"),hasBlockSelection:!!r(),hasSectionRootClientId:!!i()}}),[]),x=["post","page","wp_template"].includes(l)&&y,v=[R,I,N].includes(l)||s,[w,S]=(0,p.useState)(!0),k=!a&&(!f||f&&(!b||w)),P=(()=>{const e=(0,Fn.__experimentalUseSlotFills)(Zg);return Boolean(e&&e.length)})();return(0,c.jsxs)("div",{className:"editor-header edit-post-header",children:[P&&(0,c.jsx)(Fn.__unstableMotion.div,{className:"editor-header__back-button",variants:P_,transition:{type:"tween"},children:(0,c.jsx)(Qg.Slot,{})}),(0,c.jsxs)(Fn.__unstableMotion.div,{variants:C_,className:"editor-header__toolbar",transition:{type:"tween"},children:[(0,c.jsx)(n_,{disableBlockTools:s||u}),f&&i&&(0,c.jsx)(t_,{isCollapsed:w,onToggle:S})]}),k&&(0,c.jsx)(Fn.__unstableMotion.div,{className:"editor-header__center",variants:C_,transition:{type:"tween"},children:(0,c.jsx)(Hc,{title:o})}),(0,c.jsxs)(Fn.__unstableMotion.div,{variants:C_,transition:{type:"tween"},className:"editor-header__settings",children:[!e&&!h&&(0,c.jsx)(sh,{forceIsDirty:t}),(0,c.jsx)(b_,{}),(0,c.jsx)(w_,{forceIsAutosaveable:t,disabled:v}),(0,c.jsx)(Ap,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),r&&x&&(0,c.jsx)(k_,{disabled:s}),(r||!_)&&(0,c.jsx)(La.Slot,{scope:"core"}),!e&&(0,c.jsx)(f_,{forceIsDirty:t,setEntitiesSavedStatesCallback:n}),e,(0,c.jsx)(h_,{})]})]})};const{PrivateInserterLibrary:E_}=$(g.privateApis);function T_(){const{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:s,showMostUsedBlocks:n,sidebarIsOpened:o}=(0,d.useSelect)((e=>{const{getInserterSidebarToggleRef:t,getInserter:s,isPublishSidebarOpened:n}=$(e(xc)),{getBlockRootClientId:o,isZoomOut:r,getSectionRootClientId:i}=$(e(g.store)),{get:a}=e(C.store),{getActiveComplementaryArea:l}=e(Ea);return{inserterSidebarToggleRef:t(),inserter:s(),showMostUsedBlocks:a("core","mostUsedBlocks"),blockSectionRootClientId:(()=>{if(r()){const e=i();if(e)return e}return o()})(),sidebarIsOpened:!(!l("core")&&!n())}}),[]),{setIsInserterOpened:r}=(0,d.useDispatch)(xc),{disableComplementaryArea:i}=(0,d.useDispatch)(Ea),a=(0,m.useViewportMatch)("medium","<"),l=(0,p.useRef)(),u=(0,p.useCallback)((()=>{r(!1),t.current?.focus()}),[t,r]),h=(0,p.useCallback)((e=>{e.keyCode!==cl.ESCAPE||e.defaultPrevented||(e.preventDefault(),u())}),[u]),_=(0,c.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,c.jsx)(E_,{showMostUsedBlocks:n,showInserterHelpPanel:!0,shouldFocusBlock:a,rootClientId:e,onSelect:s.onSelect,__experimentalInitialTab:s.tab,__experimentalInitialCategory:s.category,__experimentalFilterValue:s.filterValue,onPatternCategorySelection:o?()=>i("core"):void 0,ref:l,onClose:u})});return(0,c.jsx)("div",{onKeyDown:h,className:"editor-inserter-sidebar",children:_})}function B_(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Characters:")}),(0,c.jsx)(Fn.__experimentalText,{children:(0,c.jsx)(Lh,{})})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Words:")}),(0,c.jsx)(Dh,{})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Time to read:")}),(0,c.jsx)(Mh,{})]})]}),(0,c.jsx)(Jc,{})]})}const{TabbedSidebar:I_}=$(g.privateApis);function N_(){const{setIsListViewOpened:e}=(0,d.useDispatch)(xc),{getListViewToggleRef:t}=$((0,d.useSelect)(xc)),s=(0,m.useFocusOnMount)("firstElement"),n=(0,p.useCallback)((()=>{e(!1),t().current?.focus()}),[t,e]),o=(0,p.useCallback)((e=>{e.keyCode!==cl.ESCAPE||e.defaultPrevented||(e.preventDefault(),n())}),[n]),[r,i]=(0,p.useState)(null),[a,l]=(0,p.useState)("list-view"),u=(0,p.useRef)(),h=(0,p.useRef)(),_=(0,p.useRef)(),f=(0,m.useMergeRefs)([s,_,i]);const b=(0,p.useCallback)((()=>{u.current.contains(u.current.ownerDocument.activeElement)?n():function(e){const t=Vc.focus.tabbable.find(h.current)[0];if("list-view"===e){const e=Vc.focus.tabbable.find(_.current)[0];(u.current.contains(e)?e:t).focus()}else t.focus()}(a)}),[n,a]);return(0,al.useShortcut)("core/editor/toggle-list-view",b),(0,c.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:o,ref:u,children:(0,c.jsx)(I_,{tabs:[{name:"list-view",title:(0,fs._x)("List View","Post overview"),panel:(0,c.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,c.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,c.jsx)(g.__experimentalListView,{dropZoneElement:r})})}),panelRef:f},{name:"outline",title:(0,fs._x)("Outline","Post overview"),panel:(0,c.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,c.jsx)(B_,{})})}],onClose:n,onSelect:e=>l(e),defaultTabId:"list-view",ref:h,closeButtonLabel:(0,fs.__)("Close")})})}const{Fill:R_,Slot:D_}=(0,Fn.createSlotFill)("ActionsPanel");function A_({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:s,forceIsDirtyPublishPanel:n}){const{closePublishSidebar:o,togglePublishSidebar:r}=(0,d.useDispatch)(xc),{publishSidebarOpened:i,isPublishable:a,isDirty:l,hasOtherEntitiesChanges:u}=(0,d.useSelect)((e=>{const{isPublishSidebarOpened:t,isEditedPostPublishable:s,isCurrentPostPublished:n,isEditedPostDirty:o,hasNonPostEntityChanges:r}=e(xc),i=r();return{publishSidebarOpened:t(),isPublishable:!n()&&s(),isDirty:i||o(),hasOtherEntitiesChanges:i}}),[]),m=(0,p.useCallback)((()=>e(!0)),[]);let h;return h=i?(0,c.jsx)(Zm,{onClose:o,forceIsDirty:n,PrePublishExtension:Eu.Slot,PostPublishExtension:xu.Slot}):a&&!u?(0,c.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:r,"aria-expanded":!1,children:(0,fs.__)("Open publish panel")})}):(0,c.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:m,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!l,accessibleWhenDisabled:!0,children:(0,fs.__)("Open save panel")})}),(0,c.jsxs)(c.Fragment,{children:[s&&(0,c.jsx)(bd,{close:t,renderDialog:!0}),(0,c.jsx)(D_,{bubblesVirtually:!0}),!s&&h]})}function M_({autoFocus:e=!1}){const{switchEditorMode:t}=(0,d.useDispatch)(xc),{shortcut:s,isRichEditingEnabled:n}=(0,d.useSelect)((e=>{const{getEditorSettings:t}=e(xc),{getShortcutRepresentation:s}=e(al.store);return{shortcut:s("core/editor/toggle-mode"),isRichEditingEnabled:t().richEditingEnabled}}),[]),o=(0,p.useRef)();return(0,p.useEffect)((()=>{e||o?.current?.focus()}),[e]),(0,c.jsxs)("div",{className:"editor-text-editor",children:[n&&(0,c.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,c.jsx)("h2",{children:(0,fs.__)("Editing code")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:s,children:(0,fs.__)("Exit code editor")})]}),(0,c.jsxs)("div",{className:"editor-text-editor__body",children:[(0,c.jsx)(vh,{ref:o}),(0,c.jsx)(hh,{})]})]})}function L_({contentRef:e}){const{onNavigateToEntityRecord:t,templateId:s}=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:s}=e(xc);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,templateId:s()}}),[]),n=(0,d.useSelect)((e=>!!e(u.store).canUser("create",{kind:"postType",name:"wp_template"})),[]),[o,r]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const t=e=>{n&&e.target.classList.contains("is-root-container")&&"core/template-part"!==e.target.dataset?.type&&(e.defaultPrevented||(e.preventDefault(),r(!0)))},s=e.current;return s?.addEventListener("dblclick",t),()=>{s?.removeEventListener("dblclick",t)}}),[e,n]),n?(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:o,confirmButtonText:(0,fs.__)("Edit template"),onConfirm:()=>{r(!1),t({postId:s,postType:"wp_template"})},onCancel:()=>r(!1),size:"medium",children:(0,fs.__)("You’ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}function O_({direction:e,resizeWidthBy:t}){const s=`resizable-editor__resize-help-${e}`;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.Tooltip,{text:(0,fs.__)("Drag to resize"),children:(0,c.jsx)(Fn.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,fs.__)("Drag to resize"),"aria-describedby":s,onKeyDown:function(s){const{keyCode:n}=s;n!==cl.LEFT&&n!==cl.RIGHT||(s.preventDefault(),"left"===e&&n===cl.LEFT||"right"===e&&n===cl.RIGHT?t(20):("left"===e&&n===cl.RIGHT||"right"===e&&n===cl.LEFT)&&t(-20))},variants:{active:{opacity:1,scaleY:1.3}},whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,c.jsx)(Fn.VisuallyHidden,{id:s,children:(0,fs.__)("Use left and right arrow keys to resize the canvas.")})]})}const F_={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};var V_=function({className:e,enableResizing:t,height:s,children:n}){const[o,r]=(0,p.useState)("100%"),i=(0,p.useRef)(),a=(0,p.useCallback)((e=>{i.current&&r(i.current.offsetWidth+e)}),[]);return(0,c.jsx)(Fn.ResizableBox,{className:hr("editor-resizable-editor",e,{"is-resizable":t}),ref:e=>{i.current=e?.resizable},size:{width:t?o:"100%",height:t&&s?s:"100%"},onResizeStop:(e,t,s)=>{r(s.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,c.jsx)(O_,{direction:"left",resizeWidthBy:a}),right:(0,c.jsx)(O_,{direction:"right",resizeWidthBy:a})},handleClasses:void 0,handleStyles:{left:F_,right:F_},children:n})};function z_(e,t,s){return Math.min(Math.max(e,t),s)}function U_(e,t,s){const n=e-z_(e,s.left,s.right),o=t-z_(t,s.top,s.bottom);return Math.sqrt(n*n+o*o)}function H_({isEnabled:e=!0}={}){const{getEnabledClientIdsTree:t,getBlockName:s,getBlockOrder:n}=$((0,d.useSelect)(g.store)),{selectBlock:o}=(0,d.useDispatch)(g.store);return(0,m.useRefEffect)((r=>{if(!e)return;const i=e=>{(e.target===r||e.target.classList.contains("is-root-container"))&&((e,i)=>{const a=t().flatMap((({clientId:e})=>{const t=s(e);if("core/template-part"===t)return[];if("core/post-content"===t){const t=n(e);if(t.length)return t}return[e]}));let l=1/0,c=null;for(const t of a){const s=r.querySelector(`[data-block="${t}"]`);if(!s)continue;const n=U_(e,i,s.getBoundingClientRect());n<l&&n<500&&(l=n,c=t)}c&&o(c)})(e.clientX,e.clientY)};return r.addEventListener("click",i),()=>r.removeEventListener("click",i)}),[e])}function G_(){const{getSettings:e,isZoomOut:t}=$((0,d.useSelect)(g.store)),{resetZoomLevel:s}=$((0,d.useDispatch)(g.store));return(0,m.useRefEffect)((n=>{function o(n){if(t()&&!n.defaultPrevented){n.preventDefault();const{__experimentalSetIsInserterOpened:t}=e();"function"==typeof t&&t(!1),s()}}return n.addEventListener("dblclick",o),()=>{n.removeEventListener("dblclick",o)}}),[e,t,s])}const{LayoutStyle:$_,useLayoutClasses:W_,useLayoutStyles:Z_,ExperimentalBlockCanvas:Y_,useFlashEditableBlocks:q_}=$(g.privateApis),K_=[N,B,R,I];function Q_(e){for(let t=0;t<e.length;t++){if("core/post-content"===e[t].name)return e[t].attributes;if(e[t].innerBlocks.length){const s=Q_(e[t].innerBlocks);if(s)return s}}}function X_(e){for(let t=0;t<e.length;t++)if("core/post-content"===e[t].name)return!0;return!1}var J_=function({autoFocus:e,styles:t,disableIframe:s=!1,iframeProps:n,contentRef:o,className:r}){const i=(0,m.useViewportMatch)("small","<"),{renderingMode:a,postContentAttributes:l,editedPostTemplate:h={},wrapperBlockName:_,wrapperUniqueId:f,deviceType:b,isFocusedEntity:y,isDesignPostType:v,postType:w,isPreview:S}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s,getCurrentTemplateId:n,getEditorSettings:o,getRenderingMode:r,getDeviceType:i}=e(xc),{getPostType:a,getEditedEntityRecord:l}=e(u.store),c=s(),d=r();let p;c===N?p="core/block":"post-only"===d&&(p="core/post-content");const m=o(),h=m.supportsTemplateMode,g=a(c),_=n(),f=_?l("postType",B,_):void 0;return{renderingMode:d,postContentAttributes:m.postContentAttributes,isDesignPostType:K_.includes(c),editedPostTemplate:g?.viewable&&h?f:void 0,wrapperBlockName:p,wrapperUniqueId:t(),deviceType:i(),isFocusedEntity:!!m.onNavigateToPreviousEntityRecord,postType:c,isPreview:m.isPreviewMode}}),[]),{isCleanNewPost:k}=(0,d.useSelect)(xc),{hasRootPaddingAwareAlignments:C,themeHasDisabledLayoutStyles:P,themeSupportsLayout:j,isZoomedOut:E}=(0,d.useSelect)((e=>{const{getSettings:t,isZoomOut:s}=$(e(g.store)),n=t();return{themeHasDisabledLayoutStyles:n.disableLayoutStyles,themeSupportsLayout:n.supportsLayout,hasRootPaddingAwareAlignments:n.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:s()}}),[]),T=(0,g.__experimentalUseResizeCanvas)(b),[D]=(0,g.useSettings)("layout"),A=(0,p.useMemo)((()=>"post-only"!==a||v?{type:"default"}:j?{...D,type:"constrained"}:{type:"default"}),[a,j,D,v]),M=(0,p.useMemo)((()=>{if(!h?.content&&!h?.blocks&&l)return l;if(h?.blocks)return Q_(h?.blocks);const e="string"==typeof h?.content?h?.content:"";return Q_((0,x.parse)(e))||{}}),[h?.content,h?.blocks,l]),L=(0,p.useMemo)((()=>{if(!h?.content&&!h?.blocks)return!1;if(h?.blocks)return X_(h?.blocks);const e="string"==typeof h?.content?h?.content:"";return X_((0,x.parse)(e))||!1}),[h?.content,h?.blocks]),{layout:O={},align:F=""}=M||{},V=W_(M,"core/post-content"),z=hr({"is-layout-flow":!j},j&&V,F&&`align${F}`),U=Z_(M,"core/post-content",".block-editor-block-list__layout.is-root-container"),H=(0,p.useMemo)((()=>O&&("constrained"===O?.type||O?.inherit||O?.contentSize||O?.wideSize)?{...D,...O,type:"constrained"}:{...D,...O,type:"default"}),[O?.type,O?.inherit,O?.contentSize,O?.wideSize,D]),G=l?H:A,W="default"!==G?.type||L?G:A,Z=(0,g.__unstableUseTypingObserver)(),Y=(0,p.useRef)();(0,p.useEffect)((()=>{e&&k()&&Y?.current?.focus()}),[e,k]);const q=[R,I,N].includes(w)&&!S&&!i&&!E,K=(0,p.useMemo)((()=>[...t??[],{css:`:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${q?"min-height:0!important;":""}}\n\t\t\t\t${q?".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}":""}`}]),[t,q]),Q=(0,p.useRef)(),X=(0,g.__unstableUseTypewriter)();return o=(0,m.useMergeRefs)([Q,o,"post-only"===a?X:null,q_({isEnabled:"template-locked"===a}),H_({isEnabled:"template-locked"===a}),G_()]),(0,c.jsx)("div",{className:hr("editor-visual-editor","edit-post-visual-editor",r,{"has-padding":y||q,"is-resizable":q,"is-iframed":!s}),children:(0,c.jsx)(V_,{enableResizing:q,height:"100%",children:(0,c.jsxs)(Y_,{shouldIframe:!s,contentRef:o,styles:K,height:"100%",iframeProps:{...n,style:{...n?.style,...T}},children:[j&&!P&&"post-only"===a&&!v&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)($_,{selector:".editor-visual-editor__post-title-wrapper",layout:A}),(0,c.jsx)($_,{selector:".block-editor-block-list__layout.is-root-container",layout:W}),F&&(0,c.jsx)($_,{css:".is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}"}),U&&(0,c.jsx)($_,{layout:H,css:U})]}),"post-only"===a&&!v&&(0,c.jsx)("div",{className:hr("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":C}),contentEditable:!1,ref:Z,style:{marginTop:"4rem"},children:(0,c.jsx)(xh,{ref:Y})}),(0,c.jsxs)(g.RecursionProvider,{blockName:_,uniqueId:f,children:[(0,c.jsx)(g.BlockList,{className:hr("is-"+b.toLowerCase()+"-preview","post-only"!==a||v?"wp-site-blocks":`${z} wp-block-post-content`,{"has-global-padding":"post-only"===a&&!v&&C}),layout:G,dropZoneElement:s?Q.current:Q.current?.parentNode,__unstableDisableDropZone:"template-locked"===a}),"template-locked"===a&&(0,c.jsx)(L_,{contentRef:Q})]})]})})})};const ef={header:(0,fs.__)("Editor top bar"),body:(0,fs.__)("Editor content"),sidebar:(0,fs.__)("Editor settings"),actions:(0,fs.__)("Editor publish"),footer:(0,fs.__)("Editor footer")};function tf({className:e,styles:t,children:s,forceIsDirty:n,contentRef:o,disableIframe:r,autoFocus:i,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:u,title:h,iframeProps:_}){const{mode:f,isInserterOpened:b,isListViewOpened:y,isDistractionFree:x,isPreviewMode:v,showBlockBreadcrumbs:w,documentLabel:S}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{getEditorSettings:s,getPostTypeLabel:n}=e(xc),o=s(),r=n();let i=e(xc).getEditorMode();return o.richEditingEnabled||"visual"!==i||(i="text"),o.codeEditingEnabled||"text"!==i||(i="visual"),{mode:i,isInserterOpened:e(xc).isInserterOpened(),isListViewOpened:e(xc).isListViewOpened(),isDistractionFree:t("core","distractionFree"),isPreviewMode:o.isPreviewMode,showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),documentLabel:r||(0,fs._x)("Document","noun, breadcrumb")}}),[]),k=(0,m.useViewportMatch)("medium"),P=y?(0,fs.__)("Document Overview"):(0,fs.__)("Block Library"),[j,E]=(0,p.useState)(!1),T=(0,p.useCallback)((e=>{"function"==typeof j&&j(e),E(!1)}),[j]);return(0,c.jsx)(Za,{isDistractionFree:x,className:hr("editor-editor-interface",e,{"is-entity-save-view-open":!!j,"is-distraction-free":x&&!v}),labels:{...ef,secondarySidebar:P},header:!v&&(0,c.jsx)(j_,{forceIsDirty:n,setEntitiesSavedStatesCallback:E,customSaveButton:a,forceDisableBlockTools:u,title:h}),editorNotices:(0,c.jsx)(ad,{}),secondarySidebar:!v&&"visual"===f&&(b&&(0,c.jsx)(T_,{})||y&&(0,c.jsx)(N_,{})),sidebar:!v&&!x&&(0,c.jsx)(za.Slot,{scope:"core"}),content:(0,c.jsxs)(c.Fragment,{children:[!x&&!v&&(0,c.jsx)(ad,{}),(0,c.jsx)(Wg.Slot,{children:([e])=>e||(0,c.jsxs)(c.Fragment,{children:[!v&&"text"===f&&(0,c.jsx)(M_,{autoFocus:i}),!v&&!k&&"visual"===f&&(0,c.jsx)(g.BlockToolbar,{hideDragHandle:!0}),(v||"visual"===f)&&(0,c.jsx)(J_,{styles:t,contentRef:o,disableIframe:r,autoFocus:i,iframeProps:_}),s]})})]}),footer:!v&&!x&&k&&w&&"visual"===f&&(0,c.jsx)(g.BlockBreadcrumb,{rootLabelText:S}),actions:v?void 0:l||(0,c.jsx)(A_,{closeEntitiesSavedStates:T,isEntitiesSavedStatesOpen:j,setEntitiesSavedStatesCallback:E,forceIsDirtyPublishPanel:n})})}const{OverridesPanel:sf}=$(lo.privateApis);function nf(){return(0,d.useSelect)((e=>"wp_block"===e(xc).getCurrentPostType()),[])?(0,c.jsx)(sf,{}):null}function of(e){return"string"==typeof e.title?(0,Ln.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,Ln.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,Ln.decodeEntities)(e.title.raw):""}const rf=({items:e,closeModal:t})=>{const[s]=e,n=of(s),{showOnFront:o,currentHomePage:r,isSaving:i}=(0,d.useSelect)((e=>{const{getEntityRecord:t,isSavingEntityRecord:s}=e(u.store),n=t("root","site"),o=t("postType","page",n?.page_on_front);return{showOnFront:n?.show_on_front,currentHomePage:o,isSaving:s("root","site")}})),{saveEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:p}=(0,d.useDispatch)(_s.store);let m="";"posts"===o?m=(0,fs.__)("This will replace the current homepage which is set to display latest posts."):r&&(m=(0,fs.sprintf)((0,fs.__)('This will replace the current homepage: "%s"'),of(r)));const h=(0,fs.sprintf)((0,fs.__)('Set "%1$s" as the site homepage? %2$s'),n,m).trim(),g=(0,fs.__)("Set homepage");return(0,c.jsx)("form",{onSubmit:async function(e){e.preventDefault();try{await a("root","site",{page_on_front:s.id,show_on_front:"page"}),l((0,fs.__)("Homepage updated."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while setting the homepage.");p(t,{type:"snackbar"})}finally{t?.()}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:h}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:i,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:i,accessibleWhenDisabled:!0,children:g})]})]})})},af=({items:e,closeModal:t})=>{const[s]=e,n=of(s),{currentPostsPage:o,isPageForPostsSet:r,isSaving:i}=(0,d.useSelect)((e=>{const{getEntityRecord:t,isSavingEntityRecord:s}=e(u.store),n=t("root","site");return{currentPostsPage:t("postType","page",n?.page_for_posts),isPageForPostsSet:0!==n?.page_for_posts,isSaving:s("root","site")}})),{saveEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:p}=(0,d.useDispatch)(_s.store);const m=r&&o?(0,fs.sprintf)((0,fs.__)('This will replace the current posts page: "%s"'),of(o)):(0,fs.__)("This page will show the latest posts."),h=(0,fs.sprintf)((0,fs.__)('Set "%1$s" as the posts page? %2$s'),n,m),g=(0,fs.__)("Set posts page");return(0,c.jsx)("form",{onSubmit:async function(e){e.preventDefault();try{await a("root","site",{page_for_posts:s.id,show_on_front:"page"}),l((0,fs.__)("Posts page updated."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while setting the posts page.");p(t,{type:"snackbar"})}finally{t?.()}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:h}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:i,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:i,accessibleWhenDisabled:!0,children:g})]})]})})};function lf({postType:e,onActionPerformed:t,context:s}){const{defaultActions:n}=(0,d.useSelect)((t=>{const{getEntityActions:s}=$(t(xc));return{defaultActions:s("postType",e)}}),[e]),o=(0,d.useSelect)((t=>{if("page"!==e)return!1;const{getDefaultTemplateId:s,getEntityRecord:n,canUser:o}=t(u.store);if(!o("update",{kind:"root",name:"site"}))return!1;const r=s({slug:"front-page"});if(!r)return!0;const i=n("postType","wp_template",r);return!i||"front-page"!==i.slug}),[e]),r=(()=>{const{pageOnFront:e,pageForPosts:t}=(0,d.useSelect)((e=>{const{getEntityRecord:t,canUser:s}=e(u.store),n=s("read",{kind:"root",name:"site"})?t("root","site"):void 0;return{pageOnFront:n?.page_on_front,pageForPosts:n?.page_for_posts}}));return(0,p.useMemo)((()=>({id:"set-as-homepage",label:(0,fs.__)("Set as homepage"),isEligible:s=>"publish"===s.status&&"page"===s.type&&e!==s.id&&t!==s.id,modalFocusOnMount:"firstContentElement",RenderModal:rf})),[t,e])})(),i=(()=>{const{pageOnFront:e,pageForPosts:t}=(0,d.useSelect)((e=>{const{getEntityRecord:t,canUser:s}=e(u.store),n=s("read",{kind:"root",name:"site"})?t("root","site"):void 0;return{pageOnFront:n?.page_on_front,pageForPosts:n?.page_for_posts}}));return(0,p.useMemo)((()=>({id:"set-as-posts-page",label:(0,fs.__)("Set as posts page"),isEligible:s=>"publish"===s.status&&"page"===s.type&&e!==s.id&&t!==s.id,modalFocusOnMount:"firstContentElement",RenderModal:af})),[t,e])})(),{registerPostTypeSchema:a}=$((0,d.useDispatch)(xc));return(0,p.useEffect)((()=>{a(e)}),[a,e]),(0,p.useMemo)((()=>{let e=[...n];if(o&&e.push(r,i),e=e.sort(((e,t)=>"move-to-trash"===t.id?-1:0)),e=e.filter((e=>!e.context||e.context===s)),t)for(let s=0;s<e.length;++s){if(e[s].callback){const n=e[s].callback;e[s]={...e[s],callback:(o,r)=>{n(o,{...r,onActionPerformed:n=>{r?.onActionPerformed&&r.onActionPerformed(n),t(e[s].id,n)}})}}}if(e[s].RenderModal){const n=e[s].RenderModal;e[s]={...e[s],RenderModal:o=>(0,c.jsx)(n,{...o,onActionPerformed:n=>{o.onActionPerformed&&o.onActionPerformed(n),t(e[s].id,n)}})}}}return e}),[s,n,t,r,i,o])}const{Menu:cf,kebabCase:df}=$(Fn.privateApis);function uf({postType:e,postId:t,onActionPerformed:s}){const[n,o]=(0,p.useState)(null),{item:r,permissions:i}=(0,d.useSelect)((s=>{const{getEditedEntityRecord:n,getEntityRecordPermissions:o}=$(s(u.store));return{item:n("postType",e,t),permissions:o("postType",e,t)}}),[t,e]),a=(0,p.useMemo)((()=>({...r,permissions:i})),[r,i]),l=lf({postType:e,onActionPerformed:s}),m=(0,p.useMemo)((()=>l.filter((e=>!e.isEligible||e.isEligible(a)))),[l,a]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(cf,{placement:"bottom-end",children:[(0,c.jsx)(cf.TriggerButton,{render:(0,c.jsx)(Fn.Button,{size:"small",icon:o_,label:(0,fs.__)("Actions"),disabled:!m.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,c.jsx)(cf.Popover,{children:(0,c.jsx)(hf,{actions:m,items:[a],setActiveModalAction:o})})]}),!!n&&(0,c.jsx)(mf,{action:n,items:[a],closeModal:()=>o(null)})]})}function pf({action:e,onClick:t,items:s}){const n="string"==typeof e.label?e.label:e.label(s);return(0,c.jsx)(cf.Item,{onClick:t,children:(0,c.jsx)(cf.ItemLabel,{children:n})})}function mf({action:e,items:t,closeModal:s}){const n="string"==typeof e.label?e.label:e.label(t);return(0,c.jsx)(Fn.Modal,{title:e.modalHeader||n,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:s??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${df(e.id)}`,children:(0,c.jsx)(e.RenderModal,{items:t,closeModal:s})})}function hf({actions:e,items:t,setActiveModalAction:s}){const n=(0,d.useRegistry)();return(0,c.jsx)(cf.Group,{children:e.map((e=>(0,c.jsx)(pf,{action:e,onClick:()=>{"RenderModal"in e?s(e):e.callback(t,{registry:n})},items:t},e.id)))})}const{Badge:gf}=$(Fn.privateApis);function _f({postType:e,postId:t,onActionPerformed:s}){const n=(0,p.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),{postTitle:o,icon:r,labels:i}=(0,d.useSelect)((t=>{const{getEditedEntityRecord:s,getCurrentTheme:o,getPostType:r}=t(u.store),{getPostIcon:i}=$(t(xc));let a="";const l=s("postType",e,n[0]);if(1===n.length){const{default_template_types:t=[]}=o()??{},s=[B,I].includes(e)?Y({template:l,templateTypes:t}):{};a=s?.title||l?.title}return{postTitle:a,icon:i(e,{area:l?.area}),labels:r(e)?.labels}}),[n,e]),a=zc(t);let l=(0,fs.__)("No title");return i?.name&&n.length>1?l=(0,fs.sprintf)((0,fs.__)("%1$d %2$s"),n.length,i?.name):o&&(l=(0,Vc.__unstableStripHTML)(o)),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,c.jsxs)(Fn.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",align:"flex-start",children:[(0,c.jsx)(Fn.Icon,{className:"editor-post-card-panel__icon",icon:r}),(0,c.jsxs)(Fn.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,c.jsx)("span",{className:"editor-post-card-panel__title-name",children:l}),a&&1===n.length&&(0,c.jsx)(gf,{children:a})]}),1===n.length&&(0,c.jsx)(uf,{postType:e,postId:n[0],onActionPerformed:s})]}),n.length>1&&(0,c.jsx)(Fn.__experimentalText,{className:"editor-post-card-panel__description",children:(0,fs.sprintf)((0,fs.__)("Changes will be applied to all selected %s."),i?.name.toLowerCase())})]})}function ff(){const{postContent:e}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostType:s,getCurrentPostId:n}=e(xc),{canUser:o}=e(u.store),{getEntityRecord:r}=e(u.store),i=o("read",{kind:"root",name:"site"})?r("root","site"):void 0,a=s();return{postContent:!(+n()===i?.page_for_posts)&&![B,I].includes(a)&&t("content")}}),[]),t=(0,fs._x)("words","Word count type. Do not translate!"),s=(0,p.useMemo)((()=>e?(0,Rh.count)(e,t):0),[e,t]);if(!s)return null;const n=Math.round(s/189),o=(0,fs.sprintf)((0,fs._n)("%s word","%s words",s),s.toLocaleString()),r=n<=1?(0,fs.__)("1 minute"):(0,fs.sprintf)((0,fs._n)("%s minute","%s minutes",n),n.toLocaleString());return(0,c.jsx)("div",{className:"editor-post-content-information",children:(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.sprintf)((0,fs.__)("%1$s, %2$s read time."),o,r)})})}var bf=function(){const{postFormat:e}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(xc);return{postFormat:t("format")??"standard"}}),[]),t=Cp.find((t=>t.id===e)),[s,n]=(0,p.useState)(null),o=(0,p.useMemo)((()=>({anchor:s,placement:"left-start",offset:36,shift:!0})),[s]);return(0,c.jsx)(kp,{children:(0,c.jsx)(Nd,{label:(0,fs.__)("Format"),ref:n,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:o,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change format: %s"),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:e})=>(0,c.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Format"),onClose:e}),(0,c.jsx)(Pp,{})]})})})})};function yf(){const e=(0,d.useSelect)((e=>e(xc).getEditedPostAttribute("modified")),[]),t=e&&(0,fs.sprintf)((0,fs.__)("Last edited %s."),(0,v.humanTimeDiff)(e));return t?(0,c.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,c.jsx)(Fn.__experimentalText,{children:t})}):null}var xf=function({className:e,children:t}){return(0,c.jsx)(Fn.__experimentalVStack,{className:hr("editor-post-panel__section",e),children:t})};const vf={};function wf(){const{editEntityRecord:e}=(0,d.useDispatch)(u.store),{postsPageTitle:t,postsPageId:s,isTemplate:n,postSlug:o}=(0,d.useSelect)((e=>{const{getEntityRecord:t,getEditedEntityRecord:s,canUser:n}=e(u.store),o=n("read",{kind:"root",name:"site"})?t("root","site"):void 0,r=o?.page_for_posts?s("postType","page",o?.page_for_posts):vf,{getEditedPostAttribute:i,getCurrentPostType:a}=e(xc);return{postsPageId:r?.id,postsPageTitle:r?.title,isTemplate:a()===B,postSlug:i("slug")}}),[]),[r,i]=(0,p.useState)(null),a=(0,p.useMemo)((()=>({anchor:r,placement:"left-start",offset:36,shift:!0})),[r]);if(!n||!["home","index"].includes(o)||!s)return null;const l=t=>{e("postType","page",s,{title:t})},h=(0,Ln.decodeEntities)(t);return(0,c.jsx)(Nd,{label:(0,fs.__)("Blog title"),ref:i,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:a,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change blog title: %s"),h),onClick:t,children:h}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Blog title"),onClose:e}),(0,c.jsx)(Fn.__experimentalInputControl,{placeholder:(0,fs.__)("No title"),size:"__unstable-large",value:t,onChange:(0,m.debounce)(l,300),label:(0,fs.__)("Blog title"),help:(0,fs.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}function Sf(){const{editEntityRecord:e}=(0,d.useDispatch)(u.store),{postsPerPage:t,isTemplate:s,postSlug:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostType:s}=e(xc),{getEditedEntityRecord:n,canUser:o}=e(u.store),r=o("read",{kind:"root",name:"site"})?n("root","site"):void 0;return{isTemplate:s()===B,postSlug:t("slug"),postsPerPage:r?.posts_per_page||1}}),[]),[o,r]=(0,p.useState)(null),i=(0,p.useMemo)((()=>({anchor:o,placement:"left-start",offset:36,shift:!0})),[o]);if(!s||!["home","index"].includes(n))return null;const a=t=>{e("root","site",void 0,{posts_per_page:t})};return(0,c.jsx)(Nd,{label:(0,fs.__)("Posts per page"),ref:r,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:i,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.__)("Change posts per page"),onClick:s,children:t}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Posts per page"),onClose:e}),(0,c.jsx)(Fn.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:a,label:(0,fs.__)("Posts per page"),help:(0,fs.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}const kf=[{label:(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,fs.__)("Visitors can add new comments and replies.")},{label:(0,fs.__)("Closed"),value:"",description:[(0,fs.__)("Visitors cannot add new comments or replies."),(0,fs.__)("Existing comments remain visible.")].join(" ")}];function Cf(){const{editEntityRecord:e}=(0,d.useDispatch)(u.store),{allowCommentsOnNewPosts:t,isTemplate:s,postSlug:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostType:s}=e(xc),{getEditedEntityRecord:n,canUser:o}=e(u.store),r=o("read",{kind:"root",name:"site"})?n("root","site"):void 0;return{isTemplate:s()===B,postSlug:t("slug"),allowCommentsOnNewPosts:r?.default_comment_status||""}}),[]),[o,r]=(0,p.useState)(null),i=(0,p.useMemo)((()=>({anchor:o,placement:"left-start",offset:36,shift:!0})),[o]);if(!s||!["home","index"].includes(n))return null;const a=t=>{e("root","site",void 0,{default_comment_status:t?"open":null})};return(0,c.jsx)(Nd,{label:(0,fs.__)("Discussion"),ref:r,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:i,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.__)("Change discussion settings"),onClick:s,children:t?(0,fs.__)("Comments open"):(0,fs.__)("Comments closed")}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Discussion"),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:3,children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,c.jsx)(Fn.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,fs.__)("Comment status"),options:kf,onChange:a,selected:t})]})]})})})}function Pf({onActionPerformed:e}){const{isRemovedPostStatusPanel:t,postType:s,postId:n}=(0,d.useSelect)((e=>{const{isEditorPanelRemoved:t,getCurrentPostType:s,getCurrentPostId:n}=e(xc);return{isRemovedPostStatusPanel:t("post-status"),postType:s(),postId:n()}}),[]);return(0,c.jsx)(xf,{className:"editor-post-summary",children:(0,c.jsx)(ku.Slot,{children:o=>(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(_f,{postType:s,postId:n,onActionPerformed:e}),(0,c.jsx)(Sp,{withPanelBody:!1}),(0,c.jsx)(up,{}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:1,children:[(0,c.jsx)(ff,{}),(0,c.jsx)(yf,{})]}),!t&&(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsxs)(Fn.__experimentalVStack,{spacing:1,children:[(0,c.jsx)(th,{}),(0,c.jsx)(rh,{}),(0,c.jsx)(Eh,{}),(0,c.jsx)(Yu,{}),(0,c.jsx)(Fu,{}),(0,c.jsx)(tp,{}),(0,c.jsx)(Tp,{}),(0,c.jsx)($d,{}),(0,c.jsx)(ah,{}),(0,c.jsx)(wf,{}),(0,c.jsx)(Sf,{}),(0,c.jsx)(Cf,{}),(0,c.jsx)(bf,{}),o]}),(0,c.jsx)(Sh,{onActionPerformed:e})]})]})})})})}const{EXCLUDED_PATTERN_SOURCES:jf,PATTERN_TYPES:Ef}=$(lo.privateApis);function Tf(e,t){return e.innerBlocks=e.innerBlocks.map((e=>Tf(e,t))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=t),e}function Bf(e,t){return e.filter(((e,s,n)=>((e,t,s)=>t===s.findIndex((t=>e.name===t.name)))(e,s,n)&&(e=>!jf.includes(e.source))(e)&&(e=>e.templateTypes?.includes(t.slug)||e.blockTypes?.includes("core/template-part/"+t.area))(e)))}function If(e,t){return e.map((e=>({...e,keywords:e.keywords||[],type:Ef.theme,blocks:(0,x.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=>Tf(e,t)))})))}function Nf({availableTemplates:e,onSelect:t}){return e&&0!==e?.length?(0,c.jsx)(g.__experimentalBlockPatternsList,{label:(0,fs.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0}):null}function Rf(){const{area:e,name:t,slug:s,postType:n,postId:o}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(xc),{getEditedEntityRecord:n}=e(u.store),o=t(),r=s(),i=n("postType",o,r);return{area:i?.area,name:i?.name,slug:i?.slug,postType:o,postId:r}}),[]),{editEntityRecord:r}=(0,d.useDispatch)(u.store),i=function({area:e,name:t,slug:s}){const{blockPatterns:n,restBlockPatterns:o,currentThemeStylesheet:r}=(0,d.useSelect)((e=>{const{getEditorSettings:t}=e(xc),s=t();return{blockPatterns:s.__experimentalAdditionalBlockPatterns??s.__experimentalBlockPatterns,restBlockPatterns:e(u.store).getBlockPatterns(),currentThemeStylesheet:e(u.store).getCurrentTheme().stylesheet}}),[]);return(0,p.useMemo)((()=>If(Bf([...n||[],...o||[]],{area:e,name:t,slug:s}),r)),[e,t,s,n,o,r])}({area:e,name:t,slug:s});return i?.length?(0,c.jsx)(Fn.PanelBody,{title:(0,fs.__)("Design"),initialOpen:n===I,children:(0,c.jsx)(Nf,{availableTemplates:i,onSelect:async e=>{await r("postType",n,o,{blocks:e.blocks,content:(0,x.serialize)(e.blocks)})}})}):null}function Df(){const{postType:e}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(xc);return{postType:t()}}),[]);return[I,B].includes(e)?(0,c.jsx)(Rf,{}):null}const Af={document:"edit-post/document",block:"edit-post/block"},{Tabs:Mf}=$(Fn.privateApis);var Lf=(0,p.forwardRef)(((e,t)=>{const{documentLabel:s}=(0,d.useSelect)((e=>{const{getPostTypeLabel:t}=e(xc);return{documentLabel:t()||(0,fs._x)("Document","noun, panel")}}),[]);return(0,c.jsxs)(Mf.TabList,{ref:t,children:[(0,c.jsx)(Mf.Tab,{tabId:Af.document,"data-tab-id":Af.document,children:s}),(0,c.jsx)(Mf.Tab,{tabId:Af.block,"data-tab-id":Af.block,children:(0,fs.__)("Block")})]})}));const{BlockQuickNavigation:Of}=$(g.privateApis),Ff=["core/post-title","core/post-featured-image","core/post-content"];function Vf(){const e=(0,p.useMemo)((()=>(0,h.applyFilters)("editor.postContentBlockTypes",Ff)),[]),{clientIds:t,postType:s,renderingMode:n}=(0,d.useSelect)((t=>{const{getCurrentPostType:s,getPostBlocksByName:n,getRenderingMode:o}=$(t(xc)),r=s();return{postType:r,clientIds:n(B===r?"core/template-part":e),renderingMode:o()}}),[e]),{enableComplementaryArea:o}=(0,d.useDispatch)(Ea);return"post-only"===n&&s!==B||0===t.length?null:(0,c.jsx)(Fn.PanelBody,{title:(0,fs.__)("Content"),children:(0,c.jsx)(Of,{clientIds:t,onSelect:()=>{o("core","edit-post/document")}})})}const{BlockQuickNavigation:zf}=$(g.privateApis);function Uf(){const e=(0,d.useSelect)((e=>{const{getBlockTypes:t}=e(x.store);return t()}),[]),t=(0,p.useMemo)((()=>e.filter((e=>"theme"===e.category)).map((({name:e})=>e))),[e]),s=(0,d.useSelect)((e=>{const{getBlocksByName:s}=e(g.store);return s(t)}),[t]);return 0===s.length?null:(0,c.jsx)(Fn.PanelBody,{title:(0,fs.__)("Content"),children:(0,c.jsx)(zf,{clientIds:s})})}function Hf(){const e=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(xc);return t()}),[]);return e!==I?null:(0,c.jsx)(Uf,{})}var Gf=function(){const{hasBlockSelection:e}=(0,d.useSelect)((e=>({hasBlockSelection:!!e(g.store).getBlockSelectionStart()})),[]),{getActiveComplementaryArea:t}=(0,d.useSelect)(Ea),{enableComplementaryArea:s}=(0,d.useDispatch)(Ea),{get:n}=(0,d.useSelect)(C.store);(0,p.useEffect)((()=>{const o=t("core"),r=["edit-post/document","edit-post/block"].includes(o),i=n("core","distractionFree");r&&!i&&s("core",e?"edit-post/block":"edit-post/document")}),[e,t,s,n])};const{Tabs:$f}=$(Fn.privateApis),Wf=p.Platform.select({web:!0,native:!1}),Zf=({tabName:e,keyboardShortcut:t,onActionPerformed:s,extraPanels:n})=>{const o=(0,p.useRef)(null),r=(0,p.useContext)($f.Context);return(0,p.useEffect)((()=>{const t=Array.from(o.current?.querySelectorAll('[role="tab"]')||[]),s=t.find((t=>t.getAttribute("data-tab-id")===e)),n=s?.ownerDocument.activeElement;t.some((e=>n&&n.id===e.id))&&s&&s.id!==n?.id&&s?.focus()}),[e]),(0,c.jsx)(Bu,{identifier:e,header:(0,c.jsx)($f.Context.Provider,{value:r,children:(0,c.jsx)(Lf,{ref:o})}),closeLabel:(0,fs.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,fs._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,fs.isRTL)()?qi:Ki,isActiveByDefault:Wf,children:(0,c.jsxs)($f.Context.Provider,{value:r,children:[(0,c.jsxs)($f.TabPanel,{tabId:Af.document,focusable:!1,children:[(0,c.jsx)(Pf,{onActionPerformed:s}),(0,c.jsx)(hu.Slot,{}),(0,c.jsx)(Vf,{}),(0,c.jsx)(Hf,{}),(0,c.jsx)(Df,{}),(0,c.jsx)(ph,{}),(0,c.jsx)(nf,{}),n]}),(0,c.jsx)($f.TabPanel,{tabId:Af.block,focusable:!1,children:(0,c.jsx)(g.BlockInspector,{})})]})})};var Yf=({extraPanels:e,onActionPerformed:t})=>{Gf();const{tabName:s,keyboardShortcut:n,showSummary:o}=(0,d.useSelect)((e=>{const t=e(al.store).getShortcutRepresentation("core/editor/toggle-sidebar"),s=e(Ea).getActiveComplementaryArea("core");let n=s;return[Af.block,Af.document].includes(s)||(n=e(g.store).getBlockSelectionStart()?Af.block:Af.document),{tabName:n,keyboardShortcut:t,showSummary:![B,I,R].includes(e(xc).getCurrentPostType())}}),[]),{enableComplementaryArea:r}=(0,d.useDispatch)(Ea),i=(0,p.useCallback)((e=>{e&&r("core",e)}),[r]);return(0,c.jsx)($f,{selectedTabId:s,onSelect:i,selectOnMove:!1,children:(0,c.jsx)(Zf,{tabName:s,keyboardShortcut:n,showSummary:o,onActionPerformed:t,extraPanels:e})})},qf=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});const Kf="edit-post/collab-history-sidebar",Qf="edit-post/collab-sidebar",Xf=[Kf,Qf];function Jf(){}const eb=["#3858E9","#9fB1FF","#1D35B4","#1A1919","#E26F56","#33F078","#FFF972","#7A00DF"];function tb(e){return eb[e%eb.length]}function sb(e,t,s){if(!t)return;const n=e?`[role=listitem][id="comment-thread-${e}"]`:"[role=listitem]:not([id])",o=s?`${n} ${s}`:n;return new Promise((e=>{if(t.querySelector(o))return e(t.querySelector(o));let s=null;const n=new window.MutationObserver((()=>{t.querySelector(o)&&(clearTimeout(s),n.disconnect(),e(t.querySelector(o)))}));n.observe(t,{childList:!0,subtree:!0}),s=setTimeout((()=>{n.disconnect(),e(null)}),3e3)})).then((e=>e?.focus()))}var nb=function({avatar:e,name:t,date:s,userId:n}){const o=(0,v.getSettings)(),{currentUserAvatar:r,currentUserName:i,currentUserId:a,dateFormat:l=o.formats.date}=(0,d.useSelect)((e=>{const{getCurrentUser:t,getEntityRecord:s}=e(u.store),{getSettings:n}=e(g.store),o=t(),{__experimentalDiscussionSettings:r}=n(),i=r?.avatarURL,a=s("root","site");return{currentUserAvatar:o?.avatar_urls?.[48]??i,currentUserName:o?.name,currentUserId:o?.id,dateFormat:a?.date_format}}),[]),p=(0,v.getDate)(s),m=(0,v.dateI18n)("c",p),h=Math.floor((new Date-p)/864e5)<30?(0,v.humanTimeDiff)(p):(0,v.dateI18n)(l,p),_=(0,v.dateI18n)((0,fs._x)("F j, Y g:i a","Note date full date format"),s);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("img",{src:e||r,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,fs.__)("User avatar"),width:32,height:32,style:{borderColor:tb(n??a)}}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"0",children:[(0,c.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??i}),s&&(0,c.jsx)(Fn.Tooltip,{placement:"top",text:_,children:(0,c.jsx)("time",{dateTime:m,className:"editor-collab-sidebar-panel__user-time",children:h})})]})]})};var ob=function e({onSubmit:t,onCancel:s,thread:n,submitButtonText:o,labelText:r,reflowComments:i=Jf}){const[a,l]=(0,p.useState)(n?.content?.raw??""),d=(0,m.useDebounce)(i,100),u=(0,m.useInstanceId)(e,"comment-input"),h=a===n?.content?.raw||!(g=a,g.trim()).length;var g;return(0,c.jsxs)(Fn.__experimentalVStack,{className:"editor-collab-sidebar-panel__comment-form",spacing:"4",children:[(0,c.jsx)(Fn.VisuallyHidden,{as:"label",htmlFor:u,children:r??(0,fs.__)("Note")}),(0,c.jsx)(mh.A,{id:u,value:a??"",onChange:e=>{var t;t=e.target.value,l(t),d()},rows:1,maxRows:20}),(0,c.jsxs)(Fn.__experimentalHStack,{spacing:"2",justify:"flex-end",wrap:!0,children:[(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary",onClick:s,children:(0,c.jsx)(Fn.__experimentalTruncate,{children:(0,fs.__)("Cancel")})}),(0,c.jsx)(Fn.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",onClick:()=>{t(a),l("")},disabled:h,children:(0,c.jsx)(Fn.__experimentalTruncate,{children:o})})]})]})};Math.min,Math.max,Math.round,Math.floor;function rb(e){return e.split("-")[0]}function ib(e){return e.split("-")[1]}function ab(e){return"y"===e?"height":"width"}function lb(e){return["top","bottom"].includes(rb(e))?"y":"x"}function cb(e){return"x"===lb(e)?"y":"x"}function db(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ub(e,t,s){let{reference:n,floating:o}=e;const r=lb(t),i=cb(t),a=ab(i),l=rb(t),c="y"===r,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-o.width,y:u};break;default:m={x:n.x,y:n.y}}switch(ib(t)){case"start":m[i]-=p*(s&&c?-1:1);break;case"end":m[i]+=p*(s&&c?-1:1)}return m}const pb=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:s,y:n}=t,o=await async function(e,t){const{placement:s,platform:n,elements:o}=e,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),i=rb(s),a=ib(s),l="y"===lb(s),c=["left","top"].includes(i)?-1:1,d=r&&l?-1:1,u=(m=e,"function"==typeof(p=t)?p(m):p);var p,m;let{mainAxis:h,crossAxis:g,alignmentAxis:_}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof _&&(g="end"===a?-1*_:_),l?{x:g*d,y:h*c}:{x:h*c,y:g*d}}(t,e);return{x:s+o.x,y:n+o.y,data:o}}}},mb=Math.min,hb=Math.max,gb=Math.round,_b=Math.floor,fb=e=>({x:e,y:e});function bb(){return"undefined"!=typeof window}function yb(e){return wb(e)?(e.nodeName||"").toLowerCase():"#document"}function xb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function vb(e){var t;return null==(t=(wb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function wb(e){return!!bb()&&(e instanceof Node||e instanceof xb(e).Node)}function Sb(e){return!!bb()&&(e instanceof Element||e instanceof xb(e).Element)}function kb(e){return!!bb()&&(e instanceof HTMLElement||e instanceof xb(e).HTMLElement)}function Cb(e){return!(!bb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof xb(e).ShadowRoot)}function Pb(e){const{overflow:t,overflowX:s,overflowY:n,display:o}=Nb(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+s)&&!["inline","contents"].includes(o)}function jb(e){return["table","td","th"].includes(yb(e))}function Eb(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Tb(e){const t=Bb(),s=Sb(e)?Nb(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!s[e]&&"none"!==s[e]))||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(s.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(s.contain||"").includes(e)))}function Bb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ib(e){return["html","body","#document"].includes(yb(e))}function Nb(e){return xb(e).getComputedStyle(e)}function Rb(e){return Sb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Db(e){if("html"===yb(e))return e;const t=e.assignedSlot||e.parentNode||Cb(e)&&e.host||vb(e);return Cb(t)?t.host:t}function Ab(e){const t=Db(e);return Ib(t)?e.ownerDocument?e.ownerDocument.body:e.body:kb(t)&&Pb(t)?t:Ab(t)}function Mb(e,t,s){var n;void 0===t&&(t=[]),void 0===s&&(s=!0);const o=Ab(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=xb(o);if(r){const e=function(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}(i);return t.concat(i,i.visualViewport||[],Pb(o)?o:[],e&&s?Mb(e):[])}return t.concat(o,Mb(o,[],s))}function Lb(e){const t=Nb(e);let s=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=kb(e),r=o?e.offsetWidth:s,i=o?e.offsetHeight:n,a=gb(s)!==r||gb(n)!==i;return a&&(s=r,n=i),{width:s,height:n,$:a}}function Ob(e){return Sb(e)?e:e.contextElement}function Fb(e){const t=Ob(e);if(!kb(t))return fb(1);const s=t.getBoundingClientRect(),{width:n,height:o,$:r}=Lb(t);let i=(r?gb(s.width):s.width)/n,a=(r?gb(s.height):s.height)/o;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}const Vb=fb(0);function zb(e){const t=xb(e);return Bb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vb}function Ub(e,t,s,n){void 0===t&&(t=!1),void 0===s&&(s=!1);const o=e.getBoundingClientRect(),r=Ob(e);let i=fb(1);t&&(n?Sb(n)&&(i=Fb(n)):i=Fb(e));const a=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==xb(e))&&t}(r,s,n)?zb(r):fb(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(r){const e=xb(r),t=n&&Sb(n)?xb(n):n;let s=e,o=s.frameElement;for(;o&&n&&t!==s;){const e=Fb(o),t=o.getBoundingClientRect(),n=Nb(o),r=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=r,c+=i,s=xb(o),o=s.frameElement}}return db({width:d,height:u,x:l,y:c})}const Hb=[":popover-open",":modal"];function Gb(e){return Hb.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function $b(e){return Ub(vb(e)).left+Rb(e).scrollLeft}function Wb(e,t,s){let n;if("viewport"===t)n=function(e,t){const s=xb(e),n=vb(e),o=s.visualViewport;let r=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){r=o.width,i=o.height;const e=Bb();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:i,x:a,y:l}}(e,s);else if("document"===t)n=function(e){const t=vb(e),s=Rb(e),n=e.ownerDocument.body,o=hb(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=hb(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-s.scrollLeft+$b(e);const a=-s.scrollTop;return"rtl"===Nb(n).direction&&(i+=hb(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:a}}(vb(e));else if(Sb(t))n=function(e,t){const s=Ub(e,!0,"fixed"===t),n=s.top+e.clientTop,o=s.left+e.clientLeft,r=kb(e)?Fb(e):fb(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:o*r.x,y:n*r.y}}(t,s);else{const s=zb(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return db(n)}function Zb(e,t){const s=Db(e);return!(s===t||!Sb(s)||Ib(s))&&("fixed"===Nb(s).position||Zb(s,t))}function Yb(e,t,s){const n=kb(t),o=vb(t),r="fixed"===s,i=Ub(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=fb(0);if(n||!n&&!r)if(("body"!==yb(t)||Pb(o))&&(a=Rb(t)),n){const e=Ub(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=$b(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function qb(e,t){return kb(e)&&"fixed"!==Nb(e).position?t?t(e):e.offsetParent:null}function Kb(e,t){const s=xb(e);if(!kb(e)||Gb(e))return s;let n=qb(e,t);for(;n&&jb(n)&&"static"===Nb(n).position;)n=qb(n,t);return n&&("html"===yb(n)||"body"===yb(n)&&"static"===Nb(n).position&&!Tb(n))?s:n||function(e){let t=Db(e);for(;kb(t)&&!Ib(t);){if(Tb(t))return t;if(Eb(t))return null;t=Db(t)}return null}(e)||s}const Qb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:n,strategy:o}=e;const r="fixed"===o,i=vb(n),a=!!t&&Gb(t.floating);if(n===i||a&&r)return s;let l={scrollLeft:0,scrollTop:0},c=fb(1);const d=fb(0),u=kb(n);if((u||!u&&!r)&&(("body"!==yb(n)||Pb(i))&&(l=Rb(n)),kb(n))){const e=Ub(n);c=Fb(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}return{width:s.width*c.x,height:s.height*c.y,x:s.x*c.x-l.scrollLeft*c.x+d.x,y:s.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:vb,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:n,strategy:o}=e;const r=[..."clippingAncestors"===s?function(e,t){const s=t.get(e);if(s)return s;let n=Mb(e,[],!1).filter((e=>Sb(e)&&"body"!==yb(e))),o=null;const r="fixed"===Nb(e).position;let i=r?Db(e):e;for(;Sb(i)&&!Ib(i);){const t=Nb(i),s=Tb(i);s||"fixed"!==t.position||(o=null),(r?!s&&!o:!s&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Pb(i)&&!s&&Zb(e,i))?n=n.filter((e=>e!==i)):o=t,i=Db(i)}return t.set(e,n),n}(t,this._c):[].concat(s),n],i=r[0],a=r.reduce(((e,s)=>{const n=Wb(t,s,o);return e.top=hb(n.top,e.top),e.right=mb(n.right,e.right),e.bottom=mb(n.bottom,e.bottom),e.left=hb(n.left,e.left),e}),Wb(t,i,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Kb,getElementRects:async function(e){const t=this.getOffsetParent||Kb,s=this.getDimensions;return{reference:Yb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await s(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=Lb(e);return{width:t,height:s}},getScale:Fb,isElement:Sb,isRTL:function(e){return"rtl"===Nb(e).direction}};function Xb(e,t,s,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Ob(e),d=o||r?[...c?Mb(c):[],...Mb(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",s,{passive:!0}),r&&e.addEventListener("resize",s)}));const u=c&&a?function(e,t){let s,n=null;const o=vb(e);function r(){var e;clearTimeout(s),null==(e=n)||e.disconnect(),n=null}return function i(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:d,width:u,height:p}=e.getBoundingClientRect();if(a||t(),!u||!p)return;const m={rootMargin:-_b(d)+"px "+-_b(o.clientWidth-(c+u))+"px "+-_b(o.clientHeight-(d+p))+"px "+-_b(c)+"px",threshold:hb(0,mb(1,l))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return i();t?i(!1,t):s=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{n=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),r}(c,s):null;let p,m=-1,h=null;i&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),s()})),c&&!l&&h.observe(c),h.observe(t));let g=l?Ub(e):null;return l&&function t(){const n=Ub(e);!g||n.x===g.x&&n.y===g.y&&n.width===g.width&&n.height===g.height||s();g=n,p=requestAnimationFrame(t)}(),s(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",s),r&&e.removeEventListener("resize",s)})),null==u||u(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Jb=(e,t,s)=>{const n=new Map,o={platform:Qb,...s},r={...o.platform,_c:n};return(async(e,t,s)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:i}=s,a=r.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=ub(c,n,l),p=n,m={},h=0;for(let s=0;s<a.length;s++){const{name:r,fn:g}=a[s],{x:_,y:f,data:b,reset:y}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:m,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=_?_:d,u=null!=f?f:u,m={...m,[r]:{...m[r],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=ub(c,p,l))),s=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:m}})(e,t,{...o,platform:r})};var ey=s(1609);const ty=window.ReactDOM;var sy="undefined"!=typeof document?ey.useLayoutEffect:ey.useEffect;function ny(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let s,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(s=e.length,s!==t.length)return!1;for(n=s;0!=n--;)if(!ny(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),s=o.length,s!==Object.keys(t).length)return!1;for(n=s;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=s;0!=n--;){const s=o[n];if(("_owner"!==s||!e.$$typeof)&&!ny(e[s],t[s]))return!1}return!0}return e!=e&&t!=t}function oy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ry(e,t){const s=oy(e);return Math.round(t*s)/s}function iy(e){const t=ey.useRef(e);return sy((()=>{t.current=e})),t}const{useBlockElementRef:ay,cleanEmptyObject:ly}=$(g.privateApis);function cy({thread:e,calculatedOffset:t,setHeights:s,selectedThread:n,setBlockRef:o,commentLastUpdated:r}){const i=(0,p.useRef)();ay(e.blockClientId,i);const a=(0,p.useCallback)(((e,t)=>{s((s=>s[e]!==t?{...s,[e]:t}:s))}),[s]),{y:l,refs:c}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,u]=ey.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ey.useState(n);ny(p,n)||m(n);const[h,g]=ey.useState(null),[_,f]=ey.useState(null),b=ey.useCallback((e=>{e!==w.current&&(w.current=e,g(e))}),[]),y=ey.useCallback((e=>{e!==S.current&&(S.current=e,f(e))}),[]),x=r||h,v=i||_,w=ey.useRef(null),S=ey.useRef(null),k=ey.useRef(d),C=null!=l,P=iy(l),j=iy(o),E=ey.useCallback((()=>{if(!w.current||!S.current)return;const e={placement:t,strategy:s,middleware:p};j.current&&(e.platform=j.current),Jb(w.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!ny(k.current,t)&&(k.current=t,ty.flushSync((()=>{u(t)})))}))}),[p,t,s,j]);sy((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=ey.useRef(!1);sy((()=>(T.current=!0,()=>{T.current=!1})),[]),sy((()=>{if(x&&(w.current=x),v&&(S.current=v),x&&v){if(P.current)return P.current(x,v,E);E()}}),[x,v,E,P,C]);const B=ey.useMemo((()=>({reference:w,floating:S,setReference:b,setFloating:y})),[b,y]),I=ey.useMemo((()=>({reference:x,floating:v})),[x,v]),N=ey.useMemo((()=>{const e={position:s,left:0,top:0};if(!I.floating)return e;const t=ry(I.floating,d.x),n=ry(I.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...oy(I.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:t,top:n}}),[s,a,I.floating,d.x,d.y]);return ey.useMemo((()=>({...d,update:E,refs:B,elements:I,floatingStyles:N})),[d,E,B,I,N])}({placement:"right-start",middleware:[pb({crossAxis:t||-16})],whileElementsMounted:Xb});return(0,p.useEffect)((()=>{i.current&&c.setReference(i.current)}),[i,c,r]),(0,p.useEffect)((()=>{c.floating?.current&&o(e.id,i.current)}),[e.id,c.floating,o]),(0,p.useEffect)((()=>{if(c.floating?.current){const t=c.floating.current.scrollHeight;a(e.id,t)}}),[e.id,a,c.floating,n,r]),{blockRef:i,y:l,refs:c}}const{useBlockElement:dy}=$(g.privateApis);function uy({onSubmit:e,showCommentBoard:t,setShowCommentBoard:s,commentSidebarRef:n,reflowComments:o=Jf,isFloating:r=!1,y:i,refs:a}){const{clientId:l,blockCommentId:u}=(0,d.useSelect)((e=>{const{getSelectedBlock:t}=e(g.store),s=t();return{clientId:s?.clientId,blockCommentId:s?.attributes?.metadata?.noteId}}),[]),p=dy(l);return t&&l&&void 0===u?(0,c.jsxs)(Fn.__experimentalVStack,{className:hr("editor-collab-sidebar-panel__thread is-selected",{"is-floating":r}),spacing:"3",tabIndex:0,"aria-label":(0,fs.__)("New note"),role:"listitem",ref:r?a.setFloating:void 0,style:r?{top:i,opacity:i?void 0:0}:void 0,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)},children:[(0,c.jsx)(Fn.__experimentalHStack,{alignment:"left",spacing:"3",children:(0,c.jsx)(nb,{})}),(0,c.jsx)(ob,{onSubmit:async t=>{const{id:o}=await e({content:t});sb(o,n.current),s(!1)},onCancel:()=>{s(!1),p?.focus()},reflowComments:o,submitButtonText:(0,fs.__)("Add note"),labelText:(0,fs.__)("New note")})]}):null}const{useBlockElement:py}=$(g.privateApis),{Menu:my}=$(Fn.privateApis);function hy({threads:e,onEditComment:t,onAddReply:s,onCommentDelete:n,showCommentBoard:o,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l=!1,commentLastUpdated:u}){const[m,h]=(0,p.useState)({}),[_,f]=(0,p.useState)(null),[b,y]=(0,p.useState)({}),[x,v]=(0,p.useState)({}),{blockCommentId:w,selectedBlockClientId:S,orderedBlockIds:k}=(0,d.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:s}=e(g.store),n=s();return{blockCommentId:n?t(n)?.metadata?.noteId:null,selectedBlockClientId:n,orderedBlockIds:e(g.store).getBlockOrder()}}),[]),C=py(S),P=(0,p.useMemo)((()=>{const t=[...e],s=[];if(l&&o&&void 0===w){const e={id:"new-note-thread",blockClientId:S,content:{rendered:""}};return k.forEach((n=>{if(n===S)s.push(e);else{const e=t.find((e=>e.blockClientId===n));e&&s.push(e)}})),s}return t}),[e,l,o,w,S,k]),j=async e=>{const t=P.findIndex((t=>t.id===e.id)),s=P[t+1],o=P[t-1];if(await n(e),0!==e.parent)return f(e.parent),void sb(e.parent,i.current);s?(f(s.id),sb(s.id,i.current)):o?(f(o.id),sb(o.id,i.current)):(f(null),r(!1),C?.focus())};(0,p.useEffect)((()=>{f(w??void 0)}),[w]);const E=(0,p.useCallback)(((e,t)=>{v((s=>({...s,[e]:t})))}),[]);(0,p.useEffect)((()=>{const e=(()=>{const e={};if(!l)return e;const t=P.findIndex((e=>e.id===_)),s=-1===t?0:t,n=P[s];if(!n||!x[n.id])return e;let o=x[n.id],r=o?.getBoundingClientRect();const i=r?.top||0,a=m[n.id]||0;e[n.id]=-16;let c={threadTop:i-16,threadHeight:a};for(let t=s+1;t<P.length;t++){const s=P[t];if(!x[s.id])continue;o=x[s.id],r=o?.getBoundingClientRect();const n=r?.top||0,i=m[s.id]||0;let a=-16;const l=c.threadTop+c.threadHeight;n<l+16&&(a=l-n+20),e[s.id]=a,c={threadTop:n+a,threadHeight:i}}let d={threadTop:i-16};for(let s=t-1;s>=0;s--){const t=P[s];if(!x[t.id])continue;o=x[t.id],r=o?.getBoundingClientRect();const n=r?.top||0,i=m[t.id]||0;let a=-16;n+i>d.threadTop&&(a=d.threadTop-n-i-20),e[t.id]=a,d={threadTop:n+a}}return e})();Object.keys(e).length>0&&y(e)}),[m,x,l,P,_]);return Array.isArray(P)&&P.length>0||l?(0,c.jsxs)(c.Fragment,{children:[!l&&o&&void 0===w&&(0,c.jsx)(uy,{onSubmit:s,showCommentBoard:o,setShowCommentBoard:r,commentSidebarRef:i}),P.map((e=>(0,c.jsx)(gy,{thread:e,onAddReply:s,onCommentDelete:j,onEditComment:t,isSelected:_===e.id,setSelectedThread:f,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:b[e.id]??0,setHeights:h,setBlockRef:E,selectedThread:_,commentLastUpdated:u,showCommentBoard:o},e.id)))]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(uy,{onSubmit:s,showCommentBoard:o,setShowCommentBoard:r,commentSidebarRef:i}),(0,c.jsx)(Fn.__experimentalText,{as:"p",children:(0,fs.__)("No notes available.")}),(0,c.jsx)(Fn.__experimentalText,{as:"p",variant:"muted",children:(0,fs.__)("Only logged in users can see Notes.")})]})}function gy({thread:e,onEditComment:t,onAddReply:s,onCommentDelete:n,isSelected:o,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:u,setHeights:p,setBlockRef:h,setSelectedThread:_,selectedThread:f,commentLastUpdated:b,showCommentBoard:y}){const{toggleBlockHighlight:x,selectBlock:v,toggleBlockSpotlight:w}=$((0,d.useDispatch)(g.store)),S=py(e.blockClientId),k=(0,m.useDebounce)(x,50),{y:C,refs:P}=cy({thread:e,calculatedOffset:u,setHeights:p,setBlockRef:h,selectedThread:f,commentLastUpdated:b}),j=()=>{k(e.blockClientId,!0)},E=()=>{k(e.blockClientId,!1)},T=()=>{r(!1),_(e.id),e.blockClientId&&(v(e.blockClientId,null),w(e.blockClientId,!0))},B=()=>{_(null),r(!1),w(e.blockClientId,!1)},I=e?.reply||[],N=I.length>0?I[I.length-1]:void 0,R=I.length>0?I.slice(0,-1):[],D=function(e,t=10){if(!e)return"";const s=(0,fs._x)("words","Word count type. Do not translate!"),n=e.trim();let o="";if("words"===s)o=n.split(" ",t).join(" ");else if("characters_excluding_spaces"===s){const e=n.split("",t).join(""),s=e.length-e.replaceAll(" ","").length;o=n.split("",t+s).join("")}else"characters_including_spaces"===s&&(o=n.split("",t).join(""));return o!==n?o+"…":o}((0,Vc.__unstableStripHTML)(e.content?.rendered),10),A=e.blockClientId?(0,fs.sprintf)((0,fs.__)("Note: %s"),D):(0,fs.sprintf)((0,fs.__)("Original block deleted. Note: %s"),D);return"new-note-thread"===e.id&&y&&l?(0,c.jsx)(uy,{onSubmit:s,showCommentBoard:y,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l,y:C,refs:P}):(0,c.jsxs)(Fn.__experimentalVStack,{className:hr("editor-collab-sidebar-panel__thread",{"is-selected":o,"is-floating":l}),id:`comment-thread-${e.id}`,spacing:"3",onClick:T,onMouseEnter:j,onMouseLeave:E,onFocus:j,onBlur:E,onKeyDown:t=>{t.defaultPrevented||("Enter"===t.key&&t.currentTarget===t.target&&(o?B():T()),"Escape"===t.key&&(B(),sb(e.id,i.current)))},tabIndex:0,role:"listitem","aria-label":A,"aria-expanded":o,ref:l?P.setFloating:void 0,style:l?{top:C}:void 0,children:[(0,c.jsx)(Fn.Button,{className:"editor-collab-sidebar-panel__skip-to-comment",variant:"secondary",size:"compact",onClick:()=>{sb(e.id,i.current,"textarea")},children:(0,fs.__)("Add new note")}),!e.blockClientId&&(0,c.jsx)(Fn.__experimentalText,{as:"p",weight:500,variant:"muted",children:(0,fs.__)("Original block deleted.")}),(0,c.jsx)(_y,{thread:e,isExpanded:o,onEdit:(s={})=>{const{status:n}=s;t(s),"approved"===n&&(B(),sb(e.id,i.current))},onDelete:n,reflowComments:a}),o&&I.map((s=>(0,c.jsx)(_y,{thread:s,parent:e,isExpanded:o,onEdit:t,onDelete:n,reflowComments:a},s.id))),!o&&R.length>0&&(0,c.jsx)(Fn.__experimentalHStack,{className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:()=>{_(e.id),sb(e.id,i.current)},children:(0,fs.sprintf)((0,fs._n)("%s more reply","%s more replies",R.length),R.length)})}),!o&&N&&(0,c.jsx)(_y,{thread:N,parent:e,isExpanded:o,onEdit:t,onDelete:n,reflowComments:a}),o&&(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"2",children:[(0,c.jsx)(Fn.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:(0,c.jsx)(nb,{})}),(0,c.jsx)(Fn.__experimentalVStack,{spacing:"2",children:(0,c.jsx)(ob,{onSubmit:n=>{"approved"===e.status?t({id:e.id,status:"hold",content:n}):s({content:n,parent:e.id})},onCancel:t=>{t.stopPropagation(),B(),sb(e.id,i.current)},submitButtonText:"approved"===e.status?(0,fs.__)("Reopen & Reply"):(0,fs.__)("Reply"),rows:"approved"===e.status?2:4,labelText:(0,fs.sprintf)((0,fs.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),reflowComments:a})})]}),!!e.blockClientId&&(0,c.jsx)(Fn.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:e=>{e.stopPropagation(),S?.focus()},children:(0,fs.__)("Back to block")})]})}const _y=({thread:e,parent:t,isExpanded:s,onEdit:n,onDelete:o,reflowComments:r})=>{const[i,a]=(0,p.useState)(!1),[l,d]=(0,p.useState)(!1),u=()=>{a(!1),d(!1)},m="note"===e.type&&e.meta&&("resolved"===e.meta._wp_note_status||"reopen"===e.meta._wp_note_status),h=[{id:"edit",title:(0,fs.__)("Edit"),isEligible:({status:e})=>"approved"!==e,onClick:()=>{a("edit")}},{id:"reopen",title:(0,fs._x)("Reopen","Reopen note"),isEligible:({status:e})=>"approved"===e,onClick:()=>{n({id:e.id,status:"hold"})}},{id:"delete",title:(0,fs.__)("Delete"),isEligible:()=>!0,onClick:()=>{a("delete"),d(!0)}}],g=0===e.parent,_="approved"!==t?.status?h.filter((t=>t.isEligible(e))):[];return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"2",children:[(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:[(0,c.jsx)(nb,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),s&&(0,c.jsx)(Fn.FlexItem,{className:"editor-collab-sidebar-panel__comment-status",onClick:e=>{e.stopPropagation()},children:(0,c.jsxs)(Fn.__experimentalHStack,{spacing:"0",children:[g&&(0,c.jsx)(Fn.Button,{label:(0,fs._x)("Resolve","Mark note as resolved"),size:"small",icon:Sr,disabled:"approved"===e.status,accessibleWhenDisabled:"approved"===e.status,onClick:()=>{n({id:e.id,status:"approved"})}}),(0,c.jsxs)(my,{placement:"bottom-end",children:[(0,c.jsx)(my.TriggerButton,{render:(0,c.jsx)(Fn.Button,{size:"small",icon:o_,label:(0,fs.__)("Actions"),disabled:!_.length,accessibleWhenDisabled:!0})}),(0,c.jsx)(my.Popover,{children:_.map((e=>(0,c.jsx)(my.Item,{onClick:()=>e.onClick(),children:(0,c.jsx)(my.ItemLabel,{children:e.title})},e.id)))})]})]})})]}),"edit"===i?(0,c.jsx)(ob,{onSubmit:t=>{n({id:e.id,content:t}),a(!1)},onCancel:()=>u(),thread:e,submitButtonText:(0,fs._x)("Update","verb"),labelText:(0,fs.sprintf)((0,fs.__)("Edit note %1$s by %2$s"),e.id,e.author_name),reflowComments:r}):(0,c.jsx)(p.RawHTML,{className:hr("editor-collab-sidebar-panel__user-comment",{"editor-collab-sidebar-panel__resolution-text":m}),children:m?(()=>{const t="resolved"===e.meta._wp_note_status?(0,fs.__)("Marked as resolved"):(0,fs.__)("Reopened"),s=e?.content?.raw;return s&&"string"==typeof s&&""!==s.trim()?(0,fs.sprintf)((0,fs.__)("%1$s: %2$s"),t,s):t})():e?.content?.rendered}),"delete"===i&&(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:l,onConfirm:()=>{o(e),a(!1),d(!1)},onCancel:u,confirmButtonText:(0,fs.__)("Delete"),children:(0,fs.__)("Are you sure you want to delete this note? This will also delete all of this note's replies.")})]})};const{CommentIconSlotFill:fy}=$(g.privateApis);var by=({onClick:e})=>(0,c.jsx)(fy.Fill,{children:({onClose:t})=>(0,c.jsx)(Fn.MenuItem,{icon:qf,onClick:()=>{e(),t()},"aria-haspopup":"dialog",children:(0,fs.__)("Add note")})});const{CommentIconToolbarSlotFill:yy}=$(g.privateApis);var xy=({onClick:e,thread:t})=>{const s=(0,p.useMemo)((()=>{if(!t)return[];const e=new Map,s=[t,...t.reply];return s.sort(((e,t)=>new Date(e.date)-new Date(t.date))),s.forEach((t=>{t.author_name&&t.author_avatar_urls&&(e.has(t.author)||e.set(t.author,{name:t.author_name,avatar:t.author_avatar_urls?.[48]||t.author_avatar_urls?.[96],id:t.author,date:t.date}))})),Array.from(e.values())}),[t]);if(!s.length)return null;const n=s.slice(0,3),o=Math.max(0,s.length-3),r=s.length>100,i=r&&o>0?(0,fs.__)("100+"):(0,fs.sprintf)((0,fs.__)("+%s"),o),a=r&&o>0?(0,fs.__)("100+ participants"):(0,fs.sprintf)((0,fs._n)("+%s more participant","+%s more participants",o),o);return(0,c.jsx)(yy.Fill,{children:(0,c.jsx)(Fn.ToolbarButton,{className:"comment-avatar-indicator",label:(0,fs.__)("View notes"),onClick:e,showTooltip:!0,children:(0,c.jsxs)("div",{className:"comment-avatar-stack",children:[n.map(((e,t)=>(0,c.jsx)("img",{src:e.avatar,alt:e.name,className:"comment-avatar",style:{zIndex:3-t,borderColor:tb(e.id)}},e.id))),o>0&&(0,c.jsx)("div",{className:"comment-avatar-overflow",style:{zIndex:0},title:a,children:i})]})})})};function vy({showCommentBoard:e,setShowCommentBoard:t,styles:s,comments:n,commentSidebarRef:o,reflowComments:r,commentLastUpdated:i,isFloating:a=!1}){const{onCreate:l,onEdit:p,onDelete:m}=function(e=Jf){const{createNotice:t}=(0,d.useDispatch)(_s.store),{saveEntityRecord:s,deleteEntityRecord:n}=(0,d.useDispatch)(u.store),{getCurrentPostId:o}=(0,d.useSelect)(xc),{getBlockAttributes:r,getSelectedBlockClientId:i}=(0,d.useSelect)(g.store),{updateBlockAttributes:a}=(0,d.useDispatch)(g.store),l=e=>{const s=e.message&&"unknown_error"!==e.code?(0,Ln.decodeEntities)(e.message):(0,fs.__)("An error occurred while performing an update.");t("error",s,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:n,parent:c})=>{try{const l=await s("root","comment",{post:o(),content:n,status:"hold",type:"note",parent:c||0},{throwOnError:!0});if(!c&&l?.id){const e=i(),t=r(e)?.metadata;a(e,{metadata:{...t,noteId:l.id}})}return t("snackbar",c?(0,fs.__)("Reply added."):(0,fs.__)("Note added."),{type:"snackbar",isDismissible:!0}),setTimeout(e,300),l}catch(t){e(),l(t)}},onEdit:async({id:n,content:r,status:i})=>{const a=i||"updated",c={approved:(0,fs.__)("Note marked as resolved."),hold:(0,fs.__)("Note reopened."),updated:(0,fs.__)("Note updated.")};try{if("approved"===i||"hold"===i){await s("root","comment",{id:n,status:i},{throwOnError:!0});const e={post:o(),content:r||"",type:"note",status:i,parent:n,meta:{_wp_note_status:"approved"===i?"resolved":"reopen"}};await s("root","comment",e,{throwOnError:!0})}else{const e={id:n,content:r,status:i};await s("root","comment",e,{throwOnError:!0})}t("snackbar",c[a]??(0,fs.__)("Note updated."),{type:"snackbar",isDismissible:!0}),e()}catch(t){e(),l(t)}},onDelete:async s=>{try{if(await n("root","comment",s.id,void 0,{throwOnError:!0}),!s.parent){const e=i(),t=r(e)?.metadata;a(e,{metadata:ly({...t,noteId:void 0})})}t("snackbar",(0,fs.__)("Note deleted."),{type:"snackbar",isDismissible:!0}),e()}catch(t){e(),l(t)}}}}(r);return(0,c.jsx)(Fn.__experimentalVStack,{className:"editor-collab-sidebar-panel",style:s,role:"list",spacing:"3",justify:"flex-start",ref:e=>{e&&(o.current=e)},children:(0,c.jsx)(hy,{threads:n,onEditComment:p,onAddReply:l,onCommentDelete:m,showCommentBoard:e,setShowCommentBoard:t,commentSidebarRef:o,reflowComments:r,commentLastUpdated:i,isFloating:a})})}function wy({postId:e,mode:t}){const[s,n]=(0,p.useState)(!1),{getActiveComplementaryArea:o}=(0,d.useSelect)(Ea),{enableComplementaryArea:r}=(0,d.useDispatch)(Ea),i=(0,m.useViewportMatch)("medium"),a=(0,p.useRef)(null),l=i&&"post-only"===t,h=(0,d.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:s}=e(g.store),n=s();return n?t(n)?.metadata?.noteId:null}),[]),{resultComments:_,unresolvedSortedThreads:f,reflowComments:b,commentLastUpdated:y}=function(e){const[t,s]=(0,p.useReducer)((()=>Date.now()),0),n={post:e,type:"note",status:"all",per_page:-1},{records:o}=(0,u.useEntityRecords)("root","comment",n,{enabled:!!e&&"number"==typeof e}),{getBlockAttributes:r}=(0,d.useSelect)(g.store),{clientIds:i}=(0,d.useSelect)((e=>{const{getClientIdsWithDescendants:t}=e(g.store);return{clientIds:t()}}),[]),{resultComments:a,unresolvedSortedThreads:l}=(0,p.useMemo)((()=>{const e=i.reduce(((e,t)=>{const s=r(t)?.metadata?.noteId;return s&&(e[t]=s),e}),{}),t={},s=[],n=o??[];if(n.forEach((s=>{const n=Object.keys(e).find((t=>e[t]===s.id));t[s.id]={...s,reply:[],blockClientId:0===s.parent?n:null}})),n.forEach((e=>{0===e.parent?s.push(t[e.id]):t[e.parent]&&t[e.parent].reply.push(t[e.id])})),0===s?.length)return{resultComments:[],unresolvedSortedThreads:[]};const a=s.map((e=>({...e,reply:[...e.reply].reverse()}))),l=new Map(a.map((e=>[String(e.id),e]))),c=new Set(Object.values(e).map((e=>String(e)))),d=Object.values(e).map((e=>l.get(String(e)))).filter((e=>void 0!==e&&"hold"===e.status)),u=Object.values(e).map((e=>l.get(String(e)))).filter((e=>void 0!==e&&"approved"===e.status)),p=a.filter((e=>!c.has(String(e.id))));return{resultComments:[...d,...u,...p],unresolvedSortedThreads:d}}),[i,o,r]);return{resultComments:a,unresolvedSortedThreads:l,reflowComments:s,commentLastUpdated:t}}(e);!function(e=!1){const t=(0,d.useRegistry)();(0,p.useEffect)((()=>{if(!e)return;const{getActiveComplementaryArea:s}=t.select(Ea),{disableComplementaryArea:n,enableComplementaryArea:o}=t.dispatch(Ea),r=t.subscribe((()=>{null===s("core")&&o("core",Qf)}));return()=>{r(),s("core")===Qf&&n("core",Qf)}}),[e,t])}(l&&(f.length>0||s));const{merged:x}=Bi(),v=x?.styles?.color?.background,w=h?_.find((e=>e.id===h)):null;async function S(){const e=await o("core"),t=Xf.find((t=>t===e));"approved"===w?.status?r("core",Kf):t||r("core",l?Qf:Kf);const s=await o("core");Xf.includes(s)&&(n(!h),sb(h,a.current,h?void 0:"textarea"))}return(0,c.jsxs)(c.Fragment,{children:[h&&(0,c.jsx)(xy,{thread:w,onClick:S}),(0,c.jsx)(by,{onClick:S}),(0,c.jsx)(Bu,{identifier:Kf,name:Kf,title:(0,fs.__)("Notes"),icon:qf,closeLabel:(0,fs.__)("Close Notes"),children:(0,c.jsx)(vy,{comments:_,showCommentBoard:s,setShowCommentBoard:n,commentSidebarRef:a,reflowComments:b,commentLastUpdated:y})}),i&&(0,c.jsx)(Bu,{isPinnable:!1,header:!1,identifier:Qf,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:v,children:(0,c.jsx)(vy,{comments:f,showCommentBoard:s,setShowCommentBoard:n,commentSidebarRef:a,reflowComments:b,commentLastUpdated:y,styles:{backgroundColor:v},isFloating:!0})})]})}function Sy(){const{postId:e,mode:t}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getRenderingMode:s}=e(xc);return{postId:t(),mode:s()}}),[]);return e&&"number"==typeof e?(0,c.jsx)(Td,{supportKeys:"editor.notes",children:(0,c.jsx)(wy,{postId:e,mode:t})}):null}var ky=function({postType:e,postId:t,templateId:s,settings:n,children:o,initialEdits:r,onActionPerformed:i,extraContent:a,extraSidebarPanels:l,...p}){const{post:m,template:h,hasLoadedPost:g,error:_}=(0,d.useSelect)((n=>{const{getEntityRecord:o,getResolutionError:r,hasFinishedResolution:i}=n(u.store),a=["postType",e,t];return{post:o(...a),template:s?o("postType",B,s):void 0,hasLoadedPost:i("getEntityRecord",a),error:r("getEntityRecord",a)?.message}}),[e,t,s]);return(0,c.jsxs)(c.Fragment,{children:[g&&!m&&(0,c.jsx)(Fn.Notice,{status:_?"error":"warning",isDismissible:!1,children:_||(0,fs.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!m&&(0,c.jsxs)(Dl,{post:m,__unstableTemplate:h,settings:n,initialEdits:r,useSubRegistry:!1,children:[(0,c.jsx)(tf,{...p,children:a}),o,(0,c.jsx)(Sy,{}),(0,c.jsx)(Yf,{onActionPerformed:i,extraPanels:l})]})]})};const{PreferenceBaseOption:Cy}=$(C.privateApis);function Py(e){const t=(0,d.useSelect)((e=>e(xc).isPublishSidebarEnabled()),[]),{enablePublishSidebar:s,disablePublishSidebar:n}=(0,d.useDispatch)(xc);return(0,c.jsx)(Cy,{isChecked:t,onChange:e=>e?s():n(),...e})}const{BlockManager:jy}=$(g.privateApis),Ey=[];function Ty(){const{showBlockTypes:e,hideBlockTypes:t}=$((0,d.useDispatch)(xc)),{blockTypes:s,allowedBlockTypes:n,hiddenBlockTypes:o}=(0,d.useSelect)((e=>({blockTypes:e(x.store).getBlockTypes(),allowedBlockTypes:e(xc).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:e(C.store).get("core","hiddenBlockTypes")??Ey})),[]),r=(0,p.useMemo)((()=>!0===n?s:s.filter((({name:e})=>n?.includes(e)))),[n,s]).filter((e=>(0,x.hasBlockSupport)(e,"inserter",!0)&&(!e.parent||e.parent.includes("core/post-content")))),i=o.filter((e=>r.some((t=>t.name===e)))),a=r.filter((e=>!i.includes(e.name))),l=r.length-a.length;const u=s=>{if(a.length>s.length){const e=a.filter((e=>!s.find((({name:t})=>t===e.name))));t(e.map((({name:e})=>e)))}else if(a.length<s.length){const t=s.filter((e=>!a.find((({name:t})=>t===e.name))));e(t.map((({name:e})=>e)))}};return(0,c.jsxs)("div",{className:"editor-block-visibility",children:[!!l&&(0,c.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,fs.sprintf)((0,fs._n)("%d block is hidden.","%d blocks are hidden.",l),l),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:function(){u(r)},children:(0,fs.__)("Reset")})]}),(0,c.jsx)(jy,{blockTypes:r,selectedBlockTypes:a,onChange:u,showSelectAll:!1})]})}const{PreferencesModal:By,PreferencesModalTabs:Iy,PreferencesModalSection:Ny,PreferenceToggleControl:Ry}=$(C.privateApis);function Dy({extraSections:e={}}){const t=(0,m.useViewportMatch)("medium"),s=(0,d.useSelect)((e=>{const{getEditorSettings:s}=e(xc),{get:n}=e(C.store),o=s().richEditingEnabled;return!n("core","distractionFree")&&t&&o}),[t]),{setIsListViewOpened:n,setIsInserterOpened:o}=(0,d.useDispatch)(xc),{set:r}=(0,d.useDispatch)(C.store),i=(0,p.useMemo)((()=>[{name:"general",tabLabel:(0,fs.__)("General"),content:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Ny,{title:(0,fs.__)("Interface"),children:[(0,c.jsx)(Ry,{scope:"core",featureName:"showListViewByDefault",help:(0,fs.__)("Opens the List View panel by default."),label:(0,fs.__)("Always open List View")}),s&&(0,c.jsx)(Ry,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,fs.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,fs.__)("Show block breadcrumbs")}),(0,c.jsx)(Ry,{scope:"core",featureName:"allowRightClickOverrides",help:(0,fs.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,fs.__)("Allow right-click contextual menus")}),(0,c.jsx)(Ry,{scope:"core",featureName:"enableChoosePatternModal",help:(0,fs.__)("Shows starter patterns when creating a new page."),label:(0,fs.__)("Show starter patterns")})]}),(0,c.jsxs)(Ny,{title:(0,fs.__)("Document settings"),description:(0,fs.__)("Select what settings are shown in the document panel."),children:[(0,c.jsx)(du.Slot,{}),(0,c.jsx)(ch,{taxonomyWrapper:(e,t)=>(0,c.jsx)(iu,{label:t.labels.menu_name,panelName:`taxonomy-panel-${t.slug}`})}),(0,c.jsx)(hp,{children:(0,c.jsx)(iu,{label:(0,fs.__)("Featured image"),panelName:"featured-image"})}),(0,c.jsx)(np,{children:(0,c.jsx)(iu,{label:(0,fs.__)("Excerpt"),panelName:"post-excerpt"})}),(0,c.jsx)(Td,{supportKeys:["comments","trackbacks"],children:(0,c.jsx)(iu,{label:(0,fs.__)("Discussion"),panelName:"discussion-panel"})}),(0,c.jsx)(Ed,{children:(0,c.jsx)(iu,{label:(0,fs.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,c.jsx)(Ny,{title:(0,fs.__)("Publishing"),children:(0,c.jsx)(Py,{help:(0,fs.__)("Review settings, such as visibility and tags."),label:(0,fs.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,fs.__)("Appearance"),content:(0,c.jsxs)(Ny,{title:(0,fs.__)("Appearance"),description:(0,fs.__)("Customize the editor interface to suit your needs."),children:[(0,c.jsx)(Ry,{scope:"core",featureName:"fixedToolbar",onToggle:()=>r("core","distractionFree",!1),help:(0,fs.__)("Access all block and document tools in a single place."),label:(0,fs.__)("Top toolbar")}),(0,c.jsx)(Ry,{scope:"core",featureName:"distractionFree",onToggle:()=>{r("core","fixedToolbar",!0),o(!1),n(!1)},help:(0,fs.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,fs.__)("Distraction free")}),(0,c.jsx)(Ry,{scope:"core",featureName:"focusMode",help:(0,fs.__)("Highlights the current block and fades other content."),label:(0,fs.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,fs.__)("Accessibility"),content:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ny,{title:(0,fs.__)("Navigation"),description:(0,fs.__)("Optimize the editing experience for enhanced control."),children:(0,c.jsx)(Ry,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,fs.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,fs.__)("Contain text cursor inside block")})}),(0,c.jsx)(Ny,{title:(0,fs.__)("Interface"),children:(0,c.jsx)(Ry,{scope:"core",featureName:"showIconLabels",label:(0,fs.__)("Show button text labels"),help:(0,fs.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,fs.__)("Blocks"),content:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ny,{title:(0,fs.__)("Inserter"),children:(0,c.jsx)(Ry,{scope:"core",featureName:"mostUsedBlocks",help:(0,fs.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,fs.__)("Show most used blocks")})}),(0,c.jsx)(Ny,{title:(0,fs.__)("Manage block visibility"),description:(0,fs.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,c.jsx)(Ty,{})})]})},window.__experimentalMediaProcessing&&{name:"media",tabLabel:(0,fs.__)("Media"),content:(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(Ny,{title:(0,fs.__)("General"),description:(0,fs.__)("Customize options related to the media upload flow."),children:[(0,c.jsx)(Ry,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,fs.__)("Compress media items before uploading to the server."),label:(0,fs.__)("Pre-upload compression")}),(0,c.jsx)(Ry,{scope:"core/media",featureName:"requireApproval",help:(0,fs.__)("Require approval step when optimizing existing media."),label:(0,fs.__)("Approval step")})]})})}].filter(Boolean)),[s,e,o,n,r,t]);return(0,c.jsx)(Iy,{sections:i})}var Ay=function({postType:e}){const{registerPostTypeSchema:t}=$((0,d.useDispatch)(xc));(0,p.useEffect)((()=>{t(e)}),[t,e]);const{fields:s}=(0,d.useSelect)((t=>{const{getEntityFields:s}=$(t(xc));return{fields:s("postType",e)}}),[e]);return s};const My="content";var Ly={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:s,bindings:n}){const o=s["pattern/overrides"],{getBlockAttributes:r}=e(g.store),i=r(t),a={};for(const e of Object.keys(n)){const t=o?.[i?.metadata?.name]?.[e];void 0!==t?a[e]=""===t?void 0:t:a[e]=i[e]}return a},setValues({select:e,dispatch:t,clientId:s,bindings:n}){const{getBlockAttributes:o,getBlockParentsByBlockName:r,getBlocks:i}=e(g.store),a=o(s),l=a?.metadata?.name;if(!l)return;const[c]=r(s,"core/block",!0),d=Object.entries(n).reduce(((e,[t,{newValue:s}])=>(e[t]=s,e)),{});if(!c){const e=s=>{for(const n of s)n.attributes?.metadata?.name===l&&t(g.store).updateBlockAttributes(n.clientId,d),e(n.innerBlocks)};return void e(i())}const u=o(c)?.[My];t(g.store).updateBlockAttributes(c,{[My]:{...u,[l]:{...u?.[l],...Object.entries(d).reduce(((e,[t,s])=>(e[t]=void 0===s?"":s,e)),{})}}})},canUserEditValue:()=>!0};const Oy=["core/navigation-link","core/navigation-submenu"];function Fy(e,t,s){const{getEditedEntityRecord:n}=e(u.store),{getBlockAttributes:o,getBlockName:r}=e(g.store);let i,a;const l=r?.(s);let c,d;if(Oy.includes(l)){const e=o?.(s);c=e?.id,d=e?.type}else c=t?.postId,d=t?.postType;return d&&c&&(i=n("postType",d,c),a={date:{label:(0,fs.__)("Post Date"),value:i?.date,type:"string"},modified:{label:(0,fs.__)("Post Modified Date"),value:i?.modified,type:"string"},link:{label:(0,fs.__)("Post Link"),value:i?.link,type:"string"}}),Object.keys(a||{}).length?a:null}var Vy={name:"core/post-data",getValues({select:e,context:t,bindings:s,clientId:n}){const o=Fy(e,t,n),r={};for(const[e,t]of Object.entries(s)){const s=t.args.field,{value:n,label:i}=o?.[s]||{};r[e]=n??i??s}return r},setValues({dispatch:e,context:t,bindings:s,clientId:n,select:o}){const{getBlockName:r}=o(g.store),i=r?.(n);if(Oy.includes(i))return!1;const a={};Object.values(s).forEach((({args:e,newValue:t})=>{a[e.field]=t})),e(u.store).editEntityRecord("postType",t?.postType,t?.postId,a)},canUserEditValue({select:e,context:t,args:s}){const{getBlockName:n,getSelectedBlockClientId:o}=e(g.store),r=o(),i=n?.(r);if(Oy.includes(i))return!1;if(t?.query||t?.queryId)return!1;if(!t?.postType)return!1;const a=Fy(e,t,void 0)?.[s.field]?.value;if(void 0===a)return!1;return!!e(u.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId})},getFieldsList({select:e,context:t}){const s=e(g.store).getSelectedBlock();if("core/post-date"!==s?.name)return[];if(Oy.includes(s?.name))return[];const n=e(g.store).getSelectedBlockClientId(),o=Fy(e,t,n);return o?Object.entries(o).map((([e,t])=>({label:t.label,type:t.type,args:{field:e}}))):[]}};function zy(e,t){const{getEditedEntityRecord:s}=e(u.store),{getRegisteredPostMeta:n}=$(e(u.store));let o;t?.postType&&t?.postId&&(o=s("postType",t?.postType,t?.postId).meta);const r=n(t?.postType),i={};return Object.entries(r||{}).forEach((([e,t])=>{"footnotes"!==e&&"_"!==e.charAt(0)&&(i[e]={label:t.title||e,value:o?.[e]??(t.default||void 0),type:t.type})})),Object.keys(i||{}).length?i:null}var Uy={name:"core/post-meta",getValues({select:e,context:t,bindings:s}){const n=zy(e,t),o={};for(const[e,t]of Object.entries(s)){const s=t.args.key,{value:r,label:i}=n?.[s]||{};o[e]=r??i??s}return o},setValues({dispatch:e,context:t,bindings:s}){const n={};Object.values(s).forEach((({args:e,newValue:t})=>{n[e.key]=t})),e(u.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:n})},canUserEditValue({select:e,context:t,args:s}){if(t?.query||t?.queryId)return!1;if(!t?.postType)return!1;const n=zy(e,t)?.[s.key]?.value;if(void 0===n)return!1;if(e(xc).getEditorSettings().enableCustomFields)return!1;return!!e(u.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId})},getFieldsList({select:e,context:t}){const s=zy(e,t);return s?Object.entries(s).map((([e,t])=>({label:t.label,type:t.type,args:{key:e}}))):[]}};const Hy=["core/navigation-link","core/navigation-submenu"];function Gy(e,t){return{id:{label:(0,fs.__)("Term ID"),value:t,type:"string"},name:{label:(0,fs.__)("Name"),value:e?.name,type:"string"},slug:{label:(0,fs.__)("Slug"),value:e?.slug,type:"string"},link:{label:(0,fs.__)("Link"),value:e?.link,type:"string"},description:{label:(0,fs.__)("Description"),value:e?.description,type:"string"},parent:{label:(0,fs.__)("Parent ID"),value:e?.parent,type:"string"},count:{label:(0,fs.__)("Count"),value:`(${e?.count??0})`,type:"string"}}}function $y(e,t,s){const{getEntityRecord:n}=e(u.store),{getBlockAttributes:o,getBlockName:r}=e(g.store);let i,a;const l=r?.(s);let c,d;if(Hy.includes(l)){const e=o?.(s);c=e?.id;const t=e?.type;d="tag"===t?"post_tag":t}else c=t?.termId,d=t?.taxonomy;return d&&c?(i=n("taxonomy",d,c),!i&&t?.termData&&(i=t.termData),i&&(a=Gy(i,c))):t?.termData&&(i=t.termData,a=Gy(i,i?.term_id)),a&&Object.keys(a).length?a:null}var Wy={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:s,clientId:n}){const o=$y(e,t,n),r={};for(const[e,t]of Object.entries(s)){const s=t.args.field,{value:n,label:i}=o?.[s]||{};r[e]=n??i??s}return r},setValues:({dispatch:e,context:t,bindings:s})=>!1,canUserEditValue({select:e,context:t,args:s}){const{getBlockName:n,getSelectedBlockClientId:o}=e(g.store),r=o(),i=n?.(r);if(Hy.includes(i))return!1;if(t?.termQuery)return!1;if(!t?.taxonomy||!t?.termId)return!1;$y(e,t,void 0)?.[s.field];return!1},getFieldsList({select:e,context:t}){const s=e(g.store).getSelectedBlockClientId(),n=$y(e,t,s);return n?Object.entries(n).map((([e,t])=>({label:t.label,type:t.type,args:{field:e}}))):[]}};const{store:Zy,...Yy}=i,qy={};function Ky(e,t,s){const{registerEntityAction:n}=$((0,d.dispatch)(xc))}function Qy(e,t,s){const{unregisterEntityAction:n}=$((0,d.dispatch)(xc))}function Xy(e,t,s){const{registerEntityField:n}=$((0,d.dispatch)(xc))}function Jy(e,t,s){const{unregisterEntityField:n}=$((0,d.dispatch)(xc))}G(qy,{CreateTemplatePartModal:no,patternTitleField:oi,templateTitleField:ei,BackButton:Qg,EntitiesSavedStatesExtensible:yd,Editor:ky,EditorContentSlotFill:Wg,GlobalStylesProvider:function({children:e}){const t=Bi();return t.isReady?(0,c.jsx)(ji.Provider,{value:t,children:e}):null},mergeBaseAndUserConfigs:Ti,PluginPostExcerpt:ap,PostCardPanel:_f,PreferencesModal:function({extraSections:e={}}){const t=(0,d.useSelect)((e=>e(Ea).isModalActive("editor/preferences")),[]),{closeModal:s}=(0,d.useDispatch)(Ea);return t?(0,c.jsx)(By,{closeModal:s,children:(0,c.jsx)(Dy,{extraSections:e})}):null},usePostActions:lf,usePostFields:Ay,ToolsMoreMenuGroup:d_,ViewMoreMenuGroup:m_,ResizableEditor:V_,registerCoreBlockBindingsSources:function(){(0,x.registerBlockBindingsSource)(Ly),(0,x.registerBlockBindingsSource)(Vy),(0,x.registerBlockBindingsSource)(Uy),(0,x.registerBlockBindingsSource)(Wy)},getTemplateInfo:Y,interfaceStore:Zy,...Yy})})(),(window.wp=window.wp||{}).editor=n})();
\ No newline at end of file
+function Ci(e){return"[object Object]"===Object.prototype.toString.call(e)}function Pi(e){var t,s;return!1!==Ci(e)&&(void 0===(t=e.constructor)||!1!==Ci(s=t.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}const{GlobalStylesContext:ji,cleanEmptyObject:Ei}=$(g.privateApis);function Ti(e,t){return ki()(e,t,{isMergeableObject:Pi,customMerge:e=>{if("backgroundImage"===e)return(e,t)=>t}})}function Bi(){const[e,t,s]=function(){const{globalStylesId:e,isReady:t,settings:s,styles:n,_links:o}=(0,d.useSelect)((e=>{const{getEntityRecord:t,getEditedEntityRecord:s,hasFinishedResolution:n,canUser:o}=e(u.store),r=e(u.store).__experimentalGetCurrentGlobalStylesId();let i;const a=r?o("update",{kind:"root",name:"globalStyles",id:r}):null;r&&"boolean"==typeof a&&(i=a?s("root","globalStyles",r):t("root","globalStyles",r,{context:"view"}));let l=!1;return n("__experimentalGetCurrentGlobalStylesId")&&(l=!r||(a?n("getEditedEntityRecord",["root","globalStyles",r]):n("getEntityRecord",["root","globalStyles",r,{context:"view"}]))),{globalStylesId:r,isReady:l,settings:i?.settings,styles:i?.styles,_links:i?._links}}),[]),{getEditedEntityRecord:r}=(0,d.useSelect)(u.store),{editEntityRecord:i}=(0,d.useDispatch)(u.store);return[t,(0,p.useMemo)((()=>({settings:s??{},styles:n??{},_links:o??{}})),[s,n,o]),(0,p.useCallback)(((t,s={})=>{const n=r("root","globalStyles",e),o="function"==typeof t?t({styles:n?.styles??{},settings:n?.settings??{},_links:n?._links??{}}):t;i("root","globalStyles",e,{styles:Ei(o.styles)||{},settings:Ei(o.settings)||{},_links:Ei(o._links)||{}},s)}),[e,i,r])]}(),[n,o]=function(){const e=(0,d.useSelect)((e=>e(u.store).__experimentalGetCurrentThemeBaseGlobalStyles()),[]);return[!!e,e]}(),r=(0,p.useMemo)((()=>o&&t?Ti(o,t):{}),[t,o]);return(0,p.useMemo)((()=>({isReady:e&&n,user:t,base:o,merged:r,setUserConfig:s})),[r,t,o,s,e,n])}const Ii={};function Ni(e){const{RECEIVE_INTERMEDIATE_RESULTS:t}=$(u.privateApis),{getEntityRecords:s}=e(u.store);return s("postType","wp_block",{per_page:-1,[t]:!0})}const Ri=["__experimentalBlockBindingsSupportedAttributes","__experimentalBlockDirectory","__experimentalDiscussionSettings","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","alignWide","blockInspectorTabs","maxUploadFileSize","allowedMimeTypes","bodyPlaceholder","canLockBlocks","canUpdateBlockBindings","capabilities","clearBlockSelection","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomSpacingSizes","disableCustomGradients","disableLayoutStyles","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","enableOpenverseMediaCategory","fontSizes","gradients","generateAnchors","onNavigateToEntityRecord","imageDefaultSize","imageDimensions","imageEditing","imageSizes","isPreviewMode","isRTL","locale","maxWidth","postContentAttributes","postsPerPage","readOnly","styles","titlePlaceholder","supportsLayout","widgetTypesToHideFromLegacyWidgetBlock","__unstableHasCustomAppender","__unstableResolvedAssets","__unstableIsBlockBasedTheme"],{globalStylesDataKey:Di,globalStylesLinksDataKey:Ai,selectBlockPatternsKey:Mi,reusableBlocksSelectKey:Li,sectionRootClientIdKey:Oi,mediaEditKey:Fi}=$(g.privateApis);var Vi=function(e,t,s,n){const o=(0,m.useViewportMatch)("medium"),{allowRightClickOverrides:r,blockTypes:i,focusMode:a,hasFixedToolbar:l,isDistractionFree:c,keepCaretInsideBlock:h,hasUploadPermissions:_,hiddenBlockTypes:f,canUseUnfilteredHTML:b,userCanCreatePages:y,pageOnFront:v,pageForPosts:w,userPatternCategories:S,restBlockPatternCategories:k,sectionRootClientId:P}=(0,d.useSelect)((e=>{const{canUser:r,getRawEntityRecord:i,getEntityRecord:a,getUserPatternCategories:l,getBlockPatternCategories:c}=e(u.store),{get:d}=e(C.store),{getBlockTypes:p}=e(x.store),{getBlocksByName:m,getBlockAttributes:h}=e(g.store),_=r("read",{kind:"root",name:"site"})?a("root","site"):void 0;return{allowRightClickOverrides:d("core","allowRightClickOverrides"),blockTypes:p(),canUseUnfilteredHTML:i("postType",t,s)?._links?.hasOwnProperty("wp:action-unfiltered-html"),focusMode:d("core","focusMode"),hasFixedToolbar:d("core","fixedToolbar")||!o,hiddenBlockTypes:d("core","hiddenBlockTypes"),isDistractionFree:d("core","distractionFree"),keepCaretInsideBlock:d("core","keepCaretInsideBlock"),hasUploadPermissions:r("create",{kind:"postType",name:"attachment"})??!0,userCanCreatePages:r("create",{kind:"postType",name:"page"}),pageOnFront:_?.page_on_front,pageForPosts:_?.page_for_posts,userPatternCategories:l(),restBlockPatternCategories:c(),sectionRootClientId:"template-locked"===n?m("core/post-content")?.[0]??"":m("core/group").find((e=>"main"===h(e)?.tagName))??""}}),[t,s,o,n]),{merged:j}=Bi(),E=j.styles??Ii,T=j._links??Ii,B=e.__experimentalAdditionalBlockPatterns??e.__experimentalBlockPatterns,I=e.__experimentalAdditionalBlockPatternCategories??e.__experimentalBlockPatternCategories,N=(0,p.useMemo)((()=>[...B||[]].filter((({postTypes:e})=>!e||Array.isArray(e)&&e.includes(t)))),[B,t]),R=(0,p.useMemo)((()=>[...I||[],...k||[]].filter(((e,t,s)=>t===s.findIndex((t=>e.name===t.name))))),[I,k]),{undo:D,setIsInserterOpened:A}=(0,d.useDispatch)(wc),{editMediaEntity:M}=$((0,d.useDispatch)(u.store)),{saveEntityRecord:L}=(0,d.useDispatch)(u.store),O=(0,p.useCallback)((e=>y?L("postType","page",e):Promise.reject({message:(0,fs.__)("You do not have permission to create Pages.")})),[L,y]),F=(0,p.useMemo)((()=>{if(f&&f.length>0){return(!0===e.allowedBlockTypes?i.map((({name:e})=>e)):e.allowedBlockTypes||[]).filter((e=>!f.includes(e)))}return e.allowedBlockTypes}),[e.allowedBlockTypes,f,i]),V=!1===e.focusMode;return(0,p.useMemo)((()=>{const s={...Object.fromEntries(Object.entries(e).filter((([e])=>Ri.includes(e)))),[Di]:E,[Ai]:T,allowedBlockTypes:F,allowRightClickOverrides:r,focusMode:a&&!V,hasFixedToolbar:l,isDistractionFree:c,keepCaretInsideBlock:h,[Fi]:_?M:void 0,mediaUpload:_?xi:void 0,mediaSideload:_?wi:void 0,__experimentalBlockPatterns:N,[Mi]:e=>{const{hasFinishedResolution:s,getBlockPatternsForPostType:n}=$(e(u.store)),o=n(t);return s("getBlockPatterns")?o:void 0},[Li]:Ni,__experimentalBlockPatternCategories:R,__experimentalUserPatternCategories:S,__experimentalFetchLinkSuggestions:(t,s)=>(0,u.__experimentalFetchLinkSuggestions)(t,s,e),inserterMediaCategories:ui,__experimentalFetchRichUrlData:u.__experimentalFetchUrlData,__experimentalCanUserUseUnfilteredHTML:b,__experimentalUndo:D,outlineMode:!c&&"wp_template"===t,__experimentalCreatePageEntity:O,__experimentalUserCanCreatePages:y,pageOnFront:v,pageForPosts:w,__experimentalPreferPatternsOnRoot:"wp_template"===t,templateLock:"wp_navigation"===t?"insert":e.templateLock,template:"wp_navigation"===t?[["core/navigation",{},[]]]:e.template,__experimentalSetIsInserterOpened:A,[Oi]:P,editorTool:"post-only"===n&&"wp_template"!==t?"edit":void 0};return s}),[F,r,a,V,l,c,h,e,_,S,N,R,b,D,O,y,v,w,t,A,P,E,T,n,M])};const Ui=["core/post-title","core/post-featured-image","core/post-content"];function Hi(){const e=(0,p.useMemo)((()=>[...(0,h.applyFilters)("editor.postContentBlockTypes",Ui)]),[]),t=(0,d.useSelect)((t=>{const{getPostBlocksByName:s}=$(t(wc));return s(e)}),[e]);return t}function zi(){const e=Hi(),{templateParts:t}=(0,d.useSelect)((e=>{const{getBlocksByName:t}=e(g.store);return{templateParts:t("core/template-part")}}),[]),s=(0,d.useSelect)((e=>{const{getBlockOrder:s}=e(g.store);return t.flatMap((e=>s(e)))}),[t]),n=(0,d.useRegistry)();return(0,p.useEffect)((()=>{const{setBlockEditingMode:e,unsetBlockEditingMode:t}=n.dispatch(g.store);return e("","disabled"),()=>{t("")}}),[n]),(0,p.useEffect)((()=>{const{setBlockEditingMode:t,unsetBlockEditingMode:s}=n.dispatch(g.store);return n.batch((()=>{for(const s of e)t(s,"contentOnly")})),()=>{n.batch((()=>{for(const t of e)s(t)}))}}),[e,n]),(0,p.useEffect)((()=>{const{setBlockEditingMode:e,unsetBlockEditingMode:s}=n.dispatch(g.store);return n.batch((()=>{for(const s of t)e(s,"contentOnly")})),()=>{n.batch((()=>{for(const e of t)s(e)}))}}),[t,n]),(0,p.useEffect)((()=>{const{setBlockEditingMode:e,unsetBlockEditingMode:t}=n.dispatch(g.store);return n.batch((()=>{for(const t of s)e(t,"disabled")})),()=>{n.batch((()=>{for(const e of s)t(e)}))}}),[s,n]),null}function Gi(){const e=(0,d.useSelect)((e=>e(g.store).getBlockOrder()?.[0]),[]),{setBlockEditingMode:t,unsetBlockEditingMode:s}=(0,d.useDispatch)(g.store);(0,p.useEffect)((()=>{if(e)return t(e,"contentOnly"),()=>{s(e)}}),[e,s,t])}const $i=["wp_block","wp_template","wp_template_part"];var Wi=(0,c.jsxs)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,c.jsx)(L.Path,{d:"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z"}),(0,c.jsx)(L.Path,{d:"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z"})]}),Zi=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z"})}),Yi=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.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"})}),qi=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"})}),Ki=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"})}),Qi=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"})}),Xi=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})}),Ji=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})}),ea=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z"})}),ta=(0,c.jsxs)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,c.jsx)(L.Path,{d:"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z"}),(0,c.jsx)(L.Path,{d:"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z"})]}),sa=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})}),na=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z"})});const oa=window.wp.commands;var ra=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})}),ia=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"})});const aa=window.wp.viewport,la=window.wp.plugins;var ca=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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 da(e){return["core/edit-post","core/edit-site"].includes(e)?(k()(`${e} interface scope`,{alternative:"core interface scope",hint:"core/edit-post and core/edit-site are merging.",version:"6.6"}),"core"):e}function ua(e,t){return"core"===e&&"edit-site/template"===t?(k()("edit-site/template sidebar",{alternative:"edit-post/document",version:"6.6"}),"edit-post/document"):"core"===e&&"edit-site/block-inspector"===t?(k()("edit-site/block-inspector sidebar",{alternative:"edit-post/block",version:"6.6"}),"edit-post/block"):t}const pa=(e,t)=>({type:"SET_DEFAULT_COMPLEMENTARY_AREA",scope:e=da(e),area:t=ua(e,t)}),ma=(e,t)=>({registry:s,dispatch:n})=>{if(!t)return;e=da(e),t=ua(e,t);s.select(C.store).get(e,"isComplementaryAreaVisible")||s.dispatch(C.store).set(e,"isComplementaryAreaVisible",!0),n({type:"ENABLE_COMPLEMENTARY_AREA",scope:e,area:t})},ha=e=>({registry:t})=>{e=da(e);t.select(C.store).get(e,"isComplementaryAreaVisible")&&t.dispatch(C.store).set(e,"isComplementaryAreaVisible",!1)},ga=(e,t)=>({registry:s})=>{if(!t)return;e=da(e),t=ua(e,t);const n=s.select(C.store).get(e,"pinnedItems");!0!==n?.[t]&&s.dispatch(C.store).set(e,"pinnedItems",{...n,[t]:!0})},_a=(e,t)=>({registry:s})=>{if(!t)return;e=da(e),t=ua(e,t);const n=s.select(C.store).get(e,"pinnedItems");s.dispatch(C.store).set(e,"pinnedItems",{...n,[t]:!1})};function fa(e,t){return function({registry:s}){k()("dispatch( 'core/interface' ).toggleFeature",{since:"6.0",alternative:"dispatch( 'core/preferences' ).toggle"}),s.dispatch(C.store).toggle(e,t)}}function ba(e,t,s){return function({registry:n}){k()("dispatch( 'core/interface' ).setFeatureValue",{since:"6.0",alternative:"dispatch( 'core/preferences' ).set"}),n.dispatch(C.store).set(e,t,!!s)}}function ya(e,t){return function({registry:s}){k()("dispatch( 'core/interface' ).setFeatureDefaults",{since:"6.0",alternative:"dispatch( 'core/preferences' ).setDefaults"}),s.dispatch(C.store).setDefaults(e,t)}}function xa(e){return{type:"OPEN_MODAL",name:e}}function va(){return{type:"CLOSE_MODAL"}}const wa=(0,d.createRegistrySelector)((e=>(t,s)=>{s=da(s);const n=e(C.store).get(s,"isComplementaryAreaVisible");if(void 0!==n)return!1===n?null:t?.complementaryAreas?.[s]})),Sa=(0,d.createRegistrySelector)((e=>(t,s)=>{s=da(s);const n=e(C.store).get(s,"isComplementaryAreaVisible"),o=t?.complementaryAreas?.[s];return n&&void 0===o})),ka=(0,d.createRegistrySelector)((e=>(t,s,n)=>{n=ua(s=da(s),n);const o=e(C.store).get(s,"pinnedItems");return o?.[n]??!0})),Ca=(0,d.createRegistrySelector)((e=>(t,s,n)=>(k()("select( 'core/interface' ).isFeatureActive( scope, featureName )",{since:"6.0",alternative:"select( 'core/preferences' ).get( scope, featureName )"}),!!e(C.store).get(s,n))));function Pa(e,t){return e.activeModal===t}var ja=(0,d.combineReducers)({complementaryAreas:function(e={},t){switch(t.type){case"SET_DEFAULT_COMPLEMENTARY_AREA":{const{scope:s,area:n}=t;return e[s]?e:{...e,[s]:n}}case"ENABLE_COMPLEMENTARY_AREA":{const{scope:s,area:n}=t;return{...e,[s]:n}}}return e},activeModal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e}});const Ea=(0,d.createReduxStore)("core/interface",{reducer:ja,actions:o,selectors:r});function Ta({as:e=Fn.Button,scope:t,identifier:s,icon:n,selectedIcon:o,name:r,shortcut:i,...a}){const l=e,u=(0,la.usePluginContext)(),p=n||u.icon,m=s||`${u.name}/${r}`,h=(0,d.useSelect)((e=>e(Ea).getActiveComplementaryArea(t)===m),[m,t]),{enableComplementaryArea:g,disableComplementaryArea:_}=(0,d.useDispatch)(Ea);return(0,c.jsx)(l,{icon:o&&h?o:p,"aria-controls":m.replace("/",":"),"aria-checked":(f=a.role,["checkbox","option","radio","switch","menuitemcheckbox","menuitemradio","treeitem"].includes(f)?h:void 0),onClick:()=>{h?_(t):g(t,m)},shortcut:i,...a});var f}(0,d.register)(Ea);var Ba=({children:e,className:t,toggleButtonProps:s})=>{const n=(0,c.jsx)(Ta,{icon:ca,...s});return(0,c.jsxs)("div",{className:hr("components-panel__header","interface-complementary-area-header",t),tabIndex:-1,children:[e,n]})};const Ia=()=>{};function Na({name:e,as:t=Fn.Button,onClick:s,...n}){return(0,c.jsx)(Fn.Fill,{name:e,children:({onClick:e})=>(0,c.jsx)(t,{onClick:s||e?(...t)=>{(s||Ia)(...t),(e||Ia)(...t)}:void 0,...n})})}Na.Slot=function({name:e,as:t=Fn.MenuGroup,fillProps:s={},bubblesVirtually:n,...o}){return(0,c.jsx)(Fn.Slot,{name:e,bubblesVirtually:n,fillProps:s,children:e=>{if(!p.Children.toArray(e).length)return null;const s=[];p.Children.forEach(e,(({props:{__unstableExplicitMenuItem:e,__unstableTarget:t}})=>{t&&e&&s.push(t)}));const n=p.Children.map(e,(e=>!e.props.__unstableExplicitMenuItem&&s.includes(e.props.__unstableTarget)?null:e));return(0,c.jsx)(t,{...o,children:n})}})};var Ra=Na;const Da=({__unstableExplicitMenuItem:e,__unstableTarget:t,...s})=>(0,c.jsx)(Fn.MenuItem,{...s});function Aa({scope:e,target:t,__unstableExplicitMenuItem:s,...n}){return(0,c.jsx)(Ta,{as:n=>(0,c.jsx)(Ra,{__unstableExplicitMenuItem:s,__unstableTarget:`${e}/${t}`,as:Da,name:`${e}/plugin-more-menu`,...n}),role:"menuitemcheckbox",selectedIcon:Zn,name:t,scope:e,...n})}function Ma({scope:e,...t}){return(0,c.jsx)(Fn.Fill,{name:`PinnedItems/${e}`,...t})}Ma.Slot=function({scope:e,className:t,...s}){return(0,c.jsx)(Fn.Slot,{name:`PinnedItems/${e}`,...s,children:e=>e?.length>0&&(0,c.jsx)("div",{className:hr(t,"interface-pinned-items"),children:e})})};var La=Ma;const Oa={open:{width:280},closed:{width:0},mobileOpen:{width:"100vw"}};function Fa({activeArea:e,isActive:t,scope:s,children:n,className:o,id:r}){const i=(0,m.useReducedMotion)(),a=(0,m.useViewportMatch)("medium","<"),l=(0,m.usePrevious)(e),d=(0,m.usePrevious)(t),[,u]=(0,p.useState)({});(0,p.useEffect)((()=>{u({})}),[t]);const h={type:"tween",duration:i||a||l&&e&&e!==l?0:.3,ease:[.6,0,.4,1]};return(0,c.jsx)(Fn.Fill,{name:`ComplementaryArea/${s}`,children:(0,c.jsx)(Fn.__unstableAnimatePresence,{initial:!1,children:(d||t)&&(0,c.jsx)(Fn.__unstableMotion.div,{variants:Oa,initial:"closed",animate:a?"mobileOpen":"open",exit:"closed",transition:h,className:"interface-complementary-area__fill",children:(0,c.jsx)("div",{id:r,className:o,style:{width:a?"100vw":280},children:n})})})})}function Va({children:e,className:t,closeLabel:s=(0,fs.__)("Close plugin"),identifier:n,header:o,headerClassName:r,icon:i,isPinnable:a=!0,panelClassName:l,scope:u,name:h,title:g,toggleShortcut:_,isActiveByDefault:f}){const b=(0,la.usePluginContext)(),y=i||b.icon,x=n||`${b.name}/${h}`,[v,w]=(0,p.useState)(!1),{isLoading:S,isActive:k,isPinned:P,activeArea:j,isSmall:E,isLarge:T,showIconLabels:B}=(0,d.useSelect)((e=>{const{getActiveComplementaryArea:t,isComplementaryAreaLoading:s,isItemPinned:n}=e(Ea),{get:o}=e(C.store),r=t(u);return{isLoading:s(u),isActive:r===x,isPinned:n(u,x),activeArea:r,isSmall:e(aa.store).isViewportMatch("< medium"),isLarge:e(aa.store).isViewportMatch("large"),showIconLabels:o("core","showIconLabels")}}),[x,u]),I=(0,m.useViewportMatch)("medium","<");!function(e,t,s,n,o){const r=(0,p.useRef)(!1),i=(0,p.useRef)(!1),{enableComplementaryArea:a,disableComplementaryArea:l}=(0,d.useDispatch)(Ea);(0,p.useEffect)((()=>{n&&o&&!r.current?(l(e),i.current=!0):i.current&&!o&&r.current?(i.current=!1,a(e,t)):i.current&&s&&s!==t&&(i.current=!1),o!==r.current&&(r.current=o)}),[n,o,e,t,s,l,a])}(u,x,j,k,E);const{enableComplementaryArea:N,disableComplementaryArea:R,pinItem:D,unpinItem:A}=(0,d.useDispatch)(Ea);if((0,p.useEffect)((()=>{f&&void 0===j&&!E?N(u,x):void 0===j&&E&&R(u,x),w(!0)}),[j,f,u,x,E,N,R]),v)return(0,c.jsxs)(c.Fragment,{children:[a&&(0,c.jsx)(La,{scope:u,children:P&&(0,c.jsx)(Ta,{scope:u,identifier:x,isPressed:k&&(!B||T),"aria-expanded":k,"aria-disabled":S,label:g,icon:B?Zn:y,showTooltip:!B,variant:B?"tertiary":void 0,size:"compact",shortcut:_})}),h&&a&&(0,c.jsx)(Aa,{target:h,scope:u,icon:y,identifier:x,children:g}),(0,c.jsxs)(Fa,{activeArea:j,isActive:k,className:hr("interface-complementary-area",t),scope:u,id:x.replace("/",":"),children:[(0,c.jsx)(Ba,{className:r,closeLabel:s,onClose:()=>R(u),toggleButtonProps:{label:s,size:"compact",shortcut:_,scope:u,identifier:x},children:o||(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("h2",{className:"interface-complementary-area-header__title",children:g}),a&&!I&&(0,c.jsx)(Fn.Button,{className:"interface-complementary-area__pin-unpin-item",icon:P?ra:ia,label:P?(0,fs.__)("Unpin from toolbar"):(0,fs.__)("Pin to toolbar"),onClick:()=>(P?A:D)(u,x),isPressed:P,"aria-expanded":P,size:"compact"})]})}),(0,c.jsx)(Fn.Panel,{className:l,children:e})]})]})}Va.Slot=function({scope:e,...t}){return(0,c.jsx)(Fn.Slot,{name:`ComplementaryArea/${e}`,...t})};var Ua=Va;var Ha=({isActive:e})=>((0,p.useEffect)((()=>{let e=!1;return document.body.classList.contains("sticky-menu")&&(e=!0,document.body.classList.remove("sticky-menu")),()=>{e&&document.body.classList.add("sticky-menu")}}),[]),(0,p.useEffect)((()=>(e?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode"),()=>{e&&document.body.classList.remove("is-fullscreen-mode")})),[e]),null);const za=(0,p.forwardRef)((({children:e,className:t,ariaLabel:s,as:n="div",...o},r)=>(0,c.jsx)(n,{ref:r,className:hr("admin-ui-navigable-region",t),"aria-label":s,role:"region",tabIndex:"-1",...o,children:e})));za.displayName="NavigableRegion";var Ga=za;const $a={type:"tween",duration:.25,ease:[.6,0,.4,1]};const Wa={hidden:{opacity:1,marginTop:-60},visible:{opacity:1,marginTop:0},distractionFreeHover:{opacity:1,marginTop:0,transition:{...$a,delay:.2,delayChildren:.2}},distractionFreeHidden:{opacity:0,marginTop:-60},distractionFreeDisabled:{opacity:0,marginTop:0,transition:{...$a,delay:.8,delayChildren:.8}}};var Za=(0,p.forwardRef)((function({isDistractionFree:e,footer:t,header:s,editorNotices:n,sidebar:o,secondarySidebar:r,content:i,actions:a,labels:l,className:d},u){const[h,g]=(0,m.useResizeObserver)(),_=(0,m.useViewportMatch)("medium","<"),f={type:"tween",duration:(0,m.useReducedMotion)()?0:.25,ease:[.6,0,.4,1]};!function(e){(0,p.useEffect)((()=>{const t=document&&document.querySelector(`html:not(.${e})`);if(t)return t.classList.toggle(e),()=>{t.classList.toggle(e)}}),[e])}("interface-interface-skeleton__html-container");const b={...{header:(0,fs._x)("Header","header landmark area"),body:(0,fs.__)("Content"),secondarySidebar:(0,fs.__)("Block Library"),sidebar:(0,fs._x)("Settings","settings landmark area"),actions:(0,fs.__)("Publish"),footer:(0,fs.__)("Footer")},...l};return(0,c.jsxs)("div",{ref:u,className:hr(d,"interface-interface-skeleton",!!t&&"has-footer"),children:[(0,c.jsxs)("div",{className:"interface-interface-skeleton__editor",children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{initial:!1,children:!!s&&(0,c.jsx)(Ga,{as:Fn.__unstableMotion.div,className:"interface-interface-skeleton__header","aria-label":b.header,initial:e&&!_?"distractionFreeHidden":"hidden",whileHover:e&&!_?"distractionFreeHover":"visible",animate:e&&!_?"distractionFreeDisabled":"visible",exit:e&&!_?"distractionFreeHidden":"hidden",variants:Wa,transition:f,children:s})}),e&&(0,c.jsx)("div",{className:"interface-interface-skeleton__header",children:n}),(0,c.jsxs)("div",{className:"interface-interface-skeleton__body",children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{initial:!1,children:!!r&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__secondary-sidebar",ariaLabel:b.secondarySidebar,as:Fn.__unstableMotion.div,initial:"closed",animate:"open",exit:"closed",variants:{open:{width:g.width},closed:{width:0}},transition:f,children:(0,c.jsxs)(Fn.__unstableMotion.div,{style:{position:"absolute",width:_?"100vw":"fit-content",height:"100%",left:0},variants:{open:{x:0},closed:{x:"-100%"}},transition:f,children:[h,r]})})}),(0,c.jsx)(Ga,{className:"interface-interface-skeleton__content",ariaLabel:b.body,children:i}),!!o&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__sidebar",ariaLabel:b.sidebar,children:o}),!!a&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__actions",ariaLabel:b.actions,children:a})]})]}),!!t&&(0,c.jsx)(Ga,{className:"interface-interface-skeleton__footer",ariaLabel:b.footer,children:t})]})}));const{RenamePatternModal:Ya}=$(lo.privateApis),qa="editor/pattern-rename";function Ka(){const{record:e,postType:t}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(wc),{getEditedEntityRecord:n}=e(u.store),o=t();return{record:n("postType",o,s()),postType:o}}),[]),{closeModal:s}=(0,d.useDispatch)(Ea);return(0,d.useSelect)((e=>e(Ea).isModalActive(qa)))&&t===N?(0,c.jsx)(Ya,{onClose:s,pattern:e}):null}const{DuplicatePatternModal:Qa}=$(lo.privateApis),Xa="editor/pattern-duplicate";function Ja(){const{record:e,postType:t}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(wc),{getEditedEntityRecord:n}=e(u.store),o=t();return{record:n("postType",o,s()),postType:o}}),[]),{closeModal:s}=(0,d.useDispatch)(Ea);return(0,d.useSelect)((e=>e(Ea).isModalActive(Xa)))&&t===N?(0,c.jsx)(Qa,{onClose:s,onSuccess:()=>s(),pattern:e}):null}const{BlockRemovalWarningModal:el}=$(g.privateApis),tl=["core/post-content","core/post-template","core/query"],sl=[{postTypes:["wp_template","wp_template_part"],callback(e){if(e.filter((({name:e})=>tl.includes(e))).length)return(0,fs._n)("Deleting this block will stop your post or page content from displaying on this template. It is not recommended.","Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.",e.length)}},{postTypes:["wp_block"],callback(e){if(e.filter((({attributes:e})=>e?.metadata?.bindings&&Object.values(e.metadata.bindings).some((e=>"core/pattern-overrides"===e.source)))).length)return(0,fs._n)("The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?","Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?",e.length)}}];function nl(){const e=(0,d.useSelect)((e=>e(wc).getCurrentPostType()),[]),t=(0,p.useMemo)((()=>sl.filter((t=>t.postTypes.includes(e)))),[e]);return el&&t?(0,c.jsx)(el,{rules:t}):null}function ol({blockPatterns:e,onChoosePattern:t}){const{editEntityRecord:s}=(0,d.useDispatch)(u.store),{postType:n,postId:o}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(wc);return{postType:t(),postId:s()}}),[]);return(0,c.jsx)(g.__experimentalBlockPatternsList,{blockPatterns:e,onClickPattern:(e,r)=>{s("postType",n,o,{blocks:r,content:({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e)}),t()}})}function rl({onClose:e}){const[t,s]=(0,p.useState)(!0),{set:n}=(0,d.useDispatch)(C.store),o=function(){const{blockPatternsWithPostContentBlockType:e,postType:t}=(0,d.useSelect)((e=>{const{getPatternsByBlockTypes:t,getBlocksByName:s}=e(g.store),{getCurrentPostType:n,getRenderingMode:o}=e(wc);return{blockPatternsWithPostContentBlockType:t("core/post-content","post-only"===o()?"":s("core/post-content")?.[0]),postType:n()}}),[]);return(0,p.useMemo)((()=>e?.length?e.filter((e=>"page"===t&&!e.postTypes||Array.isArray(e.postTypes)&&e.postTypes.includes(t))):[]),[t,e])}();if(!(o.length>0))return null;function r(){e(),n("core","enableChoosePatternModal",t)}return(0,c.jsxs)(Fn.Modal,{className:"editor-start-page-options__modal",title:(0,fs.__)("Choose a pattern"),isFullScreen:!0,onRequestClose:r,children:[(0,c.jsx)("div",{className:"editor-start-page-options__modal-content",children:(0,c.jsx)(ol,{blockPatterns:o,onChoosePattern:r})}),(0,c.jsx)(Fn.Flex,{className:"editor-start-page-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.ToggleControl,{__nextHasNoMarginBottom:!0,checked:t,label:(0,fs.__)("Show starter patterns"),help:(0,fs.__)("Shows starter patterns when creating a new page."),onChange:e=>{s(e)}})})})]})}function il(){const[e,t]=(0,p.useState)(!1),{isEditedPostDirty:s,isEditedPostEmpty:n}=(0,d.useSelect)(wc),{isModalActive:o}=(0,d.useSelect)(Ea),{enabled:r,postId:i}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(wc),n=e(C.store).get("core","enableChoosePatternModal");return{postId:t(),enabled:n&&B!==s()}}),[]);return(0,p.useEffect)((()=>{const e=!s()&&n(),i=o("editor/preferences");r&&e&&!i&&t(!0)}),[r,i,s,n,o]),e?(0,c.jsx)(rl,{onClose:()=>t(!1)}):null}const al=window.wp.keyboardShortcuts,ll=[{keyCombination:{modifier:"primary",character:"b"},description:(0,fs.__)("Make the selected text bold.")},{keyCombination:{modifier:"primary",character:"i"},description:(0,fs.__)("Make the selected text italic.")},{keyCombination:{modifier:"primary",character:"k"},description:(0,fs.__)("Convert the selected text into a link.")},{keyCombination:{modifier:"primaryShift",character:"k"},description:(0,fs.__)("Remove a link.")},{keyCombination:{character:"[["},description:(0,fs.__)("Insert a link to a post or page.")},{keyCombination:{modifier:"primary",character:"u"},description:(0,fs.__)("Underline the selected text.")},{keyCombination:{modifier:"access",character:"d"},description:(0,fs.__)("Strikethrough the selected text.")},{keyCombination:{modifier:"access",character:"x"},description:(0,fs.__)("Make the selected text inline code.")},{keyCombination:{modifier:"access",character:"0"},aliases:[{modifier:"access",character:"7"}],description:(0,fs.__)("Convert the current heading to a paragraph.")},{keyCombination:{modifier:"access",character:"1-6"},description:(0,fs.__)("Convert the current paragraph or heading to a heading of level 1 to 6.")},{keyCombination:{modifier:"primaryShift",character:"SPACE"},description:(0,fs.__)("Add non breaking space.")}],cl=window.wp.keycodes;function dl({keyCombination:e,forceAriaLabel:t}){const s=e.modifier?cl.displayShortcutList[e.modifier](e.character):e.character,n=e.modifier?cl.shortcutAriaLabel[e.modifier](e.character):e.character;return(0,c.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key-combination","aria-label":t||n,children:(Array.isArray(s)?s:[s]).map(((e,t)=>"+"===e?(0,c.jsx)(p.Fragment,{children:e},t):(0,c.jsx)("kbd",{className:"editor-keyboard-shortcut-help-modal__shortcut-key",children:e},t)))})}var ul=function({description:e,keyCombination:t,aliases:s=[],ariaLabel:n}){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-description",children:e}),(0,c.jsxs)("div",{className:"editor-keyboard-shortcut-help-modal__shortcut-term",children:[(0,c.jsx)(dl,{keyCombination:t,forceAriaLabel:n}),s.map(((e,t)=>(0,c.jsx)(dl,{keyCombination:e,forceAriaLabel:n},t)))]})]})};var pl=function({name:e}){const{keyCombination:t,description:s,aliases:n}=(0,d.useSelect)((t=>{const{getShortcutKeyCombination:s,getShortcutDescription:n,getShortcutAliases:o}=t(al.store);return{keyCombination:s(e),aliases:o(e),description:n(e)}}),[e]);return t?(0,c.jsx)(ul,{keyCombination:t,description:s,aliases:n}):null};const ml="editor/keyboard-shortcut-help",hl=({shortcuts:e})=>(0,c.jsx)("ul",{className:"editor-keyboard-shortcut-help-modal__shortcut-list",role:"list",children:e.map(((e,t)=>(0,c.jsx)("li",{className:"editor-keyboard-shortcut-help-modal__shortcut",children:"string"==typeof e?(0,c.jsx)(pl,{name:e}):(0,c.jsx)(ul,{...e})},t)))}),gl=({title:e,shortcuts:t,className:s})=>(0,c.jsxs)("section",{className:hr("editor-keyboard-shortcut-help-modal__section",s),children:[!!e&&(0,c.jsx)("h2",{className:"editor-keyboard-shortcut-help-modal__section-title",children:e}),(0,c.jsx)(hl,{shortcuts:t})]}),_l=({title:e,categoryName:t,additionalShortcuts:s=[]})=>{const n=(0,d.useSelect)((e=>e(al.store).getCategoryShortcuts(t)),[t]);return(0,c.jsx)(gl,{title:e,shortcuts:n.concat(s)})};var fl=function(){const e=(0,d.useSelect)((e=>e(Ea).isModalActive(ml)),[]),{openModal:t,closeModal:s}=(0,d.useDispatch)(Ea),n=()=>{e?s():t(ml)};return(0,al.useShortcut)("core/editor/keyboard-shortcuts",n),e?(0,c.jsxs)(Fn.Modal,{className:"editor-keyboard-shortcut-help-modal",title:(0,fs.__)("Keyboard shortcuts"),closeButtonLabel:(0,fs.__)("Close"),onRequestClose:n,children:[(0,c.jsx)(gl,{className:"editor-keyboard-shortcut-help-modal__main-shortcuts",shortcuts:["core/editor/keyboard-shortcuts"]}),(0,c.jsx)(_l,{title:(0,fs.__)("Global shortcuts"),categoryName:"global"}),(0,c.jsx)(_l,{title:(0,fs.__)("Selection shortcuts"),categoryName:"selection"}),(0,c.jsx)(_l,{title:(0,fs.__)("Block shortcuts"),categoryName:"block",additionalShortcuts:[{keyCombination:{character:"/"},description:(0,fs.__)("Change the block type after adding a new paragraph."),ariaLabel:(0,fs.__)("Forward-slash")}]}),(0,c.jsx)(gl,{title:(0,fs.__)("Text formatting"),shortcuts:ll}),(0,c.jsx)(_l,{title:(0,fs.__)("List View shortcuts"),categoryName:"list-view"})]}):null};function bl({clientId:e,onClose:t}){const s=Hi(),{entity:n,onNavigateToEntityRecord:o,canEditTemplates:r}=(0,d.useSelect)((t=>{const{getBlockParentsByBlockName:n,getSettings:o,getBlockAttributes:r,getBlockParents:i}=t(g.store),{getCurrentTemplateId:a,getRenderingMode:l}=t(wc),c=n(e,"core/block",!0)[0];let d;if(c?d=t(u.store).getEntityRecord("postType","wp_block",r(c).ref):"template-locked"!==l()||i(e).some((e=>s.includes(e)))||(d=t(u.store).getEntityRecord("postType","wp_template",a())),!d)return{};return{canEditTemplates:t(u.store).canUser("create",{kind:"postType",name:"wp_template"}),entity:d,onNavigateToEntityRecord:o().onNavigateToEntityRecord}}),[e,s]);if(!n)return(0,c.jsx)(yl,{clientId:e,onClose:t});const i="wp_block"===n.type;let a=i?(0,fs.__)("Edit the pattern to move, delete, or make further changes to this block."):(0,fs.__)("Edit the template to move, delete, or make further changes to this block.");return r||(a=(0,fs.__)("Only users with permissions to edit the template can move or delete this block")),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__unstableBlockSettingsMenuFirstItem,{children:(0,c.jsx)(Fn.MenuItem,{onClick:()=>{o({postId:n.id,postType:n.type})},disabled:!r,children:i?(0,fs.__)("Edit pattern"):(0,fs.__)("Edit template")})}),(0,c.jsx)(Fn.__experimentalText,{variant:"muted",as:"p",className:"editor-content-only-settings-menu__description",children:a})]})}function yl({clientId:e,onClose:t}){const{contentLockingParent:s}=(0,d.useSelect)((t=>{const{getContentLockingParent:s}=$(t(g.store));return{contentLockingParent:s(e)}}),[e]),n=(0,g.useBlockDisplayInformation)(s),o=(0,d.useDispatch)(g.store);if(!n?.title)return null;const{modifyContentLockBlock:r}=$(o);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__unstableBlockSettingsMenuFirstItem,{children:(0,c.jsx)(Fn.MenuItem,{onClick:()=>{r(s),t()},children:(0,fs._x)("Unlock","Unlock content locked blocks")})}),(0,c.jsx)(Fn.__experimentalText,{variant:"muted",as:"p",className:"editor-content-only-settings-menu__description",children:(0,fs.__)("Temporarily unlock the parent block to edit, delete or make further changes to this block.")})]})}function xl(){return(0,c.jsx)(g.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>1===e.length&&(0,c.jsx)(bl,{clientId:e[0],onClose:t})})}function vl(e){const{slug:t,patterns:s}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(wc),{getEntityRecord:n,getBlockPatterns:o}=e(u.store),r=s();return{slug:n("postType",t(),r).slug,patterns:o()}}),[]),n=(0,d.useSelect)((e=>e(u.store).getCurrentTheme().stylesheet));return(0,p.useMemo)((()=>[{name:"fallback",blocks:(0,x.parse)(e),title:(0,fs.__)("Fallback content")},...s.filter((e=>Array.isArray(e.templateTypes)&&e.templateTypes.some((e=>t.startsWith(e))))).map((e=>({...e,blocks:(0,x.parse)(e.content).map((e=>function(e){return e.innerBlocks.find((e=>"core/template-part"===e.name))&&(e.innerBlocks=e.innerBlocks.map((e=>("core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=n),e)))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=n),e}(e)))})))]),[e,t,s])}function wl({fallbackContent:e,onChoosePattern:t,postType:s}){const[,,n]=(0,u.useEntityBlockEditor)("postType",s),o=vl(e);return(0,c.jsx)(g.__experimentalBlockPatternsList,{blockPatterns:o,onClickPattern:(e,s)=>{n(s,{selection:void 0}),t()}})}function Sl({slug:e,isCustom:t,onClose:s,postType:n}){const o=function(e,t=!1){return(0,d.useSelect)((s=>{const{getEntityRecord:n,getDefaultTemplateId:o}=s(u.store),r=o({slug:e,is_custom:t,ignore_empty:!0});return r?n("postType",B,r)?.content?.raw:void 0}),[e,t])}(e,t);return o?(0,c.jsxs)(Fn.Modal,{className:"editor-start-template-options__modal",title:(0,fs.__)("Choose a pattern"),closeLabel:(0,fs.__)("Cancel"),focusOnMount:"firstElement",onRequestClose:s,isFullScreen:!0,children:[(0,c.jsx)("div",{className:"editor-start-template-options__modal-content",children:(0,c.jsx)(wl,{fallbackContent:o,slug:e,isCustom:t,postType:n,onChoosePattern:()=>{s()}})}),(0,c.jsx)(Fn.Flex,{className:"editor-start-template-options__modal__actions",justify:"flex-end",expanded:!1,children:(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:s,children:(0,fs.__)("Skip")})})})]}):null}function kl(){const[e,t]=(0,p.useState)(!1),{shouldOpenModal:s,slug:n,isCustom:o,postType:r,postId:i}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(wc),n=t(),o=s(),{getEditedEntityRecord:r,hasEditsForEntityRecord:i}=e(u.store),a=r("postType",n,o);return{shouldOpenModal:!i("postType",n,o)&&""===a.content&&B===n,slug:a.slug,isCustom:a.is_custom,postType:n,postId:o}}),[]);return(0,p.useEffect)((()=>{t(!1)}),[r,i]),!s||e?null:(0,c.jsx)(Sl,{slug:n,isCustom:o,postType:r,onClose:()=>t(!0)})}function Cl(){const e=(0,d.useSelect)((e=>{const{richEditingEnabled:t,codeEditingEnabled:s}=e(wc).getEditorSettings();return!t||!s}),[]),{getBlockSelectionStart:t}=(0,d.useSelect)(g.store),{getActiveComplementaryArea:s}=(0,d.useSelect)(Ea),{enableComplementaryArea:n,disableComplementaryArea:o}=(0,d.useDispatch)(Ea),{redo:r,undo:i,savePost:a,setIsListViewOpened:l,switchEditorMode:c,toggleDistractionFree:u}=(0,d.useDispatch)(wc),{isEditedPostDirty:p,isPostSavingLocked:m,isListViewOpened:h,getEditorMode:_}=(0,d.useSelect)(wc);return(0,al.useShortcut)("core/editor/toggle-mode",(()=>{c("visual"===_()?"text":"visual")}),{isDisabled:e}),(0,al.useShortcut)("core/editor/toggle-distraction-free",(()=>{u()})),(0,al.useShortcut)("core/editor/undo",(e=>{i(),e.preventDefault()})),(0,al.useShortcut)("core/editor/redo",(e=>{r(),e.preventDefault()})),(0,al.useShortcut)("core/editor/save",(e=>{e.preventDefault(),m()||p()&&a()})),(0,al.useShortcut)("core/editor/toggle-list-view",(e=>{h()||(e.preventDefault(),l(!0))})),(0,al.useShortcut)("core/editor/toggle-sidebar",(e=>{e.preventDefault();if(["edit-post/document","edit-post/block"].includes(s("core")))o("core");else{const e=t()?"edit-post/block":"edit-post/document";n("core",e)}})),null}function Pl({clientId:e,onClose:t}){const{getBlocks:s}=(0,d.useSelect)(g.store),{replaceBlocks:n}=(0,d.useDispatch)(g.store);return(0,d.useSelect)((t=>t(g.store).canRemoveBlock(e)),[e])?(0,c.jsx)(Fn.MenuItem,{onClick:()=>{n(e,s(e)),t()},children:(0,fs.__)("Detach")}):null}function jl({clientIds:e,blocks:t}){const[s,n]=(0,p.useState)(!1),{replaceBlocks:o}=(0,d.useDispatch)(g.store),{createSuccessNotice:r}=(0,d.useDispatch)(_s.store),{isBlockBasedTheme:i,canCreate:a}=(0,d.useSelect)((e=>({isBlockBasedTheme:e(u.store).getCurrentTheme()?.is_block_theme,canCreate:e(g.store).canInsertBlockType("core/template-part")})),[]);if(!i||!a)return null;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuItem,{icon:U,onClick:()=>{n(!0)},"aria-expanded":s,"aria-haspopup":"dialog",children:(0,fs.__)("Create template part")}),s&&(0,c.jsx)(no,{closeModal:()=>{n(!1)},blocks:t,onCreate:async t=>{o(e,(0,x.createBlock)("core/template-part",{slug:t.slug,theme:t.theme})),r((0,fs.__)("Template part created."),{type:"snackbar"})}})]})}function El(){return(0,c.jsx)(g.BlockSettingsMenuControls,{children:({selectedClientIds:e,onClose:t})=>(0,c.jsx)(Tl,{clientIds:e,onClose:t})})}function Tl({clientIds:e,onClose:t}){const{blocks:s}=(0,d.useSelect)((t=>{const{getBlocksByClientId:s}=t(g.store);return{blocks:s(e)}}),[e]);return 1===s.length&&"core/template-part"===s[0]?.name?(0,c.jsx)(Pl,{clientId:e[0],onClose:t}):(0,c.jsx)(jl,{clientIds:e,blocks:s})}const{ExperimentalBlockEditorProvider:Bl}=$(g.privateApis),{PatternsMenuItems:Il}=$(lo.privateApis),Nl=()=>{},Rl=["wp_block","wp_navigation","wp_template_part"];const Dl=ii((({post:e,settings:t,recovery:s,initialEdits:n,children:o,BlockEditorProviderComponent:r=Bl,__unstableTemplate:i})=>{const a=!!i,{editorSettings:l,selection:m,isReady:_,mode:f,defaultMode:b,postTypeEntities:y}=(0,d.useSelect)((t=>{const{getEditorSettings:s,getEditorSelection:n,getRenderingMode:o,__unstableIsEditorReady:r,getDefaultRenderingMode:i}=$(t(wc)),{getEntitiesConfig:l}=t(u.store),c=o(),d=i(e.type),p="template-locked"===d?a:void 0!==d,m=void 0!==d;return{editorSettings:s(),isReady:r(),mode:m?c:void 0,defaultMode:p?d:void 0,selection:n(),postTypeEntities:"wp_template"===e.type?l("postType"):null}}),[e.type,a]),v=a&&"post-only"!==f,w=v?i:e,S=(0,p.useMemo)((()=>{const t={};if("wp_template"===e.type){if("page"===e.slug)t.postType="page";else if("single"===e.slug)t.postType="post";else if("single"===e.slug.split("-")[0]){const s=y?.map((e=>e.name))||[],n=e.slug.match(`^single-(${s.join("|")})(?:-.+)?$`);n&&(t.postType=n[1])}}else Rl.includes(w.type)&&!v||(t.postId=e.id,t.postType=e.type);return{...t,templateSlug:"wp_template"===w.type?w.slug:void 0}}),[v,e.id,e.type,e.slug,w.type,w.slug,y]),{id:k,type:P}=w,j=Vi(l,P,k,f),[E,T,R]=function(e,t,s){const n="template-locked"===s?"template":"post",[o,r,i]=(0,u.useEntityBlockEditor)("postType",e.type,{id:e.id}),[a,l,c]=(0,u.useEntityBlockEditor)("postType",t?.type,{id:t?.id}),d=(0,p.useMemo)((()=>{if("wp_navigation"===e.type)return[(0,x.createBlock)("core/navigation",{ref:e.id,templateLock:!1})]}),[e.type,e.id]),m=(0,p.useMemo)((()=>d||("template"===n?a:o)),[d,n,a,o]);return t&&"template-locked"===s||"wp_navigation"===e.type?[m,Nl,Nl]:[m,"post"===n?r:l,"post"===n?i:c]}(e,i,f),{updatePostLock:D,setupEditor:A,updateEditorSettings:M,setCurrentTemplateId:L,setEditedPost:O,setRenderingMode:F}=$((0,d.useDispatch)(wc)),{createWarningNotice:V,removeNotice:U}=(0,d.useDispatch)(_s.store);return(0,p.useLayoutEffect)((()=>{s||(D(t.postLock),A(e,n,t.template),t.autosave&&V((0,fs.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:(0,fs.__)("View the autosave"),url:t.autosave.editLink}]}))}),[]),(0,p.useEffect)((()=>{O(e.type,e.id),U("template-activate-notice")}),[e.type,e.id,O,U]),(0,p.useEffect)((()=>{M(t)}),[t,M]),(0,p.useEffect)((()=>{L(i?.id)}),[i?.id,L]),(0,p.useEffect)((()=>{b&&F(b)}),[b,F]),function(e,t){(0,p.useEffect)((()=>((0,h.addFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter",((s,n)=>!(!$i.includes(e)&&"core/template-part"===n.name&&"post-only"===t)&&s)),(0,h.addFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter",((t,s,n,{getBlockParentsByBlockName:o})=>$i.includes(e)||"core/post-content"!==s.name?t:o(n,"core/query").length>0)),()=>{(0,h.removeFilter)("blockEditor.__unstableCanInsertBlockType","removeTemplatePartsFromInserter"),(0,h.removeFilter)("blockEditor.__unstableCanInsertBlockType","removePostContentFromInserter")})),[e,t])}(e.type,f),(0,oa.useCommandLoader)({name:"core/editor/edit-ui",hook:function(){const{editorMode:e,isListViewOpen:t,showBlockBreadcrumbs:s,isDistractionFree:n,isFocusMode:o,isPreviewMode:r,isViewable:i,isCodeEditingEnabled:a,isRichEditingEnabled:l,isPublishSidebarEnabled:c}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{isListViewOpened:s,getCurrentPostType:n,getEditorSettings:o}=e(wc),{getSettings:r}=e(g.store),{getPostType:i}=e(u.store);return{editorMode:t("core","editorMode")??"visual",isListViewOpen:s(),showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),isDistractionFree:t("core","distractionFree"),isFocusMode:t("core","focusMode"),isPreviewMode:r().isPreviewMode,isViewable:i(n())?.viewable??!1,isCodeEditingEnabled:o().codeEditingEnabled,isRichEditingEnabled:o().richEditingEnabled,isPublishSidebarEnabled:e(wc).isPublishSidebarEnabled()}}),[]),{getActiveComplementaryArea:p}=(0,d.useSelect)(Ea),{toggle:m}=(0,d.useDispatch)(C.store),{createInfoNotice:h}=(0,d.useDispatch)(_s.store),{__unstableSaveForPreview:_,setIsListViewOpened:f,switchEditorMode:b,toggleDistractionFree:y,toggleSpotlightMode:x,toggleTopToolbar:v}=(0,d.useDispatch)(wc),{openModal:w,enableComplementaryArea:S,disableComplementaryArea:k}=(0,d.useDispatch)(Ea),{getCurrentPostId:P}=(0,d.useSelect)(wc),j=a&&l;if(r)return{commands:[],isLoading:!1};const E=[];return E.push({name:"core/open-shortcut-help",label:(0,fs.__)("Keyboard shortcuts"),icon:Wi,callback:({close:e})=>{e(),w("editor/keyboard-shortcut-help")}}),E.push({name:"core/toggle-distraction-free",label:n?(0,fs.__)("Exit Distraction free"):(0,fs.__)("Enter Distraction free"),callback:({close:e})=>{y(),e()}}),E.push({name:"core/open-preferences",label:(0,fs.__)("Editor preferences"),callback:({close:e})=>{e(),w("editor/preferences")}}),E.push({name:"core/toggle-spotlight-mode",label:o?(0,fs.__)("Exit Spotlight mode"):(0,fs.__)("Enter Spotlight mode"),callback:({close:e})=>{x(),e()}}),E.push({name:"core/toggle-list-view",label:t?(0,fs.__)("Close List View"):(0,fs.__)("Open List View"),icon:Zi,callback:({close:e})=>{f(!t),e(),h(t?(0,fs.__)("List View off."):(0,fs.__)("List View on."),{id:"core/editor/toggle-list-view/notice",type:"snackbar"})}}),E.push({name:"core/toggle-top-toolbar",label:(0,fs.__)("Top toolbar"),callback:({close:e})=>{v(),e()}}),j&&E.push({name:"core/toggle-code-editor",label:"visual"===e?(0,fs.__)("Open code editor"):(0,fs.__)("Exit code editor"),icon:Yi,callback:({close:t})=>{b("visual"===e?"text":"visual"),t()}}),E.push({name:"core/toggle-breadcrumbs",label:s?(0,fs.__)("Hide block breadcrumbs"):(0,fs.__)("Show block breadcrumbs"),callback:({close:e})=>{m("core","showBlockBreadcrumbs"),e(),h(s?(0,fs.__)("Breadcrumbs hidden."):(0,fs.__)("Breadcrumbs visible."),{id:"core/editor/toggle-breadcrumbs/notice",type:"snackbar"})}}),E.push({name:"core/open-settings-sidebar",label:(0,fs.__)("Show or hide the Settings panel"),icon:(0,fs.isRTL)()?qi:Ki,callback:({close:e})=>{const t=p("core");e(),"edit-post/document"===t?k("core"):S("core","edit-post/document")}}),E.push({name:"core/open-block-inspector",label:(0,fs.__)("Show or hide the Block settings panel"),icon:Qi,callback:({close:e})=>{const t=p("core");e(),"edit-post/block"===t?k("core"):S("core","edit-post/block")}}),E.push({name:"core/toggle-publish-sidebar",label:c?(0,fs.__)("Disable pre-publish checks"):(0,fs.__)("Enable pre-publish checks"),icon:Xi,callback:({close:e})=>{e(),m("core","isPublishSidebarEnabled"),h(c?(0,fs.__)("Pre-publish checks disabled."):(0,fs.__)("Pre-publish checks enabled."),{id:"core/editor/publish-sidebar/notice",type:"snackbar"})}}),i&&E.push({name:"core/preview-link",label:(0,fs.__)("Preview in a new tab"),icon:Gn,callback:async({close:e})=>{e();const t=P(),s=await _();window.open(s,`wp-preview-${t}`)}}),{commands:E,isLoading:!1}}}),(0,oa.useCommandLoader)({name:"core/editor/contextual-commands",hook:function(){const{postType:e}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(wc);return{postType:t()}}),[]),{openModal:t}=(0,d.useDispatch)(Ea),s=[];return e===N&&(s.push({name:"core/rename-pattern",label:(0,fs.__)("Rename pattern"),icon:Ji,callback:({close:e})=>{t(qa),e()}}),s.push({name:"core/duplicate-pattern",label:(0,fs.__)("Duplicate pattern"),icon:ea,callback:({close:e})=>{t(Xa),e()}})),{isLoading:!1,commands:s}},context:"entity-edit"}),(0,oa.useCommandLoader)({name:"core/editor/page-content-focus",hook:function(){const{onNavigateToEntityRecord:e,goBack:t,templateId:s,isPreviewMode:n}=(0,d.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:s,getCurrentTemplateId:n}=$(e(wc)),o=s();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,goBack:o.onNavigateToPreviousEntityRecord,templateId:n(),isPreviewMode:o.isPreviewMode}}),[]),{editedRecord:o,hasResolved:r}=(0,u.useEntityRecord)("postType","wp_template",s);if(n)return{isLoading:!1,commands:[]};const i=[];return s&&r&&i.push({name:"core/switch-to-template-focus",label:(0,fs.sprintf)((0,fs.__)("Edit template: %s"),(0,Ln.decodeEntities)(o.title)),icon:W,callback:({close:t})=>{e({postId:s,postType:"wp_template"}),t()}}),t&&i.push({name:"core/switch-to-previous-entity",label:(0,fs.__)("Go back"),icon:ta,callback:({close:e})=>{t(),e()}}),{isLoading:!1,commands:i}},context:"entity-edit"}),(0,oa.useCommandLoader)({name:"core/edit-site/manipulate-document",hook:function(){const{postType:e,postId:t}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(wc);return{postType:s(),postId:t()}}),[]),{editedRecord:s,hasResolved:n}=(0,u.useEntityRecord)("postType",e,t),{revertTemplate:o}=$((0,d.useDispatch)(wc));if(!n||![I,B].includes(e))return{isLoading:!0,commands:[]};const r=[];if(On(s)){const e=s.type===B?(0,fs.sprintf)((0,fs.__)("Reset template: %s"),(0,Ln.decodeEntities)(s.title)):(0,fs.sprintf)((0,fs.__)("Reset template part: %s"),(0,Ln.decodeEntities)(s.title));r.push({name:"core/reset-template",label:e,icon:(0,fs.isRTL)()?sa:na,callback:({close:e})=>{o(s),e()}})}return{isLoading:!n,commands:r}}}),_&&f?(0,c.jsx)(u.EntityProvider,{kind:"root",type:"site",children:(0,c.jsx)(u.EntityProvider,{kind:"postType",type:e.type,id:e.id,children:(0,c.jsx)(g.BlockContextProvider,{value:S,children:(0,c.jsxs)(r,{value:E,onChange:R,onInput:T,selection:m,settings:j,useSubRegistry:!1,children:[o,!t.isPreviewMode&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Il,{}),(0,c.jsx)(El,{}),(0,c.jsx)(xl,{}),"template-locked"===f&&(0,c.jsx)(zi,{}),"wp_navigation"===P&&(0,c.jsx)(Gi,{}),(0,c.jsx)(Cl,{}),(0,c.jsx)(fl,{}),(0,c.jsx)(nl,{}),(0,c.jsx)(il,{}),(0,c.jsx)(kl,{}),(0,c.jsx)(Ka,{}),(0,c.jsx)(Ja,{})]})]})})})}):null}));function Al(e){return(0,c.jsx)(Dl,{...e,BlockEditorProviderComponent:g.BlockEditorProvider,children:e.children})}var Ml=Al;const{useGlobalStyle:Ll}=$(g.privateApis);function Ol({template:e,post:t}){const[s="white"]=Ll("color.background"),[n]=(0,u.useEntityBlockEditor)("postType",t.type,{id:t.id}),[o]=(0,u.useEntityBlockEditor)("postType",e?.type,{id:e?.id}),r=e&&o?o:n,i=!r?.length;return(0,c.jsxs)("div",{className:"editor-fields-content-preview",style:{backgroundColor:s},children:[i&&(0,c.jsx)("span",{className:"editor-fields-content-preview__empty",children:(0,fs.__)("Empty content")}),!i&&(0,c.jsx)(g.BlockPreview.Async,{children:(0,c.jsx)(g.BlockPreview,{blocks:r})})]})}const Fl={type:"media",id:"content-preview",label:(0,fs.__)("Content preview"),render:function({item:e}){const{settings:t,template:s}=(0,d.useSelect)((t=>{const{canUser:s,getPostType:n,getTemplateId:o,getEntityRecord:r}=$(t(u.store)),i=s("read",{kind:"postType",name:"wp_template"}),a=t(wc).getEditorSettings(),l=a.supportsTemplateMode,c=n(e.type)?.viewable??!1,d=l&&c&&i?o(e.type,e.id):null;return{settings:a,template:d?r("postType","wp_template",d):void 0}}),[e.type,e.id]);return(0,c.jsx)(Al,{post:e,settings:t,__unstableTemplate:s,children:(0,c.jsx)(Ol,{template:s,post:e})})},enableSorting:!1};var Vl=Fl;function Ul(e,t,s){return{type:"REGISTER_ENTITY_ACTION",kind:e,name:t,config:s}}function Hl(e,t,s){return{type:"UNREGISTER_ENTITY_ACTION",kind:e,name:t,actionId:s}}function zl(e,t,s){return{type:"REGISTER_ENTITY_FIELD",kind:e,name:t,config:s}}function Gl(e,t,s){return{type:"UNREGISTER_ENTITY_FIELD",kind:e,name:t,fieldId:s}}function $l(e,t){return{type:"SET_IS_READY",kind:e,name:t}}const Wl=e=>async({registry:t})=>{if($(t.select(wc)).isEntityReady("postType",e))return;$(t.dispatch(wc)).setIsReady("postType",e);const s=await t.resolveSelect(u.store).getPostType(e),n=await t.resolveSelect(u.store).canUser("create",{kind:"postType",name:e}),o=await t.resolveSelect(u.store).getCurrentTheme();let r=!["wp_block","wp_template_part"].includes(s.slug)&&n&&zn;"wp_template"!==s.slug&&(r=void 0);const i=[s.viewable?$n:void 0,s.supports?.revisions?Wn:void 0,r,"wp_template_part"===s.slug&&n&&o?.is_block_theme?ao:void 0,n&&"wp_block"===s.slug?go:void 0,s.supports?.title?bo:void 0,s.supports?.["page-attributes"]?xo:void 0,"wp_block"===s.slug?Yo:void 0,Ko,Jo,or,ir,lr].filter(Boolean),a=[s.supports?.thumbnail&&o?.theme_supports?.["post-thumbnails"]&&pr,s.supports?.author&&br,Pr,Tr,Ar,s.supports?.["page-attributes"]&&Ur,s.supports?.comments&&Hr,s.supports?.trackbacks&&zr,(s.supports?.comments||s.supports?.trackbacks)&&Gr,Zr,qr,s.supports?.editor&&s.viewable&&Vl].filter(Boolean);if(s.supports?.title){let t;t="page"===e?Jr:"wp_template"===e?ei:"wp_block"===e?oi:ri,a.push(t)}t.batch((()=>{i.forEach((s=>{$(t.dispatch(wc)).registerEntityAction("postType",e,s)})),a.forEach((s=>{$(t.dispatch(wc)).registerEntityField("postType",e,s)}))})),(0,h.doAction)("core.registerPostTypeSchema",e)};function Zl(e){return{type:"SET_CURRENT_TEMPLATE_ID",id:e}}const Yl=e=>async({select:t,dispatch:s,registry:n})=>{const o=await n.dispatch(u.store).saveEntityRecord("postType","wp_template",e);return n.dispatch(u.store).editEntityRecord("postType",t.getCurrentPostType(),t.getCurrentPostId(),{template:o.slug}),n.dispatch(_s.store).createSuccessNotice((0,fs.__)("Custom template created. You're in template mode now."),{type:"snackbar",actions:[{label:(0,fs.__)("Go back"),onClick:()=>s.setRenderingMode(t.getEditorSettings().defaultRenderingMode)}]}),o},ql=e=>({registry:t})=>{const s=(t.select(C.store).get("core","hiddenBlockTypes")??[]).filter((t=>!(Array.isArray(e)?e:[e]).includes(t)));t.dispatch(C.store).set("core","hiddenBlockTypes",s)},Kl=e=>({registry:t})=>{const s=t.select(C.store).get("core","hiddenBlockTypes")??[],n=new Set([...s,...Array.isArray(e)?e:[e]]);t.dispatch(C.store).set("core","hiddenBlockTypes",[...n])},Ql=({onSave:e,dirtyEntityRecords:t=[],entitiesToSkip:s=[],close:n}={})=>({registry:o})=>{const r=[{kind:"postType",name:"wp_navigation"}],i="site-editor-save-success",a=o.select(u.store).getEntityRecord("root","__unstableBase")?.home;o.dispatch(_s.store).removeNotice(i);const l=t.filter((({kind:e,name:t,key:n,property:o})=>!s.some((s=>s.kind===e&&s.name===t&&s.key===n&&s.property===o))));n?.(l);const c=[],d=[];l.forEach((({kind:e,name:t,key:s,property:n})=>{"root"===e&&"site"===t?c.push(n):(r.some((s=>s.kind===e&&s.name===t))&&o.dispatch(u.store).editEntityRecord(e,t,s,{status:"publish"}),d.push(o.dispatch(u.store).saveEditedEntityRecord(e,t,s)))})),c.length&&d.push(o.dispatch(u.store).__experimentalSaveSpecifiedEntityEdits("root","site",void 0,c)),o.dispatch(g.store).__unstableMarkLastChangeAsPersistent(),Promise.all(d).then((t=>e?e(t):t)).then((e=>{e.some((e=>void 0===e))?o.dispatch(_s.store).createErrorNotice((0,fs.__)("Saving failed.")):o.dispatch(_s.store).createSuccessNotice((0,fs.__)("Site updated."),{type:"snackbar",id:i,actions:[{label:(0,fs.__)("View site"),url:a,openInNewTab:!0}]})})).catch((e=>o.dispatch(_s.store).createErrorNotice(`${(0,fs.__)("Saving failed.")} ${e}`)))},Xl=(e,{allowUndo:t=!0}={})=>async({registry:s})=>{const n="edit-site-template-reverted";if(s.dispatch(_s.store).removeNotice(n),On(e))try{const o=s.select(u.store).getEntityConfig("postType",e.type);if(!o)return void s.dispatch(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const r=(0,w.addQueryArgs)(`${o.baseURL}/${e.id}`,{context:"edit",source:e.origin}),i=await gs()({path:r});if(!i)return void s.dispatch(_s.store).createErrorNotice((0,fs.__)("The editor has encountered an unexpected error. Please reload."),{type:"snackbar"});const a=({blocks:e=[]})=>(0,x.__unstableSerializeAndClean)(e),l=s.select(u.store).getEditedEntityRecord("postType",e.type,e.id);s.dispatch(u.store).editEntityRecord("postType",e.type,e.id,{content:a,blocks:l.blocks,source:"custom"},{undoIgnore:!0});const c=(0,x.parse)(i?.content?.raw);if(s.dispatch(u.store).editEntityRecord("postType",e.type,i.id,{content:a,blocks:c,source:"theme"}),t){const t=()=>{s.dispatch(u.store).editEntityRecord("postType",e.type,l.id,{content:a,blocks:l.blocks,source:"custom"})};s.dispatch(_s.store).createSuccessNotice((0,fs.__)("Template reset."),{type:"snackbar",id:n,actions:[{label:(0,fs.__)("Undo"),onClick:t}]})}}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("Template revert failed. Please reload.");s.dispatch(_s.store).createErrorNotice(t,{type:"snackbar"})}else s.dispatch(_s.store).createErrorNotice((0,fs.__)("This template is not revertable."),{type:"snackbar"})},Jl=e=>async({registry:t})=>{const s=e.every((e=>e?.has_theme_file)),n=await Promise.allSettled(e.map((e=>t.dispatch(u.store).deleteEntityRecord("postType",e.type,e.id,{force:!0},{throwOnError:!0}))));if(n.every((({status:e})=>"fulfilled"===e))){let n;if(1===e.length){let t;"string"==typeof e[0].title?t=e[0].title:"string"==typeof e[0].title?.rendered?t=e[0].title?.rendered:"string"==typeof e[0].title?.raw&&(t=e[0].title?.raw),n=s?(0,fs.sprintf)((0,fs.__)('"%s" reset.'),(0,Ln.decodeEntities)(t)):(0,fs.sprintf)((0,fs._x)('"%s" deleted.',"template part"),(0,Ln.decodeEntities)(t))}else n=s?(0,fs.__)("Items reset."):(0,fs.__)("Items deleted.");t.dispatch(_s.store).createSuccessNotice(n,{type:"snackbar",id:"editor-template-deleted-success"})}else{let e;if(1===n.length)e=n[0].reason?.message?n[0].reason.message:s?(0,fs.__)("An error occurred while reverting the item."):(0,fs.__)("An error occurred while deleting the item.");else{const t=new Set,o=n.filter((({status:e})=>"rejected"===e));for(const e of o)e.reason?.message&&t.add(e.reason.message);e=0===t.size?(0,fs.__)("An error occurred while deleting the items."):1===t.size?s?(0,fs.sprintf)((0,fs.__)("An error occurred while reverting the items: %s"),[...t][0]):(0,fs.sprintf)((0,fs.__)("An error occurred while deleting the items: %s"),[...t][0]):s?(0,fs.sprintf)((0,fs.__)("Some errors occurred while reverting the items: %s"),[...t].join(",")):(0,fs.sprintf)((0,fs.__)("Some errors occurred while deleting the items: %s"),[...t].join(","))}t.dispatch(_s.store).createErrorNotice(e,{type:"snackbar"})}},ec=e=>({select:t,registry:s})=>{const n=t.getCurrentPostType(),o=s.select(u.store).getCurrentTheme()?.stylesheet,r=s.select(C.store).get("core","renderingModes")?.[o]??{};if(r[n]===e)return;const i={[o]:{...r,[n]:e}};s.dispatch(C.store).set("core","renderingModes",i)};function tc(e){return{type:"SET_CANVAS_MIN_HEIGHT",minHeight:e}}var sc=s(5215),nc=s.n(sc),oc=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z"})}),rc=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z"})});const ic=[];const ac={rootClientId:void 0,insertionIndex:void 0,filterValue:void 0},lc=["post-only","template-locked"],cc=(0,d.createRegistrySelector)((e=>(0,d.createSelector)((t=>{if("object"==typeof t.blockInserterPanel)return t.blockInserterPanel;if("template-locked"===st(t)){const[t]=e(g.store).getBlocksByName("core/post-content");if(t)return{rootClientId:t,insertionIndex:void 0,filterValue:void 0}}return ac}),(t=>{const[s]=e(g.store).getBlocksByName("core/post-content");return[t.blockInserterPanel,st(t),s]}))));function dc(e){return e.listViewToggleRef}function uc(e){return e.inserterSidebarToggleRef}const pc={wp_block:ea,wp_navigation:oc,page:ta,post:rc},mc=(0,d.createRegistrySelector)((e=>(t,s,n)=>{{if("wp_template_part"===s||"wp_template"===s){const t=(e(u.store).getCurrentTheme()?.default_template_part_areas||[]).find((e=>n.area===e.area));return t?.icon?H(t.icon):W}if(pc[s])return pc[s];const t=e(u.store).getPostType(s);return"string"==typeof t?.icon&&t.icon.startsWith("dashicons-")?t.icon.slice(10):ta}})),hc=(0,d.createRegistrySelector)((e=>(t,s,n)=>{const{type:o,id:r}=ne(t),i=e(u.store).getEntityRecordNonTransientEdits("postType",s||o,n||r);if(!i?.meta)return!1;const a=e(u.store).getEntityRecord("postType",s||o,n||r)?.meta;return!nc()({...a,footnotes:void 0},{...i.meta,footnotes:void 0})}));function gc(e,...t){return function(e,t,s){return e.actions[t]?.[s]??ic}(e.dataviews,...t)}function _c(e,...t){return function(e,t,s){return e.isReady[t]?.[s]}(e.dataviews,...t)}function fc(e,...t){return function(e,t,s){return e.fields[t]?.[s]??ic}(e.dataviews,...t)}const bc=(0,d.createRegistrySelector)((e=>(0,d.createSelector)(((t,s)=>{s=Array.isArray(s)?s:[s];const{getBlocksByName:n,getBlockParents:o,getBlockName:r}=e(g.store);return n(s).filter((e=>o(e).every((e=>{const t=r(e);return"core/query"!==t&&!s.includes(t)}))))}),(()=>[e(g.store).getBlocks()])))),yc=(0,d.createRegistrySelector)((e=>(t,s)=>{const{getPostType:n,getCurrentTheme:o,hasFinishedResolution:r}=e(u.store),i=o(),a=n(s);if(!r("getPostType",[s])||!r("getCurrentTheme"))return;const l=i?.stylesheet,c=e(C.store).get("core","renderingModes")?.[l]?.[s],d=Array.isArray(a?.supports?.editor)?a.supports.editor.find((e=>"default-mode"in e))?.["default-mode"]:void 0,p=c||d;return lc.includes(p)?p:"post-only"}));function xc(e){return e.canvasMinHeight}const vc={reducer:y,selectors:e,actions:t},wc=(0,d.createReduxStore)("core/editor",{...vc});(0,d.register)(wc),$(wc).registerPrivateActions(a),$(wc).registerPrivateSelectors(l);function Sc(e){const t=e.avatar_urls&&e.avatar_urls[24]?(0,c.jsx)("img",{className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}):(0,c.jsx)("span",{className:"editor-autocompleters__no-avatar"});return(0,c.jsxs)(c.Fragment,{children:[t,(0,c.jsx)("span",{className:"editor-autocompleters__user-name",children:e.name}),(0,c.jsx)("span",{className:"editor-autocompleters__user-slug",children:e.slug})]})}(0,h.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){const t=Object.fromEntries(Object.entries(e.attributes??{}).filter((([,{source:e}])=>"meta"===e)).map((([e,{meta:t}])=>[e,t])));return Object.entries(t).length&&(e.edit=(e=>(0,m.createHigherOrderComponent)((t=>({attributes:s,setAttributes:n,...o})=>{const r=(0,d.useSelect)((e=>e(wc).getCurrentPostType()),[]),[i,a]=(0,u.useEntityProp)("postType",r,"meta"),l=(0,p.useMemo)((()=>({...s,...Object.fromEntries(Object.entries(e).map((([e,t])=>[e,i[t]])))})),[s,i]);return(0,c.jsx)(t,{attributes:l,setAttributes:t=>{const s=Object.fromEntries(Object.entries(t??{}).filter((([t])=>t in e)).map((([t,s])=>[e[t],s])));Object.entries(s).length&&a(s),n(t)},...o})}),"withMetaAttributeSource"))(t)(e.edit)),e}));var kc={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",useItems(e){const t=(0,d.useSelect)((t=>{const{getUsers:s}=t(u.store);return s({context:"view",search:encodeURIComponent(e)})}),[e]);return[(0,p.useMemo)((()=>t?t.map((e=>({key:`user-${e.slug}`,value:e,label:Sc(e)}))):[]),[t])]},getOptionCompletion:e=>`@${e.slug}`};(0,h.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(e=[]){return e.push({...kc}),e})),(0,h.addFilter)("editor.MediaUpload","core/editor/components/media-upload",(()=>cr.MediaUpload));const{PatternOverridesControls:Cc,ResetOverridesControl:Pc,PatternOverridesBlockControls:jc,PATTERN_TYPES:Ec,PARTIAL_SYNCING_SUPPORTED_BLOCKS:Tc,PATTERN_SYNC_TYPES:Bc}=$(lo.privateApis),Ic=(0,m.createHigherOrderComponent)((e=>t=>{const s=!!Tc[t.name];return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,c.jsx)(Nc,{...t}),s&&(0,c.jsx)(jc,{})]})}),"withPatternOverrideControls");function Nc(e){const t=(0,g.useBlockEditingMode)(),{hasPatternOverridesSource:s,isEditingSyncedPattern:n}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(wc);return{hasPatternOverridesSource:!!(0,x.getBlockBindingsSource)("core/pattern-overrides"),isEditingSyncedPattern:t()===Ec.user&&s("meta")?.wp_pattern_sync_status!==Bc.unsynced&&s("wp_pattern_sync_status")!==Bc.unsynced}}),[]),o=e.attributes.metadata?.bindings,r=!!o&&Object.values(o).some((e=>"core/pattern-overrides"===e.source)),i=n&&"default"===t,a=!n&&!!e.attributes.metadata?.name&&"disabled"!==t&&r;return s?(0,c.jsxs)(c.Fragment,{children:[i&&(0,c.jsx)(Cc,{...e}),a&&(0,c.jsx)(Pc,{...e})]}):null}(0,h.addFilter)("editor.BlockEdit","core/editor/with-pattern-override-controls",Ic);const Rc=["core/navigation-link","core/navigation-submenu"];function Dc({attributes:e}){const{kind:t,id:s,type:n}=e,o=(0,g.useBlockEditingMode)(),r=(0,d.useSelect)((e=>e(g.store).getSettings().onNavigateToEntityRecord),[]),i=(0,p.useCallback)((()=>{"post-type"===t&&"page"===n&&s&&r&&r({postId:s,postType:n})}),[t,s,n,r]);return"post-type"===t&&"page"===n&&s&&r&&"contentOnly"===o?(0,c.jsx)(g.__unstableBlockToolbarLastItem,{children:(0,c.jsx)(Fn.ToolbarGroup,{children:(0,c.jsx)(Fn.ToolbarButton,{name:"view",title:(0,fs.__)("View"),onClick:i,children:(0,fs.__)("View")})})}):null}const Ac=(0,m.createHigherOrderComponent)((e=>t=>{const s=Rc.includes(t.name);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,c.jsx)(Dc,{...t})]})}),"withNavigationViewButton");(0,h.addFilter)("editor.BlockEdit","core/editor/with-navigation-view-button",Ac);function Mc({clientId:e}){const{selectBlock:t,flashBlock:s}=(0,d.useDispatch)(g.store),{enableComplementaryArea:n}=(0,d.useDispatch)(Ea),{hasNavigationBlocks:o,firstNavigationBlockId:r,isNavigationEditable:i}=(0,d.useSelect)((t=>{const{getClientIdsOfDescendants:s,getBlockName:n,getBlockEditingMode:o}=t(g.store),r=s(e).filter((e=>"core/navigation"===n(e))),i=r.length>0,a=i?r[0]:null;return{hasNavigationBlocks:i,firstNavigationBlockId:a,isNavigationEditable:"disabled"!==o(a)}}),[e]),a=(0,p.useCallback)((()=>{r&&(t(r),s(r,500),n("core","edit-post/block"))}),[r,t,s,n]);return o&&i?(0,c.jsx)(g.BlockControls,{group:"other",children:(0,c.jsxs)(Fn.ToolbarGroup,{children:[(0,c.jsx)(Fn.__experimentalDivider,{orientation:"vertical",marginEnd:3}),(0,c.jsx)(Fn.ToolbarButton,{label:(0,fs.__)("Edit navigation"),onClick:a,children:(0,fs.__)("Edit navigation")})]})}):null}const Lc=(0,m.createHigherOrderComponent)((e=>t=>{const s="core/template-part"===t.name;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t},"edit"),t.isSelected&&s&&(0,c.jsx)(Mc,{clientId:t.clientId})]})}),"withTemplatePartNavigationEditButton");(0,h.addFilter)("editor.BlockEdit","core/editor/with-template-part-navigation-edit-button",Lc);class Oc extends p.Component{constructor(e){super(e),this.needsAutosave=!(!e.isDirty||!e.isAutosaveable)}componentDidMount(){this.props.disableIntervalChecks||this.setAutosaveTimer()}componentDidUpdate(e){this.props.disableIntervalChecks?this.props.editsReference!==e.editsReference&&this.props.autosave():(this.props.interval!==e.interval&&(clearTimeout(this.timerId),this.setAutosaveTimer()),this.props.isDirty&&(!this.props.isAutosaving||e.isAutosaving)?this.props.editsReference!==e.editsReference&&(this.needsAutosave=!0):this.needsAutosave=!1)}componentWillUnmount(){clearTimeout(this.timerId)}setAutosaveTimer(e=1e3*this.props.interval){this.timerId=setTimeout((()=>{this.autosaveTimerHandler()}),e)}autosaveTimerHandler(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}render(){return null}}var Fc=(0,m.compose)([(0,d.withSelect)(((e,t)=>{const{getReferenceByDistinctEdits:s}=e(u.store),{isEditedPostDirty:n,isEditedPostAutosaveable:o,isAutosavingPost:r,getEditorSettings:i}=e(wc),{interval:a=i().autosaveInterval}=t;return{editsReference:s(),isDirty:n(),isAutosaveable:o(),isAutosaving:r(),interval:a}})),(0,d.withDispatch)(((e,t)=>({autosave(){const{autosave:s=e(wc).autosave}=t;s()}})))])(Oc),Vc=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z"})}),Uc=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z"})});const Hc=window.wp.dom;function zc(e){const{isFrontPage:t,isPostsPage:s}=(0,d.useSelect)((t=>{const{canUser:s,getEditedEntityRecord:n}=t(u.store),o=s("read",{kind:"root",name:"site"})?n("root","site"):void 0,r=parseInt(e,10);return{isFrontPage:o?.page_on_front===r,isPostsPage:o?.page_for_posts===r}}));return t?(0,fs.__)("Homepage"):!!s&&(0,fs.__)("Posts Page")}const Gc=Fn.__unstableMotion.create(Fn.Button);function $c(e){const{postId:t,postType:s,postTypeLabel:n,documentTitle:o,isNotFound:r,templateTitle:i,onNavigateToPreviousEntityRecord:a,isTemplatePreview:l}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditorSettings:n,getRenderingMode:o}=e(wc),{getEditedEntityRecord:r,getPostType:i,getCurrentTheme:a,isResolving:l}=e(u.store),c=t(),d=s(),p=r("postType",c,d),{default_template_types:m=[]}=a()??{},h=Y({templateTypes:m,template:p}),g=i(c)?.labels?.singular_name;return{postId:d,postType:c,postTypeLabel:g,documentTitle:p.title,isNotFound:!p&&!l("getEditedEntityRecord","postType",c,d),templateTitle:h.title,onNavigateToPreviousEntityRecord:n().onNavigateToPreviousEntityRecord,isTemplatePreview:"template-locked"===o()}}),[]),{open:h}=(0,d.useDispatch)(oa.store),_=(0,m.useReducedMotion)(),f=A.includes(s),b=!!a,y=f?i:o,x=e.title||y,v=e.icon,w=zc(t),S=(0,p.useRef)(!1);return(0,p.useEffect)((()=>{S.current=!0}),[]),(0,c.jsxs)("div",{className:hr("editor-document-bar",{"has-back-button":b}),children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{children:b&&(0,c.jsx)(Gc,{className:"editor-document-bar__back",icon:(0,fs.isRTL)()?Vc:Uc,onClick:e=>{e.stopPropagation(),a()},size:"compact",initial:!!S.current&&{opacity:0,transform:"translateX(15%)"},animate:{opacity:1,transform:"translateX(0%)"},exit:{opacity:0,transform:"translateX(15%)"},transition:_?{duration:0}:void 0,children:(0,fs.__)("Back")})}),!f&&l&&!b&&(0,c.jsx)(g.BlockIcon,{icon:W,className:"editor-document-bar__icon-layout"}),r?(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Document not found")}):(0,c.jsxs)(Fn.Button,{className:"editor-document-bar__command",onClick:()=>h(),size:"compact",children:[(0,c.jsxs)(Fn.__unstableMotion.div,{className:"editor-document-bar__title",initial:!!S.current&&{opacity:0,transform:b?"translateX(15%)":"translateX(-15%)"},animate:{opacity:1,transform:"translateX(0%)"},transition:_?{duration:0}:void 0,children:[v&&(0,c.jsx)(g.BlockIcon,{icon:v}),(0,c.jsxs)(Fn.__experimentalText,{size:"body",as:"h1",children:[(0,c.jsx)("span",{className:"editor-document-bar__post-title",children:x?(0,Hc.__unstableStripHTML)(x):(0,fs.__)("No title")}),w&&(0,c.jsx)("span",{className:"editor-document-bar__post-type-label",children:`· ${w}`}),n&&!e.title&&!w&&(0,c.jsx)("span",{className:"editor-document-bar__post-type-label",children:`· ${(0,Ln.decodeEntities)(n)}`})]})]},b),(0,c.jsx)("span",{className:"editor-document-bar__shortcut",children:cl.displayShortcut.primary("k")})]})]})}const Wc=window.wp.richText;var Zc=({children:e,isValid:t,isDisabled:s,level:n,href:o,onSelect:r})=>(0,c.jsx)("li",{className:hr("document-outline__item",`is-${n.toLowerCase()}`,{"is-invalid":!t,"is-disabled":s}),children:(0,c.jsxs)("a",{href:o,className:"document-outline__button","aria-disabled":s,onClick:function(e){s?e.preventDefault():r()},children:[(0,c.jsx)("span",{className:"document-outline__emdash","aria-hidden":"true"}),(0,c.jsx)("strong",{className:"document-outline__level",children:n}),(0,c.jsx)("span",{className:"document-outline__item-content",children:e})]})});const Yc=(0,c.jsx)("em",{children:(0,fs.__)("(Empty heading)")}),qc=[(0,c.jsx)("br",{},"incorrect-break"),(0,c.jsx)("em",{children:(0,fs.__)("(Incorrect heading level)")},"incorrect-message")],Kc=[(0,c.jsx)("br",{},"incorrect-break-h1"),(0,c.jsx)("em",{children:(0,fs.__)("(Your theme may already use a H1 for the post title)")},"incorrect-message-h1")],Qc=[(0,c.jsx)("br",{},"incorrect-break-multiple-h1"),(0,c.jsx)("em",{children:(0,fs.__)("(Multiple H1 headings are not recommended)")},"incorrect-message-multiple-h1")];function Xc(){return(0,c.jsxs)(Fn.SVG,{width:"138",height:"148",viewBox:"0 0 138 148",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,c.jsx)(Fn.Rect,{width:"138",height:"148",rx:"4",fill:"#F0F6FC"}),(0,c.jsx)(Fn.Line,{x1:"44",y1:"28",x2:"24",y2:"28",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"48",y:"16",width:"27",height:"23",rx:"4",fill:"#DDDDDD"}),(0,c.jsx)(Fn.Path,{d:"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z",fill:"black"}),(0,c.jsx)(Fn.Line,{x1:"55",y1:"59",x2:"24",y2:"59",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"59",y:"47",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,c.jsx)(Fn.Path,{d:"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z",fill:"black"}),(0,c.jsx)(Fn.Line,{x1:"80",y1:"90",x2:"24",y2:"90",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"84",y:"78",width:"30",height:"23",rx:"4",fill:"#F0B849"}),(0,c.jsx)(Fn.Path,{d:"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z",fill:"black"}),(0,c.jsx)(Fn.Line,{x1:"66",y1:"121",x2:"24",y2:"121",stroke:"#DDDDDD"}),(0,c.jsx)(Fn.Rect,{x:"70",y:"109",width:"29",height:"23",rx:"4",fill:"#DDDDDD"}),(0,c.jsx)(Fn.Path,{d:"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z",fill:"black"})]})}const Jc=(e=[])=>e.filter((e=>"core/heading"===e.name)).map((e=>({...e,level:e.attributes.level,isEmpty:ed(e)}))),ed=e=>!e.attributes.content||0===e.attributes.content.trim().length;function td({onSelect:e,hasOutlineItemsDisabled:t}){const{selectBlock:s}=(0,d.useDispatch)(g.store),{title:n,isTitleSupported:o}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc),{getPostType:s}=e(u.store),n=s(t("type"));return{title:t("title"),isTitleSupported:n?.supports?.title??!1}})),r=(0,d.useSelect)((e=>{const{getClientIdsWithDescendants:t,getBlock:s}=e(g.store);return t().map((e=>s(e)))})),i=(0,d.useSelect)((e=>{if("post-only"===e(wc).getRenderingMode())return;const{getBlocksByName:t,getClientIdsOfDescendants:s}=e(g.store),[n]=t("core/post-content");return n?s(n):void 0}),[]),a=(0,p.useRef)(1),l=(0,p.useMemo)((()=>Jc(r)),[r]);if(l.length<1)return(0,c.jsxs)("div",{className:"editor-document-outline has-no-headings",children:[(0,c.jsx)(Xc,{}),(0,c.jsx)("p",{children:(0,fs.__)("Navigate the structure of your document and address issues like empty or incorrect heading levels.")})]});const m=document.querySelector(".editor-post-title__input"),h=o&&n&&m,_=l.reduce(((e,t)=>({...e,[t.level]:(e[t.level]||0)+1})),{})[1]>1;return(0,c.jsx)("div",{className:"document-outline",children:(0,c.jsxs)("ul",{children:[h&&(0,c.jsx)(Zc,{level:(0,fs.__)("Title"),isValid:!0,onSelect:e,href:`#${m.id}`,isDisabled:t,children:n}),l.map((n=>{const o=n.level>a.current+1,r=!(n.isEmpty||o||!n.level||1===n.level&&(_||h));return a.current=n.level,(0,c.jsxs)(Zc,{level:`H${n.level}`,isValid:r,isDisabled:t||(l=n.clientId,!(!Array.isArray(i)||i.includes(l))),href:`#block-${n.clientId}`,onSelect:()=>{s(n.clientId),e?.()},children:[n.isEmpty?Yc:(0,Wc.getTextContent)((0,Wc.create)({html:n.attributes.content})),o&&qc,1===n.level&&_&&Qc,h&&1===n.level&&!_&&Kc]},n.clientId);var l}))]})})}function sd({children:e}){const t=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t}=e(g.store);return t("core/heading")>0}));return t?e:null}var nd=function(){const{registerShortcut:e}=(0,d.useDispatch)(al.store);return(0,p.useEffect)((()=>{e({name:"core/editor/toggle-mode",category:"global",description:(0,fs.__)("Switch between visual editor and code editor."),keyCombination:{modifier:"secondary",character:"m"}}),e({name:"core/editor/save",category:"global",description:(0,fs.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:(0,fs.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:(0,fs.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"},aliases:(0,cl.isAppleOS)()?[]:[{modifier:"primary",character:"y"}]}),e({name:"core/editor/toggle-list-view",category:"global",description:(0,fs.__)("Show or hide the List View."),keyCombination:{modifier:"access",character:"o"}}),e({name:"core/editor/toggle-distraction-free",category:"global",description:(0,fs.__)("Enter or exit distraction free mode."),keyCombination:{modifier:"primaryShift",character:"\\"}}),e({name:"core/editor/toggle-sidebar",category:"global",description:(0,fs.__)("Show or hide the Settings panel."),keyCombination:{modifier:"primaryShift",character:","}}),e({name:"core/editor/keyboard-shortcuts",category:"main",description:(0,fs.__)("Display these keyboard shortcuts."),keyCombination:{modifier:"access",character:"h"}}),e({name:"core/editor/next-region",category:"global",description:(0,fs.__)("Navigate to the next part of the editor."),keyCombination:{modifier:"ctrl",character:"`"},aliases:[{modifier:"access",character:"n"}]}),e({name:"core/editor/previous-region",category:"global",description:(0,fs.__)("Navigate to the previous part of the editor."),keyCombination:{modifier:"ctrlShift",character:"`"},aliases:[{modifier:"access",character:"p"},{modifier:"ctrlShift",character:"~"}]})}),[e]),(0,c.jsx)(g.BlockEditorKeyboardShortcuts.Register,{})},od=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"})}),rd=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})});var id=(0,p.forwardRef)((function(e,t){const s=(0,cl.isAppleOS)()?cl.displayShortcut.primaryShift("z"):cl.displayShortcut.primary("y"),n=(0,d.useSelect)((e=>e(wc).hasEditorRedo()),[]),{redo:o}=(0,d.useDispatch)(wc);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,fs.isRTL)()?rd:od,label:(0,fs.__)("Redo"),shortcut:s,"aria-disabled":!n,onClick:n?o:void 0,className:"editor-history__redo"})}));var ad=(0,p.forwardRef)((function(e,t){const s=(0,d.useSelect)((e=>e(wc).hasEditorUndo()),[]),{undo:n}=(0,d.useDispatch)(wc);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,...e,ref:t,icon:(0,fs.isRTL)()?od:rd,label:(0,fs.__)("Undo"),shortcut:cl.displayShortcut.primary("z"),"aria-disabled":!s,onClick:s?n:void 0,className:"editor-history__undo"})}));function ld(){const[e,t]=(0,p.useState)(!1),s=(0,d.useSelect)((e=>e(g.store).isValidTemplate()),[]),{setTemplateValidity:n,synchronizeTemplate:o}=(0,d.useDispatch)(g.store);return s?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:(0,fs.__)("Keep it as is"),onClick:()=>n(!0)},{label:(0,fs.__)("Reset the template"),onClick:()=>t(!0)}],children:(0,fs.__)("The content of your post doesn’t match the template assigned to your post type.")}),(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:e,confirmButtonText:(0,fs.__)("Reset"),onConfirm:()=>{t(!1),o()},onCancel:()=>t(!1),size:"medium",children:(0,fs.__)("Resetting the template may result in loss of content, do you want to continue?")})]})}var cd=function(){const{notices:e}=(0,d.useSelect)((e=>({notices:e(_s.store).getNotices()})),[]),{removeNotice:t}=(0,d.useDispatch)(_s.store),s=e.filter((({isDismissible:e,type:t})=>e&&"default"===t)),n=e.filter((({isDismissible:e,type:t})=>!e&&"default"===t));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.NoticeList,{notices:n,className:"components-editor-notices__pinned"}),(0,c.jsx)(Fn.NoticeList,{notices:s,className:"components-editor-notices__dismissible",onRemove:t,children:(0,c.jsx)(ld,{})})]})};const dd=-3;function ud(){const e=(0,d.useSelect)((e=>e(_s.store).getNotices()),[]),{removeNotice:t}=(0,d.useDispatch)(_s.store),s=e.filter((({type:e})=>"snackbar"===e)).slice(dd);return(0,c.jsx)(Fn.SnackbarList,{notices:s,className:"components-editor-notices__snackbar",onRemove:t})}function pd({record:e,checked:t,onChange:s}){const{name:n,kind:o,title:r,key:i}=e,{entityRecordTitle:a,hasPostMetaChanges:l}=(0,d.useSelect)((e=>{if("postType"!==o||"wp_template"!==n)return{entityRecordTitle:r,hasPostMetaChanges:$(e(wc)).hasPostMetaChanges(n,i)};const t=e(u.store).getEditedEntityRecord(o,n,i),{default_template_types:s=[]}=e(u.store).getCurrentTheme()??{};return{entityRecordTitle:Y({template:t,templateTypes:s}).title,hasPostMetaChanges:$(e(wc)).hasPostMetaChanges(n,i)}}),[n,o,r,i]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.PanelRow,{children:(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,Ln.decodeEntities)(a)||(0,fs.__)("Untitled"),checked:t,onChange:s,className:"entities-saved-states__change-control"})}),l&&(0,c.jsx)("ul",{className:"entities-saved-states__changes",children:(0,c.jsx)("li",{children:(0,fs.__)("Post Meta.")})})]})}const{getGlobalStylesChanges:md,GlobalStylesContext:hd}=$(g.privateApis);function gd({record:e}){const{user:t}=(0,p.useContext)(hd),s=(0,d.useSelect)((t=>t(u.store).getEntityRecord(e.kind,e.name,e.key)),[e.kind,e.name,e.key]),n=md(t,s,{maxResults:10});return n.length?(0,c.jsx)("ul",{className:"entities-saved-states__changes",children:n.map((e=>(0,c.jsx)("li",{children:e},e)))}):null}function _d({record:e,count:t}){if("globalStyles"===e?.name)return null;const s=function(e,t){switch(e){case"site":return 1===t?(0,fs.__)("This change will affect your whole site."):(0,fs.__)("These changes will affect your whole site.");case"wp_template":return(0,fs.__)("This change will affect other parts of your site that use this template.");case"page":case"post":return(0,fs.__)("The following has been modified.")}}(e?.name,t);return s?(0,c.jsx)(Fn.PanelRow,{children:s}):null}function fd({list:e,unselectedEntities:t,setUnselectedEntities:s}){const n=e.length,o=e[0];let r=(0,d.useSelect)((e=>e(u.store).getEntityConfig(o.kind,o.name)),[o.kind,o.name]).label;return"wp_template_part"===o?.name&&(r=1===n?(0,fs.__)("Template Part"):(0,fs.__)("Template Parts")),(0,c.jsxs)(Fn.PanelBody,{title:r,initialOpen:!0,className:"entities-saved-states__panel-body",children:[(0,c.jsx)(_d,{record:o,count:n}),e.map((e=>(0,c.jsx)(pd,{record:e,checked:!t.some((t=>t.kind===e.kind&&t.name===e.name&&t.key===e.key&&t.property===e.property)),onChange:t=>s(e,t)},e.key||e.property))),"globalStyles"===o?.name&&(0,c.jsx)(gd,{record:o})]})}const bd=()=>{const{editedEntities:e,siteEdits:t,siteEntityConfig:s}=(0,d.useSelect)((e=>{const{__experimentalGetDirtyEntityRecords:t,getEntityRecordEdits:s,getEntityConfig:n}=e(u.store);return{editedEntities:t(),siteEdits:s("root","site"),siteEntityConfig:n("root","site")}}),[]),n=(0,p.useMemo)((()=>{const n=e.filter((e=>!("root"===e.kind&&"site"===e.name))),o=s?.meta?.labels??{},r=[];for(const e in t)r.push({kind:"root",name:"site",title:o[e]||e,property:e});return[...n,...r]}),[e,t,s]),[o,r]=(0,p.useState)([]);return{dirtyEntityRecords:n,isDirty:n.length-o.length>0,setUnselectedEntities:({kind:e,name:t,key:s,property:n},i)=>{r(i?o.filter((o=>o.kind!==e||o.name!==t||o.key!==s||o.property!==n)):[...o,{kind:e,name:t,key:s,property:n}])},unselectedEntities:o}};function yd(e){return e}function xd({close:e,renderDialog:t,variant:s}){const n=bd();return(0,c.jsx)(vd,{close:e,renderDialog:t,variant:s,...n})}function vd({additionalPrompt:e,close:t,onSave:s=yd,saveEnabled:n,saveLabel:o=(0,fs.__)("Save"),renderDialog:r,dirtyEntityRecords:i,isDirty:a,setUnselectedEntities:l,unselectedEntities:u,variant:h="default"}){const g=(0,p.useRef)(),{saveDirtyEntities:_}=$((0,d.useDispatch)(wc)),f=i.reduce(((e,t)=>{const{name:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),{site:b,wp_template:y,wp_template_part:x,...v}=f,w=[b,y,x,...Object.values(v)].filter(Array.isArray),S=n??a,k=(0,p.useCallback)((()=>t()),[t]),[C,P]=(0,m.__experimentalUseDialog)({onClose:()=>k()}),j=(0,m.useInstanceId)(vd,"entities-saved-states__panel-label"),E=(0,m.useInstanceId)(vd,"entities-saved-states__panel-description"),T=i.length?(0,fs.__)("Select the items you want to save."):void 0,B="inline"===h,I=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.FlexItem,{isBlock:!B,as:Fn.Button,variant:B?"tertiary":"secondary",size:B?void 0:"compact",onClick:k,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.FlexItem,{isBlock:!B,as:Fn.Button,ref:g,variant:"primary",size:B?void 0:"compact",disabled:!S,accessibleWhenDisabled:!0,onClick:()=>_({onSave:s,dirtyEntityRecords:i,entitiesToSkip:u,close:t}),className:"editor-entities-saved-states__save-button",children:o})]});return(0,c.jsxs)("div",{ref:r?C:void 0,...r&&P,className:hr("entities-saved-states__panel",{"is-inline":B}),role:r?"dialog":void 0,"aria-labelledby":r?j:void 0,"aria-describedby":r?E:void 0,children:[!B&&(0,c.jsx)(Fn.Flex,{className:"entities-saved-states__panel-header",gap:2,children:I}),(0,c.jsxs)("div",{className:"entities-saved-states__text-prompt",children:[(0,c.jsx)("div",{className:"entities-saved-states__text-prompt--header-wrapper",children:(0,c.jsx)("strong",{id:r?j:void 0,className:"entities-saved-states__text-prompt--header",children:(0,fs.__)("Are you ready to save?")})}),(0,c.jsxs)("div",{id:r?E:void 0,children:[e,(0,c.jsx)("p",{className:"entities-saved-states__text-prompt--changes-count",children:a?(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs._n)("There is <strong>%d site change</strong> waiting to be saved.","There are <strong>%d site changes</strong> waiting to be saved.",i.length),i.length),{strong:(0,c.jsx)("strong",{})}):T})]})]}),w.map((e=>(0,c.jsx)(fd,{list:e,unselectedEntities:u,setUnselectedEntities:l},e[0].name))),B&&(0,c.jsx)(Fn.Flex,{direction:"row",justify:"flex-end",className:"entities-saved-states__panel-footer",children:I})]})}function wd(){try{return(0,d.select)(wc).getEditedPostContent()}catch(e){}}function Sd({text:e,children:t,variant:s="secondary"}){const n=(0,m.useCopyToClipboard)(e);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:s,ref:n,children:t})}class kd extends p.Component{constructor(){super(...arguments),this.state={error:null}}componentDidCatch(e){(0,h.doAction)("editor.ErrorBoundary.errorLogged",e)}static getDerivedStateFromError(e){return{error:e}}render(){const{error:e}=this.state,{canCopyContent:t=!1}=this.props;return e?(0,c.jsxs)(Fn.__experimentalHStack,{className:"editor-error-boundary",alignment:"baseline",spacing:4,justify:"space-between",expanded:!1,wrap:!0,children:[(0,c.jsx)(Fn.__experimentalText,{as:"p",children:(0,fs.__)("The editor has encountered an unexpected error.")}),(0,c.jsxs)(Fn.__experimentalHStack,{expanded:!1,children:[t&&(0,c.jsx)(Sd,{text:wd,children:(0,fs.__)("Copy contents")}),(0,c.jsx)(Sd,{variant:"primary",text:e?.stack,children:(0,fs.__)("Copy error")})]})]}):this.props.children}}var Cd=kd;const Pd=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame;let jd;function Ed(){const{postId:e,isEditedPostNew:t,hasRemoteAutosave:s}=(0,d.useSelect)((e=>({postId:e(wc).getCurrentPostId(),isEditedPostNew:e(wc).isEditedPostNew(),hasRemoteAutosave:!!e(wc).getEditorSettings().autosave})),[]),{getEditedPostAttribute:n}=(0,d.useSelect)(wc),{createWarningNotice:o,removeNotice:r}=(0,d.useDispatch)(_s.store),{editPost:i,resetEditorBlocks:a}=(0,d.useDispatch)(wc);(0,p.useEffect)((()=>{let l=function(e,t){return window.sessionStorage.getItem(bs(e,t))}(e,t);if(!l)return;try{l=JSON.parse(l)}catch{return}const{post_title:c,content:d,excerpt:u}=l,p={title:c,content:d,excerpt:u};if(!Object.keys(p).some((e=>p[e]!==n(e))))return void ys(e,t);if(s)return;const m="wpEditorAutosaveRestore";o((0,fs.__)("The backup of this post in your browser is different from the version below."),{id:m,actions:[{label:(0,fs.__)("Restore the backup"),onClick(){const{content:e,...t}=p;i(t),a((0,x.parse)(p.content)),r(m)}}]})}),[t,e])}var Td=(0,m.ifCondition)((()=>{if(void 0!==jd)return jd;try{window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),jd=!0}catch{jd=!1}return jd}))((function(){const{autosave:e}=(0,d.useDispatch)(wc),t=(0,p.useCallback)((()=>{Pd((()=>e({local:!0})))}),[]);Ed(),function(){const{postId:e,isEditedPostNew:t,isDirty:s,isAutosaving:n,didError:o}=(0,d.useSelect)((e=>({postId:e(wc).getCurrentPostId(),isEditedPostNew:e(wc).isEditedPostNew(),isDirty:e(wc).isEditedPostDirty(),isAutosaving:e(wc).isAutosavingPost(),didError:e(wc).didPostSaveRequestFail()})),[]),r=(0,p.useRef)(s),i=(0,p.useRef)(n);(0,p.useEffect)((()=>{!o&&(i.current&&!n||r.current&&!s)&&ys(e,t),r.current=s,i.current=n}),[s,n,o]);const a=(0,m.usePrevious)(t),l=(0,m.usePrevious)(e);(0,p.useEffect)((()=>{l===e&&a&&!t&&ys(e,!0)}),[t,e])}();const s=(0,d.useSelect)((e=>e(wc).getEditorSettings().localAutosaveInterval),[]);return(0,c.jsx)(Fc,{interval:s,autosave:t})}));var Bd=function({children:e}){const t=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc),{getPostType:s}=e(u.store),n=s(t("type"));return!!n?.supports?.["page-attributes"]}),[]);return t?e:null};var Id=function({children:e,supportKeys:t}){const s=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc),{getPostType:s}=e(u.store);return s(t("type"))}),[]);let n=!!s;return s&&(n=(Array.isArray(t)?t:[t]).some((e=>function(e={},t){if(void 0!==e[t])return!!e[t];const[s,n]=t.split("."),[o]=Array.isArray(e[s])?e[s]:[];return Array.isArray(o)?o.includes(n):!!o?.[n]}(s.supports,e)))),n?e:null};function Nd(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("menu_order")??0),[]),{editPost:t}=(0,d.useDispatch)(wc),[s,n]=(0,p.useState)(null),o=s??e;return(0,c.jsx)(Fn.Flex,{children:(0,c.jsx)(Fn.FlexBlock,{children:(0,c.jsx)(Fn.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,fs.__)("Order"),help:(0,fs.__)("Set the page order."),value:o,onChange:e=>{n(e);const s=Number(e);Number.isInteger(s)&&""!==e.trim?.()&&t({menu_order:s})},hideLabelFromVision:!0,onBlur:()=>{n(null)}})})})}function Rd(){return(0,c.jsx)(Id,{supportKeys:"page-attributes",children:(0,c.jsx)(Nd,{})})}var Dd=(0,p.forwardRef)((({className:e,label:t,children:s},n)=>(0,c.jsxs)(Fn.__experimentalHStack,{className:hr("editor-post-panel__row",e),ref:n,children:[t&&(0,c.jsx)("div",{className:"editor-post-panel__row-label",children:t}),(0,c.jsx)("div",{className:"editor-post-panel__row-control",children:s})]})));function Ad(e){const t=e.map((e=>({children:[],parent:void 0,...e})));if(t.some((({parent:e})=>void 0===e)))return t;const s=t.reduce(((e,t)=>{const{parent:s}=t;return e[s]||(e[s]=[]),e[s].push(t),e}),{}),n=e=>e.map((e=>{const t=s[e.id];return{...e,children:t&&t.length?n(t):[]}}));return n(s[0]||[])}const Md=e=>(0,Ln.decodeEntities)(e),Ld=e=>({...e,name:Md(e.name)}),Od=e=>(e??[]).map(Ld);function Fd(e){return e?.title?.rendered?(0,Ln.decodeEntities)(e.title.rendered):`#${e.id} (${(0,fs.__)("no title")})`}const Vd=(e,t)=>{const s=Lr()(e||"").toLowerCase(),n=Lr()(t||"").toLowerCase();return s===n?0:s.startsWith(n)?s.length:1/0};function Ud(){const{editPost:e}=(0,d.useDispatch)(wc),[t,s]=(0,p.useState)(!1),{isHierarchical:n,parentPostId:o,parentPostTitle:r,pageItems:i,isLoading:a}=(0,d.useSelect)((e=>{const{getPostType:s,getEntityRecords:n,getEntityRecord:o,isResolving:r}=e(u.store),{getCurrentPostId:i,getEditedPostAttribute:a}=e(wc),l=a("type"),c=a("parent"),d=s(l),p=i(),m=d?.hierarchical??!1,h={per_page:100,exclude:p,parent_exclude:p,orderby:"menu_order",order:"asc",_fields:"id,title,parent"};t&&(h.search=t);const g=c?o("postType",l,c):null;return{isHierarchical:m,parentPostId:c,parentPostTitle:g?Fd(g):"",pageItems:m?n("postType",l,h):null,isLoading:!!m&&r("getEntityRecords",["postType",l,h])}}),[t]),l=(0,p.useMemo)((()=>{const e=(s,n=0)=>{const o=s.map((t=>[{value:t.id,label:"— ".repeat(n)+(0,Ln.decodeEntities)(t.name),rawName:t.name},...e(t.children||[],n+1)])).sort((([e],[s])=>Vd(e.rawName,t)>=Vd(s.rawName,t)?1:-1));return o.flat()};if(!i)return[];let s=i.map((e=>({id:e.id,parent:e.parent,name:Fd(e)})));t||(s=Ad(s));const n=e(s),a=n.find((e=>e.value===o));return r&&!a&&n.unshift({value:o,label:r}),n}),[i,t,r,o]);if(!n)return null;return(0,c.jsx)(Fn.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"editor-page-attributes__parent",label:(0,fs.__)("Parent"),help:(0,fs.__)("Choose a parent page."),value:o,options:l,onFilterValueChange:(0,m.debounce)((e=>{s(e)}),300),onChange:t=>{e({parent:t})},hideLabelFromVision:!0,isLoading:a})}function Hd({isOpen:e,onClick:t}){const s=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc),s=t("parent");if(!s)return null;const{getEntityRecord:n}=e(u.store);return n("postType",t("type"),s)}),[]),n=(0,p.useMemo)((()=>s?Fd(s):(0,fs.__)("None")),[s]);return(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-parent__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change parent: %s"),n),onClick:t,children:n})}function zd(){const e=(0,d.useSelect)((e=>e(u.store).getEntityRecord("root","__unstableBase")?.home),[]),[t,s]=(0,p.useState)(null),n=(0,p.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return(0,c.jsx)(Dd,{label:(0,fs.__)("Parent"),ref:s,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:n,className:"editor-post-parent__panel-dropdown",contentClassName:"editor-post-parent__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Hd,{isOpen:e,onClick:t}),renderContent:({onClose:t})=>(0,c.jsxs)("div",{className:"editor-post-parent",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Parent"),onClose:t}),(0,c.jsxs)("div",{children:[(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs.__)('Child pages inherit characteristics from their parent, such as URL structure. For instance, if "Pricing" is a child of "Services", its URL would be %s<wbr />/services<wbr />/pricing.'),(0,w.filterURLForDisplay)(e).replace(/([/.])/g,"<wbr />$1")),{wbr:(0,c.jsx)("wbr",{})}),(0,c.jsx)("p",{children:(0,p.createInterpolateElement)((0,fs.__)("They also show up as sub-items in the default navigation menu. <a>Learn more.</a>"),{a:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes")})})})]}),(0,c.jsx)(Ud,{})]})})})}var Gd=Ud;const $d="page-attributes";function Wd(){const{isEnabled:e,postType:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s}=e(wc),{getPostType:n}=e(u.store);return{isEnabled:s($d),postType:n(t("type"))}}),[]);return e&&t?(0,c.jsx)(zd,{}):null}function Zd(){return(0,c.jsx)(Bd,{children:(0,c.jsx)(Wd,{})})}var Yd=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z"})});const qd=(0,fs.__)("Custom Template");function Kd({onClose:e}){const{defaultBlockTemplate:t,onNavigateToEntityRecord:s}=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:s}=e(wc);return{defaultBlockTemplate:t().defaultBlockTemplate,onNavigateToEntityRecord:t().onNavigateToEntityRecord,getTemplateId:s}})),{createTemplate:n}=$((0,d.useDispatch)(wc)),[o,r]=(0,p.useState)(""),[i,a]=(0,p.useState)(!1),l=()=>{r(""),e()};return(0,c.jsx)(Fn.Modal,{title:(0,fs.__)("Create custom template"),onRequestClose:l,focusOnMount:"firstContentElement",size:"small",overlayClassName:"editor-post-template__create-template-modal",children:(0,c.jsx)("form",{className:"editor-post-template__create-form",onSubmit:async e=>{if(e.preventDefault(),i)return;a(!0);const r=t??(0,x.serialize)([(0,x.createBlock)("core/group",{tagName:"header",layout:{inherit:!0}},[(0,x.createBlock)("core/site-title"),(0,x.createBlock)("core/site-tagline")]),(0,x.createBlock)("core/separator"),(0,x.createBlock)("core/group",{tagName:"main"},[(0,x.createBlock)("core/group",{layout:{inherit:!0}},[(0,x.createBlock)("core/post-title")]),(0,x.createBlock)("core/post-content",{layout:{inherit:!0}})])]),c=await n({slug:eo(o||qd)||"wp-custom-template",content:r,title:o||qd,status:"publish"});a(!1),s({postId:c.id,postType:"wp_template"}),l()},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"3",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,fs.__)("Name"),value:o,onChange:r,placeholder:qd,disabled:i,help:(0,fs.__)('Describe the template, e.g. "Post with sidebar". A custom template can be manually applied to any post or page.')}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:l,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",isBusy:i,"aria-disabled":i,children:(0,fs.__)("Create")})]})]})})})}function Qd(){return(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s}=e(wc);return{postId:t(),postType:s()}}),[])}function Xd(){const{postType:e,postId:t}=Qd();return(0,d.useSelect)((s=>{const{canUser:n,getEntityRecord:o,getEntityRecords:r}=s(u.store),i=n("read",{kind:"root",name:"site"})?o("root","site"):void 0,a=+t===i?.page_for_posts,l="page"===e&&+t===i?.page_on_front,c=l?r("postType","wp_template",{per_page:-1}):[],d=l&&!!c?.some((({slug:e})=>"front-page"===e));return!a&&!d}),[t,e])}function Jd(e){return(0,d.useSelect)((t=>t(u.store).getEntityRecords("postType","wp_template",{per_page:-1,post_type:e})),[e])}function eu(e){const t=tu(),s=Xd(),n=Jd(e);return(0,p.useMemo)((()=>s&&n?.filter((e=>(e.is_custom||"wp_template"===e.type)&&e.slug!==t&&!!e.content.raw))),[n,t,s])}function tu(){const{postType:e,postId:t}=Qd(),s=Jd(e),n=(0,d.useSelect)((s=>{const n=s(u.store).getEditedEntityRecord("postType",e,t);return n?.template}),[e,t]);if(n)return s?.find((e=>e.slug===n))?.slug}function su({isOpen:e,onClick:t}){const s=(0,d.useSelect)((e=>{const t=e(wc).getEditedPostAttribute("template"),{supportsTemplateMode:s,availableTemplates:n}=e(wc).getEditorSettings();if(!s&&n[t])return n[t];const o=e(u.store).canUser("create",{kind:"postType",name:"wp_template"})&&e(wc).getCurrentTemplateId();return o?.title||o?.slug||n?.[t]}),[]);return(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.__)("Template options"),onClick:t,children:s??(0,fs.__)("Default template")})}function nu({onClose:e}){const t=Xd(),{availableTemplates:s,fetchedTemplates:n,selectedTemplateSlug:o,canCreate:r,canEdit:i,currentTemplateId:a,onNavigateToEntityRecord:l,getEditorSettings:m}=(0,d.useSelect)((e=>{const{canUser:s,getEntityRecords:n}=e(u.store),o=e(wc).getEditorSettings(),r=s("create",{kind:"postType",name:"wp_template"}),i=e(wc).getCurrentTemplateId();return{availableTemplates:o.availableTemplates,fetchedTemplates:r?n("postType","wp_template",{post_type:e(wc).getCurrentPostType(),per_page:-1}):void 0,selectedTemplateSlug:e(wc).getEditedPostAttribute("template"),canCreate:t&&r&&o.supportsTemplateMode,canEdit:t&&r&&o.supportsTemplateMode&&!!i,currentTemplateId:i,onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:e(wc).getEditorSettings}}),[t]),h=(0,p.useMemo)((()=>Object.entries({...s,...Object.fromEntries((n??[]).map((({slug:e,title:t})=>[e,t.rendered])))}).map((([e,t])=>({value:e,label:t})))),[s,n]),_=h.find((e=>e.value===o))??h.find((e=>!e.value)),{editPost:f}=(0,d.useDispatch)(wc),{createSuccessNotice:b}=(0,d.useDispatch)(_s.store),[y,x]=(0,p.useState)(!1);return(0,c.jsxs)("div",{className:"editor-post-template__classic-theme-dropdown",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Template"),help:(0,fs.__)("Templates define the way content is displayed when viewing your site."),actions:r?[{icon:Yd,label:(0,fs.__)("Add template"),onClick:()=>x(!0)}]:[],onClose:e}),t?(0,c.jsx)(Fn.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,hideLabelFromVision:!0,label:(0,fs.__)("Template"),value:_?.value??"",options:h,onChange:e=>f({template:e||""})}):(0,c.jsx)(Fn.Notice,{status:"warning",isDismissible:!1,children:(0,fs.__)("The posts page template cannot be changed.")}),i&&l&&(0,c.jsx)("p",{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>{l({postId:a,postType:"wp_template"}),e(),b((0,fs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:[{label:(0,fs.__)("Go back"),onClick:()=>m().onNavigateToPreviousEntityRecord()}]})},children:(0,fs.__)("Edit template")})}),y&&(0,c.jsx)(Kd,{onClose:()=>x(!1)})]})}var ou=function(){const[e,t]=(0,p.useState)(null),s=(0,p.useMemo)((()=>({anchor:e,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0})),[e]);return(0,c.jsx)(Dd,{label:(0,fs.__)("Template"),ref:t,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:s,focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(su,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsx)(nu,{onClose:e})})})};const ru=window.wp.warning;var iu=s.n(ru);const{PreferenceBaseOption:au}=$(C.privateApis);function lu(e){const{toggleEditorPanelEnabled:t}=(0,d.useDispatch)(wc),{isChecked:s,isRemoved:n}=(0,d.useSelect)((t=>{const{isEditorPanelEnabled:s,isEditorPanelRemoved:n}=t(wc);return{isChecked:s(e.panelName),isRemoved:n(e.panelName)}}),[e.panelName]);return n?null:(0,c.jsx)(au,{isChecked:s,onChange:()=>t(e.panelName),...e})}const{Fill:cu,Slot:du}=(0,Fn.createSlotFill)("EnablePluginDocumentSettingPanelOption"),uu=({label:e,panelName:t})=>(0,c.jsx)(cu,{children:(0,c.jsx)(lu,{label:e,panelName:t})});uu.Slot=du;var pu=uu;const{Fill:mu,Slot:hu}=(0,Fn.createSlotFill)("PluginDocumentSettingPanel"),gu=({name:e,className:t,title:s,icon:n,children:o})=>{const{name:r}=(0,la.usePluginContext)(),i=`${r}/${e}`,{opened:a,isEnabled:l}=(0,d.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s}=e(wc);return{opened:t(i),isEnabled:s(i)}}),[i]),{toggleEditorPanelOpened:u}=(0,d.useDispatch)(wc);return void 0===e&&iu()("PluginDocumentSettingPanel requires a name property."),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(pu,{label:s,panelName:i}),(0,c.jsx)(mu,{children:l&&(0,c.jsx)(Fn.PanelBody,{className:t,title:s,icon:n,opened:a,onToggle:()=>u(i),children:o})})]})};gu.Slot=hu;var _u=gu;var fu=({allowedBlocks:e,icon:t,label:s,onClick:n,small:o,role:r})=>(0,c.jsx)(g.BlockSettingsMenuControls,{children:({selectedBlocks:i,onClose:a})=>((e,t)=>{return!Array.isArray(t)||(s=t,0===e.filter((e=>!s.includes(e))).length);var s})(i,e)?(0,c.jsx)(Fn.MenuItem,{onClick:(0,m.compose)(n,a),icon:t,label:o?s:void 0,role:r,children:!o&&s}):null});function bu(e){const t=(0,la.usePluginContext)();return(0,c.jsx)(Ra,{name:"core/plugin-more-menu",as:e.as??Fn.MenuItem,icon:e.icon||t.icon,...e})}const{Fill:yu,Slot:xu}=(0,Fn.createSlotFill)("PluginPostPublishPanel"),vu=({children:e,className:t,title:s,initialOpen:n=!1,icon:o})=>{const{icon:r}=(0,la.usePluginContext)();return(0,c.jsx)(yu,{children:(0,c.jsx)(Fn.PanelBody,{className:t,initialOpen:n||!s,title:s,icon:o??r,children:e})})};vu.Slot=xu;var wu=vu;const{Fill:Su,Slot:ku}=(0,Fn.createSlotFill)("PluginPostStatusInfo"),Cu=({children:e,className:t})=>(0,c.jsx)(Su,{children:(0,c.jsx)(Fn.PanelRow,{className:t,children:e})});Cu.Slot=ku;var Pu=Cu;const{Fill:ju,Slot:Eu}=(0,Fn.createSlotFill)("PluginPrePublishPanel"),Tu=({children:e,className:t,title:s,initialOpen:n=!1,icon:o})=>{const{icon:r}=(0,la.usePluginContext)();return(0,c.jsx)(ju,{children:(0,c.jsx)(Fn.PanelBody,{className:t,initialOpen:n||!s,title:s,icon:o??r,children:e})})};Tu.Slot=Eu;var Bu=Tu;function Iu(e){const t=(0,la.usePluginContext)();return(0,c.jsx)(Ra,{name:"core/plugin-preview-menu",as:e.as??Fn.MenuItem,icon:e.icon||t.icon,...e})}function Nu({className:e,...t}){return(0,c.jsx)(Ua,{panelClassName:e,className:"editor-sidebar",scope:"core",...t})}function Ru(e){return(0,c.jsx)(Aa,{__unstableExplicitMenuItem:!0,scope:"core",...e})}function Du(e=""){return e=(e=Lr()(e)).trim().toLowerCase()}function Au(e,t){const s=Du(t),n=Du(e.title);let o=0;if(s===n)o+=30;else if(n.startsWith(s))o+=20;else{s.split(" ").every((e=>n.includes(e)))&&(o+=10)}return o}function Mu({onClick:e}){const[t,s]=(0,p.useState)(!1),{postType:n,postId:o}=Qd(),r=eu(n),{editEntityRecord:i}=(0,d.useDispatch)(u.store);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuItem,{disabled:!r?.length,accessibleWhenDisabled:!0,onClick:()=>s(!0),children:(0,fs.__)("Change template")}),t&&(0,c.jsx)(Fn.Modal,{title:(0,fs.__)("Choose a template"),onRequestClose:()=>s(!1),overlayClassName:"editor-post-template__swap-template-modal",isFullScreen:!0,children:(0,c.jsx)("div",{className:"editor-post-template__swap-template-modal-content",children:(0,c.jsx)(Lu,{postType:n,onSelect:async t=>{i("postType",n,o,{template:t.name},{undoIgnore:!0}),s(!1),e()}})})})]})}function Lu({postType:e,onSelect:t}){const[s,n]=(0,p.useState)(""),o=eu(e),r=(0,p.useMemo)((()=>o.map((e=>({name:e.slug,blocks:(0,x.parse)(e.content.raw),title:(0,Ln.decodeEntities)(e.title.rendered),id:e.id})))),[o]),i=(0,p.useMemo)((()=>function(e=[],t=""){if(!t)return e;const s=e.map((e=>[e,Au(e,t)])).filter((([,e])=>e>0));return s.sort((([,e],[,t])=>t-e)),s.map((([e])=>e))}(r,s)),[r,s]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.SearchControl,{__nextHasNoMarginBottom:!0,onChange:n,value:s,label:(0,fs.__)("Search"),placeholder:(0,fs.__)("Search"),className:"editor-post-template__swap-template-search"}),(0,c.jsx)(g.__experimentalBlockPatternsList,{label:(0,fs.__)("Templates"),blockPatterns:i,onClickPattern:t})]})}function Ou({onClick:e}){const t=tu(),s=Xd(),{postType:n,postId:o}=Qd(),{editEntityRecord:r}=(0,d.useDispatch)(u.store);return t&&s?(0,c.jsx)(Fn.MenuItem,{onClick:()=>{r("postType",n,o,{template:""},{undoIgnore:!0}),e()},children:(0,fs.__)("Use default template")}):null}function Fu(){const{canCreateTemplates:e}=(0,d.useSelect)((e=>{const{canUser:t}=e(u.store);return{canCreateTemplates:t("create",{kind:"postType",name:"wp_template"})}}),[]),[t,s]=(0,p.useState)(!1),n=Xd();return e&&n?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuItem,{onClick:()=>{s(!0)},children:(0,fs.__)("Create new template")}),t&&(0,c.jsx)(Kd,{onClose:()=>{s(!1)}})]}):null}function Vu({id:e}){const{isTemplateHidden:t,onNavigateToEntityRecord:s,getEditorSettings:n,hasGoBack:o,hasSpecificTemplate:r}=(0,d.useSelect)((e=>{const{getRenderingMode:t,getEditorSettings:s,getCurrentPost:n}=$(e(wc)),o=s(),r=n();return{isTemplateHidden:"post-only"===t(),onNavigateToEntityRecord:o.onNavigateToEntityRecord,getEditorSettings:s,hasGoBack:o.hasOwnProperty("onNavigateToPreviousEntityRecord"),hasSpecificTemplate:!!r.template}}),[]),{get:i}=(0,d.useSelect)(C.store),{editedRecord:a,hasResolved:l}=(0,u.useEntityRecord)("postType","wp_template",e),{getEntityRecord:m}=(0,d.useSelect)(u.store),{editEntityRecord:h}=(0,d.useDispatch)(u.store),{createSuccessNotice:g}=(0,d.useDispatch)(_s.store),{setRenderingMode:_,setDefaultRenderingMode:f}=$((0,d.useDispatch)(wc)),b=(0,d.useSelect)((e=>!!e(u.store).canUser("create",{kind:"postType",name:"wp_template"})),[]),[y,x]=(0,p.useState)(null),v=(0,p.useMemo)((()=>({anchor:y,className:"editor-post-template__dropdown",placement:"left-start",offset:36,shift:!0})),[y]);if(!l)return null;const w=o?[{label:(0,fs.__)("Go back"),onClick:()=>n().onNavigateToPreviousEntityRecord()}]:void 0;return(0,c.jsx)(Dd,{label:(0,fs.__)("Template"),ref:x,children:(0,c.jsx)(Fn.DropdownMenu,{popoverProps:v,focusOnMount:!0,toggleProps:{size:"compact",variant:"tertiary",tooltipPosition:"middle left"},label:(0,fs.__)("Template options"),text:(0,Ln.decodeEntities)(a.title),icon:null,children:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Fn.MenuGroup,{children:[b&&(0,c.jsx)(Fn.MenuItem,{onClick:async()=>{if(s({postId:a.id,postType:"wp_template"}),!r){const e=await m("root","site").active_templates;e[a.slug]!==a.id&&h("root","site",void 0,{active_templates:{...e,[a.slug]:a.id}})}e(),i("core/edit-site","welcomeGuideTemplate")||g((0,fs.__)("Editing template. Changes made here affect all posts and pages that use the template."),{type:"snackbar",actions:w})},children:(0,fs.__)("Edit template")}),(0,c.jsx)(Mu,{onClick:e}),(0,c.jsx)(Ou,{onClick:e}),b&&(0,c.jsx)(Fu,{})]}),(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItem,{icon:t?void 0:Zn,isSelected:!t,role:"menuitemcheckbox",onClick:()=>{const e=t?"template-locked":"post-only";_(e),f(e)},children:(0,fs.__)("Show template")})})]})})})}function Uu(){const{templateId:e,isBlockTheme:t}=(0,d.useSelect)((e=>{const{getCurrentTemplateId:t,getEditorSettings:s}=e(wc);return{templateId:t(),isBlockTheme:s().__unstableIsBlockBasedTheme}}),[]),s=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPostType(),s=e(u.store).getPostType(t);if(!s?.viewable)return!1;const n=e(wc).getEditorSettings();if(!!n.availableTemplates&&Object.keys(n.availableTemplates).length>0)return!0;if(!n.supportsTemplateMode)return!1;return e(u.store).canUser("create",{kind:"postType",name:"wp_template"})??!1}),[]),n=(0,d.useSelect)((e=>e(u.store).canUser("read",{kind:"postType",name:"wp_template"})??!1),[]);return t&&n||!s?t&&e?(0,c.jsx)(Vu,{id:e}):null:(0,c.jsx)(ou,{})}const Hu={_fields:"id,name",context:"view"},zu={who:"authors",per_page:100,...Hu};function Gu(e){const{authorId:t,authors:s,postAuthor:n,isLoading:o}=(0,d.useSelect)((t=>{const{getUser:s,getUsers:n,isResolving:o}=t(u.store),{getEditedPostAttribute:r}=t(wc),i=r("author"),a={...zu};return e&&(a.search=e,a.search_columns=["name"]),{authorId:i,authors:n(a),postAuthor:s(i,Hu),isLoading:o("getUsers",[a])}}),[e]);return{authorId:t,authorOptions:(0,p.useMemo)((()=>{const e=(s??[]).map((e=>({value:e.id,label:(0,Ln.decodeEntities)(e.name)}))),t=e.findIndex((({value:e})=>n?.id===e));let o=[];return t<0&&n?o=[{value:n.id,label:(0,Ln.decodeEntities)(n.name)}]:t<0&&!n&&(o=[{value:0,label:(0,fs.__)("(No author)")}]),[...o,...e]}),[s,n]),postAuthor:n,isLoading:o}}function $u(){const[e,t]=(0,p.useState)(),{editPost:s}=(0,d.useDispatch)(wc),{authorId:n,authorOptions:o,isLoading:r}=Gu(e);return(0,c.jsx)(Fn.ComboboxControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:(0,fs.__)("Author"),options:o,value:n,onFilterValueChange:(0,m.debounce)(t,300),onChange:e=>{e&&s({author:e})},allowReset:!1,hideLabelFromVision:!0,isLoading:r})}function Wu(){const{editPost:e}=(0,d.useDispatch)(wc),{authorId:t,authorOptions:s}=Gu();return(0,c.jsx)(Fn.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-author-selector",label:(0,fs.__)("Author"),options:s,onChange:t=>{const s=Number(t);e({author:s})},value:t,hideLabelFromVision:!0})}var Zu=function(){return(0,d.useSelect)((e=>{const t=e(u.store).getUsers(zu);return t?.length>=25}),[])?(0,c.jsx)($u,{}):(0,c.jsx)(Wu,{})};function Yu({children:e}){const{hasAssignAuthorAction:t}=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPost();return{hasAssignAuthorAction:!!t?._links?.["wp:action-assign-author"]}}),[]);return t?(0,c.jsx)(Id,{supportKeys:"author",children:e}):null}function qu({isOpen:e,onClick:t}){const{postAuthor:s}=(0,d.useSelect)((e=>{const t=e(wc).getEditedPostAttribute("author");return{postAuthor:e(u.store).getUser(t,Hu)}}),[]),n=(0,Ln.decodeEntities)(s?.name)||(0,fs.__)("(No author)");return(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-author__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change author: %s"),n),onClick:t,children:n})}var Ku=function(){const[e,t]=(0,p.useState)(null),s=(0,p.useMemo)((()=>({anchor:e,placement:"left-start",offset:36,shift:!0})),[e]);return(0,c.jsx)(Yu,{children:(0,c.jsx)(Dd,{label:(0,fs.__)("Author"),ref:t,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:s,contentClassName:"editor-post-author__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(qu,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsxs)("div",{className:"editor-post-author",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Author"),onClose:e}),(0,c.jsx)(Zu,{onClose:e})]})})})})};const Qu=[{label:(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,fs.__)("Visitors can add new comments and replies.")},{label:(0,fs.__)("Closed"),value:"closed",description:[(0,fs.__)("Visitors cannot add new comments or replies."),(0,fs.__)("Existing comments remain visible.")].join(" ")}];var Xu=function(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("comment_status")??"open"),[]),{editPost:t}=(0,d.useDispatch)(wc);return(0,c.jsx)("form",{children:(0,c.jsx)(Fn.__experimentalVStack,{spacing:4,children:(0,c.jsx)(Fn.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,fs.__)("Comment status"),options:Qu,onChange:e=>t({comment_status:e}),selected:e})})})};var Ju=function(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("ping_status")??"open"),[]),{editPost:t}=(0,d.useDispatch)(wc);return(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Enable pingbacks & trackbacks"),checked:"open"===e,onChange:()=>t({ping_status:"open"===e?"closed":"open"}),help:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/trackbacks-and-pingbacks/"),children:(0,fs.__)("Learn more about pingbacks & trackbacks")})})};const ep="discussion-panel";function tp({onClose:e}){return(0,c.jsxs)("div",{className:"editor-post-discussion",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Discussion"),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(Id,{supportKeys:"comments",children:(0,c.jsx)(Xu,{})}),(0,c.jsx)(Id,{supportKeys:"trackbacks",children:(0,c.jsx)(Ju,{})})]})]})}function sp({isOpen:e,onClick:t}){const{commentStatus:s,pingStatus:n,commentsSupported:o,trackbacksSupported:r}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc),{getPostType:s}=e(u.store),n=s(t("type"));return{commentStatus:t("comment_status")??"open",pingStatus:t("ping_status")??"open",commentsSupported:!!n.supports.comments,trackbacksSupported:!!n.supports.trackbacks}}),[]);let i;return i="open"===s?"open"===n?(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'):r?(0,fs.__)("Comments only"):(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'):"open"===n?o?(0,fs.__)("Pings only"):(0,fs.__)("Pings enabled"):(0,fs.__)("Closed"),(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-discussion__panel-toggle",variant:"tertiary","aria-label":(0,fs.__)("Change discussion options"),"aria-expanded":e,onClick:t,children:i})}function np(){const{isEnabled:e}=(0,d.useSelect)((e=>{const{isEditorPanelEnabled:t}=e(wc);return{isEnabled:t(ep)}}),[]),[t,s]=(0,p.useState)(null),n=(0,p.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]);return e?(0,c.jsx)(Id,{supportKeys:["comments","trackbacks"],children:(0,c.jsx)(Dd,{label:(0,fs.__)("Discussion"),ref:s,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:n,className:"editor-post-discussion__panel-dropdown",contentClassName:"editor-post-discussion__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(sp,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsx)(tp,{onClose:e})})})}):null}function op({hideLabelFromVision:e=!1,updateOnBlur:t=!1}){const{excerpt:s,shouldUseDescriptionLabel:n,usedAttribute:o}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getEditedPostAttribute:s}=e(wc),n=t(),o=["wp_template","wp_template_part"].includes(n)?"description":"excerpt";return{excerpt:s(o),shouldUseDescriptionLabel:["wp_template","wp_template_part","wp_block"].includes(n),usedAttribute:o}}),[]),{editPost:r}=(0,d.useDispatch)(wc),[i,a]=(0,p.useState)((0,Ln.decodeEntities)(s)),l=e=>{r({[o]:e})},u=n?(0,fs.__)("Write a description (optional)"):(0,fs.__)("Write an excerpt (optional)");return(0,c.jsx)("div",{className:"editor-post-excerpt",children:(0,c.jsx)(Fn.TextareaControl,{__nextHasNoMarginBottom:!0,label:u,hideLabelFromVision:e,className:"editor-post-excerpt__textarea",onChange:t?a:l,onBlur:t?()=>l(i):void 0,value:t?i:s,help:n?(0,fs.__)("Write a description"):(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt"),children:(0,fs.__)("Learn more about manual excerpts")})})})}var rp=function({children:e}){return(0,c.jsx)(Id,{supportKeys:"excerpt",children:e})};const{Fill:ip,Slot:ap}=(0,Fn.createSlotFill)("PluginPostExcerpt"),lp=({children:e,className:t})=>(0,c.jsx)(ip,{children:(0,c.jsx)(Fn.PanelRow,{className:t,children:e})});lp.Slot=ap;var cp=lp;const dp="post-excerpt";function up(){const{isOpened:e,isEnabled:t,postType:s}=(0,d.useSelect)((e=>{const{isEditorPanelOpened:t,isEditorPanelEnabled:s,getCurrentPostType:n}=e(wc);return{isOpened:t(dp),isEnabled:s(dp),postType:n()}}),[]),{toggleEditorPanelOpened:n}=(0,d.useDispatch)(wc);if(!t)return null;const o=["wp_template","wp_template_part","wp_block"].includes(s);return(0,c.jsx)(Fn.PanelBody,{title:o?(0,fs.__)("Description"):(0,fs.__)("Excerpt"),opened:e,onToggle:()=>n(dp),children:(0,c.jsx)(cp.Slot,{children:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(op,{}),e]})})})}function pp(){return(0,c.jsx)(rp,{children:(0,c.jsx)(up,{})})}function mp(){return(0,c.jsx)(rp,{children:(0,c.jsx)(hp,{})})}function hp(){const{shouldRender:e,excerpt:t,shouldBeUsedAsDescription:s,allowEditing:n}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s,getEditedPostAttribute:n,isEditorPanelEnabled:o}=e(wc),r=t(),i=["wp_template","wp_template_part"].includes(r),a="wp_block"===r,l=i||a,c=n(i?"description":"excerpt"),d=i&&e(u.store).getEntityRecord("postType",r,s()),p=!c&&i?Y({template:d,templateTypes:e(u.store).getCurrentTheme()?.default_template_types})?.description:void 0,m=o(dp)||l;return{excerpt:c??p,shouldRender:m,shouldBeUsedAsDescription:l,allowEditing:m&&(!l||a||d&&d.source===D&&!d.has_theme_file&&d.is_custom)}}),[]),[o,r]=(0,p.useState)(null),i=s?(0,fs.__)("Description"):(0,fs.__)("Excerpt"),a=(0,p.useMemo)((()=>({anchor:o,"aria-label":i,headerTitle:i,placement:"left-start",offset:36,shift:!0})),[o,i]);if(!e)return!1;const l=!!t&&(0,c.jsx)(Fn.__experimentalText,{align:"left",numberOfLines:4,truncate:n,children:(0,Ln.decodeEntities)(t)});if(!n)return l;const m=s?(0,fs.__)("Add a description…"):(0,fs.__)("Add an excerpt…"),h=s?(0,fs.__)("Edit description"):(0,fs.__)("Edit excerpt");return(0,c.jsxs)(Fn.__experimentalVStack,{children:[l,(0,c.jsx)(Fn.Dropdown,{className:"editor-post-excerpt__dropdown",contentClassName:"editor-post-excerpt__dropdown__content",popoverProps:a,focusOnMount:!0,ref:r,renderToggle:({onToggle:e})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,onClick:e,variant:"link",children:l?h:m}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:i,onClose:e}),(0,c.jsx)(Fn.__experimentalVStack,{spacing:4,children:(0,c.jsx)(cp.Slot,{children:e=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(op,{hideLabelFromVision:!0,updateOnBlur:!0}),e]})})})]})})]})}function gp({children:e,supportKeys:t}){const{postType:s,themeSupports:n}=(0,d.useSelect)((e=>({postType:e(wc).getEditedPostAttribute("type"),themeSupports:e(u.store).getThemeSupports()})),[]);return(Array.isArray(t)?t:[t]).some((e=>{const t=n?.[e]??!1;return"post-thumbnails"===e&&Array.isArray(t)?t.includes(s):t}))?e:null}var _p=function({children:e}){return(0,c.jsx)(gp,{supportKeys:"post-thumbnails",children:(0,c.jsx)(Id,{supportKeys:"thumbnail",children:e})})};const fp=["image"],bp=(0,fs.__)("Featured image"),yp=(0,fs.__)("Add a featured image"),xp=(0,c.jsx)("p",{children:(0,fs.__)("To edit the featured image, you need permission to upload media.")});const vp=(0,d.withSelect)((e=>{const{getEntityRecord:t,getPostType:s,hasFinishedResolution:n}=e(u.store),{getCurrentPostId:o,getEditedPostAttribute:r}=e(wc),i=r("featured_media");return{media:i?t("postType","attachment",i,{context:"view"}):null,currentPostId:o(),postType:s(r("type")),featuredImageId:i,isRequestingFeaturedImageMedia:!!i&&!n("getEntityRecord",["postType","attachment",i,{context:"view"}])}})),wp=(0,d.withDispatch)(((e,{noticeOperations:t},{select:s})=>{const{editPost:n}=e(wc);return{onUpdateImage(e){n({featured_media:e.id})},onDropImage(e){s(g.store).getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange([e]){n({featured_media:e.id})},onError(e){t.removeAllNotices(),t.createErrorNotice(e)},multiple:!1})},onRemoveImage(){n({featured_media:0})}}}));var Sp=(0,m.compose)(Fn.withNotices,vp,wp,(0,Fn.withFilters)("editor.PostFeaturedImage"))((function({currentPostId:e,featuredImageId:t,onUpdateImage:s,onRemoveImage:n,media:o,postType:r,noticeUI:i,noticeOperations:a,isRequestingFeaturedImageMedia:l}){const u=(0,p.useRef)(!1),[m,_]=(0,p.useState)(!1),{getSettings:f}=(0,d.useSelect)(g.store),{mediaSourceUrl:b}=function(e,t){if(!e)return{};const s=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","large",e.id,t);if(s in(e?.media_details?.sizes??{}))return{mediaWidth:e.media_details.sizes[s].width,mediaHeight:e.media_details.sizes[s].height,mediaSourceUrl:e.media_details.sizes[s].source_url};const n=(0,h.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",e.id,t);return n in(e?.media_details?.sizes??{})?{mediaWidth:e.media_details.sizes[n].width,mediaHeight:e.media_details.sizes[n].height,mediaSourceUrl:e.media_details.sizes[n].source_url}:{mediaWidth:e.media_details.width,mediaHeight:e.media_details.height,mediaSourceUrl:e.source_url}}(o,e);function y(e){f().mediaUpload({allowedTypes:fp,filesList:e,onFileChange([e]){(0,$o.isBlobURL)(e?.url)?_(!0):(e&&s(e),_(!1))},onError(e){a.removeAllNotices(),a.createErrorNotice(e)},multiple:!1})}function x(e){return e.alt_text?(0,fs.sprintf)((0,fs.__)("Current image: %s"),e.alt_text):(0,fs.sprintf)((0,fs.__)("The current image has no alternative text. The file name is: %s"),e.media_details.sizes?.full?.file||e.slug)}function v(e){u.current&&e&&(e.focus(),u.current=!1)}const w=!l&&!!t&&!o;return(0,c.jsxs)(_p,{children:[i,(0,c.jsxs)("div",{className:"editor-post-featured-image",children:[o&&(0,c.jsx)("div",{id:`editor-post-featured-image-${t}-describedby`,className:"hidden",children:x(o)}),(0,c.jsx)(g.MediaUploadCheck,{fallback:xp,children:(0,c.jsx)(g.MediaUpload,{title:r?.labels?.featured_image||bp,onSelect:s,unstableFeaturedImageFlow:!0,allowedTypes:fp,modalClass:"editor-post-featured-image__media-modal",render:({open:e})=>(0,c.jsxs)("div",{className:"editor-post-featured-image__container",children:[w?(0,c.jsx)(Fn.Notice,{status:"warning",isDismissible:!1,children:(0,fs.__)("Could not retrieve the featured image data.")}):(0,c.jsxs)(Fn.Button,{__next40pxDefaultSize:!0,ref:v,className:t?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:e,"aria-label":t?(0,fs.__)("Edit or replace the featured image"):null,"aria-describedby":t?`editor-post-featured-image-${t}-describedby`:null,"aria-haspopup":"dialog",disabled:m,accessibleWhenDisabled:!0,children:[!!t&&o&&(0,c.jsx)("img",{className:"editor-post-featured-image__preview-image",src:b,alt:x(o)}),(m||l)&&(0,c.jsx)(Fn.Spinner,{}),!t&&!m&&(r?.labels?.set_featured_image||yp)]}),!!t&&(0,c.jsxs)(Fn.__experimentalHStack,{className:hr("editor-post-featured-image__actions",{"editor-post-featured-image__actions-missing-image":w,"editor-post-featured-image__actions-is-requesting-image":l}),children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:e,"aria-haspopup":"dialog",variant:w?"secondary":void 0,children:(0,fs.__)("Replace")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-featured-image__action",onClick:()=>{n(),u.current=!0},variant:w?"secondary":void 0,isDestructive:w,children:(0,fs.__)("Remove")})]}),(0,c.jsx)(Fn.DropZone,{onFilesDrop:y})]}),value:t})})]})]})}));const kp="featured-image";function Cp({withPanelBody:e=!0}){const{postType:t,isEnabled:s,isOpened:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,isEditorPanelEnabled:s,isEditorPanelOpened:n}=e(wc),{getPostType:o}=e(u.store);return{postType:o(t("type")),isEnabled:s(kp),isOpened:n(kp)}}),[]),{toggleEditorPanelOpened:o}=(0,d.useDispatch)(wc);return s?e?(0,c.jsx)(_p,{children:(0,c.jsx)(Fn.PanelBody,{title:t?.labels?.featured_image??(0,fs.__)("Featured image"),opened:n,onToggle:()=>o(kp),children:(0,c.jsx)(Sp,{})})}):(0,c.jsx)(_p,{children:(0,c.jsx)(Sp,{})}):null}function Pp({children:e}){return(0,d.useSelect)((e=>e(wc).getEditorSettings().disablePostFormats),[])?null:(0,c.jsx)(Id,{supportKeys:"post-formats",children:e})}const jp=[{id:"aside",caption:(0,fs.__)("Aside")},{id:"audio",caption:(0,fs.__)("Audio")},{id:"chat",caption:(0,fs.__)("Chat")},{id:"gallery",caption:(0,fs.__)("Gallery")},{id:"image",caption:(0,fs.__)("Image")},{id:"link",caption:(0,fs.__)("Link")},{id:"quote",caption:(0,fs.__)("Quote")},{id:"standard",caption:(0,fs.__)("Standard")},{id:"status",caption:(0,fs.__)("Status")},{id:"video",caption:(0,fs.__)("Video")}].sort(((e,t)=>{const s=e.caption.toUpperCase(),n=t.caption.toUpperCase();return s<n?-1:s>n?1:0}));function Ep(){const e=`post-format-selector-${(0,m.useInstanceId)(Ep)}`,{postFormat:t,suggestedFormat:s,supportedFormats:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(wc),n=t("format"),o=e(u.store).getThemeSupports();return{postFormat:n??"standard",suggestedFormat:s(),supportedFormats:o.formats}}),[]),o=jp.filter((e=>n?.includes(e.id)||t===e.id)),r=o.find((e=>e.id===s)),{editPost:i}=(0,d.useDispatch)(wc),a=e=>i({format:e});return(0,c.jsx)(Pp,{children:(0,c.jsxs)("div",{className:"editor-post-format",children:[(0,c.jsx)(Fn.RadioControl,{className:"editor-post-format__options",label:(0,fs.__)("Post Format"),selected:t,onChange:e=>a(e),id:e,options:o.map((e=>({label:e.caption,value:e.id}))),hideLabelFromVision:!0}),r&&r.id!==t&&(0,c.jsx)("p",{className:"editor-post-format__suggestion",children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>a(r.id),children:(0,fs.sprintf)((0,fs.__)("Apply suggested format: %s"),r.caption)})})]})})}var Tp=function({children:e}){const{lastRevisionId:t,revisionsCount:s}=(0,d.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(wc);return{lastRevisionId:t(),revisionsCount:s()}}),[]);return!t||s<2?null:(0,c.jsx)(Id,{supportKeys:"revisions",children:e})};function Bp(){return(0,d.useSelect)((e=>{const{getCurrentPostLastRevisionId:t,getCurrentPostRevisionsCount:s}=e(wc);return{lastRevisionId:t(),revisionsCount:s()}}),[])}function Ip(){const{lastRevisionId:e,revisionsCount:t}=Bp();return(0,c.jsx)(Tp,{children:(0,c.jsx)(Dd,{label:(0,fs.__)("Revisions"),children:(0,c.jsx)(Fn.Button,{href:(0,w.addQueryArgs)("revision.php",{revision:e}),className:"editor-private-post-last-revision__button",text:t,variant:"tertiary",size:"compact"})})})}var Np=function(){const{lastRevisionId:e,revisionsCount:t}=Bp();return(0,c.jsx)(Tp,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,href:(0,w.addQueryArgs)("revision.php",{revision:e}),className:"editor-post-last-revision__title",icon:qo,iconPosition:"right",text:(0,fs.sprintf)((0,fs.__)("Revisions (%s)"),t)})})};var Rp=function(){return(0,c.jsx)(Tp,{children:(0,c.jsx)(Fn.PanelBody,{className:"editor-post-last-revision__panel",children:(0,c.jsx)(Np,{})})})};var Dp=function e(){const t="core/editor/post-locked-modal-"+(0,m.useInstanceId)(e),{autosave:s,updatePostLock:n}=(0,d.useDispatch)(wc),{isLocked:o,isTakeover:r,user:i,postId:a,postLockUtils:l,activePostLock:g,postType:_,previewLink:f}=(0,d.useSelect)((e=>{const{isPostLocked:t,isPostLockTakeover:s,getPostLockUser:n,getCurrentPostId:o,getActivePostLock:r,getEditedPostAttribute:i,getEditedPostPreviewLink:a,getEditorSettings:l}=e(wc),{getPostType:c}=e(u.store);return{isLocked:t(),isTakeover:s(),user:n(),postId:o(),postLockUtils:l().postLockUtils,activePostLock:r(),postType:c(i("type")),previewLink:a()}}),[]);if((0,p.useEffect)((()=>{function e(){if(o||!g)return;const e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",l.unlockNonce),e.append("post_ID",a),e.append("active_post_lock",g),window.navigator.sendBeacon)window.navigator.sendBeacon(l.ajaxUrl,e);else{const t=new window.XMLHttpRequest;t.open("POST",l.ajaxUrl,!1),t.send(e)}}return(0,h.addAction)("heartbeat.send",t,(function(e){o||(e["wp-refresh-post-lock"]={lock:g,post_id:a})})),(0,h.addAction)("heartbeat.tick",t,(function(e){if(!e["wp-refresh-post-lock"])return;const t=e["wp-refresh-post-lock"];t.lock_error?(s(),n({isLocked:!0,isTakeover:!0,user:{name:t.lock_error.name,avatar:t.lock_error.avatar_src_2x}})):t.new_lock&&n({isLocked:!1,activePostLock:t.new_lock})})),window.addEventListener("beforeunload",e),()=>{(0,h.removeAction)("heartbeat.send",t),(0,h.removeAction)("heartbeat.tick",t),window.removeEventListener("beforeunload",e)}}),[]),!o)return null;const b=i.name,y=i.avatar,x=(0,w.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:a,action:"edit",_wpnonce:l.nonce}),v=(0,w.addQueryArgs)("edit.php",{post_type:_?.slug}),S=(0,fs.__)("Exit editor");return(0,c.jsx)(Fn.Modal,{title:r?(0,fs.__)("Someone else has taken over this post"):(0,fs.__)("This post is already being edited"),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal",size:"medium",children:(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"top",spacing:6,children:[!!y&&(0,c.jsx)("img",{src:y,alt:(0,fs.__)("Avatar"),className:"editor-post-locked-modal__avatar",width:64,height:64}),(0,c.jsxs)("div",{children:[!!r&&(0,c.jsx)("p",{children:(0,p.createInterpolateElement)(b?(0,fs.sprintf)((0,fs.__)("<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),b):(0,fs.__)("Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved."),{strong:(0,c.jsx)("strong",{}),PreviewLink:(0,c.jsx)(Fn.ExternalLink,{href:f,children:(0,fs.__)("preview")})})}),!r&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("p",{children:(0,p.createInterpolateElement)(b?(0,fs.sprintf)((0,fs.__)("<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),b):(0,fs.__)("Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over."),{strong:(0,c.jsx)("strong",{}),PreviewLink:(0,c.jsx)(Fn.ExternalLink,{href:f,children:(0,fs.__)("preview")})})}),(0,c.jsx)("p",{children:(0,fs.__)("If you take over, the other user will lose editing control to the post, but their changes will be saved.")})]}),(0,c.jsxs)(Fn.__experimentalHStack,{className:"editor-post-locked-modal__buttons",justify:"flex-end",children:[!r&&(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",href:x,children:(0,fs.__)("Take over")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",href:v,children:S})]})]})]})})};var Ap=function({children:e}){const{hasPublishAction:t,isPublished:s}=(0,d.useSelect)((e=>{const{isCurrentPostPublished:t,getCurrentPost:s}=e(wc);return{hasPublishAction:s()._links?.["wp:action-publish"]??!1,isPublished:t()}}),[]);return s||!t?null:e};var Mp=function(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("status")),[]),{editPost:t}=(0,d.useDispatch)(wc);return(0,c.jsx)(Ap,{children:(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Pending review"),checked:"pending"===e,onChange:()=>{t({status:"pending"===e?"draft":"pending"})}})})};function Lp({className:e,textContent:t,forceIsAutosaveable:s,role:n,onPreview:o}){const{postId:r,currentPostLink:i,previewLink:a,isSaveable:l,isViewable:m}=(0,d.useSelect)((e=>{const t=e(wc),s=e(u.store).getPostType(t.getCurrentPostType("type")),n=s?.viewable??!1;return n?{postId:t.getCurrentPostId(),currentPostLink:t.getCurrentPostAttribute("link"),previewLink:t.getEditedPostPreviewLink(),isSaveable:t.isEditedPostSaveable(),isViewable:n}:{isViewable:n}}),[]),{__unstableSaveForPreview:g}=(0,d.useDispatch)(wc);if(!m)return null;const _=`wp-preview-${r}`,f=a||i;return(0,c.jsx)(Fn.Button,{variant:e?void 0:"tertiary",className:e||"editor-post-preview",href:f,target:_,accessibleWhenDisabled:!0,disabled:!l,onClick:async e=>{e.preventDefault();const t=window.open("",_);t.focus(),function(e){let t=(0,p.renderToString)((0,c.jsxs)("div",{className:"editor-post-preview-button__interstitial-message",children:[(0,c.jsxs)(Fn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",children:[(0,c.jsx)(Fn.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),(0,c.jsx)(Fn.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})]}),(0,c.jsx)("p",{children:(0,fs.__)("Generating preview…")})]}));t+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',t=(0,h.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=(0,fs.__)("Generating preview…"),e.close()}(t.document);const n=await g({forceIsAutosaveable:s});t.location=n,o?.()},role:n,size:"compact",children:t||(0,c.jsxs)(c.Fragment,{children:[(0,fs._x)("Preview","imperative verb"),(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]})})}function Op(){const e=(0,m.useViewportMatch)("medium","<"),{isPublished:t,isBeingScheduled:s,isSaving:n,isPublishing:o,hasPublishAction:r,isAutosaving:i,hasNonPostEntityChanges:a,postStatusHasChanged:l,postStatus:c}=(0,d.useSelect)((e=>{const{isCurrentPostPublished:t,isEditedPostBeingScheduled:s,isSavingPost:n,isPublishingPost:o,getCurrentPost:r,getCurrentPostType:i,isAutosavingPost:a,getPostEdits:l,getEditedPostAttribute:c}=e(wc);return{isPublished:t(),isBeingScheduled:s(),isSaving:n(),isPublishing:o(),hasPublishAction:r()._links?.["wp:action-publish"]??!1,postType:i(),isAutosaving:a(),hasNonPostEntityChanges:e(wc).hasNonPostEntityChanges(),postStatusHasChanged:!!l()?.status,postStatus:c("status")}}),[]);return o?(0,fs.__)("Publishing…"):(t||s)&&n&&!i?(0,fs.__)("Saving…"):r?a||t||l&&!["future","publish"].includes(c)||!l&&"future"===c?(0,fs.__)("Save"):s?(0,fs.__)("Schedule"):(0,fs.__)("Publish"):e?(0,fs.__)("Publish"):(0,fs.__)("Submit for Review")}const Fp=()=>{};class Vp extends p.Component{constructor(e){super(e),this.createOnClick=this.createOnClick.bind(this),this.closeEntitiesSavedStates=this.closeEntitiesSavedStates.bind(this),this.state={entitiesSavedStatesCallback:!1}}createOnClick(e){return(...t)=>{const{hasNonPostEntityChanges:s,setEntitiesSavedStatesCallback:n}=this.props;return s&&n?(this.setState({entitiesSavedStatesCallback:()=>e(...t)}),n((()=>this.closeEntitiesSavedStates)),Fp):e(...t)}}closeEntitiesSavedStates(e){const{postType:t,postId:s}=this.props,{entitiesSavedStatesCallback:n}=this.state;this.setState({entitiesSavedStatesCallback:!1},(()=>{e&&e.some((e=>"postType"===e.kind&&e.name===t&&e.key===s))&&n()}))}render(){const{forceIsDirty:e,hasPublishAction:t,isBeingScheduled:s,isOpen:n,isPostSavingLocked:o,isPublishable:r,isPublished:i,isSaveable:a,isSaving:l,isAutoSaving:d,isToggle:u,savePostStatus:p,onSubmit:m=Fp,onToggle:h,visibility:g,hasNonPostEntityChanges:_,isSavingNonPostEntityChanges:f,postStatus:b,postStatusHasChanged:y}=this.props,x=(l||!a||o||!r&&!e)&&(!_||f),v=(i||l||!a||!r&&!e)&&(!_||f);let w="publish";y?w=b:t?"private"===g?w="private":s&&(w="future"):w="pending";const S={"aria-disabled":x,className:"editor-post-publish-button",isBusy:!d&&l,variant:"primary",onClick:this.createOnClick((()=>{x||(m(),p(w))})),"aria-haspopup":_?"dialog":void 0},k={"aria-disabled":v,"aria-expanded":n,className:"editor-post-publish-panel__toggle",isBusy:l&&i,variant:"primary",size:"compact",onClick:this.createOnClick((()=>{v||h()})),"aria-haspopup":_?"dialog":void 0},C=u?k:S;return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Fn.Button,{...C,className:`${C.className} editor-post-publish-button__button`,size:"compact",children:(0,c.jsx)(Op,{})})})}}var Up=(0,m.compose)([(0,d.withSelect)((e=>{const{isSavingPost:t,isAutosavingPost:s,isEditedPostBeingScheduled:n,getEditedPostVisibility:o,isCurrentPostPublished:r,isEditedPostSaveable:i,isEditedPostPublishable:a,isPostSavingLocked:l,getCurrentPost:c,getCurrentPostType:d,getCurrentPostId:u,hasNonPostEntityChanges:p,isSavingNonPostEntityChanges:m,getEditedPostAttribute:h,getPostEdits:g}=e(wc);return{isSaving:t(),isAutoSaving:s(),isBeingScheduled:n(),visibility:o(),isSaveable:i(),isPostSavingLocked:l(),isPublishable:a(),isPublished:r(),hasPublishAction:c()._links?.["wp:action-publish"]??!1,postType:d(),postId:u(),postStatus:h("status"),postStatusHasChanged:g()?.status,hasNonPostEntityChanges:p(),isSavingNonPostEntityChanges:m()}})),(0,d.withDispatch)((e=>{const{editPost:t,savePost:s}=e(wc);return{savePostStatus:e=>{t({status:e},{undoIgnore:!0}),s()}}}))])(Vp),Hp=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24",children:(0,c.jsx)(L.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"})});const zp=[{label:(0,fs.__)("Public"),value:"public",description:(0,fs.__)("Visible to everyone.")},{label:(0,fs.__)("Private"),value:"private",description:(0,fs.__)("Only visible to site admins and editors.")},{label:(0,fs.__)("Password protected"),value:"password",description:(0,fs.__)("Only visible to those who know the password.")}];function Gp({onClose:e}){const t=(0,m.useInstanceId)(Gp),{status:s,visibility:n,password:o}=(0,d.useSelect)((e=>({status:e(wc).getEditedPostAttribute("status"),visibility:e(wc).getEditedPostVisibility(),password:e(wc).getEditedPostAttribute("password")}))),{editPost:r}=(0,d.useDispatch)(wc),[i,a]=(0,p.useState)(!!o);return(0,c.jsxs)("div",{className:"editor-post-visibility",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Visibility"),help:(0,fs.__)("Control how this post is viewed."),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(Fn.RadioControl,{label:(0,fs.__)("Visibility"),hideLabelFromVision:!0,options:zp,selected:i?"password":n,onChange:function(e){r({public:{status:"private"===n?"draft":s,password:""},private:{status:"private",password:""},password:{status:"private"===n?"draft":s,password:o||""}}[e]),a("password"===e)}}),i&&(0,c.jsx)(Fn.TextControl,{label:(0,fs.__)("Password"),onChange:e=>{r({password:e})},value:o,placeholder:(0,fs.__)("Use a secure password"),type:"text",id:`editor-post-visibility__password-input-${t}`,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})]})]})}function $p(){return Wp()}function Wp(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostVisibility()),[]);return zp.find((t=>t.value===e))?.label}function Zp(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function Yp(e){const t=Zp(e);return t.setDate(1),t.setHours(0,0,0,0),t}function qp(e){const t=Zp(e),s=t.getMonth();return t.setFullYear(t.getFullYear(),s+1,0),t.setHours(23,59,59,999),t}Math.pow(10,8);const Kp=6e4,Qp=36e5;function Xp(e,t){const s=t?.additionalDigits??2,n=function(e){const t={},s=e.split(Jp.dateTimeDelimiter);let n;if(s.length>2)return t;/:/.test(s[0])?n=s[0]:(t.date=s[0],n=s[1],Jp.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Jp.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length)));if(n){const e=Jp.timezone.exec(n);e?(t.time=n.replace(e[1],""),t.timezone=e[1]):t.time=n}return t}(e);let o;if(n.date){const e=function(e,t){const s=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(s);if(!n)return{year:NaN,restDateString:""};const o=n[1]?parseInt(n[1]):null,r=n[2]?parseInt(n[2]):null;return{year:null===r?o:100*r,restDateString:e.slice((n[1]||n[2]).length)}}(n.date,s);o=function(e,t){if(null===t)return new Date(NaN);const s=e.match(em);if(!s)return new Date(NaN);const n=!!s[4],o=nm(s[1]),r=nm(s[2])-1,i=nm(s[3]),a=nm(s[4]),l=nm(s[5])-1;if(n)return function(e,t,s){return t>=1&&t<=53&&s>=0&&s<=6}(0,a,l)?function(e,t,s){const n=new Date(0);n.setUTCFullYear(e,0,4);const o=n.getUTCDay()||7,r=7*(t-1)+s+1-o;return n.setUTCDate(n.getUTCDate()+r),n}(t,a,l):new Date(NaN);{const e=new Date(0);return function(e,t,s){return t>=0&&t<=11&&s>=1&&s<=(rm[t]||(im(e)?29:28))}(t,r,i)&&function(e,t){return t>=1&&t<=(im(e)?366:365)}(t,o)?(e.setUTCFullYear(t,r,Math.max(o,i)),e):new Date(NaN)}}(e.restDateString,e.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);const r=o.getTime();let i,a=0;if(n.time&&(a=function(e){const t=e.match(tm);if(!t)return NaN;const s=om(t[1]),n=om(t[2]),o=om(t[3]);if(!function(e,t,s){if(24===e)return 0===t&&0===s;return s>=0&&s<60&&t>=0&&t<60&&e>=0&&e<25}(s,n,o))return NaN;return s*Qp+n*Kp+1e3*o}(n.time),isNaN(a)))return new Date(NaN);if(!n.timezone){const e=new Date(r+a),t=new Date(0);return t.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),t.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),t}return i=function(e){if("Z"===e)return 0;const t=e.match(sm);if(!t)return 0;const s="+"===t[1]?-1:1,n=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;if(!function(e,t){return t>=0&&t<=59}(0,o))return NaN;return s*(n*Qp+o*Kp)}(n.timezone),isNaN(i)?new Date(NaN):new Date(r+a+i)}const Jp={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},em=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,tm=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,sm=/^([+-])(\d{2})(?::?(\d{2}))?$/;function nm(e){return e?parseInt(e):1}function om(e){return e&&parseFloat(e.replace(",","."))||0}const rm=[31,null,31,30,31,30,31,31,30,31,30,31];function im(e){return e%400==0||e%4==0&&e%100!=0}const{PrivatePublishDateTimePicker:am}=$(g.privateApis);function lm(e){return(0,c.jsx)(cm,{...e,showPopoverHeaderActions:!0,isCompact:!1})}function cm({onClose:e,showPopoverHeaderActions:t,isCompact:s}){const{postDate:n,postType:o}=(0,d.useSelect)((e=>({postDate:e(wc).getEditedPostAttribute("date"),postType:e(wc).getCurrentPostType()})),[]),{editPost:r}=(0,d.useDispatch)(wc),[i,a]=(0,p.useState)(Yp(new Date(n))),l=(0,d.useSelect)((e=>e(u.store).getEntityRecords("postType",o,{status:"publish,future",after:Yp(i).toISOString(),before:qp(i).toISOString(),exclude:[e(wc).getCurrentPostId()],per_page:100,_fields:"id,date"})),[i,o]),m=(0,p.useMemo)((()=>(l||[]).map((({date:e})=>({date:new Date(e)})))),[l]),h=(0,v.getSettings)(),g=/a(?!\\)/i.test(h.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return(0,c.jsx)(am,{currentDate:n,onChange:e=>r({date:e}),is12Hour:g,dateOrder:(0,fs._x)("dmy","date order"),events:m,onMonthPreviewed:e=>a(Xp(e)),onClose:e,isCompact:s,showPopoverHeaderActions:t})}function dm(e){return um(e)}function um({full:e=!1}={}){const{date:t,isFloating:s}=(0,d.useSelect)((e=>({date:e(wc).getEditedPostAttribute("date"),isFloating:e(wc).isEditedPostDateFloating()})),[]);return e?pm(t):function(e,{isFloating:t=!1,now:s=new Date}={}){if(!e||t)return(0,fs.__)("Immediately");if(!function(e){const{timezone:t}=(0,v.getSettings)(),s=Number(t.offset),n=e.getTimezoneOffset()/60*-1;return s===n}(s))return pm(e);const n=(0,v.getDate)(e);if(mm(n,s))return(0,fs.sprintf)((0,fs.__)("Today at %s"),(0,v.dateI18n)((0,fs._x)("g:i a","post schedule time format"),n));const o=new Date(s);if(o.setDate(o.getDate()+1),mm(n,o))return(0,fs.sprintf)((0,fs.__)("Tomorrow at %s"),(0,v.dateI18n)((0,fs._x)("g:i a","post schedule time format"),n));if(n.getFullYear()===s.getFullYear())return(0,v.dateI18n)((0,fs._x)("F j g:i a","post schedule date format without year"),n);return(0,v.dateI18n)((0,fs._x)("F j, Y g:i a","post schedule full date format"),n)}(t,{isFloating:s})}function pm(e){const t=(0,v.getDate)(e),s=function(){const{timezone:e}=(0,v.getSettings)();if(e.abbr&&isNaN(Number(e.abbr)))return e.abbr;return`UTC${e.offset<0?"":"+"}${e.offsetFormatted}`}(),n=(0,v.dateI18n)((0,fs._x)("F j, Y g:i a","post schedule full date format"),t);return(0,fs.isRTL)()?`${s} ${n}`:`${n} ${s}`}function mm(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}const hm=3,gm={per_page:10,orderby:"count",order:"desc",hide_empty:!0,_fields:"id,name,count",context:"view"};function _m({onSelect:e,taxonomy:t}){const{_terms:s,showTerms:n}=(0,d.useSelect)((e=>{const s=e(u.store).getEntityRecords("taxonomy",t.slug,gm);return{_terms:s,showTerms:s?.length>=hm}}),[t.slug]);if(!n)return null;const o=Od(s);return(0,c.jsxs)("div",{className:"editor-post-taxonomies__flat-term-most-used",children:[(0,c.jsx)(Fn.BaseControl.VisualLabel,{as:"h3",className:"editor-post-taxonomies__flat-term-most-used-label",children:t.labels.most_used}),(0,c.jsx)("ul",{role:"list",className:"editor-post-taxonomies__flat-term-most-used-list",children:o.map((t=>(0,c.jsx)("li",{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>e(t),children:t.name})},t.id)))})]})}const fm=[],bm=100,ym={per_page:bm,_fields:"id,name",context:"view"},xm=(e,t)=>Md(e).toLowerCase()===Md(t).toLowerCase(),vm=(e,t)=>e.map((e=>t.find((t=>xm(t.name,e)))?.id)).filter((e=>void 0!==e)),wm=({children:e,__nextHasNoMarginBottom:t})=>t?(0,c.jsx)(Fn.__experimentalVStack,{spacing:4,children:e}):(0,c.jsx)(p.Fragment,{children:e});function Sm({slug:e,__nextHasNoMarginBottom:t}){const[s,n]=(0,p.useState)([]),[o,r]=(0,p.useState)(""),i=(0,m.useDebounce)(r,500);t||k()("Bottom margin styles for wp.editor.PostTaxonomiesFlatTermSelector",{since:"6.7",version:"7.0",hint:"Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version."});const{terms:a,termIds:l,taxonomy:h,hasAssignAction:g,hasCreateAction:_,hasResolvedTerms:f}=(0,d.useSelect)((t=>{const{getCurrentPost:s,getEditedPostAttribute:n}=t(wc),{getEntityRecords:o,getEntityRecord:r,hasFinishedResolution:i}=t(u.store),a=s(),l=r("root","taxonomy",e),c=l?n(l.rest_base):fm,d={...ym,include:c?.join(","),per_page:-1};return{hasCreateAction:!!l&&(a._links?.["wp:action-create-"+l.rest_base]??!1),hasAssignAction:!!l&&(a._links?.["wp:action-assign-"+l.rest_base]??!1),taxonomy:l,termIds:c,terms:c?.length?o("taxonomy",e,d):fm,hasResolvedTerms:i("getEntityRecords",["taxonomy",e,d])}}),[e]),{searchResults:b}=(0,d.useSelect)((t=>{const{getEntityRecords:s}=t(u.store);return{searchResults:o?s("taxonomy",e,{...ym,search:o}):fm}}),[o,e]);(0,p.useEffect)((()=>{if(f){const e=(a??[]).map((e=>Md(e.name)));n(e)}}),[a,f]);const y=(0,p.useMemo)((()=>(b??[]).map((e=>Md(e.name)))),[b]),{editPost:x}=(0,d.useDispatch)(wc),{saveEntityRecord:v}=(0,d.useDispatch)(u.store),{createErrorNotice:w}=(0,d.useDispatch)(_s.store);if(!g)return null;function S(e){x({[h.rest_base]:e})}const C=h?.labels?.add_new_item??("post_tag"===e?(0,fs.__)("Add Tag"):(0,fs.__)("Add Term")),P=h?.labels?.singular_name??("post_tag"===e?(0,fs.__)("Tag"):(0,fs.__)("Term")),j=(0,fs.sprintf)((0,fs._x)("%s added","term"),P),E=(0,fs.sprintf)((0,fs._x)("%s removed","term"),P),T=(0,fs.sprintf)((0,fs._x)("Remove %s","term"),P);return(0,c.jsxs)(wm,{__nextHasNoMarginBottom:t,children:[(0,c.jsx)(Fn.FormTokenField,{__next40pxDefaultSize:!0,value:s,suggestions:y,onChange:function(t){const s=[...a??[],...b??[]],o=t.reduce(((e,t)=>(e.some((e=>e.toLowerCase()===t.toLowerCase()))||e.push(t),e)),[]),r=o.filter((e=>!s.find((t=>xm(t.name,e)))));n(o),0!==r.length?_&&Promise.all(r.map((t=>async function(t){try{const s=await v("taxonomy",e,t,{throwOnError:!0});return Ld(s)}catch(e){if("term_exists"!==e.code)throw e;return{id:e.data.term_id,name:t.name}}}({name:t})))).then((e=>{const t=s.concat(e);S(vm(o,t))})).catch((e=>{w(e.message,{type:"snackbar"}),S(vm(o,s))})):S(vm(o,s))},onInputChange:i,maxSuggestions:bm,label:C,messages:{added:j,removed:E,remove:T},__nextHasNoMarginBottom:t}),(0,c.jsx)(_m,{taxonomy:h,onSelect:function(t){if(l.includes(t.id))return;const s=[...l,t.id],n="post_tag"===e?(0,fs.__)("Tag"):(0,fs.__)("Term"),o=(0,fs.sprintf)((0,fs._x)("%s added","term"),h?.labels?.singular_name??n);(0,ms.speak)(o,"assertive"),S(s)}})]})}var km=(0,Fn.withFilters)("editor.PostTaxonomyType")(Sm);const Cm=()=>{const e=(0,d.useSelect)((e=>{const t=e(u.store).getTaxonomy("post_tag");return t?.labels}),[]),t=e?.add_new_item??(0,fs.__)("Add tag"),s=e?.name??(0,fs.__)("Tags"),n=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:t},"label")];return(0,c.jsxs)(Fn.PanelBody,{initialOpen:!1,title:n,children:[(0,c.jsx)("p",{children:(0,fs.sprintf)((0,fs.__)("%s help users and search engines navigate your site and find your content. Add a few keywords to describe your post."),s)}),(0,c.jsx)(km,{slug:"post_tag",__nextHasNoMarginBottom:!0})]})};var Pm=()=>{const{postHasTags:e,siteHasTags:t,isPostTypeSupported:s}=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPostType(),s=e(u.store).getEntityRecord("root","taxonomy","post_tag"),n=s?.types?.includes(t),o=void 0!==s,r=s&&e(wc).getEditedPostAttribute(s.rest_base),i=!!n&&!!e(u.store).getEntityRecords("taxonomy","post_tag",{per_page:1})?.length;return{postHasTags:!!r?.length,siteHasTags:i,isPostTypeSupported:o&&n}}),[]),[n]=(0,p.useState)(e);return s&&t?n?null:(0,c.jsx)(Cm,{}):null};const jm=(e,t)=>jp.filter((t=>e?.includes(t.id))).find((e=>e.id===t)),Em=({suggestedPostFormat:e,suggestionText:t,onUpdatePostFormat:s})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:()=>s(e),children:t});function Tm(){const{currentPostFormat:e,suggestion:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getSuggestedPostFormat:s}=e(wc),n=e(u.store).getThemeSupports().formats??[];return{currentPostFormat:t("format"),suggestion:jm(n,s())}}),[]),{editPost:s}=(0,d.useDispatch)(wc),n=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,fs.__)("Use a post format")},"label")];return t&&t.id!==e?(0,c.jsxs)(Fn.PanelBody,{initialOpen:!1,title:n,children:[(0,c.jsx)("p",{children:(0,fs.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")}),(0,c.jsx)("p",{children:(0,c.jsx)(Em,{onUpdatePostFormat:e=>s({format:e}),suggestedPostFormat:t.id,suggestionText:(0,fs.sprintf)((0,fs.__)('Apply the "%1$s" format.'),t.caption)})})]}):null}const{normalizeTextString:Bm}=$(Fn.privateApis),{RECEIVE_INTERMEDIATE_RESULTS:Im}=$(u.privateApis),Nm={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent",context:"view",[Im]:!0},Rm=8,Dm=[];function Am({slug:e}){const[t,s]=(0,p.useState)(!1),[n,o]=(0,p.useState)(""),[r,i]=(0,p.useState)(""),[a,l]=(0,p.useState)(!1),[h,g]=(0,p.useState)(""),[_,f]=(0,p.useState)([]),b=(0,m.useDebounce)(ms.speak,500),{hasCreateAction:y,hasAssignAction:x,terms:v,loading:w,availableTerms:S,taxonomy:k}=(0,d.useSelect)((t=>{const{getCurrentPost:s,getEditedPostAttribute:n}=t(wc),{getEntityRecord:o,getEntityRecords:r,isResolving:i}=t(u.store),a=o("root","taxonomy",e),l=s();return{hasCreateAction:!!a&&!!l._links?.["wp:action-create-"+a.rest_base],hasAssignAction:!!a&&!!l._links?.["wp:action-assign-"+a.rest_base],terms:a?n(a.rest_base):Dm,loading:i("getEntityRecords",["taxonomy",e,Nm]),availableTerms:r("taxonomy",e,Nm)||Dm,taxonomy:a}}),[e]),{editPost:C}=(0,d.useDispatch)(wc),{saveEntityRecord:P}=(0,d.useDispatch)(u.store),j=(0,p.useMemo)((()=>function(e,t){const s=e=>-1!==t.indexOf(e.id)||void 0!==e.children&&e.children.map(s).filter((e=>e)).length>0,n=[...e];return n.sort(((e,t)=>{const n=s(e),o=s(t);return n===o?0:n&&!o?-1:!n&&o?1:0})),n}(Ad(S),v)),[S]),{createErrorNotice:E}=(0,d.useDispatch)(_s.store);if(!x)return null;const T=e=>{C({[k.rest_base]:e})},B=e=>e.map((e=>(0,c.jsxs)("div",{className:"editor-post-taxonomies__hierarchical-terms-choice",children:[(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,checked:-1!==v.indexOf(e.id),onChange:()=>{(e=>{const t=v.includes(e)?v.filter((t=>t!==e)):[...v,e];T(t)})(parseInt(e.id,10))},label:(0,Ln.decodeEntities)(e.name)}),!!e.children.length&&(0,c.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices",children:B(e.children)})]},e.id))),I=(t,s,n)=>k?.labels?.[t]??("category"===e?s:n),N=I("add_new_item",(0,fs.__)("Add Category"),(0,fs.__)("Add Term")),R=I("new_item_name",(0,fs.__)("Add Category"),(0,fs.__)("Add Term")),D=I("parent_item",(0,fs.__)("Parent Category"),(0,fs.__)("Parent Term")),A=`— ${D} —`,M=N,L=k?.labels?.search_items??(0,fs.__)("Search Terms"),O=k?.name??(0,fs.__)("Terms"),F=S.length>=Rm;return(0,c.jsxs)(Fn.Flex,{direction:"column",gap:"4",children:[F&&!w&&(0,c.jsx)(Fn.SearchControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:L,placeholder:L,value:h,onChange:e=>{const t=j.map(function(e){const t=s=>{if(""===e)return s;const n={...s};return n.children.length>0&&(n.children=n.children.map(t).filter((e=>e))),(-1!==Bm(n.name).indexOf(Bm(e))||n.children.length>0)&&n};return t}(e)).filter((e=>e)),s=e=>{let t=0;for(let n=0;n<e.length;n++)t++,void 0!==e[n].children&&(t+=s(e[n].children));return t};g(e),f(t);const n=s(t),o=(0,fs.sprintf)((0,fs._n)("%d result found.","%d results found.",n),n);b(o,"assertive")}}),w&&(0,c.jsx)(Fn.Flex,{justify:"center",style:{height:"40px"},children:(0,c.jsx)(Fn.Spinner,{})}),(0,c.jsx)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",tabIndex:"0",role:"group","aria-label":O,children:B(""!==h?_:j)}),!w&&y&&(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,onClick:()=>{l(!a)},className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":a,variant:"link",children:N})}),a&&(0,c.jsx)("form",{onSubmit:async a=>{if(a.preventDefault(),""===n||t)return;const l=function(e,t,s){return e.find((e=>(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===s.toLowerCase()))}(S,r,n);if(l)return v.some((e=>e===l.id))||T([...v,l.id]),o(""),void i("");let c;s(!0);try{c=await(d={name:n,parent:r||void 0},P("taxonomy",e,d,{throwOnError:!0}))}catch(e){return void E(e.message,{type:"snackbar"})}var d;const u="category"===e?(0,fs.__)("Category"):(0,fs.__)("Term"),p=(0,fs.sprintf)((0,fs._x)("%s added","term"),k?.labels?.singular_name??u);(0,ms.speak)(p,"assertive"),s(!1),o(""),i(""),T([...v,c.id])},children:(0,c.jsxs)(Fn.Flex,{direction:"column",gap:"4",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"editor-post-taxonomies__hierarchical-terms-input",label:R,value:n,onChange:e=>{o(e)},required:!0}),!!S.length&&(0,c.jsx)(Fn.TreeSelect,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:D,noOptionLabel:A,onChange:e=>{i(e)},selectedId:r,tree:j}),(0,c.jsx)(Fn.FlexItem,{children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit",children:M})})]})})]})}var Mm=(0,Fn.withFilters)("editor.PostTaxonomyType")(Am);var Lm=function(){const{hasNoCategory:e,hasSiteCategories:t}=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPostType(),{canUser:s,getEntityRecord:n}=e(u.store),o=n("root","taxonomy","category"),r=s("read",{kind:"root",name:"site"})?n("root","site")?.default_category:void 0,i=r?n("taxonomy","category",r):void 0,a=o&&o.types.some((e=>e===t)),l=o&&e(wc).getEditedPostAttribute(o.rest_base),c=!!a&&!!e(u.store).getEntityRecords("taxonomy","category",{exclude:[r],per_page:1})?.length;return{hasNoCategory:!!o&&!!i&&a&&(0===l?.length||1===l?.length&&i?.id===l[0]),hasSiteCategories:c}}),[]),[s,n]=(0,p.useState)(!1);if((0,p.useEffect)((()=>{e&&n(!0)}),[e]),!s||!t)return null;const o=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,fs.__)("Assign a category")},"label")];return(0,c.jsxs)(Fn.PanelBody,{initialOpen:!1,title:o,children:[(0,c.jsx)("p",{children:(0,fs.__)("Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.")}),(0,c.jsx)(Mm,{slug:"category"})]})};function Om(e){return Object.fromEntries(Object.entries(function(e){const t=new Set;return Object.fromEntries(e.map((e=>{const s=(0,w.getFilename)(e);let n="";if(s){const e=s.split(".");e.length>1&&e.pop(),n=e.join(".")}return n||(n=bi()),t.has(n)&&(n=`${n}-${bi()}`),t.add(n),[e,n]})))}(e)).map((([e,t])=>{const s=window.fetch(e.includes("?")?e:e+"?").then((e=>e.blob())).then((e=>new File([e],`${t}.png`,{type:e.type})));return[e,s]})))}function Fm(e){const t=[];return e.forEach((e=>{t.push(e),t.push(...Fm(e.innerBlocks))})),t}function Vm(e){if("core/image"===e.name||"core/cover"===e.name){const{url:t,alt:s,id:n}=e.attributes;return{url:t,alt:s,id:n}}if("core/media-text"===e.name){const{mediaUrl:t,mediaAlt:s,mediaId:n}=e.attributes;return{url:t,alt:s,id:n}}return{}}function Um({clientId:e,alt:t,url:s}){const{selectBlock:n}=(0,d.useDispatch)(g.store);return(0,c.jsx)(Fn.__unstableMotion.img,{tabIndex:0,role:"button","aria-label":(0,fs.__)("Select image block."),onClick:()=>{n(e)},onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(n(e),t.preventDefault())},alt:t,src:s,animate:{opacity:1},exit:{opacity:0,scale:0},style:{width:"32px",height:"32px",objectFit:"cover",borderRadius:"2px",cursor:"pointer"},whileHover:{scale:1.08}},e)}function Hm(){const[e,t]=(0,p.useState)(!1),[s,n]=(0,p.useState)(!1),[o,r]=(0,p.useState)(!1),{editorBlocks:i,mediaUpload:a}=(0,d.useSelect)((e=>({editorBlocks:e(g.store).getBlocks(),mediaUpload:e(g.store).getSettings().mediaUpload})),[]),l=Fm(i).filter((e=>function(e){return"core/image"===e.name||"core/cover"===e.name?e.attributes.url&&!e.attributes.id:"core/media-text"===e.name?e.attributes.mediaUrl&&!e.attributes.mediaId:void 0}(e))),{updateBlockAttributes:u}=(0,d.useDispatch)(g.store);if(!a||!l.length)return null;const m=[(0,fs.__)("Suggestion:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,fs.__)("External media")},"label")];return(0,c.jsxs)(Fn.PanelBody,{initialOpen:!0,title:m,children:[(0,c.jsx)("p",{children:(0,fs.__)("Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.")}),(0,c.jsxs)("div",{style:{display:"inline-flex",flexWrap:"wrap",gap:"8px"},children:[(0,c.jsx)(Fn.__unstableAnimatePresence,{onExitComplete:()=>n(!1),children:l.map((e=>{const{url:t,alt:s}=Vm(e);return(0,c.jsx)(Um,{clientId:e.clientId,url:t,alt:s},e.clientId)}))}),e||s?(0,c.jsx)(Fn.Spinner,{}):(0,c.jsx)(Fn.Button,{size:"compact",variant:"primary",onClick:function(){t(!0),r(!1);const e=new Set(l.map((e=>{const{url:t}=Vm(e);return t}))),s=Object.fromEntries(Object.entries(Om([...e])).map((([e,t])=>[e,t.then((e=>new Promise(((t,s)=>{a({filesList:[e],onFileChange:([e])=>{(0,$o.isBlobURL)(e.url)||t(e)},onError(){s()}})}))))])));Promise.allSettled(l.map((e=>{const{url:t}=Vm(e);return s[t].then((t=>function(e,t){"core/image"!==e.name&&"core/cover"!==e.name||u(e.clientId,{id:t.id,url:t.url}),"core/media-text"===e.name&&u(e.clientId,{mediaId:t.id,mediaUrl:t.url})}(e,t))).then((()=>n(!0))).catch((()=>r(!0)))}))).finally((()=>{t(!1)}))},children:(0,fs._x)("Upload","verb")})]}),o&&(0,c.jsx)("p",{children:(0,fs.__)("Upload failed, try again.")})]})}var zm=function({children:e}){const{isBeingScheduled:t,isRequestingSiteIcon:s,hasPublishAction:n,siteIconUrl:o,siteTitle:r,siteHome:i}=(0,d.useSelect)((e=>{const{getCurrentPost:t,isEditedPostBeingScheduled:s}=e(wc),{getEntityRecord:n,isResolving:o}=e(u.store),r=n("root","__unstableBase",void 0)||{};return{hasPublishAction:t()._links?.["wp:action-publish"]??!1,isBeingScheduled:s(),isRequestingSiteIcon:o("getEntityRecord",["root","__unstableBase",void 0]),siteIconUrl:r.site_icon_url,siteTitle:r.name,siteHome:r.home&&(0,w.filterURLForDisplay)(r.home)}}),[]);let a,l,p=(0,c.jsx)(Fn.Icon,{className:"components-site-icon",size:"36px",icon:Hp});return o&&(p=(0,c.jsx)("img",{alt:(0,fs.__)("Site Icon"),className:"components-site-icon",src:o})),s&&(p=null),n?t?(a=(0,fs.__)("Are you ready to schedule?"),l=(0,fs.__)("Your work will be published at the specified date and time.")):(a=(0,fs.__)("Are you ready to publish?"),l=(0,fs.__)("Double-check your settings before publishing.")):(a=(0,fs.__)("Are you ready to submit for review?"),l=(0,fs.__)("Your work will be reviewed and then approved.")),(0,c.jsxs)("div",{className:"editor-post-publish-panel__prepublish",children:[(0,c.jsx)("div",{children:(0,c.jsx)("strong",{children:a})}),(0,c.jsx)("p",{children:l}),(0,c.jsxs)("div",{className:"components-site-card",children:[p,(0,c.jsxs)("div",{className:"components-site-info",children:[(0,c.jsx)("span",{className:"components-site-name",children:(0,Ln.decodeEntities)(r)||(0,fs.__)("(Untitled)")}),(0,c.jsx)("span",{className:"components-site-home",children:i})]})]}),(0,c.jsx)(Hm,{}),n&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.PanelBody,{initialOpen:!1,title:[(0,fs.__)("Visibility:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,c.jsx)($p,{})},"label")],children:(0,c.jsx)(Gp,{})}),(0,c.jsx)(Fn.PanelBody,{initialOpen:!1,title:[(0,fs.__)("Publish:"),(0,c.jsx)("span",{className:"editor-post-publish-panel__link",children:(0,c.jsx)(dm,{})},"label")],children:(0,c.jsx)(lm,{})})]}),(0,c.jsx)(Tm,{}),(0,c.jsx)(Pm,{}),(0,c.jsx)(Lm,{}),e]})};const Gm="%postname%",$m="%pagename%";function Wm({text:e}){const[t,s]=(0,p.useState)(!1),n=(0,p.useRef)(),o=(0,m.useCopyToClipboard)(e,(()=>{s(!0),n.current&&clearTimeout(n.current),n.current=setTimeout((()=>{s(!1)}),4e3)}));return(0,p.useEffect)((()=>()=>{n.current&&clearTimeout(n.current)}),[]),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",ref:o,children:t?(0,fs.__)("Copied!"):(0,fs.__)("Copy")})}function Zm({focusOnMount:e,children:t}){const{post:s,postType:n,isScheduled:o}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPost:s,isCurrentPostScheduled:n}=e(wc),{getPostType:o}=e(u.store);return{post:s(),postType:o(t("type")),isScheduled:n()}}),[]),r=n?.labels?.singular_name,i=n?.labels?.view_item,a=n?.labels?.add_new_item,l="future"===s.status?(e=>{const{slug:t}=e;return e.permalink_template.includes(Gm)?e.permalink_template.replace(Gm,t):e.permalink_template.includes($m)?e.permalink_template.replace($m,t):e.permalink_template})(s):s.link,m=(0,w.addQueryArgs)("post-new.php",{post_type:s.type}),h=(0,p.useCallback)((t=>{e&&t&&t.focus()}),[e]),g=o?(0,c.jsxs)(c.Fragment,{children:[(0,fs.__)("is now scheduled. It will go live on")," ",(0,c.jsx)(dm,{}),"."]}):(0,fs.__)("is now live.");return(0,c.jsxs)("div",{className:"post-publish-panel__postpublish",children:[(0,c.jsxs)(Fn.PanelBody,{className:"post-publish-panel__postpublish-header",children:[(0,c.jsx)(Fn.ExternalLink,{ref:h,href:l,children:(0,Ln.decodeEntities)(s.title)||(0,fs.__)("(no title)")})," ",g]}),(0,c.jsxs)(Fn.PanelBody,{children:[(0,c.jsx)("p",{className:"post-publish-panel__postpublish-subheader",children:(0,c.jsx)("strong",{children:(0,fs.__)("What’s next?")})}),(0,c.jsxs)("div",{className:"post-publish-panel__postpublish-post-address-container",children:[(0,c.jsx)(Fn.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:(0,fs.sprintf)((0,fs.__)("%s address"),r),value:(0,w.safeDecodeURIComponent)(l),onFocus:e=>e.target.select()}),(0,c.jsx)("div",{className:"post-publish-panel__postpublish-post-address__copy-button-wrap",children:(0,c.jsx)(Wm,{text:l})})]}),(0,c.jsxs)("div",{className:"post-publish-panel__postpublish-buttons",children:[!o&&(0,c.jsxs)(Fn.Button,{variant:"primary",href:l,__next40pxDefaultSize:!0,icon:Gn,iconPosition:"right",target:"_blank",children:[i,(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]}),(0,c.jsx)(Fn.Button,{variant:o?"primary":"secondary",__next40pxDefaultSize:!0,href:m,children:a})]})]}),t]})}class Ym extends p.Component{constructor(){super(...arguments),this.onSubmit=this.onSubmit.bind(this),this.cancelButtonNode=(0,p.createRef)()}componentDidMount(){this.timeoutID=setTimeout((()=>{this.cancelButtonNode.current.focus()}),0)}componentWillUnmount(){clearTimeout(this.timeoutID)}componentDidUpdate(e){(e.isPublished&&!this.props.isSaving&&this.props.isDirty||this.props.currentPostId!==e.currentPostId)&&this.props.onClose()}onSubmit(){const{onClose:e,hasPublishAction:t,isPostTypeViewable:s}=this.props;t&&s||e()}render(){const{forceIsDirty:e,isBeingScheduled:t,isPublished:s,isPublishSidebarEnabled:n,isScheduled:o,isSaving:r,isSavingNonPostEntityChanges:i,onClose:a,onTogglePublishSidebar:l,PostPublishExtension:d,PrePublishExtension:u,currentPostId:p,...m}=this.props,{hasPublishAction:h,isDirty:g,isPostTypeViewable:_,...f}=m,b=s||o&&t,y=!b&&!r,x=b&&!r;return(0,c.jsxs)("div",{className:"editor-post-publish-panel",...f,children:[(0,c.jsx)("div",{className:"editor-post-publish-panel__header",children:x?(0,c.jsx)(Fn.Button,{size:"compact",onClick:a,icon:ca,label:(0,fs.__)("Close panel")}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"editor-post-publish-panel__header-cancel-button",children:(0,c.jsx)(Fn.Button,{ref:this.cancelButtonNode,accessibleWhenDisabled:!0,disabled:i,onClick:a,variant:"secondary",size:"compact",children:(0,fs.__)("Cancel")})}),(0,c.jsx)("div",{className:"editor-post-publish-panel__header-publish-button",children:(0,c.jsx)(Up,{onSubmit:this.onSubmit,forceIsDirty:e})})]})}),(0,c.jsxs)("div",{className:"editor-post-publish-panel__content",children:[y&&(0,c.jsx)(zm,{children:u&&(0,c.jsx)(u,{})}),x&&(0,c.jsx)(Zm,{focusOnMount:!0,children:d&&(0,c.jsx)(d,{})}),r&&(0,c.jsx)(Fn.Spinner,{})]}),(0,c.jsx)("div",{className:"editor-post-publish-panel__footer",children:(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Always show pre-publish checks."),checked:n,onChange:l})})]})}}var qm=(0,m.compose)([(0,d.withSelect)((e=>{const{getPostType:t}=e(u.store),{getCurrentPost:s,getCurrentPostId:n,getEditedPostAttribute:o,isCurrentPostPublished:r,isCurrentPostScheduled:i,isEditedPostBeingScheduled:a,isEditedPostDirty:l,isAutosavingPost:c,isSavingPost:d,isSavingNonPostEntityChanges:p}=e(wc),{isPublishSidebarEnabled:m}=e(wc),h=t(o("type"));return{hasPublishAction:s()._links?.["wp:action-publish"]??!1,isPostTypeViewable:h?.viewable,isBeingScheduled:a(),isDirty:l(),isPublished:r(),isPublishSidebarEnabled:m(),isSaving:d()&&!c(),isSavingNonPostEntityChanges:p(),isScheduled:i(),currentPostId:n()}})),(0,d.withDispatch)(((e,{isPublishSidebarEnabled:t})=>{const{disablePublishSidebar:s,enablePublishSidebar:n}=e(wc);return{onTogglePublishSidebar:()=>{t?s():n()}}})),Fn.withFocusReturn,Fn.withConstrainedTabbing])(Ym),Km=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z"})}),Qm=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z"})});function Xm({children:e}){const{hasStickyAction:t,postType:s}=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPost();return{hasStickyAction:t._links?.["wp:action-sticky"]??!1,postType:e(wc).getCurrentPostType()}}),[]);return"post"===s&&t?e:null}function Jm(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("sticky")??!1),[]),{editPost:t}=(0,d.useDispatch)(wc);return(0,c.jsx)(Xm,{children:(0,c.jsx)(Fn.CheckboxControl,{className:"editor-post-sticky__checkbox-control",label:(0,fs.__)("Sticky"),help:(0,fs.__)("Pin this post to the top of the blog."),checked:e,onChange:()=>t({sticky:!e}),__nextHasNoMarginBottom:!0})})}const eh={"auto-draft":{label:(0,fs.__)("Draft"),icon:yr},draft:{label:(0,fs.__)("Draft"),icon:yr},pending:{label:(0,fs.__)("Pending"),icon:vr},private:{label:(0,fs.__)("Private"),icon:wr},future:{label:(0,fs.__)("Scheduled"),icon:xr},publish:{label:(0,fs.__)("Published"),icon:Sr}},th=[{label:(0,fs.__)("Draft"),value:"draft",description:(0,fs.__)("Not ready to publish.")},{label:(0,fs.__)("Pending"),value:"pending",description:(0,fs.__)("Waiting for review before publishing.")},{label:(0,fs.__)("Private"),value:"private",description:(0,fs.__)("Only visible to site admins and editors.")},{label:(0,fs.__)("Scheduled"),value:"future",description:(0,fs.__)("Publish automatically on a chosen date.")},{label:(0,fs.__)("Published"),value:"publish",description:(0,fs.__)("Visible to everyone.")}],sh=[B,I,N,R];function nh(){const{status:e,date:t,password:s,postId:n,postType:o,canEdit:r}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostId:s,getCurrentPostType:n,getCurrentPost:o}=e(wc);return{status:t("status"),date:t("date"),password:t("password"),postId:s(),postType:n(),canEdit:o()._links?.["wp:action-publish"]??!1}}),[]),[i,a]=(0,p.useState)(!!s),l=(0,m.useInstanceId)(nh,"editor-change-status__password-input"),{editEntityRecord:h}=(0,d.useDispatch)(u.store),[_,f]=(0,p.useState)(null),b=(0,p.useMemo)((()=>({anchor:_,"aria-label":(0,fs.__)("Status & visibility"),headerTitle:(0,fs.__)("Status & visibility"),placement:"left-start",offset:36,shift:!0})),[_]);if(sh.includes(o))return null;const y=({status:r=e,password:i=s,date:a=t})=>{h("postType",o,n,{status:r,date:a,password:i})},x=e=>{a(e),e||y({password:""})},v=n=>{let o=t,r=s;"future"===e&&new Date(t)>new Date&&(o=null),"private"===n&&s&&(r=""),y({status:n,date:o,password:r})};return(0,c.jsx)(Dd,{label:(0,fs.__)("Status"),ref:f,children:r?(0,c.jsx)(Fn.Dropdown,{className:"editor-post-status",contentClassName:"editor-change-status__content",popoverProps:b,focusOnMount:!0,renderToggle:({onToggle:t,isOpen:s})=>(0,c.jsx)(Fn.Button,{className:"editor-post-status__toggle",variant:"tertiary",size:"compact",onClick:t,icon:eh[e]?.icon,"aria-label":(0,fs.sprintf)((0,fs.__)("Change status: %s"),eh[e]?.label),"aria-expanded":s,children:eh[e]?.label}),renderContent:({onClose:t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Status & visibility"),onClose:t}),(0,c.jsx)("form",{onSubmit:e=>{e.preventDefault(),t()},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(Fn.RadioControl,{className:"editor-change-status__options",hideLabelFromVision:!0,label:(0,fs.__)("Status"),options:th,onChange:v,selected:"auto-draft"===e?"draft":e}),"future"===e&&(0,c.jsx)("div",{className:"editor-change-status__publish-date-wrapper",children:(0,c.jsx)(cm,{showPopoverHeaderActions:!1,isCompact:!0})}),"private"!==e&&(0,c.jsxs)(Fn.__experimentalVStack,{as:"fieldset",spacing:4,className:"editor-change-status__password-fieldset",children:[(0,c.jsx)(Fn.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,fs.__)("Password protected"),help:(0,fs.__)("Only visible to those who know the password."),checked:i,onChange:x}),i&&(0,c.jsx)("div",{className:"editor-change-status__password-input",children:(0,c.jsx)(Fn.TextControl,{label:(0,fs.__)("Password"),onChange:e=>y({password:e}),value:s,placeholder:(0,fs.__)("Use a secure password"),type:"text",id:l,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,maxLength:255})})]}),(0,c.jsx)(Jm,{})]})})]})}):(0,c.jsx)("div",{className:"editor-post-status is-read-only",children:eh[e]?.label})})}function oh({forceIsDirty:e}){const[t,s]=(0,p.useState)(!1),n=(0,m.useViewportMatch)("small"),{isAutosaving:o,isDirty:r,isNew:i,isPublished:a,isSaveable:l,isSaving:u,isScheduled:h,hasPublishAction:g,showIconLabels:_,postStatus:f,postStatusHasChanged:b}=(0,d.useSelect)((t=>{const{isEditedPostNew:s,isCurrentPostPublished:n,isCurrentPostScheduled:o,isEditedPostDirty:r,isSavingPost:i,isEditedPostSaveable:a,getCurrentPost:l,isAutosavingPost:c,getEditedPostAttribute:d,getPostEdits:u}=t(wc),{get:p}=t(C.store);return{isAutosaving:c(),isDirty:e||r(),isNew:s(),isPublished:n(),isSaving:i(),isSaveable:a(),isScheduled:o(),hasPublishAction:l()?._links?.["wp:action-publish"]??!1,showIconLabels:p("core","showIconLabels"),postStatus:d("status"),postStatusHasChanged:!!u()?.status}}),[e]),y="pending"===f,{savePost:x}=(0,d.useDispatch)(wc),v=(0,m.usePrevious)(u);if((0,p.useEffect)((()=>{let e;return v&&!u&&(s(!0),e=setTimeout((()=>{s(!1)}),1e3)),()=>clearTimeout(e)}),[u]),!g&&y)return null;const w=!["pending","draft","auto-draft"].includes(f)&&th.map((({value:e})=>e)).includes(f);if(a||h||w||b&&["pending","draft"].includes(f))return null;const S=y?(0,fs.__)("Save as pending"):(0,fs.__)("Save draft"),k=(0,fs.__)("Save"),P=t||!i&&!r,j=u||P,E=u||P||!l;let T;return u?T=o?(0,fs.__)("Autosaving"):(0,fs.__)("Saving"):P?T=(0,fs.__)("Saved"):n?T=S:_&&(T=k),(0,c.jsxs)(Fn.Button,{className:l||u?hr({"editor-post-save-draft":!j,"editor-post-saved-state":j,"is-saving":u,"is-autosaving":o,"is-saved":P,[(0,Fn.__unstableGetAnimateClassName)({type:"loading"})]:u}):void 0,onClick:E?void 0:()=>x(),shortcut:E?void 0:cl.displayShortcut.primary("s"),variant:"tertiary",size:"compact",icon:n?void 0:Km,label:T||S,"aria-disabled":E,children:[j&&(0,c.jsx)(ti,{icon:P?Zn:Qm}),T]})}function rh({children:e}){return(0,d.useSelect)((e=>e(wc).getCurrentPost()._links?.["wp:action-publish"]??!1),[])?e:null}const ih=[B,I,N,R];function ah(){const[e,t]=(0,p.useState)(null),s=(0,d.useSelect)((e=>e(wc).getCurrentPostType()),[]),n=(0,p.useMemo)((()=>({anchor:e,"aria-label":(0,fs.__)("Change publish date"),placement:"left-start",offset:36,shift:!0})),[e]),o=um(),r=um({full:!0});return ih.includes(s)?null:(0,c.jsx)(rh,{children:(0,c.jsx)(Dd,{label:(0,fs.__)("Publish"),ref:t,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:n,focusOnMount:!0,className:"editor-post-schedule__panel-dropdown",contentClassName:"editor-post-schedule__dialog",renderToggle:({onToggle:e,isOpen:t})=>(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-schedule__dialog-toggle",variant:"tertiary",tooltipPosition:"middle left",onClick:e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change date: %s"),o),label:r,showTooltip:o!==r,"aria-expanded":t,children:o}),renderContent:({onClose:e})=>(0,c.jsx)(lm,{onClose:e})})})})}function lh(){k()("wp.editor.PostSwitchToDraftButton",{since:"6.7",version:"6.9"});const[e,t]=(0,p.useState)(!1),{editPost:s,savePost:n}=(0,d.useDispatch)(wc),{isSaving:o,isPublished:r,isScheduled:i}=(0,d.useSelect)((e=>{const{isSavingPost:t,isCurrentPostPublished:s,isCurrentPostScheduled:n}=e(wc);return{isSaving:t(),isPublished:s(),isScheduled:n()}}),[]),a=o||!r&&!i;let l,u;r?(l=(0,fs.__)("Are you sure you want to unpublish this post?"),u=(0,fs.__)("Unpublish")):i&&(l=(0,fs.__)("Are you sure you want to unschedule this post?"),u=(0,fs.__)("Unschedule"));return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-switch-to-draft",onClick:()=>{a||t(!0)},"aria-disabled":a,variant:"secondary",style:{flexGrow:"1",justifyContent:"center"},children:(0,fs.__)("Switch to draft")}),(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:e,onConfirm:()=>{t(!1),s({status:"draft"}),n()},onCancel:()=>t(!1),confirmButtonText:u,children:l})]})}function ch(){const{syncStatus:e,postType:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc),s=t("meta");return{syncStatus:"unsynced"===s?.wp_pattern_sync_status?"unsynced":t("wp_pattern_sync_status"),postType:t("type")}}));return"wp_block"!==t?null:(0,c.jsx)(Dd,{label:(0,fs.__)("Sync status"),children:(0,c.jsx)("div",{className:"editor-post-sync-status__value",children:"unsynced"===e?(0,fs._x)("Not synced","pattern (singular)"):(0,fs._x)("Synced","pattern (singular)")})})}const dh=e=>e;var uh=function({taxonomyWrapper:e=dh}){const{postType:t,taxonomies:s}=(0,d.useSelect)((e=>({postType:e(wc).getCurrentPostType(),taxonomies:e(u.store).getEntityRecords("root","taxonomy",{per_page:-1})})),[]);return(s??[]).filter((e=>e.types.includes(t)&&e.visibility?.show_ui)).map((t=>{const s=t.hierarchical?Mm:km,n={slug:t.slug,...t.hierarchical?{}:{__nextHasNoMarginBottom:!0}};return(0,c.jsx)(p.Fragment,{children:e((0,c.jsx)(s,{...n}),t)},`taxonomy-${t.slug}`)}))};function ph({children:e}){const t=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPostType(),s=e(u.store).getEntityRecords("root","taxonomy",{per_page:-1});return s?.some((e=>e.types.includes(t)))}),[]);return t?e:null}function mh({taxonomy:e,children:t}){const s=e?.slug,n=s?`taxonomy-panel-${s}`:"",{isEnabled:o,isOpened:r}=(0,d.useSelect)((e=>{const{isEditorPanelEnabled:t,isEditorPanelOpened:o}=e(wc);return{isEnabled:!!s&&t(n),isOpened:!!s&&o(n)}}),[n,s]),{toggleEditorPanelOpened:i}=(0,d.useDispatch)(wc);if(!o)return null;const a=e?.labels?.menu_name;return a?(0,c.jsx)(Fn.PanelBody,{title:a,opened:r,onToggle:()=>i(n),children:t}):null}function hh(){return(0,c.jsx)(ph,{children:(0,c.jsx)(uh,{taxonomyWrapper:(e,t)=>(0,c.jsx)(mh,{taxonomy:t,children:e})})})}var gh=s(4132);function _h(){const e=(0,m.useInstanceId)(_h),{content:t,blocks:s,type:n,id:o}=(0,d.useSelect)((e=>{const{getEditedEntityRecord:t}=e(u.store),{getCurrentPostType:s,getCurrentPostId:n}=e(wc),o=s(),r=n(),i=t("postType",o,r);return{content:i?.content,blocks:i?.blocks,type:o,id:r}}),[]),{editEntityRecord:r}=(0,d.useDispatch)(u.store),i=(0,p.useMemo)((()=>t instanceof Function?t({blocks:s}):s?(0,x.__unstableSerializeAndClean)(s):t),[t,s]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.VisuallyHidden,{as:"label",htmlFor:`post-content-${e}`,children:(0,fs.__)("Type text or HTML")}),(0,c.jsx)(gh.A,{autoComplete:"off",dir:"auto",value:i,onChange:e=>{r("postType",n,o,{content:e.target.value,blocks:void 0,selection:void 0})},className:"editor-post-text-editor",id:`post-content-${e}`,placeholder:(0,fs.__)("Start writing with text or HTML")})]})}const fh="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text",bh=/[\r\n]+/g;function yh(e){const t=(0,p.useRef)(),{isCleanNewPost:s}=(0,d.useSelect)((e=>{const{isCleanNewPost:t}=e(wc);return{isCleanNewPost:t()}}),[]);return(0,p.useImperativeHandle)(e,(()=>({focus:()=>{t?.current?.focus()}}))),(0,p.useEffect)((()=>{if(!t.current)return;const{defaultView:e}=t.current.ownerDocument,{name:n,parent:o}=e,r="editor-canvas"===n?o.document:e.document,{activeElement:i,body:a}=r;!s||i&&a!==i||t.current.focus()}),[s]),{ref:t}}function xh(){const{editPost:e}=(0,d.useDispatch)(wc),{title:t}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc);return{title:t("title")}}),[]);return{title:t,setTitle:function(t){e({title:t})}}}const vh=(0,p.forwardRef)(((e,t)=>{const{placeholder:s}=(0,d.useSelect)((e=>{const{getSettings:t}=e(g.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[n,o]=(0,p.useState)(!1),{ref:r}=yh(t),{title:i,setTitle:a}=xh(),[l,u]=(0,p.useState)({}),{clearSelectedBlock:h,insertBlocks:_,insertDefaultBlock:f}=(0,d.useDispatch)(g.store),b=(0,Ln.decodeEntities)(s)||(0,fs.__)("Add title"),{value:y,onChange:v,ref:w}=(0,Wc.__unstableUseRichText)({value:i,onChange(e){a(e.replace(bh," "))},placeholder:b,selectionStart:l.start,selectionEnd:l.end,onSelectionChange(e,t){u((s=>{const{start:n,end:o}=s;return n===e&&o===t?s:{start:e,end:t}}))},__unstableDisableFormats:!1});function S(e){_(e,0)}const k=hr(fh,{"is-selected":n});return(0,c.jsx)("h1",{ref:(0,m.useMergeRefs)([w,r]),contentEditable:!0,className:k,"aria-label":b,role:"textbox","aria-multiline":"true",onFocus:function(){o(!0),h()},onBlur:function(){o(!1),u({})},onKeyDown:function(e){e.keyCode===cl.ENTER&&(e.preventDefault(),f(void 0,void 0,0))},onPaste:function(e){const t=e.clipboardData;let s="",n="";try{s=t.getData("text/plain"),n=t.getData("text/html")}catch(e){return}window.console.log("Received HTML:\n\n",n),window.console.log("Received plain text:\n\n",s);const o=(0,x.pasteHandler)({HTML:n,plainText:s});if(e.preventDefault(),o.length)if("string"!=typeof o){const[e]=o;if(i||"core/heading"!==e.name&&"core/paragraph"!==e.name)S(o);else{const t=(0,Hc.__unstableStripHTML)(e.attributes.content);a(t),S(o.slice(1))}}else{const e=(0,Hc.__unstableStripHTML)(o);v((0,Wc.insert)(y,(0,Wc.create)({html:e})))}}})}));var wh=(0,p.forwardRef)(((e,t)=>(0,c.jsx)(Id,{supportKeys:"title",children:(0,c.jsx)(vh,{ref:t})})));var Sh=(0,p.forwardRef)((function(e,t){const{placeholder:s}=(0,d.useSelect)((e=>{const{getSettings:t}=e(g.store),{titlePlaceholder:s}=t();return{placeholder:s}}),[]),[n,o]=(0,p.useState)(!1),{title:r,setTitle:i}=xh(),{ref:a}=yh(t),l=hr(fh,{"is-selected":n,"is-raw-text":!0}),u=(0,Ln.decodeEntities)(s)||(0,fs.__)("Add title");return(0,c.jsx)(Fn.TextareaControl,{ref:a,value:r,onChange:function(e){i(e.replace(bh," "))},onFocus:function(){o(!0)},onBlur:function(){o(!1)},label:s,className:l,placeholder:u,hideLabelFromVision:!0,autoComplete:"off",dir:"auto",rows:1,__nextHasNoMarginBottom:!0})}));function kh({children:e}){const{canTrashPost:t}=(0,d.useSelect)((e=>{const{isEditedPostNew:t,getCurrentPostId:s,getCurrentPostType:n}=e(wc),{canUser:o}=e(u.store),r=n(),i=s(),a=t(),l=!!i&&o("delete",{kind:"postType",name:r,id:i});return{canTrashPost:(!a||i)&&l&&!M.includes(r)}}),[]);return t?e:null}function Ch({onActionPerformed:e}){const t=(0,d.useRegistry)(),{isNew:s,isDeleting:n,postId:o,title:r}=(0,d.useSelect)((e=>{const t=e(wc);return{isNew:t.isEditedPostNew(),isDeleting:t.isDeletingPost(),postId:t.getCurrentPostId(),title:t.getCurrentPostAttribute("title")}}),[]),{trashPost:i}=(0,d.useDispatch)(wc),[a,l]=(0,p.useState)(!1);if(s||!o)return null;return(0,c.jsxs)(kh,{children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,className:"editor-post-trash",isDestructive:!0,variant:"secondary",isBusy:n,"aria-disabled":n,onClick:n?void 0:()=>l(!0),children:(0,fs.__)("Move to trash")}),(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:a,onConfirm:async()=>{l(!1),await i();const s=await t.resolveSelect(wc).getCurrentPost();e?.("move-to-trash",[s])},onCancel:()=>l(!1),confirmButtonText:(0,fs.__)("Move to trash"),size:"small",children:(0,fs.sprintf)((0,fs.__)('Are you sure you want to move "%s" to the trash?'),r)})]})}function Ph({onClose:e}){const{isEditable:t,postSlug:s,postLink:n,permalinkPrefix:o,permalinkSuffix:r,permalink:i}=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPost(),s=e(wc).getCurrentPostType(),n=e(u.store).getPostType(s),o=e(wc).getPermalinkParts(),r=t?._links?.["wp:action-publish"]??!1;return{isEditable:e(wc).isPermalinkEditable()&&r,postSlug:(0,w.safeDecodeURIComponent)(e(wc).getEditedPostSlug()),viewPostLabel:n?.labels.view_item,postLink:t.link,permalinkPrefix:o?.prefix,permalinkSuffix:o?.suffix,permalink:(0,w.safeDecodeURIComponent)(e(wc).getPermalink())}}),[]),{editPost:a}=(0,d.useDispatch)(wc),{createNotice:l}=(0,d.useDispatch)(_s.store),[h,_]=(0,p.useState)(!1),f=(0,m.useCopyToClipboard)(i,(()=>{l("info",(0,fs.__)("Copied Permalink to clipboard."),{isDismissible:!0,type:"snackbar"})})),b="editor-post-url__slug-description-"+(0,m.useInstanceId)(Ph);return(0,c.jsxs)("div",{className:"editor-post-url",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Slug"),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:3,children:[t&&(0,c.jsx)("p",{className:"editor-post-url__intro",children:(0,p.createInterpolateElement)((0,fs.__)("<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>"),{span:(0,c.jsx)("span",{id:b}),a:(0,c.jsx)(Fn.ExternalLink,{href:(0,fs.__)("https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink")})})}),(0,c.jsxs)("div",{children:[t&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.__experimentalInputControl,{__next40pxDefaultSize:!0,prefix:(0,c.jsx)(Fn.__experimentalInputControlPrefixWrapper,{children:"/"}),suffix:(0,c.jsx)(Fn.__experimentalInputControlSuffixWrapper,{variant:"control",children:(0,c.jsx)(Fn.Button,{icon:Br,ref:f,size:"small",label:"Copy"})}),label:(0,fs.__)("Slug"),hideLabelFromVision:!0,value:h?"":s,autoComplete:"off",spellCheck:"false",type:"text",className:"editor-post-url__input",onChange:e=>{a({slug:e}),e?h&&_(!1):h||_(!0)},onBlur:e=>{a({slug:(0,w.cleanForSlug)(e.target.value)}),h&&_(!1)},"aria-describedby":b}),(0,c.jsxs)("p",{className:"editor-post-url__permalink",children:[(0,c.jsx)("span",{className:"editor-post-url__permalink-visual-label",children:(0,fs.__)("Permalink:")}),(0,c.jsxs)(Fn.ExternalLink,{className:"editor-post-url__link",href:n,target:"_blank",children:[(0,c.jsx)("span",{className:"editor-post-url__link-prefix",children:o}),(0,c.jsx)("span",{className:"editor-post-url__link-slug",children:s}),(0,c.jsx)("span",{className:"editor-post-url__link-suffix",children:r})]})]})]}),!t&&(0,c.jsx)(Fn.ExternalLink,{className:"editor-post-url__link",href:n,target:"_blank",children:n})]})]})]})}function jh({children:e}){const t=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPostType(),s=e(u.store).getPostType(t);if(!s?.viewable)return!1;if(!e(wc).getCurrentPost().link)return!1;return!!e(wc).getPermalinkParts()}),[]);return t?e:null}function Eh(){return Th()}function Th(){const e=(0,d.useSelect)((e=>e(wc).getPermalink()),[]);return(0,w.filterURLForDisplay)((0,w.safeDecodeURIComponent)(e))}function Bh(){const{isFrontPage:e}=(0,d.useSelect)((e=>{const{getCurrentPostId:t}=e(wc),{getEditedEntityRecord:s,canUser:n}=e(u.store),o=n("read",{kind:"root",name:"site"})?s("root","site"):void 0,r=t();return{isFrontPage:o?.page_on_front===r}}),[]),[t,s]=(0,p.useState)(null),n=(0,p.useMemo)((()=>({anchor:t,placement:"left-start",offset:36,shift:!0})),[t]),o=e?(0,fs.__)("Link"):(0,fs.__)("Slug");return(0,c.jsx)(jh,{children:(0,c.jsxs)(Dd,{label:o,ref:s,children:[!e&&(0,c.jsx)(Fn.Dropdown,{popoverProps:n,className:"editor-post-url__panel-dropdown",contentClassName:"editor-post-url__panel-dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Ih,{isOpen:e,onClick:t}),renderContent:({onClose:e})=>(0,c.jsx)(Ph,{onClose:e})}),e&&(0,c.jsx)(Nh,{})]})})}function Ih({isOpen:e,onClick:t}){const{slug:s}=(0,d.useSelect)((e=>({slug:e(wc).getEditedPostSlug()})),[]),n=(0,w.safeDecodeURIComponent)(s);return(0,c.jsx)(Fn.Button,{size:"compact",className:"editor-post-url__panel-toggle",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change link: %s"),n),onClick:t,children:(0,c.jsx)(c.Fragment,{children:n})})}function Nh(){const{postLink:e}=(0,d.useSelect)((e=>{const{getCurrentPost:t}=e(wc);return{postLink:t()?.link}}),[]);return(0,c.jsx)(Fn.ExternalLink,{className:"editor-post-url__front-page-link",href:e,target:"_blank",children:e})}function Rh({render:e}){return e({canEdit:(0,d.useSelect)((e=>e(wc).getCurrentPost()._links?.["wp:action-publish"]??!1))})}var Dh=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z"})});const Ah=window.wp.wordcount;function Mh(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("content")),[]),t=(0,fs._x)("words","Word count type. Do not translate!");return(0,c.jsx)("span",{className:"word-count",children:(0,Ah.count)(e,t)})}const Lh=189;function Oh(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("content")),[]),t=(0,fs._x)("words","Word count type. Do not translate!"),s=Math.round((0,Ah.count)(e,t)/Lh),n=0===s?(0,p.createInterpolateElement)((0,fs.__)("<span>< 1</span> minute"),{span:(0,c.jsx)("span",{})}):(0,p.createInterpolateElement)((0,fs.sprintf)((0,fs._n)("<span>%s</span> minute","<span>%s</span> minutes",s),s),{span:(0,c.jsx)("span",{})});return(0,c.jsx)("span",{className:"time-to-read",children:n})}function Fh(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("content")),[]);return(0,Ah.count)(e,"characters_including_spaces")}var Vh=function({hasOutlineItemsDisabled:e,onRequestClose:t}){const{headingCount:s,paragraphCount:n,numberOfBlocks:o}=(0,d.useSelect)((e=>{const{getGlobalBlockCount:t}=e(g.store);return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":(0,fs.__)("Document Statistics"),tabIndex:"0",children:(0,c.jsxs)("ul",{role:"list",className:"table-of-contents__counts",children:[(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Words"),(0,c.jsx)(Mh,{})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Characters"),(0,c.jsx)("span",{className:"table-of-contents__number",children:(0,c.jsx)(Fh,{})})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Time to read"),(0,c.jsx)(Oh,{})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Headings"),(0,c.jsx)("span",{className:"table-of-contents__number",children:s})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Paragraphs"),(0,c.jsx)("span",{className:"table-of-contents__number",children:n})]}),(0,c.jsxs)("li",{className:"table-of-contents__count",children:[(0,fs.__)("Blocks"),(0,c.jsx)("span",{className:"table-of-contents__number",children:o})]})]})}),s>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("hr",{}),(0,c.jsx)("h2",{className:"table-of-contents__title",children:(0,fs.__)("Document Outline")}),(0,c.jsx)(td,{onSelect:t,hasOutlineItemsDisabled:e})]})]})};var Uh=(0,p.forwardRef)((function({hasOutlineItemsDisabled:e,repositionDropdown:t,...s},n){const o=(0,d.useSelect)((e=>!!e(g.store).getBlockCount()),[]);return(0,c.jsx)(Fn.Dropdown,{popoverProps:{placement:t?"right":"bottom"},className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,...s,ref:n,onClick:o?t:void 0,icon:Dh,"aria-expanded":e,"aria-haspopup":"true",label:(0,fs.__)("Details"),tooltipPosition:"bottom","aria-disabled":!o}),renderContent:({onClose:t})=>(0,c.jsx)(Vh,{onRequestClose:t,hasOutlineItemsDisabled:e})})}));function Hh(){const{__experimentalGetDirtyEntityRecords:e}=(0,d.useSelect)(u.store);return(0,p.useEffect)((()=>{const t=t=>{if(e().length>0)return t.returnValue=(0,fs.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}}),[e]),null}const zh=window.wp.serverSideRender;var Gh=s.n(zh);function $h(e,t,s=[]){const n=(0,p.forwardRef)(((s,n)=>(k()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),(0,c.jsx)(t,{ref:n,...s}))));return s.forEach((s=>{n[s]=$h(e+"."+s,t[s])})),n}function Wh(e,t){return(...s)=>(k()("wp.editor."+e,{since:"5.3",alternative:"wp.blockEditor."+e,version:"6.2"}),t(...s))}const Zh=$h("RichText",g.RichText,["Content"]);Zh.isEmpty=Wh("RichText.isEmpty",g.RichText.isEmpty);const Yh=$h("Autocomplete",g.Autocomplete),qh=$h("AlignmentToolbar",g.AlignmentToolbar),Kh=$h("BlockAlignmentToolbar",g.BlockAlignmentToolbar),Qh=$h("BlockControls",g.BlockControls,["Slot"]),Xh=$h("BlockEdit",g.BlockEdit),Jh=$h("BlockEditorKeyboardShortcuts",g.BlockEditorKeyboardShortcuts),eg=$h("BlockFormatControls",g.BlockFormatControls,["Slot"]),tg=$h("BlockIcon",g.BlockIcon),sg=$h("BlockInspector",g.BlockInspector),ng=$h("BlockList",g.BlockList),og=$h("BlockMover",g.BlockMover),rg=$h("BlockNavigationDropdown",g.BlockNavigationDropdown),ig=$h("BlockSelectionClearer",g.BlockSelectionClearer),ag=$h("BlockSettingsMenu",g.BlockSettingsMenu),lg=$h("BlockTitle",g.BlockTitle),cg=$h("BlockToolbar",g.BlockToolbar),dg=$h("ColorPalette",g.ColorPalette),ug=$h("ContrastChecker",g.ContrastChecker),pg=$h("CopyHandler",g.CopyHandler),mg=$h("DefaultBlockAppender",g.DefaultBlockAppender),hg=$h("FontSizePicker",g.FontSizePicker),gg=$h("Inserter",g.Inserter),_g=$h("InnerBlocks",g.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),fg=$h("InspectorAdvancedControls",g.InspectorAdvancedControls,["Slot"]),bg=$h("InspectorControls",g.InspectorControls,["Slot"]),yg=$h("PanelColorSettings",g.PanelColorSettings),xg=$h("PlainText",g.PlainText),vg=$h("RichTextShortcut",g.RichTextShortcut),wg=$h("RichTextToolbarButton",g.RichTextToolbarButton),Sg=$h("__unstableRichTextInputEvent",g.__unstableRichTextInputEvent),kg=$h("MediaPlaceholder",g.MediaPlaceholder),Cg=$h("MediaUpload",g.MediaUpload),Pg=$h("MediaUploadCheck",g.MediaUploadCheck),jg=$h("MultiSelectScrollIntoView",g.MultiSelectScrollIntoView),Eg=$h("NavigableToolbar",g.NavigableToolbar),Tg=$h("ObserveTyping",g.ObserveTyping),Bg=$h("SkipToSelectedBlock",g.SkipToSelectedBlock),Ig=$h("URLInput",g.URLInput),Ng=$h("URLInputButton",g.URLInputButton),Rg=$h("URLPopover",g.URLPopover),Dg=$h("Warning",g.Warning),Ag=$h("WritingFlow",g.WritingFlow),Mg=Wh("createCustomColorsHOC",g.createCustomColorsHOC),Lg=Wh("getColorClassName",g.getColorClassName),Og=Wh("getColorObjectByAttributeValues",g.getColorObjectByAttributeValues),Fg=Wh("getColorObjectByColorValue",g.getColorObjectByColorValue),Vg=Wh("getFontSize",g.getFontSize),Ug=Wh("getFontSizeClass",g.getFontSizeClass),Hg=Wh("withColorContext",g.withColorContext),zg=Wh("withColors",g.withColors),Gg=Wh("withFontSizes",g.withFontSizes),$g=Cl,Wg=Cl;function Zg(e){return k()("wp.editor.cleanForSlug",{since:"12.7",plugin:"Gutenberg",alternative:"wp.url.cleanForSlug"}),(0,w.cleanForSlug)(e)}var Yg=(0,Fn.createSlotFill)(Symbol("EditCanvasContainerSlot"));const qg="__experimentalMainDashboardButton",{Fill:Kg,Slot:Qg}=(0,Fn.createSlotFill)(qg),Xg=Kg;Xg.Slot=()=>{const e=(0,Fn.__experimentalUseSlotFills)(qg);return(0,c.jsx)(Qg,{bubblesVirtually:!0,fillProps:{length:e?e.length:0}})};var Jg=Xg,e_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z"})}),t_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z"})});const{useHasBlockToolbar:s_}=$(g.privateApis);function n_({isCollapsed:e,onToggle:t}){const{blockSelectionStart:s}=(0,d.useSelect)((e=>({blockSelectionStart:e(g.store).getBlockSelectionStart()})),[]),n=s_(),o=!!s;return(0,p.useEffect)((()=>{s&&t(!1)}),[s,t]),n?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:hr("editor-collapsible-block-toolbar",{"is-collapsed":e||!o}),children:(0,c.jsx)(g.BlockToolbar,{hideDragHandle:!0})}),(0,c.jsx)(Fn.Popover.Slot,{name:"block-toolbar"}),(0,c.jsx)(Fn.Button,{className:"editor-collapsible-block-toolbar__toggle",icon:e?e_:t_,onClick:()=>{t(!e)},label:e?(0,fs.__)("Show block tools"):(0,fs.__)("Hide block tools"),size:"compact"})]}):null}var o_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});var r_=function({className:e,disableBlockTools:t=!1}){const{setIsInserterOpened:s,setIsListViewOpened:n}=(0,d.useDispatch)(wc),{isDistractionFree:o,isInserterOpened:r,isListViewOpen:i,listViewShortcut:a,inserterSidebarToggleRef:l,listViewToggleRef:u,showIconLabels:h}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{isListViewOpened:s,getEditorMode:n,getInserterSidebarToggleRef:o,getListViewToggleRef:r}=$(e(wc)),{getShortcutRepresentation:i}=e(al.store);return{isInserterOpened:e(wc).isInserterOpened(),isListViewOpen:s(),listViewShortcut:i("core/editor/toggle-list-view"),inserterSidebarToggleRef:o(),listViewToggleRef:r(),showIconLabels:t("core","showIconLabels"),isDistractionFree:t("core","distractionFree"),isVisualMode:"visual"===n()}}),[]),_=(0,m.useViewportMatch)("wide"),f=(0,fs.__)("Document tools"),b=(0,p.useCallback)((()=>n(!i)),[n,i]),y=(0,p.useCallback)((()=>s(!r)),[r,s]),x=(0,fs._x)("Block Inserter","Generic label for block inserter button"),v=r?(0,fs.__)("Close"):(0,fs.__)("Add");return(0,c.jsx)(g.NavigableToolbar,{className:hr("editor-document-tools","edit-post-header-toolbar",e),"aria-label":f,variant:"unstyled",children:(0,c.jsxs)("div",{className:"editor-document-tools__left",children:[!o&&(0,c.jsx)(Fn.ToolbarButton,{ref:l,className:"editor-document-tools__inserter-toggle",variant:"primary",isPressed:r,onMouseDown:e=>{r&&e.preventDefault()},onClick:y,disabled:t,icon:o_,label:h?v:x,showTooltip:!h,"aria-expanded":r}),(_||!h)&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.ToolbarItem,{as:ad,showTooltip:!h,variant:h?"tertiary":void 0,size:"compact"}),(0,c.jsx)(Fn.ToolbarItem,{as:id,showTooltip:!h,variant:h?"tertiary":void 0,size:"compact"}),!o&&(0,c.jsx)(Fn.ToolbarButton,{className:"editor-document-tools__document-overview-toggle",icon:Zi,disabled:t,isPressed:i,label:(0,fs.__)("Document Overview"),onClick:b,shortcut:a,showTooltip:!h,variant:h?"tertiary":void 0,"aria-expanded":i,ref:u})]})]})})},i_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})});function a_(){const{createNotice:e}=(0,d.useDispatch)(_s.store),{getCurrentPostId:t,getCurrentPostType:s}=(0,d.useSelect)(wc),{getEditedEntityRecord:n}=(0,d.useSelect)(u.store);const o=(0,m.useCopyToClipboard)((function(){const e=n("postType",s(),t());return e?"function"==typeof e.content?e.content(e):e.blocks?(0,x.__unstableSerializeAndClean)(e.blocks):e.content?e.content:void 0:""}),(function(){e("info",(0,fs.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}));return(0,c.jsx)(Fn.MenuItem,{ref:o,children:(0,fs.__)("Copy all blocks")})}const l_=[{value:"visual",label:(0,fs.__)("Visual editor")},{value:"text",label:(0,fs.__)("Code editor")}];var c_=function(){const{shortcut:e,isRichEditingEnabled:t,isCodeEditingEnabled:s,mode:n}=(0,d.useSelect)((e=>({shortcut:e(al.store).getShortcutRepresentation("core/editor/toggle-mode"),isRichEditingEnabled:e(wc).getEditorSettings().richEditingEnabled,isCodeEditingEnabled:e(wc).getEditorSettings().codeEditingEnabled,mode:e(wc).getEditorMode()})),[]),{switchEditorMode:o}=(0,d.useDispatch)(wc);let r=n;t||"visual"!==n||(r="text"),s||"text"!==n||(r="visual");const i=l_.map((n=>(s||"text"!==n.value||(n={...n,disabled:!0}),t||"visual"!==n.value||(n={...n,disabled:!0,info:(0,fs.__)("You can enable the visual editor in your profile settings.")}),n.value===r||n.disabled?n:{...n,shortcut:e})));return(0,c.jsx)(Fn.MenuGroup,{label:(0,fs.__)("Editor"),children:(0,c.jsx)(Fn.MenuItemsChoice,{choices:i,value:r,onSelect:o})})};const{Fill:d_,Slot:u_}=(0,Fn.createSlotFill)("ToolsMoreMenuGroup");d_.Slot=({fillProps:e})=>(0,c.jsx)(u_,{fillProps:e});var p_=d_;const{Fill:m_,Slot:h_}=(0,Fn.createSlotFill)("web"===p.Platform.OS?Symbol("ViewMoreMenuGroup"):"ViewMoreMenuGroup");m_.Slot=({fillProps:e})=>(0,c.jsx)(h_,{fillProps:e});var g_=m_;function __(){const{openModal:e}=(0,d.useDispatch)(Ea),{set:t}=(0,d.useDispatch)(C.store),{toggleDistractionFree:s}=(0,d.useDispatch)(wc),n=(0,d.useSelect)((e=>e(C.store).get("core","showIconLabels")),[]),o=()=>{t("core","distractionFree",!1)};return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(Fn.DropdownMenu,{icon:i_,label:(0,fs.__)("Options"),popoverProps:{placement:"bottom-end",className:"more-menu-dropdown__content"},toggleProps:{showTooltip:!n,...n&&{variant:"tertiary"},tooltipPosition:"bottom",size:"compact"},children:({onClose:t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Fn.MenuGroup,{label:(0,fs._x)("View","noun"),children:[(0,c.jsx)(C.PreferenceToggleMenuItem,{scope:"core",name:"fixedToolbar",onToggle:o,label:(0,fs.__)("Top toolbar"),info:(0,fs.__)("Access all block and document tools in a single place"),messageActivated:(0,fs.__)("Top toolbar activated."),messageDeactivated:(0,fs.__)("Top toolbar deactivated.")}),(0,c.jsx)(C.PreferenceToggleMenuItem,{scope:"core",name:"distractionFree",label:(0,fs.__)("Distraction free"),info:(0,fs.__)("Write with calmness"),handleToggling:!1,onToggle:()=>s({createNotice:!1}),messageActivated:(0,fs.__)("Distraction free mode activated."),messageDeactivated:(0,fs.__)("Distraction free mode deactivated."),shortcut:cl.displayShortcut.primaryShift("\\")}),(0,c.jsx)(C.PreferenceToggleMenuItem,{scope:"core",name:"focusMode",label:(0,fs.__)("Spotlight mode"),info:(0,fs.__)("Focus on one block at a time"),messageActivated:(0,fs.__)("Spotlight mode activated."),messageDeactivated:(0,fs.__)("Spotlight mode deactivated.")}),(0,c.jsx)(g_.Slot,{fillProps:{onClose:t}})]}),(0,c.jsx)(c_,{}),(0,c.jsx)(Ra.Slot,{name:"core/plugin-more-menu",label:(0,fs.__)("Panels"),fillProps:{onClick:t}}),(0,c.jsxs)(Fn.MenuGroup,{label:(0,fs.__)("Tools"),children:[(0,c.jsx)(Fn.MenuItem,{onClick:()=>e("editor/keyboard-shortcut-help"),shortcut:cl.displayShortcut.access("h"),children:(0,fs.__)("Keyboard shortcuts")}),(0,c.jsx)(a_,{}),(0,c.jsxs)(Fn.MenuItem,{icon:Gn,href:(0,fs.__)("https://wordpress.org/documentation/article/wordpress-block-editor/"),target:"_blank",rel:"noopener noreferrer",children:[(0,fs.__)("Help"),(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]}),(0,c.jsx)(p_.Slot,{fillProps:{onClose:t}})]}),(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItem,{onClick:()=>e("editor/preferences"),children:(0,fs.__)("Preferences")})})]})})})}const f_="toggle",b_="button";function y_({forceIsDirty:e,setEntitiesSavedStatesCallback:t}){let s;const n=(0,m.useViewportMatch)("medium","<"),{togglePublishSidebar:o}=(0,d.useDispatch)(wc),{hasPublishAction:r,isBeingScheduled:i,isPending:a,isPublished:l,isPublishSidebarEnabled:u,isPublishSidebarOpened:p,isScheduled:h,postStatus:g,postStatusHasChanged:_}=(0,d.useSelect)((e=>({hasPublishAction:!!e(wc).getCurrentPost()?._links?.["wp:action-publish"],isBeingScheduled:e(wc).isEditedPostBeingScheduled(),isPending:e(wc).isCurrentPostPending(),isPublished:e(wc).isCurrentPostPublished(),isPublishSidebarEnabled:e(wc).isPublishSidebarEnabled(),isPublishSidebarOpened:e(wc).isPublishSidebarOpened(),isScheduled:e(wc).isCurrentPostScheduled(),postStatus:e(wc).getEditedPostAttribute("status"),postStatusHasChanged:e(wc).getPostEdits()?.status})),[]);return s=l||_&&!["future","publish"].includes(g)||h&&i||a&&!r&&!n?b_:n||u?f_:b_,(0,c.jsx)(Up,{forceIsDirty:e,isOpen:p,isToggle:s===f_,onToggle:o,setEntitiesSavedStatesCallback:t})}function x_(){const{hasLoaded:e,permalink:t,isPublished:s,label:n,showIconLabels:o}=(0,d.useSelect)((e=>{const t=e(wc).getCurrentPostType(),s=e(u.store).getPostType(t),{get:n}=e(C.store);return{permalink:e(wc).getPermalink(),isPublished:e(wc).isCurrentPostPublished(),label:s?.labels.view_item,hasLoaded:!!s,showIconLabels:n("core","showIconLabels")}}),[]);return s&&t&&e?(0,c.jsx)(Fn.Button,{icon:Gn,label:n||(0,fs.__)("View post"),href:t,target:"_blank",showTooltip:!o,size:"compact"}):null}var v_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})}),w_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})}),S_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.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"})});function k_({forceIsAutosaveable:e,disabled:t}){const{deviceType:s,homeUrl:n,isTemplate:o,isViewable:r,showIconLabels:i,isTemplateHidden:a,templateId:l}=(0,d.useSelect)((e=>{const{getDeviceType:t,getCurrentPostType:s,getCurrentTemplateId:n,getRenderingMode:o}=e(wc),{getEntityRecord:r,getPostType:i}=e(u.store),{get:a}=e(C.store),l=s();return{deviceType:t(),homeUrl:r("root","__unstableBase")?.home,isTemplate:"wp_template"===l,isViewable:i(l)?.viewable??!1,showIconLabels:a("core","showIconLabels"),isTemplateHidden:"post-only"===o(),templateId:n()}}),[]),{setDeviceType:p,setRenderingMode:h,setDefaultRenderingMode:_}=$((0,d.useDispatch)(wc)),{resetZoomLevel:f}=$((0,d.useDispatch)(g.store)),b=e=>{p(e),f()};if((0,m.useViewportMatch)("medium","<"))return null;const y={className:"editor-preview-dropdown__toggle",iconPosition:"right",size:"compact",showTooltip:!i,disabled:t,accessibleWhenDisabled:t},x={"aria-label":(0,fs.__)("View options")},v={desktop:v_,mobile:w_,tablet:S_},w=[{value:"Desktop",label:(0,fs.__)("Desktop"),icon:v_},{value:"Tablet",label:(0,fs.__)("Tablet"),icon:S_},{value:"Mobile",label:(0,fs.__)("Mobile"),icon:w_}];return(0,c.jsx)(Fn.DropdownMenu,{className:hr("editor-preview-dropdown",`editor-preview-dropdown--${s.toLowerCase()}`),popoverProps:{placement:"bottom-end"},toggleProps:y,menuProps:x,icon:v[s.toLowerCase()],label:(0,fs.__)("View"),disableOpenOnArrowDown:t,children:({onClose:t})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItemsChoice,{choices:w,value:s,onSelect:b})}),o&&(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsxs)(Fn.MenuItem,{href:n,target:"_blank",icon:Gn,onClick:t,children:[(0,fs.__)("View site"),(0,c.jsx)(Fn.VisuallyHidden,{as:"span",children:(0,fs.__)("(opens in a new tab)")})]})}),!o&&!!l&&(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Fn.MenuItem,{icon:a?void 0:Zn,isSelected:!a,role:"menuitemcheckbox",onClick:()=>{const e=a?"template-locked":"post-only";h(e),_(e),f()},children:(0,fs.__)("Show template")})}),r&&(0,c.jsx)(Fn.MenuGroup,{children:(0,c.jsx)(Lp,{className:"editor-preview-dropdown__button-external",role:"menuitem",forceIsAutosaveable:e,"aria-label":(0,fs.__)("Preview in new tab"),textContent:(0,c.jsxs)(c.Fragment,{children:[(0,fs.__)("Preview in new tab"),(0,c.jsx)(Fn.Icon,{icon:Gn})]}),onPreview:t})}),(0,c.jsx)(Ra.Slot,{name:"core/plugin-preview-menu",fillProps:{onClick:t}})]})})}var C_=(0,c.jsx)(L.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,c.jsx)(L.Path,{fill:"none",d:"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"square"})});var P_=({disabled:e})=>{const{isZoomOut:t,showIconLabels:s,isDistractionFree:n}=(0,d.useSelect)((e=>({isZoomOut:$(e(g.store)).isZoomOut(),showIconLabels:e(C.store).get("core","showIconLabels"),isDistractionFree:e(C.store).get("core","distractionFree")}))),{resetZoomLevel:o,setZoomLevel:r}=$((0,d.useDispatch)(g.store)),{registerShortcut:i,unregisterShortcut:a}=(0,d.useDispatch)(al.store);(0,p.useEffect)((()=>(i({name:"core/editor/zoom",category:"global",description:(0,fs.__)("Enter or exit zoom out."),keyCombination:{modifier:(0,cl.isAppleOS)()?"primaryShift":"secondary",character:"0"}}),()=>{a("core/editor/zoom")})),[i,a]),(0,al.useShortcut)("core/editor/zoom",(()=>{t?o():r("auto-scaled")}),{isDisabled:n});return(0,c.jsx)(Fn.Button,{accessibleWhenDisabled:!0,disabled:e,onClick:()=>{t?o():r("auto-scaled")},icon:C_,label:(0,fs.__)("Zoom Out"),isPressed:t,size:"compact",showTooltip:!s,className:"editor-zoom-out-toggle"})};const j_={distractionFreeDisabled:{y:"-50px"},distractionFreeHover:{y:0},distractionFreeHidden:{y:"-50px"},visible:{y:0},hidden:{y:0}},E_={distractionFreeDisabled:{x:"-100%"},distractionFreeHover:{x:0},distractionFreeHidden:{x:"-100%"},visible:{x:0},hidden:{x:0}};var T_=function({customSaveButton:e,forceIsDirty:t,forceDisableBlockTools:s,setEntitiesSavedStatesCallback:n,title:o}){const r=(0,m.useViewportMatch)("large"),i=(0,m.useViewportMatch)("medium"),a=(0,m.useMediaQuery)("(max-width: 403px)"),{postType:l,isTextEditor:u,isPublishSidebarOpened:h,showIconLabels:_,hasFixedToolbar:f,hasBlockSelection:b,hasSectionRootClientId:y}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{getEditorMode:s,getCurrentPostType:n,isPublishSidebarOpened:o}=e(wc),{getBlockSelectionStart:r,getSectionRootClientId:i}=$(e(g.store));return{postType:n(),isTextEditor:"text"===s(),isPublishSidebarOpened:o(),showIconLabels:t("core","showIconLabels"),hasFixedToolbar:t("core","fixedToolbar"),hasBlockSelection:!!r(),hasSectionRootClientId:!!i()}}),[]),x=["post","page","wp_template"].includes(l)&&y,v=[R,I,N].includes(l)||s,[w,S]=(0,p.useState)(!0),k=!a&&(!f||f&&(!b||w)),P=(()=>{const e=(0,Fn.__experimentalUseSlotFills)(qg);return Boolean(e&&e.length)})();return(0,c.jsxs)("div",{className:"editor-header edit-post-header",children:[P&&(0,c.jsx)(Fn.__unstableMotion.div,{className:"editor-header__back-button",variants:E_,transition:{type:"tween"},children:(0,c.jsx)(Jg.Slot,{})}),(0,c.jsxs)(Fn.__unstableMotion.div,{variants:j_,className:"editor-header__toolbar",transition:{type:"tween"},children:[(0,c.jsx)(r_,{disableBlockTools:s||u}),f&&i&&(0,c.jsx)(n_,{isCollapsed:w,onToggle:S})]}),k&&(0,c.jsx)(Fn.__unstableMotion.div,{className:"editor-header__center",variants:j_,transition:{type:"tween"},children:(0,c.jsx)($c,{title:o})}),(0,c.jsxs)(Fn.__unstableMotion.div,{variants:j_,transition:{type:"tween"},className:"editor-header__settings",children:[!e&&!h&&(0,c.jsx)(oh,{forceIsDirty:t}),(0,c.jsx)(x_,{}),(0,c.jsx)(k_,{forceIsAutosaveable:t,disabled:v}),(0,c.jsx)(Lp,{className:"editor-header__post-preview-button",forceIsAutosaveable:t}),r&&x&&(0,c.jsx)(P_,{disabled:s}),(r||!_)&&(0,c.jsx)(La.Slot,{scope:"core"}),!e&&(0,c.jsx)(y_,{forceIsDirty:t,setEntitiesSavedStatesCallback:n}),e,(0,c.jsx)(__,{})]})]})};const{PrivateInserterLibrary:B_}=$(g.privateApis);function I_(){const{blockSectionRootClientId:e,inserterSidebarToggleRef:t,inserter:s,showMostUsedBlocks:n,sidebarIsOpened:o}=(0,d.useSelect)((e=>{const{getInserterSidebarToggleRef:t,getInserter:s,isPublishSidebarOpened:n}=$(e(wc)),{getBlockRootClientId:o,isZoomOut:r,getSectionRootClientId:i}=$(e(g.store)),{get:a}=e(C.store),{getActiveComplementaryArea:l}=e(Ea);return{inserterSidebarToggleRef:t(),inserter:s(),showMostUsedBlocks:a("core","mostUsedBlocks"),blockSectionRootClientId:(()=>{if(r()){const e=i();if(e)return e}return o()})(),sidebarIsOpened:!(!l("core")&&!n())}}),[]),{setIsInserterOpened:r}=(0,d.useDispatch)(wc),{disableComplementaryArea:i}=(0,d.useDispatch)(Ea),a=(0,m.useViewportMatch)("medium","<"),l=(0,p.useRef)(),u=(0,p.useCallback)((()=>{r(!1),t.current?.focus()}),[t,r]),h=(0,p.useCallback)((e=>{e.keyCode!==cl.ESCAPE||e.defaultPrevented||(e.preventDefault(),u())}),[u]),_=(0,c.jsx)("div",{className:"editor-inserter-sidebar__content",children:(0,c.jsx)(B_,{showMostUsedBlocks:n,showInserterHelpPanel:!0,shouldFocusBlock:a,rootClientId:e,onSelect:s.onSelect,__experimentalInitialTab:s.tab,__experimentalInitialCategory:s.category,__experimentalFilterValue:s.filterValue,onPatternCategorySelection:o?()=>i("core"):void 0,ref:l,onClose:u})});return(0,c.jsx)("div",{onKeyDown:h,className:"editor-inserter-sidebar",children:_})}function N_(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"editor-list-view-sidebar__outline",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Characters:")}),(0,c.jsx)(Fn.__experimentalText,{children:(0,c.jsx)(Fh,{})})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Words:")}),(0,c.jsx)(Mh,{})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Time to read:")}),(0,c.jsx)(Oh,{})]})]}),(0,c.jsx)(td,{})]})}const{TabbedSidebar:R_}=$(g.privateApis);function D_(){const{setIsListViewOpened:e}=(0,d.useDispatch)(wc),{getListViewToggleRef:t}=$((0,d.useSelect)(wc)),s=(0,m.useFocusOnMount)("firstElement"),n=(0,p.useCallback)((()=>{e(!1),t().current?.focus()}),[t,e]),o=(0,p.useCallback)((e=>{e.keyCode!==cl.ESCAPE||e.defaultPrevented||(e.preventDefault(),n())}),[n]),[r,i]=(0,p.useState)(null),[a,l]=(0,p.useState)("list-view"),u=(0,p.useRef)(),h=(0,p.useRef)(),_=(0,p.useRef)(),f=(0,m.useMergeRefs)([s,_,i]);const b=(0,p.useCallback)((()=>{u.current.contains(u.current.ownerDocument.activeElement)?n():function(e){const t=Hc.focus.tabbable.find(h.current)[0];if("list-view"===e){const e=Hc.focus.tabbable.find(_.current)[0];(u.current.contains(e)?e:t).focus()}else t.focus()}(a)}),[n,a]);return(0,al.useShortcut)("core/editor/toggle-list-view",b),(0,c.jsx)("div",{className:"editor-list-view-sidebar",onKeyDown:o,ref:u,children:(0,c.jsx)(R_,{tabs:[{name:"list-view",title:(0,fs._x)("List View","Post overview"),panel:(0,c.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,c.jsx)("div",{className:"editor-list-view-sidebar__list-view-panel-content",children:(0,c.jsx)(g.__experimentalListView,{dropZoneElement:r})})}),panelRef:f},{name:"outline",title:(0,fs._x)("Outline","Post overview"),panel:(0,c.jsx)("div",{className:"editor-list-view-sidebar__list-view-container",children:(0,c.jsx)(N_,{})})}],onClose:n,onSelect:e=>l(e),defaultTabId:"list-view",ref:h,closeButtonLabel:(0,fs.__)("Close")})})}const{Fill:A_,Slot:M_}=(0,Fn.createSlotFill)("ActionsPanel");function L_({setEntitiesSavedStatesCallback:e,closeEntitiesSavedStates:t,isEntitiesSavedStatesOpen:s,forceIsDirtyPublishPanel:n}){const{closePublishSidebar:o,togglePublishSidebar:r}=(0,d.useDispatch)(wc),{publishSidebarOpened:i,isPublishable:a,isDirty:l,hasOtherEntitiesChanges:u}=(0,d.useSelect)((e=>{const{isPublishSidebarOpened:t,isEditedPostPublishable:s,isCurrentPostPublished:n,isEditedPostDirty:o,hasNonPostEntityChanges:r}=e(wc),i=r();return{publishSidebarOpened:t(),isPublishable:!n()&&s(),isDirty:i||o(),hasOtherEntitiesChanges:i}}),[]),m=(0,p.useCallback)((()=>e(!0)),[]);let h;return h=i?(0,c.jsx)(qm,{onClose:o,forceIsDirty:n,PrePublishExtension:Bu.Slot,PostPublishExtension:wu.Slot}):a&&!u?(0,c.jsx)("div",{className:"editor-layout__toggle-publish-panel",children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:r,"aria-expanded":!1,children:(0,fs.__)("Open publish panel")})}):(0,c.jsx)("div",{className:"editor-layout__toggle-entities-saved-states-panel",children:(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"secondary",onClick:m,"aria-expanded":!1,"aria-haspopup":"dialog",disabled:!l,accessibleWhenDisabled:!0,children:(0,fs.__)("Open save panel")})}),(0,c.jsxs)(c.Fragment,{children:[s&&(0,c.jsx)(xd,{close:t,renderDialog:!0}),(0,c.jsx)(M_,{bubblesVirtually:!0}),!s&&h]})}function O_({autoFocus:e=!1}){const{switchEditorMode:t}=(0,d.useDispatch)(wc),{shortcut:s,isRichEditingEnabled:n}=(0,d.useSelect)((e=>{const{getEditorSettings:t}=e(wc),{getShortcutRepresentation:s}=e(al.store);return{shortcut:s("core/editor/toggle-mode"),isRichEditingEnabled:t().richEditingEnabled}}),[]),o=(0,p.useRef)();return(0,p.useEffect)((()=>{e||o?.current?.focus()}),[e]),(0,c.jsxs)("div",{className:"editor-text-editor",children:[n&&(0,c.jsxs)("div",{className:"editor-text-editor__toolbar",children:[(0,c.jsx)("h2",{children:(0,fs.__)("Editing code")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>t("visual"),shortcut:s,children:(0,fs.__)("Exit code editor")})]}),(0,c.jsxs)("div",{className:"editor-text-editor__body",children:[(0,c.jsx)(Sh,{ref:o}),(0,c.jsx)(_h,{})]})]})}function F_({contentRef:e}){const{onNavigateToEntityRecord:t,templateId:s}=(0,d.useSelect)((e=>{const{getEditorSettings:t,getCurrentTemplateId:s}=e(wc);return{onNavigateToEntityRecord:t().onNavigateToEntityRecord,templateId:s()}}),[]),n=(0,d.useSelect)((e=>!!e(u.store).canUser("create",{kind:"postType",name:"wp_template"})),[]),[o,r]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const t=e=>{n&&e.target.classList.contains("is-root-container")&&"core/template-part"!==e.target.dataset?.type&&(e.defaultPrevented||(e.preventDefault(),r(!0)))},s=e.current;return s?.addEventListener("dblclick",t),()=>{s?.removeEventListener("dblclick",t)}}),[e,n]),n?(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:o,confirmButtonText:(0,fs.__)("Edit template"),onConfirm:()=>{r(!1),t({postId:s,postType:"wp_template"})},onCancel:()=>r(!1),size:"medium",children:(0,fs.__)("You’ve tried to select a block that is part of a template that may be used elsewhere on your site. Would you like to edit the template?")}):null}function V_({direction:e,resizeWidthBy:t}){const s=`resizable-editor__resize-help-${e}`;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Fn.Tooltip,{text:(0,fs.__)("Drag to resize"),children:(0,c.jsx)(Fn.__unstableMotion.button,{className:`editor-resizable-editor__resize-handle is-${e}`,"aria-label":(0,fs.__)("Drag to resize"),"aria-describedby":s,onKeyDown:function(s){const{keyCode:n}=s;n!==cl.LEFT&&n!==cl.RIGHT||(s.preventDefault(),"left"===e&&n===cl.LEFT||"right"===e&&n===cl.RIGHT?t(20):("left"===e&&n===cl.RIGHT||"right"===e&&n===cl.LEFT)&&t(-20))},variants:{active:{opacity:1,scaleY:1.3}},whileFocus:"active",whileHover:"active",whileTap:"active",role:"separator","aria-orientation":"vertical"},"handle")}),(0,c.jsx)(Fn.VisuallyHidden,{id:s,children:(0,fs.__)("Use left and right arrow keys to resize the canvas.")})]})}const U_={position:void 0,userSelect:void 0,cursor:void 0,width:void 0,height:void 0,top:void 0,right:void 0,bottom:void 0,left:void 0};var H_=function({className:e,enableResizing:t,height:s,children:n}){const[o,r]=(0,p.useState)("100%"),i=(0,p.useRef)(),a=(0,p.useCallback)((e=>{i.current&&r(i.current.offsetWidth+e)}),[]);return(0,c.jsx)(Fn.ResizableBox,{className:hr("editor-resizable-editor",e,{"is-resizable":t}),ref:e=>{i.current=e?.resizable},size:{width:t?o:"100%",height:t&&s?s:"100%"},onResizeStop:(e,t,s)=>{r(s.style.width)},minWidth:300,maxWidth:"100%",maxHeight:"100%",enable:{left:t,right:t},showHandle:t,resizeRatio:2,handleComponent:{left:(0,c.jsx)(V_,{direction:"left",resizeWidthBy:a}),right:(0,c.jsx)(V_,{direction:"right",resizeWidthBy:a})},handleClasses:void 0,handleStyles:{left:U_,right:U_},children:n})};function z_(e,t,s){return Math.min(Math.max(e,t),s)}function G_(e,t,s){const n=e-z_(e,s.left,s.right),o=t-z_(t,s.top,s.bottom);return Math.sqrt(n*n+o*o)}function $_({isEnabled:e=!0}={}){const{getEnabledClientIdsTree:t,getBlockName:s,getBlockOrder:n}=$((0,d.useSelect)(g.store)),{selectBlock:o}=(0,d.useDispatch)(g.store);return(0,m.useRefEffect)((r=>{if(!e)return;const i=e=>{(e.target===r||e.target.classList.contains("is-root-container"))&&((e,i)=>{const a=t().flatMap((({clientId:e})=>{const t=s(e);if("core/template-part"===t)return[];if("core/post-content"===t){const t=n(e);if(t.length)return t}return[e]}));let l=1/0,c=null;for(const t of a){const s=r.querySelector(`[data-block="${t}"]`);if(!s)continue;const n=G_(e,i,s.getBoundingClientRect());n<l&&n<500&&(l=n,c=t)}c&&o(c)})(e.clientX,e.clientY)};return r.addEventListener("click",i),()=>r.removeEventListener("click",i)}),[e])}function W_(){const{getSettings:e,isZoomOut:t}=$((0,d.useSelect)(g.store)),{resetZoomLevel:s}=$((0,d.useDispatch)(g.store));return(0,m.useRefEffect)((n=>{function o(n){if(t()&&!n.defaultPrevented){n.preventDefault();const{__experimentalSetIsInserterOpened:t}=e();"function"==typeof t&&t(!1),s()}}return n.addEventListener("dblclick",o),()=>{n.removeEventListener("dblclick",o)}}),[e,t,s])}const{LayoutStyle:Z_,useLayoutClasses:Y_,useLayoutStyles:q_,ExperimentalBlockCanvas:K_,useFlashEditableBlocks:Q_}=$(g.privateApis),X_=[N,B,R,I];function J_(e){for(let t=0;t<e.length;t++){if("core/post-content"===e[t].name)return e[t].attributes;if(e[t].innerBlocks.length){const s=J_(e[t].innerBlocks);if(s)return s}}}function ef(e){for(let t=0;t<e.length;t++)if("core/post-content"===e[t].name)return!0;return!1}var tf=function({autoFocus:e,styles:t,disableIframe:s=!1,iframeProps:n,contentRef:o,className:r}){const i=(0,m.useViewportMatch)("small","<"),{renderingMode:a,postContentAttributes:l,editedPostTemplate:h={},wrapperBlockName:_,wrapperUniqueId:f,deviceType:b,isFocusedEntity:y,isDesignPostType:v,postType:w,isPreview:S,canvasMinHeight:k}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getCurrentPostType:s,getCurrentTemplateId:n,getEditorSettings:o,getRenderingMode:r,getDeviceType:i,getCanvasMinHeight:a}=$(e(wc)),{getPostType:l,getEditedEntityRecord:c}=e(u.store),d=s(),p=r();let m;d===N?m="core/block":"post-only"===p&&(m="core/post-content");const h=o(),g=h.supportsTemplateMode,_=l(d),f=n(),b=f?c("postType",B,f):void 0;return{renderingMode:p,postContentAttributes:h.postContentAttributes,isDesignPostType:X_.includes(d),editedPostTemplate:_?.viewable&&g?b:void 0,wrapperBlockName:m,wrapperUniqueId:t(),deviceType:i(),isFocusedEntity:!!h.onNavigateToPreviousEntityRecord,postType:d,isPreview:h.isPreviewMode,canvasMinHeight:a()}}),[]),{isCleanNewPost:C}=(0,d.useSelect)(wc),{hasRootPaddingAwareAlignments:P,themeHasDisabledLayoutStyles:j,themeSupportsLayout:E,isZoomedOut:T}=(0,d.useSelect)((e=>{const{getSettings:t,isZoomOut:s}=$(e(g.store)),n=t();return{themeHasDisabledLayoutStyles:n.disableLayoutStyles,themeSupportsLayout:n.supportsLayout,hasRootPaddingAwareAlignments:n.__experimentalFeatures?.useRootPaddingAwareAlignments,isZoomedOut:s()}}),[]),D=(0,p.useRef)(),A=(0,g.__experimentalUseResizeCanvas)(b),[M]=(0,g.useSettings)("layout"),L=(0,p.useMemo)((()=>"post-only"!==a||v?{type:"default"}:E?{...M,type:"constrained"}:{type:"default"}),[a,E,M,v]),O=(0,p.useMemo)((()=>{if(!h?.content&&!h?.blocks&&l)return l;if(h?.blocks)return J_(h?.blocks);const e="string"==typeof h?.content?h?.content:"";return J_((0,x.parse)(e))||{}}),[h?.content,h?.blocks,l]),F=(0,p.useMemo)((()=>{if(!h?.content&&!h?.blocks)return!1;if(h?.blocks)return ef(h?.blocks);const e="string"==typeof h?.content?h?.content:"";return ef((0,x.parse)(e))||!1}),[h?.content,h?.blocks]),{layout:V={},align:U=""}=O||{},H=Y_(O,"core/post-content"),z=hr({"is-layout-flow":!E},E&&H,U&&`align${U}`),G=q_(O,"core/post-content",".block-editor-block-list__layout.is-root-container"),W=(0,p.useMemo)((()=>V&&("constrained"===V?.type||V?.inherit||V?.contentSize||V?.wideSize)?{...M,...V,type:"constrained"}:{...M,...V,type:"default"}),[V?.type,V?.inherit,V?.contentSize,V?.wideSize,M]),Z=l?W:L,Y="default"!==Z?.type||F?Z:L,q=(0,g.__unstableUseTypingObserver)(),K=(0,p.useRef)();(0,p.useEffect)((()=>{e&&C()&&K?.current?.focus()}),[e,C]);const Q=[R,I,N].includes(w)&&!S&&!i&&!T,X=(0,p.useMemo)((()=>{if(!D.current)return k;const{ownerDocument:e}=D.current,t=e.documentElement.scrollTop||e.body.scrollTop;return k+t}),[k]),J=(0,p.useMemo)((()=>[...t??[],{css:`:where(.block-editor-iframe__body){display:flow-root;${X?`min-height:${X}px;`:""}}.is-root-container{display:flow-root;${Q?"min-height:0!important;":""}}\n\t\t\t\t${Q?".block-editor-iframe__html{background:var(--wp-editor-canvas-background);display:flex;align-items:center;justify-content:center;min-height:100vh;}.block-editor-iframe__body{width:100%;}":""}`}]),[t,Q,X]),ee=(0,g.__unstableUseTypewriter)();return o=(0,m.useMergeRefs)([D,o,"post-only"===a?ee:null,Q_({isEnabled:"template-locked"===a}),$_({isEnabled:"template-locked"===a}),W_()]),(0,c.jsx)("div",{className:hr("editor-visual-editor","edit-post-visual-editor",r,{"has-padding":y||Q,"is-resizable":Q,"is-iframed":!s}),children:(0,c.jsx)(H_,{enableResizing:Q,height:"100%",children:(0,c.jsxs)(K_,{shouldIframe:!s,contentRef:o,styles:J,height:"100%",iframeProps:{...n,style:{...n?.style,...A}},children:[E&&!j&&"post-only"===a&&!v&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Z_,{selector:".editor-visual-editor__post-title-wrapper",layout:L}),(0,c.jsx)(Z_,{selector:".block-editor-block-list__layout.is-root-container",layout:Y}),U&&(0,c.jsx)(Z_,{css:".is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}"}),G&&(0,c.jsx)(Z_,{layout:W,css:G})]}),"post-only"===a&&!v&&(0,c.jsx)("div",{className:hr("editor-visual-editor__post-title-wrapper","edit-post-visual-editor__post-title-wrapper",{"has-global-padding":P}),contentEditable:!1,ref:q,style:{marginTop:"4rem"},children:(0,c.jsx)(wh,{ref:K})}),(0,c.jsxs)(g.RecursionProvider,{blockName:_,uniqueId:f,children:[(0,c.jsx)(g.BlockList,{className:hr("is-"+b.toLowerCase()+"-preview","post-only"!==a||v?"wp-site-blocks":`${z} wp-block-post-content`,{"has-global-padding":"post-only"===a&&!v&&P}),layout:Z,dropZoneElement:s?D.current:D.current?.parentNode,__unstableDisableDropZone:"template-locked"===a}),"template-locked"===a&&(0,c.jsx)(F_,{contentRef:D})]})]})})})};const sf={header:(0,fs.__)("Editor top bar"),body:(0,fs.__)("Editor content"),sidebar:(0,fs.__)("Editor settings"),actions:(0,fs.__)("Editor publish"),footer:(0,fs.__)("Editor footer")};function nf({className:e,styles:t,children:s,forceIsDirty:n,contentRef:o,disableIframe:r,autoFocus:i,customSaveButton:a,customSavePanel:l,forceDisableBlockTools:u,title:h,iframeProps:_}){const{mode:f,isInserterOpened:b,isListViewOpened:y,isDistractionFree:x,isPreviewMode:v,showBlockBreadcrumbs:w,documentLabel:S}=(0,d.useSelect)((e=>{const{get:t}=e(C.store),{getEditorSettings:s,getPostTypeLabel:n}=e(wc),o=s(),r=n();let i=e(wc).getEditorMode();return o.richEditingEnabled||"visual"!==i||(i="text"),o.codeEditingEnabled||"text"!==i||(i="visual"),{mode:i,isInserterOpened:e(wc).isInserterOpened(),isListViewOpened:e(wc).isListViewOpened(),isDistractionFree:t("core","distractionFree"),isPreviewMode:o.isPreviewMode,showBlockBreadcrumbs:t("core","showBlockBreadcrumbs"),documentLabel:r||(0,fs._x)("Document","noun, breadcrumb")}}),[]),k=(0,m.useViewportMatch)("medium"),P=y?(0,fs.__)("Document Overview"):(0,fs.__)("Block Library"),[j,E]=(0,p.useState)(!1),T=(0,p.useCallback)((e=>{"function"==typeof j&&j(e),E(!1)}),[j]);return(0,c.jsx)(Za,{isDistractionFree:x,className:hr("editor-editor-interface",e,{"is-entity-save-view-open":!!j,"is-distraction-free":x&&!v}),labels:{...sf,secondarySidebar:P},header:!v&&(0,c.jsx)(T_,{forceIsDirty:n,setEntitiesSavedStatesCallback:E,customSaveButton:a,forceDisableBlockTools:u,title:h}),editorNotices:(0,c.jsx)(cd,{}),secondarySidebar:!v&&"visual"===f&&(b&&(0,c.jsx)(I_,{})||y&&(0,c.jsx)(D_,{})),sidebar:!v&&!x&&(0,c.jsx)(Ua.Slot,{scope:"core"}),content:(0,c.jsxs)(c.Fragment,{children:[!x&&!v&&(0,c.jsx)(cd,{}),(0,c.jsx)(Yg.Slot,{children:([e])=>e||(0,c.jsxs)(c.Fragment,{children:[!v&&"text"===f&&(0,c.jsx)(O_,{autoFocus:i}),!v&&!k&&"visual"===f&&(0,c.jsx)(g.BlockToolbar,{hideDragHandle:!0}),(v||"visual"===f)&&(0,c.jsx)(tf,{styles:t,contentRef:o,disableIframe:r,autoFocus:i,iframeProps:_}),s]})})]}),footer:!v&&!x&&k&&w&&"visual"===f&&(0,c.jsx)(g.BlockBreadcrumb,{rootLabelText:S}),actions:v?void 0:l||(0,c.jsx)(L_,{closeEntitiesSavedStates:T,isEntitiesSavedStatesOpen:j,setEntitiesSavedStatesCallback:E,forceIsDirtyPublishPanel:n})})}const{OverridesPanel:of}=$(lo.privateApis);function rf(){return(0,d.useSelect)((e=>"wp_block"===e(wc).getCurrentPostType()),[])?(0,c.jsx)(of,{}):null}function af(e){return"string"==typeof e.title?(0,Ln.decodeEntities)(e.title):e.title&&"rendered"in e.title?(0,Ln.decodeEntities)(e.title.rendered):e.title&&"raw"in e.title?(0,Ln.decodeEntities)(e.title.raw):""}const lf=({items:e,closeModal:t})=>{const[s]=e,n=af(s),{showOnFront:o,currentHomePage:r,isSaving:i}=(0,d.useSelect)((e=>{const{getEntityRecord:t,isSavingEntityRecord:s}=e(u.store),n=t("root","site"),o=t("postType","page",n?.page_on_front);return{showOnFront:n?.show_on_front,currentHomePage:o,isSaving:s("root","site")}})),{saveEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:p}=(0,d.useDispatch)(_s.store);let m="";"posts"===o?m=(0,fs.__)("This will replace the current homepage which is set to display latest posts."):r&&(m=(0,fs.sprintf)((0,fs.__)('This will replace the current homepage: "%s"'),af(r)));const h=(0,fs.sprintf)((0,fs.__)('Set "%1$s" as the site homepage? %2$s'),n,m).trim(),g=(0,fs.__)("Set homepage");return(0,c.jsx)("form",{onSubmit:async function(e){e.preventDefault();try{await a("root","site",{page_on_front:s.id,show_on_front:"page"}),l((0,fs.__)("Homepage updated."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while setting the homepage.");p(t,{type:"snackbar"})}finally{t?.()}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:h}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:i,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:i,accessibleWhenDisabled:!0,children:g})]})]})})},cf=({items:e,closeModal:t})=>{const[s]=e,n=af(s),{currentPostsPage:o,isPageForPostsSet:r,isSaving:i}=(0,d.useSelect)((e=>{const{getEntityRecord:t,isSavingEntityRecord:s}=e(u.store),n=t("root","site");return{currentPostsPage:t("postType","page",n?.page_for_posts),isPageForPostsSet:0!==n?.page_for_posts,isSaving:s("root","site")}})),{saveEntityRecord:a}=(0,d.useDispatch)(u.store),{createSuccessNotice:l,createErrorNotice:p}=(0,d.useDispatch)(_s.store);const m=r&&o?(0,fs.sprintf)((0,fs.__)('This will replace the current posts page: "%s"'),af(o)):(0,fs.__)("This page will show the latest posts."),h=(0,fs.sprintf)((0,fs.__)('Set "%1$s" as the posts page? %2$s'),n,m),g=(0,fs.__)("Set posts page");return(0,c.jsx)("form",{onSubmit:async function(e){e.preventDefault();try{await a("root","site",{page_for_posts:s.id,show_on_front:"page"}),l((0,fs.__)("Posts page updated."),{type:"snackbar"})}catch(e){const t=e.message&&"unknown_error"!==e.code?e.message:(0,fs.__)("An error occurred while setting the posts page.");p(t,{type:"snackbar"})}finally{t?.()}},children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"5",children:[(0,c.jsx)(Fn.__experimentalText,{children:h}),(0,c.jsxs)(Fn.__experimentalHStack,{justify:"right",children:[(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"tertiary",onClick:()=>{t?.()},disabled:i,accessibleWhenDisabled:!0,children:(0,fs.__)("Cancel")}),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",disabled:i,accessibleWhenDisabled:!0,children:g})]})]})})};function df({postType:e,onActionPerformed:t,context:s}){const{defaultActions:n}=(0,d.useSelect)((t=>{const{getEntityActions:s}=$(t(wc));return{defaultActions:s("postType",e)}}),[e]),o=(0,d.useSelect)((t=>{if("page"!==e)return!1;const{getDefaultTemplateId:s,getEntityRecord:n,canUser:o}=t(u.store);if(!o("update",{kind:"root",name:"site"}))return!1;const r=s({slug:"front-page"});if(!r)return!0;const i=n("postType","wp_template",r);return!i||"front-page"!==i.slug}),[e]),r=(()=>{const{pageOnFront:e,pageForPosts:t}=(0,d.useSelect)((e=>{const{getEntityRecord:t,canUser:s}=e(u.store),n=s("read",{kind:"root",name:"site"})?t("root","site"):void 0;return{pageOnFront:n?.page_on_front,pageForPosts:n?.page_for_posts}}));return(0,p.useMemo)((()=>({id:"set-as-homepage",label:(0,fs.__)("Set as homepage"),isEligible:s=>"publish"===s.status&&"page"===s.type&&e!==s.id&&t!==s.id,modalFocusOnMount:"firstContentElement",RenderModal:lf})),[t,e])})(),i=(()=>{const{pageOnFront:e,pageForPosts:t}=(0,d.useSelect)((e=>{const{getEntityRecord:t,canUser:s}=e(u.store),n=s("read",{kind:"root",name:"site"})?t("root","site"):void 0;return{pageOnFront:n?.page_on_front,pageForPosts:n?.page_for_posts}}));return(0,p.useMemo)((()=>({id:"set-as-posts-page",label:(0,fs.__)("Set as posts page"),isEligible:s=>"publish"===s.status&&"page"===s.type&&e!==s.id&&t!==s.id,modalFocusOnMount:"firstContentElement",RenderModal:cf})),[t,e])})(),{registerPostTypeSchema:a}=$((0,d.useDispatch)(wc));return(0,p.useEffect)((()=>{a(e)}),[a,e]),(0,p.useMemo)((()=>{let e=[...n];if(o&&e.push(r,i),e=e.sort(((e,t)=>"move-to-trash"===t.id?-1:0)),e=e.filter((e=>!e.context||e.context===s)),t)for(let s=0;s<e.length;++s){if(e[s].callback){const n=e[s].callback;e[s]={...e[s],callback:(o,r)=>{n(o,{...r,onActionPerformed:n=>{r?.onActionPerformed&&r.onActionPerformed(n),t(e[s].id,n)}})}}}if(e[s].RenderModal){const n=e[s].RenderModal;e[s]={...e[s],RenderModal:o=>(0,c.jsx)(n,{...o,onActionPerformed:n=>{o.onActionPerformed&&o.onActionPerformed(n),t(e[s].id,n)}})}}}return e}),[s,n,t,r,i,o])}const{Menu:uf,kebabCase:pf}=$(Fn.privateApis);function mf({postType:e,postId:t,onActionPerformed:s}){const[n,o]=(0,p.useState)(null),{item:r,permissions:i}=(0,d.useSelect)((s=>{const{getEditedEntityRecord:n,getEntityRecordPermissions:o}=$(s(u.store));return{item:n("postType",e,t),permissions:o("postType",e,t)}}),[t,e]),a=(0,p.useMemo)((()=>({...r,permissions:i})),[r,i]),l=df({postType:e,onActionPerformed:s}),m=(0,p.useMemo)((()=>l.filter((e=>!e.isEligible||e.isEligible(a)))),[l,a]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(uf,{placement:"bottom-end",children:[(0,c.jsx)(uf.TriggerButton,{render:(0,c.jsx)(Fn.Button,{size:"small",icon:i_,label:(0,fs.__)("Actions"),disabled:!m.length,accessibleWhenDisabled:!0,className:"editor-all-actions-button"})}),(0,c.jsx)(uf.Popover,{children:(0,c.jsx)(_f,{actions:m,items:[a],setActiveModalAction:o})})]}),!!n&&(0,c.jsx)(gf,{action:n,items:[a],closeModal:()=>o(null)})]})}function hf({action:e,onClick:t,items:s}){const n="string"==typeof e.label?e.label:e.label(s);return(0,c.jsx)(uf.Item,{onClick:t,children:(0,c.jsx)(uf.ItemLabel,{children:n})})}function gf({action:e,items:t,closeModal:s}){const n="string"==typeof e.label?e.label:e.label(t);return(0,c.jsx)(Fn.Modal,{title:e.modalHeader||n,__experimentalHideHeader:!!e.hideModalHeader,onRequestClose:s??(()=>{}),focusOnMount:"firstContentElement",size:"medium",overlayClassName:`editor-action-modal editor-action-modal__${pf(e.id)}`,children:(0,c.jsx)(e.RenderModal,{items:t,closeModal:s})})}function _f({actions:e,items:t,setActiveModalAction:s}){const n=(0,d.useRegistry)();return(0,c.jsx)(uf.Group,{children:e.map((e=>(0,c.jsx)(hf,{action:e,onClick:()=>{"RenderModal"in e?s(e):e.callback(t,{registry:n})},items:t},e.id)))})}const{Badge:ff}=$(Fn.privateApis);function bf({postType:e,postId:t,onActionPerformed:s}){const n=(0,p.useMemo)((()=>Array.isArray(t)?t:[t]),[t]),{postTitle:o,icon:r,labels:i}=(0,d.useSelect)((t=>{const{getEditedEntityRecord:s,getCurrentTheme:o,getPostType:r}=t(u.store),{getPostIcon:i}=$(t(wc));let a="";const l=s("postType",e,n[0]);if(1===n.length){const{default_template_types:t=[]}=o()??{},s=[B,I].includes(e)?Y({template:l,templateTypes:t}):{};a=s?.title||l?.title}return{postTitle:a,icon:i(e,{area:l?.area}),labels:r(e)?.labels}}),[n,e]),a=zc(t);let l=(0,fs.__)("No title");return i?.name&&n.length>1?l=(0,fs.sprintf)((0,fs.__)("%1$d %2$s"),n.length,i?.name):o&&(l=(0,Hc.__unstableStripHTML)(o)),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:1,className:"editor-post-card-panel",children:[(0,c.jsxs)(Fn.__experimentalHStack,{spacing:2,className:"editor-post-card-panel__header",align:"flex-start",children:[(0,c.jsx)(Fn.Icon,{className:"editor-post-card-panel__icon",icon:r}),(0,c.jsxs)(Fn.__experimentalText,{numberOfLines:2,truncate:!0,className:"editor-post-card-panel__title",as:"h2",children:[(0,c.jsx)("span",{className:"editor-post-card-panel__title-name",children:l}),a&&1===n.length&&(0,c.jsx)(ff,{children:a})]}),1===n.length&&(0,c.jsx)(mf,{postType:e,postId:n[0],onActionPerformed:s})]}),n.length>1&&(0,c.jsx)(Fn.__experimentalText,{className:"editor-post-card-panel__description",children:(0,fs.sprintf)((0,fs.__)("Changes will be applied to all selected %s."),i?.name.toLowerCase())})]})}function yf(){const{postContent:e}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostType:s,getCurrentPostId:n}=e(wc),{canUser:o}=e(u.store),{getEntityRecord:r}=e(u.store),i=o("read",{kind:"root",name:"site"})?r("root","site"):void 0,a=s();return{postContent:!(+n()===i?.page_for_posts)&&![B,I].includes(a)&&t("content")}}),[]),t=(0,fs._x)("words","Word count type. Do not translate!"),s=(0,p.useMemo)((()=>e?(0,Ah.count)(e,t):0),[e,t]);if(!s)return null;const n=Math.round(s/189),o=(0,fs.sprintf)((0,fs._n)("%s word","%s words",s),s.toLocaleString()),r=n<=1?(0,fs.__)("1 minute"):(0,fs.sprintf)((0,fs._n)("%s minute","%s minutes",n),n.toLocaleString());return(0,c.jsx)("div",{className:"editor-post-content-information",children:(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.sprintf)((0,fs.__)("%1$s, %2$s read time."),o,r)})})}var xf=function(){const{postFormat:e}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t}=e(wc);return{postFormat:t("format")??"standard"}}),[]),t=jp.find((t=>t.id===e)),[s,n]=(0,p.useState)(null),o=(0,p.useMemo)((()=>({anchor:s,placement:"left-start",offset:36,shift:!0})),[s]);return(0,c.jsx)(Pp,{children:(0,c.jsx)(Dd,{label:(0,fs.__)("Format"),ref:n,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:o,contentClassName:"editor-post-format__dialog",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change format: %s"),t?.caption),onClick:s,children:t?.caption}),renderContent:({onClose:e})=>(0,c.jsxs)("div",{className:"editor-post-format__dialog-content",children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Format"),onClose:e}),(0,c.jsx)(Ep,{})]})})})})};function vf(){const e=(0,d.useSelect)((e=>e(wc).getEditedPostAttribute("modified")),[]),t=e&&(0,fs.sprintf)((0,fs.__)("Last edited %s."),(0,v.humanTimeDiff)(e));return t?(0,c.jsx)("div",{className:"editor-post-last-edited-panel",children:(0,c.jsx)(Fn.__experimentalText,{children:t})}):null}var wf=function({className:e,children:t}){return(0,c.jsx)(Fn.__experimentalVStack,{className:hr("editor-post-panel__section",e),children:t})};const Sf={};function kf(){const{editEntityRecord:e}=(0,d.useDispatch)(u.store),{postsPageTitle:t,postsPageId:s,isTemplate:n,postSlug:o}=(0,d.useSelect)((e=>{const{getEntityRecord:t,getEditedEntityRecord:s,canUser:n}=e(u.store),o=n("read",{kind:"root",name:"site"})?t("root","site"):void 0,r=o?.page_for_posts?s("postType","page",o?.page_for_posts):Sf,{getEditedPostAttribute:i,getCurrentPostType:a}=e(wc);return{postsPageId:r?.id,postsPageTitle:r?.title,isTemplate:a()===B,postSlug:i("slug")}}),[]),[r,i]=(0,p.useState)(null),a=(0,p.useMemo)((()=>({anchor:r,placement:"left-start",offset:36,shift:!0})),[r]);if(!n||!["home","index"].includes(o)||!s)return null;const l=t=>{e("postType","page",s,{title:t})},h=(0,Ln.decodeEntities)(t);return(0,c.jsx)(Dd,{label:(0,fs.__)("Blog title"),ref:i,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:a,contentClassName:"editor-blog-title-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:t})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.sprintf)((0,fs.__)("Change blog title: %s"),h),onClick:t,children:h}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Blog title"),onClose:e}),(0,c.jsx)(Fn.__experimentalInputControl,{placeholder:(0,fs.__)("No title"),size:"__unstable-large",value:t,onChange:(0,m.debounce)(l,300),label:(0,fs.__)("Blog title"),help:(0,fs.__)("Set the Posts Page title. Appears in search results, and when the page is shared on social media."),hideLabelFromVision:!0})]})})})}function Cf(){const{editEntityRecord:e}=(0,d.useDispatch)(u.store),{postsPerPage:t,isTemplate:s,postSlug:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostType:s}=e(wc),{getEditedEntityRecord:n,canUser:o}=e(u.store),r=o("read",{kind:"root",name:"site"})?n("root","site"):void 0;return{isTemplate:s()===B,postSlug:t("slug"),postsPerPage:r?.posts_per_page||1}}),[]),[o,r]=(0,p.useState)(null),i=(0,p.useMemo)((()=>({anchor:o,placement:"left-start",offset:36,shift:!0})),[o]);if(!s||!["home","index"].includes(n))return null;const a=t=>{e("root","site",void 0,{posts_per_page:t})};return(0,c.jsx)(Dd,{label:(0,fs.__)("Posts per page"),ref:r,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:i,contentClassName:"editor-posts-per-page-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.__)("Change posts per page"),onClick:s,children:t}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Posts per page"),onClose:e}),(0,c.jsx)(Fn.__experimentalNumberControl,{placeholder:0,value:t,size:"__unstable-large",spinControls:"custom",step:"1",min:"1",onChange:a,label:(0,fs.__)("Posts per page"),help:(0,fs.__)("Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."),hideLabelFromVision:!0})]})})})}const Pf=[{label:(0,fs._x)("Open",'Adjective: e.g. "Comments are open"'),value:"open",description:(0,fs.__)("Visitors can add new comments and replies.")},{label:(0,fs.__)("Closed"),value:"",description:[(0,fs.__)("Visitors cannot add new comments or replies."),(0,fs.__)("Existing comments remain visible.")].join(" ")}];function jf(){const{editEntityRecord:e}=(0,d.useDispatch)(u.store),{allowCommentsOnNewPosts:t,isTemplate:s,postSlug:n}=(0,d.useSelect)((e=>{const{getEditedPostAttribute:t,getCurrentPostType:s}=e(wc),{getEditedEntityRecord:n,canUser:o}=e(u.store),r=o("read",{kind:"root",name:"site"})?n("root","site"):void 0;return{isTemplate:s()===B,postSlug:t("slug"),allowCommentsOnNewPosts:r?.default_comment_status||""}}),[]),[o,r]=(0,p.useState)(null),i=(0,p.useMemo)((()=>({anchor:o,placement:"left-start",offset:36,shift:!0})),[o]);if(!s||!["home","index"].includes(n))return null;const a=t=>{e("root","site",void 0,{default_comment_status:t?"open":null})};return(0,c.jsx)(Dd,{label:(0,fs.__)("Discussion"),ref:r,children:(0,c.jsx)(Fn.Dropdown,{popoverProps:i,contentClassName:"editor-site-discussion-dropdown__content",focusOnMount:!0,renderToggle:({isOpen:e,onToggle:s})=>(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary","aria-expanded":e,"aria-label":(0,fs.__)("Change discussion settings"),onClick:s,children:t?(0,fs.__)("Comments open"):(0,fs.__)("Comments closed")}),renderContent:({onClose:e})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(g.__experimentalInspectorPopoverHeader,{title:(0,fs.__)("Discussion"),onClose:e}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:3,children:[(0,c.jsx)(Fn.__experimentalText,{children:(0,fs.__)("Changes will apply to new posts only. Individual posts may override these settings.")}),(0,c.jsx)(Fn.RadioControl,{className:"editor-site-discussion__options",hideLabelFromVision:!0,label:(0,fs.__)("Comment status"),options:Pf,onChange:a,selected:t})]})]})})})}function Ef({onActionPerformed:e}){const{isRemovedPostStatusPanel:t,postType:s,postId:n}=(0,d.useSelect)((e=>{const{isEditorPanelRemoved:t,getCurrentPostType:s,getCurrentPostId:n}=e(wc);return{isRemovedPostStatusPanel:t("post-status"),postType:s(),postId:n()}}),[]);return(0,c.jsx)(wf,{className:"editor-post-summary",children:(0,c.jsx)(Pu.Slot,{children:o=>(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsx)(bf,{postType:s,postId:n,onActionPerformed:e}),(0,c.jsx)(Cp,{withPanelBody:!1}),(0,c.jsx)(mp,{}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:1,children:[(0,c.jsx)(yf,{}),(0,c.jsx)(vf,{})]}),!t&&(0,c.jsxs)(Fn.__experimentalVStack,{spacing:4,children:[(0,c.jsxs)(Fn.__experimentalVStack,{spacing:1,children:[(0,c.jsx)(nh,{}),(0,c.jsx)(ah,{}),(0,c.jsx)(Bh,{}),(0,c.jsx)(Ku,{}),(0,c.jsx)(Uu,{}),(0,c.jsx)(np,{}),(0,c.jsx)(Ip,{}),(0,c.jsx)(Zd,{}),(0,c.jsx)(ch,{}),(0,c.jsx)(kf,{}),(0,c.jsx)(Cf,{}),(0,c.jsx)(jf,{}),(0,c.jsx)(xf,{}),o]}),(0,c.jsx)(Ch,{onActionPerformed:e})]})]})})})})}const{EXCLUDED_PATTERN_SOURCES:Tf,PATTERN_TYPES:Bf}=$(lo.privateApis);function If(e,t){return e.innerBlocks=e.innerBlocks.map((e=>If(e,t))),"core/template-part"===e.name&&void 0===e.attributes.theme&&(e.attributes.theme=t),e}function Nf(e,t){return e.filter(((e,s,n)=>((e,t,s)=>t===s.findIndex((t=>e.name===t.name)))(e,s,n)&&(e=>!Tf.includes(e.source))(e)&&(e=>e.templateTypes?.includes(t.slug)||e.blockTypes?.includes("core/template-part/"+t.area))(e)))}function Rf(e,t){return e.map((e=>({...e,keywords:e.keywords||[],type:Bf.theme,blocks:(0,x.parse)(e.content,{__unstableSkipMigrationLogs:!0}).map((e=>If(e,t)))})))}function Df({availableTemplates:e,onSelect:t}){return e&&0!==e?.length?(0,c.jsx)(g.__experimentalBlockPatternsList,{label:(0,fs.__)("Templates"),blockPatterns:e,onClickPattern:t,showTitlesAsTooltip:!0}):null}function Af(){const{area:e,name:t,slug:s,postType:n,postId:o}=(0,d.useSelect)((e=>{const{getCurrentPostType:t,getCurrentPostId:s}=e(wc),{getEditedEntityRecord:n}=e(u.store),o=t(),r=s(),i=n("postType",o,r);return{area:i?.area,name:i?.name,slug:i?.slug,postType:o,postId:r}}),[]),{editEntityRecord:r}=(0,d.useDispatch)(u.store),i=function({area:e,name:t,slug:s}){const{blockPatterns:n,restBlockPatterns:o,currentThemeStylesheet:r}=(0,d.useSelect)((e=>{const{getEditorSettings:t}=e(wc),s=t();return{blockPatterns:s.__experimentalAdditionalBlockPatterns??s.__experimentalBlockPatterns,restBlockPatterns:e(u.store).getBlockPatterns(),currentThemeStylesheet:e(u.store).getCurrentTheme().stylesheet}}),[]);return(0,p.useMemo)((()=>Rf(Nf([...n||[],...o||[]],{area:e,name:t,slug:s}),r)),[e,t,s,n,o,r])}({area:e,name:t,slug:s});return i?.length?(0,c.jsx)(Fn.PanelBody,{title:(0,fs.__)("Design"),initialOpen:n===I,children:(0,c.jsx)(Df,{availableTemplates:i,onSelect:async e=>{await r("postType",n,o,{blocks:e.blocks,content:(0,x.serialize)(e.blocks)})}})}):null}function Mf(){const{postType:e}=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(wc);return{postType:t()}}),[]);return[I,B].includes(e)?(0,c.jsx)(Af,{}):null}const Lf={document:"edit-post/document",block:"edit-post/block"},{Tabs:Of}=$(Fn.privateApis);var Ff=(0,p.forwardRef)(((e,t)=>{const{documentLabel:s}=(0,d.useSelect)((e=>{const{getPostTypeLabel:t}=e(wc);return{documentLabel:t()||(0,fs._x)("Document","noun, panel")}}),[]);return(0,c.jsxs)(Of.TabList,{ref:t,children:[(0,c.jsx)(Of.Tab,{tabId:Lf.document,"data-tab-id":Lf.document,children:s}),(0,c.jsx)(Of.Tab,{tabId:Lf.block,"data-tab-id":Lf.block,children:(0,fs.__)("Block")})]})}));const{BlockQuickNavigation:Vf}=$(g.privateApis),Uf=["core/post-title","core/post-featured-image","core/post-content"];function Hf(){const e=(0,p.useMemo)((()=>(0,h.applyFilters)("editor.postContentBlockTypes",Uf)),[]),{clientIds:t,postType:s,renderingMode:n}=(0,d.useSelect)((t=>{const{getCurrentPostType:s,getPostBlocksByName:n,getRenderingMode:o}=$(t(wc)),r=s();return{postType:r,clientIds:n(B===r?"core/template-part":e),renderingMode:o()}}),[e]),{enableComplementaryArea:o}=(0,d.useDispatch)(Ea);return"post-only"===n&&s!==B||0===t.length?null:(0,c.jsx)(Fn.PanelBody,{title:(0,fs.__)("Content"),children:(0,c.jsx)(Vf,{clientIds:t,onSelect:()=>{o("core","edit-post/document")}})})}const{BlockQuickNavigation:zf}=$(g.privateApis);function Gf(){const e=(0,d.useSelect)((e=>{const{getBlockTypes:t}=e(x.store);return t()}),[]),t=(0,p.useMemo)((()=>e.filter((e=>"theme"===e.category)).map((({name:e})=>e))),[e]),s=(0,d.useSelect)((e=>{const{getBlocksByName:s}=e(g.store);return s(t)}),[t]);return 0===s.length?null:(0,c.jsx)(Fn.PanelBody,{title:(0,fs.__)("Content"),children:(0,c.jsx)(zf,{clientIds:s})})}function $f(){const e=(0,d.useSelect)((e=>{const{getCurrentPostType:t}=e(wc);return t()}),[]);return e!==I?null:(0,c.jsx)(Gf,{})}var Wf=function(){const{hasBlockSelection:e}=(0,d.useSelect)((e=>({hasBlockSelection:!!e(g.store).getBlockSelectionStart()})),[]),{getActiveComplementaryArea:t}=(0,d.useSelect)(Ea),{enableComplementaryArea:s}=(0,d.useDispatch)(Ea),{get:n}=(0,d.useSelect)(C.store);(0,p.useEffect)((()=>{const o=t("core"),r=["edit-post/document","edit-post/block"].includes(o),i=n("core","distractionFree");r&&!i&&s("core",e?"edit-post/block":"edit-post/document")}),[e,t,s,n])};const{Tabs:Zf}=$(Fn.privateApis),Yf=p.Platform.select({web:!0,native:!1}),qf=({tabName:e,keyboardShortcut:t,onActionPerformed:s,extraPanels:n})=>{const o=(0,p.useRef)(null),r=(0,p.useContext)(Zf.Context);return(0,p.useEffect)((()=>{const t=Array.from(o.current?.querySelectorAll('[role="tab"]')||[]),s=t.find((t=>t.getAttribute("data-tab-id")===e)),n=s?.ownerDocument.activeElement;t.some((e=>n&&n.id===e.id))&&s&&s.id!==n?.id&&s?.focus()}),[e]),(0,c.jsx)(Nu,{identifier:e,header:(0,c.jsx)(Zf.Context.Provider,{value:r,children:(0,c.jsx)(Ff,{ref:o})}),closeLabel:(0,fs.__)("Close Settings"),className:"editor-sidebar__panel",headerClassName:"editor-sidebar__panel-tabs",title:(0,fs._x)("Settings","panel button label"),toggleShortcut:t,icon:(0,fs.isRTL)()?qi:Ki,isActiveByDefault:Yf,children:(0,c.jsxs)(Zf.Context.Provider,{value:r,children:[(0,c.jsxs)(Zf.TabPanel,{tabId:Lf.document,focusable:!1,children:[(0,c.jsx)(Ef,{onActionPerformed:s}),(0,c.jsx)(_u.Slot,{}),(0,c.jsx)(Hf,{}),(0,c.jsx)($f,{}),(0,c.jsx)(Mf,{}),(0,c.jsx)(hh,{}),(0,c.jsx)(rf,{}),n]}),(0,c.jsx)(Zf.TabPanel,{tabId:Lf.block,focusable:!1,children:(0,c.jsx)(g.BlockInspector,{})})]})})};var Kf=({extraPanels:e,onActionPerformed:t})=>{Wf();const{tabName:s,keyboardShortcut:n,showSummary:o}=(0,d.useSelect)((e=>{const t=e(al.store).getShortcutRepresentation("core/editor/toggle-sidebar"),s=e(Ea).getActiveComplementaryArea("core");let n=s;return[Lf.block,Lf.document].includes(s)||(n=e(g.store).getBlockSelectionStart()?Lf.block:Lf.document),{tabName:n,keyboardShortcut:t,showSummary:![B,I,R].includes(e(wc).getCurrentPostType())}}),[]),{enableComplementaryArea:r}=(0,d.useDispatch)(Ea),i=(0,p.useCallback)((e=>{e&&r("core",e)}),[r]);return(0,c.jsx)(Zf,{selectedTabId:s,onSelect:i,selectOnMove:!1,children:(0,c.jsx)(qf,{tabName:s,keyboardShortcut:n,showSummary:o,onActionPerformed:t,extraPanels:e})})},Qf=(0,c.jsx)(L.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(L.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})});const Xf="edit-post/collab-history-sidebar",Jf="edit-post/collab-sidebar",eb=[Xf,Jf];function tb(){}const sb=["#3858E9","#9fB1FF","#1D35B4","#1A1919","#E26F56","#33F078","#FFF972","#7A00DF"];function nb(e){return sb[e%sb.length]}function ob(e,t,s){if(!t)return;const n=e?`[role=treeitem][id="comment-thread-${e}"]`:"[role=treeitem]:not([id])",o=s?`${n} ${s}`:n;return new Promise((e=>{const s=t.closest(".interface-interface-skeleton__sidebar");if(s.querySelector(o))return e(s.querySelector(o));let n=null;const r=new window.MutationObserver((()=>{s.querySelector(o)&&(clearTimeout(n),r.disconnect(),e(s.querySelector(o)))}));r.observe(s,{childList:!0,subtree:!0}),n=setTimeout((()=>{r.disconnect(),e(null)}),3e3)})).then((e=>e?.focus()))}var rb=function({avatar:e,name:t,date:s,userId:n}){const o=!!e,r=(0,v.getSettings)(),{currentUserAvatar:i,currentUserName:a,currentUserId:l,dateFormat:p=r.formats.date}=(0,d.useSelect)((e=>{const{canUser:t,getCurrentUser:s,getEntityRecord:n}=e(u.store),r=t("read",{kind:"root",name:"site"})?n("root","site"):void 0;if(o)return{dateFormat:r?.date_format};const{getSettings:i}=e(g.store),{__experimentalDiscussionSettings:a}=i(),l=a?.avatarURL,c=s();return{currentUserAvatar:c?.avatar_urls?.[48]??l,currentUserName:c?.name,currentUserId:c?.id,dateFormat:r?.date_format}}),[o]),m=(0,v.getDate)(s),h=(0,v.dateI18n)("c",m),_=Math.floor((new Date-m)/864e5)<30?(0,v.humanTimeDiff)(m):(0,v.dateI18n)(p,m),f=(0,v.dateI18n)((0,fs._x)("F j, Y g:i a","Note date full date format"),s);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("img",{src:e||i,className:"editor-collab-sidebar-panel__user-avatar",alt:(0,fs.__)("User avatar"),width:32,height:32,style:{borderColor:nb(n??l)}}),(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"0",children:[(0,c.jsx)("span",{className:"editor-collab-sidebar-panel__user-name",children:t??a}),s&&(0,c.jsx)(Fn.Tooltip,{text:f,children:(0,c.jsx)("time",{dateTime:h,className:"editor-collab-sidebar-panel__user-time",children:_})})]})]})};var ib=function e({onSubmit:t,onCancel:s,thread:n,submitButtonText:o,labelText:r,reflowComments:i=tb}){const[a,l]=(0,p.useState)(n?.content?.raw??""),d=(0,m.useDebounce)(i,100),u=(0,m.useInstanceId)(e,"comment-input"),h=a===n?.content?.raw||!(g=a,g.trim()).length;var g;return(0,c.jsxs)(Fn.__experimentalVStack,{className:"editor-collab-sidebar-panel__comment-form",spacing:"4",children:[(0,c.jsx)(Fn.VisuallyHidden,{as:"label",htmlFor:u,children:r??(0,fs.__)("Note")}),(0,c.jsx)(gh.A,{id:u,value:a??"",onChange:e=>{var t;t=e.target.value,l(t),d()},rows:1,maxRows:20}),(0,c.jsxs)(Fn.__experimentalHStack,{spacing:"2",justify:"flex-end",wrap:!0,children:[(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary",onClick:s,children:(0,c.jsx)(Fn.__experimentalTruncate,{children:(0,fs.__)("Cancel")})}),(0,c.jsx)(Fn.Button,{size:"compact",accessibleWhenDisabled:!0,variant:"primary",onClick:()=>{t(a),l("")},disabled:h,children:(0,c.jsx)(Fn.__experimentalTruncate,{children:o})})]})]})};Math.min,Math.max,Math.round,Math.floor;function ab(e){return e.split("-")[0]}function lb(e){return e.split("-")[1]}function cb(e){return"y"===e?"height":"width"}function db(e){return["top","bottom"].includes(ab(e))?"y":"x"}function ub(e){return"x"===db(e)?"y":"x"}function pb(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function mb(e,t,s){let{reference:n,floating:o}=e;const r=db(t),i=ub(t),a=cb(i),l=ab(t),c="y"===r,d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,p=n[a]/2-o[a]/2;let m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-o.width,y:u};break;default:m={x:n.x,y:n.y}}switch(lb(t)){case"start":m[i]-=p*(s&&c?-1:1);break;case"end":m[i]+=p*(s&&c?-1:1)}return m}const hb=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:s,y:n}=t,o=await async function(e,t){const{placement:s,platform:n,elements:o}=e,r=await(null==n.isRTL?void 0:n.isRTL(o.floating)),i=ab(s),a=lb(s),l="y"===db(s),c=["left","top"].includes(i)?-1:1,d=r&&l?-1:1,u=(m=e,"function"==typeof(p=t)?p(m):p);var p,m;let{mainAxis:h,crossAxis:g,alignmentAxis:_}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return a&&"number"==typeof _&&(g="end"===a?-1*_:_),l?{x:g*d,y:h*c}:{x:h*c,y:g*d}}(t,e);return{x:s+o.x,y:n+o.y,data:o}}}},gb=Math.min,_b=Math.max,fb=Math.round,bb=Math.floor,yb=e=>({x:e,y:e});function xb(){return"undefined"!=typeof window}function vb(e){return kb(e)?(e.nodeName||"").toLowerCase():"#document"}function wb(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Sb(e){var t;return null==(t=(kb(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function kb(e){return!!xb()&&(e instanceof Node||e instanceof wb(e).Node)}function Cb(e){return!!xb()&&(e instanceof Element||e instanceof wb(e).Element)}function Pb(e){return!!xb()&&(e instanceof HTMLElement||e instanceof wb(e).HTMLElement)}function jb(e){return!(!xb()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof wb(e).ShadowRoot)}function Eb(e){const{overflow:t,overflowX:s,overflowY:n,display:o}=Db(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+s)&&!["inline","contents"].includes(o)}function Tb(e){return["table","td","th"].includes(vb(e))}function Bb(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Ib(e){const t=Nb(),s=Cb(e)?Db(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!s[e]&&"none"!==s[e]))||!!s.containerType&&"normal"!==s.containerType||!t&&!!s.backdropFilter&&"none"!==s.backdropFilter||!t&&!!s.filter&&"none"!==s.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(s.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(s.contain||"").includes(e)))}function Nb(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Rb(e){return["html","body","#document"].includes(vb(e))}function Db(e){return wb(e).getComputedStyle(e)}function Ab(e){return Cb(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mb(e){if("html"===vb(e))return e;const t=e.assignedSlot||e.parentNode||jb(e)&&e.host||Sb(e);return jb(t)?t.host:t}function Lb(e){const t=Mb(e);return Rb(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pb(t)&&Eb(t)?t:Lb(t)}function Ob(e,t,s){var n;void 0===t&&(t=[]),void 0===s&&(s=!0);const o=Lb(e),r=o===(null==(n=e.ownerDocument)?void 0:n.body),i=wb(o);if(r){const e=function(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}(i);return t.concat(i,i.visualViewport||[],Eb(o)?o:[],e&&s?Ob(e):[])}return t.concat(o,Ob(o,[],s))}function Fb(e){const t=Db(e);let s=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Pb(e),r=o?e.offsetWidth:s,i=o?e.offsetHeight:n,a=fb(s)!==r||fb(n)!==i;return a&&(s=r,n=i),{width:s,height:n,$:a}}function Vb(e){return Cb(e)?e:e.contextElement}function Ub(e){const t=Vb(e);if(!Pb(t))return yb(1);const s=t.getBoundingClientRect(),{width:n,height:o,$:r}=Fb(t);let i=(r?fb(s.width):s.width)/n,a=(r?fb(s.height):s.height)/o;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}const Hb=yb(0);function zb(e){const t=wb(e);return Nb()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Hb}function Gb(e,t,s,n){void 0===t&&(t=!1),void 0===s&&(s=!1);const o=e.getBoundingClientRect(),r=Vb(e);let i=yb(1);t&&(n?Cb(n)&&(i=Ub(n)):i=Ub(e));const a=function(e,t,s){return void 0===t&&(t=!1),!(!s||t&&s!==wb(e))&&t}(r,s,n)?zb(r):yb(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(r){const e=wb(r),t=n&&Cb(n)?wb(n):n;let s=e,o=s.frameElement;for(;o&&n&&t!==s;){const e=Ub(o),t=o.getBoundingClientRect(),n=Db(o),r=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=r,c+=i,s=wb(o),o=s.frameElement}}return pb({width:d,height:u,x:l,y:c})}const $b=[":popover-open",":modal"];function Wb(e){return $b.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Zb(e){return Gb(Sb(e)).left+Ab(e).scrollLeft}function Yb(e,t,s){let n;if("viewport"===t)n=function(e,t){const s=wb(e),n=Sb(e),o=s.visualViewport;let r=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){r=o.width,i=o.height;const e=Nb();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:r,height:i,x:a,y:l}}(e,s);else if("document"===t)n=function(e){const t=Sb(e),s=Ab(e),n=e.ownerDocument.body,o=_b(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=_b(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-s.scrollLeft+Zb(e);const a=-s.scrollTop;return"rtl"===Db(n).direction&&(i+=_b(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:a}}(Sb(e));else if(Cb(t))n=function(e,t){const s=Gb(e,!0,"fixed"===t),n=s.top+e.clientTop,o=s.left+e.clientLeft,r=Pb(e)?Ub(e):yb(1);return{width:e.clientWidth*r.x,height:e.clientHeight*r.y,x:o*r.x,y:n*r.y}}(t,s);else{const s=zb(e);n={...t,x:t.x-s.x,y:t.y-s.y}}return pb(n)}function qb(e,t){const s=Mb(e);return!(s===t||!Cb(s)||Rb(s))&&("fixed"===Db(s).position||qb(s,t))}function Kb(e,t,s){const n=Pb(t),o=Sb(t),r="fixed"===s,i=Gb(e,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=yb(0);if(n||!n&&!r)if(("body"!==vb(t)||Eb(o))&&(a=Ab(t)),n){const e=Gb(t,!0,r,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Zb(o));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function Qb(e,t){return Pb(e)&&"fixed"!==Db(e).position?t?t(e):e.offsetParent:null}function Xb(e,t){const s=wb(e);if(!Pb(e)||Wb(e))return s;let n=Qb(e,t);for(;n&&Tb(n)&&"static"===Db(n).position;)n=Qb(n,t);return n&&("html"===vb(n)||"body"===vb(n)&&"static"===Db(n).position&&!Ib(n))?s:n||function(e){let t=Mb(e);for(;Pb(t)&&!Rb(t);){if(Ib(t))return t;if(Bb(t))return null;t=Mb(t)}return null}(e)||s}const Jb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:s,offsetParent:n,strategy:o}=e;const r="fixed"===o,i=Sb(n),a=!!t&&Wb(t.floating);if(n===i||a&&r)return s;let l={scrollLeft:0,scrollTop:0},c=yb(1);const d=yb(0),u=Pb(n);if((u||!u&&!r)&&(("body"!==vb(n)||Eb(i))&&(l=Ab(n)),Pb(n))){const e=Gb(n);c=Ub(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}return{width:s.width*c.x,height:s.height*c.y,x:s.x*c.x-l.scrollLeft*c.x+d.x,y:s.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Sb,getClippingRect:function(e){let{element:t,boundary:s,rootBoundary:n,strategy:o}=e;const r=[..."clippingAncestors"===s?function(e,t){const s=t.get(e);if(s)return s;let n=Ob(e,[],!1).filter((e=>Cb(e)&&"body"!==vb(e))),o=null;const r="fixed"===Db(e).position;let i=r?Mb(e):e;for(;Cb(i)&&!Rb(i);){const t=Db(i),s=Ib(i);s||"fixed"!==t.position||(o=null),(r?!s&&!o:!s&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Eb(i)&&!s&&qb(e,i))?n=n.filter((e=>e!==i)):o=t,i=Mb(i)}return t.set(e,n),n}(t,this._c):[].concat(s),n],i=r[0],a=r.reduce(((e,s)=>{const n=Yb(t,s,o);return e.top=_b(n.top,e.top),e.right=gb(n.right,e.right),e.bottom=gb(n.bottom,e.bottom),e.left=_b(n.left,e.left),e}),Yb(t,i,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Xb,getElementRects:async function(e){const t=this.getOffsetParent||Xb,s=this.getDimensions;return{reference:Kb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await s(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:s}=Fb(e);return{width:t,height:s}},getScale:Ub,isElement:Cb,isRTL:function(e){return"rtl"===Db(e).direction}};function ey(e,t,s,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=n,c=Vb(e),d=o||r?[...c?Ob(c):[],...Ob(t)]:[];d.forEach((e=>{o&&e.addEventListener("scroll",s,{passive:!0}),r&&e.addEventListener("resize",s)}));const u=c&&a?function(e,t){let s,n=null;const o=Sb(e);function r(){var e;clearTimeout(s),null==(e=n)||e.disconnect(),n=null}return function i(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),r();const{left:c,top:d,width:u,height:p}=e.getBoundingClientRect();if(a||t(),!u||!p)return;const m={rootMargin:-bb(d)+"px "+-bb(o.clientWidth-(c+u))+"px "+-bb(o.clientHeight-(d+p))+"px "+-bb(c)+"px",threshold:_b(0,gb(1,l))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return i();t?i(!1,t):s=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{n=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(g,m)}n.observe(e)}(!0),r}(c,s):null;let p,m=-1,h=null;i&&(h=new ResizeObserver((e=>{let[n]=e;n&&n.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),s()})),c&&!l&&h.observe(c),h.observe(t));let g=l?Gb(e):null;return l&&function t(){const n=Gb(e);!g||n.x===g.x&&n.y===g.y&&n.width===g.width&&n.height===g.height||s();g=n,p=requestAnimationFrame(t)}(),s(),()=>{var e;d.forEach((e=>{o&&e.removeEventListener("scroll",s),r&&e.removeEventListener("resize",s)})),null==u||u(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const ty=(e,t,s)=>{const n=new Map,o={platform:Jb,...s},r={...o.platform,_c:n};return(async(e,t,s)=>{const{placement:n="bottom",strategy:o="absolute",middleware:r=[],platform:i}=s,a=r.filter(Boolean),l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=mb(c,n,l),p=n,m={},h=0;for(let s=0;s<a.length;s++){const{name:r,fn:g}=a[s],{x:_,y:f,data:b,reset:y}=await g({x:d,y:u,initialPlacement:n,placement:p,strategy:o,middlewareData:m,rects:c,platform:i,elements:{reference:e,floating:t}});d=null!=_?_:d,u=null!=f?f:u,m={...m,[r]:{...m[r],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),({x:d,y:u}=mb(c,p,l))),s=-1)}return{x:d,y:u,placement:p,strategy:o,middlewareData:m}})(e,t,{...o,platform:r})};var sy=s(1609);const ny=window.ReactDOM;var oy="undefined"!=typeof document?sy.useLayoutEffect:sy.useEffect;function ry(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let s,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(s=e.length,s!==t.length)return!1;for(n=s;0!=n--;)if(!ry(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),s=o.length,s!==Object.keys(t).length)return!1;for(n=s;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=s;0!=n--;){const s=o[n];if(("_owner"!==s||!e.$$typeof)&&!ry(e[s],t[s]))return!1}return!0}return e!=e&&t!=t}function iy(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ay(e,t){const s=iy(e);return Math.round(t*s)/s}function ly(e){const t=sy.useRef(e);return oy((()=>{t.current=e})),t}const{useBlockElementRef:cy,cleanEmptyObject:dy}=$(g.privateApis);function uy({thread:e,calculatedOffset:t,setHeights:s,selectedThread:n,setBlockRef:o,commentLastUpdated:r}){const i=(0,p.useRef)();cy(e.blockClientId,i);const a=(0,p.useCallback)(((e,t)=>{s((s=>s[e]!==t?{...s,[e]:t}:s))}),[s]),{y:l,refs:c}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:n=[],platform:o,elements:{reference:r,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,u]=sy.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=sy.useState(n);ry(p,n)||m(n);const[h,g]=sy.useState(null),[_,f]=sy.useState(null),b=sy.useCallback((e=>{e!==w.current&&(w.current=e,g(e))}),[]),y=sy.useCallback((e=>{e!==S.current&&(S.current=e,f(e))}),[]),x=r||h,v=i||_,w=sy.useRef(null),S=sy.useRef(null),k=sy.useRef(d),C=null!=l,P=ly(l),j=ly(o),E=sy.useCallback((()=>{if(!w.current||!S.current)return;const e={placement:t,strategy:s,middleware:p};j.current&&(e.platform=j.current),ty(w.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};T.current&&!ry(k.current,t)&&(k.current=t,ny.flushSync((()=>{u(t)})))}))}),[p,t,s,j]);oy((()=>{!1===c&&k.current.isPositioned&&(k.current.isPositioned=!1,u((e=>({...e,isPositioned:!1}))))}),[c]);const T=sy.useRef(!1);oy((()=>(T.current=!0,()=>{T.current=!1})),[]),oy((()=>{if(x&&(w.current=x),v&&(S.current=v),x&&v){if(P.current)return P.current(x,v,E);E()}}),[x,v,E,P,C]);const B=sy.useMemo((()=>({reference:w,floating:S,setReference:b,setFloating:y})),[b,y]),I=sy.useMemo((()=>({reference:x,floating:v})),[x,v]),N=sy.useMemo((()=>{const e={position:s,left:0,top:0};if(!I.floating)return e;const t=ay(I.floating,d.x),n=ay(I.floating,d.y);return a?{...e,transform:"translate("+t+"px, "+n+"px)",...iy(I.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:t,top:n}}),[s,a,I.floating,d.x,d.y]);return sy.useMemo((()=>({...d,update:E,refs:B,elements:I,floatingStyles:N})),[d,E,B,I,N])}({placement:"right-start",middleware:[hb({crossAxis:t||-16})],whileElementsMounted:ey});return(0,p.useEffect)((()=>{i.current&&c.setReference(i.current)}),[i,c,r]),(0,p.useEffect)((()=>{c.floating?.current&&o(e.id,i.current)}),[e.id,c.floating,o]),(0,p.useEffect)((()=>{if(c.floating?.current){const t=c.floating.current.scrollHeight;a(e.id,t)}}),[e.id,a,c.floating,n,r]),{blockRef:i,y:l,refs:c}}const{useBlockElement:py}=$(g.privateApis);function my({onSubmit:e,showCommentBoard:t,setShowCommentBoard:s,commentSidebarRef:n,reflowComments:o=tb,isFloating:r=!1,y:i,refs:a}){const{clientId:l,blockCommentId:u}=(0,d.useSelect)((e=>{const{getSelectedBlock:t}=e(g.store),s=t();return{clientId:s?.clientId,blockCommentId:s?.attributes?.metadata?.noteId}}),[]),p=py(l),{toggleBlockSpotlight:m}=$((0,d.useDispatch)(g.store));return t&&l&&void 0===u?(0,c.jsxs)(Fn.__experimentalVStack,{className:hr("editor-collab-sidebar-panel__thread is-selected",{"is-floating":r}),spacing:"3",tabIndex:0,"aria-label":(0,fs.__)("New note"),role:"treeitem",ref:r?a.setFloating:void 0,style:r?{top:i,opacity:i?void 0:0}:void 0,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(m(l,!1),s(!1))},children:[(0,c.jsx)(Fn.__experimentalHStack,{alignment:"left",spacing:"3",children:(0,c.jsx)(rb,{})}),(0,c.jsx)(ib,{onSubmit:async t=>{const{id:o}=await e({content:t});ob(o,n.current),s(!1)},onCancel:()=>{s(!1),p?.focus(),m(l,!1)},reflowComments:o,submitButtonText:(0,fs.__)("Add note"),labelText:(0,fs.__)("New note")})]}):null}const{useBlockElement:hy}=$(g.privateApis),{Menu:gy}=$(Fn.privateApis);function _y({threads:e,onEditComment:t,onAddReply:s,onCommentDelete:n,showCommentBoard:o,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l=!1,commentLastUpdated:u}){const[m,h]=(0,p.useState)({}),[_,f]=(0,p.useState)(null),[b,y]=(0,p.useState)({}),[x,v]=(0,p.useState)({}),{setCanvasMinHeight:w}=$((0,d.useDispatch)(wc)),{blockCommentId:S,selectedBlockClientId:k,orderedBlockIds:C}=(0,d.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:s}=e(g.store),n=s();return{blockCommentId:n?t(n)?.metadata?.noteId:null,selectedBlockClientId:n,orderedBlockIds:e(g.store).getBlockOrder()}}),[]),P=hy(k),j=(0,p.useMemo)((()=>{const t=[...e],s=[];if(l&&o&&void 0===S){const e={id:"new-note-thread",blockClientId:k,content:{rendered:""}};return C.forEach((n=>{if(n===k)s.push(e);else{const e=t.find((e=>e.blockClientId===n));e&&s.push(e)}})),s}return t}),[e,l,o,S,k,C]),E=async e=>{const t=j.findIndex((t=>t.id===e.id)),s=j[t+1],o=j[t-1];if(await n(e),0!==e.parent)return f(e.parent),void ob(e.parent,i.current);s?(f(s.id),ob(s.id,i.current)):o?(f(o.id),ob(o.id,i.current)):(f(null),r(!1),P?.focus())};(0,p.useEffect)((()=>{f(S??(o?"new-note-thread":null))}),[S,o]);const T=(0,p.useCallback)(((e,t)=>{v((s=>({...s,[e]:t})))}),[]);(0,p.useEffect)((()=>{const{offsets:e,minHeight:t}=(()=>{const e={};if(!l)return{offsets:e,minHeight:0};const t=j.findIndex((e=>e.id===_)),s=-1===t?0:t,n=j[s];if(!n||!x[n.id])return{offsets:e,minHeight:0};let o=x[n.id],r=o?.getBoundingClientRect();const i=r?.top||0,a=m[n.id]||0;e[n.id]=-16;let c={threadTop:i-16,threadHeight:a};for(let t=s+1;t<j.length;t++){const s=j[t];if(!x[s.id])continue;o=x[s.id],r=o?.getBoundingClientRect();const n=r?.top||0,i=m[s.id]||0;let a=-16;const l=c.threadTop+c.threadHeight;n<l+16&&(a=l-n+20),e[s.id]=a,c={threadTop:n+a,threadHeight:i}}let d={threadTop:i-16};for(let s=t-1;s>=0;s--){const t=j[s];if(!x[t.id])continue;o=x[t.id],r=o?.getBoundingClientRect();const n=r?.top||0,i=m[t.id]||0;let a=-16;n+i>d.threadTop&&(a=d.threadTop-n-i-20),e[t.id]=a,d={threadTop:n+a}}let u=0;const p=j[j.length-1];if(x[p.id]){const t=x[p.id],s=t?.getBoundingClientRect();u=(s?.top||0)+(m[p.id]||0)+(e[p.id]||0)+32}return{offsets:e,minHeight:u}})();Object.keys(e).length>0&&y(e),w(t)}),[m,x,l,j,_,w]);return Array.isArray(j)&&j.length>0||l?(0,c.jsxs)(c.Fragment,{children:[!l&&o&&void 0===S&&(0,c.jsx)(my,{onSubmit:s,showCommentBoard:o,setShowCommentBoard:r,commentSidebarRef:i}),j.map((e=>(0,c.jsx)(fy,{thread:e,onAddReply:s,onCommentDelete:E,onEditComment:t,isSelected:_===e.id,setSelectedThread:f,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:b[e.id]??0,setHeights:h,setBlockRef:T,selectedThread:_,commentLastUpdated:u,showCommentBoard:o},e.id)))]}):null}function fy({thread:e,onEditComment:t,onAddReply:s,onCommentDelete:n,isSelected:o,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l,calculatedOffset:u,setHeights:p,setBlockRef:h,setSelectedThread:_,selectedThread:f,commentLastUpdated:b,showCommentBoard:y}){const{toggleBlockHighlight:x,selectBlock:v,toggleBlockSpotlight:w}=$((0,d.useDispatch)(g.store)),S=hy(e.blockClientId),k=(0,m.useDebounce)(x,50),{y:C,refs:P}=uy({thread:e,calculatedOffset:u,setHeights:p,setBlockRef:h,selectedThread:f,commentLastUpdated:b}),j=()=>{k(e.blockClientId,!0)},E=()=>{k(e.blockClientId,!1)},T=()=>{r(!1),_(e.id),e.blockClientId&&(v(e.blockClientId,null),w(e.blockClientId,!0))},B=()=>{_(null),r(!1),w(e.blockClientId,!1)},I=e?.reply||[],N=I.length>0?I[I.length-1]:void 0,R=I.length>0?I.slice(0,-1):[],D=function(e,t=10){if(!e)return"";const s=(0,fs._x)("words","Word count type. Do not translate!"),n=e.trim();let o="";if("words"===s)o=n.split(" ",t).join(" ");else if("characters_excluding_spaces"===s){const e=n.split("",t).join(""),s=e.length-e.replaceAll(" ","").length;o=n.split("",t+s).join("")}else"characters_including_spaces"===s&&(o=n.split("",t).join(""));return o!==n?o+"…":o}((0,Hc.__unstableStripHTML)(e.content?.rendered),10),A=e.blockClientId?(0,fs.sprintf)((0,fs.__)("Note: %s"),D):(0,fs.sprintf)((0,fs.__)("Original block deleted. Note: %s"),D);return"new-note-thread"===e.id&&y&&l?(0,c.jsx)(my,{onSubmit:s,showCommentBoard:y,setShowCommentBoard:r,commentSidebarRef:i,reflowComments:a,isFloating:l,y:C,refs:P}):(0,c.jsxs)(Fn.__experimentalVStack,{className:hr("editor-collab-sidebar-panel__thread",{"is-selected":o,"is-floating":l}),id:`comment-thread-${e.id}`,spacing:"3",onClick:T,onMouseEnter:j,onMouseLeave:E,onFocus:j,onBlur:E,onKeyDown:t=>{t.defaultPrevented||("Enter"===t.key&&t.currentTarget===t.target&&(o?B():T()),"Escape"===t.key&&(B(),ob(e.id,i.current)))},tabIndex:0,role:"treeitem","aria-label":A,"aria-expanded":o,ref:l?P.setFloating:void 0,style:l?{top:C}:void 0,children:[(0,c.jsx)(Fn.Button,{className:"editor-collab-sidebar-panel__skip-to-comment",variant:"secondary",size:"compact",onClick:()=>{ob(e.id,i.current,"textarea")},children:(0,fs.__)("Add new note")}),!e.blockClientId&&(0,c.jsx)(Fn.__experimentalText,{as:"p",weight:500,variant:"muted",children:(0,fs.__)("Original block deleted.")}),(0,c.jsx)(by,{thread:e,isExpanded:o,onEdit:(s={})=>{const{status:n}=s;t(s),"approved"===n&&(B(),ob(e.id,i.current))},onDelete:n,reflowComments:a}),o&&I.map((s=>(0,c.jsx)(by,{thread:s,parent:e,isExpanded:o,onEdit:t,onDelete:n,reflowComments:a},s.id))),!o&&R.length>0&&(0,c.jsx)(Fn.__experimentalHStack,{className:"editor-collab-sidebar-panel__more-reply-separator",children:(0,c.jsx)(Fn.Button,{size:"compact",variant:"tertiary",className:"editor-collab-sidebar-panel__more-reply-button",onClick:()=>{_(e.id),ob(e.id,i.current)},children:(0,fs.sprintf)((0,fs._n)("%s more reply","%s more replies",R.length),R.length)})}),!o&&N&&(0,c.jsx)(by,{thread:N,parent:e,isExpanded:o,onEdit:t,onDelete:n,reflowComments:a}),o&&(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"2",role:"treeitem",children:[(0,c.jsx)(Fn.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:(0,c.jsx)(rb,{})}),(0,c.jsx)(Fn.__experimentalVStack,{spacing:"2",children:(0,c.jsx)(ib,{onSubmit:n=>{"approved"===e.status?t({id:e.id,status:"hold",content:n}):s({content:n,parent:e.id})},onCancel:t=>{t.stopPropagation(),B(),ob(e.id,i.current)},submitButtonText:"approved"===e.status?(0,fs.__)("Reopen & Reply"):(0,fs.__)("Reply"),rows:"approved"===e.status?2:4,labelText:(0,fs.sprintf)((0,fs.__)("Reply to note %1$s by %2$s"),e.id,e.author_name),reflowComments:a})})]}),!!e.blockClientId&&(0,c.jsx)(Fn.Button,{className:"editor-collab-sidebar-panel__skip-to-block",variant:"secondary",size:"compact",onClick:e=>{e.stopPropagation(),S?.focus()},children:(0,fs.__)("Back to block")})]})}const by=({thread:e,parent:t,isExpanded:s,onEdit:n,onDelete:o,reflowComments:r})=>{const[i,a]=(0,p.useState)(!1),[l,d]=(0,p.useState)(!1),u=(0,p.useRef)(null),m=()=>{a(!1),d(!1),u.current?.focus()},h="note"===e.type&&e.meta&&("resolved"===e.meta._wp_note_status||"reopen"===e.meta._wp_note_status),g=[{id:"edit",title:(0,fs.__)("Edit"),isEligible:({status:e})=>"approved"!==e,onClick:()=>{a("edit")}},{id:"reopen",title:(0,fs._x)("Reopen","Reopen note"),isEligible:({status:e})=>"approved"===e,onClick:()=>{n({id:e.id,status:"hold"})}},{id:"delete",title:(0,fs.__)("Delete"),isEligible:()=>!0,onClick:()=>{a("delete"),d(!0)}}],_=0===e.parent,f="approved"!==t?.status?g.filter((t=>t.isEligible(e))):[];return(0,c.jsxs)(Fn.__experimentalVStack,{spacing:"2",role:0!==e.parent?"treeitem":void 0,children:[(0,c.jsxs)(Fn.__experimentalHStack,{alignment:"left",spacing:"3",justify:"flex-start",children:[(0,c.jsx)(rb,{avatar:e?.author_avatar_urls?.[48],name:e?.author_name,date:e?.date,userId:e?.author}),s&&(0,c.jsx)(Fn.FlexItem,{className:"editor-collab-sidebar-panel__comment-status",onClick:e=>{e.stopPropagation()},children:(0,c.jsxs)(Fn.__experimentalHStack,{spacing:"0",children:[_&&(0,c.jsx)(Fn.Button,{label:(0,fs._x)("Resolve","Mark note as resolved"),size:"small",icon:Sr,disabled:"approved"===e.status,accessibleWhenDisabled:"approved"===e.status,onClick:()=>{n({id:e.id,status:"approved"})}}),(0,c.jsxs)(gy,{placement:"bottom-end",children:[(0,c.jsx)(gy.TriggerButton,{render:(0,c.jsx)(Fn.Button,{ref:u,size:"small",icon:i_,label:(0,fs.__)("Actions"),disabled:!f.length,accessibleWhenDisabled:!0})}),(0,c.jsx)(gy.Popover,{children:f.map((e=>(0,c.jsx)(gy.Item,{onClick:()=>e.onClick(),children:(0,c.jsx)(gy.ItemLabel,{children:e.title})},e.id)))})]})]})})]}),"edit"===i?(0,c.jsx)(ib,{onSubmit:t=>{n({id:e.id,content:t}),a(!1),u.current?.focus()},onCancel:()=>m(),thread:e,submitButtonText:(0,fs._x)("Update","verb"),labelText:(0,fs.sprintf)((0,fs.__)("Edit note %1$s by %2$s"),e.id,e.author_name),reflowComments:r}):(0,c.jsx)(p.RawHTML,{className:hr("editor-collab-sidebar-panel__user-comment",{"editor-collab-sidebar-panel__resolution-text":h}),children:h?(()=>{const t="resolved"===e.meta._wp_note_status?(0,fs.__)("Marked as resolved"):(0,fs.__)("Reopened"),s=e?.content?.raw;return s&&"string"==typeof s&&""!==s.trim()?(0,fs.sprintf)((0,fs.__)("%1$s: %2$s"),t,s):t})():e?.content?.rendered}),"delete"===i&&(0,c.jsx)(Fn.__experimentalConfirmDialog,{isOpen:l,onConfirm:()=>{o(e),a(!1),d(!1)},onCancel:m,confirmButtonText:(0,fs.__)("Delete"),children:(0,fs.__)("Are you sure you want to delete this note? This will also delete all of this note's replies.")})]})};const{CommentIconSlotFill:yy}=$(g.privateApis),xy=({clientId:e,onClick:t,isDistractionFree:s})=>{const n=(0,d.useSelect)((t=>t(g.store).getBlock(e)),[e]);if(!n?.isValid||n?.name===(0,x.getUnregisteredTypeHandlerName)())return null;const o=s||"core/freeform"===n?.name;let r;return s?r=(0,fs.__)("Notes are disabled in distraction free mode."):"core/freeform"===n?.name&&(r=(0,fs.__)("Convert to blocks to add notes.")),(0,c.jsx)(Fn.MenuItem,{icon:Qf,onClick:t,"aria-haspopup":"dialog",disabled:o,info:r,children:(0,fs.__)("Add note")})};var vy=({onClick:e,isDistractionFree:t})=>(0,c.jsx)(yy.Fill,{children:({clientId:s,onClose:n})=>(0,c.jsx)(xy,{clientId:s,isDistractionFree:t,onClick:()=>{e(),n()}})});const{CommentIconToolbarSlotFill:wy}=$(g.privateApis);var Sy=({onClick:e,thread:t})=>{const s=(0,p.useMemo)((()=>{if(!t)return[];const e=new Map,s=[t,...t.reply];return s.sort(((e,t)=>new Date(e.date)-new Date(t.date))),s.forEach((t=>{t.author_name&&t.author_avatar_urls&&(e.has(t.author)||e.set(t.author,{name:t.author_name,avatar:t.author_avatar_urls?.[48]||t.author_avatar_urls?.[96],id:t.author,date:t.date}))})),Array.from(e.values())}),[t]);if(!s.length)return null;const n=s.length>3?s.slice(0,2):s,o=Math.max(0,s.length-n.length),r=s.length>100&&o>0?(0,fs.__)("100+"):(0,fs.sprintf)((0,fs.__)("+%s"),o);return(0,c.jsx)(wy.Fill,{children:(0,c.jsx)(Fn.ToolbarButton,{className:"comment-avatar-indicator",label:(0,fs.__)("View notes"),onClick:e,showTooltip:!0,children:(0,c.jsxs)(Fn.__experimentalHStack,{spacing:"1",children:[n.map((e=>(0,c.jsx)("img",{src:e.avatar,alt:e.name,className:"comment-avatar",style:{borderColor:nb(e.id)}},e.id))),o>0&&(0,c.jsx)(Fn.__experimentalText,{weight:500,children:r})]})})})};function ky({showCommentBoard:e,setShowCommentBoard:t,styles:s,comments:n,commentSidebarRef:o,reflowComments:r,commentLastUpdated:i,isFloating:a=!1}){const{onCreate:l,onEdit:p,onDelete:m}=function(e=tb){const{createNotice:t}=(0,d.useDispatch)(_s.store),{saveEntityRecord:s,deleteEntityRecord:n}=(0,d.useDispatch)(u.store),{getCurrentPostId:o}=(0,d.useSelect)(wc),{getBlockAttributes:r,getSelectedBlockClientId:i}=(0,d.useSelect)(g.store),{updateBlockAttributes:a}=(0,d.useDispatch)(g.store),l=e=>{const s=e.message&&"unknown_error"!==e.code?(0,Ln.decodeEntities)(e.message):(0,fs.__)("An error occurred while performing an update.");t("error",s,{type:"snackbar",isDismissible:!0})};return{onCreate:async({content:n,parent:c})=>{try{const l=await s("root","comment",{post:o(),content:n,status:"hold",type:"note",parent:c||0},{throwOnError:!0});if(!c&&l?.id){const e=i(),t=r(e)?.metadata;a(e,{metadata:{...t,noteId:l.id}})}return t("snackbar",c?(0,fs.__)("Reply added."):(0,fs.__)("Note added."),{type:"snackbar",isDismissible:!0}),setTimeout(e,300),l}catch(t){e(),l(t)}},onEdit:async({id:n,content:r,status:i})=>{const a=i||"updated",c={approved:(0,fs.__)("Note marked as resolved."),hold:(0,fs.__)("Note reopened."),updated:(0,fs.__)("Note updated.")};try{if("approved"===i||"hold"===i){await s("root","comment",{id:n,status:i},{throwOnError:!0});const e={post:o(),content:r||"",type:"note",status:i,parent:n,meta:{_wp_note_status:"approved"===i?"resolved":"reopen"}};await s("root","comment",e,{throwOnError:!0})}else{const e={id:n,content:r,status:i};await s("root","comment",e,{throwOnError:!0})}t("snackbar",c[a]??(0,fs.__)("Note updated."),{type:"snackbar",isDismissible:!0}),e()}catch(t){e(),l(t)}},onDelete:async s=>{try{if(await n("root","comment",s.id,void 0,{throwOnError:!0}),!s.parent){const e=i(),t=r(e)?.metadata;a(e,{metadata:dy({...t,noteId:void 0})})}t("snackbar",(0,fs.__)("Note deleted."),{type:"snackbar",isDismissible:!0}),e()}catch(t){e(),l(t)}}}}(r);return(0,c.jsx)(Fn.__experimentalVStack,{className:"editor-collab-sidebar-panel",style:s,role:"tree",spacing:"3",justify:"flex-start",ref:e=>{e&&(o.current=e)},"aria-label":a?(0,fs.__)("Unresolved notes"):(0,fs.__)("All notes"),children:(0,c.jsx)(_y,{threads:n,onEditComment:p,onAddReply:l,onCommentDelete:m,showCommentBoard:e,setShowCommentBoard:t,commentSidebarRef:o,reflowComments:r,commentLastUpdated:i,isFloating:a})})}function Cy({postId:e,mode:t}){const[s,n]=(0,p.useState)(!1),{getActiveComplementaryArea:o}=(0,d.useSelect)(Ea),{enableComplementaryArea:r}=(0,d.useDispatch)(Ea),{toggleBlockSpotlight:i}=$((0,d.useDispatch)(g.store)),a=(0,m.useViewportMatch)("medium"),l=(0,p.useRef)(null),h=a&&"post-only"===t,{clientId:_,blockCommentId:f,isDistractionFree:b}=(0,d.useSelect)((e=>{const{getBlockAttributes:t,getSelectedBlockClientId:s,getSettings:n}=e(g.store),o=s();return{clientId:o,blockCommentId:o?t(o)?.metadata?.noteId:null,isDistractionFree:n().isDistractionFree}}),[]),{resultComments:y,unresolvedSortedThreads:x,reflowComments:v,commentLastUpdated:w}=function(e){const[t,s]=(0,p.useReducer)((()=>Date.now()),0),n={post:e,type:"note",status:"all",per_page:-1},{records:o}=(0,u.useEntityRecords)("root","comment",n,{enabled:!!e&&"number"==typeof e}),{getBlockAttributes:r}=(0,d.useSelect)(g.store),{clientIds:i}=(0,d.useSelect)((e=>{const{getClientIdsWithDescendants:t}=e(g.store);return{clientIds:t()}}),[]),{resultComments:a,unresolvedSortedThreads:l}=(0,p.useMemo)((()=>{if(!o||0===o.length)return{resultComments:[],unresolvedSortedThreads:[]};const e=i.reduce(((e,t)=>{const s=r(t)?.metadata?.noteId;return s&&(e[t]=s),e}),{}),t={},s=[];if(o.forEach((s=>{const n=Object.keys(e).find((t=>e[t]===s.id));t[s.id]={...s,reply:[],blockClientId:0===s.parent?n:null}})),o.forEach((e=>{0===e.parent?s.push(t[e.id]):t[e.parent]&&t[e.parent].reply.push(t[e.id])})),0===s?.length)return{resultComments:[],unresolvedSortedThreads:[]};const n=s.map((e=>({...e,reply:[...e.reply].reverse()}))),a=new Map(n.map((e=>[String(e.id),e]))),l=new Set(Object.values(e).map((e=>String(e)))),c=Object.values(e).map((e=>a.get(String(e)))).filter((e=>void 0!==e&&"hold"===e.status)),d=Object.values(e).map((e=>a.get(String(e)))).filter((e=>void 0!==e&&"approved"===e.status)),u=n.filter((e=>!l.has(String(e.id))));return{resultComments:[...c,...d,...u],unresolvedSortedThreads:c}}),[i,o,r]);return{resultComments:a,unresolvedSortedThreads:l,reflowComments:s,commentLastUpdated:t}}(e);!function(e=!1){const t=(0,d.useRegistry)();(0,p.useEffect)((()=>{if(!e)return;const{getActiveComplementaryArea:s}=t.select(Ea),{disableComplementaryArea:n,enableComplementaryArea:o}=t.dispatch(Ea),r=t.subscribe((()=>{null===s("core")&&o("core",Jf)}));return()=>{r(),s("core")===Jf&&n("core",Jf)}}),[e,t])}(h&&(x.length>0||s));const{merged:S}=Bi(),k=S?.styles?.color?.background,C=f?y.find((e=>e.id===f)):null,P=y.length>0||!h;async function j(){const e=await o("core"),t=eb.find((t=>t===e));"approved"===C?.status?r("core",Xf):t||r("core",h?Jf:Xf);const s=await o("core");eb.includes(s)&&(n(!f),ob(f,l.current,f?void 0:"textarea"),i(_,!0))}return b?(0,c.jsx)(vy,{isDistractionFree:!0}):(0,c.jsxs)(c.Fragment,{children:[f&&(0,c.jsx)(Sy,{thread:C,onClick:j}),(0,c.jsx)(vy,{onClick:j}),P&&(0,c.jsx)(Nu,{identifier:Xf,name:Xf,title:(0,fs.__)("All notes"),header:(0,c.jsx)("h2",{className:"interface-complementary-area-header__title",children:(0,fs.__)("All notes")}),icon:Qf,closeLabel:(0,fs.__)("Close Notes"),children:(0,c.jsx)(ky,{comments:y,showCommentBoard:s,setShowCommentBoard:n,commentSidebarRef:l,reflowComments:v,commentLastUpdated:w})}),a&&(0,c.jsx)(Nu,{isPinnable:!1,header:!1,identifier:Jf,className:"editor-collab-sidebar",headerClassName:"editor-collab-sidebar__header",backgroundColor:k,children:(0,c.jsx)(ky,{comments:x,showCommentBoard:s,setShowCommentBoard:n,commentSidebarRef:l,reflowComments:v,commentLastUpdated:w,styles:{backgroundColor:k},isFloating:!0})})]})}function Py(){const{postId:e,mode:t,editorMode:s}=(0,d.useSelect)((e=>{const{getCurrentPostId:t,getRenderingMode:s,getEditorMode:n}=e(wc);return{postId:t(),mode:s(),editorMode:n()}}),[]);return e&&"number"==typeof e?"text"===s?null:(0,c.jsx)(Id,{supportKeys:"editor.notes",children:(0,c.jsx)(Cy,{postId:e,mode:t})}):null}var jy=function({postType:e,postId:t,templateId:s,settings:n,children:o,initialEdits:r,onActionPerformed:i,extraContent:a,extraSidebarPanels:l,...p}){const{post:m,template:h,hasLoadedPost:g,error:_}=(0,d.useSelect)((n=>{const{getEntityRecord:o,getResolutionError:r,hasFinishedResolution:i}=n(u.store),a=["postType",e,t];return{post:o(...a),template:s?o("postType",B,s):void 0,hasLoadedPost:i("getEntityRecord",a),error:r("getEntityRecord",a)?.message}}),[e,t,s]);return(0,c.jsxs)(c.Fragment,{children:[g&&!m&&(0,c.jsx)(Fn.Notice,{status:_?"error":"warning",isDismissible:!1,children:_||(0,fs.__)("You attempted to edit an item that doesn't exist. Perhaps it was deleted?")}),!!m&&(0,c.jsxs)(Dl,{post:m,__unstableTemplate:h,settings:n,initialEdits:r,useSubRegistry:!1,children:[(0,c.jsx)(nf,{...p,children:a}),o,(0,c.jsx)(Kf,{onActionPerformed:i,extraPanels:l}),(0,c.jsx)(Py,{})]})]})};const{PreferenceBaseOption:Ey}=$(C.privateApis);function Ty(e){const t=(0,d.useSelect)((e=>e(wc).isPublishSidebarEnabled()),[]),{enablePublishSidebar:s,disablePublishSidebar:n}=(0,d.useDispatch)(wc);return(0,c.jsx)(Ey,{isChecked:t,onChange:e=>e?s():n(),...e})}const{BlockManager:By}=$(g.privateApis),Iy=[];function Ny(){const{showBlockTypes:e,hideBlockTypes:t}=$((0,d.useDispatch)(wc)),{blockTypes:s,allowedBlockTypes:n,hiddenBlockTypes:o}=(0,d.useSelect)((e=>({blockTypes:e(x.store).getBlockTypes(),allowedBlockTypes:e(wc).getEditorSettings().allowedBlockTypes,hiddenBlockTypes:e(C.store).get("core","hiddenBlockTypes")??Iy})),[]),r=(0,p.useMemo)((()=>!0===n?s:s.filter((({name:e})=>n?.includes(e)))),[n,s]).filter((e=>(0,x.hasBlockSupport)(e,"inserter",!0)&&(!e.parent||e.parent.includes("core/post-content")))),i=o.filter((e=>r.some((t=>t.name===e)))),a=r.filter((e=>!i.includes(e.name))),l=r.length-a.length;const u=s=>{if(a.length>s.length){const e=a.filter((e=>!s.find((({name:t})=>t===e.name))));t(e.map((({name:e})=>e)))}else if(a.length<s.length){const t=s.filter((e=>!a.find((({name:t})=>t===e.name))));e(t.map((({name:e})=>e)))}};return(0,c.jsxs)("div",{className:"editor-block-visibility",children:[!!l&&(0,c.jsxs)("div",{className:"editor-block-visibility__disabled-blocks-count",children:[(0,fs.sprintf)((0,fs._n)("%d block is hidden.","%d blocks are hidden.",l),l),(0,c.jsx)(Fn.Button,{__next40pxDefaultSize:!0,variant:"link",onClick:function(){u(r)},children:(0,fs.__)("Reset")})]}),(0,c.jsx)(By,{blockTypes:r,selectedBlockTypes:a,onChange:u,showSelectAll:!1})]})}const{PreferencesModal:Ry,PreferencesModalTabs:Dy,PreferencesModalSection:Ay,PreferenceToggleControl:My}=$(C.privateApis);function Ly({extraSections:e={}}){const t=(0,m.useViewportMatch)("medium"),s=(0,d.useSelect)((e=>{const{getEditorSettings:s}=e(wc),{get:n}=e(C.store),o=s().richEditingEnabled;return!n("core","distractionFree")&&t&&o}),[t]),{setIsListViewOpened:n,setIsInserterOpened:o}=(0,d.useDispatch)(wc),{set:r}=(0,d.useDispatch)(C.store),i=(0,p.useMemo)((()=>[{name:"general",tabLabel:(0,fs.__)("General"),content:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(Ay,{title:(0,fs.__)("Interface"),children:[(0,c.jsx)(My,{scope:"core",featureName:"showListViewByDefault",help:(0,fs.__)("Opens the List View panel by default."),label:(0,fs.__)("Always open List View")}),s&&(0,c.jsx)(My,{scope:"core",featureName:"showBlockBreadcrumbs",help:(0,fs.__)("Display the block hierarchy trail at the bottom of the editor."),label:(0,fs.__)("Show block breadcrumbs")}),(0,c.jsx)(My,{scope:"core",featureName:"allowRightClickOverrides",help:(0,fs.__)("Allows contextual List View menus via right-click, overriding browser defaults."),label:(0,fs.__)("Allow right-click contextual menus")}),(0,c.jsx)(My,{scope:"core",featureName:"enableChoosePatternModal",help:(0,fs.__)("Shows starter patterns when creating a new page."),label:(0,fs.__)("Show starter patterns")})]}),(0,c.jsxs)(Ay,{title:(0,fs.__)("Document settings"),description:(0,fs.__)("Select what settings are shown in the document panel."),children:[(0,c.jsx)(pu.Slot,{}),(0,c.jsx)(uh,{taxonomyWrapper:(e,t)=>(0,c.jsx)(lu,{label:t.labels.menu_name,panelName:`taxonomy-panel-${t.slug}`})}),(0,c.jsx)(_p,{children:(0,c.jsx)(lu,{label:(0,fs.__)("Featured image"),panelName:"featured-image"})}),(0,c.jsx)(rp,{children:(0,c.jsx)(lu,{label:(0,fs.__)("Excerpt"),panelName:"post-excerpt"})}),(0,c.jsx)(Id,{supportKeys:["comments","trackbacks"],children:(0,c.jsx)(lu,{label:(0,fs.__)("Discussion"),panelName:"discussion-panel"})}),(0,c.jsx)(Bd,{children:(0,c.jsx)(lu,{label:(0,fs.__)("Page attributes"),panelName:"page-attributes"})})]}),t&&(0,c.jsx)(Ay,{title:(0,fs.__)("Publishing"),children:(0,c.jsx)(Ty,{help:(0,fs.__)("Review settings, such as visibility and tags."),label:(0,fs.__)("Enable pre-publish checks")})}),e?.general]})},{name:"appearance",tabLabel:(0,fs.__)("Appearance"),content:(0,c.jsxs)(Ay,{title:(0,fs.__)("Appearance"),description:(0,fs.__)("Customize the editor interface to suit your needs."),children:[(0,c.jsx)(My,{scope:"core",featureName:"fixedToolbar",onToggle:()=>r("core","distractionFree",!1),help:(0,fs.__)("Access all block and document tools in a single place."),label:(0,fs.__)("Top toolbar")}),(0,c.jsx)(My,{scope:"core",featureName:"distractionFree",onToggle:()=>{r("core","fixedToolbar",!0),o(!1),n(!1)},help:(0,fs.__)("Reduce visual distractions by hiding the toolbar and other elements to focus on writing."),label:(0,fs.__)("Distraction free")}),(0,c.jsx)(My,{scope:"core",featureName:"focusMode",help:(0,fs.__)("Highlights the current block and fades other content."),label:(0,fs.__)("Spotlight mode")}),e?.appearance]})},{name:"accessibility",tabLabel:(0,fs.__)("Accessibility"),content:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ay,{title:(0,fs.__)("Navigation"),description:(0,fs.__)("Optimize the editing experience for enhanced control."),children:(0,c.jsx)(My,{scope:"core",featureName:"keepCaretInsideBlock",help:(0,fs.__)("Keeps the text cursor within blocks while navigating with arrow keys, preventing it from moving to other blocks and enhancing accessibility for keyboard users."),label:(0,fs.__)("Contain text cursor inside block")})}),(0,c.jsx)(Ay,{title:(0,fs.__)("Interface"),children:(0,c.jsx)(My,{scope:"core",featureName:"showIconLabels",label:(0,fs.__)("Show button text labels"),help:(0,fs.__)("Show text instead of icons on buttons across the interface.")})})]})},{name:"blocks",tabLabel:(0,fs.__)("Blocks"),content:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ay,{title:(0,fs.__)("Inserter"),children:(0,c.jsx)(My,{scope:"core",featureName:"mostUsedBlocks",help:(0,fs.__)("Adds a category with the most frequently used blocks in the inserter."),label:(0,fs.__)("Show most used blocks")})}),(0,c.jsx)(Ay,{title:(0,fs.__)("Manage block visibility"),description:(0,fs.__)("Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later."),children:(0,c.jsx)(Ny,{})})]})},window.__experimentalMediaProcessing&&{name:"media",tabLabel:(0,fs.__)("Media"),content:(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)(Ay,{title:(0,fs.__)("General"),description:(0,fs.__)("Customize options related to the media upload flow."),children:[(0,c.jsx)(My,{scope:"core/media",featureName:"optimizeOnUpload",help:(0,fs.__)("Compress media items before uploading to the server."),label:(0,fs.__)("Pre-upload compression")}),(0,c.jsx)(My,{scope:"core/media",featureName:"requireApproval",help:(0,fs.__)("Require approval step when optimizing existing media."),label:(0,fs.__)("Approval step")})]})})}].filter(Boolean)),[s,e,o,n,r,t]);return(0,c.jsx)(Dy,{sections:i})}var Oy=function({postType:e}){const{registerPostTypeSchema:t}=$((0,d.useDispatch)(wc));(0,p.useEffect)((()=>{t(e)}),[t,e]);const{fields:s}=(0,d.useSelect)((t=>{const{getEntityFields:s}=$(t(wc));return{fields:s("postType",e)}}),[e]);return s};const Fy="content";var Vy={name:"core/pattern-overrides",getValues({select:e,clientId:t,context:s,bindings:n}){const o=s["pattern/overrides"],{getBlockAttributes:r}=e(g.store),i=r(t),a={};for(const e of Object.keys(n)){const t=o?.[i?.metadata?.name]?.[e];void 0!==t?a[e]=""===t?void 0:t:a[e]=i[e]}return a},setValues({select:e,dispatch:t,clientId:s,bindings:n}){const{getBlockAttributes:o,getBlockParentsByBlockName:r,getBlocks:i}=e(g.store),a=o(s),l=a?.metadata?.name;if(!l)return;const[c]=r(s,"core/block",!0),d=Object.entries(n).reduce(((e,[t,{newValue:s}])=>(e[t]=s,e)),{});if(!c){const e=s=>{for(const n of s)n.attributes?.metadata?.name===l&&t(g.store).updateBlockAttributes(n.clientId,d),e(n.innerBlocks)};return void e(i())}const u=o(c)?.[Fy];t(g.store).updateBlockAttributes(c,{[Fy]:{...u,[l]:{...u?.[l],...Object.entries(d).reduce(((e,[t,s])=>(e[t]=void 0===s?"":s,e)),{})}}})},canUserEditValue:()=>!0};const Uy=["core/navigation-link","core/navigation-submenu"],Hy=[{label:(0,fs.__)("Post Date"),args:{field:"date"},type:"string"},{label:(0,fs.__)("Post Modified Date"),args:{field:"modified"},type:"string"},{label:(0,fs.__)("Post Link"),args:{field:"link"},type:"string"}];var zy={name:"core/post-data",getValues({select:e,context:t,bindings:s,clientId:n}){const o=Hy.map((e=>e.args.field)),{getBlockAttributes:r,getBlockName:i}=e(g.store),a=i?.(n);let l,c;if(Uy.includes(a)){const e=r?.(n);l=e?.id,c=e?.type}else l=t?.postId,c=t?.postType;const{getEditedEntityRecord:d}=e(u.store),p=d("postType",c,l),m={};for(const[e,t]of Object.entries(s))o.includes(t.args.field)?m[e]=p?.[t.args.field]??Hy.find((e=>e.args.field===t.args.field)).label:m[e]={};return m},setValues({dispatch:e,context:t,bindings:s,clientId:n,select:o}){const{getBlockName:r}=o(g.store),i=r?.(n);if(Uy.includes(i))return!1;const a={};Object.values(s).forEach((({args:e,newValue:t})=>{a[e.field]=t})),e(u.store).editEntityRecord("postType",t?.postType,t?.postId,a)},canUserEditValue({select:e,context:t}){const{getBlockName:s,getSelectedBlockClientId:n}=e(g.store),o=n(),r=s?.(o);if(Uy.includes(r))return!1;if(t?.query||t?.queryId)return!1;if(!t?.postType)return!1;return!!e(u.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId})},getFieldsList({select:e}){const t=e(g.store).getSelectedBlock();return"core/post-date"!==t?.name||Uy.includes(t?.name)?[]:Hy}};function Gy(e,t){const{getRegisteredPostMeta:s}=$(e(u.store)),n=s(t?.postType),o=[];return Object.entries(n).forEach((([e,t])=>{"footnotes"!==e&&"_"!==e.charAt(0)&&o.push({label:t.title||e,args:{key:e},default:t.default,type:t.type})})),o}function $y({select:e,context:t,args:s}){const n=Gy(e,t).find((e=>e.args.key===s.key));if(!n)return s.key;if(!t?.postId)return n.default||n.label||s.key;const{getEditedEntityRecord:o}=e(u.store),r=o("postType",t?.postType,t?.postId).meta;return r?.[s.key]??n?.label??s.key}var Wy={name:"core/post-meta",getValues({select:e,context:t,bindings:s}){const n={};for(const[o,r]of Object.entries(s))n[o]=$y({select:e,context:t,args:r.args});return n},setValues({dispatch:e,context:t,bindings:s}){const n={};Object.values(s).forEach((({args:e,newValue:t})=>{n[e.key]=t})),e(u.store).editEntityRecord("postType",t?.postType,t?.postId,{meta:n})},canUserEditValue({select:e,context:t,args:s}){if(t?.query||t?.queryId)return!1;if(!t?.postType)return!1;if(!Gy(e,t).some((e=>e.args.key===s.key)))return!1;if(e(wc).getEditorSettings().enableCustomFields)return!1;return!!e(u.store).canUser("update",{kind:"postType",name:t?.postType,id:t?.postId})},getFieldsList:({select:e,context:t})=>Gy(e,t).map((({default:e,...t})=>({...t})))};const Zy=["core/navigation-link","core/navigation-submenu"];function Yy(e,t){return{id:{label:(0,fs.__)("Term ID"),value:t,type:"string"},name:{label:(0,fs.__)("Name"),value:e?.name,type:"string"},slug:{label:(0,fs.__)("Slug"),value:e?.slug,type:"string"},link:{label:(0,fs.__)("Link"),value:e?.link,type:"string"},description:{label:(0,fs.__)("Description"),value:e?.description,type:"string"},parent:{label:(0,fs.__)("Parent ID"),value:e?.parent,type:"string"},count:{label:(0,fs.__)("Count"),value:`(${e?.count??0})`,type:"string"}}}function qy(e,t,s){const{getEntityRecord:n}=e(u.store),{getBlockAttributes:o,getBlockName:r}=e(g.store);let i,a;const l=r?.(s);let c,d;if(Zy.includes(l)){const e=o?.(s);c=e?.id;const t=e?.type;d="tag"===t?"post_tag":t}else c=t?.termId,d=t?.taxonomy;return d&&c?(i=n("taxonomy",d,c),!i&&t?.termData&&(i=t.termData),i&&(a=Yy(i,c))):t?.termData&&(i=t.termData,a=Yy(i,i?.term_id)),a&&Object.keys(a).length?a:null}var Ky={name:"core/term-data",usesContext:["taxonomy","termId","termData"],getValues({select:e,context:t,bindings:s,clientId:n}){const o=qy(e,t,n),r={};for(const[e,t]of Object.entries(s)){const s=t.args.field,{value:n,label:i}=o?.[s]||{};r[e]=n??i??s}return r},setValues:({dispatch:e,context:t,bindings:s})=>!1,canUserEditValue({select:e,context:t,args:s}){const{getBlockName:n,getSelectedBlockClientId:o}=e(g.store),r=o(),i=n?.(r);if(Zy.includes(i))return!1;if(t?.termQuery)return!1;if(!t?.taxonomy||!t?.termId)return!1;qy(e,t,void 0)?.[s.field];return!1},getFieldsList({select:e,context:t}){const s=e(g.store).getSelectedBlockClientId(),n=qy(e,t,s);return n?Object.entries(n).map((([e,t])=>({label:t.label,type:t.type,args:{field:e}}))):[]}};const{store:Qy,...Xy}=i,Jy={};function ex(e,t,s){const{registerEntityAction:n}=$((0,d.dispatch)(wc))}function tx(e,t,s){const{unregisterEntityAction:n}=$((0,d.dispatch)(wc))}function sx(e,t,s){const{registerEntityField:n}=$((0,d.dispatch)(wc))}function nx(e,t,s){const{unregisterEntityField:n}=$((0,d.dispatch)(wc))}G(Jy,{CreateTemplatePartModal:no,patternTitleField:oi,templateTitleField:ei,BackButton:Jg,EntitiesSavedStatesExtensible:vd,Editor:jy,EditorContentSlotFill:Yg,GlobalStylesProvider:function({children:e}){const t=Bi();return t.isReady?(0,c.jsx)(ji.Provider,{value:t,children:e}):null},mergeBaseAndUserConfigs:Ti,PluginPostExcerpt:cp,PostCardPanel:bf,PreferencesModal:function({extraSections:e={}}){const t=(0,d.useSelect)((e=>e(Ea).isModalActive("editor/preferences")),[]),{closeModal:s}=(0,d.useDispatch)(Ea);return t?(0,c.jsx)(Ry,{closeModal:s,children:(0,c.jsx)(Ly,{extraSections:e})}):null},usePostActions:df,usePostFields:Oy,ToolsMoreMenuGroup:p_,ViewMoreMenuGroup:g_,ResizableEditor:H_,registerCoreBlockBindingsSources:function(){(0,x.registerBlockBindingsSource)(Vy),(0,x.registerBlockBindingsSource)(zy),(0,x.registerBlockBindingsSource)(Wy),(0,x.registerBlockBindingsSource)(Ky)},getTemplateInfo:Y,interfaceStore:Qy,...Xy})})(),(window.wp=window.wp||{}).editor=n})();
\ No newline at end of file
diff --git a/wp-includes/js/dist/format-library.js b/wp-includes/js/dist/format-library.js
index 9b8ce81a03..23c994ef1e 100644
--- a/wp-includes/js/dist/format-library.js
+++ b/wp-includes/js/dist/format-library.js
@@ -1913,7 +1913,8 @@ function math_InlineUI({
value: latex,
onChange: handleLatexChange,
placeholder: (0,external_wp_i18n_namespaceObject.__)("e.g., x^2, \\frac{a}{b}"),
- autoComplete: "off"
+ autoComplete: "off",
+ className: "block-editor-format-toolbar__math-input"
}
),
error && /* @__PURE__ */ (0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, { children: [
diff --git a/wp-includes/js/dist/format-library.min.js b/wp-includes/js/dist/format-library.min.js
index 2bfb94d409..031a842e79 100644
--- a/wp-includes/js/dist/format-library.min.js
+++ b/wp-includes/js/dist/format-library.min.js
@@ -1,2 +1,2 @@
/*! This file is auto-generated */
-(()=>{"use strict";var e,t,n={3533:e=>{e.exports=window.wp.latexToMathml}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,a.d(r,s),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const r=window.wp.richText,s=window.ReactJSXRuntime,i=window.wp.i18n,l=window.wp.blockEditor,c=window.wp.primitives;var u=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"})});const h=window.wp.privateApis,{lock:p,unlock:m}=(0,h.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/format-library"),{essentialFormatKey:d}=m(l.privateApis),g="core/bold",x=(0,i.__)("Bold"),v={name:g,title:x,tagName:"strong",className:null,[d]:!0,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:g,title:x}))}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"b",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{name:"bold",icon:u,title:x,onClick:function(){n((0,r.toggleFormat)(t,{type:g})),o()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:a})]})}};var f=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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"})});const b="core/code",_=(0,i.__)("Inline code"),w={name:b,title:_,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:n}=e;if("`"!==n[t-1])return e;if(t-2<0)return e;const o=n.lastIndexOf("`",t-2);if(-1===o)return e;const a=o,s=t-2;return a===s?e:(e=(0,r.remove)(e,a,a+1),e=(0,r.remove)(e,s,s+1),e=(0,r.applyFormat)(e,{type:b},a,s))},edit({value:e,onChange:t,onFocus:n,isActive:o}){function a(){t((0,r.toggleFormat)(e,{type:b,title:_})),n()}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"access",character:"x",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{icon:f,title:_,onClick:a,isActive:o,role:"menuitemcheckbox"})]})}},y=window.wp.components,j=window.wp.element,C=["image"],k="core/image",S=(0,i.__)("Inline image");function T(e){if(!e?.className)return;const[,t]=e.className.match(/wp-image-(\d+)/)??[];return t?parseInt(t,10):void 0}const A={name:k,title:S,keywords:[(0,i.__)("photo"),(0,i.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:t,onFocus:n,isObjectActive:o,activeObjectAttributes:a,contentRef:c}){return(0,s.jsxs)(l.MediaUploadCheck,{children:[(0,s.jsx)(l.MediaUpload,{allowedTypes:C,value:T(a),onSelect:({id:o,url:a,alt:s,width:i})=>{t((0,r.insertObject)(e,{type:k,attributes:{className:`wp-image-${o}`,style:`width: ${Math.min(i,150)}px;`,url:a,alt:s}})),n()},render:({open:e})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:(0,s.jsx)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(y.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})}),title:o?(0,i.__)("Replace image"):S,onClick:e,isActive:o})}),o&&(0,s.jsx)(F,{value:e,onChange:t,activeObjectAttributes:a,contentRef:c})]})}};function F({value:e,onChange:t,activeObjectAttributes:n,contentRef:o}){const{style:a,alt:l}=n,c=a?.replace(/\D/g,""),[u,h]=(0,j.useState)(c),[p,m]=(0,j.useState)(l),d=u!==c||p!==l,g=(0,r.useAnchor)({editableContentElement:o.current,settings:A});return(0,s.jsx)(y.Popover,{placement:"bottom",focusOnMount:!1,anchor:g,className:"block-editor-format-toolbar__image-popover",children:(0,s.jsx)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:o=>{const a=e.replacements.slice();a[e.start]={type:k,attributes:{...n,style:u?`width: ${u}px;`:"",alt:p}},t({...e,replacements:a}),o.preventDefault()},children:(0,s.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,s.jsx)(y.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Width"),value:u,min:1,onChange:e=>{h(e)}}),(0,s.jsx)(y.TextareaControl,{label:(0,i.__)("Alternative text"),__nextHasNoMarginBottom:!0,value:p,onChange:e=>{m(e)},help:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y.ExternalLink,{href:(0,i.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,i.__)("Describe the purpose of the image.")}),(0,s.jsx)("br",{}),(0,i.__)("Leave empty if decorative.")]})}),(0,s.jsx)(y.__experimentalHStack,{justify:"right",children:(0,s.jsx)(y.Button,{disabled:!d,accessibleWhenDisabled:!0,variant:"primary",type:"submit",size:"compact",children:(0,i.__)("Apply")})})]})})})}var N=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"})});const{essentialFormatKey:M}=m(l.privateApis),R="core/italic",V=(0,i.__)("Italic"),P={name:R,title:V,tagName:"em",className:null,[M]:!0,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:R,title:V}))}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"i",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{name:"italic",icon:N,title:V,onClick:function(){n((0,r.toggleFormat)(t,{type:R})),o()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:a})]})}},B=window.wp.url,L=window.wp.htmlEntities;var O=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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"})});const I=window.wp.a11y,H=window.wp.data;function z(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,B.getProtocol)(t);if(!(0,B.isValidProtocol)(e))return!1;if(e.startsWith("http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const n=(0,B.getAuthority)(t);if(!(0,B.isValidAuthority)(n))return!1;const o=(0,B.getPath)(t);if(o&&!(0,B.isValidPath)(o))return!1;const a=(0,B.getQueryString)(t);if(a&&!(0,B.isValidQueryString)(a))return!1;const r=(0,B.getFragment)(t);if(r&&!(0,B.isValidFragment)(r))return!1}return!(t.startsWith("#")&&!(0,B.isValidFragment)(t))}function E(e,t,n=e.start,o=e.end){const a={start:null,end:null},{formats:r}=e;let s,i;if(!r?.length)return a;const l=r.slice(),c=l[n]?.find((({type:e})=>e===t.type)),u=l[o]?.find((({type:e})=>e===t.type)),h=l[o-1]?.find((({type:e})=>e===t.type));if(c)s=c,i=n;else if(u)s=u,i=o;else{if(!h)return a;s=h,i=o-1}const p=l[i].indexOf(s),m=[l,i,s,p];return{start:n=(n=G(...m))<0?0:n,end:o=W(...m)}}function U(e,t,n,o,a){let r=t;const s={forwards:1,backwards:-1}[a]||1,i=-1*s;for(;e[r]&&e[r][o]===n;)r+=s;return r+=i,r}const D=(e,...t)=>(...n)=>e(...n,...t),G=D(U,"backwards"),W=D(U,"forwards"),Z=window.wp.compose,$=({setting:e,value:t,onChange:n})=>{const o=!!t&&t?.cssClasses?.length>0,[a,r]=(0,j.useState)(o),l=`css-classes-setting-${(0,Z.useInstanceId)($)}`,c=o=>{const a="string"==typeof o?o.replace(/,/g," ").replace(/\s+/g," ").trim():o;n({...t,[e.id]:a})};return(0,s.jsxs)("fieldset",{children:[(0,s.jsx)(y.VisuallyHidden,{as:"legend",children:e.title}),(0,s.jsxs)(y.__experimentalVStack,{spacing:3,children:[(0,s.jsx)(y.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,onChange:()=>{a?(o&&c(""),r(!1)):r(!0)},checked:a||o,"aria-expanded":a,"aria-controls":a?l:void 0}),a&&(0,s.jsx)("div",{id:l,children:(0,s.jsx)(y.__experimentalInputControl,{label:(0,i.__)("CSS classes"),value:t?.cssClasses,onChange:c,help:(0,i.__)("Separate multiple classes with spaces."),__unstableInputWidth:"100%",__next40pxDefaultSize:!0})})]})]})};var K=$;const Q=[...l.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,i.__)("Mark as nofollow")},{id:"cssClasses",title:(0,i.__)("Additional CSS class(es)"),render:(e,t,n)=>(0,s.jsx)(K,{setting:e,value:t,onChange:n})}];var X=function({isActive:e,activeAttributes:t,value:n,onChange:o,onFocusOutside:a,stopAddingLink:c,contentRef:u,focusOnMount:h}){const p=function(e,t){let n=e.start,o=e.end;if(t){const t=E(e,{type:"core/link"});n=t.start,o=t.end+1}return(0,r.slice)(e,n,o)}(n,e).text,{selectionChange:m}=(0,H.useDispatch)(l.store),{createPageEntity:d,userCanCreatePages:g,selectionStart:x}=(0,H.useSelect)((e=>{const{getSettings:t,getSelectionStart:n}=e(l.store),o=t();return{createPageEntity:o.__experimentalCreatePageEntity,userCanCreatePages:o.__experimentalUserCanCreatePages,selectionStart:n()}}),[]),v=(0,j.useMemo)((()=>({url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,nofollow:t.rel?.includes("nofollow"),title:p,cssClasses:t.class})),[t.class,t.id,t.rel,t.target,t.type,t.url,p]),f=(0,r.useAnchor)({editableContentElement:u.current,settings:{...ee,isActive:e}});return(0,s.jsx)(y.Popover,{anchor:f,animate:!1,onClose:c,onFocusOutside:a,placement:"bottom",offset:8,shift:!0,focusOnMount:h,constrainTabbing:!0,children:(0,s.jsx)(l.LinkControl,{value:v,onChange:function(t){const a=v?.url,s=!a;t={...v,...t};const l=(0,B.prependHTTP)(t.url),u=function({url:e,type:t,id:n,opensInNewWindow:o,nofollow:a,cssClasses:r}){const s={type:"core/link",attributes:{url:e}};t&&(s.attributes.type=t),n&&(s.attributes.id=n),o&&(s.attributes.target="_blank",s.attributes.rel=s.attributes.rel?s.attributes.rel+" noreferrer noopener":"noreferrer noopener"),a&&(s.attributes.rel=s.attributes.rel?s.attributes.rel+" nofollow":"nofollow");const i=r?.trim();return i?.length&&(s.attributes.class=i),s}({url:l,type:t.type,id:void 0!==t.id&&null!==t.id?String(t.id):void 0,opensInNewWindow:t.opensInNewTab,nofollow:t.nofollow,cssClasses:t.cssClasses}),h=t.title||l;let d;if((0,r.isCollapsed)(n)&&!e){const e=(0,r.insert)(n,h);return d=(0,r.applyFormat)(e,u,n.start,n.start+h.length),o(d),c(),void m({clientId:x.clientId,identifier:x.attributeKey,start:n.start+h.length+1})}if(h===p)d=(0,r.applyFormat)(n,u);else{d=(0,r.create)({text:h}),d=(0,r.applyFormat)(d,u,0,h.length);const e=E(n,{type:"core/link"}),[t,o]=(0,r.split)(n,e.start,e.start),a=(0,r.replace)(o,p,d);d=(0,r.concat)(t,a)}o(d),s||c(),z(l)?e?(0,I.speak)((0,i.__)("Link edited."),"assertive"):(0,I.speak)((0,i.__)("Link inserted."),"assertive"):(0,I.speak)((0,i.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=(0,r.removeFormat)(n,"core/link");o(e),c(),(0,I.speak)((0,i.__)("Link removed."),"assertive")},hasRichPreviews:!0,createSuggestion:d&&async function(e){const t=await d({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:g,createSuggestionButtonText:function(e){return(0,j.createInterpolateElement)((0,i.sprintf)((0,i.__)("Create page: <mark>%s</mark>"),e),{mark:(0,s.jsx)("mark",{})})},hasTextControl:!0,settings:Q,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})};const{essentialFormatKey:J}=m(l.privateApis),q="core/link",Y=(0,i.__)("Link");const ee={name:q,title:Y,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",_id:"id",target:"target",rel:"rel",class:"class"},[J]:!0,__unstablePasteRule(e,{html:t,plainText:n}){const o=(t||n).replace(/<[^>]+>/g,"").trim();if(!(0,B.isURL)(o)||!/^https?:/.test(o))return e;window.console.log("Created link:\n\n",o);const a={type:q,attributes:{url:(0,L.decodeEntities)(o)}};return(0,r.isCollapsed)(e)?(0,r.insert)(e,(0,r.applyFormat)((0,r.create)({text:n}),a,0,n.length)):(0,r.applyFormat)(e,a)},edit:function({isActive:e,activeAttributes:t,value:n,onChange:o,onFocus:a,contentRef:c}){const[u,h]=(0,j.useState)(!1),[p,m]=(0,j.useState)(null);function d(t){const a=(0,r.getTextContent)((0,r.slice)(n));!e&&a&&(0,B.isURL)(a)&&z(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:a}})):!e&&a&&(0,B.isEmail)(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:`mailto:${a}`}})):!e&&a&&(0,B.isPhoneNumber)(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:`tel:${a.replace(/\D/g,"")}`}})):(t&&m({el:t,action:null}),h(!0))}(0,j.useEffect)((()=>{e||h(!1)}),[e]),(0,j.useLayoutEffect)((()=>{const t=c.current;if(t)return t.addEventListener("click",n),()=>{t.removeEventListener("click",n)};function n(t){const n=t.target.closest("[contenteditable] a");n&&e&&(h(!0),m({el:n,action:"click"}))}}),[c,e]);const g=!("A"===p?.el?.tagName&&"click"===p?.action),x=!(0,r.isCollapsed)(n);return(0,s.jsxs)(s.Fragment,{children:[x&&(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"k",onUse:d}),(0,s.jsx)(l.RichTextShortcut,{type:"primaryShift",character:"k",onUse:function(){o((0,r.removeFormat)(n,q)),(0,I.speak)((0,i.__)("Link removed."),"assertive")}}),(0,s.jsx)(l.RichTextToolbarButton,{name:"link",icon:O,title:e?(0,i.__)("Link"):Y,onClick:e=>{d(e.currentTarget)},isActive:e||u,shortcutType:"primary",shortcutCharacter:"k","aria-haspopup":"true","aria-expanded":u}),u&&(0,s.jsx)(X,{stopAddingLink:function(){h(!1),"BUTTON"===p?.el?.tagName?p.el.focus():a(),m(null)},onFocusOutside:function(){h(!1),m(null)},isActive:e,activeAttributes:t,value:n,onChange:o,contentRef:c,focusOnMount:!!g&&"firstElement"})]})}};var te=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});const ne="core/strikethrough",oe=(0,i.__)("Strikethrough"),ae={name:ne,title:oe,tagName:"s",className:null,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:ne,title:oe})),o()}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"access",character:"d",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{icon:te,title:oe,onClick:a,isActive:e,role:"menuitemcheckbox"})]})}},re="core/underline",se=(0,i.__)("Underline"),ie={name:re,title:se,tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:t}){const n=()=>{t((0,r.toggleFormat)(e,{type:re,attributes:{style:"text-decoration: underline;"},title:se}))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"u",onUse:n}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:n})]})}};var le=(0,j.forwardRef)((({icon:e,size:t=24,...n},o)=>(0,j.cloneElement)(e,{width:t,height:t,...n,ref:o}))),ce=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})}),ue=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})});const{Tabs:he}=m(y.privateApis),pe=[{name:"color",title:(0,i.__)("Text")},{name:"backgroundColor",title:(0,i.__)("Background")}];function me(e=""){return e.split(";").reduce(((e,t)=>{if(t){const[n,o]=t.split(":");"color"===n&&(e.color=o),"background-color"===n&&o!==fe&&(e.backgroundColor=o)}return e}),{})}function de(e="",t){return e.split(" ").reduce(((e,n)=>{if(n.startsWith("has-")&&n.endsWith("-color")){const o=n.replace(/^has-/,"").replace(/-color$/,""),a=(0,l.getColorObjectByAttributeValues)(t,o);e.color=a.color}return e}),{})}function ge(e,t,n){const o=(0,r.getActiveFormat)(e,t);return o?{...me(o.attributes.style),...de(o.attributes.class,n)}:{}}function xe({name:e,property:t,value:n,onChange:o}){const a=(0,H.useSelect)((e=>{const{getSettings:t}=e(l.store);return t().colors??[]}),[]),i=(0,j.useMemo)((()=>ge(n,e,a)),[e,n,a]);return(0,s.jsx)(l.ColorPalette,{value:i[t],onChange:s=>{o(function(e,t,n,o){const{color:a,backgroundColor:s}={...ge(e,t,n),...o};if(!a&&!s)return(0,r.removeFormat)(e,t);const i=[],c=[],u={};if(s?i.push(["background-color",s].join(":")):i.push(["background-color",fe].join(":")),a){const e=(0,l.getColorObjectByColorValue)(n,a);e?c.push((0,l.getColorClassName)("color",e.slug)):i.push(["color",a].join(":"))}return i.length&&(u.style=i.join(";")),c.length&&(u.class=c.join(" ")),(0,r.applyFormat)(e,{type:t,attributes:u})}(n,e,a,{[t]:s}))},enableAlpha:!0,__experimentalIsRenderedInSidebar:!0})}function ve({name:e,value:t,onChange:n,onClose:o,contentRef:a,isActive:i}){const l=(0,r.useAnchor)({editableContentElement:a.current,settings:{...je,isActive:i}});return(0,s.jsx)(y.Popover,{onClose:o,className:"format-library__inline-color-popover",anchor:l,children:(0,s.jsxs)(he,{children:[(0,s.jsx)(he.TabList,{children:pe.map((e=>(0,s.jsx)(he.Tab,{tabId:e.name,children:e.title},e.name)))}),pe.map((o=>(0,s.jsx)(he.TabPanel,{tabId:o.name,focusable:!1,children:(0,s.jsx)(xe,{name:e,property:o.name,value:t,onChange:n})},o.name)))]})})}const fe="rgba(0, 0, 0, 0)",be="core/text-color",_e=(0,i.__)("Highlight"),we=[];function ye(e,t){const{ownerDocument:n}=e,{defaultView:o}=n,a=o.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&a===fe&&e.parentElement?ye(e.parentElement,t):a}const je={name:be,title:_e,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function({value:e,onChange:t,isActive:n,activeAttributes:o,contentRef:a}){const[i,c=we]=(0,l.useSettings)("color.custom","color.palette"),[u,h]=(0,j.useState)(!1),p=(0,j.useMemo)((()=>function(e,{color:t,backgroundColor:n}){if(t||n)return{color:t||ye(e,"color"),backgroundColor:n===fe?ye(e,"background-color"):n}}(a.current,ge(e,be,c))),[a,e,c]),m=!!c.length||i;return m||n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:n,icon:(0,s.jsx)(le,{icon:Object.keys(o).length?ce:ue,style:p}),title:_e,onClick:m?()=>h(!0):()=>t((0,r.removeFormat)(e,be)),role:"menuitemcheckbox"}),u&&(0,s.jsx)(ve,{name:be,onClose:()=>h(!1),activeAttributes:o,value:e,onChange:t,contentRef:a,isActive:n})]}):null}};var Ce=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})});const ke="core/subscript",Se=(0,i.__)("Subscript"),Te={name:ke,title:Se,tagName:"sub",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Ce,title:Se,onClick:function(){n((0,r.toggleFormat)(t,{type:ke,title:Se})),o()},isActive:e,role:"menuitemcheckbox"})};var Ae=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})});const Fe="core/superscript",Ne=(0,i.__)("Superscript"),Me={name:Fe,title:Ne,tagName:"sup",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Ae,title:Ne,onClick:function(){n((0,r.toggleFormat)(t,{type:Fe,title:Ne})),o()},isActive:e,role:"menuitemcheckbox"})};var Re=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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 Ve="core/keyboard",Pe=(0,i.__)("Keyboard input"),Be={name:Ve,title:Pe,tagName:"kbd",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Re,title:Pe,onClick:function(){n((0,r.toggleFormat)(t,{type:Ve,title:Pe})),o()},isActive:e,role:"menuitemcheckbox"})};var Le=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})});const Oe="core/unknown",Ie=(0,i.__)("Clear Unknown Formatting");const He={name:Oe,title:Ie,tagName:"*",className:null,edit({isActive:e,value:t,onChange:n,onFocus:o}){if(!e&&!function(e){return!(0,r.isCollapsed)(e)&&(0,r.slice)(e).formats.some((e=>e.some((e=>e.type===Oe))))}(t))return null;return(0,s.jsx)(l.RichTextToolbarButton,{name:"unknown",icon:Le,title:Ie,onClick:function(){n((0,r.removeFormat)(t,Oe)),o()},isActive:!0})}};var ze=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z"})});const Ee="core/language",Ue=(0,i.__)("Language"),De={name:Ee,tagName:"bdo",className:null,edit:function({isActive:e,value:t,onChange:n,contentRef:o}){const[a,i]=(0,j.useState)(!1),c=()=>{i((e=>!e))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{icon:ze,label:Ue,title:Ue,onClick:()=>{e?n((0,r.removeFormat)(t,Ee)):c()},isActive:e,role:"menuitemcheckbox"}),a&&(0,s.jsx)(Ge,{value:t,onChange:n,onClose:c,contentRef:o})]})},title:Ue};function Ge({value:e,contentRef:t,onChange:n,onClose:o}){const a=(0,r.useAnchor)({editableContentElement:t.current,settings:De}),[l,c]=(0,j.useState)(""),[u,h]=(0,j.useState)("ltr");return(0,s.jsx)(y.Popover,{className:"block-editor-format-toolbar__language-popover",anchor:a,onClose:o,children:(0,s.jsxs)(y.__experimentalVStack,{as:"form",spacing:4,className:"block-editor-format-toolbar__language-container-content",onSubmit:t=>{t.preventDefault(),n((0,r.applyFormat)(e,{type:Ee,attributes:{lang:l,dir:u}})),o()},children:[(0,s.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:Ue,value:l,onChange:e=>c(e),help:(0,i.__)('A valid language attribute, like "en" or "fr".')}),(0,s.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Text direction"),value:u,options:[{label:(0,i.__)("Left to right"),value:"ltr"},{label:(0,i.__)("Right to left"),value:"rtl"}],onChange:e=>h(e)}),(0,s.jsx)(y.__experimentalHStack,{alignment:"right",children:(0,s.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",text:(0,i.__)("Apply")})})]})})}var We=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});const{Badge:Ze}=m(y.privateApis),$e="core/math",Ke=(0,i.__)("Math");function Qe({value:e,onChange:t,activeAttributes:n,contentRef:o,latexToMathML:a}){const[l,c]=(0,j.useState)(n?.["data-latex"]||""),[u,h]=(0,j.useState)(null),p=(0,r.useAnchor)({editableContentElement:o.current,settings:Xe});return(0,s.jsx)(y.Popover,{placement:"bottom-start",offset:8,focusOnMount:!1,anchor:p,className:"block-editor-format-toolbar__math-popover",children:(0,s.jsx)("div",{style:{minWidth:"300px",padding:"4px"},children:(0,s.jsxs)(y.__experimentalVStack,{spacing:1,children:[(0,s.jsx)(y.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,i.__)("LaTeX math syntax"),value:l,onChange:n=>{let o;c(n);try{o=a(n,{displayMode:!1}),h(null)}catch(e){return void h(e.message)}const r=e.replacements.slice();r[e.start]={type:$e,attributes:{"data-latex":n},innerHTML:o},t({...e,replacements:r})},placeholder:(0,i.__)("e.g., x^2, \\frac{a}{b}"),autoComplete:"off"}),u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ze,{intent:"error",className:"wp-block-math__error",children:u}),(0,s.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})}const Xe={name:$e,title:Ke,tagName:"math",className:null,attributes:{"data-latex":"data-latex"},contentEditable:!1,edit:function({value:e,onChange:t,onFocus:n,isObjectActive:o,activeObjectAttributes:i,contentRef:c}){const[u,h]=(0,j.useState)();return(0,j.useEffect)((()=>{Promise.resolve().then(a.t.bind(a,3533,23)).then((e=>{h((()=>e.default))}))}),[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{icon:We,title:Ke,onClick:()=>{const o=(0,r.insertObject)(e,{type:$e,attributes:{"data-latex":""},innerHTML:""});o.start=o.end-1,t(o),n()},isActive:o}),o&&(0,s.jsx)(Qe,{value:e,onChange:t,activeAttributes:i,contentRef:c,latexToMathML:u})]})}},Je=(0,i.__)("Non breaking space");[v,w,A,P,ee,ae,ie,je,Te,Me,Be,He,De,Xe,{name:"core/non-breaking-space",title:Je,tagName:"nbsp",className:null,edit:({value:e,onChange:t})=>(0,s.jsx)(l.RichTextShortcut,{type:"primaryShift",character:" ",onUse:function(){t((0,r.insert)(e," "))}})}].forEach((({name:e,...t})=>(0,r.registerFormatType)(e,t))),(window.wp=window.wp||{}).formatLibrary={}})();
\ No newline at end of file
+(()=>{"use strict";var e,t,n={3533:e=>{e.exports=window.wp.latexToMathml}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,a),r.exports}t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var r=Object.create(null);a.r(r);var s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,a.d(r,s),r},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const r=window.wp.richText,s=window.ReactJSXRuntime,i=window.wp.i18n,l=window.wp.blockEditor,c=window.wp.primitives;var u=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M14.7 11.3c1-.6 1.5-1.6 1.5-3 0-2.3-1.3-3.4-4-3.4H7v14h5.8c1.4 0 2.5-.3 3.3-1 .8-.7 1.2-1.7 1.2-2.9.1-1.9-.8-3.1-2.6-3.7zm-5.1-4h2.3c.6 0 1.1.1 1.4.4.3.3.5.7.5 1.2s-.2 1-.5 1.2c-.3.3-.8.4-1.4.4H9.6V7.3zm4.6 9c-.4.3-1 .4-1.7.4H9.6v-3.9h2.9c.7 0 1.3.2 1.7.5.4.3.6.8.6 1.5s-.2 1.2-.6 1.5z"})});const h=window.wp.privateApis,{lock:p,unlock:m}=(0,h.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/format-library"),{essentialFormatKey:d}=m(l.privateApis),g="core/bold",x=(0,i.__)("Bold"),v={name:g,title:x,tagName:"strong",className:null,[d]:!0,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:g,title:x}))}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"b",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{name:"bold",icon:u,title:x,onClick:function(){n((0,r.toggleFormat)(t,{type:g})),o()},isActive:e,shortcutType:"primary",shortcutCharacter:"b"}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatBold",onInput:a})]})}};var f=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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"})});const b="core/code",_=(0,i.__)("Inline code"),w={name:b,title:_,tagName:"code",className:null,__unstableInputRule(e){const{start:t,text:n}=e;if("`"!==n[t-1])return e;if(t-2<0)return e;const o=n.lastIndexOf("`",t-2);if(-1===o)return e;const a=o,s=t-2;return a===s?e:(e=(0,r.remove)(e,a,a+1),e=(0,r.remove)(e,s,s+1),e=(0,r.applyFormat)(e,{type:b},a,s))},edit({value:e,onChange:t,onFocus:n,isActive:o}){function a(){t((0,r.toggleFormat)(e,{type:b,title:_})),n()}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"access",character:"x",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{icon:f,title:_,onClick:a,isActive:o,role:"menuitemcheckbox"})]})}},y=window.wp.components,j=window.wp.element,C=["image"],k="core/image",S=(0,i.__)("Inline image");function T(e){if(!e?.className)return;const[,t]=e.className.match(/wp-image-(\d+)/)??[];return t?parseInt(t,10):void 0}const A={name:k,title:S,keywords:[(0,i.__)("photo"),(0,i.__)("media")],object:!0,tagName:"img",className:null,attributes:{className:"class",style:"style",url:"src",alt:"alt"},edit:function({value:e,onChange:t,onFocus:n,isObjectActive:o,activeObjectAttributes:a,contentRef:c}){return(0,s.jsxs)(l.MediaUploadCheck,{children:[(0,s.jsx)(l.MediaUpload,{allowedTypes:C,value:T(a),onSelect:({id:o,url:a,alt:s,width:i})=>{t((0,r.insertObject)(e,{type:k,attributes:{className:`wp-image-${o}`,style:`width: ${Math.min(i,150)}px;`,url:a,alt:s}})),n()},render:({open:e})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:(0,s.jsx)(y.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(y.Path,{d:"M4 18.5h16V17H4v1.5zM16 13v1.5h4V13h-4zM5.1 15h7.8c.6 0 1.1-.5 1.1-1.1V6.1c0-.6-.5-1.1-1.1-1.1H5.1C4.5 5 4 5.5 4 6.1v7.8c0 .6.5 1.1 1.1 1.1zm.4-8.5h7V10l-1-1c-.3-.3-.8-.3-1 0l-1.6 1.5-1.2-.7c-.3-.2-.6-.2-.9 0l-1.3 1V6.5zm0 6.1l1.8-1.3 1.3.8c.3.2.7.2.9-.1l1.5-1.4 1.5 1.4v1.5h-7v-.9z"})}),title:o?(0,i.__)("Replace image"):S,onClick:e,isActive:o})}),o&&(0,s.jsx)(F,{value:e,onChange:t,activeObjectAttributes:a,contentRef:c})]})}};function F({value:e,onChange:t,activeObjectAttributes:n,contentRef:o}){const{style:a,alt:l}=n,c=a?.replace(/\D/g,""),[u,h]=(0,j.useState)(c),[p,m]=(0,j.useState)(l),d=u!==c||p!==l,g=(0,r.useAnchor)({editableContentElement:o.current,settings:A});return(0,s.jsx)(y.Popover,{placement:"bottom",focusOnMount:!1,anchor:g,className:"block-editor-format-toolbar__image-popover",children:(0,s.jsx)("form",{className:"block-editor-format-toolbar__image-container-content",onSubmit:o=>{const a=e.replacements.slice();a[e.start]={type:k,attributes:{...n,style:u?`width: ${u}px;`:"",alt:p}},t({...e,replacements:a}),o.preventDefault()},children:(0,s.jsxs)(y.__experimentalVStack,{spacing:4,children:[(0,s.jsx)(y.__experimentalNumberControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Width"),value:u,min:1,onChange:e=>{h(e)}}),(0,s.jsx)(y.TextareaControl,{label:(0,i.__)("Alternative text"),__nextHasNoMarginBottom:!0,value:p,onChange:e=>{m(e)},help:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y.ExternalLink,{href:(0,i.__)("https://www.w3.org/WAI/tutorials/images/decision-tree/"),children:(0,i.__)("Describe the purpose of the image.")}),(0,s.jsx)("br",{}),(0,i.__)("Leave empty if decorative.")]})}),(0,s.jsx)(y.__experimentalHStack,{justify:"right",children:(0,s.jsx)(y.Button,{disabled:!d,accessibleWhenDisabled:!0,variant:"primary",type:"submit",size:"compact",children:(0,i.__)("Apply")})})]})})})}var N=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12.5 5L10 19h1.9l2.5-14z"})});const{essentialFormatKey:M}=m(l.privateApis),R="core/italic",V=(0,i.__)("Italic"),P={name:R,title:V,tagName:"em",className:null,[M]:!0,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:R,title:V}))}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"i",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{name:"italic",icon:N,title:V,onClick:function(){n((0,r.toggleFormat)(t,{type:R})),o()},isActive:e,shortcutType:"primary",shortcutCharacter:"i"}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatItalic",onInput:a})]})}},B=window.wp.url,L=window.wp.htmlEntities;var O=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.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"})});const I=window.wp.a11y,H=window.wp.data;function z(e){if(!e)return!1;const t=e.trim();if(!t)return!1;if(/^\S+:/.test(t)){const e=(0,B.getProtocol)(t);if(!(0,B.isValidProtocol)(e))return!1;if(e.startsWith("http")&&!/^https?:\/\/[^\/\s]/i.test(t))return!1;const n=(0,B.getAuthority)(t);if(!(0,B.isValidAuthority)(n))return!1;const o=(0,B.getPath)(t);if(o&&!(0,B.isValidPath)(o))return!1;const a=(0,B.getQueryString)(t);if(a&&!(0,B.isValidQueryString)(a))return!1;const r=(0,B.getFragment)(t);if(r&&!(0,B.isValidFragment)(r))return!1}return!(t.startsWith("#")&&!(0,B.isValidFragment)(t))}function E(e,t,n=e.start,o=e.end){const a={start:null,end:null},{formats:r}=e;let s,i;if(!r?.length)return a;const l=r.slice(),c=l[n]?.find((({type:e})=>e===t.type)),u=l[o]?.find((({type:e})=>e===t.type)),h=l[o-1]?.find((({type:e})=>e===t.type));if(c)s=c,i=n;else if(u)s=u,i=o;else{if(!h)return a;s=h,i=o-1}const p=l[i].indexOf(s),m=[l,i,s,p];return{start:n=(n=G(...m))<0?0:n,end:o=W(...m)}}function U(e,t,n,o,a){let r=t;const s={forwards:1,backwards:-1}[a]||1,i=-1*s;for(;e[r]&&e[r][o]===n;)r+=s;return r+=i,r}const D=(e,...t)=>(...n)=>e(...n,...t),G=D(U,"backwards"),W=D(U,"forwards"),Z=window.wp.compose,$=({setting:e,value:t,onChange:n})=>{const o=!!t&&t?.cssClasses?.length>0,[a,r]=(0,j.useState)(o),l=`css-classes-setting-${(0,Z.useInstanceId)($)}`,c=o=>{const a="string"==typeof o?o.replace(/,/g," ").replace(/\s+/g," ").trim():o;n({...t,[e.id]:a})};return(0,s.jsxs)("fieldset",{children:[(0,s.jsx)(y.VisuallyHidden,{as:"legend",children:e.title}),(0,s.jsxs)(y.__experimentalVStack,{spacing:3,children:[(0,s.jsx)(y.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.title,onChange:()=>{a?(o&&c(""),r(!1)):r(!0)},checked:a||o,"aria-expanded":a,"aria-controls":a?l:void 0}),a&&(0,s.jsx)("div",{id:l,children:(0,s.jsx)(y.__experimentalInputControl,{label:(0,i.__)("CSS classes"),value:t?.cssClasses,onChange:c,help:(0,i.__)("Separate multiple classes with spaces."),__unstableInputWidth:"100%",__next40pxDefaultSize:!0})})]})]})};var K=$;const Q=[...l.LinkControl.DEFAULT_LINK_SETTINGS,{id:"nofollow",title:(0,i.__)("Mark as nofollow")},{id:"cssClasses",title:(0,i.__)("Additional CSS class(es)"),render:(e,t,n)=>(0,s.jsx)(K,{setting:e,value:t,onChange:n})}];var X=function({isActive:e,activeAttributes:t,value:n,onChange:o,onFocusOutside:a,stopAddingLink:c,contentRef:u,focusOnMount:h}){const p=function(e,t){let n=e.start,o=e.end;if(t){const t=E(e,{type:"core/link"});n=t.start,o=t.end+1}return(0,r.slice)(e,n,o)}(n,e).text,{selectionChange:m}=(0,H.useDispatch)(l.store),{createPageEntity:d,userCanCreatePages:g,selectionStart:x}=(0,H.useSelect)((e=>{const{getSettings:t,getSelectionStart:n}=e(l.store),o=t();return{createPageEntity:o.__experimentalCreatePageEntity,userCanCreatePages:o.__experimentalUserCanCreatePages,selectionStart:n()}}),[]),v=(0,j.useMemo)((()=>({url:t.url,type:t.type,id:t.id,opensInNewTab:"_blank"===t.target,nofollow:t.rel?.includes("nofollow"),title:p,cssClasses:t.class})),[t.class,t.id,t.rel,t.target,t.type,t.url,p]),f=(0,r.useAnchor)({editableContentElement:u.current,settings:{...ee,isActive:e}});return(0,s.jsx)(y.Popover,{anchor:f,animate:!1,onClose:c,onFocusOutside:a,placement:"bottom",offset:8,shift:!0,focusOnMount:h,constrainTabbing:!0,children:(0,s.jsx)(l.LinkControl,{value:v,onChange:function(t){const a=v?.url,s=!a;t={...v,...t};const l=(0,B.prependHTTP)(t.url),u=function({url:e,type:t,id:n,opensInNewWindow:o,nofollow:a,cssClasses:r}){const s={type:"core/link",attributes:{url:e}};t&&(s.attributes.type=t),n&&(s.attributes.id=n),o&&(s.attributes.target="_blank",s.attributes.rel=s.attributes.rel?s.attributes.rel+" noreferrer noopener":"noreferrer noopener"),a&&(s.attributes.rel=s.attributes.rel?s.attributes.rel+" nofollow":"nofollow");const i=r?.trim();return i?.length&&(s.attributes.class=i),s}({url:l,type:t.type,id:void 0!==t.id&&null!==t.id?String(t.id):void 0,opensInNewWindow:t.opensInNewTab,nofollow:t.nofollow,cssClasses:t.cssClasses}),h=t.title||l;let d;if((0,r.isCollapsed)(n)&&!e){const e=(0,r.insert)(n,h);return d=(0,r.applyFormat)(e,u,n.start,n.start+h.length),o(d),c(),void m({clientId:x.clientId,identifier:x.attributeKey,start:n.start+h.length+1})}if(h===p)d=(0,r.applyFormat)(n,u);else{d=(0,r.create)({text:h}),d=(0,r.applyFormat)(d,u,0,h.length);const e=E(n,{type:"core/link"}),[t,o]=(0,r.split)(n,e.start,e.start),a=(0,r.replace)(o,p,d);d=(0,r.concat)(t,a)}o(d),s||c(),z(l)?e?(0,I.speak)((0,i.__)("Link edited."),"assertive"):(0,I.speak)((0,i.__)("Link inserted."),"assertive"):(0,I.speak)((0,i.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")},onRemove:function(){const e=(0,r.removeFormat)(n,"core/link");o(e),c(),(0,I.speak)((0,i.__)("Link removed."),"assertive")},hasRichPreviews:!0,createSuggestion:d&&async function(e){const t=await d({title:e,status:"draft"});return{id:t.id,type:t.type,title:t.title.rendered,url:t.link,kind:"post-type"}},withCreateSuggestion:g,createSuggestionButtonText:function(e){return(0,j.createInterpolateElement)((0,i.sprintf)((0,i.__)("Create page: <mark>%s</mark>"),e),{mark:(0,s.jsx)("mark",{})})},hasTextControl:!0,settings:Q,showInitialSuggestions:!0,suggestionsQuery:{initialSuggestionsSearchOptions:{type:"post",subtype:"page",perPage:20}}})})};const{essentialFormatKey:J}=m(l.privateApis),q="core/link",Y=(0,i.__)("Link");const ee={name:q,title:Y,tagName:"a",className:null,attributes:{url:"href",type:"data-type",id:"data-id",_id:"id",target:"target",rel:"rel",class:"class"},[J]:!0,__unstablePasteRule(e,{html:t,plainText:n}){const o=(t||n).replace(/<[^>]+>/g,"").trim();if(!(0,B.isURL)(o)||!/^https?:/.test(o))return e;window.console.log("Created link:\n\n",o);const a={type:q,attributes:{url:(0,L.decodeEntities)(o)}};return(0,r.isCollapsed)(e)?(0,r.insert)(e,(0,r.applyFormat)((0,r.create)({text:n}),a,0,n.length)):(0,r.applyFormat)(e,a)},edit:function({isActive:e,activeAttributes:t,value:n,onChange:o,onFocus:a,contentRef:c}){const[u,h]=(0,j.useState)(!1),[p,m]=(0,j.useState)(null);function d(t){const a=(0,r.getTextContent)((0,r.slice)(n));!e&&a&&(0,B.isURL)(a)&&z(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:a}})):!e&&a&&(0,B.isEmail)(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:`mailto:${a}`}})):!e&&a&&(0,B.isPhoneNumber)(a)?o((0,r.applyFormat)(n,{type:q,attributes:{url:`tel:${a.replace(/\D/g,"")}`}})):(t&&m({el:t,action:null}),h(!0))}(0,j.useEffect)((()=>{e||h(!1)}),[e]),(0,j.useLayoutEffect)((()=>{const t=c.current;if(t)return t.addEventListener("click",n),()=>{t.removeEventListener("click",n)};function n(t){const n=t.target.closest("[contenteditable] a");n&&e&&(h(!0),m({el:n,action:"click"}))}}),[c,e]);const g=!("A"===p?.el?.tagName&&"click"===p?.action),x=!(0,r.isCollapsed)(n);return(0,s.jsxs)(s.Fragment,{children:[x&&(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"k",onUse:d}),(0,s.jsx)(l.RichTextShortcut,{type:"primaryShift",character:"k",onUse:function(){o((0,r.removeFormat)(n,q)),(0,I.speak)((0,i.__)("Link removed."),"assertive")}}),(0,s.jsx)(l.RichTextToolbarButton,{name:"link",icon:O,title:e?(0,i.__)("Link"):Y,onClick:e=>{d(e.currentTarget)},isActive:e||u,shortcutType:"primary",shortcutCharacter:"k","aria-haspopup":"true","aria-expanded":u}),u&&(0,s.jsx)(X,{stopAddingLink:function(){h(!1),"BUTTON"===p?.el?.tagName?p.el.focus():a(),m(null)},onFocusOutside:function(){h(!1),m(null)},isActive:e,activeAttributes:t,value:n,onChange:o,contentRef:c,focusOnMount:!!g&&"firstElement"})]})}};var te=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z"})});const ne="core/strikethrough",oe=(0,i.__)("Strikethrough"),ae={name:ne,title:oe,tagName:"s",className:null,edit({isActive:e,value:t,onChange:n,onFocus:o}){function a(){n((0,r.toggleFormat)(t,{type:ne,title:oe})),o()}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"access",character:"d",onUse:a}),(0,s.jsx)(l.RichTextToolbarButton,{icon:te,title:oe,onClick:a,isActive:e,role:"menuitemcheckbox"})]})}},re="core/underline",se=(0,i.__)("Underline"),ie={name:re,title:se,tagName:"span",className:null,attributes:{style:"style"},edit({value:e,onChange:t}){const n=()=>{t((0,r.toggleFormat)(e,{type:re,attributes:{style:"text-decoration: underline;"},title:se}))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextShortcut,{type:"primary",character:"u",onUse:n}),(0,s.jsx)(l.__unstableRichTextInputEvent,{inputType:"formatUnderline",onInput:n})]})}};var le=(0,j.forwardRef)((({icon:e,size:t=24,...n},o)=>(0,j.cloneElement)(e,{width:t,height:t,...n,ref:o}))),ce=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})}),ue=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.Path,{d:"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z"})});const{Tabs:he}=m(y.privateApis),pe=[{name:"color",title:(0,i.__)("Text")},{name:"backgroundColor",title:(0,i.__)("Background")}];function me(e=""){return e.split(";").reduce(((e,t)=>{if(t){const[n,o]=t.split(":");"color"===n&&(e.color=o),"background-color"===n&&o!==fe&&(e.backgroundColor=o)}return e}),{})}function de(e="",t){return e.split(" ").reduce(((e,n)=>{if(n.startsWith("has-")&&n.endsWith("-color")){const o=n.replace(/^has-/,"").replace(/-color$/,""),a=(0,l.getColorObjectByAttributeValues)(t,o);e.color=a.color}return e}),{})}function ge(e,t,n){const o=(0,r.getActiveFormat)(e,t);return o?{...me(o.attributes.style),...de(o.attributes.class,n)}:{}}function xe({name:e,property:t,value:n,onChange:o}){const a=(0,H.useSelect)((e=>{const{getSettings:t}=e(l.store);return t().colors??[]}),[]),i=(0,j.useMemo)((()=>ge(n,e,a)),[e,n,a]);return(0,s.jsx)(l.ColorPalette,{value:i[t],onChange:s=>{o(function(e,t,n,o){const{color:a,backgroundColor:s}={...ge(e,t,n),...o};if(!a&&!s)return(0,r.removeFormat)(e,t);const i=[],c=[],u={};if(s?i.push(["background-color",s].join(":")):i.push(["background-color",fe].join(":")),a){const e=(0,l.getColorObjectByColorValue)(n,a);e?c.push((0,l.getColorClassName)("color",e.slug)):i.push(["color",a].join(":"))}return i.length&&(u.style=i.join(";")),c.length&&(u.class=c.join(" ")),(0,r.applyFormat)(e,{type:t,attributes:u})}(n,e,a,{[t]:s}))},enableAlpha:!0,__experimentalIsRenderedInSidebar:!0})}function ve({name:e,value:t,onChange:n,onClose:o,contentRef:a,isActive:i}){const l=(0,r.useAnchor)({editableContentElement:a.current,settings:{...je,isActive:i}});return(0,s.jsx)(y.Popover,{onClose:o,className:"format-library__inline-color-popover",anchor:l,children:(0,s.jsxs)(he,{children:[(0,s.jsx)(he.TabList,{children:pe.map((e=>(0,s.jsx)(he.Tab,{tabId:e.name,children:e.title},e.name)))}),pe.map((o=>(0,s.jsx)(he.TabPanel,{tabId:o.name,focusable:!1,children:(0,s.jsx)(xe,{name:e,property:o.name,value:t,onChange:n})},o.name)))]})})}const fe="rgba(0, 0, 0, 0)",be="core/text-color",_e=(0,i.__)("Highlight"),we=[];function ye(e,t){const{ownerDocument:n}=e,{defaultView:o}=n,a=o.getComputedStyle(e).getPropertyValue(t);return"background-color"===t&&a===fe&&e.parentElement?ye(e.parentElement,t):a}const je={name:be,title:_e,tagName:"mark",className:"has-inline-color",attributes:{style:"style",class:"class"},edit:function({value:e,onChange:t,isActive:n,activeAttributes:o,contentRef:a}){const[i,c=we]=(0,l.useSettings)("color.custom","color.palette"),[u,h]=(0,j.useState)(!1),p=(0,j.useMemo)((()=>function(e,{color:t,backgroundColor:n}){if(t||n)return{color:t||ye(e,"color"),backgroundColor:n===fe?ye(e,"background-color"):n}}(a.current,ge(e,be,c))),[a,e,c]),m=!!c.length||i;return m||n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{className:"format-library-text-color-button",isActive:n,icon:(0,s.jsx)(le,{icon:Object.keys(o).length?ce:ue,style:p}),title:_e,onClick:m?()=>h(!0):()=>t((0,r.removeFormat)(e,be)),role:"menuitemcheckbox"}),u&&(0,s.jsx)(ve,{name:be,onClose:()=>h(!1),activeAttributes:o,value:e,onChange:t,contentRef:a,isActive:n})]}):null}};var Ce=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M16.9 18.3l.8-1.2c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.1-.3-.4-.5-.6-.7-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.2 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3L15 19.4h4.3v-1.2h-2.4zM14.1 7.2h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})});const ke="core/subscript",Se=(0,i.__)("Subscript"),Te={name:ke,title:Se,tagName:"sub",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Ce,title:Se,onClick:function(){n((0,r.toggleFormat)(t,{type:ke,title:Se})),o()},isActive:e,role:"menuitemcheckbox"})};var Ae=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M16.9 10.3l.8-1.3c.4-.6.7-1.2.9-1.6.2-.4.3-.8.3-1.2 0-.3-.1-.7-.2-1-.2-.2-.4-.4-.7-.6-.3-.2-.6-.3-1-.3s-.8.1-1.1.2c-.3.1-.7.3-1 .6l.1 1.3c.3-.3.5-.5.8-.6s.6-.2.9-.2c.3 0 .5.1.7.2.2.2.2.4.2.7 0 .3-.1.5-.2.8-.1.3-.4.7-.8 1.3l-1.8 2.8h4.3v-1.2h-2.2zm-2.8-3.1h-2L9.5 11 6.9 7.2h-2l3.6 5.3L4.7 18h2l2.7-4 2.7 4h2l-3.8-5.5 3.8-5.3z"})});const Fe="core/superscript",Ne=(0,i.__)("Superscript"),Me={name:Fe,title:Ne,tagName:"sup",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Ae,title:Ne,onClick:function(){n((0,r.toggleFormat)(t,{type:Fe,title:Ne})),o()},isActive:e,role:"menuitemcheckbox"})};var Re=(0,s.jsx)(c.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)(c.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 Ve="core/keyboard",Pe=(0,i.__)("Keyboard input"),Be={name:Ve,title:Pe,tagName:"kbd",className:null,edit:({isActive:e,value:t,onChange:n,onFocus:o})=>(0,s.jsx)(l.RichTextToolbarButton,{icon:Re,title:Pe,onClick:function(){n((0,r.toggleFormat)(t,{type:Ve,title:Pe})),o()},isActive:e,role:"menuitemcheckbox"})};var Le=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M12 4a8 8 0 1 1 .001 16.001A8 8 0 0 1 12 4Zm0 1.5a6.5 6.5 0 1 0-.001 13.001A6.5 6.5 0 0 0 12 5.5Zm.75 11h-1.5V15h1.5v1.5Zm-.445-9.234a3 3 0 0 1 .445 5.89V14h-1.5v-1.25c0-.57.452-.958.917-1.01A1.5 1.5 0 0 0 12 8.75a1.5 1.5 0 0 0-1.5 1.5H9a3 3 0 0 1 3.305-2.984Z"})});const Oe="core/unknown",Ie=(0,i.__)("Clear Unknown Formatting");const He={name:Oe,title:Ie,tagName:"*",className:null,edit({isActive:e,value:t,onChange:n,onFocus:o}){if(!e&&!function(e){return!(0,r.isCollapsed)(e)&&(0,r.slice)(e).formats.some((e=>e.some((e=>e.type===Oe))))}(t))return null;return(0,s.jsx)(l.RichTextToolbarButton,{name:"unknown",icon:Le,title:Ie,onClick:function(){n((0,r.removeFormat)(t,Oe)),o()},isActive:!0})}};var ze=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M17.5 10h-1.7l-3.7 10.5h1.7l.9-2.6h3.9l.9 2.6h1.7L17.5 10zm-2.2 6.3 1.4-4 1.4 4h-2.8zm-4.8-3.8c1.6-1.8 2.9-3.6 3.7-5.7H16V5.2h-5.8V3H8.8v2.2H3v1.5h9.6c-.7 1.6-1.8 3.1-3.1 4.6C8.6 10.2 7.8 9 7.2 8H5.6c.6 1.4 1.7 2.9 2.9 4.4l-2.4 2.4c-.3.4-.7.8-1.1 1.2l1 1 1.2-1.2c.8-.8 1.6-1.5 2.3-2.3.8.9 1.7 1.7 2.5 2.5l.6-1.5c-.7-.6-1.4-1.3-2.1-2z"})});const Ee="core/language",Ue=(0,i.__)("Language"),De={name:Ee,tagName:"bdo",className:null,edit:function({isActive:e,value:t,onChange:n,contentRef:o}){const[a,i]=(0,j.useState)(!1),c=()=>{i((e=>!e))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{icon:ze,label:Ue,title:Ue,onClick:()=>{e?n((0,r.removeFormat)(t,Ee)):c()},isActive:e,role:"menuitemcheckbox"}),a&&(0,s.jsx)(Ge,{value:t,onChange:n,onClose:c,contentRef:o})]})},title:Ue};function Ge({value:e,contentRef:t,onChange:n,onClose:o}){const a=(0,r.useAnchor)({editableContentElement:t.current,settings:De}),[l,c]=(0,j.useState)(""),[u,h]=(0,j.useState)("ltr");return(0,s.jsx)(y.Popover,{className:"block-editor-format-toolbar__language-popover",anchor:a,onClose:o,children:(0,s.jsxs)(y.__experimentalVStack,{as:"form",spacing:4,className:"block-editor-format-toolbar__language-container-content",onSubmit:t=>{t.preventDefault(),n((0,r.applyFormat)(e,{type:Ee,attributes:{lang:l,dir:u}})),o()},children:[(0,s.jsx)(y.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:Ue,value:l,onChange:e=>c(e),help:(0,i.__)('A valid language attribute, like "en" or "fr".')}),(0,s.jsx)(y.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,i.__)("Text direction"),value:u,options:[{label:(0,i.__)("Left to right"),value:"ltr"},{label:(0,i.__)("Right to left"),value:"rtl"}],onChange:e=>h(e)}),(0,s.jsx)(y.__experimentalHStack,{alignment:"right",children:(0,s.jsx)(y.Button,{__next40pxDefaultSize:!0,variant:"primary",type:"submit",text:(0,i.__)("Apply")})})]})})}var We=(0,s.jsx)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)(c.Path,{d:"M11.2 6.8c-.7 0-1.4.5-1.6 1.1l-2.8 7.5-1.2-1.8c-.1-.2-.4-.3-.6-.3H3v1.5h1.6l1.2 1.8c.6.9 1.9.7 2.2-.3l2.9-7.9s.1-.2.2-.2h7.8V6.7h-7.8Zm5.3 3.4-1.9 1.9-1.9-1.9-1.1 1.1 1.9 1.9-1.9 1.9 1.1 1.1 1.9-1.9 1.9 1.9 1.1-1.1-1.9-1.9 1.9-1.9-1.1-1.1Z"})});const{Badge:Ze}=m(y.privateApis),$e="core/math",Ke=(0,i.__)("Math");function Qe({value:e,onChange:t,activeAttributes:n,contentRef:o,latexToMathML:a}){const[l,c]=(0,j.useState)(n?.["data-latex"]||""),[u,h]=(0,j.useState)(null),p=(0,r.useAnchor)({editableContentElement:o.current,settings:Xe});return(0,s.jsx)(y.Popover,{placement:"bottom-start",offset:8,focusOnMount:!1,anchor:p,className:"block-editor-format-toolbar__math-popover",children:(0,s.jsx)("div",{style:{minWidth:"300px",padding:"4px"},children:(0,s.jsxs)(y.__experimentalVStack,{spacing:1,children:[(0,s.jsx)(y.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,hideLabelFromVision:!0,label:(0,i.__)("LaTeX math syntax"),value:l,onChange:n=>{let o;c(n);try{o=a(n,{displayMode:!1}),h(null)}catch(e){return void h(e.message)}const r=e.replacements.slice();r[e.start]={type:$e,attributes:{"data-latex":n},innerHTML:o},t({...e,replacements:r})},placeholder:(0,i.__)("e.g., x^2, \\frac{a}{b}"),autoComplete:"off",className:"block-editor-format-toolbar__math-input"}),u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ze,{intent:"error",className:"wp-block-math__error",children:u}),(0,s.jsx)("style",{children:".wp-block-math__error .components-badge__content{white-space:normal}"})]})]})})})}const Xe={name:$e,title:Ke,tagName:"math",className:null,attributes:{"data-latex":"data-latex"},contentEditable:!1,edit:function({value:e,onChange:t,onFocus:n,isObjectActive:o,activeObjectAttributes:i,contentRef:c}){const[u,h]=(0,j.useState)();return(0,j.useEffect)((()=>{Promise.resolve().then(a.t.bind(a,3533,23)).then((e=>{h((()=>e.default))}))}),[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.RichTextToolbarButton,{icon:We,title:Ke,onClick:()=>{const o=(0,r.insertObject)(e,{type:$e,attributes:{"data-latex":""},innerHTML:""});o.start=o.end-1,t(o),n()},isActive:o}),o&&(0,s.jsx)(Qe,{value:e,onChange:t,activeAttributes:i,contentRef:c,latexToMathML:u})]})}},Je=(0,i.__)("Non breaking space");[v,w,A,P,ee,ae,ie,je,Te,Me,Be,He,De,Xe,{name:"core/non-breaking-space",title:Je,tagName:"nbsp",className:null,edit:({value:e,onChange:t})=>(0,s.jsx)(l.RichTextShortcut,{type:"primaryShift",character:" ",onUse:function(){t((0,r.insert)(e," "))}})}].forEach((({name:e,...t})=>(0,r.registerFormatType)(e,t))),(window.wp=window.wp||{}).formatLibrary={}})();
\ No newline at end of file
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 49cd0fe34b..019c5aa4f8 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.9-beta2-61124';
+$wp_version = '6.9-beta2-61125';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.